Initial Generic GRA API support 60/97560/6
authorBrian Freeman <bf1936@att.com>
Thu, 24 Oct 2019 14:55:40 +0000 (09:55 -0500)
committerMarco Platania <platania@research.att.com>
Mon, 4 Nov 2019 19:04:33 +0000 (19:04 +0000)
Fixes from testing with GRA on SO
Added tags for instantiateVLBGRA, instantiateVFWDTGRA, instantiateGRA

Issue-ID: INT-1345
Change-Id: I1e8839530c3335d2682cd4d592785c61cb6bbe45
Signed-off-by: Brian Freeman <bf1936@att.com>
robot/assets/templates/sdnc/preload.GRA.jinja [new file with mode: 0644]
robot/resources/demo_preload.robot
robot/resources/sdnc_interface.robot
robot/resources/test_templates/pnf_orchestration_test_template.robot
robot/resources/test_templates/vnf_orchestration_test_template.robot
robot/resources/vid/create_service_instance.robot
robot/resources/vid/create_vid_vnf.robot
robot/resources/vid/vid_interface.robot
robot/testsuites/demo.robot
robot/testsuites/vnf-orchestration-gra.robot [new file with mode: 0644]

diff --git a/robot/assets/templates/sdnc/preload.GRA.jinja b/robot/assets/templates/sdnc/preload.GRA.jinja
new file mode 100644 (file)
index 0000000..2fc5d03
--- /dev/null
@@ -0,0 +1,42 @@
+{
+   "input":{
+      "preload-vf-module-topology-information":{
+         "vf-module-topology":{
+            "vf-module-topology-identifier":{
+               "vf-module-name":"{{vf_module_name}}"
+            },
+            "vf-module-parameters": {
+                "param":
+                                {{vnf_parameters}}
+                }
+         },
+         "vnf-topology-identifier-structure":{
+            "vnf-name":"{{vf_module_name}}",
+            "vnf-type":"{{vf_module_type}}"
+         },
+         "vnf-resource-assignments":{
+                "availability-zones":{
+               "availability-zone":[
+               "nova"
+               ],
+               "max-count":1
+            },
+            "vnf-networks":{
+               "vnf-network":[]
+            }
+         }
+      },
+      "request-information":{
+         "request-id":"robot12",
+         "order-version":"1",
+         "notification-url":"onap.org",
+         "order-number":"1",
+         "request-action":"PreloadVfModuleRequest"
+      },
+      "sdnc-request-header":{
+         "svc-request-id":"robot12",
+         "svc-notification-url":"http:\/\/onap.org:8080\/adapters\/rest\/SDNCNotify",
+         "svc-action":"reserve"
+      }
+   }
+}
index be971f7..bbd7e42 100644 (file)
@@ -130,6 +130,31 @@ Preload User Model
     Preload Vnf    ${service_instance_id}   ${vnf_name}   ${vnf_type}   ${vf_module_name}    ${vf_modules}    ${vnf}    demo    ${service}
     [Teardown]    Close All Browsers
 
