summaryrefslogtreecommitdiffstats
path: root/examples/examples-onap-bbs/src/main/resources/logic/ServiceUpdateStateCpeAuthTask.js
diff options
context:
space:
mode:
authors00370346 <swarup.nayak1@huawei.com>2019-06-11 18:02:57 +0530
committers00370346 <swarup.nayak1@huawei.com>2019-06-11 18:03:02 +0530
commit3f53167d98e00198c15c950d9b7ba4ea8b4a4c05 (patch)
treeed6563d56f7f6b2265eb460891313559ffd0d6ff /examples/examples-onap-bbs/src/main/resources/logic/ServiceUpdateStateCpeAuthTask.js
parent46c6d88b3002afef0a05b10c73bceb0c6c9d0c51 (diff)
BBS APEX policy not updating PNF attachment point after relocation
Issue-ID: POLICY-1835 Signed-off-by: s00370346 <swarup.nayak1@huawei.com> Change-Id: I47473444b58fa3b064ba142ce13c5e3520adb8c7
Diffstat (limited to 'examples/examples-onap-bbs/src/main/resources/logic/ServiceUpdateStateCpeAuthTask.js')
-rw-r--r--examples/examples-onap-bbs/src/main/resources/logic/ServiceUpdateStateCpeAuthTask.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/examples-onap-bbs/src/main/resources/logic/ServiceUpdateStateCpeAuthTask.js b/examples/examples-onap-bbs/src/main/resources/logic/ServiceUpdateStateCpeAuthTask.js
index 839956cc9..56be83628 100644
--- a/examples/examples-onap-bbs/src/main/resources/logic/ServiceUpdateStateCpeAuthTask.js
+++ b/examples/examples-onap-bbs/src/main/resources/logic/ServiceUpdateStateCpeAuthTask.js
@@ -50,6 +50,7 @@ var HTTP_PROTOCOL = "https://";
var results;
var putUrl;
var service_instance;
+var AAI_VERSION = "v14";
try {
var br = Files.newBufferedReader(Paths.get(
"/home/apexuser/examples/config/ONAPBBS/config.txt"));
@@ -64,8 +65,11 @@ try {
} else if (line.startsWith("AAI_PASSWORD")) {
var str = line.split("=");
AAI_PASSWORD = str[str.length - 1];
- }
- }
+ }else if (line.startsWith("AAI_VERSION")) {
+ var str = line.split("=");
+ AAI_VERSION = str[str.length - 1];
+ }
+ }
} catch (err) {
executor.logger.info("Failed to retrieve data " + err);
}
@@ -75,7 +79,7 @@ executor.logger.info("AAI_URL=>" + AAI_URL);
/* Get service instance Id from AAI */
try {
var urlGet = HTTP_PROTOCOL + AAI_URL +
- "/aai/v14/nodes/service-instances/service-instance/" +
+ "/aai/" + AAI_VERSION + "/nodes/service-instances/service-instance/" +
SERVICE_INSTANCE_ID + "?format=resource_and_url"
executor.logger.info("Query url" + urlGet);