2 Documentation Creates VID Service Instance
4 ... Creates VID Service Instance
6 Library ExtendedSelenium2Library
11 Resource ../mso_interface.robot
12 Resource vid_interface.robot
15 Create VID Service Instance
16 [Documentation] Creates a service instance using VID
17 [Arguments] ${customer_name} ${service_model_type} ${service_type} ${service_name} ${project_name} ${owning_entity}
18 Go To VID Browse Service Models
19 Wait Until Keyword Succeeds 180s 5s Wait For Model ${service_model_type}
20 Press Key xpath=//tr[td/span/text() = '${service_model_type}']/td/button[text() = 'Deploy' and not(@disabled)] \\13
21 ${uuid}= Generate UUID
22 Wait Until Page Contains Element xpath=//input[@parameter-name='Instance Name'] ${GLOBAL_VID_UI_TIMEOUT_LONG}
23 Wait Until Element Is Visible xpath=//input[@parameter-name='Instance Name'] ${GLOBAL_VID_UI_TIMEOUT_LONG}
24 Select From List When Enabled //select[@prompt='Select Subscriber Name'] ${customer_name} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
25 Select From List When Enabled //select[@prompt='Select Service Type'] ${service_type} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
26 Select From List When Enabled //select[@prompt='Select Project Name'] ${project_name} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
27 Select From List When Enabled //select[@prompt='Select Owning Entity'] ${owning_entity} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
28 Capture Page Screenshot
29 Xpath Should Match X Times //input[@parameter-name='Instance Name'] 1
30 Wait Until Keyword Succeeds 120s 5s Input Text When Enabled //input[@parameter-name='Instance Name'] ${service_name} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
31 Capture Page Screenshot
32 Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Confirm']
33 Wait Until Element Contains xpath=//pre[@class= 'log ng-binding'] requestState timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
34 Wait Until Page Contains "requestState": "COMPLETE" timeout= ${GLOBAL_VID_UI_TIMEOUT_LONG}
35 ${response text}= Get Text xpath=//pre[@class = 'log ng-binding']
36 Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Close']
37 ${request_id}= Parse Request Id ${response text}
38 ${service_instance_id}= Parse Instance Id ${response text}
39 Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
40 [return] ${service_instance_id}
43 [Documentation] Distributed model may not yet be available. Kepp trying until it shows up.
44 [Arguments] ${service_model_type}
45 Page Should Contain Element xpath=//div/h1[text() = 'Browse SDC Service Models']
46 Wait Until Page Contains Element xpath=//button[text() = 'Deploy'] ${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
47 Input Text When Enabled //input[@ng-model='searchString'] ${service_model_type}
48 Wait Until Element Is Visible xpath=//tr[td/span/text() = '${service_model_type}']/td/button[contains(text(),'Deploy')] ${GLOBAL_VID_UI_TIMEOUT_SHORT}
50 Delete Service Instance By GUI
51 [Arguments] ${service_instance_id} ${customer_name}
52 Click On Element When Visible xpath=//a/span[@class='glyphicon glyphicon-remove']
53 Click On Button When Enabled xpath=//div[@class='buttonRow']/button[@ngx-enabled='true']
54 Wait Until Element Contains xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
55 ${response text}= Get Text xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding']
56 ${request_id}= Parse Request Id ${response text}
57 Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
60 Search Service Instance
61 [Arguments] ${service_instance_id} ${customer_name}
62 Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a
63 Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id}
64 Click On Button When Enabled //button[text() = 'Submit']