+Preload User Model GRA
+    [Documentation]   Preload the demo data for the passed VNF with the passed module name via GRA
+    [Arguments]   ${vnf_name}   ${vf_module_name}   ${service}    ${service_instance_id}    ${vnf}=${service}
+    # Go to A&AI and get information about the VNF we need to preload
+    ${status}  ${generic_vnf}=   Run Keyword And Ignore Error   Get Service Instance    ${vnf_name}
+    Run Keyword If   '${status}' == 'FAIL'   FAIL   VNF Name: ${vnf_name} is not found.
+    ${vnf_type}=   Set Variable   ${generic_vnf['vnf-type']}
+    ${relationships}=   Set Variable   ${generic_vnf['relationship-list']['relationship']}
+    ${relationship_data}=    Get Relationship Data   ${relationships}
+    ${customer_id}=   Catenate
+    :FOR    ${r}   IN   @{relationship_data}
+    \   ${service}=   Set Variable If    '${r['relationship-key']}' == 'service-subscription.service-type'   ${r['relationship-value']}    ${service}
+    \   ${service_instance_id}=   Set Variable If    '${r['relationship-key']}' == 'service-instance.service-instance-id'   ${r['relationship-value']}   ${service_instance_id}
+    \   ${customer_id}=    Set Variable If   '${r['relationship-key']}' == 'customer.global-customer-id'   ${r['relationship-value']}   ${customer_id}
+    ${invariantUUID}=   Get Persona Model Id     ${service_instance_id}    ${service}    ${customer_id}
+
+    # We still need the vf module names. We can get them from VID using the persona_model_id (invariantUUID) from A&AI
+    Setup Browser
+    Login To VID GUI
+    ${vf_modules}=   Get Module Names from VID    ${invariantUUID}
+    Log    ${generic_vnf}
+    Log   ${service_instance_id},${vnf_name},${vnf_type},${vf_module_name},${vf_modules},${service}
+    Preload Gra    ${service_instance_id}   ${vnf_name}   ${vnf_type}   ${vf_module_name}    ${vf_modules}  ${vnf}   demo   ${service}   
+    [Teardown]    Close All Browsers
+
 
 Get Relationship Data
     [Arguments]   ${relationships}
index 902bdaa..ebcdc3a 100644 (file)
@@ -17,8 +17,9 @@ Resource        browser_setup.robot
 *** Variables ***
 ${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH}  /operations/VNF-API:preload-vnf-topology-operation
 ${PRELOAD_NETWORK_TOPOLOGY_OPERATION_PATH}  /operations/VNF-API:preload-network-topology-operation
-${PRELOAD_GR_TOPOLOGY_OPERATION_PATH}     /operations/GENERIC-RESOURCE-API:preload-vf-module-topology-operation
 ${PRELOAD_VNF_CONFIG_PATH}  /config/VNF-API:preload-vnfs/vnf-preload-list
+${PRELOAD_GRA_TOPOLOGY_OPERATION_PATH}     /operations/GENERIC-RESOURCE-API:preload-vf-module-topology-operation
+${PRELOAD_GRA_CONFIG_PATH}  /config/GENERIC-RESOURCE-API:preload-information
 ${PRELOAD_TOPOLOGY_OPERATION_BODY}  sdnc
 ${SDNC_INDEX_PATH}    /restconf
 ${SDNCGC_HEALTHCHECK_OPERATION_PATH}  /operations/SLI-API:healthcheck
@@ -67,7 +68,7 @@ Preload Vcpe vGW Gra
     ${parameters}=     Create Dictionary    pub_key=${GLOBAL_INJECTED_PUBLIC_KEY}    brg_mac=${brg_mac}    cpe_public_net=${cpe_public_network_name}     cpe_public_subnet=${cpe_public_subnet_name}    mux_gw_net=${mux_gw_net}       mux_gw_subnet=${mux_gw_subnet}    suffix=${name_suffix}    oam_onap_net=oam_network_2No2        oam_onap_subnet=oam_network_2No2        public_net_id=${GLOBAL_INJECTED_PUBLIC_NET_ID}
     Templating.Create Environment    sdnc    ${GLOBAL_TEMPLATE_FOLDER}
     ${data}=   Templating.Apply Template    sdnc   ${PRELOAD_TOPOLOGY_OPERATION_BODY}/template.vcpe_gwgra_vfmodule.jinja   ${parameters}
-    ${post_resp}=      SDNC.Run Post Request   ${SDNC_REST_ENDPOINT}   ${SDNC_INDEX_PATH}${PRELOAD_GR_TOPOLOGY_OPERATION_PATH}     data=${data}    auth=${GLOBAL_SDNC_AUTHENTICATION}
+    ${post_resp}=      SDNC.Run Post Request   ${SDNC_REST_ENDPOINT}   ${SDNC_INDEX_PATH}${PRELOAD_GRA_TOPOLOGY_OPERATION_PATH}     data=${data}    auth=${GLOBAL_SDNC_AUTHENTICATION}
 
 Preload Generic VfModule
     [Arguments]    ${service_instance_id}      ${vnf_model}   ${model_customization_name}    ${short_model_customization_name}     ${cpe_public_network_name}=None   ${cpe_public_subnet_name}=None   ${cpe_signal_network_name}=None   ${cpe_signal_subnet_name}=None
