blob: 70727d95516fada1a19ef64c7544da34b1d48779 [file] [log] [blame]
DR695Hccff30b2017-02-17 18:44:24 -05001*** Settings ***
2Documentation The main interface for interacting with ASDC. It handles low level stuff like managing the http request library and DCAE required fields
3Library RequestsLibrary
Jerry Floode2a48d72017-06-21 15:06:29 -04004Library UUID
5Library JSONUtils
DR695Hccff30b2017-02-17 18:44:24 -05006Library OperatingSystem
7Library Collections
8Library ExtendedSelenium2Library
9Resource global_properties.robot
10Resource browser_setup.robot
11Resource json_templater.robot
12*** Variables ***
13${ASDC_DESIGNER_USER_ID} cs0008
14${ASDC_TESTER_USER_ID} jm0007
15${ASDC_GOVERNOR_USER_ID} gv0001
16${ASDC_OPS_USER_ID} op0001
17${ASDC_HEALTH_CHECK_PATH} /sdc1/rest/healthCheck
18${ASDC_VENDOR_LICENSE_MODEL_PATH} /onboarding-api/v1.0/vendor-license-models
19${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} /onboarding-api/v1.0/vendor-software-products
20${ASDC_VENDOR_KEY_GROUP_PATH} /license-key-groups
21${ASDC_VENDOR_ENTITLEMENT_POOL_PATH} /entitlement-pools
22${ASDC_VENDOR_FEATURE_GROUP_PATH} /feature-groups
23${ASDC_VENDOR_LICENSE_AGREEMENT_PATH} /license-agreements
24${ASDC_VENDOR_ACTIONS_PATH} /actions
Jerry Floode2a48d72017-06-21 15:06:29 -040025${ASDC_VENDOR_SOFTWARE_UPLOAD_PATH} /orchestration-template-candidate
Yang Xu2ec80382018-11-01 12:30:37 -040026${ASDC_FE_CATALOG_RESOURCES_PATH} /sdc1/feProxy/rest/v1/catalog/resources
Brian Freemaneef7c6f2018-11-16 18:42:21 -050027${ASDC_FE_CATALOG_SERVICES_PATH} /sdc1/feProxy/rest/v1/catalog/services
DR695Hccff30b2017-02-17 18:44:24 -050028${ASDC_CATALOG_RESOURCES_PATH} /sdc2/rest/v1/catalog/resources
29${ASDC_CATALOG_SERVICES_PATH} /sdc2/rest/v1/catalog/services
30${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} /sdc2/rest/v1/inactiveComponents/resource
Brian Freemaneef7c6f2018-11-16 18:42:21 -050031${ASDC_CATALOG_RESOURCES_QUERY_PATH} /sdc2/rest/v1/catalog/resources/resourceName
DR695Hccff30b2017-02-17 18:44:24 -050032${ASDC_CATALOG_INACTIVE_SERVICES_PATH} /sdc2/rest/v1/inactiveComponents/service
33${ASDC_CATALOG_LIFECYCLE_PATH} /lifecycleState
34${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} /resourceInstance
35${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH} /distribution-state
36${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH} /distribution
37${ASDC_DISTRIBUTION_STATE_APPROVE_PATH} /approve
38${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} /distribution/PROD/activate
39${ASDC_LICENSE_MODEL_TEMPLATE} robot/assets/templates/asdc/license_model.template
40${ASDC_KEY_GROUP_TEMPLATE} robot/assets/templates/asdc/key_group.template
41${ASDC_ENTITLEMENT_POOL_TEMPLATE} robot/assets/templates/asdc/entitlement_pool.template
42${ASDC_FEATURE_GROUP_TEMPLATE} robot/assets/templates/asdc/feature_group.template
43${ASDC_LICENSE_AGREEMENT_TEMPLATE} robot/assets/templates/asdc/license_agreement.template
44${ASDC_ACTION_TEMPLATE} robot/assets/templates/asdc/action.template
45${ASDC_SOFTWARE_PRODUCT_TEMPLATE} robot/assets/templates/asdc/software_product.template
46${ASDC_CATALOG_RESOURCE_TEMPLATE} robot/assets/templates/asdc/catalog_resource.template
47${ASDC_USER_REMARKS_TEMPLATE} robot/assets/templates/asdc/user_remarks.template
48${ASDC_CATALOG_SERVICE_TEMPLATE} robot/assets/templates/asdc/catalog_service.template
49${ASDC_RESOURCE_INSTANCE_TEMPLATE} robot/assets/templates/asdc/resource_instance.template
Yang Xu2ec80382018-11-01 12:30:37 -040050${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} robot/assets/templates/asdc/catalog_vnf_properties.template
51${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} robot/assets/templates/asdc/catalog_vnf_inputs.template
Brian Freemaneef7c6f2018-11-16 18:42:21 -050052${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} robot/assets/templates/asdc/catalog_net_input_properties.template
Brian Freemanf508ab22018-03-15 21:19:41 -050053${ASDC_FE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_FE_IP_ADDR}:${GLOBAL_ASDC_FE_PORT}
54${ASDC_BE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_IP_ADDR}:${GLOBAL_ASDC_BE_PORT}
Brian Freeman44b8bb32018-05-03 21:08:42 -050055${ASDC_BE_ONBOARD_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_ONBOARD_IP_ADDR}:${GLOBAL_ASDC_BE_ONBOARD_PORT}
DR695Hbf5a3a32017-06-30 13:09:57 -040056
DR695Hccff30b2017-02-17 18:44:24 -050057*** Keywords ***
58Distribute Model From ASDC
59 [Documentation] goes end to end creating all the asdc objects based ona model and distributing it to the systems. it then returns the service name, vf name and vf module name
Brian Freemaneef7c6f2018-11-16 18:42:21 -050060 [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}= ${service}=
61 #${random}= Get Current Date
62 #${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name}_${random}
jf986075010a42017-02-22 16:52:54 -050063 ${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name}
DR695Hccff30b2017-02-17 18:44:24 -050064 ${catalog_resource_ids}= Create List
Jerry Flood3a169a32017-12-01 12:39:10 -050065 ${catalog_resources}= Create Dictionary
DR695Hccff30b2017-02-17 18:44:24 -050066 : FOR ${zip} IN @{model_zip_path}
Yang Xu2ec80382018-11-01 12:30:37 -040067 \ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip} ${cds}
Jerry Floode2a48d72017-06-21 15:06:29 -040068 \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
DR695Hccff30b2017-02-17 18:44:24 -050069 \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id}
70 \ Add ASDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']}
Jerry Flood3a169a32017-12-01 12:39:10 -050071 \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp}
Brian Freemaneef7c6f2018-11-16 18:42:21 -050072 #
73 # do this here because the loop_catalog_resource_resp is different format after adding networks
74 ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule
75 #
76 # do network
77 ${networklist}= Get From Dictionary ${GLOBAL_SERVICE_GEN_NEUTRON_NETWORK_MAPPING} ${service}
78 ${xoffset}= Set Variable ${100}
79 ${generic_neutron_net_uuid}= Get Generic NeutronNet UUID
80 :FOR ${network} in @{networklist}
81 \ ${loop_catalog_resource_id}= Set Variable ${generic_neutron_net_uuid}
82 \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
83 \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id}
84 #
85 \ ${loop_catalog_resource_id}= Add ASDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${network} ${xoffset} ${0}
86 \ ${nf_role}= Convert To Lowercase ${network}
87 \ Setup SDC Catalog Resource GenericNeutronNet Properties ${catalog_service_id} ${nf_role} ${loop_catalog_resource_id}
88 \ ${xoffset}= Set Variable ${xoffset+100}
89 \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp}
90 #
DR695Hccff30b2017-02-17 18:44:24 -050091 ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id}
92 Checkin ASDC Catalog Service ${catalog_service_id}
93 Request Certify ASDC Catalog Service ${catalog_service_id}
94 Start Certify ASDC Catalog Service ${catalog_service_id}
95 # on certify it gets a new id
96 ${catalog_service_id}= Certify ASDC Catalog Service ${catalog_service_id}
97 Approve ASDC Catalog Service ${catalog_service_id}
Brian Freeman796b9eb2018-10-08 08:23:20 -050098 : FOR ${DIST_INDEX} IN RANGE 1
Brian Freeman18df8912018-05-25 13:27:29 -050099 \ Log Distribution Attempt ${DIST_INDEX}
100 \ Distribute ASDC Catalog Service ${catalog_service_id}
101 \ ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id}
Brian Freemanf940ee92018-05-25 21:09:05 -0500102 \ ${status} ${_} = Run Keyword And Ignore Error Loop Over Check Catalog Service Distributed ${catalog_service_resp['uuid']}
103 \ Exit For Loop If '${status}'=='PASS'
Brian Freeman8c002d52018-07-30 19:35:36 -0500104 Should Be Equal As Strings ${status} PASS
Jerry Flood3a169a32017-12-01 12:39:10 -0500105 [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources}
Brian Freeman18df8912018-05-25 13:27:29 -0500106
bdfreeman14211ad11d92018-11-17 18:47:37 +0000107Download CSAR
108 [Documentation] Download CSAR
109 [Arguments] ${catalog_service_id} ${save_directory}=/tmp/csar
110 # get meta data
111 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/filteredDataByParams?include=toscaArtifacts ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ENDPOINT}
112 ${csar_resource_id}= Set Variable ${resp.json()['toscaArtifacts']['assettoscacsar']['uniqueId']}
113 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/artifacts/${csar_resource_id}
114 ${csar_file_name}= Set Variable ${resp.json()['artifactName']}
115 ${base64Obj}= Set Variable ${resp.json()['base64Contents']}
116 ${binObj}= Evaluate base64.b64decode("${base64Obj}") modules=base64
117 Create Binary File ${save_directory}/${csar_file_name} ${binObj}
118 Log To Console Downloaded:${csar_file_name}
119 [Return]
120
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500121
122Get Generic NeutronNet UUID
123 [Documentation] Lookoup the UUID of the Generic NeutronNetwork Resource
124 # http://137.117.87.170:30205/sdc2/rest/v1/catalog/resources/resourceName/Generic%20NeutronNet/resourceVersion/1.0
125 # 411edcfd-c290-41dc-bd2c-5600f9f0af05
126 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_RESOURCES_QUERY_PATH}/Generic%20NeutronNet/resourceVersion/1.0 ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ENDPOINT}
127 [Return] ${resp.json()['allVersions']['1.0']}
128
Brian Freeman18df8912018-05-25 13:27:29 -0500129Loop Over Check Catalog Service Distributed
Gary Wu58d58532018-07-27 16:02:51 -0700130 [Arguments] ${catalog_service_id}
Brian Freemanadaa2372018-10-24 12:25:22 -0500131 # SO watchdog timeout is 300 seconds need buffer
132 ${dist_status}= Set Variable FAIL
133 : FOR ${CHECK_INDEX} IN RANGE 20
134 \ ${status} ${_} = Run Keyword And Ignore Error Check Catalog Service Distributed ${catalog_service_id} ${dist_status}
Gary Wu58d58532018-07-27 16:02:51 -0700135 \ Sleep 20s
Brian Freemanf940ee92018-05-25 21:09:05 -0500136 \ Return From Keyword If '${status}'=='PASS'
Brian Freemanadaa2372018-10-24 12:25:22 -0500137 \ Exit For Loop If '${dist_status}'=='EXIT'
Brian Freeman8c002d52018-07-30 19:35:36 -0500138 Should Be Equal As Strings ${status} PASS
Brian Freeman18df8912018-05-25 13:27:29 -0500139
DR695Hccff30b2017-02-17 18:44:24 -0500140Setup ASDC Catalog Resource
141 [Documentation] Creates all the steps a vf needs for an asdc catalog resource and returns the id
Yang Xu2ec80382018-11-01 12:30:37 -0400142 [Arguments] ${model_zip_path} ${cds}=
Brian Freemanb568e5e2018-04-05 21:03:38 -0500143 ${license_model_id} ${license_model_version_id}= Add ASDC License Model
144 ${key_group_id}= Add ASDC License Group ${license_model_id} ${license_model_version_id}
145 ${pool_id}= Add ASDC Entitlement Pool ${license_model_id} ${license_model_version_id}
146 ${feature_group_id}= Add ASDC Feature Group ${license_model_id} ${key_group_id} ${pool_id} ${license_model_version_id}
147 ${license_agreement_id}= Add ASDC License Agreement ${license_model_id} ${feature_group_id} ${license_model_version_id}
148 Submit ASDC License Model ${license_model_id} ${license_model_version_id}
149 ${license_model_resp}= Get ASDC License Model ${license_model_id} ${license_model_version_id}
150 ${software_product_id} ${software_product_version_id}= Add ASDC Software Product ${license_agreement_id} ${feature_group_id} ${license_model_resp['vendorName']} ${license_model_id} ${license_model_version_id}
151 Upload ASDC Heat Package ${software_product_id} ${model_zip_path} ${software_product_version_id}
152 Validate ASDC Software Product ${software_product_id} ${software_product_version_id}
153 Submit ASDC Software Product ${software_product_id} ${software_product_version_id}
154 Package ASDC Software Product ${software_product_id} ${software_product_version_id}
155 ${software_product_resp}= Get ASDC Software Product ${software_product_id} ${software_product_version_id}
156 ${catalog_resource_id}= Add ASDC Catalog Resource ${license_agreement_id} ${software_product_resp['name']} ${license_model_resp['vendorName']} ${software_product_id}
Yang Xu2ec80382018-11-01 12:30:37 -0400157 # Check if need to set up CDS properties
158 Run Keyword If '${cds}' == 'vfwng' Setup ASDC Catalog Resource CDS Properties ${catalog_resource_id}
159
Brian Freeman391680a2018-08-11 15:20:58 -0500160 ${catalog_resource_id}= Certify ASDC Catalog Resource ${catalog_resource_id} ${ASDC_DESIGNER_USER_ID}
DR695Hccff30b2017-02-17 18:44:24 -0500161 [Return] ${catalog_resource_id}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500162
163Setup SDC Catalog Resource GenericNeutronNet Properties
164 [Documentation] Set up GenericNeutronNet properties and inputs
165 [Arguments] ${catalog_service_id} ${nf_role} ${catalog_parent_service_id}
166 # Set component instances properties
167 ${resp}= Get ASDC Catalog Resource Component Instances Properties ${catalog_service_id}
168 #${resp}= Get ASDC Catalog Resource Component Instances ${catalog_service_id}
169 ${componentInstances} Set Variable @{resp['componentInstancesProperties']}
170 # componentInstances can have 1 or more than 1 entry
171 ${passed}= Run Keyword And Return Status Evaluate type(${componentInstances})
172 ${type}= Run Keyword If ${passed} Evaluate type(${componentInstances})
173 ${componentInstancesList}= Run Keyword If "${type}"!="<type 'list'>" Create List ${componentInstances}
174 ... ELSE Set Variable ${componentInstances}
175 :FOR ${item} IN @{componentInstancesList}
176 \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${item} ${nf_role}
177 \ Run Keyword If '${test}' == 'FAIL' Continue For Loop
178 \ ${componentInstance1}= Set Variable ${item}
179 :FOR ${comp} IN @{resp['componentInstancesProperties']["${componentInstance1}"]}
180 \ ${name} Set Variable ${comp['name']}
181 \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${name} network_role
182 \ Run Keyword If '${test}' == 'FAIL' Continue For Loop
183 \ ${description} Set Variable ${comp['description']}
184 \ ${description}= Replace String ${description} ${\n} \
185 \ ${uniqueId} Set Variable ${comp['uniqueId']}
186 \ ${parentUniqueId} Set Variable ${comp['parentUniqueId']}
187 \ ${ownerId} Set Variable ${comp['ownerId']}
188 \ ${dict}= Create Dictionary parentUniqueId=${parentUniqueId} ownerId=${ownerId} uniqueId=${uniqueId} description=${description}
189 \ Run Keyword If '${name}'=='network_role' Set To Dictionary ${dict} name=${name} value=${nf_role}
190 \ ${data}= Fill JSON Template File ${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} ${dict}
191 \ ${response}= Set ASDC Catalog Resource Component Instance Properties ${catalog_parent_service_id} ${catalog_service_id} ${data}
192 #\ Log To Console resp=${response}
193 [Return]
194
Yang Xu2ec80382018-11-01 12:30:37 -0400195Setup ASDC Catalog Resource CDS Properties
196 [Documentation] Set up vfwng VNF properties and inputs for CDS
197 [Arguments] ${catalog_resource_id}
198 # Set vnf module properties
199 ${resp}= Get ASDC Catalog Resource Component Instances ${catalog_resource_id}
200 :FOR ${comp} in @{resp['componentInstances']}
201 \ ${name} Set Variable ${comp['name']}
202 \ ${uniqueId} Set Variable ${comp['uniqueId']}
203 \ ${actualComponentUid} Set Variable ${comp['actualComponentUid']}
204 \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${name} abstract_
205 \ Run Keyword If '${test}' == 'FAIL' Continue For Loop
206 \ ${response}= Get ASDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${actualComponentUid}
207 \ ${dict}= Create Dictionary parent_id=${response[6]['parentUniqueId']}
208 \ Run Keyword If '${name}'=='abstract_vfw' Set To Dictionary ${dict} nfc_function=vfw nfc_naming_policy=SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP
209 \ Run Keyword If '${name}'=='abstract_vpg' Set To Dictionary ${dict} nfc_function=vpg nfc_naming_policy=SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP
210 \ Run Keyword If '${name}'=='abstract_vsn' Set To Dictionary ${dict} nfc_function=vsn nfc_naming_policy=SDNC_Policy.ONAP_VSN_NAMING_TIMESTAMP
211 \ ${data}= Fill JSON Template File ${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} ${dict}
212 \ ${response}= Set ASDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${data}
213 \ Log To Console resp=${response}
214
215 # Set vnf inputs
216 ${resp}= Get ASDC Catalog Resource Inputs ${catalog_resource_id}
217 ${dict}= Create Dictionary
218 :FOR ${comp} in @{resp['inputs']}
219 \ ${name} Set Variable ${comp['name']}
220 \ ${uid} Set Variable ${comp['uniqueId']}
221 \ Run Keyword If '${name}'=='nf_function' Set To Dictionary ${dict} nf_function=ONAP-FIREWALL nf_function_uid=${uid}
222 \ Run Keyword If '${name}'=='nf_type' Set To Dictionary ${dict} nf_type=FIREWALL nf_type_uid=${uid}
223 \ Run Keyword If '${name}'=='nf_naming_code' Set To Dictionary ${dict} nf_naming_code=vfw nf_naming_code_uid=${uid}
224 \ Run Keyword If '${name}'=='nf_role' Set To Dictionary ${dict} nf_role=vFW nf_role_uid=${uid}
225 \ Run Keyword If '${name}'=='cloud_env' Set To Dictionary ${dict} cloud_env=openstack cloud_env_uid=${uid}
226 ${data}= Fill JSON Template File ${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} ${dict}
227 ${response}= Set ASDC Catalog Resource VNF Inputs ${catalog_resource_id} ${data}
228
DR695Hccff30b2017-02-17 18:44:24 -0500229Add ASDC License Model
230 [Documentation] Creates an asdc license model and returns its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400231 ${uuid}= Generate UUID
232 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
DR695Hccff30b2017-02-17 18:44:24 -0500233 ${map}= Create Dictionary vendor_name=${shortened_uuid}
234 ${data}= Fill JSON Template File ${ASDC_LICENSE_MODEL_TEMPLATE} ${map}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500235 ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500236 Should Be Equal As Strings ${resp.status_code} 200
Brian Freemanb568e5e2018-04-05 21:03:38 -0500237 [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']}
DR695Hccff30b2017-02-17 18:44:24 -0500238Get ASDC License Model
239 [Documentation] gets an asdc license model by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400240 [Arguments] ${id} ${version_id}=0.1
Brian Freeman44b8bb32018-05-03 21:08:42 -0500241 ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
Jerry Floode2a48d72017-06-21 15:06:29 -0400242 [Return] ${resp.json()}
243Get ASDC License Models
244 [Documentation] gets an asdc license model by its id
Brian Freeman44b8bb32018-05-03 21:08:42 -0500245 ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
246
DR695Hccff30b2017-02-17 18:44:24 -0500247 [Return] ${resp.json()}
248Checkin ASDC License Model
249 [Documentation] checksin an asdc license model by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400250 [Arguments] ${id} ${version_id}=0.1
DR695Hccff30b2017-02-17 18:44:24 -0500251 ${map}= Create Dictionary action=Checkin
252 ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500253 ${resp}= Run ASDC Put Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500254 Should Be Equal As Strings ${resp.status_code} 200
255 [Return] ${resp.json()}
256Submit ASDC License Model
257 [Documentation] submits an asdc license model by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400258 [Arguments] ${id} ${version_id}=0.1
DR695Hccff30b2017-02-17 18:44:24 -0500259 ${map}= Create Dictionary action=Submit
260 ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500261 ${resp}= Run ASDC Put Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500262 Should Be Equal As Strings ${resp.status_code} 200
263 [Return] ${resp.json()}
264Checkin ASDC Software Product
265 [Documentation] checksin an asdc Software Product by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400266 [Arguments] ${id} ${version_id}=0.1
DR695Hccff30b2017-02-17 18:44:24 -0500267 ${map}= Create Dictionary action=Checkin
Jerry Floode2a48d72017-06-21 15:06:29 -0400268 ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500269 ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
Jerry Floode2a48d72017-06-21 15:06:29 -0400270 Should Be Equal As Strings ${resp.status_code} 200
271 [Return] ${resp.json()}
272Validate ASDC Software Product
273 [Documentation] checksin an asdc Software Product by its id
274 [Arguments] ${id} ${version_id}=0.1
275 ${data}= Catenate
Brian Freeman44b8bb32018-05-03 21:08:42 -0500276 ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}/orchestration-template-candidate/process ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500277 Should Be Equal As Strings ${resp.status_code} 200
278 [Return] ${resp.json()}
279Submit ASDC Software Product
280 [Documentation] submits an asdc Software Product by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400281 [Arguments] ${id} ${version_id}=0.1
DR695Hccff30b2017-02-17 18:44:24 -0500282 ${map}= Create Dictionary action=Submit
Jerry Floode2a48d72017-06-21 15:06:29 -0400283 ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500284 ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500285 Should Be Equal As Strings ${resp.status_code} 200
286 [Return] ${resp.json()}
287Package ASDC Software Product
288 [Documentation] creates_package on an asdc Software Product by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400289 [Arguments] ${id} ${version_id}=0.1
DR695Hccff30b2017-02-17 18:44:24 -0500290 ${map}= Create Dictionary action=Create_Package
Jerry Floode2a48d72017-06-21 15:06:29 -0400291 ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500292 ${resp}= Run ASDC Put Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500293 Should Be Equal As Strings ${resp.status_code} 200
Jerry Floode2a48d72017-06-21 15:06:29 -0400294 [Return] ${resp.json()}
DR695Hccff30b2017-02-17 18:44:24 -0500295Add ASDC Entitlement Pool
296 [Documentation] Creates an asdc Entitlement Pool and returns its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400297 [Arguments] ${license_model_id} ${version_id}=0.1
298 ${uuid}= Generate UUID
299 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
DR695Hccff30b2017-02-17 18:44:24 -0500300 ${map}= Create Dictionary entitlement_pool_name=${shortened_uuid}
Jerry Floode2a48d72017-06-21 15:06:29 -0400301 ${data}= Fill JSON Template File ${ASDC_ENTITLEMENT_POOL_TEMPLATE} ${map}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500302 ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_ENTITLEMENT_POOL_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500303 Should Be Equal As Strings ${resp.status_code} 200
304 [Return] ${resp.json()['value']}
305Get ASDC Entitlement Pool
306 [Documentation] gets an asdc Entitlement Pool by its id
307 [Arguments] ${license_model_id} ${pool_id}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500308 ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_ENTITLEMENT_POOL_PATH}/${pool_id} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500309 [Return] ${resp.json()}
310Add ASDC License Group
311 [Documentation] Creates an asdc license group and returns its id
Brian Freemanb568e5e2018-04-05 21:03:38 -0500312 [Arguments] ${license_model_id} ${version_id}=1.0
Jerry Floode2a48d72017-06-21 15:06:29 -0400313 ${uuid}= Generate UUID
314 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
DR695Hccff30b2017-02-17 18:44:24 -0500315 ${map}= Create Dictionary key_group_name=${shortened_uuid}
Jerry Floode2a48d72017-06-21 15:06:29 -0400316 ${data}= Fill JSON Template File ${ASDC_KEY_GROUP_TEMPLATE} ${map}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500317 ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_KEY_GROUP_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500318 Should Be Equal As Strings ${resp.status_code} 200
319 [Return] ${resp.json()['value']}
320Get ASDC License Group
321 [Documentation] gets an asdc license group by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400322 [Arguments] ${license_model_id} ${group_id} ${version_id}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500323 ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_KEY_GROUP_PATH}/${group_id} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500324 [Return] ${resp.json()}
325Add ASDC Feature Group
326 [Documentation] Creates an asdc Feature Group and returns its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400327 [Arguments] ${license_model_id} ${key_group_id} ${entitlement_pool_id} ${version_id}=0.1
328 ${uuid}= Generate UUID
329 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
Jerry Flood80ff9852017-08-11 06:47:14 -0400330 ${map}= Create Dictionary feature_group_name=${shortened_uuid} key_group_id=${key_group_id} entitlement_pool_id=${entitlement_pool_id} manufacturer_reference_number=mrn${shortened_uuid}
Jerry Floode2a48d72017-06-21 15:06:29 -0400331 ${data}= Fill JSON Template File ${ASDC_FEATURE_GROUP_TEMPLATE} ${map}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500332 ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_FEATURE_GROUP_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500333 Should Be Equal As Strings ${resp.status_code} 200
334 [Return] ${resp.json()['value']}
335Get ASDC Feature Group
336 [Documentation] gets an asdc Feature Group by its id
337 [Arguments] ${license_model_id} ${group_id}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500338 ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_FEATURE_GROUP_PATH}/${group_id} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500339 [Return] ${resp.json()}
340Add ASDC License Agreement
341 [Documentation] Creates an asdc License Agreement and returns its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400342 [Arguments] ${license_model_id} ${feature_group_id} ${version_id}=0.1
343 ${uuid}= Generate UUID
344 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
DR695Hccff30b2017-02-17 18:44:24 -0500345 ${map}= Create Dictionary license_agreement_name=${shortened_uuid} feature_group_id=${feature_group_id}
Jerry Floode2a48d72017-06-21 15:06:29 -0400346 ${data}= Fill JSON Template File ${ASDC_LICENSE_AGREEMENT_TEMPLATE} ${map}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500347 ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_LICENSE_AGREEMENT_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500348 Should Be Equal As Strings ${resp.status_code} 200
349 [Return] ${resp.json()['value']}
350Get ASDC License Agreement
351 [Documentation] gets an asdc License Agreement by its id
352 [Arguments] ${license_model_id} ${agreement_id}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500353 ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_LICENSE_AGREEMENT_PATH}/${agreement_id} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500354 [Return] ${resp.json()}
355Add ASDC Software Product
356 [Documentation] Creates an asdc Software Product and returns its id
Brian Freemanb568e5e2018-04-05 21:03:38 -0500357 [Arguments] ${license_agreement_id} ${feature_group_id} ${license_model_name} ${license_model_id} ${license_model_version_id}
Jerry Floode2a48d72017-06-21 15:06:29 -0400358 ${uuid}= Generate UUID
359 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
Brian Freemanb568e5e2018-04-05 21:03:38 -0500360 ${map}= Create Dictionary software_product_name=${shortened_uuid} feature_group_id=${feature_group_id} license_agreement_id=${license_agreement_id} vendor_name=${license_model_name} vendor_id=${license_model_id} version_id=${license_model_version_id}
Jerry Floode2a48d72017-06-21 15:06:29 -0400361 ${data}= Fill JSON Template File ${ASDC_SOFTWARE_PRODUCT_TEMPLATE} ${map}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500362 ${resp}= Run ASDC Post Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500363 Should Be Equal As Strings ${resp.status_code} 200
Brian Freemanb568e5e2018-04-05 21:03:38 -0500364 [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']}
DR695Hccff30b2017-02-17 18:44:24 -0500365Get ASDC Software Product
366 [Documentation] gets an asdc Software Product by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400367 [Arguments] ${software_product_id} ${version_id}=0.1
Brian Freeman44b8bb32018-05-03 21:08:42 -0500368 ${resp}= Run ASDC Get Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500369 [Return] ${resp.json()}
370Add ASDC Catalog Resource
371 [Documentation] Creates an asdc Catalog Resource and returns its id
372 [Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id}
373 ${map}= Create Dictionary software_product_id=${software_product_id} software_product_name=${software_product_name} license_agreement_id=${license_agreement_id} vendor_name=${license_model_name}
Jerry Floode2a48d72017-06-21 15:06:29 -0400374 ${data}= Fill JSON Template File ${ASDC_CATALOG_RESOURCE_TEMPLATE} ${map}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500375 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH} ${data} ${ASDC_DESIGNER_USER_ID}
DR695Hccff30b2017-02-17 18:44:24 -0500376 Should Be Equal As Strings ${resp.status_code} 201
377 [Return] ${resp.json()['uniqueId']}
378Mark ASDC Catalog Resource Inactive
379 [Documentation] deletes an asdc Catalog Resource
380 [Arguments] ${catalog_resource_id}
381 ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${ASDC_DESIGNER_USER_ID}
382 Should Be Equal As Strings ${resp.status_code} 204
383 [Return] ${resp}
384Delete Inactive ASDC Catalog Resources
385 [Documentation] delete all asdc Catalog Resources that are inactive
386 ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} ${ASDC_DESIGNER_USER_ID}
387 Should Be Equal As Strings ${resp.status_code} 200
388 [Return] ${resp.json()}
389Get ASDC Catalog Resource
390 [Documentation] gets an asdc Catalog Resource by its id
391 [Arguments] ${catalog_resource_id}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500392 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${ASDC_DESIGNER_USER_ID}
DR695Hccff30b2017-02-17 18:44:24 -0500393 [Return] ${resp.json()}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500394
Yang Xu2ec80382018-11-01 12:30:37 -0400395Get ASDC Catalog Resource Component Instances
396 [Documentation] gets asdc Catalog Resource Component Instances by its id
397 [Arguments] ${catalog_resource_id}
398 ${resp}= Run ASDC Get Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstances ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
399 [Return] ${resp.json()}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500400Get ASDC Catalog Resource Component Instances Properties
401 [Documentation] gets asdc Catalog Resource Component Instances Properties by its id
402 [Arguments] ${catalog_resource_id}
403 #${resp}= Run ASDC Get Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstancesProperties ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
404 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstancesProperties ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ENDPOINT}
405 [Return] ${resp.json()}
406
407
Yang Xu2ec80382018-11-01 12:30:37 -0400408Get ASDC Catalog Resource Inputs
409 [Documentation] gets asdc Catalog Inputs by its id
410 [Arguments] ${catalog_resource_id}
411 ${resp}= Run ASDC Get Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=inputs ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
412 [Return] ${resp.json()}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500413
Yang Xu2ec80382018-11-01 12:30:37 -0400414Get ASDC Catalog Resource Component Instance Properties
415 [Documentation] gets an asdc Catalog Resource properties by its id
416 [Arguments] ${catalog_resource_id} ${component_instance_id} ${component_id}
417 ${resp}= Run ASDC Get Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/componentInstances/${component_instance_id}/${component_id}/inputs ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
418 [Return] ${resp.json()}
419Set ASDC Catalog Resource Component Instance Properties
420 [Documentation] sets an asdc Catalog Resource by its id
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500421 [Arguments] ${catalog_resource_id} ${component_parent_service_id} ${data}
422 #${resp}= Run ASDC Post Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${component_parent_service_id}/resourceInstance/${catalog_resource_id}/inputs ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
423 ${resp}= Run ASDC Post Request ${ASDC_FE_CATALOG_SERVICES_PATH}/${component_parent_service_id}/resourceInstance/${catalog_resource_id}/properties ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
Yang Xu2ec80382018-11-01 12:30:37 -0400424 [Return] ${resp.json()}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500425
Yang Xu2ec80382018-11-01 12:30:37 -0400426Set ASDC Catalog Resource VNF Inputs
427 [Documentation] sets an asdc Catalog Resource by its id
428 [Arguments] ${catalog_resource_id} ${data}
429 ${resp}= Run ASDC Post Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/update/inputs ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
430 [Return] ${resp.json()}
Brian Freeman79b00ce2018-11-01 14:57:53 -0500431Get SDC Demo Vnf Catalog Resource
432 [Documentation] gets resource id's for demonstration VNFs for instantiate
433 [Arguments] ${service_name}
434 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/serviceName/${service_name}/serviceVersion/1.0
435 @{ITEMS}= Copy List ${resp.json()['componentInstances']}
436 ${demo_catalog_resource}= Create Dictionary
437 :FOR ${ELEMENT} IN @{ITEMS}
438 \ Log ${ELEMENT['name']}
439 \ Log ${ELEMENT['groupInstances'][0]['groupName']}
440 \ ${vnf}= Get VNF From Group Name ${ELEMENT['groupInstances'][0]['groupName']} ${service_name}
441 \ ${vnf_data}= Create Dictionary vnf_type=${ELEMENT['name']} vf_module=${ELEMENT['groupInstances'][0]['groupName']}
442 \ LOG ${vnf_data}
443 \ Set To Dictionary ${demo_catalog_resource} ${vnf}=${vnf_data}
444 \ LOG ${demo_catalog_resource}
445 [Return] ${demo_catalog_resource}
446
447Get VNF From Group Name
448 [Documentation] looks up vnf key from service mapping for a regex on groupName and service_name
449 [Arguments] ${group_name} ${service_name}
450 ${vnf}= Set Variable If
451 ... ('${service_name}'=='demoVFWCL') and ('base_vfw' in '${group_name}') vFWSNK
452 ... ('${service_name}'=='demoVFWCL') and ('base_vpkg' in '${group_name}') vPKG
453 ... ('${service_name}'=='demoVLB') and ('base_vlb' in '${group_name}') vLB
454 [Return] ${vnf}
DR695Hccff30b2017-02-17 18:44:24 -0500455Checkin ASDC Catalog Resource
456 [Documentation] checksin an asdc Catalog Resource by its id
457 [Arguments] ${catalog_resource_id}
458 ${map}= Create Dictionary user_remarks=Robot remarks
Jerry Floode2a48d72017-06-21 15:06:29 -0400459 ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500460 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${ASDC_DESIGNER_USER_ID}
461 Should Be Equal As Strings ${resp.status_code} 200
462 [Return] ${resp.json()}
463Request Certify ASDC Catalog Resource
464 [Documentation] requests certify on an asdc Catalog Resource by its id
465 [Arguments] ${catalog_resource_id}
466 ${map}= Create Dictionary user_remarks=Robot remarks
Jerry Floode2a48d72017-06-21 15:06:29 -0400467 ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500468 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID}
469 Should Be Equal As Strings ${resp.status_code} 200
470 [Return] ${resp.json()}
471Start Certify ASDC Catalog Resource
472 [Documentation] start certify an asdc Catalog Resource by its id
473 [Arguments] ${catalog_resource_id}
474 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${ASDC_TESTER_USER_ID}
475 Should Be Equal As Strings ${resp.status_code} 200
476 [Return] ${resp.json()}
477Certify ASDC Catalog Resource
478 [Documentation] start certify an asdc Catalog Resource by its id and returns the new id
Brian Freemandb1e7412018-08-01 12:46:01 -0500479 [Arguments] ${catalog_resource_id} ${user_id}=${ASDC_TESTER_USER_ID}
DR695Hccff30b2017-02-17 18:44:24 -0500480 ${map}= Create Dictionary user_remarks=Robot remarks
Jerry Floode2a48d72017-06-21 15:06:29 -0400481 ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
Brian Freemandb1e7412018-08-01 12:46:01 -0500482 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${user_id}
DR695Hccff30b2017-02-17 18:44:24 -0500483 Should Be Equal As Strings ${resp.status_code} 200
484 [Return] ${resp.json()['uniqueId']}
Jerry Flood6bd1afa2017-10-09 09:59:23 -0400485
DR695Hccff30b2017-02-17 18:44:24 -0500486Upload ASDC Heat Package
Brian Freemanf508ab22018-03-15 21:19:41 -0500487 [Documentation] Creates an asdc Software Product and returns its id
488 [Arguments] ${software_product_id} ${file_path} ${version_id}=0.1
Jerry Flood6bd1afa2017-10-09 09:59:23 -0400489 ${files}= Create Dictionary
490 Create Multi Part ${files} upload ${file_path} contentType=application/zip
Brian Freeman44b8bb32018-05-03 21:08:42 -0500491 ${resp}= Run ASDC Post Files Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id}${ASDC_VENDOR_SOFTWARE_UPLOAD_PATH} ${files} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
Brian Freemanf508ab22018-03-15 21:19:41 -0500492 Should Be Equal As Strings ${resp.status_code} 200
Jerry Flood6bd1afa2017-10-09 09:59:23 -0400493
DR695Hccff30b2017-02-17 18:44:24 -0500494Add ASDC Catalog Service
495 [Documentation] Creates an asdc Catalog Service and returns its id
jf986075010a42017-02-22 16:52:54 -0500496 [Arguments] ${catalog_service_name}
Jerry Floode2a48d72017-06-21 15:06:29 -0400497 ${uuid}= Generate UUID
jf986075010a42017-02-22 16:52:54 -0500498 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
Jerry Floode2a48d72017-06-21 15:06:29 -0400499 ${catalog_service_name}= Set Variable If '${catalog_service_name}' =='' ${shortened_uuid} ${catalog_service_name}
jf986075010a42017-02-22 16:52:54 -0500500 ${map}= Create Dictionary service_name=${catalog_service_name}
Jerry Floode2a48d72017-06-21 15:06:29 -0400501 ${data}= Fill JSON Template File ${ASDC_CATALOG_SERVICE_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500502 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH} ${data} ${ASDC_DESIGNER_USER_ID}
503 Should Be Equal As Strings ${resp.status_code} 201
504 [Return] ${resp.json()['uniqueId']}
505Mark ASDC Catalog Service Inactive
506 [Documentation] Deletes an asdc Catalog Service
507 [Arguments] ${catalog_service_id}
508 ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${ASDC_DESIGNER_USER_ID}
509 Should Be Equal As Strings ${resp.status_code} 204
510 [Return] ${resp}
511Delete Inactive ASDC Catalog Services
512 [Documentation] delete all asdc Catalog Serivces that are inactive
513 ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_INACTIVE_SERVICES_PATH} ${ASDC_DESIGNER_USER_ID}
514 Should Be Equal As Strings ${resp.status_code} 200
515 [Return] ${resp.json()}
516Get ASDC Catalog Service
517 [Documentation] gets an asdc Catalog Service by its id
518 [Arguments] ${catalog_service_id}
519 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${ASDC_DESIGNER_USER_ID}
520 [Return] ${resp.json()}
521Checkin ASDC Catalog Service
522 [Documentation] checksin an asdc Catalog Service by its id
523 [Arguments] ${catalog_service_id}
524 ${map}= Create Dictionary user_remarks=Robot remarks
Jerry Floode2a48d72017-06-21 15:06:29 -0400525 ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500526 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${ASDC_DESIGNER_USER_ID}
527 Should Be Equal As Strings ${resp.status_code} 200
528 [Return] ${resp.json()}
529Request Certify ASDC Catalog Service
530 [Documentation] requests certify on an asdc Catalog Service by its id
531 [Arguments] ${catalog_service_id}
532 ${map}= Create Dictionary user_remarks=Robot remarks
Jerry Floode2a48d72017-06-21 15:06:29 -0400533 ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500534 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID}
535 Should Be Equal As Strings ${resp.status_code} 200
536 [Return] ${resp.json()}
537Start Certify ASDC Catalog Service
538 [Documentation] start certify an asdc Catalog Service by its id
539 [Arguments] ${catalog_service_id}
540 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${ASDC_TESTER_USER_ID}
541 Should Be Equal As Strings ${resp.status_code} 200
542 [Return] ${resp.json()}
543Certify ASDC Catalog Service
544 [Documentation] start certify an asdc Catalog Service by its id and returns the new id
545 [Arguments] ${catalog_service_id}
546 ${map}= Create Dictionary user_remarks=Robot remarks
Jerry Floode2a48d72017-06-21 15:06:29 -0400547 ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500548 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${ASDC_TESTER_USER_ID}
549 Should Be Equal As Strings ${resp.status_code} 200
550 [Return] ${resp.json()['uniqueId']}
551Approve ASDC Catalog Service
552 [Documentation] approve an asdc Catalog Service by its id
553 [Arguments] ${catalog_service_id}
554 ${map}= Create Dictionary user_remarks=Robot remarks
Jerry Floode2a48d72017-06-21 15:06:29 -0400555 ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500556 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH}${ASDC_DISTRIBUTION_STATE_APPROVE_PATH} ${data} ${ASDC_GOVERNOR_USER_ID}
557 Should Be Equal As Strings ${resp.status_code} 200
558 [Return] ${resp.json()}
559Distribute ASDC Catalog Service
560 [Documentation] distribute an asdc Catalog Service by its id
561 [Arguments] ${catalog_service_id}
562 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} ${None} ${ASDC_OPS_USER_ID}
563 Should Be Equal As Strings ${resp.status_code} 200
564 [Return] ${resp.json()}
565Add ASDC Resource Instance
566 [Documentation] Creates an asdc Resource Instance and returns its id
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500567 [Arguments] ${catalog_service_id} ${catalog_resource_id} ${catalog_resource_name} ${xoffset}=${0} ${yoffset}=${0}
DR695Hccff30b2017-02-17 18:44:24 -0500568 ${milli_timestamp}= Generate MilliTimestamp UUID
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500569 ${xoffset}= Set Variable ${xoffset+306}
570 ${yoffset}= Set Variable ${yoffset+248}
571 ${map}= Create Dictionary catalog_resource_id=${catalog_resource_id} catalog_resource_name=${catalog_resource_name} milli_timestamp=${milli_timestamp} posX=${xoffset} posY=${yoffset}
Jerry Floode2a48d72017-06-21 15:06:29 -0400572 ${data}= Fill JSON Template File ${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500573 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${ASDC_DESIGNER_USER_ID}
574 Should Be Equal As Strings ${resp.status_code} 201
575 [Return] ${resp.json()['uniqueId']}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500576
DR695Hccff30b2017-02-17 18:44:24 -0500577Get Catalog Service Distribution
578 [Documentation] gets an asdc catalog Service distrbution
579 [Arguments] ${catalog_service_uuid}
580 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_uuid}${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH} ${ASDC_OPS_USER_ID}
581 Should Be Equal As Strings ${resp.status_code} 200
582 [Return] ${resp.json()}
583Check Catalog Service Distributed
584 [Documentation] gets an asdc catalog Service distrbution
Brian Freemanadaa2372018-10-24 12:25:22 -0500585 [Arguments] ${catalog_service_uuid} ${dist_status}
DR695Hccff30b2017-02-17 18:44:24 -0500586 ${dist_resp}= Get Catalog Service Distribution ${catalog_service_uuid}
587 Should Be Equal As Strings ${dist_resp['distributionStatusOfServiceList'][0]['deployementStatus']} Distributed
588 ${det_resp}= Get Catalog Service Distribution Details ${dist_resp['distributionStatusOfServiceList'][0]['distributionID']}
589 @{ITEMS}= Copy List ${det_resp['distributionStatusList']}
Brian Freemanf508ab22018-03-15 21:19:41 -0500590 Should Not Be Empty ${ITEMS}
Brian Freemana62644f2018-05-13 12:47:38 -0500591 ${SO_COMPLETE} Set Variable FALSE
DR695Hccff30b2017-02-17 18:44:24 -0500592 :FOR ${ELEMENT} IN @{ITEMS}
Brian Freemanf508ab22018-03-15 21:19:41 -0500593 \ Log ${ELEMENT['omfComponentID']}
DR695Hccff30b2017-02-17 18:44:24 -0500594 \ Log ${ELEMENT['status']}
Brian Freeman41ab5e52018-08-08 14:24:23 -0500595 \ ${SO_COMPLETE} Set Variable If (('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_OK')) or ('${SO_COMPLETE}'=='TRUE') TRUE
Brian Freemaneca71072018-08-16 14:50:16 -0500596 \ Exit For Loop If ('${SO_COMPLETE}'=='TRUE')
597 \ Exit For Loop If ('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_ERROR')
Brian Freemanadaa2372018-10-24 12:25:22 -0500598 \ ${dist_status}= Set Variable If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml')) EXIT
599 \ Exit For Loop If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml'))
Brian Freemana62644f2018-05-13 12:47:38 -0500600 Should Be True ( '${SO_COMPLETE}'=='TRUE') SO Test
DR695Hccff30b2017-02-17 18:44:24 -0500601Get Catalog Service Distribution Details
602 [Documentation] gets an asdc catalog Service distrbution details
603 [Arguments] ${catalog_service_distribution_id}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500604 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH}/${catalog_service_distribution_id} ${ASDC_OPS_USER_ID}
DR695Hccff30b2017-02-17 18:44:24 -0500605 Should Be Equal As Strings ${resp.status_code} 200
606 [Return] ${resp.json()}
607Run ASDC Health Check
608 [Documentation] Runs a ASDC health check
DR695Hbf5a3a32017-06-30 13:09:57 -0400609 ${session}= Create Session asdc ${ASDC_FE_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500610 ${uuid}= Generate UUID
611 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
612 ${resp}= Get Request asdc ${ASDC_HEALTH_CHECK_PATH} headers=${headers}
Brian Freemanadaa2372018-10-24 12:25:22 -0500613 # only test for HTTP 200 to determine SDC Health. SDC_DE_HEALTH is informational
Brian Freeman00f125e2018-09-05 13:03:48 -0500614 Should Be Equal As Strings ${resp.status_code} 200 SDC DOWN
Brian Freeman5cf5fa62018-04-23 20:28:16 -0500615 ${SDC_DE_HEALTH}= Catenate DOWN
DR695Hccff30b2017-02-17 18:44:24 -0500616 @{ITEMS}= Copy List ${resp.json()['componentsInfo']}
617 :FOR ${ELEMENT} IN @{ITEMS}
618 \ Log ${ELEMENT['healthCheckStatus']}
Brian Freemane546f7e2018-04-19 12:17:56 -0500619 \ ${SDC_DE_HEALTH} Set Variable If (('DE' in '${ELEMENT['healthCheckComponent']}') and ('${ELEMENT['healthCheckStatus']}' == 'UP')) or ('${SDC_DE_HEALTH}'=='UP') UP
Brian Freemand5743d52018-11-05 11:05:43 -0500620 Log To Console (DMaaP:${SDC_DE_HEALTH}) no_newline=true
DR695Hccff30b2017-02-17 18:44:24 -0500621Run ASDC Get Request
622 [Documentation] Runs an ASDC get request
Brian Freeman44b8bb32018-05-03 21:08:42 -0500623 [Arguments] ${data_path} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500624 ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500625 Log Creating session ${MY_ASDC_BE_ENDPOINT}
626 ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth}
DR695Hccff30b2017-02-17 18:44:24 -0500627 ${uuid}= Generate UUID
628 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
629 ${resp}= Get Request asdc ${data_path} headers=${headers}
630 Log Received response from asdc ${resp.text}
631 [Return] ${resp}
632Run ASDC Put Request
633 [Documentation] Runs an ASDC put request
Brian Freeman44b8bb32018-05-03 21:08:42 -0500634 [Arguments] ${data_path} ${data} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500635 ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500636 Log Creating session ${MY_ASDC_BE_ENDPOINT}
637 ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth}
DR695Hccff30b2017-02-17 18:44:24 -0500638 ${uuid}= Generate UUID
639 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
640 ${resp}= Put Request asdc ${data_path} data=${data} headers=${headers}
641 Log Received response from asdc ${resp.text}
642 [Return] ${resp}
Jerry Flood6bd1afa2017-10-09 09:59:23 -0400643
DR695Hccff30b2017-02-17 18:44:24 -0500644Run ASDC Post Files Request
645 [Documentation] Runs an ASDC post request
Brian Freeman44b8bb32018-05-03 21:08:42 -0500646 [Arguments] ${data_path} ${files} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500647 ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500648 Log Creating session ${MY_ASDC_BE_ENDPOINT}
649 ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth}
DR695Hccff30b2017-02-17 18:44:24 -0500650 ${uuid}= Generate UUID
651 ${headers}= Create Dictionary Accept=application/json Content-Type=multipart/form-data USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
652 ${resp}= Post Request asdc ${data_path} files=${files} headers=${headers}
653 Log Received response from asdc ${resp.text}
Jerry Floode2a48d72017-06-21 15:06:29 -0400654 [Return] ${resp}
Jerry Flood6bd1afa2017-10-09 09:59:23 -0400655
DR695Hccff30b2017-02-17 18:44:24 -0500656Run ASDC Post Request
657 [Documentation] Runs an ASDC post request
Brian Freeman44b8bb32018-05-03 21:08:42 -0500658 [Arguments] ${data_path} ${data} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500659 ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500660 Log Creating session ${MY_ASDC_BE_ENDPOINT}
661 ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth}
DR695Hccff30b2017-02-17 18:44:24 -0500662 ${uuid}= Generate UUID
663 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
664 ${resp}= Post Request asdc ${data_path} data=${data} headers=${headers}
665 Log Received response from asdc ${resp.text}
Jerry Floode2a48d72017-06-21 15:06:29 -0400666 [Return] ${resp}
DR695Hccff30b2017-02-17 18:44:24 -0500667Run ASDC Delete Request
668 [Documentation] Runs an ASDC delete request
Brian Freeman44b8bb32018-05-03 21:08:42 -0500669 [Arguments] ${data_path} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT}
670 ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
671 Log Creating session ${MY_ASDC_BE_ENDPOINT}
672 ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth}
DR695Hccff30b2017-02-17 18:44:24 -0500673 ${uuid}= Generate UUID
674 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
675 ${resp}= Delete Request asdc ${data_path} headers=${headers}
676 Log Received response from asdc ${resp.text}
Jerry Floode2a48d72017-06-21 15:06:29 -0400677 [Return] ${resp}
DR695Hccff30b2017-02-17 18:44:24 -0500678Open ASDC GUI
679 [Documentation] Logs in to ASDC GUI
680 [Arguments] ${PATH}
681 ## Setup Browever now being managed by the test case
682 ##Setup Browser
DR695Hbf5a3a32017-06-30 13:09:57 -0400683 Go To ${ASDC_FE_ENDPOINT}${PATH}
DR695Hccff30b2017-02-17 18:44:24 -0500684 Maximize Browser Window
Jerry Flood6bd1afa2017-10-09 09:59:23 -0400685
DR695Hccff30b2017-02-17 18:44:24 -0500686 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
DR695Hbf5a3a32017-06-30 13:09:57 -0400687 Log Logging in to ${ASDC_FE_ENDPOINT}${PATH}
DR695Hccff30b2017-02-17 18:44:24 -0500688 Title Should Be ASDC
Jerry Floode2a48d72017-06-21 15:06:29 -0400689 Wait Until Page Contains Element xpath=//div/a[text()='SDC'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
DR695Hbf5a3a32017-06-30 13:09:57 -0400690 Log Logged in to ${ASDC_FE_ENDPOINT}${PATH}
Jerry Flood6bd1afa2017-10-09 09:59:23 -0400691
692
693Create Multi Part
694 [Arguments] ${addTo} ${partName} ${filePath} ${contentType}=${None}
695 ${fileData}= Get Binary File ${filePath}
696 ${fileDir} ${fileName}= Split Path ${filePath}
697 ${partData}= Create List ${fileName} ${fileData} ${contentType}
698 Set To Dictionary ${addTo} ${partName}=${partData}
Brian Freemanf940ee92018-05-25 21:09:05 -0500699