summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-07-01 13:47:56 -0400
committerDR695H <dr695h@att.com>2019-07-01 13:47:56 -0400
commit37529943e361704b159d4802c04307239c87b204 (patch)
treed29418c1941a968b2372ef03c7a63245d6088884
parent97cb0371f819f9dafbbf41301e2f844beea0351f (diff)
use latest robotframework-onap keywords
Issue-ID: TEST-171 Change-Id: Ie1db142d2e44cfe10f84403754917b6ef5989caf Signed-off-by: DR695H <dr695h@att.com>
-rw-r--r--red.xml1
-rw-r--r--robot/assets/templates/vcpeutils/template_sniro_data.sniro (renamed from robot/assets/templates/vcpeutils/template_sniro_data.json)10
-rw-r--r--robot/assets/templates/vcpeutils/template_sniro_request.jinja (renamed from robot/assets/templates/vcpeutils/template_sniro_request.json)2
-rw-r--r--robot/resources/asdc_interface.robot6
-rw-r--r--robot/resources/oof_interface.robot16
5 files changed, 12 insertions, 23 deletions
diff --git a/red.xml b/red.xml
index 24e26a62..8124e7a8 100644
--- a/red.xml
+++ b/red.xml
@@ -17,6 +17,7 @@
<referencedLibrary type="PYTHON" name="ONAPLibrary.Kafka" path="testsuite/robot/library"/>
<referencedLibrary type="PYTHON" name="ONAPLibrary.Protobuf" path="testsuite/robot/library"/>
<referencedLibrary type="PYTHON" name="ONAPLibrary.Utilities" path="testsuite/robot/library"/>
+ <referencedLibrary type="PYTHON" name="ONAPLibrary.OOF" path="testsuite/robot/library"/>
<pythonpath>
<path location="robot/library"/>
</pythonpath>
diff --git a/robot/assets/templates/vcpeutils/template_sniro_data.json b/robot/assets/templates/vcpeutils/template_sniro_data.sniro
index c2c6421e..78db76db 100644
--- a/robot/assets/templates/vcpeutils/template_sniro_data.json
+++ b/robot/assets/templates/vcpeutils/template_sniro_data.sniro
@@ -4,8 +4,8 @@
{
"cloudRegionId" : "RegionOne",
"inventoryType" : "service",
- "resourceModuleName" : "${tunnelxconn_ar_name}",
- "serviceInstanceId" : "${vgmux_svc_instance_uuid}",
+ "resourceModuleName" : "{{tunnelxconn_ar_name}}",
+ "serviceInstanceId" : "{{vgmux_svc_instance_uuid}}",
"serviceResourceId" : "TUNNEL-RESOURCE-ID-REPLACE",
"isRehome" : "False",
"assignmentInfo": [ { "variableName": "cloudOwner", "variableValue": "CloudOwner"}, {"variableName": "vnfHostName", "variableValue": "vnfHostName" }]
@@ -13,7 +13,7 @@
{
"cloudRegionId" : "RegionOne",
"inventoryType" : "cloud",
- "resourceModuleName" : "${vgw_name}",
+ "resourceModuleName" : "{{vgw_name}}",
"serviceInstanceId" : "vG-service-instance-id",
"serviceResourceId" : "VGW-RESOURCE-ID-REPLACE",
"isRehome" : "False",
@@ -22,8 +22,8 @@
{
"cloudRegionId" : "RegionOne",
"inventoryType" : "service",
- "resourceModuleName" : "${brg_ar_name}",
- "serviceInstanceId" : "${vbrg_svc_instance_uuid}",
+ "resourceModuleName" : "{{brg_ar_name}}",
+ "serviceInstanceId" : "{{vbrg_svc_instance_uuid}}",
"serviceResourceId" : "BRG-RESOURCE-ID-REPLACE",
"isRehome" : "False",
"assignmentInfo": [ { "variableName": "cloudOwner", "variableValue": "CloudOwner"}, {"variableName": "vnfHostName", "variableValue": "vnfHostName" }]
diff --git a/robot/assets/templates/vcpeutils/template_sniro_request.json b/robot/assets/templates/vcpeutils/template_sniro_request.jinja
index 6fdbb707..85eab530 100644
--- a/robot/assets/templates/vcpeutils/template_sniro_request.json
+++ b/robot/assets/templates/vcpeutils/template_sniro_request.jinja
@@ -13,7 +13,7 @@
"Content-Type" : "application/json"
},
"method" : "POST",
- "base64Body" : "${base64_sniro_data}",
+ "base64Body" : "{{base64_sniro_data}}",
"url" : " http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/SNIROResponse"
}
}
diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot
index bef19b8c..070a12a2 100644
--- a/robot/resources/asdc_interface.robot
+++ b/robot/resources/asdc_interface.robot
@@ -255,7 +255,7 @@ Download CSAR
${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/artifacts/${csar_resource_id}
${csar_file_name}= Set Variable ${resp.json()['artifactName']}
${base64Obj}= Set Variable ${resp.json()['base64Contents']}
- ${binObj}= Evaluate base64.b64decode("${base64Obj}") modules=base64
+ ${binObj}= Base64 Decode ${base64Obj}
Create Binary File ${save_directory}/${csar_file_name} ${binObj}
Log To Console ${\n}Downloaded:${csar_file_name}
@@ -320,7 +320,7 @@ Setup SDC Catalog Resource Deployment Artifact Properties
[Arguments] ${catalog_service_id} ${catalog_parent_service_id} ${catalog_resource_unique_id} ${blueprint_file}
${resp}= Get ASDC Catalog Resource Component Instances Properties ${catalog_service_id}
${blueprint_data} OperatingSystem.Get File ${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH}${blueprint_file}
- ${payloadData}= Evaluate base64.b64encode('''${blueprint_data}'''.encode('utf-8')) modules=base64
+ ${payloadData}= Base64 Encode ${blueprint_data}
${dict}= Create Dictionary artifactLabel=blueprint artifactName=${blueprint_file} artifactType=DCAE_INVENTORY_BLUEPRINT artifactGroupType=DEPLOYMENT description=${blueprint_file} payloadData=${payloadData}
Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
${data}= Apply Template sdc ${ASDC_ARTIFACT_UPLOAD_TEMPLATE} ${dict}
@@ -997,7 +997,7 @@ Run ASDC MD5 Post Request
${uuid}= Generate UUID4
${data_string}= Evaluate json.dumps(${data}) json
${md5checksum}= Evaluate md5.new('''${data_string}''').hexdigest() modules=md5
- ${base64md5checksum}= Evaluate base64.b64encode("${md5checksum}") modules=base64
+ ${base64md5checksum}= Base64 Encode ${md5checksum}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Content-MD5=${base64md5checksum}
${resp}= Post Request asdc ${data_path} data=${data} headers=${headers}
Log Received response from asdc ${resp.text}
diff --git a/robot/resources/oof_interface.robot b/robot/resources/oof_interface.robot
index eaf91b28..1e740a5a 100644
--- a/robot/resources/oof_interface.robot
+++ b/robot/resources/oof_interface.robot
@@ -7,6 +7,7 @@ Library String
Library DateTime
Library Collections
Library ONAPLibrary.JSON
+Library ONAPLibrary.OOF
Library ONAPLibrary.Templating
Resource global_properties.robot
@@ -60,18 +61,7 @@ RUN OOF-Homing SendPlanWithWrongVersion
Run OOF-SNIRO Health Check
[Documentation] Runs OOF-SNIRO Health check
- ${resp}= Run OOF-SNIRO Get Request ${OOF_SNIRO_HEALTH_CHECK_PATH}
- Should Be Equal As Integers ${resp.status_code} 200
-
-Run OOF-SNIRO Get Request
- [Documentation] Runs OOF-SNIRO Get request
- [Arguments] ${data_path}
- ${session}= Create Session session ${OOF_SNIRO_ENDPOINT}
- ${resp}= Get Request session ${data_path}
- Should Be Equal As Integers ${resp.status_code} 200
- Log Received response from OOF-SNIRO ${resp.text}
- [Return] ${resp}
-
+ ${resp}= Run SNIRO Get Request ${OOF_SNIRO_ENDPOINT} ${OOF_SNIRO_HEALTH_CHECK_PATH}
Run OOF-CMSO Health Check
[Documentation] Runs OOF-CMSO Health check
@@ -141,8 +131,6 @@ OOF-CMSO Create Schedule
${resp}= Run OOF-CMSO Post Scheduler cmso/v1/schedules/${uuid} data=${data}
[Return] ${resp}
-
-
OOF-CMSO Wait For Pending Approval
[Documentation] Gets the schedule identified by the uuid and checks if it is in the Pending Approval state
[Arguments] ${uuid} ${status}=Pending Approval