@@ -108,6 +109,31 @@ Preload Vnf
     \       Preload One Vnf Topology    ${service_type_uuid}    ${generic_vnf_name}    ${generic_vnf_type}     ${vf_name}    ${vf_module_type}    ${service}    ${filename}   ${uuid}     ${server_id}
     [Return]    ${base_vf_module_type}   ${closedloop_vf_module}
 
+Preload Gra
+    [Arguments]    ${service_type_uuid}    ${generic_vnf_name}    ${generic_vnf_type}     ${vf_module_name}    ${vf_modules}    ${vnf}   ${uuid}    ${service}     ${server_id}
+    ${base_vf_module_type}=    Catenate
+    ${closedloop_vf_module}=    Create Dictionary
+    ServiceMapping.Set Directory    default    ${GLOBAL_SERVICE_MAPPING_DIRECTORY}
+    ${templates}=    ServiceMapping.Get Service Template Mapping    default    ${service}    ${vnf}
+    :FOR    ${vf_module}    IN      @{vf_modules}
+    \       ${vf_module_type}=    Get From Dictionary    ${vf_module}    name
+    #     need to pass in vnf_index if non-zero
+    \       ${dict}   Run Keyword If    "${generic_vnf_name}".endswith('0')      Get From Mapping With Index    ${templates}    ${vf_module}   0
+            ...    ELSE IF  "${generic_vnf_name}".endswith('1')      Get From Mapping With Index    ${templates}    ${vf_module}   1
+            ...    ELSE IF  "${generic_vnf_name}".endswith('2')      Get From Mapping With Index    ${templates}    ${vf_module}   2
+            ...    ELSE   Get From Mapping    ${templates}    ${vf_module}
+    #     skip this iteration if no template
+    \       ${test_dict_length} =  Get Length  ${dict}
+    \       Continue For Loop If   ${test_dict_length} == 0
+    \       ${filename}=    Get From Dictionary    ${dict}    template
+    \       ${base_vf_module_type}=   Set Variable If    '${dict['isBase']}' == 'true'     ${vf_module_type}    ${base_vf_module_type}
+    \       ${closedloop_vf_module}=   Set Variable If    '${dict['isBase']}' == 'false'     ${vf_module}    ${closedloop_vf_module}
+    \       ${vf_name}=     Update Module Name    ${dict}    ${vf_module_name}
+    \       Preload One Gra Topology    ${service_type_uuid}    ${generic_vnf_name}    ${generic_vnf_type}     ${vf_name}    ${vf_module_type}    ${service}    ${filename}   ${uuid}     ${server_id}
+    [Return]    ${base_vf_module_type}   ${closedloop_vf_module}
+
+
+
 Update Module Name
     [Arguments]    ${dict}    ${vf_module_name}
     Return From Keyword If    'prefix' not in ${dict}    ${vf_module_name}
@@ -144,8 +170,23 @@ Preload One Vnf Topology
     Should Be Equal As Strings         ${post_resp.json()['output']['response-code']}  200
     ${get_resp}=       SDNC.Run Get Request    ${SDNC_REST_ENDPOINT}    ${SDNC_INDEX_PATH}${PRELOAD_VNF_CONFIG_PATH}/${vf_module_name}/${vf_module_type}     auth=${GLOBAL_SDNC_AUTHENTICATION}
 
