blob: ad98261e6d3e5c1f132c1ecd75b334ebf37b11c7 [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
Brian Freeman2e1d0ff2019-01-23 09:38:13 -05003Library RequestsLibrary
4Library UUID
DR695H7aca1a42019-06-03 17:08:34 -04005Library ONAPLibrary.JSON
DR695Hccff30b2017-02-17 18:44:24 -05006Library OperatingSystem
7Library Collections
DR695H910097e2019-05-08 13:55:32 -04008Library SeleniumLibrary
Brian Freeman2e1d0ff2019-01-23 09:38:13 -05009Library String
10Library StringTemplater
Yang Xu7037e542018-12-28 01:19:26 -050011Library ArchiveLibrary
12Library HEATUtils
Brian Freeman15033782019-03-22 15:48:55 -050013Library DateTime
DR695Hfcb0ee82019-05-22 17:21:38 -040014Library ONAPLibrary.ServiceMapping
DR695Hccff30b2017-02-17 18:44:24 -050015Resource global_properties.robot
16Resource browser_setup.robot
17Resource json_templater.robot
Brian Freeman2e1d0ff2019-01-23 09:38:13 -050018
DR695Hccff30b2017-02-17 18:44:24 -050019*** Variables ***
20${ASDC_DESIGNER_USER_ID} cs0008
21${ASDC_TESTER_USER_ID} jm0007
22${ASDC_GOVERNOR_USER_ID} gv0001
23${ASDC_OPS_USER_ID} op0001
24${ASDC_HEALTH_CHECK_PATH} /sdc1/rest/healthCheck
25${ASDC_VENDOR_LICENSE_MODEL_PATH} /onboarding-api/v1.0/vendor-license-models
26${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} /onboarding-api/v1.0/vendor-software-products
27${ASDC_VENDOR_KEY_GROUP_PATH} /license-key-groups
28${ASDC_VENDOR_ENTITLEMENT_POOL_PATH} /entitlement-pools
29${ASDC_VENDOR_FEATURE_GROUP_PATH} /feature-groups
30${ASDC_VENDOR_LICENSE_AGREEMENT_PATH} /license-agreements
31${ASDC_VENDOR_ACTIONS_PATH} /actions
Jerry Floode2a48d72017-06-21 15:06:29 -040032${ASDC_VENDOR_SOFTWARE_UPLOAD_PATH} /orchestration-template-candidate
Yang Xu2ec80382018-11-01 12:30:37 -040033${ASDC_FE_CATALOG_RESOURCES_PATH} /sdc1/feProxy/rest/v1/catalog/resources
Brian Freemaneef7c6f2018-11-16 18:42:21 -050034${ASDC_FE_CATALOG_SERVICES_PATH} /sdc1/feProxy/rest/v1/catalog/services
DR695Hccff30b2017-02-17 18:44:24 -050035${ASDC_CATALOG_RESOURCES_PATH} /sdc2/rest/v1/catalog/resources
36${ASDC_CATALOG_SERVICES_PATH} /sdc2/rest/v1/catalog/services
37${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} /sdc2/rest/v1/inactiveComponents/resource
Brian Freemaneef7c6f2018-11-16 18:42:21 -050038${ASDC_CATALOG_RESOURCES_QUERY_PATH} /sdc2/rest/v1/catalog/resources/resourceName
DR695Hccff30b2017-02-17 18:44:24 -050039${ASDC_CATALOG_INACTIVE_SERVICES_PATH} /sdc2/rest/v1/inactiveComponents/service
40${ASDC_CATALOG_LIFECYCLE_PATH} /lifecycleState
41${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} /resourceInstance
Brian Freeman2e1d0ff2019-01-23 09:38:13 -050042${ASDC_CATALOG_SERVICE_RESOURCE_ARTIFACT_PATH} /artifacts
DR695Hccff30b2017-02-17 18:44:24 -050043${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH} /distribution-state
44${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH} /distribution
45${ASDC_DISTRIBUTION_STATE_APPROVE_PATH} /approve
46${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} /distribution/PROD/activate
47${ASDC_LICENSE_MODEL_TEMPLATE} robot/assets/templates/asdc/license_model.template
48${ASDC_KEY_GROUP_TEMPLATE} robot/assets/templates/asdc/key_group.template
49${ASDC_ENTITLEMENT_POOL_TEMPLATE} robot/assets/templates/asdc/entitlement_pool.template
50${ASDC_FEATURE_GROUP_TEMPLATE} robot/assets/templates/asdc/feature_group.template
51${ASDC_LICENSE_AGREEMENT_TEMPLATE} robot/assets/templates/asdc/license_agreement.template
52${ASDC_ACTION_TEMPLATE} robot/assets/templates/asdc/action.template
53${ASDC_SOFTWARE_PRODUCT_TEMPLATE} robot/assets/templates/asdc/software_product.template
Brian Freeman2e1d0ff2019-01-23 09:38:13 -050054${ASDC_ARTIFACT_UPLOAD_TEMPLATE} robot/assets/templates/asdc/artifact_upload.template
DR695Hccff30b2017-02-17 18:44:24 -050055${ASDC_CATALOG_RESOURCE_TEMPLATE} robot/assets/templates/asdc/catalog_resource.template
56${ASDC_USER_REMARKS_TEMPLATE} robot/assets/templates/asdc/user_remarks.template
57${ASDC_CATALOG_SERVICE_TEMPLATE} robot/assets/templates/asdc/catalog_service.template
58${ASDC_RESOURCE_INSTANCE_TEMPLATE} robot/assets/templates/asdc/resource_instance.template
Yang Xu2ec80382018-11-01 12:30:37 -040059${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} robot/assets/templates/asdc/catalog_vnf_properties.template
60${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} robot/assets/templates/asdc/catalog_vnf_inputs.template
Brian Freemaneef7c6f2018-11-16 18:42:21 -050061${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} robot/assets/templates/asdc/catalog_net_input_properties.template
bdfreeman1421b2a49512018-11-25 07:32:19 -050062${ASDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE} robot/assets/templates/asdc/catalog_resource_alloted_resource.template
63${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE} robot/assets/templates/asdc/catalog_allotted_properties.template
64${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE} robot/assets/templates/asdc/catalog_allotted_inputs.template
Brian Freeman2e1d0ff2019-01-23 09:38:13 -050065${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH} robot/assets/asdc/blueprints/
Brian Freemanf508ab22018-03-15 21:19:41 -050066${ASDC_FE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_FE_IP_ADDR}:${GLOBAL_ASDC_FE_PORT}
67${ASDC_BE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_IP_ADDR}:${GLOBAL_ASDC_BE_PORT}
Brian Freeman44b8bb32018-05-03 21:08:42 -050068${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 -040069
DR695Hccff30b2017-02-17 18:44:24 -050070*** Keywords ***
71Distribute Model From ASDC
kaihlavi06fa4ee2019-05-22 19:08:14 +030072 [Documentation] Goes end to end creating all the ASDC objects based ONAP 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 -050073 [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}= ${service}=
bdfreeman1421b2a49512018-11-25 07:32:19 -050074 # For Testing use random service names
Brian Freemaneef7c6f2018-11-16 18:42:21 -050075 #${random}= Get Current Date
76 #${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name}_${random}
jf986075010a42017-02-22 16:52:54 -050077 ${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name}
DR695Hccff30b2017-02-17 18:44:24 -050078 ${catalog_resource_ids}= Create List
Jerry Flood3a169a32017-12-01 12:39:10 -050079 ${catalog_resources}= Create Dictionary
Brian Freemanee02b312019-02-04 20:36:08 -050080 ##### TODO: Support for Multiple resources of one type in a service ######
81 # The zip list is the resources - no mechanism to indicate more than 1 of the items in the zip list
DR695Hfcb0ee82019-05-22 17:21:38 -040082 # Get Service Vnf Mapping has the logical mapping but it is not the same key as model_zip_path
83 # ${vnflist}= Get Service Vnf Mapping alias ${service}
kaihlavi06fa4ee2019-05-22 19:08:14 +030084 # Save the resource_id in a dictionary keyed by the resource name in the zipfile name (vFWDT_vFWSNK.zip or vFWDT_vPKG.zip)
85 # Create the resources but do not immediately add resource
Brian Freemanee02b312019-02-04 20:36:08 -050086 # Add Resource to Service in a separate FOR loop
Brian Freemanee02b312019-02-04 20:36:08 -050087 ${resource_types}= Create Dictionary
88
DR695H910097e2019-05-08 13:55:32 -040089 :FOR ${zip} IN @{model_zip_path}
Yang Xu2ec80382018-11-01 12:30:37 -040090 \ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip} ${cds}
kaihlavi06fa4ee2019-05-22 19:08:14 +030091 # zip can be vFW.zip or vFWDT_VFWSNK.zip
Brian Freemanee02b312019-02-04 20:36:08 -050092 \ ${resource_type_match}= Get Regexp Matches ${zip} ${service}_(.*)\.zip 1
Brian Freeman12ff1842019-02-13 13:54:48 -050093 # Need to be able to distribute preload for vFWCL vFWSNK and vFWDT vFWSNK to prepend service to vnf_type
94 \ ${resource_type_string}= Set Variable If len(${resource_type_match})==0 ${service} ${service}${resource_type_match[0]}
Brian Freemanee02b312019-02-04 20:36:08 -050095 \ Set To Dictionary ${resource_types} ${resource_type_string} ${loop_catalog_resource_id}
Jerry Floode2a48d72017-06-21 15:06:29 -040096 \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
Brian Freemanee02b312019-02-04 20:36:08 -050097
DR695Hfcb0ee82019-05-22 17:21:38 -040098 Set Directory default ./demo/service_mapping
99 ${vnflist}= Get Service Vnf Mapping default ${service}
Brian Freemanee02b312019-02-04 20:36:08 -0500100
101 # Spread the icons on the pallette starting on the left
kaihlavi06fa4ee2019-05-22 19:08:14 +0300102 ${xoffset}= Set Variable ${0}
Brian Freemanee02b312019-02-04 20:36:08 -0500103
DR695H910097e2019-05-08 13:55:32 -0400104 :FOR ${vnf} IN @{vnflist}
Brian Freemanee02b312019-02-04 20:36:08 -0500105 \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${resource_types['${vnf}']}
106 \ Set To Dictionary ${catalog_resources} ${resource_types['${vnf}']}=${loop_catalog_resource_resp}
107 \ ${catalog_resource_unique_name}= Add ASDC Resource Instance ${catalog_service_id} ${resource_types['${vnf}']} ${loop_catalog_resource_resp['name']} ${xoffset}
108 \ ${xoffset}= Set Variable ${xoffset+100}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500109 #
110 # do this here because the loop_catalog_resource_resp is different format after adding networks
111 ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule
112 #
113 # do network
DR695Hfcb0ee82019-05-22 17:21:38 -0400114 ${networklist}= Get Service Neutron Mapping default ${service}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500115 ${generic_neutron_net_uuid}= Get Generic NeutronNet UUID
DR695H910097e2019-05-08 13:55:32 -0400116 :FOR ${network} IN @{networklist}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500117 \ ${loop_catalog_resource_id}= Set Variable ${generic_neutron_net_uuid}
118 \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
119 \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id}
Yang Xufac7a632019-05-17 01:01:26 -0400120 \ ${loop_catalog_resource_id}= Add ASDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${network} ${xoffset} ${0} VL
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500121 \ ${nf_role}= Convert To Lowercase ${network}
122 \ Setup SDC Catalog Resource GenericNeutronNet Properties ${catalog_service_id} ${nf_role} ${loop_catalog_resource_id}
123 \ ${xoffset}= Set Variable ${xoffset+100}
124 \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp}
DR695Hccff30b2017-02-17 18:44:24 -0500125 ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500126 #
127 # do deployment artifacts
128 #
DR695Hfcb0ee82019-05-22 17:21:38 -0400129 ${deploymentlist}= Get Service Deployment Artifact Mapping default ${service}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500130 :FOR ${deployment} IN @{deploymentlist}
131 \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id}
132 \ Setup SDC Catalog Resource Deployment Artifact Properties ${catalog_service_id} ${loop_catalog_resource_resp} ${catalog_resource_unique_name} ${deployment}
DR695Hccff30b2017-02-17 18:44:24 -0500133 Checkin ASDC Catalog Service ${catalog_service_id}
134 Request Certify ASDC Catalog Service ${catalog_service_id}
135 Start Certify ASDC Catalog Service ${catalog_service_id}
136 # on certify it gets a new id
137 ${catalog_service_id}= Certify ASDC Catalog Service ${catalog_service_id}
138 Approve ASDC Catalog Service ${catalog_service_id}
DR695H910097e2019-05-08 13:55:32 -0400139 :FOR ${DIST_INDEX} IN RANGE 1
Brian Freeman18df8912018-05-25 13:27:29 -0500140 \ Log Distribution Attempt ${DIST_INDEX}
141 \ Distribute ASDC Catalog Service ${catalog_service_id}
142 \ ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id}
Brian Freemanf940ee92018-05-25 21:09:05 -0500143 \ ${status} ${_} = Run Keyword And Ignore Error Loop Over Check Catalog Service Distributed ${catalog_service_resp['uuid']}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500144 \ Exit For Loop If '${status}'=='PASS'
Brian Freeman8c002d52018-07-30 19:35:36 -0500145 Should Be Equal As Strings ${status} PASS
Jerry Flood3a169a32017-12-01 12:39:10 -0500146 [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 -0500147
bdfreeman1421b2a49512018-11-25 07:32:19 -0500148Distribute vCPEResCust Model From ASDC
kaihlavi06fa4ee2019-05-22 19:08:14 +0300149 [Documentation] Goes end to end creating all the ASDC objects for the vCPE ResCust Service model and distributing it to the systems. It then returns the service name, VF name and VF module name
bdfreeman1421b2a49512018-11-25 07:32:19 -0500150 [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}= ${service}=
151 # For testing use random service name
Brian Freeman9c42ae12018-11-27 14:33:27 -0500152 #${random}= Get Current Date
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500153 ${uuid}= Generate UUID
154 ${random}= Evaluate str("${uuid}")[:4]
155 ${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name}_${random}
156 # catalog_service_name already
157 #${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500158 Log To Console ${\n}ServiceName: ${catalog_service_name}_${random}
159 #${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name}
160 ${catalog_resource_ids}= Create List
161 ${catalog_resources}= Create Dictionary
DR695H910097e2019-05-08 13:55:32 -0400162 :FOR ${zip} IN @{model_zip_path}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500163 \ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip} ${cds}
164 \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
165 \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id}
166 \ Add ASDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']}
167 \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp}
168 #
169 # do this here because the loop_catalog_resource_resp is different format after adding networks
170 ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule
171 #
172 # do allottedresource
173 ${allottedresource_list}= Create List TunnelXConn BRG
174 # Example data
175 #${tunnelxconn_dict}= Create Dictionary invariantUUID=8ac029e7-77aa-40d4-b28a-d17c02d5fd82 UUID=2ddc1b37-d7da-4aab-b645-ed7db34a5d03 node_type=org.openecomp.service.Demovcpevgmux
176 #${brg_dict}= Create Dictionary invariantUUID=ff0337b9-dbe2-4d88-bb74-18bf027ae586 UUID=1b6974f1-4aed-47f4-b962-816aa1261927 node_type=org.openecomp.service.Demovcpevbrgemu
Yang Xu7037e542018-12-28 01:19:26 -0500177 # Create /tmp/vcpe_allotted_resource_data.json with demo vgmux and brgemu CSARs
178 Create Allotted Resource Data File
Brian Freemana8ceb692019-03-03 09:37:54 -0500179 ${vcpe_ar_data_file} OperatingSystem.Get File /tmp/vcpe_allotted_resource_data.json
DR695H0ca56d12019-05-14 11:48:20 -0400180 ${tunnelxconn_invariant_uuid}= Catenate ${vcpe_ar_data_file.json()['tunnelxconn']['invariantUUID']}
181 ${tunnelxconn_uuid}= Catenate ${vcpe_ar_data_file.json()['tunnelxconn']['UUID']}
182 ${tunnelxconn_node_type}= Catenate ${vcpe_ar_data_file.json()['tunnelxconn']['node_type']}
183 ${brg_invariant_uuid}= Catenate ${vcpe_ar_data_file.json()['brg']['invariantUUID']}
184 ${brg_uuid}= Catenate ${vcpe_ar_data_file.json()['brg']['UUID']}
185 ${brg_node_type}= Catenate ${vcpe_ar_data_file.json()['brg']['node_type']}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500186 ${tunnelxconn_dict}= Create Dictionary invariantUUID=${tunnelxconn_invariant_uuid} UUID=${tunnelxconn_uuid} node_type=${tunnelxconn_node_type}
187 ${brg_dict}= Create Dictionary invariantUUID=${brg_invariant_uuid} UUID=${brg_uuid} node_type=${brg_node_type}
188 ${xoffset}= Set Variable ${100}
189 ${allottedresource_uuid}= Get AllottedResource UUID
190 ${random}= Get Current Date
DR695H910097e2019-05-08 13:55:32 -0400191 :FOR ${allottedresource} IN @{allottedresource_list}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500192 \ ${loop_catalog_resource_id}= Set Variable ${allottedresource_uuid}
193 \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
194 \ ${loop_catalog_resource_id}= Add ASDC Allotted Resource Catalog Resource 00000 ${allottedresource}_${random} ONAP ${loop_catalog_resource_id} ${allottedresource}
195 \ ${loop_catalog_resource_id2}= Add ASDC Resource Instance To Resource ${loop_catalog_resource_id} ${allottedresource_uuid} ${allottedresource} ${xoffset} ${0}
196 \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id}
197 #
198 # Set the properties to relate to the brg and gmux
199 #
200 \ Run Keyword If '${allottedresource}'=='TunnelXConn' Setup SDC Catalog Resource AllottedResource Properties ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id} ${tunnelxconn_dict['invariantUUID']} ${tunnelxconn_dict['UUID']} ${tunnelxconn_dict['node_type']}
201 \ Run Keyword If '${allottedresource}'=='BRG' Setup SDC Catalog Resource AllottedResource Properties ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id} ${brg_dict['invariantUUID']} ${brg_dict['UUID']} ${brg_dict['node_type']}
202 #
203 # Set the nf_role nf_type
204 #
205 \ Run Keyword If '${allottedresource}'=='TunnelXConn' Setup SDC Catalog Resource AllottedResource Inputs ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id}
206 \ Run Keyword If '${allottedresource}'=='BRG' Setup SDC Catalog Resource AllottedResource Inputs ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500207 \ ${loop_catalog_resource_id}= Certify ASDC Catalog Resource ${loop_catalog_resource_id} ${ASDC_DESIGNER_USER_ID}
208 \ Add ASDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500209 \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp}
210 ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id}
211 Checkin ASDC Catalog Service ${catalog_service_id}
212 Request Certify ASDC Catalog Service ${catalog_service_id}
213 Start Certify ASDC Catalog Service ${catalog_service_id}
214 # on certify it gets a new id
215 ${catalog_service_id}= Certify ASDC Catalog Service ${catalog_service_id}
216 Approve ASDC Catalog Service ${catalog_service_id}
DR695H910097e2019-05-08 13:55:32 -0400217 :FOR ${DIST_INDEX} IN RANGE 1
bdfreeman1421b2a49512018-11-25 07:32:19 -0500218 \ Log Distribution Attempt ${DIST_INDEX}
219 \ Distribute ASDC Catalog Service ${catalog_service_id}
220 \ ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id}
221 \ ${status} ${_} = Run Keyword And Ignore Error Loop Over Check Catalog Service Distributed ${catalog_service_resp['uuid']}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500222 \ Exit For Loop If '${status}'=='PASS'
bdfreeman1421b2a49512018-11-25 07:32:19 -0500223 Should Be Equal As Strings ${status} PASS
224 [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources}
225
226
Yang Xu7037e542018-12-28 01:19:26 -0500227Create Allotted Resource Data File
kaihlavi06fa4ee2019-05-22 19:08:14 +0300228 [Documentation] Create Allotted Resource json data file
Yang Xu7037e542018-12-28 01:19:26 -0500229 ${allotted_resource}= Create Dictionary
230 ${allotted_csar_map}= Create Dictionary
231 Set To Dictionary ${allotted_csar_map} tunnelxconn=service-Demovcpevgmux-csar.csar
232 Set To Dictionary ${allotted_csar_map} brg=service-Demovcpevbrgemu-csar.csar
233 ${keys}= Get Dictionary Keys ${allotted_csar_map}
DR695H910097e2019-05-08 13:55:32 -0400234 :FOR ${key} IN @{keys}
Yang Xu7037e542018-12-28 01:19:26 -0500235 \ ${csar}= Get From Dictionary ${allotted_csar_map} ${key}
236 \ ${dir} ${ext}= Split String From Right ${csar} - 1
237 \ Extract Zip File /tmp/csar/${csar} /tmp/csar/${dir}
238 \ ${template}= Catenate /tmp/csar/${dir}/Definitions/${dir}-template.yml
239 \ ${json_str}= Template Yaml To Json ${template}
240 \ ${json_obj}= To Json ${json_str}
241 \ ${attrs}= Create Dictionary
242 \ Set To Dictionary ${attrs} invariantUUID=${json_obj['metadata']['invariantUUID']}
243 \ Set To Dictionary ${attrs} UUID=${json_obj['metadata']['UUID']}
244 \ Set To Dictionary ${attrs} node_type=${json_obj['topology_template']['substitution_mappings']['node_type']}
245 \ Set To Dictionary ${allotted_resource} ${key}=${attrs}
246 ${result_str}= Evaluate json.dumps(${allotted_resource}, indent=2) json
247 Log To Console ${result_str}
248 Create File /tmp/vcpe_allotted_resource_data.json ${result_str}
Yang Xu7037e542018-12-28 01:19:26 -0500249
bdfreeman14211ad11d92018-11-17 18:47:37 +0000250Download CSAR
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500251 [Documentation] Download CSAR
bdfreeman14211ad11d92018-11-17 18:47:37 +0000252 [Arguments] ${catalog_service_id} ${save_directory}=/tmp/csar
253 # get meta data
254 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/filteredDataByParams?include=toscaArtifacts ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ENDPOINT}
255 ${csar_resource_id}= Set Variable ${resp.json()['toscaArtifacts']['assettoscacsar']['uniqueId']}
256 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/artifacts/${csar_resource_id}
257 ${csar_file_name}= Set Variable ${resp.json()['artifactName']}
258 ${base64Obj}= Set Variable ${resp.json()['base64Contents']}
259 ${binObj}= Evaluate base64.b64decode("${base64Obj}") modules=base64
260 Create Binary File ${save_directory}/${csar_file_name} ${binObj}
Brian Freemane14d2572019-04-29 16:20:21 -0500261 Log To Console ${\n}Downloaded:${csar_file_name}
bdfreeman14211ad11d92018-11-17 18:47:37 +0000262
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500263
264Get Generic NeutronNet UUID
kaihlavi06fa4ee2019-05-22 19:08:14 +0300265 [Documentation] Look up the UUID of the Generic NeutronNetwork Resource
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500266 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_RESOURCES_QUERY_PATH}/Generic%20NeutronNet/resourceVersion/1.0 ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ENDPOINT}
267 [Return] ${resp.json()['allVersions']['1.0']}
268
bdfreeman1421b2a49512018-11-25 07:32:19 -0500269Get AllottedResource UUID
kaihlavi06fa4ee2019-05-22 19:08:14 +0300270 [Documentation] Look up the UUID of the Allotted Resource
bdfreeman1421b2a49512018-11-25 07:32:19 -0500271 # if this fails then the AllottedResource template got deleted from SDC by mistake
272 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_RESOURCES_QUERY_PATH}/AllottedResource/resourceVersion/1.0 ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ENDPOINT}
273 [Return] ${resp.json()['allVersions']['1.0']}
274
Brian Freeman18df8912018-05-25 13:27:29 -0500275Loop Over Check Catalog Service Distributed
Gary Wu58d58532018-07-27 16:02:51 -0700276 [Arguments] ${catalog_service_id}
Brian Freemanadaa2372018-10-24 12:25:22 -0500277 # SO watchdog timeout is 300 seconds need buffer
bdfreeman1421b2a49512018-11-25 07:32:19 -0500278 ${dist_status}= Set Variable CONTINUE
DR695H910097e2019-05-08 13:55:32 -0400279 :FOR ${CHECK_INDEX} IN RANGE 20
Brian Freemanadaa2372018-10-24 12:25:22 -0500280 \ ${status} ${_} = Run Keyword And Ignore Error Check Catalog Service Distributed ${catalog_service_id} ${dist_status}
Gary Wu58d58532018-07-27 16:02:51 -0700281 \ Sleep 20s
Brian Freemanf940ee92018-05-25 21:09:05 -0500282 \ Return From Keyword If '${status}'=='PASS'
bdfreeman1421b2a49512018-11-25 07:32:19 -0500283 # need a way to exit the loop early on DISTRIBUTION_COMPLETE_ERROR ${dist_status} doesnt work
284 #\ Exit For Loop If '${dist_status}'=='EXIT'
285 Should Be Equal As Strings ${status} PASS
Brian Freeman18df8912018-05-25 13:27:29 -0500286
DR695Hccff30b2017-02-17 18:44:24 -0500287Setup ASDC Catalog Resource
kaihlavi06fa4ee2019-05-22 19:08:14 +0300288 [Documentation] Creates all the steps a VF needs for an ASDC Catalog Resource and returns the id
Yang Xu2ec80382018-11-01 12:30:37 -0400289 [Arguments] ${model_zip_path} ${cds}=
Brian Freemanb568e5e2018-04-05 21:03:38 -0500290 ${license_model_id} ${license_model_version_id}= Add ASDC License Model
Brian Freeman15033782019-03-22 15:48:55 -0500291
292
293 ${license_temp_date}= Get Current Date
294 ${license_start_date}= Get Current Date result_format=%m/%d/%Y
295 ${license_end_date}= Add Time To Date ${license_temp_date} 365 days result_format=%m/%d/%Y
296 ${key_group_id}= Add ASDC License Group ${license_model_id} ${license_model_version_id} ${license_start_date} ${license_end_date}
297 ${pool_id}= Add ASDC Entitlement Pool ${license_model_id} ${license_model_version_id} ${license_start_date} ${license_end_date}
298
Brian Freemanb568e5e2018-04-05 21:03:38 -0500299 ${feature_group_id}= Add ASDC Feature Group ${license_model_id} ${key_group_id} ${pool_id} ${license_model_version_id}
300 ${license_agreement_id}= Add ASDC License Agreement ${license_model_id} ${feature_group_id} ${license_model_version_id}
301 Submit ASDC License Model ${license_model_id} ${license_model_version_id}
302 ${license_model_resp}= Get ASDC License Model ${license_model_id} ${license_model_version_id}
Brian Freeman9c42ae12018-11-27 14:33:27 -0500303 ${matches}= Get Regexp Matches ${model_zip_path} temp/(.*)\.zip 1
304 ${software_product_name_prefix}= Set Variable ${matches[0]}
305 ${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} ${software_product_name_prefix}
Brian Freemanb568e5e2018-04-05 21:03:38 -0500306 Upload ASDC Heat Package ${software_product_id} ${model_zip_path} ${software_product_version_id}
307 Validate ASDC Software Product ${software_product_id} ${software_product_version_id}
308 Submit ASDC Software Product ${software_product_id} ${software_product_version_id}
309 Package ASDC Software Product ${software_product_id} ${software_product_version_id}
310 ${software_product_resp}= Get ASDC Software Product ${software_product_id} ${software_product_version_id}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500311 ${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 -0400312 # Check if need to set up CDS properties
313 Run Keyword If '${cds}' == 'vfwng' Setup ASDC Catalog Resource CDS Properties ${catalog_resource_id}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500314
Brian Freeman391680a2018-08-11 15:20:58 -0500315 ${catalog_resource_id}= Certify ASDC Catalog Resource ${catalog_resource_id} ${ASDC_DESIGNER_USER_ID}
DR695Hccff30b2017-02-17 18:44:24 -0500316 [Return] ${catalog_resource_id}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500317
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500318
319Setup SDC Catalog Resource Deployment Artifact Properties
320 [Documentation] Set up Deployment Artiface properties
321 [Arguments] ${catalog_service_id} ${catalog_parent_service_id} ${catalog_resource_unique_id} ${blueprint_file}
322 ${resp}= Get ASDC Catalog Resource Component Instances Properties ${catalog_service_id}
323 #${resp}= Get ASDC Catalog Resource Deployment Artifact Properties ${catalog_service_id}
Brian Freemana8ceb692019-03-03 09:37:54 -0500324 ${blueprint_data} OperatingSystem.Get File ${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH}${blueprint_file}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500325 ${payloadData}= Evaluate base64.b64encode('''${blueprint_data}'''.encode('utf-8')) modules=base64
326 ${dict}= Create Dictionary artifactLabel=blueprint artifactName=${blueprint_file} artifactType=DCAE_INVENTORY_BLUEPRINT artifactGroupType=DEPLOYMENT description=${blueprint_file} payloadData=${payloadData}
327 ${data}= Fill JSON Template File ${ASDC_ARTIFACT_UPLOAD_TEMPLATE} ${dict}
328 # POST artifactUpload to resource
329 ${artifact_upload_path}= Catenate ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/resourceInstance/${catalog_resource_unique_id}${ASDC_CATALOG_SERVICE_RESOURCE_ARTIFACT_PATH}
330 ${resp}= Run ASDC MD5 Post Request ${artifact_upload_path} ${data} ${ASDC_DESIGNER_USER_ID}
331 Should Be Equal As Strings ${resp.status_code} 200
332 [Return] ${resp}
333
334
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500335Setup SDC Catalog Resource GenericNeutronNet Properties
bdfreeman1421b2a49512018-11-25 07:32:19 -0500336 [Documentation] Set up GenericNeutronNet properties and inputs
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500337 [Arguments] ${catalog_service_id} ${nf_role} ${catalog_parent_service_id}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500338 ${resp}= Get ASDC Catalog Resource Component Instances Properties ${catalog_service_id}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500339 ${componentInstances} Set Variable @{resp['componentInstancesProperties']}
340 # componentInstances can have 1 or more than 1 entry
341 ${passed}= Run Keyword And Return Status Evaluate type(${componentInstances})
342 ${type}= Run Keyword If ${passed} Evaluate type(${componentInstances})
343 ${componentInstancesList}= Run Keyword If "${type}"!="<type 'list'>" Create List ${componentInstances}
344 ... ELSE Set Variable ${componentInstances}
345 :FOR ${item} IN @{componentInstancesList}
346 \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${item} ${nf_role}
347 \ Run Keyword If '${test}' == 'FAIL' Continue For Loop
348 \ ${componentInstance1}= Set Variable ${item}
349 :FOR ${comp} IN @{resp['componentInstancesProperties']["${componentInstance1}"]}
350 \ ${name} Set Variable ${comp['name']}
351 \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${name} network_role
352 \ Run Keyword If '${test}' == 'FAIL' Continue For Loop
353 \ ${description} Set Variable ${comp['description']}
354 \ ${description}= Replace String ${description} ${\n} \
355 \ ${uniqueId} Set Variable ${comp['uniqueId']}
356 \ ${parentUniqueId} Set Variable ${comp['parentUniqueId']}
357 \ ${ownerId} Set Variable ${comp['ownerId']}
358 \ ${dict}= Create Dictionary parentUniqueId=${parentUniqueId} ownerId=${ownerId} uniqueId=${uniqueId} description=${description}
359 \ Run Keyword If '${name}'=='network_role' Set To Dictionary ${dict} name=${name} value=${nf_role}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500360 \ ${data}= Fill JSON Template File ${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} ${dict}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500361 \ ${response}= Set ASDC Catalog Resource Component Instance Properties ${catalog_parent_service_id} ${catalog_service_id} ${data}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500362
bdfreeman1421b2a49512018-11-25 07:32:19 -0500363
364Setup SDC Catalog Resource AllottedResource Properties
365 [Documentation] Set up Allotted Resource properties and inputs
366 [Arguments] ${catalog_service_id} ${nf_role} ${catalog_resource_id} ${invariantUUID} ${UUID} ${node_type}
367 # Set component instances properties
368 ${nf_role_lc}= Convert To Lowercase ${nf_role}
369 ${resp}= Get ASDC Catalog Resource Component Instances Properties For Resource ${catalog_resource_id}
370 ${componentInstances} Set Variable @{resp['componentInstancesProperties']}
371 # componentInstances can have 1 or more than 1 entry
372 ${passed}= Run Keyword And Return Status Evaluate type(${componentInstances})
373 ${type}= Run Keyword If ${passed} Evaluate type(${componentInstances})
374 ${componentInstancesList}= Run Keyword If "${type}"!="<type 'list'>" Create List ${componentInstances}
375 ... ELSE Set Variable ${componentInstances}
376 :FOR ${item} IN @{componentInstancesList}
377 \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${item} ${nf_role_lc}
378 \ Run Keyword If '${test}' == 'FAIL' Continue For Loop
379 \ ${componentInstance1}= Set Variable ${item}
380 ${dict}= Create Dictionary
381 :FOR ${comp} IN @{resp['componentInstancesProperties']["${componentInstance1}"]}
382 \ ${name} Set Variable ${comp['name']}
383 \ ${test} ${v}= Run Keyword and Ignore Error Should Contain Any ${name} network_role providing_service_invariant_uuid providing_service_uuid providing_service_name uniqueId
384 \ Run Keyword If '${test}' == 'FAIL' Continue For Loop
385 \ ${parentUniqueId} Set Variable ${comp['parentUniqueId']}
386 \ ${ownerId} Set Variable ${comp['ownerId']}
387 \ Set To Dictionary ${dict} parentUniqueId=${parentUniqueId} ownerId=${ownerId}
388 \ Run Keyword If '${name}'=='providing_service_invariant_uuid' Set To Dictionary ${dict} providing_service_invariant_uuid=${invariantUUID}
389 \ Run Keyword If '${name}'=='providing_service_uuid' Set To Dictionary ${dict} providing_service_uuid=${UUID}
390 \ Run Keyword If '${name}'=='providing_service_name' Set To Dictionary ${dict} providing_service_name=${node_type}
391 # Sets it for each loop but should be one
392 \ ${uniqueId} Set Variable ${comp['uniqueId']}
393 \ ${uniqueId} Fetch From Left ${uniqueId} .
394 \ Set To Dictionary ${dict} uniqueId=${uniqueId}
395 ${data}= Fill JSON Template File ${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE} ${dict}
396 ${response}= Set ASDC Catalog Resource Component Instance Properties For Resource ${catalog_resource_id} ${componentInstance1} ${data}
397 Log To Console resp=${response}
398
399
400Setup SDC Catalog Resource AllottedResource Inputs
401 [Documentation] Set up Allotted Resource inputs
402 [Arguments] ${catalog_service_id} ${nf_role} ${catalog_resource_id}
403 # Set vnf inputs
404 ${resp}= Get ASDC Catalog Resource Inputs ${catalog_resource_id}
405 ${dict}= Create Dictionary
DR695H910097e2019-05-08 13:55:32 -0400406 :FOR ${comp} IN @{resp['inputs']}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500407 \ ${name} Set Variable ${comp['name']}
408 \ ${uid} Set Variable ${comp['uniqueId']}
409 \ Run Keyword If '${name}'=='nf_type' Set To Dictionary ${dict} nf_type=${nf_role} nf_type_uid=${uid}
410 \ Run Keyword If '${name}'=='nf_role' Set To Dictionary ${dict} nf_role=${nf_role} nf_role_uid=${uid}
411 ${data}= Fill JSON Template File ${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE} ${dict}
412 ${response}= Set ASDC Catalog Resource VNF Inputs ${catalog_resource_id} ${data}
413 [Return] ${response}
414
Yang Xu2ec80382018-11-01 12:30:37 -0400415Setup ASDC Catalog Resource CDS Properties
416 [Documentation] Set up vfwng VNF properties and inputs for CDS
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500417 [Arguments] ${catalog_resource_id}
Yang Xu2ec80382018-11-01 12:30:37 -0400418 # Set vnf module properties
419 ${resp}= Get ASDC Catalog Resource Component Instances ${catalog_resource_id}
DR695H910097e2019-05-08 13:55:32 -0400420 :FOR ${comp} IN @{resp['componentInstances']}
Yang Xu2ec80382018-11-01 12:30:37 -0400421 \ ${name} Set Variable ${comp['name']}
422 \ ${uniqueId} Set Variable ${comp['uniqueId']}
423 \ ${actualComponentUid} Set Variable ${comp['actualComponentUid']}
424 \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${name} abstract_
425 \ Run Keyword If '${test}' == 'FAIL' Continue For Loop
426 \ ${response}= Get ASDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${actualComponentUid}
427 \ ${dict}= Create Dictionary parent_id=${response[6]['parentUniqueId']}
428 \ Run Keyword If '${name}'=='abstract_vfw' Set To Dictionary ${dict} nfc_function=vfw nfc_naming_policy=SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP
429 \ Run Keyword If '${name}'=='abstract_vpg' Set To Dictionary ${dict} nfc_function=vpg nfc_naming_policy=SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP
430 \ Run Keyword If '${name}'=='abstract_vsn' Set To Dictionary ${dict} nfc_function=vsn nfc_naming_policy=SDNC_Policy.ONAP_VSN_NAMING_TIMESTAMP
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500431 \ ${data}= Fill JSON Template File ${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} ${dict}
432 \ ${response}= Set ASDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${data}
Yang Xu2ec80382018-11-01 12:30:37 -0400433 \ Log To Console resp=${response}
434
435 # Set vnf inputs
436 ${resp}= Get ASDC Catalog Resource Inputs ${catalog_resource_id}
437 ${dict}= Create Dictionary
DR695H910097e2019-05-08 13:55:32 -0400438 :FOR ${comp} IN @{resp['inputs']}
Yang Xu2ec80382018-11-01 12:30:37 -0400439 \ ${name} Set Variable ${comp['name']}
440 \ ${uid} Set Variable ${comp['uniqueId']}
441 \ Run Keyword If '${name}'=='nf_function' Set To Dictionary ${dict} nf_function=ONAP-FIREWALL nf_function_uid=${uid}
442 \ Run Keyword If '${name}'=='nf_type' Set To Dictionary ${dict} nf_type=FIREWALL nf_type_uid=${uid}
443 \ Run Keyword If '${name}'=='nf_naming_code' Set To Dictionary ${dict} nf_naming_code=vfw nf_naming_code_uid=${uid}
444 \ Run Keyword If '${name}'=='nf_role' Set To Dictionary ${dict} nf_role=vFW nf_role_uid=${uid}
445 \ Run Keyword If '${name}'=='cloud_env' Set To Dictionary ${dict} cloud_env=openstack cloud_env_uid=${uid}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500446 ${data}= Fill JSON Template File ${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} ${dict}
Yang Xu2ec80382018-11-01 12:30:37 -0400447 ${response}= Set ASDC Catalog Resource VNF Inputs ${catalog_resource_id} ${data}
448
DR695Hccff30b2017-02-17 18:44:24 -0500449Add ASDC License Model
kaihlavi06fa4ee2019-05-22 19:08:14 +0300450 [Documentation] Creates an ASDC License Model and returns its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400451 ${uuid}= Generate UUID
452 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
DR695Hccff30b2017-02-17 18:44:24 -0500453 ${map}= Create Dictionary vendor_name=${shortened_uuid}
454 ${data}= Fill JSON Template File ${ASDC_LICENSE_MODEL_TEMPLATE} ${map}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500455 ${resp}= Run ASDC Post Request ${ASDC_VENDOR_LICENSE_MODEL_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500456 Should Be Equal As Strings ${resp.status_code} 200
Brian Freemanb568e5e2018-04-05 21:03:38 -0500457 [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']}
DR695Hccff30b2017-02-17 18:44:24 -0500458Get ASDC License Model
459 [Documentation] gets an asdc license model by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400460 [Arguments] ${id} ${version_id}=0.1
Brian Freeman44b8bb32018-05-03 21:08:42 -0500461 ${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 -0400462 [Return] ${resp.json()}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500463
kaihlavi06fa4ee2019-05-22 19:08:14 +0300464Get ASDC License Models
465 [Documentation] Gets all ASDC License Models
466 ${resp}= Run ASDC Get Request ${ASDC_VENDOR_LICENSE_MODEL_PATH} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500467 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300468
DR695Hccff30b2017-02-17 18:44:24 -0500469Checkin ASDC License Model
kaihlavi06fa4ee2019-05-22 19:08:14 +0300470 [Documentation] Checks in an ASDC License Model by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400471 [Arguments] ${id} ${version_id}=0.1
DR695Hccff30b2017-02-17 18:44:24 -0500472 ${map}= Create Dictionary action=Checkin
473 ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500474 ${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}
475 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500476 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300477
DR695Hccff30b2017-02-17 18:44:24 -0500478Submit ASDC License Model
kaihlavi06fa4ee2019-05-22 19:08:14 +0300479 [Documentation] Submits an ASDC License Model by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400480 [Arguments] ${id} ${version_id}=0.1
DR695Hccff30b2017-02-17 18:44:24 -0500481 ${map}= Create Dictionary action=Submit
482 ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500483 ${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}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500484 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500485 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300486
DR695Hccff30b2017-02-17 18:44:24 -0500487Checkin ASDC Software Product
kaihlavi06fa4ee2019-05-22 19:08:14 +0300488 [Documentation] Checks in an ASDC Software Product by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400489 [Arguments] ${id} ${version_id}=0.1
DR695Hccff30b2017-02-17 18:44:24 -0500490 ${map}= Create Dictionary action=Checkin
Jerry Floode2a48d72017-06-21 15:06:29 -0400491 ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500492 ${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}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500493 Should Be Equal As Strings ${resp.status_code} 200
Jerry Floode2a48d72017-06-21 15:06:29 -0400494 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300495
Jerry Floode2a48d72017-06-21 15:06:29 -0400496Validate ASDC Software Product
kaihlavi06fa4ee2019-05-22 19:08:14 +0300497 [Documentation] Validates an ASDC Software Product by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400498 [Arguments] ${id} ${version_id}=0.1
499 ${data}= Catenate
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500500 ${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}
501 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500502 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300503
DR695Hccff30b2017-02-17 18:44:24 -0500504Submit ASDC Software Product
kaihlavi06fa4ee2019-05-22 19:08:14 +0300505 [Documentation] Submits an ASDC Software Product by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400506 [Arguments] ${id} ${version_id}=0.1
DR695Hccff30b2017-02-17 18:44:24 -0500507 ${map}= Create Dictionary action=Submit
Jerry Floode2a48d72017-06-21 15:06:29 -0400508 ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500509 ${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}
510 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500511 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300512
DR695Hccff30b2017-02-17 18:44:24 -0500513Package ASDC Software Product
kaihlavi06fa4ee2019-05-22 19:08:14 +0300514 [Documentation] Creates a package of an ASDC Software Product by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400515 [Arguments] ${id} ${version_id}=0.1
DR695Hccff30b2017-02-17 18:44:24 -0500516 ${map}= Create Dictionary action=Create_Package
Jerry Floode2a48d72017-06-21 15:06:29 -0400517 ${data}= Fill JSON Template File ${ASDC_ACTION_TEMPLATE} ${map}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500518 ${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}
519 Should Be Equal As Strings ${resp.status_code} 200
Jerry Floode2a48d72017-06-21 15:06:29 -0400520 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300521
DR695Hccff30b2017-02-17 18:44:24 -0500522Add ASDC Entitlement Pool
kaihlavi06fa4ee2019-05-22 19:08:14 +0300523 [Documentation] Creates an ASDC Entitlement Pool and returns its id
Brian Freeman15033782019-03-22 15:48:55 -0500524 [Arguments] ${license_model_id} ${version_id}=0.1 ${license_start_date}="01/01/1960" ${license_end_date}="01/01/1961"
Jerry Floode2a48d72017-06-21 15:06:29 -0400525 ${uuid}= Generate UUID
526 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
Brian Freeman15033782019-03-22 15:48:55 -0500527 ${map}= Create Dictionary entitlement_pool_name=${shortened_uuid} license_start_date=${license_start_date} license_end_date=${license_end_date}
Jerry Floode2a48d72017-06-21 15:06:29 -0400528 ${data}= Fill JSON Template File ${ASDC_ENTITLEMENT_POOL_TEMPLATE} ${map}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500529 ${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}
530 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500531 [Return] ${resp.json()['value']}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300532
DR695Hccff30b2017-02-17 18:44:24 -0500533Get ASDC Entitlement Pool
kaihlavi06fa4ee2019-05-22 19:08:14 +0300534 [Documentation] Gets an ASDC Entitlement Pool by its id
DR695Hccff30b2017-02-17 18:44:24 -0500535 [Arguments] ${license_model_id} ${pool_id}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500536 ${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 -0500537 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300538
DR695Hccff30b2017-02-17 18:44:24 -0500539Add ASDC License Group
kaihlavi06fa4ee2019-05-22 19:08:14 +0300540 [Documentation] Creates an ASDC License Group and returns its id
Brian Freeman15033782019-03-22 15:48:55 -0500541 [Arguments] ${license_model_id} ${version_id}=1.0 ${license_start_date}="01/01/1960" ${license_end_date}="01/01/1961"
Jerry Floode2a48d72017-06-21 15:06:29 -0400542 ${uuid}= Generate UUID
543 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
Brian Freeman15033782019-03-22 15:48:55 -0500544 ${map}= Create Dictionary key_group_name=${shortened_uuid} license_start_date=${license_start_date} license_end_date=${license_end_date}
Jerry Floode2a48d72017-06-21 15:06:29 -0400545 ${data}= Fill JSON Template File ${ASDC_KEY_GROUP_TEMPLATE} ${map}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500546 ${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}
547 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500548 [Return] ${resp.json()['value']}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300549
DR695Hccff30b2017-02-17 18:44:24 -0500550Get ASDC License Group
kaihlavi06fa4ee2019-05-22 19:08:14 +0300551 [Documentation] Gets an ASDC License Group by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400552 [Arguments] ${license_model_id} ${group_id} ${version_id}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500553 ${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 -0500554 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300555
DR695Hccff30b2017-02-17 18:44:24 -0500556Add ASDC Feature Group
kaihlavi06fa4ee2019-05-22 19:08:14 +0300557 [Documentation] Creates an ASDC Feature Group and returns its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400558 [Arguments] ${license_model_id} ${key_group_id} ${entitlement_pool_id} ${version_id}=0.1
559 ${uuid}= Generate UUID
560 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
Jerry Flood80ff9852017-08-11 06:47:14 -0400561 ${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 -0400562 ${data}= Fill JSON Template File ${ASDC_FEATURE_GROUP_TEMPLATE} ${map}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500563 ${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}
564 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500565 [Return] ${resp.json()['value']}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300566
DR695Hccff30b2017-02-17 18:44:24 -0500567Get ASDC Feature Group
kaihlavi06fa4ee2019-05-22 19:08:14 +0300568 [Documentation] Gets an ASDC Feature Group by its id
DR695Hccff30b2017-02-17 18:44:24 -0500569 [Arguments] ${license_model_id} ${group_id}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500570 ${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 -0500571 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300572
DR695Hccff30b2017-02-17 18:44:24 -0500573Add ASDC License Agreement
kaihlavi06fa4ee2019-05-22 19:08:14 +0300574 [Documentation] Creates an ASDC License Agreement and returns its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400575 [Arguments] ${license_model_id} ${feature_group_id} ${version_id}=0.1
576 ${uuid}= Generate UUID
577 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
DR695Hccff30b2017-02-17 18:44:24 -0500578 ${map}= Create Dictionary license_agreement_name=${shortened_uuid} feature_group_id=${feature_group_id}
Jerry Floode2a48d72017-06-21 15:06:29 -0400579 ${data}= Fill JSON Template File ${ASDC_LICENSE_AGREEMENT_TEMPLATE} ${map}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500580 ${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}
581 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500582 [Return] ${resp.json()['value']}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300583
DR695Hccff30b2017-02-17 18:44:24 -0500584Get ASDC License Agreement
kaihlavi06fa4ee2019-05-22 19:08:14 +0300585 [Documentation] Gets an ASDC License Agreement by its id
DR695Hccff30b2017-02-17 18:44:24 -0500586 [Arguments] ${license_model_id} ${agreement_id}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500587 ${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 -0500588 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300589
DR695Hccff30b2017-02-17 18:44:24 -0500590Add ASDC Software Product
kaihlavi06fa4ee2019-05-22 19:08:14 +0300591 [Documentation] Creates an ASDC Software Product and returns its id
Brian Freeman9c42ae12018-11-27 14:33:27 -0500592 [Arguments] ${license_agreement_id} ${feature_group_id} ${license_model_name} ${license_model_id} ${license_model_version_id} ${name_prefix}
Jerry Floode2a48d72017-06-21 15:06:29 -0400593 ${uuid}= Generate UUID
Brian Freeman9c42ae12018-11-27 14:33:27 -0500594 ${shortened_uuid}= Evaluate str("${uuid}")[:13]
595 ${software_product_name}= Catenate ${name_prefix} ${shortened_uuid}
596 ${map}= Create Dictionary software_product_name=${software_product_name} 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 -0400597 ${data}= Fill JSON Template File ${ASDC_SOFTWARE_PRODUCT_TEMPLATE} ${map}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500598 ${resp}= Run ASDC Post Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ONBOARD_ENDPOINT}
599 Should Be Equal As Strings ${resp.status_code} 200
Brian Freemanb568e5e2018-04-05 21:03:38 -0500600 [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300601
DR695Hccff30b2017-02-17 18:44:24 -0500602Get ASDC Software Product
kaihlavi06fa4ee2019-05-22 19:08:14 +0300603 [Documentation] Gets an ASDC Software Product by its id
Jerry Floode2a48d72017-06-21 15:06:29 -0400604 [Arguments] ${software_product_id} ${version_id}=0.1
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500605 ${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 -0500606 [Return] ${resp.json()}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500607
DR695Hccff30b2017-02-17 18:44:24 -0500608Add ASDC Catalog Resource
kaihlavi06fa4ee2019-05-22 19:08:14 +0300609 [Documentation] Creates an ASDC Catalog Resource and returns its id
DR695Hccff30b2017-02-17 18:44:24 -0500610 [Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id}
611 ${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 -0400612 ${data}= Fill JSON Template File ${ASDC_CATALOG_RESOURCE_TEMPLATE} ${map}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500613 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH} ${data} ${ASDC_DESIGNER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500614 Should Be Equal As Strings ${resp.status_code} 201
DR695Hccff30b2017-02-17 18:44:24 -0500615 [Return] ${resp.json()['uniqueId']}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500616
617Add ASDC Allotted Resource Catalog Resource
kaihlavi06fa4ee2019-05-22 19:08:14 +0300618 [Documentation] Creates an ASDC Allotted Resource Catalog Resource and returns its id
bdfreeman1421b2a49512018-11-25 07:32:19 -0500619 [Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id} ${subcategory}
620 ${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} subcategory=${subcategory}
621 ${data}= Fill JSON Template File ${ASDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE} ${map}
622 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH} ${data} ${ASDC_DESIGNER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500623 Should Be Equal As Strings ${resp.status_code} 201
bdfreeman1421b2a49512018-11-25 07:32:19 -0500624 [Return] ${resp.json()['uniqueId']}
625
DR695Hccff30b2017-02-17 18:44:24 -0500626Mark ASDC Catalog Resource Inactive
kaihlavi06fa4ee2019-05-22 19:08:14 +0300627 [Documentation] Marks ASDC Catalog Resource as inactive
DR695Hccff30b2017-02-17 18:44:24 -0500628 [Arguments] ${catalog_resource_id}
629 ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${ASDC_DESIGNER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500630 Should Be Equal As Strings ${resp.status_code} 204
DR695Hccff30b2017-02-17 18:44:24 -0500631 [Return] ${resp}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300632
DR695Hccff30b2017-02-17 18:44:24 -0500633Delete Inactive ASDC Catalog Resources
kaihlavi06fa4ee2019-05-22 19:08:14 +0300634 [Documentation] Delete all ASDC Catalog Resources that are inactive
DR695Hccff30b2017-02-17 18:44:24 -0500635 ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} ${ASDC_DESIGNER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500636 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500637 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300638
DR695Hccff30b2017-02-17 18:44:24 -0500639Get ASDC Catalog Resource
kaihlavi06fa4ee2019-05-22 19:08:14 +0300640 [Documentation] Gets an ASDC Catalog Resource by its id
DR695Hccff30b2017-02-17 18:44:24 -0500641 [Arguments] ${catalog_resource_id}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500642 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${ASDC_DESIGNER_USER_ID}
DR695Hccff30b2017-02-17 18:44:24 -0500643 [Return] ${resp.json()}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500644
Yang Xu2ec80382018-11-01 12:30:37 -0400645Get ASDC Catalog Resource Component Instances
kaihlavi06fa4ee2019-05-22 19:08:14 +0300646 [Documentation] Gets component instances of an ASDC Catalog Resource by its id
Yang Xu2ec80382018-11-01 12:30:37 -0400647 [Arguments] ${catalog_resource_id}
648 ${resp}= Run ASDC Get Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstances ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
649 [Return] ${resp.json()}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500650
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500651Get ASDC Catalog Resource Deployment Artifact Properties
kaihlavi06fa4ee2019-05-22 19:08:14 +0300652 [Documentation] Gets deployment artifact properties of an ASDC Catalog Resource by its id
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500653 [Arguments] ${catalog_resource_id}
654 #${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstances ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
655 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_resource_id}/filteredDataByParams?include=deploymentArtifacts ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
656 [Return] ${resp.json()}
657
658
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500659Get ASDC Catalog Resource Component Instances Properties
kaihlavi06fa4ee2019-05-22 19:08:14 +0300660 [Documentation] Gets ASDC Catalog Resource component instances properties by its id
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500661 [Arguments] ${catalog_resource_id}
662 #${resp}= Run ASDC Get Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstancesProperties ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
663 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstancesProperties ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ENDPOINT}
664 [Return] ${resp.json()}
665
bdfreeman1421b2a49512018-11-25 07:32:19 -0500666Get ASDC Catalog Resource Component Instances Properties For Resource
kaihlavi06fa4ee2019-05-22 19:08:14 +0300667 [Documentation] Gets ASDC Catalog Resource component instances properties for a Resource (VF) by its id
bdfreeman1421b2a49512018-11-25 07:32:19 -0500668 [Arguments] ${catalog_resource_id}
669 ${resp}= Run ASDC Get Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstancesProperties ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
670 [Return] ${resp.json()}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500671
Yang Xu2ec80382018-11-01 12:30:37 -0400672Get ASDC Catalog Resource Inputs
kaihlavi06fa4ee2019-05-22 19:08:14 +0300673 [Documentation] Gets ASDC Catalog Resource inputs by its id
Yang Xu2ec80382018-11-01 12:30:37 -0400674 [Arguments] ${catalog_resource_id}
675 ${resp}= Run ASDC Get Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=inputs ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
676 [Return] ${resp.json()}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500677
Yang Xu2ec80382018-11-01 12:30:37 -0400678Get ASDC Catalog Resource Component Instance Properties
kaihlavi06fa4ee2019-05-22 19:08:14 +0300679 [Documentation] Gets component instance properties of an ASDC Catalog Resource by their ids
Yang Xu2ec80382018-11-01 12:30:37 -0400680 [Arguments] ${catalog_resource_id} ${component_instance_id} ${component_id}
681 ${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}
682 [Return] ${resp.json()}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500683
Yang Xu2ec80382018-11-01 12:30:37 -0400684Set ASDC Catalog Resource Component Instance Properties
kaihlavi06fa4ee2019-05-22 19:08:14 +0300685 [Documentation] Sets ASDC Catalog Resource component instance properties by ids
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500686 [Arguments] ${catalog_resource_id} ${component_parent_service_id} ${data}
687 #${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}
688 ${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}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500689 [Return] ${resp.json()}
690
691Set ASDC Catalog Resource Component Instance Properties For Resource
kaihlavi06fa4ee2019-05-22 19:08:14 +0300692 [Documentation] Sets ASDC Resource component instance properties by ids
bdfreeman1421b2a49512018-11-25 07:32:19 -0500693 [Arguments] ${catalog_parent_resource_id} ${catalog_resource_id} ${data}
694 #${resp}= Run ASDC Post Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_parent_resource_id}/resourceInstance/${catalog_resource_id}/inputs ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
695 ${resp}= Run ASDC Post Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_parent_resource_id}/resourceInstance/${catalog_resource_id}/properties ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
696 [Return] ${resp.json()}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500697
Yang Xu74cfb862018-12-06 21:57:32 -0500698Set CDS Catalog Resource Component Instance Properties
kaihlavi06fa4ee2019-05-22 19:08:14 +0300699 [Documentation] Sets CDS Catalog Resource component instance properties by ids
Yang Xu74cfb862018-12-06 21:57:32 -0500700 [Arguments] ${catalog_resource_id} ${component_instance_id} ${data}
701 ${resp}= Run ASDC Post Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/resourceInstance/${component_instance_id}/inputs ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
702 [Return] ${resp.json()}
703
Yang Xu2ec80382018-11-01 12:30:37 -0400704Set ASDC Catalog Resource VNF Inputs
kaihlavi06fa4ee2019-05-22 19:08:14 +0300705 [Documentation] Sets VNF Inputs for an ASDC Catalog Resource by its id
Yang Xu2ec80382018-11-01 12:30:37 -0400706 [Arguments] ${catalog_resource_id} ${data}
707 ${resp}= Run ASDC Post Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/update/inputs ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
708 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300709
Brian Freeman79b00ce2018-11-01 14:57:53 -0500710Get SDC Demo Vnf Catalog Resource
kaihlavi06fa4ee2019-05-22 19:08:14 +0300711 [Documentation] Gets Resource ids of demonstration VNFs for instantiation
Brian Freeman79b00ce2018-11-01 14:57:53 -0500712 [Arguments] ${service_name}
713 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/serviceName/${service_name}/serviceVersion/1.0
714 @{ITEMS}= Copy List ${resp.json()['componentInstances']}
715 ${demo_catalog_resource}= Create Dictionary
716 :FOR ${ELEMENT} IN @{ITEMS}
717 \ Log ${ELEMENT['name']}
718 \ Log ${ELEMENT['groupInstances'][0]['groupName']}
719 \ ${vnf}= Get VNF From Group Name ${ELEMENT['groupInstances'][0]['groupName']} ${service_name}
720 \ ${vnf_data}= Create Dictionary vnf_type=${ELEMENT['name']} vf_module=${ELEMENT['groupInstances'][0]['groupName']}
721 \ LOG ${vnf_data}
722 \ Set To Dictionary ${demo_catalog_resource} ${vnf}=${vnf_data}
723 \ LOG ${demo_catalog_resource}
724 [Return] ${demo_catalog_resource}
725
726Get VNF From Group Name
kaihlavi06fa4ee2019-05-22 19:08:14 +0300727 [Documentation] Looks up VNF key from service mapping for a regex on group_name and service_name
Brian Freeman79b00ce2018-11-01 14:57:53 -0500728 [Arguments] ${group_name} ${service_name}
729 ${vnf}= Set Variable If
Brian Freeman4c71b0b2019-04-26 08:08:56 -0500730 ... ('${service_name}'=='demoVFWCL') and ('base_vfw' in '${group_name}') vFWCLvFWSNK
731 ... ('${service_name}'=='demoVFWCL') and ('base_vpkg' in '${group_name}') vFWCLvPKG
Brian Freeman79b00ce2018-11-01 14:57:53 -0500732 ... ('${service_name}'=='demoVLB') and ('base_vlb' in '${group_name}') vLB
733 [Return] ${vnf}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300734
DR695Hccff30b2017-02-17 18:44:24 -0500735Checkin ASDC Catalog Resource
kaihlavi06fa4ee2019-05-22 19:08:14 +0300736 [Documentation] Checks in an ASDC Catalog Resource by its id
DR695Hccff30b2017-02-17 18:44:24 -0500737 [Arguments] ${catalog_resource_id}
738 ${map}= Create Dictionary user_remarks=Robot remarks
Jerry Floode2a48d72017-06-21 15:06:29 -0400739 ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500740 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${ASDC_DESIGNER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500741 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500742 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300743
DR695Hccff30b2017-02-17 18:44:24 -0500744Request Certify ASDC Catalog Resource
kaihlavi06fa4ee2019-05-22 19:08:14 +0300745 [Documentation] Requests certification of an ASDC Catalog Resource by its id
DR695Hccff30b2017-02-17 18:44:24 -0500746 [Arguments] ${catalog_resource_id}
747 ${map}= Create Dictionary user_remarks=Robot remarks
Jerry Floode2a48d72017-06-21 15:06:29 -0400748 ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500749 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500750 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500751 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300752
DR695Hccff30b2017-02-17 18:44:24 -0500753Start Certify ASDC Catalog Resource
kaihlavi06fa4ee2019-05-22 19:08:14 +0300754 [Documentation] Start certification of an ASDC Catalog Resource by its id
DR695Hccff30b2017-02-17 18:44:24 -0500755 [Arguments] ${catalog_resource_id}
756 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${ASDC_TESTER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500757 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500758 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300759
DR695Hccff30b2017-02-17 18:44:24 -0500760Certify ASDC Catalog Resource
kaihlavi06fa4ee2019-05-22 19:08:14 +0300761 [Documentation] Certifies an ASDC Catalog Resource by its id and returns the new id
Brian Freemandb1e7412018-08-01 12:46:01 -0500762 [Arguments] ${catalog_resource_id} ${user_id}=${ASDC_TESTER_USER_ID}
DR695Hccff30b2017-02-17 18:44:24 -0500763 ${map}= Create Dictionary user_remarks=Robot remarks
Jerry Floode2a48d72017-06-21 15:06:29 -0400764 ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
Brian Freemandb1e7412018-08-01 12:46:01 -0500765 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${user_id}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500766 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500767 [Return] ${resp.json()['uniqueId']}
Jerry Flood6bd1afa2017-10-09 09:59:23 -0400768
DR695Hccff30b2017-02-17 18:44:24 -0500769Upload ASDC Heat Package
kaihlavi06fa4ee2019-05-22 19:08:14 +0300770 [Documentation] Creates an ASDC Software Product and returns its id
Brian Freemanf508ab22018-03-15 21:19:41 -0500771 [Arguments] ${software_product_id} ${file_path} ${version_id}=0.1
Jerry Flood6bd1afa2017-10-09 09:59:23 -0400772 ${files}= Create Dictionary
773 Create Multi Part ${files} upload ${file_path} contentType=application/zip
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500774 ${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}
775 Should Be Equal As Strings ${resp.status_code} 200
Jerry Flood6bd1afa2017-10-09 09:59:23 -0400776
DR695Hccff30b2017-02-17 18:44:24 -0500777Add ASDC Catalog Service
kaihlavi06fa4ee2019-05-22 19:08:14 +0300778 [Documentation] Creates an ASDC Catalog Service and returns its id
jf986075010a42017-02-22 16:52:54 -0500779 [Arguments] ${catalog_service_name}
Jerry Floode2a48d72017-06-21 15:06:29 -0400780 ${uuid}= Generate UUID
jf986075010a42017-02-22 16:52:54 -0500781 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
Jerry Floode2a48d72017-06-21 15:06:29 -0400782 ${catalog_service_name}= Set Variable If '${catalog_service_name}' =='' ${shortened_uuid} ${catalog_service_name}
jf986075010a42017-02-22 16:52:54 -0500783 ${map}= Create Dictionary service_name=${catalog_service_name}
Jerry Floode2a48d72017-06-21 15:06:29 -0400784 ${data}= Fill JSON Template File ${ASDC_CATALOG_SERVICE_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500785 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH} ${data} ${ASDC_DESIGNER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500786 Should Be Equal As Strings ${resp.status_code} 201
DR695Hccff30b2017-02-17 18:44:24 -0500787 [Return] ${resp.json()['uniqueId']}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300788
DR695Hccff30b2017-02-17 18:44:24 -0500789Mark ASDC Catalog Service Inactive
kaihlavi06fa4ee2019-05-22 19:08:14 +0300790 [Documentation] Deletes an ASDC Catalog Service
DR695Hccff30b2017-02-17 18:44:24 -0500791 [Arguments] ${catalog_service_id}
792 ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${ASDC_DESIGNER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500793 Should Be Equal As Strings ${resp.status_code} 204
DR695Hccff30b2017-02-17 18:44:24 -0500794 [Return] ${resp}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300795
DR695Hccff30b2017-02-17 18:44:24 -0500796Delete Inactive ASDC Catalog Services
kaihlavi06fa4ee2019-05-22 19:08:14 +0300797 [Documentation] Delete all ASDC Catalog Services that are inactive
DR695Hccff30b2017-02-17 18:44:24 -0500798 ${resp}= Run ASDC Delete Request ${ASDC_CATALOG_INACTIVE_SERVICES_PATH} ${ASDC_DESIGNER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500799 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500800 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300801
DR695Hccff30b2017-02-17 18:44:24 -0500802Get ASDC Catalog Service
kaihlavi06fa4ee2019-05-22 19:08:14 +0300803 [Documentation] Gets an ASDC Catalog Service by its id
DR695Hccff30b2017-02-17 18:44:24 -0500804 [Arguments] ${catalog_service_id}
805 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${ASDC_DESIGNER_USER_ID}
806 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300807
DR695Hccff30b2017-02-17 18:44:24 -0500808Checkin ASDC Catalog Service
kaihlavi06fa4ee2019-05-22 19:08:14 +0300809 [Documentation] Checks in an ASDC Catalog Service by its id
DR695Hccff30b2017-02-17 18:44:24 -0500810 [Arguments] ${catalog_service_id}
811 ${map}= Create Dictionary user_remarks=Robot remarks
Jerry Floode2a48d72017-06-21 15:06:29 -0400812 ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500813 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${ASDC_DESIGNER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500814 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500815 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300816
DR695Hccff30b2017-02-17 18:44:24 -0500817Request Certify ASDC Catalog Service
kaihlavi06fa4ee2019-05-22 19:08:14 +0300818 [Documentation] Requests certification of an ASDC Catalog Service by its id
DR695Hccff30b2017-02-17 18:44:24 -0500819 [Arguments] ${catalog_service_id}
820 ${map}= Create Dictionary user_remarks=Robot remarks
Jerry Floode2a48d72017-06-21 15:06:29 -0400821 ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500822 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500823 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500824 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300825
DR695Hccff30b2017-02-17 18:44:24 -0500826Start Certify ASDC Catalog Service
kaihlavi06fa4ee2019-05-22 19:08:14 +0300827 [Documentation] Start certification of an ASDC Catalog Service by its id
DR695Hccff30b2017-02-17 18:44:24 -0500828 [Arguments] ${catalog_service_id}
829 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${ASDC_TESTER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500830 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500831 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300832
DR695Hccff30b2017-02-17 18:44:24 -0500833Certify ASDC Catalog Service
kaihlavi06fa4ee2019-05-22 19:08:14 +0300834 [Documentation] Certifies an ASDC Catalog Service by its id and returns the new id
DR695Hccff30b2017-02-17 18:44:24 -0500835 [Arguments] ${catalog_service_id}
836 ${map}= Create Dictionary user_remarks=Robot remarks
Jerry Floode2a48d72017-06-21 15:06:29 -0400837 ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500838 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${ASDC_TESTER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500839 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500840 [Return] ${resp.json()['uniqueId']}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300841
DR695Hccff30b2017-02-17 18:44:24 -0500842Approve ASDC Catalog Service
kaihlavi06fa4ee2019-05-22 19:08:14 +0300843 [Documentation] Approves an ASDC Catalog Service by its id
DR695Hccff30b2017-02-17 18:44:24 -0500844 [Arguments] ${catalog_service_id}
845 ${map}= Create Dictionary user_remarks=Robot remarks
Jerry Floode2a48d72017-06-21 15:06:29 -0400846 ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500847 ${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}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500848 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500849 [Return] ${resp.json()}
850Distribute ASDC Catalog Service
851 [Documentation] distribute an asdc Catalog Service by its id
852 [Arguments] ${catalog_service_id}
853 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} ${None} ${ASDC_OPS_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500854 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500855 [Return] ${resp.json()}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500856
DR695Hccff30b2017-02-17 18:44:24 -0500857Add ASDC Resource Instance
kaihlavi06fa4ee2019-05-22 19:08:14 +0300858 [Documentation] Creates an ASDC Resource Instance and returns its id
Yang Xufac7a632019-05-17 01:01:26 -0400859 [Arguments] ${catalog_service_id} ${catalog_resource_id} ${catalog_resource_name} ${xoffset}=${0} ${yoffset}=${0} ${resourceType}=VF
DR695Hccff30b2017-02-17 18:44:24 -0500860 ${milli_timestamp}= Generate MilliTimestamp UUID
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500861 ${xoffset}= Set Variable ${xoffset+306}
862 ${yoffset}= Set Variable ${yoffset+248}
Yang Xufac7a632019-05-17 01:01:26 -0400863 ${map}= Create Dictionary catalog_resource_id=${catalog_resource_id} catalog_resource_name=${catalog_resource_name} milli_timestamp=${milli_timestamp} posX=${xoffset} posY=${yoffset} originType=${resourceType}
Jerry Floode2a48d72017-06-21 15:06:29 -0400864 ${data}= Fill JSON Template File ${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${map}
DR695Hccff30b2017-02-17 18:44:24 -0500865 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${ASDC_DESIGNER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500866 Should Be Equal As Strings ${resp.status_code} 201
DR695Hccff30b2017-02-17 18:44:24 -0500867 [Return] ${resp.json()['uniqueId']}
Brian Freemaneef7c6f2018-11-16 18:42:21 -0500868
bdfreeman1421b2a49512018-11-25 07:32:19 -0500869Add ASDC Resource Instance To Resource
kaihlavi06fa4ee2019-05-22 19:08:14 +0300870 [Documentation] Creates an ASDC Resource Instance in a Resource (VF) and returns its id
Yang Xufac7a632019-05-17 01:01:26 -0400871 [Arguments] ${parent_catalog_resource_id} ${catalog_resource_id} ${catalog_resource_name} ${xoffset}=${0} ${yoffset}=${0} ${resourceType}=VF
bdfreeman1421b2a49512018-11-25 07:32:19 -0500872 ${milli_timestamp}= Generate MilliTimestamp UUID
873 ${xoffset}= Set Variable ${xoffset+306}
874 ${yoffset}= Set Variable ${yoffset+248}
Yang Xufac7a632019-05-17 01:01:26 -0400875 ${map}= Create Dictionary catalog_resource_id=${catalog_resource_id} catalog_resource_name=${catalog_resource_name} milli_timestamp=${milli_timestamp} posX=${xoffset} posY=${yoffset} originType=${resourceType}
bdfreeman1421b2a49512018-11-25 07:32:19 -0500876 ${data}= Fill JSON Template File ${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${map}
877 ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${parent_catalog_resource_id}${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${ASDC_DESIGNER_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500878 Should Be Equal As Strings ${resp.status_code} 201
bdfreeman1421b2a49512018-11-25 07:32:19 -0500879 [Return] ${resp.json()['uniqueId']}
880
DR695Hccff30b2017-02-17 18:44:24 -0500881Get Catalog Service Distribution
kaihlavi06fa4ee2019-05-22 19:08:14 +0300882 [Documentation] Gets an ASDC Catalog Service distribution
DR695Hccff30b2017-02-17 18:44:24 -0500883 [Arguments] ${catalog_service_uuid}
884 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_uuid}${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH} ${ASDC_OPS_USER_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500885 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500886 [Return] ${resp.json()}
kaihlavi06fa4ee2019-05-22 19:08:14 +0300887
DR695Hccff30b2017-02-17 18:44:24 -0500888Check Catalog Service Distributed
kaihlavi06fa4ee2019-05-22 19:08:14 +0300889 [Documentation] Checks if an ASDC Catalog Service is distributed
Brian Freemanadaa2372018-10-24 12:25:22 -0500890 [Arguments] ${catalog_service_uuid} ${dist_status}
DR695Hccff30b2017-02-17 18:44:24 -0500891 ${dist_resp}= Get Catalog Service Distribution ${catalog_service_uuid}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500892 Should Be Equal As Strings ${dist_resp['distributionStatusOfServiceList'][0]['deployementStatus']} Distributed
DR695Hccff30b2017-02-17 18:44:24 -0500893 ${det_resp}= Get Catalog Service Distribution Details ${dist_resp['distributionStatusOfServiceList'][0]['distributionID']}
894 @{ITEMS}= Copy List ${det_resp['distributionStatusList']}
Brian Freemanf508ab22018-03-15 21:19:41 -0500895 Should Not Be Empty ${ITEMS}
Brian Freemana62644f2018-05-13 12:47:38 -0500896 ${SO_COMPLETE} Set Variable FALSE
bdfreeman1421b2a49512018-11-25 07:32:19 -0500897 ${dist_status} Set Variable CONTINUE
898 Should Not Be Empty ${ITEMS}
DR695Hccff30b2017-02-17 18:44:24 -0500899 :FOR ${ELEMENT} IN @{ITEMS}
Brian Freemanf508ab22018-03-15 21:19:41 -0500900 \ Log ${ELEMENT['omfComponentID']}
DR695Hccff30b2017-02-17 18:44:24 -0500901 \ Log ${ELEMENT['status']}
Brian Freeman41ab5e52018-08-08 14:24:23 -0500902 \ ${SO_COMPLETE} Set Variable If (('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_OK')) or ('${SO_COMPLETE}'=='TRUE') TRUE
Brian Freemaneca71072018-08-16 14:50:16 -0500903 \ Exit For Loop If ('${SO_COMPLETE}'=='TRUE')
904 \ Exit For Loop If ('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_ERROR')
Brian Freemanadaa2372018-10-24 12:25:22 -0500905 \ ${dist_status}= Set Variable If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml')) EXIT
906 \ Exit For Loop If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml'))
Brian Freemana62644f2018-05-13 12:47:38 -0500907 Should Be True ( '${SO_COMPLETE}'=='TRUE') SO Test
bdfreeman1421b2a49512018-11-25 07:32:19 -0500908
DR695Hccff30b2017-02-17 18:44:24 -0500909Get Catalog Service Distribution Details
kaihlavi06fa4ee2019-05-22 19:08:14 +0300910 [Documentation] Gets ASDC Catalog Service distribution details
DR695Hccff30b2017-02-17 18:44:24 -0500911 [Arguments] ${catalog_service_distribution_id}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500912 ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH}/${catalog_service_distribution_id} ${ASDC_OPS_USER_ID}
913 Should Be Equal As Strings ${resp.status_code} 200
DR695Hccff30b2017-02-17 18:44:24 -0500914 [Return] ${resp.json()}
915Run ASDC Health Check
916 [Documentation] Runs a ASDC health check
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500917 ${session}= Create Session asdc ${ASDC_FE_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500918 ${uuid}= Generate UUID
919 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500920 ${resp}= Get Request asdc ${ASDC_HEALTH_CHECK_PATH} headers=${headers}
Brian Freemanadaa2372018-10-24 12:25:22 -0500921 # only test for HTTP 200 to determine SDC Health. SDC_DE_HEALTH is informational
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500922 Should Be Equal As Strings ${resp.status_code} 200 SDC DOWN
Brian Freeman5cf5fa62018-04-23 20:28:16 -0500923 ${SDC_DE_HEALTH}= Catenate DOWN
DR695Hccff30b2017-02-17 18:44:24 -0500924 @{ITEMS}= Copy List ${resp.json()['componentsInfo']}
925 :FOR ${ELEMENT} IN @{ITEMS}
926 \ Log ${ELEMENT['healthCheckStatus']}
Brian Freemane546f7e2018-04-19 12:17:56 -0500927 \ ${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 -0500928 Log To Console (DMaaP:${SDC_DE_HEALTH}) no_newline=true
DR695Hccff30b2017-02-17 18:44:24 -0500929Run ASDC Get Request
930 [Documentation] Runs an ASDC get request
Brian Freeman44b8bb32018-05-03 21:08:42 -0500931 [Arguments] ${data_path} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500932 ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500933 Log Creating session ${MY_ASDC_BE_ENDPOINT}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500934 ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth}
DR695Hccff30b2017-02-17 18:44:24 -0500935 ${uuid}= Generate UUID
936 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500937 ${resp}= Get Request asdc ${data_path} headers=${headers}
DR695Hccff30b2017-02-17 18:44:24 -0500938 Log Received response from asdc ${resp.text}
939 [Return] ${resp}
940Run ASDC Put Request
941 [Documentation] Runs an ASDC put request
Brian Freeman44b8bb32018-05-03 21:08:42 -0500942 [Arguments] ${data_path} ${data} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500943 ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500944 Log Creating session ${MY_ASDC_BE_ENDPOINT}
945 ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth}
DR695Hccff30b2017-02-17 18:44:24 -0500946 ${uuid}= Generate UUID
947 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500948 ${resp}= Put Request asdc ${data_path} data=${data} headers=${headers}
DR695Hccff30b2017-02-17 18:44:24 -0500949 Log Received response from asdc ${resp.text}
950 [Return] ${resp}
Jerry Flood6bd1afa2017-10-09 09:59:23 -0400951
DR695Hccff30b2017-02-17 18:44:24 -0500952Run ASDC Post Files Request
953 [Documentation] Runs an ASDC post request
Brian Freeman44b8bb32018-05-03 21:08:42 -0500954 [Arguments] ${data_path} ${files} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500955 ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500956 Log Creating session ${MY_ASDC_BE_ENDPOINT}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500957 ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth}
DR695Hccff30b2017-02-17 18:44:24 -0500958 ${uuid}= Generate UUID
959 ${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}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500960 ${resp}= Post Request asdc ${data_path} files=${files} headers=${headers}
961 Log Received response from asdc ${resp.text}
962 [Return] ${resp}
963
964Run ASDC MD5 Post Request
965 [Documentation] Runs an ASDC post request with MD5 Checksum header
966 [Arguments] ${data_path} ${data} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT}
967 ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
968 Log Creating session ${MY_ASDC_BE_ENDPOINT}
969 ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth}
970 ${uuid}= Generate UUID
971 ${data_string}= Evaluate json.dumps(${data}) json
972 ${md5checksum}= Evaluate md5.new('''${data_string}''').hexdigest() modules=md5
973 ${base64md5checksum}= Evaluate base64.b64encode("${md5checksum}") modules=base64
974 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Content-MD5=${base64md5checksum}
975 ${resp}= Post Request asdc ${data_path} data=${data} headers=${headers}
DR695Hccff30b2017-02-17 18:44:24 -0500976 Log Received response from asdc ${resp.text}
Jerry Floode2a48d72017-06-21 15:06:29 -0400977 [Return] ${resp}
Jerry Flood6bd1afa2017-10-09 09:59:23 -0400978
DR695Hccff30b2017-02-17 18:44:24 -0500979Run ASDC Post Request
980 [Documentation] Runs an ASDC post request
Brian Freeman44b8bb32018-05-03 21:08:42 -0500981 [Arguments] ${data_path} ${data} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500982 ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500983 Log Creating session ${MY_ASDC_BE_ENDPOINT}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500984 ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth}
DR695Hccff30b2017-02-17 18:44:24 -0500985 ${uuid}= Generate UUID
986 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500987 ${resp}= Post Request asdc ${data_path} data=${data} headers=${headers}
DR695Hccff30b2017-02-17 18:44:24 -0500988 Log Received response from asdc ${resp.text}
Jerry Floode2a48d72017-06-21 15:06:29 -0400989 [Return] ${resp}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500990
DR695Hccff30b2017-02-17 18:44:24 -0500991Run ASDC Delete Request
992 [Documentation] Runs an ASDC delete request
Brian Freeman44b8bb32018-05-03 21:08:42 -0500993 [Arguments] ${data_path} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500994 ${auth}= Create List ${GLOBAL_ASDC_BE_USERNAME} ${GLOBAL_ASDC_BE_PASSWORD}
Brian Freeman44b8bb32018-05-03 21:08:42 -0500995 Log Creating session ${MY_ASDC_BE_ENDPOINT}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500996 ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT} auth=${auth}
DR695Hccff30b2017-02-17 18:44:24 -0500997 ${uuid}= Generate UUID
998 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
Brian Freeman2e1d0ff2019-01-23 09:38:13 -0500999 ${resp}= Delete Request asdc ${data_path} headers=${headers}
DR695Hccff30b2017-02-17 18:44:24 -05001000 Log Received response from asdc ${resp.text}
Jerry Floode2a48d72017-06-21 15:06:29 -04001001 [Return] ${resp}
DR695Hccff30b2017-02-17 18:44:24 -05001002Open ASDC GUI
1003 [Documentation] Logs in to ASDC GUI
1004 [Arguments] ${PATH}
1005 ## Setup Browever now being managed by the test case
1006 ##Setup Browser
DR695Hbf5a3a32017-06-30 13:09:57 -04001007 Go To ${ASDC_FE_ENDPOINT}${PATH}
DR695Hccff30b2017-02-17 18:44:24 -05001008 Maximize Browser Window
Jerry Flood6bd1afa2017-10-09 09:59:23 -04001009
DR695Hccff30b2017-02-17 18:44:24 -05001010 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
DR695Hbf5a3a32017-06-30 13:09:57 -04001011 Log Logging in to ${ASDC_FE_ENDPOINT}${PATH}
DR695Hccff30b2017-02-17 18:44:24 -05001012 Title Should Be ASDC
Jerry Floode2a48d72017-06-21 15:06:29 -04001013 Wait Until Page Contains Element xpath=//div/a[text()='SDC'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
DR695Hbf5a3a32017-06-30 13:09:57 -04001014 Log Logged in to ${ASDC_FE_ENDPOINT}${PATH}
Jerry Flood6bd1afa2017-10-09 09:59:23 -04001015
1016
1017Create Multi Part
1018 [Arguments] ${addTo} ${partName} ${filePath} ${contentType}=${None}
1019 ${fileData}= Get Binary File ${filePath}
1020 ${fileDir} ${fileName}= Split Path ${filePath}
1021 ${partData}= Create List ${fileName} ${fileData} ${contentType}
1022 Set To Dictionary ${addTo} ${partName}=${partData}
Brian Freemanf940ee92018-05-25 21:09:05 -05001023