summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHany Abdelbaki <habdelbaki.ext@orange.com>2020-07-13 21:55:32 +0200
committerHany Abdelbaki <habdelbaki.ext@orange.com>2020-07-14 15:24:09 +0200
commit1fd67450b64030242c44c0845fe176d31ab1fd57 (patch)
tree5e928dd2e52f72720aeb2ab74838a71096093019
parent734ac7d1297dc31fe24614e0988a02ce1a142d63 (diff)
run cds bootstrap before vlb_cds instantiation
Issue-ID: TEST-248 Signed-off-by: Hany Abdelbaki <habdelbaki.ext@orange.com> Change-Id: Ief9e3be11ba9e5f06399c8bd5a2d394503a8a568
-rw-r--r--robot/resources/global_properties.robot2
-rwxr-xr-xrobot/resources/so/direct_instantiate.robot8
2 files changed, 10 insertions, 0 deletions
diff --git a/robot/resources/global_properties.robot b/robot/resources/global_properties.robot
index fd40eb05..74d2c24f 100644
--- a/robot/resources/global_properties.robot
+++ b/robot/resources/global_properties.robot
@@ -46,3 +46,5 @@ ${GLOBAL_DCAE_COLLECTOR_IP} 10.12.5.250
${GLOBAL_DCAE_COLLECTOR_PORT} 30417
${GLOBAL_VLB_0_INT_PKTGEN_PRIVATE_PORT_0_MAC} fa:16:3e:00:00:10
${GLOBAL_VPG_0_INT_PKTGEN_PRIVATE_PORT_0_MAC} fa:16:3e:00:00:20
+
+
diff --git a/robot/resources/so/direct_instantiate.robot b/robot/resources/so/direct_instantiate.robot
index 556c5a9e..15f583ad 100755
--- a/robot/resources/so/direct_instantiate.robot
+++ b/robot/resources/so/direct_instantiate.robot
@@ -6,6 +6,7 @@ Library Collections
Library String
Library DateTime
Library SoUtils
+Library RequestsLibrary
Library ONAPLibrary.PreloadData WITH NAME PreloadData
Library ONAPLibrary.Utilities
Library ONAPLibrary.JSON
@@ -19,6 +20,7 @@ Resource ../global_properties.robot
${SO_TEMPLATE_PATH} so
${SO_CATALOGDB_PATH} /ecomp/mso/catalog/v2/serviceVnfs?serviceModelName
${SO_APIHANDLER_PATH} /onap/so/infra/serviceInstantiation/v7/serviceInstances
+${CDS_BOOTSTRAP_PATH} /api/v1/blueprint-model/bootstrap
*** Keywords ***
Instantiate Service Direct To SO
@@ -64,6 +66,12 @@ CDS Service Instantiate
${auth}= Create List ${GLOBAL_SO_CATDB_USERNAME} ${GLOBAL_SO_PASSWORD}
${resp}= SO.Run Get Request ${GLOBAL_SO_CATDB_ENDPOINT} ${SO_CATALOGDB_PATH}=${cds_service_model} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
+ ${session}= Create Session cds ${GLOBAL_CCSDK_CDS_SERVER_PROTOCOL}://${GLOBAL_INJECTED_CCSDK_CDS_BLUEPRINT_PROCESSOR_IP_ADDR}:${GLOBAL_CCSDK_CDS_HEALTH_SERVER_PORT}
+ ${data}= Create Dictionary loadModelType=true loadResourceDictionary=true loadCBA=true
+ ${headers}= Create Dictionary Content-Type=application/json Authorization=Basic ${GLOBAL_CDS_AUTH}
+ ${resp}= Post Request cds ${CDS_BOOTSTRAP_PATH} data=${data} headers=${headers}
+ ${status_string}= Convert To String ${resp.status_code}
+ Should Match Regexp ${status_string} ^(200|201|202)$
${time_now}= Get Time
@{date_time}= Split String ${time_now}
${time_stamp}= Catenate SEPARATOR=_ @{date_time}[0] @{date_time}[1]