use latest robotframework-onap keywords 41/90741/1
authorDR695H <dr695h@att.com>
Mon, 1 Jul 2019 17:47:56 +0000 (13:47 -0400)
committerDR695H <dr695h@att.com>
Mon, 1 Jul 2019 17:47:56 +0000 (13:47 -0400)
Issue-ID: TEST-171
Change-Id: Ie1db142d2e44cfe10f84403754917b6ef5989caf
Signed-off-by: DR695H <dr695h@att.com>
red.xml
robot/assets/templates/vcpeutils/template_sniro_data.sniro [moved from robot/assets/templates/vcpeutils/template_sniro_data.json with 81% similarity]
robot/assets/templates/vcpeutils/template_sniro_request.jinja [moved from robot/assets/templates/vcpeutils/template_sniro_request.json with 90% similarity]
robot/resources/asdc_interface.robot
robot/resources/oof_interface.robot

diff --git a/red.xml b/red.xml
index 24e26a6..8124e7a 100644 (file)
--- 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>
@@ -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" }] 
@@ -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"
     }
   }
index bef19b8..070a12a 100644 (file)
@@ -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}
index eaf91b2..1e740a5 100644 (file)
@@ -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