+
+Preload One Gra Topology
+    [Arguments]    ${service_type_uuid}    ${generic_vnf_name}    ${generic_vnf_type}       ${vf_module_name}    ${vf_module_type}    ${service}    ${filename}   ${uuid}     ${server_id}
+    Return From Keyword If    '${filename}' == ''
+    ${parameters}=    Get Template Parameters    ${generic_vnf_name}    ${filename}   ${uuid}    ${service}    ${server_id}    gr_api
+    Set To Dictionary   ${parameters}   generic_vnf_name=${generic_vnf_name}     generic_vnf_type=${generic_vnf_type}  service_type=${service_type_uuid}    vf_module_name=${vf_module_name}    vf_module_type=${vf_module_type}
+    Templating.Create Environment    sdnc    ${GLOBAL_TEMPLATE_FOLDER}
+    ${data}=   Templating.Apply Template    sdnc   ${PRELOAD_TOPOLOGY_OPERATION_BODY}/preload.GRA.jinja    ${parameters}
+    ${post_resp}=       SDNC.Run Post Request   ${SDNC_REST_ENDPOINT}   ${SDNC_INDEX_PATH}${PRELOAD_GRA_TOPOLOGY_OPERATION_PATH}     data=${data}    auth=${GLOBAL_SDNC_AUTHENTICATION}
+    Should Be Equal As Strings  ${post_resp.json()['output']['response-code']}  200
+    ${get_resp}=        SDNC.Run Get Request    ${SDNC_REST_ENDPOINT}    ${SDNC_INDEX_PATH}${PRELOAD_GRA_CONFIG_PATH}/preload-list/${vf_module_name}/vf-module     auth=${GLOBAL_SDNC_AUTHENTICATION}
+    Should Be Equal As Strings  ${get_resp.status_code}         200
+
+
+
 Get Template Parameters
-    [Arguments]   ${generic_vnf_name}    ${template}    ${uuid}    ${service}     ${server_id}
+    [Arguments]   ${generic_vnf_name}    ${template}    ${uuid}    ${service}     ${server_id}   ${api_type}=vnf_api
     ${hostid}=    Get Substring    ${uuid}    -4
     ${ecompnet}=    Evaluate    (${GLOBAL_BUILD_NUMBER}%128)+128
 
@@ -169,7 +210,8 @@ Get Template Parameters
     #
     # Get the vnf_parameters to preload
     #
-    ${vnf_parameters}=   Resolve VNF Parameters Into Array   ${valuemap}   ${template}
+    ${vnf_parameters}=   Run Keyword If   '${api_type}'=='gr_api'   Resolve GRA Parameters Into Array   ${valuemap}   ${template}
+    ...   ELSE  Resolve VNF Parameters Into Array   ${valuemap}   ${template}
     ${vnf_parameters_json}=   Evaluate    json.dumps(${vnf_parameters})    json
     ${parameters}=   Create Dictionary   vnf_parameters=${vnf_parameters_json}
     [Return]    ${parameters}
@@ -185,6 +227,18 @@ Resolve VNF Parameters Into Array
     \    Append To List    ${vnf_parameters}   ${parameter}
     [Return]   ${vnf_parameters}
 
+Resolve GRA Parameters Into Array
+    [Arguments]   ${valuemap}    ${from}
+    ${vnf_parameters}=   Create List
+    ${keys}=    Get Dictionary Keys    ${from}
+    :FOR   ${key}   IN  @{keys}
+    \    ${value}=    Get From Dictionary    ${from}   ${key}
+    \    ${value}=    Templating.Template String    ${value}    ${valuemap}
+    \    ${parameter}=   Create Dictionary   name=${key}    value=${value}
+    \    Append To List    ${vnf_parameters}   ${parameter}
+    [Return]   ${vnf_parameters}
+
+
 Preload Vnf Profile
     [Arguments]    ${vnf_name}
     Login To SDNC Admin GUI
@@ -240,12 +294,10 @@ Create Preload From JSON
     [Arguments]    ${preload_file}     ${api_type}    ${vf_module_name}     ${vf_module_type}    ${vnf_name}    ${generic_vnf_type}
     Log To Console    Uploading ${preload_file} to SDNC
 
-    ${preload_vnf}=    Run keyword if  "${api_type}"=="gr_api"
-    ...  Preload GR API    ${vf_module_name}     ${vf_module_type}    ${vnf_name}    ${generic_vnf_type}    ${preload_file}
-    ...  ELSE
-    ...  Preload VNF API    ${vf_module_name}     ${vf_module_type}    ${vnf_name}    ${generic_vnf_type}    ${preload_file}
+    ${preload_vnf}=    Run keyword if  "${api_type}"=="gr_api" Preload GR API    ${vf_module_name}     ${vf_module_type}    ${vnf_name}    ${generic_vnf_type}    ${preload_file}
+    ...  ELSE  Preload VNF API    ${vf_module_name}     ${vf_module_type}    ${vnf_name}    ${generic_vnf_type}    ${preload_file}
 
