chore(xo-server-sdn-controller): unify (in/de)crement style (#4444)

This commit is contained in:
BenjiReis
2019-08-23 10:42:51 +02:00
committed by Julien Fontanet
parent 97081f1219
commit 041df698d5

View File

@@ -13,7 +13,7 @@ const OVSDB_PORT = 6640
export class OvsdbClient {
constructor(host, clientKey, clientCert, caCert) {
this._numberOfPortAndInterface = 0
this._requestID = 0
this._requestId = 0
this._adding = []
@@ -58,9 +58,7 @@ export class OvsdbClient {
this._adding.push(adding)
const socket = await this._connect()
const index = this._numberOfPortAndInterface
++this._numberOfPortAndInterface
const index = ++this._numberOfPortAndInterface
const [bridgeUuid, bridgeName] = await this._getBridgeUuidForNetwork(
networkUuid,
networkName,
@@ -257,9 +255,9 @@ export class OvsdbClient {
for (let i = pos; i < data.length; ++i) {
const c = data.charAt(i)
if (c === '{') {
depth++
++depth
} else if (c === '}') {
depth--
--depth
if (depth === 0) {
const object = JSON.parse(buffer + data.substr(0, i + 1))
objects.push(object)
@@ -438,9 +436,7 @@ export class OvsdbClient {
async _sendOvsdbTransaction(params, socket) {
const stream = socket
const requestId = this._requestID
++this._requestID
const requestId = ++this._requestId
const req = {
id: requestId,
method: 'transact',