aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/vid
diff options
context:
space:
mode:
authorstark, steven <steven.stark@att.com>2019-08-28 16:11:53 -0700
committerDaniel Rose <dr695h@att.com>2019-09-12 21:58:03 +0000
commitea4af0caf0a786b9b8d05dc3d2749f965050f398 (patch)
tree07e8ecd1557a35e564cd35db2296bb3b3f397bd0 /robot/resources/vid
parent956f45b32feb53a8da60025ca1ea3980ddf49bbe (diff)
[INT] Add testsuite for vnf lifecycle validation
The new testsuite is intended for heat-based VNFs going through the OPNFV VNF lifecycle validation. At the end of the test it will package up the results into a tarball for submission to the OVP portal. The testcase uploads a VNF pacakge and - executes the VVP validation scripts - models and distributes in SDC - instantiates via VID - validates the stack in OpenStack WIP instructions available here: https://wiki.onap.org/pages/viewpage.action?pageId=68546123 Issue-ID: INT-1197 Change-Id: I2ef827c64b64bdc7e2259806d86d6272cf77221c Signed-off-by: stark, steven <steven.stark@att.com>
Diffstat (limited to 'robot/resources/vid')
-rw-r--r--robot/resources/vid/create_vid_vnf.robot61
-rw-r--r--robot/resources/vid/vid_interface.robot4
2 files changed, 51 insertions, 14 deletions
diff --git a/robot/resources/vid/create_vid_vnf.robot b/robot/resources/vid/create_vid_vnf.robot
index ea3cf123..575863bd 100644
--- a/robot/resources/vid/create_vid_vnf.robot
+++ b/robot/resources/vid/create_vid_vnf.robot
@@ -12,11 +12,13 @@ Library ONAPLibrary.SO WITH NAME SO
*** Keywords ***
Create VID VNF
[Documentation] Creates a VNF instance using VID for passed instance id with the passed service instance name
- [Arguments] ${service_instance_id} ${service_instance_name} ${product_family} ${lcp_region} ${tenant} ${vnf_type} ${customer} ${line_of_business}=LOB-Demonstration ${platform}=Platform-Demonstration
+ [Arguments] ${service_instance_id} ${service_instance_name} ${product_family} ${lcp_region} ${tenant} ${vnf_type} ${customer} ${line_of_business}=LOB-Demonstration ${platform}=Platform-Demonstration ${cloud_owner_uc}=${GLOBAL_AAI_CLOUD_OWNER}
Go To VID HOME
Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a
Wait Until Page Contains Please search by timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
+ Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id}
+ Select From List By Label //select[@ng-model='selectedserviceinstancetype'] Service Instance Id
Select From List By Label //select[@ng-model='selectedCustomer'] ${customer}
Click On Button When Enabled //button[contains(text(),'Submit')]
Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
@@ -37,7 +39,6 @@ Create VID VNF
Input Text xpath=//input[@parameter-id='instanceName'] ${service_instance_name}
Select From List By Label xpath=//select[@parameter-id='productFamily'] ${product_family}
# Fix for Dublin
- ${cloud_owner_uc}= Convert To Uppercase ${GLOBAL_AAI_CLOUD_OWNER}
Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region} (${cloud_owner_uc})
Select From List By Label xpath=//select[@parameter-id='tenant'] ${tenant}
Select From List When Enabled //select[@parameter-id='lineOfBusiness'] ${line_of_business}
@@ -52,7 +53,7 @@ Create VID VNF
[Return] ${instance_id}
Delete VID VNF
- [Arguments] ${service_instance_id} ${lcp_region} ${tenant} ${vnf_instance_id}
+ [Arguments] ${service_instance_id} ${lcp_region} ${tenant} ${vnf_instance_id} ${cloud_owner_uc}=${GLOBAL_AAI_CLOUD_OWNER}
Go To VID HOME
Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a
Wait Until Page Contains Please search by timeout=60s
@@ -68,7 +69,6 @@ Delete VID VNF
Wait Until Page Contains Element xpath=//div[@class='statusLine'] timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Click On Element When Visible xpath=//li/div[contains(.,'${vnf_instance_id}')]/a/span[@class='glyphicon glyphicon-remove'] timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
- ${cloud_owner_uc}= Convert To Uppercase ${GLOBAL_AAI_CLOUD_OWNER}
Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region} (${cloud_owner_uc})
Select From List By Label xpath=//select[@parameter-id='tenant'] ${tenant}
Click Element xpath=//div[@class='buttonRow']/button[@ngx-enabled='true']
@@ -80,19 +80,47 @@ Delete VID VNF
${resp}= SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth}
Create VID VNF module
- [Arguments] ${service_instance_id} ${vf_module_name} ${lcp_region} ${TENANT} ${VNF_TYPE} ${customer} ${vnf_name}
+ [Arguments] ${service_instance_id} ${vf_module_name} ${lcp_region} ${TENANT} ${VNF_TYPE} ${customer} ${vnf_name} ${cloud_owner_uc}=${GLOBAL_AAI_CLOUD_OWNER}
Go To VID HOME
Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a
Wait Until Page Contains Please search by timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Wait Until Page Contains Element xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
# If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException)
+ Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id}
+ Select From List By Label //select[@ng-model='selectedserviceinstancetype'] Service Instance Id
Select From List By Label //select[@ng-model='selectedCustomer'] ${customer}
Click On Button When Enabled //button[contains(text(),'Submit')]
Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Click Element link=View/Edit
+
Wait Until Keyword Succeeds 300s 5s Wait For Add VF Module
+
+ ### Optionally checking if Volume Group option is there ###
+
+ ## first checking if the VNF has ANY volume modules
+ ${volume_status} ${value} Run Keyword And Ignore Error Wait Until Element Is Visible //button[contains(text(),'Add Volume Group')] timeout=15s
+ Run Keyword If '${volume_status}' == 'PASS' Click Element xpath=//div[contains(.,'${vnf_name}')]/div/button[contains(.,'Add Volume Group')]
+
+ ## now checking that this specific module has volumes
+ ${volume_module_status} ${value} Run Keyword And Ignore Error Wait Until Element Is Visible link=${VNF_TYPE} timeout=15s
+ ${uuid}= Generate UUID4
+ ${vf_module_volume_name}= Evaluate str("${uuid}")[:8]
+ ${vf_module_volume_name}= Set Variable If '${volume_module_status}' == 'PASS' volume_${vf_module_volume_name} None
+ Run Keyword If '${volume_module_status}' == 'PASS' Log Volumes found for ${vf_module_name} console=yes
+ Run Keyword If '${volume_module_status}' == 'PASS' Fill Module Form And Submit ${vf_module_volume_name} ${lcp_region} ${TENANT} ${VNF_TYPE} cloud_owner_uc=${cloud_owner_uc}
+ ## sleep to give VID a chance to update Volume Group
+ Run Keyword If '${volume_module_status}' == 'PASS' Sleep 30s
+
+ ### end volume stuff ###
+
Click Element xpath=//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}
+
+Fill Module Form And Submit
+ [Documentation] Separating this so volume module can use as well.
+ [Arguments] ${vf_module_name} ${lcp_region} ${tenant} ${vnf_type} ${cloud_owner_uc}=${GLOBAL_AAI_CLOUD_OWNER} ${volume_group}=None
# This is where firefox breaks. Th elink never becomes visible when run with the script.
Click Element link=${vnf_type}
@@ -102,22 +130,29 @@ Create VID VNF module
## Without this sleep, the input text below gets immediately wiped out.
## Wait Until Angular Ready just sleeps for its timeout value
Sleep 10s
- Input Text xpath=//input[@parameter-id='instanceName'] ${vf_module_name}
- ${cloud_owner_uc}= Convert To Uppercase ${GLOBAL_AAI_CLOUD_OWNER}
+ Input Text xpath=//input[@parameter-id='instanceName'] ${vf_module_name}
Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region} (${cloud_owner_uc})
Select From List By Label xpath=//select[@parameter-id='tenant'] ${tenant}
- Wait Until Element Is Visible xpath=//input[@parameter-id='sdncPreload'] ${GLOBAL_VID_UI_TIMEOUT_SHORT}
- Wait Until Element Is Enabled xpath=//input[@parameter-id='sdncPreload'] ${GLOBAL_VID_UI_TIMEOUT_SHORT}
- Select Checkbox xpath=//input[@parameter-id='sdncPreload']
+
+ ### Volume Stuff ###
+ ${status} ${value} Run Keyword And Ignore Error Wait Until Element Is Visible xpath=//select[@parameter-id='availableVolumeGroup'] 15s
+ Run Keyword If '${status}' == 'PASS' Select From List By Label xpath=//select[@parameter-id='availableVolumeGroup'] ${volume_group}
+ ### End Volume Stuff
+
+ ${status} ${value} Run Keyword And Ignore Error Wait Until Element Is Visible xpath=//input[@parameter-id='sdncPreload'] ${GLOBAL_VID_UI_TIMEOUT_SHORT}
+ Run Keyword If '${status}' == 'PASS' Wait Until Element Is Enabled xpath=//input[@parameter-id='sdncPreload'] ${GLOBAL_VID_UI_TIMEOUT_SHORT}
+ Run Keyword If '${status}' == 'PASS' Select Checkbox xpath=//input[@parameter-id='sdncPreload']
+ Capture Page Screenshot
+ Log Submitting vf module instance ${vf_module_name} in VID console=yes
Click On Button When Enabled //button[contains(text(),'Confirm')]
- Wait Until Element Contains xpath=//pre[@class = 'log ng-binding'] requestState timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
+ Wait Until Element Contains xpath=//pre[@class = 'log ng-binding'] requestState timeout=300s
${response text}= Get Text xpath=//pre[@class = 'log ng-binding']
Click On Button When Enabled //button[contains(text(),'Close')]
${instance_id}= Parse Instance Id ${response text}
${request_id}= Parse Request Id ${response text}
- ${auth}= Create List ${GLOBAL_SO_USERNAME} ${GLOBAL_SO_PASSWORD}
- ${resp}= SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth}
+ ${auth}= Create List ${GLOBAL_SO_USERNAME} ${GLOBAL_SO_PASSWORD}
+ ${resp}= SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth}
[Return] ${instance_id}
Wait For Add VF Module
diff --git a/robot/resources/vid/vid_interface.robot b/robot/resources/vid/vid_interface.robot
index bcdc1494..0b804c48 100644
--- a/robot/resources/vid/vid_interface.robot
+++ b/robot/resources/vid/vid_interface.robot
@@ -37,6 +37,7 @@ Run VID Get Request
Login To VID GUI
[Documentation] Logs in to VID GUI
+ [Arguments] ${api_type}=vnf_api
# Setup Browser Now being managed by test case
##Setup Browser
Go To ${VID_LOGIN_URL}
@@ -50,7 +51,8 @@ Login To VID GUI
Input Password xpath=//input[@id='password'] ${GLOBAL_VID_PASSWORD}
Click Button xpath=//input[@id='loginBtn']
Wait Until Page Contains Welcome to VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
- Select From List By Label //select[@id='selectTestApi'] VNF_API (old)
+ Run Keyword If "${api_type}"=="vnf_api" Select From List By Label //select[@id='selectTestApi'] VNF_API (old)
+ Run Keyword If "${api_type}"=="gr_api" Select From List By Label //select[@id='selectTestApi'] GR_API (new)
Log Logged in to ${VID_ENDPOINT}${VID_ENV}
Go To VID HOME