-    ${uri}=    Set Variable If     "${api_type}"=="gr_api"    ${SDNC_INDEX_PATH}${PRELOAD_GR_TOPOLOGY_OPERATION_PATH}    ${SDNC_INDEX_PATH}${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH}
+    ${uri}=    Set Variable If     "${api_type}"=="gr_api"    ${SDNC_INDEX_PATH}${PRELOAD_GRA_TOPOLOGY_OPERATION_PATH}    ${SDNC_INDEX_PATH}${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH}
 
     ${post_resp}=    SDNC.Run Post Request   ${SDNC_REST_ENDPOINT}   ${uri}     data=${preload_vnf}    auth=${GLOBAL_SDNC_AUTHENTICATION}
     Should Be Equal As Strings    ${post_resp.json()['output']['response-code']}    200
index 9d252bc..e0566e5 100644 (file)
@@ -30,5 +30,5 @@ Orchestrate PNF
     Setup Browser
     Login To VID GUI
     ${service_instance_id}  ${request_id}=   Wait Until Keyword Succeeds    300s   5s    Create VID PNF Service Instance    ${full_customer_name}    ${service_model_type}    ${service}     ${service_name}   ${project_name}   ${owning_entity}  ${product_family}  ${lcp_region}  ${tenant_name}  ${pnf_correlation_id}
-    Validate Service Instance    ${service_instance_id}    ${service}    ${full_customer_name}
+    Wait Until Keyword Succeeds   60s   20s       Validate Service Instance    ${service_instance_id}    ${service}    ${full_customer_name}
     [Return]     ${service}  ${request_id}  ${full_customer_name}
index e72211c..b2364fb 100644 (file)
@@ -49,8 +49,10 @@ Orchestrate VNF
     ${server_id}=     Run Keyword If   '${service}' == 'vVG'    Create VVG Server    ${uuid}
     Create Customer For VNF    ${customer_name}    ${customer_name}    INFRA    ${service_type}    ${GLOBAL_AAI_CLOUD_OWNER}    ${tenant_id}
     Setup Browser
-    Login To VID GUI
-    ${service_instance_id}=   Wait Until Keyword Succeeds    300s   5s    Create VID Service Instance    ${customer_name}    ${service_model_type}    ${service}     ${service_name}   ${project_name}   ${owning_entity}
+    Run Keyword If   "${API_TYPE}"=="GRA_API"    Login To VID GUI    gr_api
+    ...   ELSE   Login To VID GUI
+    #${service_instance_id}=   Wait Until Keyword Succeeds    300s   5s    Create VID Service Instance    ${customer_name}    ${service_model_type}    ${service}     ${service_name}   ${project_name}   ${owning_entity}
+    ${service_instance_id}=   Create VID Service Instance    ${customer_name}    ${service_model_type}    ${service}     ${service_name}   ${project_name}   ${owning_entity}
     Wait Until Keyword Succeeds   60s   20s      Validate Service Instance    ${service_instance_id}    ${service}      ${customer_name}
     ServiceMapping.Set Directory    default    ${GLOBAL_SERVICE_MAPPING_DIRECTORY}
     ${vnflist}=    ServiceMapping.Get Service Vnf Mapping    default    ${service}
@@ -66,7 +68,10 @@ Orchestrate VNF
     \   ${vnf_type}=   Get VNF Type   ${catalog_resources}   ${vnf}    ${service}
     \   ${vf_module}=    Get VF Module    ${catalog_resources}   ${vnf}    ${service}
     \   Create VID VNF    ${service_instance_id}    ${vnf_name}    ${product_family}    ${lcp_region}    ${tenant_name}    ${vnf_type}   ${customer_name}
