aboutsummaryrefslogtreecommitdiffstats
path: root/plans/so/integration-etsi-testing/config
diff options
context:
space:
mode:
authorwaqas.ikram <waqas.ikram@est.tech>2019-08-20 10:46:55 +0000
committerWaqas Ikram <waqas.ikram@est.tech>2019-08-20 10:47:10 +0000
commit241cd37ac8cf7a12bb0b160e8881d1543726b86b (patch)
treee7cf639874ffa5bb2c419799da9bbc10942535b5 /plans/so/integration-etsi-testing/config
parentb59cd347eae4b6f602debf818e06f8a731ed9092 (diff)
Adding line of business relationship endpoint
Change-Id: I7e03a8faf50c0712e67c2f70819abbd2db0e25a6 Issue-ID: SO-2219 Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
Diffstat (limited to 'plans/so/integration-etsi-testing/config')
-rw-r--r--plans/so/integration-etsi-testing/config/aai-simulator-populate-data/line-of-business.json3
-rw-r--r--plans/so/integration-etsi-testing/config/aai-simulator-populate-data/platform.json3
-rwxr-xr-xplans/so/integration-etsi-testing/config/populate-aai-simulator.sh18
3 files changed, 24 insertions, 0 deletions
diff --git a/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/line-of-business.json b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/line-of-business.json
new file mode 100644
index 00000000..a551f8ff
--- /dev/null
+++ b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/line-of-business.json
@@ -0,0 +1,3 @@
+{
+ "line-of-business-name": "EtsiCsitLineOfBusiness"
+}
diff --git a/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/platform.json b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/platform.json
new file mode 100644
index 00000000..97e468e3
--- /dev/null
+++ b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/platform.json
@@ -0,0 +1,3 @@
+{
+ "platform-name": "EtsiCsitPlatform"
+}
diff --git a/plans/so/integration-etsi-testing/config/populate-aai-simulator.sh b/plans/so/integration-etsi-testing/config/populate-aai-simulator.sh
index 1a00f710..2a805d6c 100755
--- a/plans/so/integration-etsi-testing/config/populate-aai-simulator.sh
+++ b/plans/so/integration-etsi-testing/config/populate-aai-simulator.sh
@@ -54,6 +54,8 @@ populate_aai_simulator()
CUSTOMER_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/customer.json
PROJECT_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/project.json
OWNING_ENTITY_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/owning-entity.json
+ LINE_OF_BUSINESS_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/line-of-business.json
+ PLATFORM_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/platform.json
STATUS_CODE_ACCEPTED="202"
echo "$SCRIPT_NAME $(current_timestamp): checking health of AAI Simulator"
@@ -92,6 +94,22 @@ populate_aai_simulator()
exit 1
fi
+ echo "$SCRIPT_NAME $(current_timestamp): Adding Line Of Business"
+ status_code=$(curl -k --write-out %{http_code} --silent --output /dev/null -H "$BASIC_AUTHORIZATION_HEADER" -H "$ACCEPT_HEADER" -H "$CONTENT_TYPE_HEADER" $BASE_URL/business/lines-of-business/line-of-business/EtsiCsitLineOfBusiness -X PUT -d @$"$LINE_OF_BUSINESS_JSON_FILE")
+
+ if [[ "$status_code" -ne "$STATUS_CODE_ACCEPTED" ]] ; then
+ echo "$SCRIPT_NAME $(current_timestamp) ERROR: Unable to put line of business data in AAI Simulator. Status code received: $status_code"
+ exit 1
+ fi
+
+ echo "$SCRIPT_NAME $(current_timestamp): Adding Platform"
+ status_code=$(curl -k --write-out %{http_code} --silent --output /dev/null -H "$BASIC_AUTHORIZATION_HEADER" -H "$ACCEPT_HEADER" -H "$CONTENT_TYPE_HEADER" $BASE_URL/business/platforms/platform/EtsiCsitPlatform -X PUT -d @$"$PLATFORM_JSON_FILE")
+
+ if [[ "$status_code" -ne "$STATUS_CODE_ACCEPTED" ]] ; then
+ echo "$SCRIPT_NAME $(current_timestamp) ERROR: Unable to put platform data in AAI Simulator. Status code received: $status_code"
+ exit 1
+ fi
+
echo "$SCRIPT_NAME $(current_timestamp): AAI Simulator Populated Successfully"
}