summaryrefslogtreecommitdiffstats
path: root/robot/resources/vid
diff options
context:
space:
mode:
Diffstat (limited to 'robot/resources/vid')
-rw-r--r--robot/resources/vid/create_service_instance.robot43
1 files changed, 43 insertions, 0 deletions
diff --git a/robot/resources/vid/create_service_instance.robot b/robot/resources/vid/create_service_instance.robot
index 46a142b7..6bb19f49 100644
--- a/robot/resources/vid/create_service_instance.robot
+++ b/robot/resources/vid/create_service_instance.robot
@@ -40,6 +40,49 @@ Create VID Service Instance
SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth}
[return] ${service_instance_id}
+Create VID PNF Service Instance
+ [Documentation] Creates a PNF/macro service instance using VID
+ [Arguments] ${customer_name} ${service_model_type} ${service_type} ${service_name} ${project_name} ${owning_entity} ${product_family} ${lcp_region} ${tenant} ${pnf_correlation_id}
+ Wait Until Keyword Succeeds 180s 15s Wait For Model ${service_model_type}
+ Press Key xpath=//tr[td/span/text() = '${service_model_type}']/td/button[text() = 'Deploy' and not(@disabled)] \\13
+ ${uuid}= Generate UUID4
+ Wait Until Page Contains Element xpath=//input[@parameter-name='PNF (Correlation) ID'] ${GLOBAL_VID_UI_TIMEOUT_LONG}
+ Wait Until Element Is Visible xpath=//input[@parameter-name='PNF (Correlation) ID'] ${GLOBAL_VID_UI_TIMEOUT_LONG}
+ Click On Element When Visible //select[@prompt='Select Subscriber Name']
+ Select From List When Enabled //select[@prompt='Select Subscriber Name'] ${customer_name} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
+ Wait Until Keyword Succeeds 10s 5s Select From List By Label xpath=//select[@parameter-id='productFamily'] ${product_family}
+ Wait Until Keyword Succeeds 10s 5s Select From List When Enabled //select[@parameter-id='serviceType'] ${service_type} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
+ ${cloud_owner_uc}= Convert To Uppercase ${GLOBAL_AAI_CLOUD_OWNER}
+ Wait Until Keyword Succeeds 10s 5s Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region} (${cloud_owner_uc})
+ Wait Until Keyword Succeeds 10s 5s Select From List By Label xpath=//select[@parameter-id='tenant'] ${tenant}
+ Wait Until Keyword Succeeds 10s 5s Select From List When Enabled //select[@prompt='Select Project Name'] ${project_name} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
+ Wait Until Keyword Succeeds 10s 5s Select From List By Label xpath=//select[@parameter-id='owningEntity'] ${owning_entity}
+ Capture Page Screenshot
+ Page Should Contain Element //input[@parameter-name='PNF (Correlation) ID'] limit=1
+ Set Focus To Element //input[@parameter-name='PNF (Correlation) ID']
+ Wait Until Keyword Succeeds 120s 5s Input Text When Enabled //input[@parameter-name='PNF (Correlation) ID'] ${pnf_correlation_id} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
+ Capture Page Screenshot
+ Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Confirm']
+ Capture Page Screenshot
+ Wait Until Element Contains xpath=//pre[@class= 'log ng-binding'] requestState timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
+ Capture Page Screenshot
+ Wait Until Page Contains "requestState": "IN_PROGRESS" timeout= ${GLOBAL_VID_UI_TIMEOUT_LONG}
+ Capture Page Screenshot
+ ${response text}= Get Text xpath=//pre[@class = 'log ng-binding']
+ Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Close']
+ Sleep 10
+ Capture Page Screenshot
+ ${request_id}= Parse Request Id ${response text}
+ ${service_instance_id}= Parse Instance Id ${response text}
+ ${auth}= Create List ${GLOBAL_SO_USERNAME} ${GLOBAL_SO_PASSWORD}
+ ${so_status_request}= SO.Run Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth}
+ ${so_status_request_data}= Set Variable ${so_status_request.json()}
+ Log ${so_status_request_data}
+ ${so_status}= Set Variable ${so_status_request_data['request']['requestStatus']['requestState']}
+ Should Be Equal As Strings ${so_status} IN_PROGRESS
+ [return] ${service_instance_id} ${GLOBAL_SO_STATUS_PATH}${request_id}
+
+
Wait For Model
[Documentation] Distributed model may not yet be available. Kepp trying until it shows up.
[Arguments] ${service_model_type}