-    \   ${vf_module_type}   ${closedloop_vf_module}=   Preload Vnf    ${service_instance_id}   ${vnf_name}   ${vnf_type}   ${vf_module_name}    ${vf_module}    ${vnf}    ${uuid}    ${service}     ${server_id}
+
+    \   ${vf_module_type}   ${closedloop_vf_module}=   Run Keyword If   "${API_TYPE}"=="GRA_API"     Preload Gra    ${service_instance_id}   ${vnf_name}   ${vnf_type}   ${vf_module_name}    ${vf_module}    ${vnf}    ${uuid}  ${service}    ${server_id}
+    \                                                  ...   ELSE   Preload Vnf    ${service_instance_id}   ${vnf_name}   ${vnf_type}   ${vf_module_name}    ${vf_module}    ${vnf}    ${uuid}  ${service}   ${server_id}
+
     \   ${vf_module_id}=   Create VID VNF module    ${service_instance_id}    ${vf_module_name}    ${lcp_region}    ${tenant_name}     ${vf_module_type}   ${customer_name}   ${vnf_name}
     \   ${generic_vnf}=   Validate Generic VNF    ${vnf_name}    ${vnf_type}    ${service_instance_id}
     \   Set To Dictionary    ${generic_vnfs}    ${vf_module_type}    ${generic_vnf}
@@ -109,7 +114,10 @@ Orchestrate Demo VNF
     \   Create VID VNF    ${service_instance_id}    ${vnf_name}    ${product_family}    ${lcp_region}    ${tenant_name}    ${vnf_type}   ${full_customer_name}
     \   ${vf_module_entry}=   Create Dictionary    name=${vf_module}
     \   ${vf_modules}=   Create List    ${vf_module_entry}
-    \   ${vf_module_type}   ${closedloop_vf_module}=   Preload Vnf    ${service_instance_id}   ${vnf_name}   ${vnf_type}   ${vf_module_name}    ${vf_modules}    ${vnf}    ${uuid}    ${service}   ${server_id}
+    \   ${vf_module_type}   ${closedloop_vf_module}=   Run Keyword If   "${API_TYPE}"=="GRA_API"     Preload Gra    ${service_instance_id}   ${vnf_name}   ${vnf_type}   ${vf_module_name}    ${vf_module}    ${vnf}    ${uuid}  ${service}    ${server_id}
+    \                                                  ...   ELSE   Preload Vnf    ${service_instance_id}   ${vnf_name}   ${vnf_type}   ${vf_module_name}    ${vf_module}    ${vnf}    ${uuid}  ${service}   ${server_id}
+
+
     \   ${vf_module_id}=   Create VID VNF module    ${service_instance_id}    ${vf_module_name}    ${lcp_region}    ${tenant_name}     ${vf_module_type}   ${full_customer_name}   ${vnf_name}
     \   ${generic_vnf}=   Validate Generic VNF    ${vnf_name}    ${vnf_type}    ${service_instance_id}
     \   Set To Dictionary    ${generic_vnfs}    ${vf_module_type}    ${generic_vnf}
index 6bb19f4..1a99175 100644 (file)
@@ -31,7 +31,8 @@ Create VID Service Instance
     Capture Page Screenshot
     Click On Button When Enabled    //div[@class = 'buttonRow']/button[text() = 'Confirm']
        Wait Until Element Contains    xpath=//pre[@class= 'log ng-binding']    requestState    timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
-        Wait Until Page Contains    "requestState": "COMPLETE"   timeout= ${GLOBAL_VID_UI_TIMEOUT_LONG}
+        #Wait Until Page Contains    "requestState": "COMPLETE"   timeout= ${GLOBAL_VID_UI_TIMEOUT_LONG}
+        Wait Until Page Contains    "requestState": "COMPLETE"   timeout= 450s
     ${response text}=    Get Text    xpath=//pre[@class = 'log ng-binding']
     Click On Button When Enabled    //div[@class = 'buttonRow']/button[text() = 'Close']
     ${request_id}=    Parse Request Id    ${response text}
