DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation The main interface for interacting with SDN-GC. It handles low level stuff like managing the http request library and SDN-GC required fields |
| 3 | Library RequestsLibrary |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 4 | Library ONAPLibrary.Utilities |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 5 | Library SeleniumLibrary |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 6 | Library Collections |
| 7 | Library String |
DR695H | fcb0ee8 | 2019-05-22 17:21:38 -0400 | [diff] [blame] | 8 | Library ONAPLibrary.ServiceMapping |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 9 | Library ONAPLibrary.Templating |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 10 | Resource global_properties.robot |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 11 | Resource browser_setup.robot |
| 12 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 13 | |
| 14 | *** Variables *** |
| 15 | ${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} /operations/VNF-API:preload-vnf-topology-operation |
| 16 | ${PRELOAD_VNF_CONFIG_PATH} /config/VNF-API:preload-vnfs/vnf-preload-list |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 17 | ${PRELOAD_VNF_TOPOLOGY_OPERATION_BODY} sdnc |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 18 | ${SDNGC_INDEX_PATH} /restconf |
| 19 | ${SDNCGC_HEALTHCHECK_OPERATION_PATH} /operations/SLI-API:healthcheck |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 20 | ${SDNGC_REST_ENDPOINT} ${GLOBAL_SDNGC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDNC_IP_ADDR}:${GLOBAL_SDNGC_REST_PORT} |
Gary Wu | 251aa68 | 2018-07-30 15:22:20 -0700 | [diff] [blame] | 21 | ${SDNGC_ADMIN_ENDPOINT} ${GLOBAL_SDNGC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDNC_PORTAL_IP_ADDR}:${GLOBAL_SDNGC_ADMIN_PORT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 22 | ${SDNGC_ADMIN_SIGNUP_URL} ${SDNGC_ADMIN_ENDPOINT}/signup |
| 23 | ${SDNGC_ADMIN_LOGIN_URL} ${SDNGC_ADMIN_ENDPOINT}/login |
| 24 | ${SDNGC_ADMIN_VNF_PROFILE_URL} ${SDNGC_ADMIN_ENDPOINT}/mobility/getVnfProfile |
| 25 | |
| 26 | *** Keywords *** |
| 27 | Run SDNGC Health Check |
| 28 | [Documentation] Runs an SDNGC healthcheck |
| 29 | ${resp}= Run SDNGC Post Request ${SDNGC_INDEX PATH}${SDNCGC_HEALTHCHECK_OPERATION_PATH} ${None} |
| 30 | Should Be Equal As Strings ${resp.status_code} 200 |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 31 | Should Be Equal As Strings ${resp.json()['output']['response-code']} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 32 | |
| 33 | Run SDNGC Get Request |
| 34 | [Documentation] Runs an SDNGC get request |
| 35 | [Arguments] ${data_path} |
| 36 | ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD} |
| 37 | Log Creating session ${SDNGC_REST_ENDPOINT} |
| 38 | ${session}= Create Session sdngc ${SDNGC_REST_ENDPOINT} auth=${auth} |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 39 | ${uuid}= Generate UUID4 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 40 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 41 | ${resp}= Get Request sdngc ${data_path} headers=${headers} |
| 42 | Log Received response from sdngc ${resp.text} |
| 43 | [Return] ${resp} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 44 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 45 | Run SDNGC Put Request |
| 46 | [Documentation] Runs an SDNGC put request |
| 47 | [Arguments] ${data_path} ${data} |
| 48 | ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD} |
| 49 | Log Creating session ${SDNGC_REST_ENDPOINT} |
| 50 | ${session}= Create Session sdngc ${SDNGC_REST_ENDPOINT} auth=${auth} |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 51 | ${uuid}= Generate UUID4 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 52 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 53 | ${resp}= Put Request sdngc ${data_path} data=${data} headers=${headers} |
| 54 | Log Received response from sdngc ${resp.text} |
| 55 | [Return] ${resp} |
| 56 | |
| 57 | Run SDNGC Post Request |
| 58 | [Documentation] Runs an SDNGC post request |
| 59 | [Arguments] ${data_path} ${data} |
| 60 | ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD} |
| 61 | Log Creating session ${SDNGC_REST_ENDPOINT} |
| 62 | ${session}= Create Session sdngc ${SDNGC_REST_ENDPOINT} auth=${auth} |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 63 | ${uuid}= Generate UUID4 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 64 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 65 | ${resp}= Post Request sdngc ${data_path} data=${data} headers=${headers} |
| 66 | Log Received response from sdngc ${resp.text} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 67 | [Return] ${resp} |
| 68 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 69 | Run SDNGC Delete Request |
| 70 | [Documentation] Runs an SDNGC delete request |
| 71 | [Arguments] ${data_path} |
| 72 | ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD} |
| 73 | Log Creating session ${SDNGC_REST_ENDPOINT} |
| 74 | ${session}= Create Session sdngc ${SDNGC_REST_ENDPOINT} auth=${auth} |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 75 | ${uuid}= Generate UUID4 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 76 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 77 | ${resp}= Delete Request sdngc ${data_path} headers=${headers} |
| 78 | Log Received response from sdngc ${resp.text} |
| 79 | [Return] ${resp} |
| 80 | |
| 81 | |
| 82 | Preload Vnf |
| 83 | [Arguments] ${service_type_uuid} ${generic_vnf_name} ${generic_vnf_type} ${vf_module_name} ${vf_modules} ${service} ${uuid} |
Jerry Flood | 3a169a3 | 2017-12-01 12:39:10 -0500 | [diff] [blame] | 84 | ${base_vf_module_type}= Catenate |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 85 | ${closedloop_vf_module}= Create Dictionary |
DR695H | fcb0ee8 | 2019-05-22 17:21:38 -0400 | [diff] [blame] | 86 | Set Directory default ./demo/service_mapping |
| 87 | ${templates}= Get Service Template Mapping default ${service} ${generic_vnf_type} |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 88 | :FOR ${vf_module} IN @{vf_modules} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 89 | \ ${vf_module_type}= Get From Dictionary ${vf_module} name |
Brian Freeman | 12ff184 | 2019-02-13 13:54:48 -0500 | [diff] [blame] | 90 | # need to pass in vnf_index if non-zero |
| 91 | \ ${dict} Run Keyword If "${generic_vnf_name}".endswith('0') Get From Mapping With Index ${templates} ${vf_module} 0 |
| 92 | \ ... ELSE IF "${generic_vnf_name}".endswith('1') Get From Mapping With Index ${templates} ${vf_module} 1 |
| 93 | \ ... ELSE IF "${generic_vnf_name}".endswith('2') Get From Mapping With Index ${templates} ${vf_module} 2 |
| 94 | \ ... ELSE Get From Mapping ${templates} ${vf_module} |
Brian Freeman | ea834f7 | 2019-04-22 14:34:02 -0500 | [diff] [blame] | 95 | # skip this iteration if no template |
| 96 | \ ${test_dict_length} = Get Length ${dict} |
| 97 | \ Continue For Loop If ${test_dict_length} == 0 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 98 | \ ${filename}= Get From Dictionary ${dict} template |
| 99 | \ ${base_vf_module_type}= Set Variable If '${dict['isBase']}' == 'true' ${vf_module_type} ${base_vf_module_type} |
| 100 | \ ${closedloop_vf_module}= Set Variable If '${dict['isBase']}' == 'false' ${vf_module} ${closedloop_vf_module} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 101 | \ ${vf_name}= Update Module Name ${dict} ${vf_module_name} |
Brian Freeman | f38a834 | 2019-04-18 10:50:19 -0500 | [diff] [blame] | 102 | # Admin portal update no longer |
| 103 | #\ Preload Vnf Profile ${vf_module_type} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 104 | \ Preload One Vnf Topology ${service_type_uuid} ${generic_vnf_name} ${generic_vnf_type} ${vf_name} ${vf_module_type} ${service} ${filename} ${uuid} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 105 | [Return] ${base_vf_module_type} ${closedloop_vf_module} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 106 | |
| 107 | |
| 108 | Update Module Name |
| 109 | [Arguments] ${dict} ${vf_module_name} |
| 110 | Return From Keyword If 'prefix' not in ${dict} ${vf_module_name} |
| 111 | Return From Keyword If '${dict['prefix']}' == '' ${vf_module_name} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 112 | ${name}= Replace String ${vf_module_name} Vfmodule_ ${dict['prefix']} |
| 113 | [Return] ${name} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 114 | |
Brian Freeman | 12ff184 | 2019-02-13 13:54:48 -0500 | [diff] [blame] | 115 | Get From Mapping With Index |
| 116 | [Documentation] Retrieve the appropriate prelad template entry for the passed vf_module |
| 117 | [Arguments] ${templates} ${vf_module} ${vnf_index}=0 |
| 118 | ${vf_module_name}= Get From DIctionary ${vf_module} name |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 119 | :FOR ${template} IN @{templates} |
Brian Freeman | 12ff184 | 2019-02-13 13:54:48 -0500 | [diff] [blame] | 120 | \ Return From Keyword If '${template['name_pattern']}' in '${vf_module_name}' and ('${template['vnf_index']}' == '${vnf_index}') ${template} |
Brian Freeman | 37daa80 | 2019-04-26 12:06:11 -0500 | [diff] [blame] | 121 | ${result}= Create Dictionary |
| 122 | [Return] ${result} |
Brian Freeman | 12ff184 | 2019-02-13 13:54:48 -0500 | [diff] [blame] | 123 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 124 | Get From Mapping |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 125 | [Documentation] Retrieve the appropriate prelad template entry for the passed vf_module |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 126 | [Arguments] ${templates} ${vf_module} |
| 127 | ${vf_module_name}= Get From DIctionary ${vf_module} name |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 128 | :FOR ${template} IN @{templates} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 129 | \ Return From Keyword If '${template['name_pattern']}' in '${vf_module_name}' ${template} |
Brian Freeman | 37daa80 | 2019-04-26 12:06:11 -0500 | [diff] [blame] | 130 | ${result}= Create Dictionary |
| 131 | [Return] ${result} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 132 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 133 | Preload One Vnf Topology |
| 134 | [Arguments] ${service_type_uuid} ${generic_vnf_name} ${generic_vnf_type} ${vf_module_name} ${vf_module_type} ${service} ${filename} ${uuid} |
| 135 | Return From Keyword If '${filename}' == '' |
Bin Yang | 326219a | 2018-05-31 05:35:33 +0000 | [diff] [blame] | 136 | ${parameters}= Get Template Parameters ${generic_vnf_name} ${filename} ${uuid} |
Jerry Flood | 81d33fb | 2017-11-21 16:21:21 -0500 | [diff] [blame] | 137 | 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} |
DR695H | 3bb6cf4 | 2019-06-20 15:04:04 -0400 | [diff] [blame] | 138 | Create Environment sdnc ${GLOBAL_TEMPLATE_FOLDER} |
| 139 | ${data}= Apply Template sdnc ${PRELOAD_VNF_TOPOLOGY_OPERATION_BODY}/preload.jinja ${parameters} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 140 | ${put_resp}= Run SDNGC Post Request ${SDNGC_INDEX_PATH}${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} ${data} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 141 | Should Be Equal As Strings ${put_resp.json()['output']['response-code']} 200 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 142 | ${get_resp}= Run SDNGC Get Request ${SDNGC_INDEX_PATH}${PRELOAD_VNF_CONFIG_PATH}/${vf_module_name}/${vf_module_type} |
| 143 | Should Be Equal As Strings ${get_resp.status_code} 200 |
| 144 | |
| 145 | Get Template Parameters |
Bin Yang | 326219a | 2018-05-31 05:35:33 +0000 | [diff] [blame] | 146 | [Arguments] ${generic_vnf_name} ${template} ${uuid} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 147 | ${rest} ${suite}= Split String From Right ${SUITE NAME} . 1 |
| 148 | ${uuid}= Catenate ${uuid} |
| 149 | ${hostid}= Get Substring ${uuid} -4 |
Jerry Flood | 81d33fb | 2017-11-21 16:21:21 -0500 | [diff] [blame] | 150 | ${ecompnet}= Evaluate (${GLOBAL_BUILD_NUMBER}%128)+128 |
| 151 | |
| 152 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 153 | # Initialize the value map with the properties generated from the Robot VM /opt/config folder |
Jerry Flood | 81d33fb | 2017-11-21 16:21:21 -0500 | [diff] [blame] | 154 | ${valuemap}= Copy Dictionary ${GLOBAL_INJECTED_PROPERTIES} |
| 155 | |
| 156 | # These should be deprecated by the above.... |
Jerry Flood | 028e185 | 2017-03-16 16:44:17 -0400 | [diff] [blame] | 157 | Set To Dictionary ${valuemap} artifacts_version=${GLOBAL_INJECTED_ARTIFACTS_VERSION} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 158 | Set To Dictionary ${valuemap} network=${GLOBAL_INJECTED_NETWORK} |
Jerry Flood | d750315 | 2017-10-09 16:33:00 -0400 | [diff] [blame] | 159 | Set To Dictionary ${valuemap} public_net_id=${GLOBAL_INJECTED_PUBLIC_NET_ID} |
| 160 | Set To Dictionary ${valuemap} cloud_env=${GLOBAL_INJECTED_CLOUD_ENV} |
Jerry Flood | 81d33fb | 2017-11-21 16:21:21 -0500 | [diff] [blame] | 161 | Set To Dictionary ${valuemap} install_script_version=${GLOBAL_INJECTED_SCRIPT_VERSION} |
Jerry Flood | d750315 | 2017-10-09 16:33:00 -0400 | [diff] [blame] | 162 | Set To Dictionary ${valuemap} vm_image_name=${GLOBAL_INJECTED_VM_IMAGE_NAME} |
Jerry Flood | 81d33fb | 2017-11-21 16:21:21 -0500 | [diff] [blame] | 163 | Set To Dictionary ${valuemap} vm_flavor_name=${GLOBAL_INJECTED_VM_FLAVOR} |
| 164 | |
| 165 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 166 | # update the value map with unique values. |
Bin Yang | 326219a | 2018-05-31 05:35:33 +0000 | [diff] [blame] | 167 | Set To Dictionary ${valuemap} uuid=${uuid} hostid=${hostid} ecompnet=${ecompnet} generic_vnf_name=${generic_vnf_name} |
Jerry Flood | 81d33fb | 2017-11-21 16:21:21 -0500 | [diff] [blame] | 168 | |
| 169 | # |
| 170 | # Mash together the defaults dict with the test case dict to create the set of |
| 171 | # preload parameters |
| 172 | # |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 173 | ${suite_templates}= Get From Dictionary ${GLOBAL_PRELOAD_PARAMETERS} ${suite} |
| 174 | ${template}= Get From Dictionary ${suite_templates} ${template} |
Jerry Flood | 81d33fb | 2017-11-21 16:21:21 -0500 | [diff] [blame] | 175 | ${defaults}= Get From Dictionary ${GLOBAL_PRELOAD_PARAMETERS} defaults |
| 176 | # add all of the defaults to template... |
| 177 | @{keys}= Get Dictionary Keys ${defaults} |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 178 | :FOR ${key} IN @{keys} |
Jerry Flood | 81d33fb | 2017-11-21 16:21:21 -0500 | [diff] [blame] | 179 | \ ${value}= Get From Dictionary ${defaults} ${key} |
| 180 | \ Set To Dictionary ${template} ${key} ${value} |
| 181 | |
| 182 | # |
| 183 | # Get the vnf_parameters to preload |
| 184 | # |
| 185 | ${vnf_parameters}= Resolve VNF Parameters Into Array ${valuemap} ${template} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 186 | ${vnf_parameters_json}= Evaluate json.dumps(${vnf_parameters}) json |
Jerry Flood | 81d33fb | 2017-11-21 16:21:21 -0500 | [diff] [blame] | 187 | ${parameters}= Create Dictionary vnf_parameters=${vnf_parameters_json} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 188 | [Return] ${parameters} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 189 | |
| 190 | Resolve Values Into Dictionary |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 191 | [Arguments] ${valuemap} ${from} ${to} |
| 192 | ${keys}= Get Dictionary Keys ${from} |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 193 | :FOR ${key} IN @{keys} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 194 | \ ${value}= Get From Dictionary ${from} ${key} |
| 195 | \ ${value}= Template String ${value} ${valuemap} |
| 196 | \ Set To Dictionary ${to} ${key} ${value} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 197 | |
| 198 | Resolve VNF Parameters Into Array |
Jerry Flood | 81d33fb | 2017-11-21 16:21:21 -0500 | [diff] [blame] | 199 | [Arguments] ${valuemap} ${from} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 200 | ${vnf_parameters}= Create List |
| 201 | ${keys}= Get Dictionary Keys ${from} |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 202 | :FOR ${key} IN @{keys} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 203 | \ ${value}= Get From Dictionary ${from} ${key} |
| 204 | \ ${value}= Template String ${value} ${valuemap} |
| 205 | \ ${parameter}= Create Dictionary vnf-parameter-name=${key} vnf-parameter-value=${value} |
| 206 | \ Append To List ${vnf_parameters} ${parameter} |
| 207 | [Return] ${vnf_parameters} |
| 208 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 209 | Preload Vnf Profile |
| 210 | [Arguments] ${vnf_name} |
| 211 | Login To SDNGC Admin GUI |
| 212 | Go To ${SDNGC_ADMIN_VNF_PROFILE_URL} |
| 213 | Click Button xpath=//button[@data-target='#add_vnf_profile'] |
| 214 | Input Text xpath=//input[@id='nf_vnf_type'] ${vnf_name} |
| 215 | Input Text xpath=//input[@id='nf_availability_zone_count'] 999 |
| 216 | Input Text xpath=//input[@id='nf_equipment_role'] robot-ete-test |
| 217 | Click Button xpath=//button[contains(.,'Submit')] |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 218 | Page Should Contain VNF Profile |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 219 | Input Text xpath=//div[@id='vnf_profile_filter']//input ${vnf_name} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 220 | Page Should Contain ${vnf_name} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 221 | |
| 222 | Delete Vnf Profile |
| 223 | [Arguments] ${vnf_name} |
| 224 | Login To SDNGC Admin GUI |
| 225 | Go To ${SDNGC_ADMIN_VNF_PROFILE_URL} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 226 | Page Should Contain VNF Profile |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 227 | Input Text xpath=//div[@id='vnf_profile_filter']//input ${vnf_name} |
| 228 | Page Should Contain ${vnf_name} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 229 | Click Button xpath=//button[contains(@onclick, '${vnf_name}')] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 230 | Page Should Contain Are you sure you want to delete VNF_PROFILE |
| 231 | Click Button xpath=//button[contains(text(), 'Yes')] |
| 232 | Page Should Not Contain ${vnf_name} |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 233 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 234 | Login To SDNGC Admin GUI |
| 235 | [Documentation] Login To SDNGC Admin GUI |
Jerry Flood | d40619e | 2017-08-24 09:38:48 -0400 | [diff] [blame] | 236 | ## Setup Browser is now being managed by the test case |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 237 | ## Setup Browser |
| 238 | Go To ${SDNGC_ADMIN_SIGNUP_URL} |
Jerry Flood | 81d33fb | 2017-11-21 16:21:21 -0500 | [diff] [blame] | 239 | ##Maximize Browser Window |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 240 | Set Selenium Speed ${GLOBAL_SELENIUM_DELAY} |
| 241 | Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} |
| 242 | Log Logging in to ${SDNGC_ADMIN_LOGIN_URL} |
| 243 | Handle Proxy Warning |
| 244 | Title Should Be AdminPortal |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 245 | ${uuid}= Generate UUID4 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 246 | ${shortened_uuid}= Evaluate str("${uuid}")[:12] |
| 247 | ${email}= Catenate ${shortened_uuid}@robotete.com |
| 248 | Input Text xpath=//input[@id='nf_email'] ${email} |
| 249 | Input Password xpath=//input[@id='nf_password'] ${shortened_uuid} |
| 250 | Click Button xpath=//button[@type='submit'] |
| 251 | Wait Until Page Contains User created 20s |
| 252 | Go To ${SDNGC_ADMIN_LOGIN_URL} |
| 253 | Input Text xpath=//input[@id='email'] ${email} |
| 254 | Input Password xpath=//input[@id='password'] ${shortened_uuid} |
| 255 | Click Button xpath=//button[@type='submit'] |
| 256 | Title Should Be SDN-C AdminPortal |
Brian Freeman | 12ff184 | 2019-02-13 13:54:48 -0500 | [diff] [blame] | 257 | Log Logged in to ${SDNGC_ADMIN_LOGIN_URL} |