vim
-RUN pip install robotframework==3.0.4 \
+RUN pip install robotframework==3.1.1 \
&& python --version
# Copy the robot code
<referencedLibrary type="PYTHON" name="RequestsLibrary" path="testsuite/robot/library"/>
<referencedLibrary type="PYTHON" name="RequestsClientCert" path="testsuite/robot/library/eteutils"/>
<referencedLibrary type="PYTHON" name="UUID" path="testsuite/robot/library/eteutils"/>
- <referencedLibrary type="PYTHON" name="Selenium2Library" path="testsuite/robot/library"/>
- <referencedLibrary type="PYTHON" name="ExtendedSelenium2Library" path="testsuite/robot/library"/>
+ <referencedLibrary type="PYTHON" name="SeleniumLibrary" path="testsuite/robot/library"/>
+ <referencedLibrary type="PYTHON" name="AngularJSLibrary" path="testsuite/robot/library"/>
<referencedLibrary type="PYTHON" name="SSHLibrary" path="testsuite/robot/library"/>
<referencedLibrary type="PYTHON" name="HTTPUtils" path="testsuite/robot/library/eteutils"/>
<referencedLibrary type="PYTHON" name="JSONUtils" path="testsuite/robot/library/eteutils"/>
<referencedLibrary type="PYTHON" name="HEATUtils" path="testsuite/robot/library/eteutils"/>
<referencedLibrary type="PYTHON" name="OSUtils" path="testsuite/robot/library/eteutils"/>
<referencedLibrary type="PYTHON" name="DNSUtils" path="testsuite/robot/library/eteutils"/>
- <referencedLibrary type="PYTHON" name="EteGatherDataListener" path="testsuite/robot/library/eteutils"/>
<referencedLibrary type="PYTHON" name="ArchiveLibrary" path="testsuite/robot/library"/>
<referencedLibrary type="PYTHON" name="HeatBridge" path="testsuite/robot/library/heatbridge"/>
+ <referencedLibrary type="PYTHON" name="KafkaLibrary" path="testsuite/robot/library"/>
+ <referencedLibrary type="PYTHON" name="Rammbock" path="testsuite/robot/library"/>
+ <referencedLibrary type="PYTHON" name="DateTime" path="testsuite/robot/library"/>
<pythonpath>
<path location="robot/library"/>
</pythonpath>
<classpath/>
- <variableFiles path="../properties/integration_preload_parameters.py"/>
- <variableFiles path="../properties/integration_robot_properties.py"/>
- <variableFiles path="../properties/sample_vm_properties.py"/>
+ <variableFiles path="../oom/kubernetes/robot/resources/config/eteshare/config/integration_preload_parameters.py"/>
+ <variableFiles path="../oom/kubernetes/robot/resources/config/eteshare/config/integration_robot_properties.py"/>
+ <variableFiles path="../oom/kubernetes/robot/resources/config/eteshare/config/vm_properties.py"/>
<variableFiles path="testsuite/robot/assets/service_mappings.py"/>
<excludedForValidation/>
<isValidatedFileSizeCheckingEnabled>true</isValidatedFileSizeCheckingEnabled>
[Documentation] Removes a complex
[Arguments] ${physical_location_id}
${get_resp}= Run A&AI Get Request ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id}
- Run Keyword If '${get_resp.status_code}' == '200' Delete Zone Exists ${physical_location_id} ${get_resp.json()}
+ Run Keyword If '${get_resp.status_code}' == '200' Delete Complex ${physical_location_id} ${get_resp.json()}
Delete Complex
[Arguments] ${physical_location_id} ${json}
Update Service Dictionary
[Arguments] ${dict} ${json}
${list}= Evaluate ${json}['service']
- :for ${map} in @{list}
+ :FOR ${map} IN @{list}
\ ${status} ${service_type}= Run Keyword And Ignore Error Get From Dictionary ${map} service-description
\ Run Keyword If '${status}' == 'PASS' Set To Dictionary ${dict} ${service_type}=${map}
Log ${dict}
Update Tenant Dictionary
[Arguments] ${dict} ${json}
${list}= Evaluate ${json}['tenant']
- :for ${map} in @{list}
+ :FOR ${map} IN @{list}
\ ${status} ${tenant_id}= Run Keyword And Ignore Error Get From Dictionary ${map} tenant-id
\ Run Keyword If '${status}' == 'PASS' Set To Dictionary ${dict} ${tenant_id}=${map}
Log ${dict}
Library RequestsLibrary
Library UUID
Library OperatingSystem
+Library SeleniumLibrary
Library StringTemplater
Resource global_properties.robot
+Resource browser_setup.robot
*** Variables ***
${APPC_INDEX_PATH} /restconf
Library JSONUtils
Library OperatingSystem
Library Collections
-Library ExtendedSelenium2Library
+Library SeleniumLibrary
Library HttpLibrary.HTTP
Library String
Library StringTemplater
# TODO: CHECK vCPE models to make sure they aren't broken with the split
${resource_types}= Create Dictionary
- : FOR ${zip} IN @{model_zip_path}
+ :FOR ${zip} IN @{model_zip_path}
\ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip} ${cds}
# zip can be vFW.zip or vFWDT_VFWSNK.zip
\ ${resource_type_match}= Get Regexp Matches ${zip} ${service}_(.*)\.zip 1
# Spread the icons on the pallette starting on the left
${xoffset}= Set Variable ${0}
- : FOR ${vnf} IN @{vnflist}
+ :FOR ${vnf} IN @{vnflist}
\ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${resource_types['${vnf}']}
\ Set To Dictionary ${catalog_resources} ${resource_types['${vnf}']}=${loop_catalog_resource_resp}
\ ${catalog_resource_unique_name}= Add ASDC Resource Instance ${catalog_service_id} ${resource_types['${vnf}']} ${loop_catalog_resource_resp['name']} ${xoffset}
# do network
${networklist}= Get From Dictionary ${GLOBAL_SERVICE_GEN_NEUTRON_NETWORK_MAPPING} ${service}
${generic_neutron_net_uuid}= Get Generic NeutronNet UUID
- :FOR ${network} in @{networklist}
+ :FOR ${network} IN @{networklist}
\ ${loop_catalog_resource_id}= Set Variable ${generic_neutron_net_uuid}
\ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
\ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id}
# on certify it gets a new id
${catalog_service_id}= Certify ASDC Catalog Service ${catalog_service_id}
Approve ASDC Catalog Service ${catalog_service_id}
- : FOR ${DIST_INDEX} IN RANGE 1
+ :FOR ${DIST_INDEX} IN RANGE 1
\ Log Distribution Attempt ${DIST_INDEX}
\ Distribute ASDC Catalog Service ${catalog_service_id}
\ ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id}
#${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name}
${catalog_resource_ids}= Create List
${catalog_resources}= Create Dictionary
- : FOR ${zip} IN @{model_zip_path}
+ :FOR ${zip} IN @{model_zip_path}
\ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip} ${cds}
\ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
\ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id}
${xoffset}= Set Variable ${100}
${allottedresource_uuid}= Get AllottedResource UUID
${random}= Get Current Date
- :FOR ${allottedresource} in @{allottedresource_list}
+ :FOR ${allottedresource} IN @{allottedresource_list}
\ ${loop_catalog_resource_id}= Set Variable ${allottedresource_uuid}
\ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
\ ${loop_catalog_resource_id}= Add ASDC Allotted Resource Catalog Resource 00000 ${allottedresource}_${random} ONAP ${loop_catalog_resource_id} ${allottedresource}
# on certify it gets a new id
${catalog_service_id}= Certify ASDC Catalog Service ${catalog_service_id}
Approve ASDC Catalog Service ${catalog_service_id}
- : FOR ${DIST_INDEX} IN RANGE 1
+ :FOR ${DIST_INDEX} IN RANGE 1
\ Log Distribution Attempt ${DIST_INDEX}
\ Distribute ASDC Catalog Service ${catalog_service_id}
\ ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id}
Create Allotted Resource Data File
[Documentation] Create alloted resource json data file
- [Arguments]
${allotted_resource}= Create Dictionary
${allotted_csar_map}= Create Dictionary
Set To Dictionary ${allotted_csar_map} tunnelxconn=service-Demovcpevgmux-csar.csar
Set To Dictionary ${allotted_csar_map} brg=service-Demovcpevbrgemu-csar.csar
${keys}= Get Dictionary Keys ${allotted_csar_map}
- :for ${key} in @{keys}
+ :FOR ${key} IN @{keys}
\ ${csar}= Get From Dictionary ${allotted_csar_map} ${key}
\ ${dir} ${ext}= Split String From Right ${csar} - 1
\ Extract Zip File /tmp/csar/${csar} /tmp/csar/${dir}
${binObj}= Evaluate base64.b64decode("${base64Obj}") modules=base64
Create Binary File ${save_directory}/${csar_file_name} ${binObj}
Log To Console ${\n}Downloaded:${csar_file_name}
- [Return]
Get Generic NeutronNet UUID
[Arguments] ${catalog_service_id}
# SO watchdog timeout is 300 seconds need buffer
${dist_status}= Set Variable CONTINUE
- : FOR ${CHECK_INDEX} IN RANGE 20
+ :FOR ${CHECK_INDEX} IN RANGE 20
\ ${status} ${_} = Run Keyword And Ignore Error Check Catalog Service Distributed ${catalog_service_id} ${dist_status}
\ Sleep 20s
\ Return From Keyword If '${status}'=='PASS'
# need a way to exit the loop early on DISTRIBUTION_COMPLETE_ERROR ${dist_status} doesnt work
#\ Exit For Loop If '${dist_status}'=='EXIT'
Should Be Equal As Strings ${status} PASS
- [Return]
Setup ASDC Catalog Resource
[Documentation] Creates all the steps a vf needs for an asdc catalog resource and returns the id
\ Run Keyword If '${name}'=='network_role' Set To Dictionary ${dict} name=${name} value=${nf_role}
\ ${data}= Fill JSON Template File ${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} ${dict}
\ ${response}= Set ASDC Catalog Resource Component Instance Properties ${catalog_parent_service_id} ${catalog_service_id} ${data}
- #\ Log To Console resp=${response}
- [Return]
Setup SDC Catalog Resource AllottedResource Properties
# Set vnf inputs
${resp}= Get ASDC Catalog Resource Inputs ${catalog_resource_id}
${dict}= Create Dictionary
- :FOR ${comp} in @{resp['inputs']}
+ :FOR ${comp} IN @{resp['inputs']}
\ ${name} Set Variable ${comp['name']}
\ ${uid} Set Variable ${comp['uniqueId']}
\ Run Keyword If '${name}'=='nf_type' Set To Dictionary ${dict} nf_type=${nf_role} nf_type_uid=${uid}
[Arguments] ${catalog_resource_id}
# Set vnf module properties
${resp}= Get ASDC Catalog Resource Component Instances ${catalog_resource_id}
- :FOR ${comp} in @{resp['componentInstances']}
+ :FOR ${comp} IN @{resp['componentInstances']}
\ ${name} Set Variable ${comp['name']}
\ ${uniqueId} Set Variable ${comp['uniqueId']}
\ ${actualComponentUid} Set Variable ${comp['actualComponentUid']}
# Set vnf inputs
${resp}= Get ASDC Catalog Resource Inputs ${catalog_resource_id}
${dict}= Create Dictionary
- :FOR ${comp} in @{resp['inputs']}
+ :FOR ${comp} IN @{resp['inputs']}
\ ${name} Set Variable ${comp['name']}
\ ${uid} Set Variable ${comp['uniqueId']}
\ Run Keyword If '${name}'=='nf_function' Set To Dictionary ${dict} nf_function=ONAP-FIREWALL nf_function_uid=${uid}
\ ${dist_status}= Set Variable If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml')) EXIT
\ Exit For Loop If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml'))
Should Be True ( '${SO_COMPLETE}'=='TRUE') SO Test
- [Return]
Get Catalog Service Distribution Details
[Documentation] gets an asdc catalog Service distrbution details
Library Collections
Library OSUtils
Library OperatingSystem
-Library ExtendedSelenium2Library
+Library SeleniumLibrary
Resource global_properties.robot
*** Variables ***
${caps}= Evaluate sys.modules['selenium.webdriver'].common.desired_capabilities.DesiredCapabilities.FIREFOX sys
Set To Dictionary ${caps} marionette=
Set To Dictionary ${caps} elementScrollBehavior 1
- # TODO
- # Figure out how to run FF headless without Xvfb
${wd}= Create WebDriver Firefox capabilities=${caps}
Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${caps}
Handle Proxy Warning
[Documentation] Handle Intermediate Warnings from Proxies
- ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_TITLE}
+ ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist ${GLOBAL_PROXY_WARNING_TITLE}
Return From Keyword if '${status}' != 'PASS'
- ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
+ ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist ${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
Return From Keyword if '${status}' != 'PASS'
Return From Keyword if "${GLOBAL_PROXY_WARNING_TITLE}" == ''
Return From Keyword if "${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}" == ''
Documentation This test template encapsulates the VNF Orchestration use case.
Resource test_templates/model_test_template.robot
+Resource test_templates/model_test_template_vcperescust.robot
Resource test_templates/vnf_orchestration_test_template.robot
Resource asdc_interface.robot
Resource so_interface.robot
Library Collections
Library OperatingSystem
Library HttpLibrary.HTTP
-Library ExtendedSelenium2Library
+Library SeleniumLibrary
Library RequestsLibrary
*** Variables ***
${relationships}= Set Variable ${generic_vnf['relationship-list']['relationship']}
${relationship_data}= Get Relationship Data ${relationships}
${customer_id}= Catenate
- :for ${r} in @{relationship_data}
+ :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}
Get Relationship Data
[Arguments] ${relationships}
- :for ${r} in @{relationships}
+ :FOR ${r} IN @{relationships}
\ ${status} ${relationship_data} Run Keyword And Ignore Error Set Variable ${r['relationship-data']}
\ Return From Keyword If '${status}' == 'PASS' ${relationship_data}
# Don't get from MSO for now due to SO-1186
# ${model_invariant_id}= Run MSO Get ModelInvariantId ${SUITE_SERVICE_MODEL_NAME} ${vf_module_label}
${model_invariant_id}= Set Variable ${EMPTY}
- :for ${vf_module} in @{generic_vnfs}
+ :FOR ${vf_module} IN @{generic_vnfs}
\ ${generic_vnf}= Get From Dictionary ${generic_vnfs} ${vf_module}
\ ${model_invariant_id}= Set Variable If '${vf_module_label}' in '${vf_module}' ${generic_vnf['model-invariant-id']} ${model_invariant_id}
Log to Console Update old vFWCL Policy for ModelInvariantID=${model_invariant_id}
# Don't get from MSO for now due to SO-1186
# ${model_invariant_id}= Run MSO Get ModelInvariantId ${SUITE_SERVICE_MODEL_NAME} ${vf_module_label}
${model_invariant_id}= Set Variable ${EMPTY}
- :for ${vf_module} in @{generic_vnfs}
+ :FOR ${vf_module} IN @{generic_vnfs}
\ ${generic_vnf}= Get From Dictionary ${generic_vnfs} ${vf_module}
\ ${model_invariant_id}= Set Variable If '${vf_module_label}' in '${vf_module}' ${generic_vnf['model-invariant-id']} ${model_invariant_id}
Log to Console ModelInvariantID=${model_invariant_id}
${vars}= Catenate
${keys}= Get Dictionary Keys ${dict}
- :for ${key} in @{keys}
+ :FOR ${key} IN @{keys}
\ ${value}= Get From Dictionary ${dict} ${key}
\ ${vars}= Catenate ${vars}${key} = "${value}"\n
${comma}= Catenate
${vars}= Catenate ${vars}CATALOG_RESOURCE_IDS = [
- :for ${id} in @{CATALOG_RESOURCE_IDS}
+ :FOR ${id} IN @{CATALOG_RESOURCE_IDS}
\ ${vars}= Catenate ${vars}${comma} "${id}"
\ ${comma}= Catenate ,
${vars}= Catenate ${vars}]\n
### Create a vnfc for each vServer ###
${stack_resources}= Get Stack Resources auth ${stack_name} ${stack_id}
${resource_list}= Get From Dictionary ${stack_resources} resources
- :FOR ${resource} in @{resource_list}
+ :FOR ${resource} IN @{resource_list}
\ Run Keyword If '${resource['resource_type']}' == 'OS::Nova::Server' Run Create VNFC auth ${resource['physical_resource_id']} ${service}
${keystone_api_version}= Run Keyword If '${GLOBAL_INJECTED_OPENSTACK_KEYSTONE_API_VERSION}'=='' Get KeystoneAPIVersion
... ELSE Set Variable ${GLOBAL_INJECTED_OPENSTACK_KEYSTONE_API_VERSION}
Execute Reverse Heatbridge
[Documentation] VID has already torn down the stack, reverse HB
Return From Keyword If len(${REVERSE_HEATBRIDGE}) == 0
- :for ${uri} in @{REVERSE_HEATBRIDGE}
+ :FOR ${uri} IN @{REVERSE_HEATBRIDGE}
\ Run Keyword And Ignore Error Delete A&AI Entity ${uri}
Generate Reverse Heatbridge From Stack Name
${keys}= Create Dictionary region=${region} cloud=${GLOBAL_AAI_CLOUD_OWNER} tenant=${tenant_id}
${stack_resources}= Get Stack Resources auth ${stack_name} ${stack_id}
${resource_list}= Get From Dictionary ${stack_resources} resources
- :FOR ${resource} in @{resource_list}
+ :FOR ${resource} IN @{resource_list}
\ Log ${resource}
\ Run Keyword If '${resource['resource_type']}' == 'OS::Neutron::Port' Generate Linterface Uri auth ${resource['physical_resource_id']} ${reverse_heatbridge} ${keys}
- :FOR ${resource} in @{resource_list}
+ :FOR ${resource} IN @{resource_list}
\ Log ${resource}
\ Run Keyword If '${resource['resource_type']}' == 'OS::Nova::Server' Generate Vserver Uri auth ${resource['physical_resource_id']} ${reverse_heatbridge} ${keys} ${resource_list}
[Return] ${reverse_heatbridge}
*** Settings ***
Documentation The main interface for interacting with MUSIC. It handles low level stuff like managing the http request library and MUSIC required fields
-Library RequestsClientCert
Library RequestsLibrary
Library UUID
*** Settings ***
Documentation The main interface for interacting with External API/NBI
Library RequestsLibrary
+Library Collections
Resource global_properties.robot
Documentation The main interface for interacting with OOF: SNIRO and Homing Service
Library RequestsLibrary
Library UUID
+Library OperatingSystem
Library String
Library DateTime
Library Collections
${nodelist}= Create List node1 node2 node3 node4
${nn}= Catenate 1
# Support up to 4 ChangeWindows
- : For ${i} IN RANGE 1 4
+ :FOR ${i} IN RANGE 1 4
\ ${today}= Evaluate ((${i}-1)*1440)+${minutesFromNow}
\ ${tomorrow} Evaluate ${today}+1440
\ ${last_time} Evaluate ${today}+30
\ ${end_time}= Get Current Date UTC + ${tomorrow} minutes result_format=${OOF_CMSO_UTC}
\ Set To Dictionary ${map} start_time${i}=${start_time} end_time${i}=${end_time}
${requestList}= Create List
- : For ${vnf} IN @{nodelist}
+ :FOR ${vnf} IN @{nodelist}
\ Set To Dictionary ${map} node${nn} ${vnf}
\ ${nn}= Evaluate ${nn}+1
\ Set To DIctionary ${dict} vnfName=${vnf}
Run OOF-OSDF Post Request
[Documentation] Runs a scheduler POST request
- [Arguments] ${data_path} ${data}={} ${auth}
+ [Arguments] ${data_path} ${auth} ${data}={}
${session}= Create Session session ${OOF_OSDF_ENDPOINT} auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
[Documentation] Runs a osdf homing request
${auth}= Create List ${GLOBAL_OOF_OSDF_USERNAME} ${GLOBAL_OOF_OSDF_PASSWORD}
${data}= Get Binary File ${OOF_OSDF_TEMPLATE_FOLDER}${/}placement_request.json
- ${resp}= Run OOF-OSDF Post Request /api/oof/placement/v1 data=${data} auth=${auth}
+ ${resp}= Run OOF-OSDF Post Request /api/oof/placement/v1 auth=${auth} data=${data}
Should Be Equal As Strings ${resp.status_code} 204
Run OOF-OSDF Post PCI-OPT
[Documentation] Runs a osdf PCI-OPT request
${auth}= Create List ${GLOBAL_OOF_PCI_USERNAME} ${GLOBAL_OOF_PCI_PASSWORD}
${data}= Get Binary File ${OOF_OSDF_TEMPLATE_FOLDER}${/}pci-opt-request.json
- ${resp}= Run OOF-OSDF Post Request /api/oof/pci/v1 data=${data} auth=${auth}
+ ${resp}= Run OOF-OSDF Post Request /api/oof/pci/v1 auth=${auth} data=${data}
Should Be Equal As Strings ${resp.status_code} 204
${json}= Parse Json ${resp.content}
${versions}= Get From Dictionary ${json} versions
${values}= Get From Dictionary ${versions} values
- : FOR ${value} IN @{values}
+ :FOR ${value} IN @{values}
\ ${status}= Get Variable Value ${value["status"]}
\ Run Keyword If '${status}'=='stable' Exit For Loop
${href}= Set Variable ${value["links"][0]["href"]}
${resp}= Get Openstack Subnets ${alias}
@{list}= Get From Dictionary ${resp} subnets
${returnnet}= Set Variable
- :for ${net} in @{list}
+ :FOR ${net} IN @{list}
\ ${name}= Get From Dictionary ${net} name
\ ${cidr}= Get From Dictionary ${net} cidr
\ ${returnnet}= Set Variable ${net}
[Arguments] ${alias} ${network_name} ${cidr} ${ip}
${ports}= Get Openstack Ports For Subnet ${alias} ${network_name} ${cidr}
Log ${ports}
- :for ${port} in @{ports}
+ :FOR ${port} IN @{ports}
\ Return From Keyword If '${port['fixed_ips'][0]['ip_address']}' == '${ip}' ${port}
[Return] None
${net}= Get Openstack Subnet By Name ${alias} ${network_name} ${cidr}
${ports}= Get Openstack Ports ${alias}
${net_ports}= Create List
- :for ${port} in @{ports['ports']}
+ :FOR ${port} IN @{ports['ports']}
\ Run Keyword If '${net['network_id']}' == '${port['network_id']}' Append To List ${net_ports} ${port}
[Return] ${net_ports}
Get Id For Name
[Arguments] ${list} ${name}
- :for ${item} in @{list}
+ :FOR ${item} IN @{list}
\ ${id}= Get From Dictionary ${item} id
\ ${n}= Get From Dictionary ${item} name
\ Return from Keyword If '${n}' == '${name}' ${id}
Library String
Library JSONUtils
Library Collections
+Library Collections
+Library SSHLibrary
+Library OperatingSystem
+Resource json_templater.robot
Resource global_properties.robot
+Resource ssh/files.robot
*** Variables ***
${POLICY_HEALTH_CHECK_PATH} /healthcheck
*** Settings ***
Documentation This is RobotFrame work script
-Library ExtendedSelenium2Library
+Library SeleniumLibrary
Library OperatingSystem
-Library ../../library/eteutils/RequestsClientCert.py
Library RequestsLibrary
-Library ../../library/eteutils/UUID.py
-Library ../../library/robot/libraries/DateTime.py
+Library UUID
+Library DateTime
Library Collections
-Library ../../library/eteutils/OSUtils.py
-Library ../../library/eteutils/StringTemplater.py
+Library OSUtils
+Library StringTemplater
Library String
-#Library XvfbRobot
Resource ../json_templater.robot
Resource ../browser_setup.robot
${PORTAL_HOME_PAGE} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
${PORTAL_MICRO_ENDPOINT} ${PORTAL_URL}${PORTAL_ENV}/commonWidgets
${PORTAL_HOME_URL} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
-${PORTAL_HEALTH_CHECK_PATH} /ONAPPORTAL/portalApi/healthCheck
-${PORTAL_XDEMPAPP_REST_URL} http://portal-sdk:8080/ONAPPORTALSDK/api/v2
+${PORTAL_HEALTH_CHECK_PATH} ${PORTAL_ENV}/portalApi/healthCheck
+${PORTAL_XDEMPAPP_REST_URL} ${PORTAL_URL}/ONAPPORTALSDK/api/v2
${PORTAL_ASSETS_DIRECTORY} ../../assets/widgets/
${GLOBAL_APPLICATION_ID} robot-functional
${GLOBAL_PORTAL_ADMIN_USER} demo
${GLOBAL_BUILD_NUMBER} 0
${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt
${jira} jira
-${RESOURCE_PATH} ONAPPORTAL/auxapi/ticketevent
+${RESOURCE_PATH} ${PORTAL_URL}/auxapi/ticketevent
${portal_Template} ${CURDIR}/portal.template
-${Result} FALSE
-${td_id} 0
-${download_link_id} 0
-${HEADLESS} False
+${download_link_id} 0
*** Keywords ***
Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${GLOBAL_PORTAL_ADMIN_PWD}
Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${GLOBAL_PORTAL_ADMIN_PWD}
Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
-
- ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
+ ${Result}= Get Element Count xpath=//*[contains(text(),'User with same loginId already exists')]
#log ${Result}
#${type_result}= Evaluate type(${Result})
Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${GLOBAL_PORTAL_ADMIN_PWD}
Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
- ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
+ ${Result}= Get Element Count xpath=//*[contains(text(),'User with same loginId already exists')]
#log ${Result}
#${type_result}= Evaluate type(${Result})
Wait until page contains Element xpath=//a[@title='Widget Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
Click Link xpath=//a[@title='Widget Onboarding']
Wait until page contains Element xpath=//table[@class='ng-scope']
- ${td_id}= get element attribute xpath=//*[contains(text(),'Events')]@id
+ ${td_id}= get element attribute xpath=//*[contains(text(),'Events')] id
log ${td_id}
${test}= Get Substring ${td_id} -1
log ${test}
*** Settings ***
Documentation This is RobotFrame work script
-Library ExtendedSelenium2Library
-Library OperatingSystem
-#Library XvfbRobot
+Library SeleniumLibrary
-*** Variables ***
-${PORTAL_SDK_URL} http://portal.api.simpledemo.onap.org:8990
-${PORTAL_SDK_ENV} /ONAPPORTALSDK
-${PORTAL_SDK_LOGIN_URL} ${PORTAL_SDK_URL}${PORTAL_ENV}/login.htm
-${PORTAL_SDK_HOME_PAGE} ${PORTAL_SDK_URL}${PORTAL_ENV}/welcome
-${PORTAL_SDK_MICRO_ENDPOINT} ${PORTAL_SDK_URL}${PORTAL_ENV}/commonWidgets
-${PORTAL_SDK_HOME_URL} ${PORTAL_SDK_URL}${PORTAL_ENV}/applicationsHome
-${GLOBAL_APPLICATION_ID} robot-functional
-${GLOBAL_PORTAL_ADMIN_USER} demo
-${GLOBAL_PORTAL_ADMIN_PWD} demo
-${GLOBAL_SELENIUM_BROWSER} chrome
-${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary
-${GLOBAL_SELENIUM_DELAY} 0
-${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5
-${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 15
-${GLOBAL_BUILD_NUMBER} 0
-${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt
-
-#*** Test Cases ***
-
*** Keywords ***
-SDKPortal admin Login To Portal GUI
- [Documentation] Logs into Portal GUI
- # Setup Browser
- # Start Virtual Display 1920 1080
- Open Browser ${PORTAL_SDK_LOGIN_URL} chrome
- # Go To ${PORTAL_SDK_LOGIN_URL}
- Maximize Browser Window
- Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
- Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
- Log Logging in to ${PORTAL_SDK_URL}${PORTAL_SDK_ENV}
- # Handle Proxy Warning
- Title Should Be Login
- Input Text xpath=//input[@id='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
- Input Password xpath=//input[@id='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
- Click Element //*[@id="loginBtn"]
- Wait Until Page Contains Element xpath=//img[@src='app/fusionapp/icons/logo_onap_transbg.png'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
- Log Logged in to ${PORTAL_SDK_URL}${PORTAL_SDK_ENV}
-
-SDKPortalAdmin Navigation Application Link Tab
- [Documentation] Logs into Portal GUI as Portal admin
- Comment Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
- Comment Go To ${PORTAL_SDK_HOME_PAGE}
- Comment Dismiss Alert accept=false
- #Scroll Element Into View xpath=//span[@id='tab-Home']
- #Click Element xpath=//span[@id='tab-Home']
- #Click Element xpath=(//span[@id='tab-xDemo-App']/following::i[@class='ion-close-round'])[1]
- Comment Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
-
Validate SDK Sub Menu
[Documentation] Logs into SDK GUI as Portal admin
Page Should Contain Home
Click Link xpath=//a[@id='parent-item-Admin']
Click Link xpath=//a[@id='parent-item-Admin']
Click Link xpath=//a[contains(@title,'Usage')]
- Page Should Contain Current Usage
-
-
+ Page Should Contain Current Usage
\ No newline at end of file
Library RequestsClientCert
Library RequestsLibrary
Library UUID
-Library ExtendedSelenium2Library
+Library SeleniumLibrary
Library Collections
Library String
Run Portal Application Login Test demo demo123456! gridster-Policy-icon-link tabframe-Policy Policy Editor
Close All Browsers
+Login To Portal GUI And Go Home
+ [Documentation] Logs in to Portal GUI
+ [Arguments] ${loginId} ${password}
+ Login To Portal GUI ${loginId} ${password}
+ Go To Portal HOME
+
Login To Portal GUI
[Documentation] Logs in to Portal GUI
[Arguments] ${loginId} ${password}
### revert to local Setup Browser for Login test
Setup Browser
Go To ${PORTAL_LOGIN_URL}
- #Maximize Browser Window
Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
Log Logging in to ${PORTAL_ENDPOINT}${PORTAL_ENV}
Title Should Be Login
Input Text xpath=//input[@ng-model='loginId'] ${loginId}
Input Password xpath=//input[@ng-model='password'] ${password}
- #Click Button xpath=//a[@ng-click='loginExternal();']
Click Element xpath=//a[@id='loginBtn']
Wait Until Page Contains Applications ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
Log Logged in to ${PORTAL_ENDPOINT}${PORTAL_ENV}
Log To Console ${loginId} SUCCESS
+
+Logout From Portal GUI
+ [Documentation] Logs out of Portal GUI
+ Go To ${PORTAL_LOGIN_URL}
+ Click Element xpath=//div[@id='header-user-icon']
+ Run Keyword And Ignore Error Click Button xpath=//button[contains(.,'Log out')]
+ Log Logged out of ${PORTAL_ENDPOINT}${PORTAL_ENV}
Run Portal Application Login Test
[Documentation] Login to Portal Application
Library RequestsLibrary
Library UUID
Library OperatingSystem
-Library ExtendedSelenium2Library
+Library SeleniumLibrary
Library Collections
Library String
Library StringTemplater
${base_vf_module_type}= Catenate
${closedloop_vf_module}= Create Dictionary
${templates}= Get From Dictionary ${GLOBAL_SERVICE_TEMPLATE_MAPPING} ${service}
- :for ${vf_module} in @{vf_modules}
+ :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
[Documentation] Retrieve the appropriate prelad template entry for the passed vf_module
[Arguments] ${templates} ${vf_module} ${vnf_index}=0
${vf_module_name}= Get From DIctionary ${vf_module} name
- :for ${template} in @{templates}
+ :FOR ${template} IN @{templates}
\ Return From Keyword If '${template['name_pattern']}' in '${vf_module_name}' and ('${template['vnf_index']}' == '${vnf_index}') ${template}
${result}= Create Dictionary
[Return] ${result}
[Documentation] Retrieve the appropriate prelad template entry for the passed vf_module
[Arguments] ${templates} ${vf_module}
${vf_module_name}= Get From DIctionary ${vf_module} name
- :for ${template} in @{templates}
+ :FOR ${template} IN @{templates}
\ Return From Keyword If '${template['name_pattern']}' in '${vf_module_name}' ${template}
${result}= Create Dictionary
[Return] ${result}
${defaults}= Get From Dictionary ${GLOBAL_PRELOAD_PARAMETERS} defaults
# add all of the defaults to template...
@{keys}= Get Dictionary Keys ${defaults}
- :for ${key} in @{keys}
+ :FOR ${key} IN @{keys}
\ ${value}= Get From Dictionary ${defaults} ${key}
\ Set To Dictionary ${template} ${key} ${value}
Resolve Values Into Dictionary
[Arguments] ${valuemap} ${from} ${to}
${keys}= Get Dictionary Keys ${from}
- :for ${key} in @{keys}
+ :FOR ${key} IN @{keys}
\ ${value}= Get From Dictionary ${from} ${key}
\ ${value}= Template String ${value} ${valuemap}
\ Set To Dictionary ${to} ${key} ${value}
[Arguments] ${valuemap} ${from}
${vnf_parameters}= Create List
${keys}= Get Dictionary Keys ${from}
- :for ${key} in @{keys}
+ :FOR ${key} IN @{keys}
\ ${value}= Get From Dictionary ${from} ${key}
\ ${value}= Template String ${value} ${valuemap}
\ ${parameter}= Create Dictionary vnf-parameter-name=${key} vnf-parameter-value=${value}
*** Settings ***
Documentation The main interface for interacting with SMS.
-Library RequestsClientCert
Library RequestsLibrary
Library UUID
Library String
Library DateTime
Library SoUtils
-
-
-*** Variables ***
-
+Resource ../global_properties.robot
*** Keywords ***
Instantiate Service Direct To SO
${preload_dict}= Copy Dictionary ${GLOBAL_PRELOAD_PARAMETERS['defaults']}
${template}= Create Dictionary
@{keys}= Get Dictionary Keys ${preload_dict}
- :for ${key} in @{keys}
+ :FOR ${key} IN @{keys}
\ ${value}= Get From Dictionary ${preload_dict} ${key}
\ ${tmp_value}= Set Variable If 'GLOBAL_' in $value ${value}
\ ${tmp_value}= Run Keyword If 'GLOBAL_' in $value Replace String ${tmp_value} \$ ${EMPTY}
[Arguments] ${input}
@{lines}= Split To Lines ${input}
${map}= Create Dictionary
- :for ${line} in @{lines}
+ :FOR ${line} IN @{lines}
\ @{parts}= Split String ${line} max_split=7
\ ${pid}= Catenate ${parts[1]}
\ ${name}= Catenate ${parts[7]}
${pass} ${map}= Run Keyword and Ignore Error Grep Processes ${process_name}
@{pids}= Get Dictionary Keys ${map}
${foundpid}= Catenate ""
- :for ${pid} in @{pids}
+ :FOR ${pid} IN @{pids}
\ ${process_cmd}= Get From Dictionary ${map} ${pid}
\ ${status} ${value}= Run Keyword And Ignore Error Should Match Regexp ${process_cmd} ${process_name}
\ Run Keyword If '${status}' == 'PASS' Set Test Variable ${foundpid} ${pid}
+++ /dev/null
-*** Settings ***
-Documentation The main interface for interacting with A&AI. It handles low level stuff like managing the http request library and A&AI required fields
-Library ExtendedSelenium2Library
-Library StringTemplater
-Library UUID
-Library OperatingSystem
-Resource ../global_properties.robot
-Resource ../browser_setup.robot
-
-*** Variables ***
-${SNK_HOSTS_TEMPLATE} http://\${host}:\${port}/hosts/
-${SNK_HOME_TEMPLATE} http://\${host}:\${port}/
-${SNK_PATH}
-${SNK_PORT} 667
-${BYTES_PER_PACKET} 29
-${PACKETS_PER_SECOND_PER_STREAM} 11
-${MONITOR_INTERVAL_IN_SECONDS} 4
-
-*** Keywords ***
-Get Darkstat Bytes In
- [Documentation] Get bytes received on the passed interface for the given interval
- [Arguments] ${host} ${interface} ${interval}=${MONITOR_INTERVAL_IN_SECONDS}
- ${map}= Create Dictionary host=${host} port=${SNK_PORT} path=${SNK_PATH}
- ${url}= Template String ${SNK_HOSTS_TEMPLATE} ${map}
- Connect to Darkstat ${host} ${url}
- Title Should Be Hosts (darkstat3 eth1)
- ${initial_bytes}= Get Current Bytes In ${interface}
- Sleep ${interval}
- Go To ${url}
- ${new_bytes}= Get Current Bytes In ${interface}
- ${return_bytes}= Evaluate int(${new_bytes}) - int(${initial_bytes})
- [Return] ${return_bytes}
-
-Get Darkstat Packets In
- [Documentation] Get bytes received on the passed interface for the given interval
- [Arguments] ${host} ${interval}=${MONITOR_INTERVAL_IN_SECONDS}
- ${map}= Create Dictionary host=${host} port=${SNK_PORT} path=${SNK_PATH}
- ${url}= Template String ${SNK_HOME_TEMPLATE} ${map}
- Connect to Darkstat ${host} ${url}
- Title Should Be Graphs (darkstat3 eth1)
- ${initial_pkts}= Get Current Packets In
- Sleep ${interval}
- Go To ${url}
- ${new_pkts}= Get Current Packets In
- ${return_pkts}= Evaluate int(${new_pkts}) - int(${initial_pkts})
- [Return] ${return_pkts}
-
-
-Connect to Darkstat
- [Documentation] COnnects to the Darkstat port on passed host
- [Arguments] ${host} ${url}
- ## Being managed by the test case
- ##Setup Browser
- Go To ${url}
- Maximize Browser Window
- Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
- Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
- Log Logging in to ${url}
- Handle Proxy Warning
-
-
-Get Current Bytes In
- [Documentation] Retrieves packets input from given host from current Darkstats hosts page
- [Arguments] ${interface}
- ${bytes}= Get Text xpath=//tr[td/a[text() = '${interface}']]/td[4]
- ${bytes}= Evaluate ${bytes.replace(',', '')}
- [Return] ${bytes}
-
-Get Current Packets In
- [Documentation] Retrieves packets input from given host from current Darkstats hosts page
- ${bytes}= Get Text xpath=//span[@id = 'tp']
- ${bytes}= Evaluate ${bytes.replace(',', '')}
- [Return] ${bytes}
-
-
-Get Expected Range For Number Of Streams
- [Documentation] Calculates the expected range of bytes for an interval for the given number of streams
- [Arguments] ${number_of_streams}
- ${bytes_per_second}= Evaluate ${BYTES_PER_PACKET}*(${PACKETS_PER_SECOND_PER_STREAM}*${number_of_streams})
- ${low_bytes}= Evaluate (${MONITOR_INTERVAL_IN_SECONDS}-1)*${bytes_per_second}
- ${high_bytes}= Evaluate (${MONITOR_INTERVAL_IN_SECONDS}+1)*${bytes_per_second}
- [Return] ${low_bytes} ${high_bytes}
\ No newline at end of file
${streams}= Set Variable
${comma}= Set Variable
${stream_count}= Evaluate ${stream_count}+1
- :for ${i} in Range 1 ${stream_count}
+ :FOR ${i} IN RANGE 1 ${stream_count}
\ ${name}= Catenate ${prefix}${i}
\ ${map}= Create Dictionary stream=${name}
\ ${one}= Fill JSON Template File ${PGN_ENABLE_STREAM_TEMPLATE} ${map}
Library OpenstackLibrary
Library HEATUtils
Library Collections
-LIbrary String
-Resource ../../resources/openstack/keystone_interface.robot
-Resource ../../resources/openstack/nova_interface.robot
-Resource ../../resources/openstack/heat_interface.robot
-Resource ../../resources/ssh/files.robot
-Resource ../../resources/ssh/processes.robot
+Library String
+Resource ../openstack/keystone_interface.robot
+Resource ../openstack/nova_interface.robot
+Resource ../openstack/heat_interface.robot
+Resource ../ssh/files.robot
+Resource ../ssh/processes.robot
+Resource ../demo_preload.robot
Resource packet_generator_interface.robot
-Resource darkstat_interface.robot
Resource validate_common.robot
-Resource ../../resources/test_templates/vnf_orchestration_test_template.robot
+Resource ../test_templates/vnf_orchestration_test_template.robot
*** Variables ***
Get DNSScaling Prefix
${mapping}= Get From Dictionary ${GLOBAL_SERVICE_TEMPLATE_MAPPING} vLB
- :for ${dict} in @{mapping}
+ :FOR ${dict} IN @{mapping}
\ Return From Keyword If '${dict['isBase']}' == 'false' ${dict['prefix']}
[Return] None
Get V4 IP
[Arguments] ${ipmaps}
- :for ${ipmap} in @{ipmaps}
+ :FOR ${ipmap} IN @{ipmaps}
\ ${ip} Get From Dictionary ${ipmap} addr
\ ${version} Get From Dictionary ${ipmap} version
\ Return from Keyword if '${version}' == '4' ${ip}
Get V4 IP Openstack
[Arguments] ${addresses} ${testtype}
${ipmaps}= Get From Dictionary ${addresses} ${testtype}
- :for ${ipmap} in @{ipmaps}
+ :FOR ${ipmap} IN @{ipmaps}
\ ${ip} Get From Dictionary ${ipmap} addr
\ ${version} Get From Dictionary ${ipmap} version
\ Return from Keyword if '${version}'=='4' ${ip}
Get V4 IP Openstack 2
[Arguments] ${ipmaps} ${testtype}
- :for ${ipmap} in @{ipmaps}
+ :FOR ${ipmap} IN @{ipmaps}
\ ${type} Get From Dictionary ${ipmap} OS-EXT-IPS:type
\ ${ip} Get From Dictionary ${ipmap} addr
\ ${version} Get From Dictionary ${ipmap} version
${service_name}= Catenate ${service} ${uuid}
${shortened_uuid}= Evaluate str("${service_name}")[:23]
${catalog_service_name}= Set Variable If '${catalog_service_name}' =='' ${shortened_uuid} ${catalog_service_name}
- :for ${directory} in @{directory_list}
+ :FOR ${directory} IN @{directory_list}
\ ${zipname}= Replace String ${directory} / _
\ ${zip}= Catenate ${ASDC_ZIP_DIRECTORY}/${zipname}.zip
\ ${folder}= Catenate ${ASDC_ASSETS_DIRECTORY}/${directory}
[Documentation] Clean up at the end of the test
[Arguments] ${catalog_service_id} ${catalog_resource_ids}
Return From Keyword If '${catalog_service_id}' == ''
- :for ${catalog_resource_id} in @{catalog_resource_ids}
+ :FOR ${catalog_resource_id} IN @{catalog_resource_ids}
\ ${resourece_json}= Mark ASDC Catalog Resource Inactive ${catalog_resource_id}
${service_json}= Mark ASDC Catalog Service Inactive ${catalog_service_id}
${services_json}= Delete Inactive ASDC Catalog Services
${service_name}= Catenate ${service} ${uuid}
${shortened_uuid}= Evaluate str("${service_name}")[:23]
${catalog_service_name}= Set Variable If '${catalog_service_name}' =='' ${shortened_uuid} ${catalog_service_name}
- :for ${directory} in @{directory_list}
+ :FOR ${directory} IN @{directory_list}
\ ${zipname}= Replace String ${directory} / _
\ ${zip}= Catenate ${ASDC_ZIP_DIRECTORY}/${zipname}.zip
\ ${folder}= Catenate ${ASDC_ASSETS_DIRECTORY}/${directory}
[Documentation] Clean up at the end of the test
[Arguments] ${catalog_service_id} ${catalog_resource_ids}
Return From Keyword If '${catalog_service_id}' == ''
- :for ${catalog_resource_id} in @{catalog_resource_ids}
+ :FOR ${catalog_resource_id} IN @{catalog_resource_ids}
\ ${resourece_json}= Mark ASDC Catalog Resource Inactive ${catalog_resource_id}
${service_json}= Mark ASDC Catalog Service Inactive ${catalog_service_id}
${services_json}= Delete Inactive ASDC Catalog Services
Resource ../json_templater.robot
Library OpenstackLibrary
Library OperatingSystem
+Library RequestsLibrary
Library UUID
Library Collections
Library JSONUtils
Library OpenstackLibrary
-Library ExtendedSelenium2Library
+Library SeleniumLibrary
Library UUID
Library Collections
Library JSONUtils
${vnf_name_index}= Set Variable 0
${vf_module_name_list}= Create List
${uuid}= Evaluate str("${uuid}")[:8]
- :for ${vnf} in @{vnflist}
+ :FOR ${vnf} IN @{vnflist}
# APPC max is 50 characters
\ ${vnf_name}= Catenate Ete_${vnf}_${uuid}_${vnf_name_index}
\ ${vf_module_name}= Catenate Vfmodule_Ete_${vnf}_${uuid}_${vnf_name_index}
Validate Service Instance ${service_instance_id} ${service} ${customer_name}
${vnflist}= Get From Dictionary ${GLOBAL_SERVICE_VNF_MAPPING} ${service}
${generic_vnfs}= Create Dictionary
- :for ${vnf} in @{vnflist}
+ :FOR ${vnf} IN @{vnflist}
\ ${vnf_name}= Catenate Ete_${vnf}_${uuid}
\ ${vf_module_name}= Catenate Vfmodule_Demo_${vnf}_${uuid}
\ ${vnf_type}= Set Variable ${vnf_json_resources['${vnf}']['vnf_type']}
${base_name}= Get Name Pattern ${vnf}
${keys}= Get Dictionary Keys ${resources}
- :for ${key} in @{keys}
+ :FOR ${key} IN @{keys}
\ ${cr}= Get From Dictionary ${resources} ${key}
\ Return From Keyword If '${base_name}' in '${cr['allArtifacts']['heat1']['artifactDisplayName']}' ${cr}
\ Run Keyword If 'heat2' in ${cr['allArtifacts']} Return From Keyword If '${base_name}' in '${cr['allArtifacts']['heat2']['artifactDisplayName']}' ${cr}
[Documentation] To support services with multiple VNFs, we need to dig the vnf type out of the SDC catalog resources to select in the VID UI
[Arguments] ${vnf}
${list}= Get From Dictionary ${GLOBAL_SERVICE_TEMPLATE_MAPPING} ${vnf}
- :for ${dict} in @{list}
+ :FOR ${dict} IN @{list}
\ ${base_name}= Get From Dictionary ${dict} name_pattern
\ Return From Keyword If '${dict['isBase']}' == 'true' ${base_name}
Fail Unable to locate base name pattern
[Documentation] Called at the end of a test case to tear down the VNF created by Orchestrate VNF
${lcp_region}= Get Openstack Region
${list}= Create List
- Set Test Variable ${KEYPAIRS} ${list}
# remove duplicates, sort vFW-> vPKG , revers to get vPKG > vFWSNK
${sorted_stack_names}= Create List
${sorted_stack_names}= Remove Duplicates ${STACK_NAMES}
Sort List ${sorted_stack_names}
Reverse List ${sorted_stack_names}
- :for ${stack} in @{sorted_stack_names}
- \ Get Stack Keypairs ${stack}
+ :FOR ${stack} IN @{sorted_stack_names}
+ \ ${keypair_name}= Get Stack Keypairs ${stack}
+ \ Append To List ${list} ${keypair_name}
Teardown VVG Server
#Teardown VLB Closed Loop Hack
Run Keyword and Ignore Error Teardown VID ${SERVICE_INSTANCE_ID} ${lcp_region} ${TENANT_NAME} ${CUSTOMER_NAME}
#
- :for ${stack} in @{sorted_stack_names}
+ :FOR ${stack} IN @{sorted_stack_names}
\ Run Keyword and Ignore Error Teardown Stack ${stack}
\ Log Stack Deleted ${stack}
# only needed if stack deleted but not keypair
- :for ${key_pair} in @{KEYPAIRS}
+ :FOR ${key_pair} IN @{list}
\ Run Keyword and Ignore Error Delete Stack Keypair ${key_pair}
\ Log Key pair Deleted ${key_pair}
Log VNF Deleted
Log ${stack_info}
${stack_id}= Get From Dictionary ${stack_info} id
${key_pair_status} ${keypair_name}= Run Keyword And Ignore Error Get From Dictionary ${stack_info} key_name
- Append To List ${KEYPAIRS} ${keypair_name}
+ [Return] ${keypair_name}
Delete Stack Keypair
[Documentation] Delete keypairs from openstack
Resource ../so_interface.robot
Library OpenstackLibrary
-Library ExtendedSelenium2Library
Library UUID
Library Collections
+Library String
Library JSONUtils
Library RequestsLibrary
${list}= Create List
${vnfs}= Get From Dictionary ${jsondata['topology_template']} node_templates
${keys}= Get Dictionary Keys ${vnfs}
- :for ${key} in @{keys}
+ :FOR ${key} IN @{keys}
\ ${vnf}= Get From Dictionary ${vnfs} ${key}
\ Get VNF Info ${key} ${vnf} ${dict}
\ ${vf_modules}= Get From Dictionary ${jsondata['topology_template']} groups
${keys}= Get Dictionary Keys ${vfModules}
${data}= Catenate
${delim}= Catenate
- :for ${key} in @{keys}
+ :FOR ${key} IN @{keys}
\ ${module}= Get From Dictionary ${vfModules} ${key}
\ Log to console ${vnf} ${key}
\ Run keyword if "${vnf}" in "${key}" set vfmodule param ${key} ${module} ${dict}
...
... Creates VID Service Instance
-Library ExtendedSelenium2Library
+Library SeleniumLibrary
Library UUID
Library String
Library DateTime
Select From List When Enabled //select[@prompt='Select Project Name'] ${project_name} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
Select From List When Enabled //select[@prompt='Select Owning Entity'] ${owning_entity} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
Capture Page Screenshot
- Xpath Should Match X Times //input[@parameter-name='Instance Name'] 1
- Focus //input[@parameter-name='Instance Name']
+ Page Should Contain Element //input[@parameter-name='Instance Name'] limit=1
+ Set Focus To Element //input[@parameter-name='Instance Name']
Wait Until Keyword Succeeds 120s 5s Input Text When Enabled //input[@parameter-name='Instance Name'] ${service_name} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
Capture Page Screenshot
Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Confirm']
*** Settings ***
Documentation Creates VID VNF Instance
-Library ExtendedSelenium2Library 60
+Library SeleniumLibrary 60
Library UUID
Library String
Library DateTime
*** Settings ***
Documentation The main interface for interacting with VID. It handles low level stuff like managing the selenium request library and VID required steps
-Library ExtendedSelenium2Library
+Library SeleniumLibrary
Library Collections
Library String
Library StringTemplater
Resource vid_interface.robot
Resource create_vid_vnf.robot
Resource create_service_instance.robot
+Resource ../heatbridge.robot
*** Variables ***
${VID_ENV} /vid
Select From List By Label //select[@ng-model='selectedCustomer'] ${customer}
Click Button button=Submit
- # When Handle alert detects a pop-up. it will return FAIL and we are done
+ # When Handle VID Alert detects a pop-up. it will return FAIL and we are done
# Return from Keyword is required because FAIL is inored during teardown
Set Test Variable ${TEARDOWN_STATUS} PASS
- ${status} ${value} Run Keyword And Ignore Error Handle Alert
+ ${status} ${value} Run Keyword And Ignore Error Handle VID Alert
Return From Keyword If '${status}' == 'FAIL' ${status}
${status} ${value} Run Keyword And Ignore Error Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Return From Keyword If '${status}' == 'FAIL' ${status}
Wait Until Page Contains View/Edit Service Instance timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Wait Until Element Is Visible xpath=//a/span[@class='glyphicon glyphicon-remove'] timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
- :for ${remove_first} in @{remove_order}
+ :FOR ${remove_first} IN @{remove_order}
\ ${remove_xpath}= Set Variable //li/div[contains(.,'${remove_first}')]/a/span[@class='glyphicon glyphicon-remove']
\ ${status} ${data}= Run Keyword And Ignore Error Page Should Contain Element xpath=${remove_xpath}
\ Exit For Loop If '${status}' == 'PASS'
Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
[Return] ${vfmodule}
-Handle Alert
+Handle VID Alert
[Documentation] When service instance has been deleted, an alert will be triggered on the search to end the loop
... The various Alert keywords did not prevent the alert exception on the Click ELement, hence this roundabout way of handling the alert
Run Keyword And Ignore Error Click Element button=Submit
- ${status} ${t}= Run Keyword And Ignore Error Get Alert Message
+ ${status} ${t}= Run Keyword And Ignore Error Handle Alert
Return From Keyword If '${status}' == 'FAIL'
Fail ${t}
*** Settings ***
Documentation The main interface for interacting with VID. It handles low level stuff like managing the selenium request library and VID required steps
-Library ExtendedSelenium2Library
+Library SeleniumLibrary
Library Collections
Library String
Library RequestsLibrary
${resp}= Get Text xpath=//body/pre
${json}= To Json ${resp}
${services}= Get From Dictionary ${json} services
- :for ${dict} in @{services}
+ :FOR ${dict} IN @{services}
\ ${uuid}= Get From DIctionary ${dict} uuid
\ ${inv}= Get From DIctionary ${dict} invariantUUID
\ Return From Keyword If "${invariantUUID}" == "${inv}" ${uuid}
${modules}= Create List
${vnfs}= Get From Dictionary ${json} vnfs
${keys}= Get Dictionary Keys ${vnfs}
- :for ${key} in @{keys}
+ :FOR ${key} IN @{keys}
\ Add VFModule ${vnfs['${key}']} ${modules}
[Return] ${modules}
[Arguments] ${vnf} ${modules}
${vfModules}= Get From Dictionary ${vnf} vfModules
${keys}= Get Dictionary Keys ${vfModules}
- :for ${key} in @{keys}
+ :FOR ${key} IN @{keys}
\ ${module}= Get From Dictionary ${vfModules} ${key}
\ ${dict}= Create Dictionary name=${module['name']}
\ Append to List ${modules} ${dict}
[Return] ${resp}
Run VVP CMS Health Check
- [Documentation] Tests interface for container with purpose: backend uwsgi server which hosts django application
+ [Documentation] Tests interface for container with purpose: backend uwsgi server which hosts django application
${resp}= Run VVP CMS Get Request ${VVP_PATH}
Should Be Equal As Strings ${resp.status_code} 200
-Run VVP CMS Get Request ${VVP_PATH}
+Run VVP CMS Get Request
[Documentation] Runs request in container with purpose: backend uwsgi server which hosts django application
[Arguments] ${data_path}
Log Creating session ${VVP_CMS_UWSGI_ENDPOINT}
Create Cloud Config Test
[TAGS] mso cloudconfig
# Run Create Cloud Configuration RegionOne RegionOne RegionOne DEFAULT_KEYSTONE identify_url:http://10.12.25.2:5000/v2.0 mso_id:demo mso_pass:encrypted_password admin_tenant:1e097c6713e74fd7ac8e4295e605ee1e member_role:admin identity_server_type:KEYSTONE identity_authentication_type:USERNAME_PASSWORD
- Create Cloud Configuration ${GLOBAL_INJECTED_REGION} ${GLOBAL_INJECTED_REGION} ${GLOBAL_INJECTED_REGION} DEFAULT_KEYSTONE ${GLOBAL_INJECTED_KEYSTONE}/${GLOBAL_INJECTED_OPENSTACK_KEYSTONE_API_VERSION} ${GLOBAL_INJECTED_OPENSTACK_USERNAME} ${GLOBAL_INJECTED_OPENSTACK_MSO_ENCRYPTED_PASSWORD} ${GLOBAL_INJECTED_OPENSTACK_TENANT_ID} admin KEYSTONE USERNAME_PASSWORD
+ Create Cloud Configuration ${GLOBAL_INJECTED_REGION} ${GLOBAL_INJECTED_REGION} ${GLOBAL_INJECTED_REGION} DEFAULT_KEYSTONE ${GLOBAL_INJECTED_KEYSTONE}/${GLOBAL_INJECTED_OPENSTACK_KEYSTONE_API_VERSION} ${GLOBAL_INJECTED_OPENSTACK_USERNAME} ${GLOBAL_INJECTED_OPENSTACK_API_KEY} ${GLOBAL_INJECTED_OPENSTACK_TENANT_ID} admin KEYSTONE USERNAME_PASSWORD
Create Cloud Config RegionThree V3 Test
[TAGS] mso cloudconfig cloudconfigv3
${HB_STACK}
${HB_SERVICE_INSTANCE_ID}
${HB_SERVICE}
+${HB_IPV4_OAM_ADDRESS}
*** Test Cases ***
Basic Holmes Rule Management API Health Check
[Tags] health medium health-dcae
- Run Holmes Rule Mgmt Health Check
+ Run Holmes Rule Mgmt Healthcheck
Basic Holmes Engine Management API Health Check
[Tags] health medium health-dcae
- Run Holmes Engine Mgmt Health Check
+ Run Holmes Engine Mgmt Healthcheck
Basic Multicloud-fcaps API Health Check
[Tags] health multicloud health-multicloud
*** Settings ***
-Documentation HV-VES 'Sunny Scenario' Robot Framwork test - message is sent to the collector and Kafka topic is checked if the message has been published.
-Default Tags HVVES ete
-Test Timeout 10s
+Documentation HV-VES 'Sunny Scenario' Robot Framwork test - message is sent to the collector and Kafka topic is checked if the message has been published.
+
+
+Library Rammbock
+Library OperatingSystem
Resource ${EXECDIR}/robot/resources/global_properties.robot
Resource ${EXECDIR}/robot/resources/test_templates/hvves_template.robot
Suite Teardown Reset Rammbock
*** Test Cases ***
HV-VES test case
+ [Tags] HVVES ete
+ [Timeout] 10s
${msg_number_initial}= Check Number Of Messages On Topic ${GLOBAL_DNS_MESSAGE_ROUTER_KAFKA_NAME} ${GLOBAL_MESSAGE_ROUTER_KAFKA_PORT} ${hvves_kafka_topic}
Define WTP Protocol
Start HV-VES TCP Client And Send Message ${GLOBAL_DNS_HV_VES_NAME} ${GLOBAL_HV_VES_SERVER_PORT}
Library OperatingSystem
Library RequestsLibrary
Library Collections
-Library ExtendedSelenium2Library
Resource ../resources/test_templates/model_test_template_vcperescust.robot
Test Template Model Distribution For vCPEResCust Directory
Library OperatingSystem
Library RequestsLibrary
Library Collections
-Library ExtendedSelenium2Library
Resource ../resources/test_templates/model_test_template.robot
Test Template Model Distribution For Directory
Create A&AI antry without SO and succesfully registrate PNF, PNF entry contains: correlation ID, PNF_IPv4_address and PNF_IPv6_address
[Documentation] This test is checking creation A&AI entry without SO and succesfull PNF registration
[Tags] pnf_registrate ete
- [Setup] Initialize PNF entry with correlation ID, PNF_IPv4_address and PNF_IPv6_address
+ ${PNF_entry_dict}= Create Dictionary correlation_id=ABCDEFG1234567 PNF_IPv4_address=13.13.13.13 PNF_IPv6_address=2001:0db8:0:0:0:0:1428:57ab
+ Log Initial PNF entry ${PNF_entry_dict}
Create A&AI antry without SO and succesfully registrate PNF ${PNF_entry_dict}
- [Teardown] Cleanup PNF entry in A&AI ${PNF_entry_dict}
-
-
-*** Keyword ***
-
-Initialize PNF entry with correlation ID, PNF_IPv4_address and PNF_IPv6_address
- [Documentation] Setup test case variable
- ${PNF_entry_dict}= Create Dictionary correlation_id=ABCDEFG1234567 PNF_IPv4_address=13.13.13.13 PNF_IPv6_address=2001:0db8:0:0:0:0:1428:57ab
- Set Test Variable ${PNF_entry_dict}
- Log Initial PNF entry ${PNF_entry_dict}
-
+ [Teardown] Cleanup PNF entry in A&AI ${PNF_entry_dict}
\ No newline at end of file
Test Timeout 5 minute
Documentation This is RobotFrame work script
Resource ../resources/portal-sdk/portalDef.robot
-Resource ../resources/portal-sdk/portalSdkDef.robot
+Resource ../resources/portal_interface.robot
+Library SeleniumLibrary
Suite Setup Generate Random User Name
+Suite Teardown Close All Browsers
*** Test Cases ***
Login into Portal URL
[TAGS] portal
- Close All Browsers
- Portal admin Login To Portal GUI
+ Portal admin Login To Portal GUI
Portal Change REST URL Of X-DemoApp
[TAGS] portal
[TAGS] portal
[Documentation] ONAP Portal R1 functionality for AAF test
Portal AAF new fields
-
-#Create Microse service onboarding
-# [TAGS] portal
-# Portal admin Microservice Onboarding
EP Admin widget layout reset
[TAGS] portal
Edit Functional Menu
[TAGS] portal
Portal admin Edit Functional menu
-
-#Broadbond Notification functionality
-# [TAGS] portal
-# ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications
-# set global variable ${AdminBroadCastMsg}
-
-#Category Notification functionality
-# [TAGS] portal
-# ${AdminCategoryMsg}= Portal Admin Category Notifications
-# set global variable ${AdminCategoryMsg}
-
+
Create a Test user for Application Admin -Test
[TAGS] portal
Portal admin Add Application admin User New user -Test
[TAGS] portal
Portal admin Delete Application Admin Existing User
-#Add Standard User Role for Existing user
-# [TAGS] portal
-# Portal admin Add Standard User Existing user
-
-#Edit Standard User Role for Existing user
-# [TAGS] portal
-# Portal admin Edit Standard User Existing user
-
-#Delete Standard User Role for Existing user
-# [TAGS] portal
-# Portal admin Delete Standard User Existing user
-
Logout from Portal GUI as Portal Admin
[TAGS] portal
Portal admin Logout from Portal GUI
Login To Portal GUI as APP Admin
[TAGS] portal
- Application admin Login To Portal GUI
-
-#Add Standard User Role for Existing user as APP Admin
-# [TAGS] portal
-# Application admin Add Standard User Existing user
-
-#Edit Standard User Role for Existing user as APP Admin
-# [TAGS] portal
-# Application admin Edit Standard User Existing user
-
-#Delete Standard User Role for Existing user as APP Admin
-# [TAGS] portal
-# Application admin Delete Standard User Existing user
+ Application admin Login To Portal GUI
Logout from Portal GUI as APP Admin
[TAGS] portal
#Standard User Test cases
-Login To Portal GUI as Standared User
- [TAGS] portal
- Standared user Login To Portal GUI
-
Logout from Portal GUI as Standared User
[TAGS] portal
Standared User Logout from Portal GUI
Close All Browsers
-
${values}= Create Dictionary
${keys}= Get Dictionary Keys ${oam_ip_map}
- :for ${oam_ip} in @{keys}
+ :FOR ${oam_ip} IN @{keys}
\ ${value_name}= Get From Dictionary ${oam_ip_map} ${oam_ip}
\ Set Public Ip ${server_map} ${oam_ip} ${value_name} ${values}
Log ${values}
Get Public Ip
[Arguments] ${server_map} ${oam_ip}
${servers} Get Dictionary Values ${server_map}
- :for ${server} in @{servers}
+ :FOR ${server} IN @{servers}
\ ${status} ${public_ip} Run Keyword And Ignore Error Search Addresses ${server} ${oam_ip}
\ Return From Keyword If '${status}'=='PASS' ${public_ip}
Fail ${oam_ip} Server Not Found
Get V4 IP
[Arguments] ${ipmaps}
- :for ${ipmap} in @{ipmaps}
+ :FOR ${ipmap} IN @{ipmaps}
\ ${ip} Get From Dictionary ${ipmap} addr
\ ${version} Get From Dictionary ${ipmap} version
\ Return from Keyword if '${version}' == '4' ${ip}
Get V4 IP Openstack
[Arguments] ${addresses} ${testtype}
${ipmaps}= Get From Dictionary ${addresses} ${testtype}
- :for ${ipmap} in @{ipmaps}
+ :FOR ${ipmap} IN @{ipmaps}
\ ${ip} Get From Dictionary ${ipmap} addr
\ ${version} Get From Dictionary ${ipmap} version
\ Return from Keyword if '${version}'=='4' ${ip}
Get V4 IP Openstack 2
[Arguments] ${ipmaps} ${testtype}
- :for ${ipmap} in @{ipmaps}
+ :FOR ${ipmap} IN @{ipmaps}
\ ${type} Get From Dictionary ${ipmap} OS-EXT-IPS:type
\ ${ip} Get From Dictionary ${ipmap} addr
\ ${version} Get From Dictionary ${ipmap} version
--no-cache-dir \
--exists-action s \
--target="$path/robot/library" \
-'selenium<=3.0.0' \
-'robotframework-selenium2library==1.8.0' \
+'robotframework-seleniumlibrary==3.3.1' \
'robotframework-databaselibrary==0.8.1' \
-'robotframework-extendedselenium2library==0.9.1' \
+'robotframework-angularjs==0.0.9' \
'robotframework-requests==0.5.0' \
-'robotframework-sshlibrary==2.1.2' \
-'robotframework-sudslibrary==0.8' \
+'robotframework-sshlibrary==3.3.0' \
'robotframework-ftplibrary==1.3' \
'robotframework-rammbock==0.4.0.1' \
'robotframework-httplibrary==0.4.2' \
-'robotframework-archivelibrary==0.3.2' \
+'robotframework-archivelibrary==0.4' \
'robotframework-kafkalibrary==0.0.2'
--target="$path/robot/library" \
./heatbridge
-
-# NOTE: Patch to incude explicit install of paramiko to 2.0.2 to work with sshlibrary 2.1.2
-# This should be removed on new release of paramiko (2.1.2) or sshlibrary
-# https://github.com/robotframework/SSHLibrary/issues/157
-pip install \
---no-cache-dir \
---target="$path/robot/library" \
--U 'paramiko==2.0.2'
-
-
# Go back to execution folder
cd $path