index 2180387..42bde32 100644 (file)
@@ -31,7 +31,9 @@ Create VID VNF
     #01681d02-2304-4c91-ab2d 0
     # This is where firefox breaks. Th elink never becomes visible when run with the script.
     ${dataTestsId}=    Catenate   AddVNFOption-${vnf_type}
-    Sleep   10s
+    Sleep   15s
+    Wait Until Element Is Enabled   xpath=//a[contains(text(), '${vnf_type}')]
+    Wait Until Element Is Visible   xpath=//a[contains(text(), '${vnf_type}')]
     Click Element    xpath=//a[contains(text(), '${vnf_type}')]
     Wait Until Page Contains Element    xpath=//input[@parameter-id='instanceName']    ${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
     Wait Until Element Is Enabled    xpath=//input[@parameter-id='instanceName']    ${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
@@ -119,7 +121,8 @@ Create VID VNF module
 
     ### end volume stuff ###
 
-    Click Element     xpath=//div[contains(.,'${vnf_name}')]/div/button[contains(.,'Add VF-Module')]
+    #Click Element     xpath=//div[contains(.,'${vnf_name}')]/div/button[contains(.,'Add VF-Module')]
+    Click On Element When Visible      //div[contains(.,'${vnf_name}')]/div/button[contains(.,'Add VF-Module')]
     ${instance_id}=     Fill Module Form And Submit    ${vf_module_name}    ${lcp_region}    ${TENANT}    ${VNF_TYPE}    cloud_owner_uc=${cloud_owner_uc}    volume_group=${vf_module_volume_name}
     [Return]     ${instance_id}
 
index 0b804c4..a9294c3 100644 (file)
@@ -68,6 +68,7 @@ Go To VID Browse Service Models
 Click On Button When Enabled
     [Arguments]     ${xpath}    ${timeout}=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
     Wait Until Page Contains Element    xpath=${xpath}    ${timeout}
+    Wait Until Element Is Visible    xpath=${xpath}    ${timeout}
     Wait Until Element Is Enabled    xpath=${xpath}    ${timeout}
     Click Button      xpath=${xpath}
 
index c2a0b3e..4278be1 100644 (file)
@@ -65,6 +65,22 @@ Instantiate VFWCL
     [Tags]   instantiateVFWCL
     Instantiate VNF   vFWCL  base_vpkg
 
+Instantiate VFWCL GRA
+    [Tags]   instantiateVFWCLGRA
+    Set Global Variable    ${API_TYPE}   GRA_API
+    Instantiate VNF   vFWCL  base_vpkg
+
+Instantiate VLB GRA
+    [Tags]   instantiateVLBGRA
+    Set Global Variable    ${API_TYPE}   GRA_API
+    Instantiate VNF   vLB  base_vpkg
+
+Instantiate VFWDT GRA
+    [Tags]   instantiateVFWDTGRA
+    Set Global Variable    ${API_TYPE}   GRA_API
+    Instantiate VNF   vFWDT  base_vpkg
+
+
 Instantiate VFWDT
     [Tags]   instantiateVFWDT
     Instantiate VNF   vFWDT  base_vpkg
diff --git a/robot/testsuites/vnf-orchestration-gra.robot b/robot/testsuites/vnf-orchestration-gra.robot
new file mode 100644 (file)
index 0000000..98e02f3
--- /dev/null
@@ -0,0 +1,20 @@
+*** Settings ***
+Documentation    Executes the VNF Orchestration Test cases using GRA API including setup and teardown
+...
+
+Resource         ../resources/test_templates/vnf_orchestration_test_template.robot
+
+Test Template         Orchestrate VNF Template
+
+*** Variables ***
+${API_TYPE}   GRA_API
+
+*** Test Cases ***              CUSTOMER           SERVICE   PRODUCT_FAMILY
+
+Instantiate Virtual DNS GRA             ETE_Customer    vLB      vLB
+    [Tags]    instantiateGRA
+Instantiate Virtual Volume Group GRA    ETE_Customer    vVG      vVG
+    [Tags]    instantiateGRA
+Instantiate Virtual FirewallCL GRA      ETE_Customer    vFWCL      vFWCL
+    [Tags]    instantiateGRA
+