diff options
author | liamfallon <liam.fallon@est.tech> | 2019-07-01 09:01:19 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2019-07-01 09:01:19 +0000 |
commit | f08984b16abf954b7b351f21a3822e21d9d4f7c2 (patch) | |
tree | 1dc21cf3240864f37efe304a75c8055d89f48662 /examples/examples-onap-bbs/src/main/resources/logic/AAIServiceAssignedTask.js | |
parent | c4baac8a79b0ca6340693ae47f9c424f3612e3bd (diff) |
Fix issues from Checkstyle reviews
Use lombok on fields in EnEvent.
Remove unnecessary code in BBS WebClient class
Address Sonar issue in Execurot class
Issue-ID: POLICY-1791
Change-Id: If07dc4529b121f8bfcd6ab1ae6c9def4774f9f4d
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'examples/examples-onap-bbs/src/main/resources/logic/AAIServiceAssignedTask.js')
-rw-r--r-- | examples/examples-onap-bbs/src/main/resources/logic/AAIServiceAssignedTask.js | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/examples/examples-onap-bbs/src/main/resources/logic/AAIServiceAssignedTask.js b/examples/examples-onap-bbs/src/main/resources/logic/AAIServiceAssignedTask.js index 6e72e618c..a4be3707f 100644 --- a/examples/examples-onap-bbs/src/main/resources/logic/AAIServiceAssignedTask.js +++ b/examples/examples-onap-bbs/src/main/resources/logic/AAIServiceAssignedTask.js @@ -84,7 +84,7 @@ try { executor.logger.info("Query url" + urlGet); - result = client.httpRequest(urlGet, "GET", null, AAI_USERNAME, AAI_PASSWORD, "application/json", true); + result = client.httpRequest(urlGet, "GET", null, AAI_USERNAME, AAI_PASSWORD, "application/json"); executor.logger.info("Data received From " + urlGet + " " + result); jsonObj = JSON.parse(result.toString()); @@ -116,7 +116,7 @@ try { executor.logger.info("ready to putAfter Parse " + JSON.stringify(putUpddateServInstance, null, 4)); var urlPut = HTTP_PROTOCOL + AAI_URL + putUrl + "?resource_version=" + resource_version; result = client.httpRequest(urlPut, "PUT", JSON.stringify(putUpddateServInstance), AAI_USERNAME, AAI_PASSWORD, - "application/json", true); + "application/json"); executor.logger.info("Data received From " + urlPut + " " + result); /* If failure to retrieve data proceed to Failure */ if (result != "") { @@ -157,7 +157,7 @@ try { /* 1. Get PNF */ var urlGetPnf = HTTP_PROTOCOL + AAI_URL + "/aai/" + AAI_VERSION + "/network/pnfs/pnf/" + pnfName; - pnfResponse = client.httpRequest(urlGetPnf, "GET", null, AAI_USERNAME, AAI_PASSWORD, "application/json", true); + pnfResponse = client.httpRequest(urlGetPnf, "GET", null, AAI_USERNAME, AAI_PASSWORD, "application/json"); executor.logger.info("Data received From " + urlGetPnf + " " + pnfResponse); /* If failure to retrieve data proceed to Failure */ if (result != "") { @@ -166,7 +166,7 @@ try { pnfUpdate = JSON.parse(pnfResponse.toString()); executor.logger.info(JSON.stringify(pnfUpdate, null, 4)); - /*2. Create logical link */ + /* 2. Create logical link */ var link_name = attachmentPoint; var logicalLink = { "link-name" : link_name, @@ -176,14 +176,14 @@ try { var urlNewLogicalLink = HTTP_PROTOCOL + AAI_URL + "/aai/" + AAI_VERSION + "/network/logical-links/logical-link/" + link_name; result = client.httpRequest(urlNewLogicalLink, "PUT", JSON.stringify(logicalLink), AAI_USERNAME, AAI_PASSWORD, - "application/json", true); + "application/json"); executor.logger.info("Data received From " + urlNewLogicalLink + " " + result); /* If failure to retrieve data proceed to Failure */ if (result != "") { aaiUpdateResult = false; } - /*3. Update pnf with new relation*/ + /* 3. Update pnf with new relation */ for (var i = 0; i < pnfUpdate["relationship-list"]["relationship"].length; i++) { if (pnfUpdate["relationship-list"]["relationship"][i]['related-to'] == 'logical-link') { pnfUpdate["relationship-list"]["relationship"][i]['related-link'] = "/aai/" + AAI_VERSION @@ -202,7 +202,7 @@ try { executor.logger.info("Put pnf to aai " + JSON.stringify(pnfUpdate, null, 4)); var urlPutPnf = HTTP_PROTOCOL + AAI_URL + "/aai/" + AAI_VERSION + "/network/pnfs/pnf/" + pnfName; result = client.httpRequest(urlPutPnf, "PUT", JSON.stringify(pnfUpdate), AAI_USERNAME, AAI_PASSWORD, - "application/json", true); + "application/json"); executor.logger.info("Data received From " + urlPutPnf + " " + result); /* If failure to retrieve data proceed to Failure */ @@ -215,8 +215,7 @@ try { var linkResult; var urlOldLogicalLink = HTTP_PROTOCOL + AAI_URL + "/aai/" + AAI_VERSION + "/network/logical-links/logical-link/" + oldLinkName; - linkResult = client - .httpRequest(urlOldLogicalLink, "GET", null, AAI_USERNAME, AAI_PASSWORD, "application/json", true); + linkResult = client.httpRequest(urlOldLogicalLink, "GET", null, AAI_USERNAME, AAI_PASSWORD, "application/json"); executor.logger.info("Data received From " + urlOldLogicalLink + " " + linkResult + " " + linkResult.hasOwnProperty("link-name")); oldLinkResult = JSON.parse(linkResult.toString()); @@ -225,7 +224,7 @@ try { var urlDelOldLogicalLink = urlOldLogicalLink + "?resource-version=" + res_version; executor.logger.info("Delete called for " + urlDelOldLogicalLink); result = client.httpRequest(urlDelOldLogicalLink, "DELETE", null, AAI_USERNAME, AAI_PASSWORD, - "application/json", true); + "application/json"); executor.logger.info("Delete called for " + urlDelOldLogicalLink + " result " + result); } } |