From 041df698d50f2c9da435821d80e731df28fdc5c4 Mon Sep 17 00:00:00 2001 From: BenjiReis Date: Fri, 23 Aug 2019 10:42:51 +0200 Subject: [PATCH] chore(xo-server-sdn-controller): unify (in/de)crement style (#4444) --- .../xo-server-sdn-controller/src/ovsdb-client.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/xo-server-sdn-controller/src/ovsdb-client.js b/packages/xo-server-sdn-controller/src/ovsdb-client.js index 7c70b26a0..e8a7873d2 100644 --- a/packages/xo-server-sdn-controller/src/ovsdb-client.js +++ b/packages/xo-server-sdn-controller/src/ovsdb-client.js @@ -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',