blob: 3c3b3a46c9c2d7d9906d00603d75a698f16ab029 [file] [log] [blame]
DR695Hc0cf6a42019-07-26 16:42:36 -04001*** Settings ***
2Documentation The main interface for interacting with SDC. It handles low level stuff like managing the http request library and DCAE required fields
3Library RequestsLibrary
4Library ONAPLibrary.Utilities
5Library ONAPLibrary.JSON
6Library OperatingSystem
7Library Collections
8Library SeleniumLibrary
9Library String
10Library ArchiveLibrary
11Library ONAPLibrary.Openstack
12Library DateTime
13Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping
14Library ONAPLibrary.Templating WITH NAME Templating
15Library ONAPLibrary.SDC WITH NAME SDC
16Resource global_properties.robot
17Resource browser_setup.robot
18
19*** Variables ***
20${SDC_DESIGNER_USER_ID} cs0008
21${SDC_TESTER_USER_ID} jm0007
22${SDC_GOVERNOR_USER_ID} gv0001
23${SDC_OPS_USER_ID} op0001
24${SDC_HEALTH_CHECK_PATH} /sdc1/rest/healthCheck
25${SDC_VENDOR_LICENSE_MODEL_PATH} /onboarding-api/v1.0/vendor-license-models
26${SDC_VENDOR_SOFTWARE_PRODUCT_PATH} /onboarding-api/v1.0/vendor-software-products
27${SDC_VENDOR_KEY_GROUP_PATH} /license-key-groups
28${SDC_VENDOR_ENTITLEMENT_POOL_PATH} /entitlement-pools
29${SDC_VENDOR_FEATURE_GROUP_PATH} /feature-groups
30${SDC_VENDOR_LICENSE_AGREEMENT_PATH} /license-agreements
31${SDC_VENDOR_ACTIONS_PATH} /actions
32${SDC_VENDOR_SOFTWARE_UPLOAD_PATH} /orchestration-template-candidate
33${SDC_FE_CATALOG_RESOURCES_PATH} /sdc1/feProxy/rest/v1/catalog/resources
34${SDC_FE_CATALOG_SERVICES_PATH} /sdc1/feProxy/rest/v1/catalog/services
35${SDC_CATALOG_RESOURCES_PATH} /sdc2/rest/v1/catalog/resources
36${SDC_CATALOG_SERVICES_PATH} /sdc2/rest/v1/catalog/services
37${SDC_CATALOG_INACTIVE_RESOURCES_PATH} /sdc2/rest/v1/inactiveComponents/resource
38${SDC_CATALOG_RESOURCES_QUERY_PATH} /sdc2/rest/v1/catalog/resources/resourceName
39${SDC_CATALOG_INACTIVE_SERVICES_PATH} /sdc2/rest/v1/inactiveComponents/service
40${SDC_CATALOG_LIFECYCLE_PATH} /lifecycleState
41${SDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} /resourceInstance
42${SDC_CATALOG_SERVICE_RESOURCE_ARTIFACT_PATH} /artifacts
43${SDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH} /distribution-state
44${SDC_CATALOG_SERVICE_DISTRIBUTION_PATH} /distribution
45${SDC_DISTRIBUTION_STATE_APPROVE_PATH} /approve
46${SDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} /distribution/PROD/activate
47${SDC_LICENSE_MODEL_TEMPLATE} sdc/license_model.jinja
48${SDC_KEY_GROUP_TEMPLATE} sdc/key_group.jinja
49${SDC_ENTITLEMENT_POOL_TEMPLATE} sdc/entitlement_pool.jinja
50${SDC_FEATURE_GROUP_TEMPLATE} sdc/feature_group.jinja
51${SDC_LICENSE_AGREEMENT_TEMPLATE} sdc/license_agreement.jinja
52${SDC_ACTION_TEMPLATE} sdc/action.jinja
53${SDC_SOFTWARE_PRODUCT_TEMPLATE} sdc/software_product.jinja
54${SDC_ARTIFACT_UPLOAD_TEMPLATE} sdc/artifact_upload.jinja
55${SDC_CATALOG_RESOURCE_TEMPLATE} sdc/catalog_resource.jinja
56${SDC_USER_REMARKS_TEMPLATE} sdc/user_remarks.jinja
57${SDC_CATALOG_SERVICE_TEMPLATE} sdc/catalog_service.jinja
58${SDC_RESOURCE_INSTANCE_TEMPLATE} sdc/resource_instance.jinja
59${SDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} sdc/catalog_vnf_properties.jinja
60${SDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} sdc/catalog_vnf_inputs.jinja
61${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} sdc/catalog_net_input_properties.jinja
62${SDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE} sdc/catalog_resource_alloted_resource.jinja
63${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE} sdc/catalog_allotted_properties.jinja
64${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE} sdc/catalog_allotted_inputs.jinja
kaihlavia724b232019-08-07 12:37:17 +030065${SDC_CATALOG_SERVICE_MONITORING_TEMPLATE} sdc/catalog_service_monitoring.jinja
66${SDC_DCAE_COMPONENT_MICROSERVICE_TEMPLATE} sdc/dcae_component_microservice.jinja
DR695Hc0cf6a42019-07-26 16:42:36 -040067${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH} robot/assets/sdc/blueprints/
68${SDC_FE_ENDPOINT} ${GLOBAL_SDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_FE_IP_ADDR}:${GLOBAL_SDC_FE_PORT}
69${SDC_BE_ENDPOINT} ${GLOBAL_SDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_IP_ADDR}:${GLOBAL_SDC_BE_PORT}
70${SDC_BE_ONBOARD_ENDPOINT} ${GLOBAL_SDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_ONBOARD_IP_ADDR}:${GLOBAL_SDC_BE_ONBOARD_PORT}
71
72*** Keywords ***
73Distribute Model From SDC
krzysztof kuzmickidadd0e62019-07-31 20:08:36 +020074 [Documentation] Goes end to end creating all the SDC objects based ONAP model and distributing it to the systems. It then returns the service name, VF/PNF name and VF module name
75 [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}=False ${service}= ${instantiationType}=A-la-carte ${resourceType}=VF
DR695Hc0cf6a42019-07-26 16:42:36 -040076 # For Testing use random service names
77 #${random}= Get Current Date
78 #${catalog_service_id}= Add SDC Catalog Service ${catalog_service_name}_${random}
krzysztof kuzmickidadd0e62019-07-31 20:08:36 +020079 ${catalog_service_id}= Add SDC Catalog Service ${catalog_service_name} ${instantiationType}
DR695Hc0cf6a42019-07-26 16:42:36 -040080 ${catalog_resource_ids}= Create List
81 ${catalog_resources}= Create Dictionary
82 ##### TODO: Support for Multiple resources of one type in a service ######
83 # The zip list is the resources - no mechanism to indicate more than 1 of the items in the zip list
84 # Get Service Vnf Mapping has the logical mapping but it is not the same key as model_zip_path
85 # ${vnflist}= Get Service Vnf Mapping alias ${service}
86 # Save the resource_id in a dictionary keyed by the resource name in the zipfile name (vFWDT_vFWSNK.zip or vFWDT_vPKG.zip)
87 # Create the resources but do not immediately add resource
88 # Add Resource to Service in a separate FOR loop
89 ${resource_types}= Create Dictionary
90
91 :FOR ${zip} IN @{model_zip_path}
krzysztof kuzmickidadd0e62019-07-31 20:08:36 +020092 \ ${loop_catalog_resource_id}= Setup SDC Catalog Resource ${zip} ${cds} ${resourceType}
DR695Hc0cf6a42019-07-26 16:42:36 -040093 # zip can be vFW.zip or vFWDT_VFWSNK.zip
krzysztof kuzmickidadd0e62019-07-31 20:08:36 +020094 \ ${resource_type_match}= Run Keyword If "${resourceType}"=='PNF' Get Regexp Matches ${zip} ${service}_(.*)\.csar 1
DR695Hfacbc292019-08-07 11:15:46 -040095 ... ELSE Get Regexp Matches ${zip} ${service}_(.*)\.zip 1
DR695Hc0cf6a42019-07-26 16:42:36 -040096 # Need to be able to distribute preload for vFWCL vFWSNK and vFWDT vFWSNK to prepend service to vnf_type
97 \ ${resource_type_string}= Set Variable If len(${resource_type_match})==0 ${service} ${service}${resource_type_match[0]}
98 \ Set To Dictionary ${resource_types} ${resource_type_string} ${loop_catalog_resource_id}
99 \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
100
101 ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY}
102 ${vnflist}= ServiceMapping.Get Service Vnf Mapping default ${service}
103
104 # Spread the icons on the pallette starting on the left
105 ${xoffset}= Set Variable ${0}
106
107 :FOR ${vnf} IN @{vnflist}
108 \ ${loop_catalog_resource_resp}= Get SDC Catalog Resource ${resource_types['${vnf}']}
109 \ Set To Dictionary ${catalog_resources} ${resource_types['${vnf}']}=${loop_catalog_resource_resp}
kaihlavia724b232019-08-07 12:37:17 +0300110 \ ${catalog_resource_unique_name} ${catalog_resource_name} Add SDC Resource Instance ${catalog_service_id} ${resource_types['${vnf}']} ${loop_catalog_resource_resp['name']} ${xoffset} resourceType=${resourceType}
DR695Hc0cf6a42019-07-26 16:42:36 -0400111 \ ${xoffset}= Set Variable ${xoffset+100}
112 #
113 # do this here because the loop_catalog_resource_resp is different format after adding networks
krzysztof kuzmickidadd0e62019-07-31 20:08:36 +0200114 ${vf_module}= Run Keyword If "${resourceType}"=='PNF' Set Variable It is PNF
115 ... ELSE Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule
DR695Hc0cf6a42019-07-26 16:42:36 -0400116 #
117 # do network
118 ${networklist}= ServiceMapping.Get Service Neutron Mapping default ${service}
119 ${generic_neutron_net_uuid}= Get Generic NeutronNet UUID
120 :FOR ${network} IN @{networklist}
121 \ ${loop_catalog_resource_id}= Set Variable ${generic_neutron_net_uuid}
122 \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
123 \ ${loop_catalog_resource_resp}= Get SDC Catalog Resource ${loop_catalog_resource_id}
kaihlavia724b232019-08-07 12:37:17 +0300124 \ ${loop_catalog_resource_id} ${loop_catalog_resource_name} Add SDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${network} ${xoffset} ${0} VL
DR695Hc0cf6a42019-07-26 16:42:36 -0400125 \ ${nf_role}= Convert To Lowercase ${network}
126 \ Setup SDC Catalog Resource GenericNeutronNet Properties ${catalog_service_id} ${nf_role} ${loop_catalog_resource_id}
127 \ ${xoffset}= Set Variable ${xoffset+100}
128 \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp}
129 ${catalog_service_resp}= Get SDC Catalog Service ${catalog_service_id}
130 #
131 # do deployment artifacts
132 #
133 ${deploymentlist}= ServiceMapping.Get Service Deployment Artifact Mapping default ${service}
134 :FOR ${deployment} IN @{deploymentlist}
135 \ ${loop_catalog_resource_resp}= Get SDC Catalog Resource ${loop_catalog_resource_id}
136 \ Setup SDC Catalog Resource Deployment Artifact Properties ${catalog_service_id} ${loop_catalog_resource_resp} ${catalog_resource_unique_name} ${deployment}
137 Run Keyword If ${cds} == True Add CDS Parameters ${catalog_service_name}
138 Checkin SDC Catalog Service ${catalog_service_id}
139 Wait Until Keyword Succeeds 600s 15s Request Certify SDC Catalog Service ${catalog_service_id}
140 Start Certify SDC Catalog Service ${catalog_service_id}
141 # on certify it gets a new id
142 ${catalog_service_id}= Certify SDC Catalog Service ${catalog_service_id}
143 Approve SDC Catalog Service ${catalog_service_id}
144 :FOR ${DIST_INDEX} IN RANGE 1
145 \ Log Distribution Attempt ${DIST_INDEX}
146 \ Distribute SDC Catalog Service ${catalog_service_id}
147 \ ${catalog_service_resp}= Get SDC Catalog Service ${catalog_service_id}
148 \ ${status} ${_} = Run Keyword And Ignore Error Loop Over Check Catalog Service Distributed ${catalog_service_resp['uuid']}
149 \ Exit For Loop If '${status}'=='PASS'
150 Should Be Equal As Strings ${status} PASS
151 [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources}
152
153Distribute vCPEResCust Model From SDC
154 [Documentation] Goes end to end creating all the SDC 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
155 [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}= ${service}=
156 # For testing use random service name
157 #${random}= Get Current Date
158 ${uuid}= Generate UUID4
159 ${random}= Evaluate str("${uuid}")[:4]
160 ${catalog_service_id}= Add SDC Catalog Service ${catalog_service_name}_${random}
161 # catalog_service_name already
162 #${catalog_service_id}= Add SDC Catalog Service ${catalog_service_name}
163 Log ${\n}ServiceName: ${catalog_service_name}_${random}
164 #${catalog_service_id}= Add SDC Catalog Service ${catalog_service_name}
165 ${catalog_resource_ids}= Create List
166 ${catalog_resources}= Create Dictionary
167 :FOR ${zip} IN @{model_zip_path}
168 \ ${loop_catalog_resource_id}= Setup SDC Catalog Resource ${zip} ${cds}
169 \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
170 \ ${loop_catalog_resource_resp}= Get SDC Catalog Resource ${loop_catalog_resource_id}
171 \ Add SDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']}
172 \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp}
173 #
174 # do this here because the loop_catalog_resource_resp is different format after adding networks
175 ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule
176 #
177 # do allottedresource
178 ${allottedresource_list}= Create List TunnelXConn BRG
179 # Example data
180 #${tunnelxconn_dict}= Create Dictionary invariantUUID=8ac029e7-77aa-40d4-b28a-d17c02d5fd82 UUID=2ddc1b37-d7da-4aab-b645-ed7db34a5d03 node_type=org.openecomp.service.Demovcpevgmux
181 #${brg_dict}= Create Dictionary invariantUUID=ff0337b9-dbe2-4d88-bb74-18bf027ae586 UUID=1b6974f1-4aed-47f4-b962-816aa1261927 node_type=org.openecomp.service.Demovcpevbrgemu
182 # Create /tmp/vcpe_allotted_resource_data.json with demo vgmux and brgemu CSARs
183 Create Allotted Resource Data File
DR695H7cf5e642019-08-21 16:57:54 -0400184 ${vcpe_ar_data_string} OperatingSystem.Get File /tmp/vcpe_allotted_resource_data.json
185 ${vcpe_ar_data_file}= Evaluate json.loads('''${vcpe_ar_data_string}''') json
186 ${tunnelxconn_invariant_uuid}= Catenate ${vcpe_ar_data_file['tunnelxconn']['invariantUUID']}
187 ${tunnelxconn_uuid}= Catenate ${vcpe_ar_data_file['tunnelxconn']['UUID']}
188 ${tunnelxconn_node_type}= Catenate ${vcpe_ar_data_file['tunnelxconn']['node_type']}
189 ${brg_invariant_uuid}= Catenate ${vcpe_ar_data_file['brg']['invariantUUID']}
190 ${brg_uuid}= Catenate ${vcpe_ar_data_file['brg']['UUID']}
191 ${brg_node_type}= Catenate ${vcpe_ar_data_file['brg']['node_type']}
DR695Hc0cf6a42019-07-26 16:42:36 -0400192 ${tunnelxconn_dict}= Create Dictionary invariantUUID=${tunnelxconn_invariant_uuid} UUID=${tunnelxconn_uuid} node_type=${tunnelxconn_node_type}
193 ${brg_dict}= Create Dictionary invariantUUID=${brg_invariant_uuid} UUID=${brg_uuid} node_type=${brg_node_type}
194 ${xoffset}= Set Variable ${100}
195 ${allottedresource_uuid}= Get AllottedResource UUID
196 ${random}= Get Current Date
197 :FOR ${allottedresource} IN @{allottedresource_list}
198 \ ${loop_catalog_resource_id}= Set Variable ${allottedresource_uuid}
199 \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
200 \ ${loop_catalog_resource_id}= Add SDC Allotted Resource Catalog Resource 00000 ${allottedresource}_${random} ONAP ${loop_catalog_resource_id} ${allottedresource}
201 \ ${loop_catalog_resource_id2}= Add SDC Resource Instance To Resource ${loop_catalog_resource_id} ${allottedresource_uuid} ${allottedresource} ${xoffset} ${0}
202 \ ${loop_catalog_resource_resp}= Get SDC Catalog Resource ${loop_catalog_resource_id}
203 #
204 # Set the properties to relate to the brg and gmux
205 #
206 \ 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']}
207 \ 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']}
208 #
209 # Set the nf_role nf_type
210 #
211 \ Run Keyword If '${allottedresource}'=='TunnelXConn' Setup SDC Catalog Resource AllottedResource Inputs ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id}
212 \ Run Keyword If '${allottedresource}'=='BRG' Setup SDC Catalog Resource AllottedResource Inputs ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id}
kaihlavia724b232019-08-07 12:37:17 +0300213 \ ${loop_catalog_resource_id} ${loop_catalog_resource_uuid} Certify SDC Catalog Resource ${loop_catalog_resource_id} ${SDC_DESIGNER_USER_ID}
DR695Hc0cf6a42019-07-26 16:42:36 -0400214 \ Add SDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']}
215 \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp}
216 ${catalog_service_resp}= Get SDC Catalog Service ${catalog_service_id}
217 Checkin SDC Catalog Service ${catalog_service_id}
218 Request Certify SDC Catalog Service ${catalog_service_id}
219 Start Certify SDC Catalog Service ${catalog_service_id}
220 # on certify it gets a new id
221 ${catalog_service_id}= Certify SDC Catalog Service ${catalog_service_id}
222 Approve SDC Catalog Service ${catalog_service_id}
223 :FOR ${DIST_INDEX} IN RANGE 1
224 \ Log Distribution Attempt ${DIST_INDEX}
225 \ Distribute SDC Catalog Service ${catalog_service_id}
226 \ ${catalog_service_resp}= Get SDC Catalog Service ${catalog_service_id}
227 \ ${status} ${_} = Run Keyword And Ignore Error Loop Over Check Catalog Service Distributed ${catalog_service_resp['uuid']}
228 \ Exit For Loop If '${status}'=='PASS'
229 Should Be Equal As Strings ${status} PASS
230 [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources}
231
232
233Create Allotted Resource Data File
234 [Documentation] Create Allotted Resource json data file
235 ${allotted_resource}= Create Dictionary
236 ${allotted_csar_map}= Create Dictionary
237 Set To Dictionary ${allotted_csar_map} tunnelxconn=service-Demovcpevgmux-csar.csar
238 Set To Dictionary ${allotted_csar_map} brg=service-Demovcpevbrgemu-csar.csar
239 ${keys}= Get Dictionary Keys ${allotted_csar_map}
240 :FOR ${key} IN @{keys}
241 \ ${csar}= Get From Dictionary ${allotted_csar_map} ${key}
242 \ ${dir} ${ext}= Split String From Right ${csar} - 1
243 \ Extract Zip File /tmp/csar/${csar} /tmp/csar/${dir}
244 \ ${template}= Catenate /tmp/csar/${dir}/Definitions/${dir}-template.yml
245 \ ${json_str}= Template Yaml To Json ${template}
246 \ ${json_obj}= To Json ${json_str}
247 \ ${attrs}= Create Dictionary
248 \ Set To Dictionary ${attrs} invariantUUID=${json_obj['metadata']['invariantUUID']}
249 \ Set To Dictionary ${attrs} UUID=${json_obj['metadata']['UUID']}
250 \ Set To Dictionary ${attrs} node_type=${json_obj['topology_template']['substitution_mappings']['node_type']}
251 \ Set To Dictionary ${allotted_resource} ${key}=${attrs}
252 ${result_str}= Evaluate json.dumps(${allotted_resource}, indent=2) json
253 Log ${result_str}
254 Create File /tmp/vcpe_allotted_resource_data.json ${result_str}
255
256Download CSAR
257 [Documentation] Download CSAR
258 [Arguments] ${catalog_service_id} ${save_directory}=/tmp/csar
259 # get meta data
260 ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/filteredDataByParams?include=toscaArtifacts ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
261 ${csar_resource_id}= Set Variable ${resp.json()['toscaArtifacts']['assettoscacsar']['uniqueId']}
262 ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/artifacts/${csar_resource_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
263 ${csar_file_name}= Set Variable ${resp.json()['artifactName']}
264 ${base64Obj}= Set Variable ${resp.json()['base64Contents']}
265 ${binObj}= Base64 Decode ${base64Obj}
266 Create Binary File ${save_directory}/${csar_file_name} ${binObj}
267 Log ${\n}Downloaded:${csar_file_name}
268
269
270Get Generic NeutronNet UUID
271 [Documentation] Look up the UUID of the Generic NeutronNetwork Resource
272 ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_QUERY_PATH}/Generic%20NeutronNet/resourceVersion/1.0 ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
273 [Return] ${resp.json()['allVersions']['1.0']}
274
275Get AllottedResource UUID
276 [Documentation] Look up the UUID of the Allotted Resource
277 # if this fails then the AllottedResource template got deleted from SDC by mistake
278 ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_QUERY_PATH}/AllottedResource/resourceVersion/1.0 ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
279 [Return] ${resp.json()['allVersions']['1.0']}
280
281Loop Over Check Catalog Service Distributed
282 [Arguments] ${catalog_service_id}
283 # SO watchdog timeout is 300 seconds need buffer
284 ${dist_status}= Set Variable CONTINUE
285 :FOR ${CHECK_INDEX} IN RANGE 20
286 \ ${status} ${_} = Run Keyword And Ignore Error Check Catalog Service Distributed ${catalog_service_id} ${dist_status}
287 \ Sleep 20s
288 \ Return From Keyword If '${status}'=='PASS'
289 # need a way to exit the loop early on DISTRIBUTION_COMPLETE_ERROR ${dist_status} doesnt work
290 #\ Exit For Loop If '${dist_status}'=='EXIT'
291 Should Be Equal As Strings ${status} PASS
292
293Setup SDC Catalog Resource
krzysztof kuzmickidadd0e62019-07-31 20:08:36 +0200294 [Documentation] Creates all the steps a VF/PNF needs for an SDC Catalog Resource and returns the id
295 [Arguments] ${model_zip_path} ${cds}=None ${resourceType}=VF
DR695Hc0cf6a42019-07-26 16:42:36 -0400296 ${license_model_id} ${license_model_version_id}= Add SDC License Model
297
298
299 ${license_temp_date}= Get Current Date
300 ${license_start_date}= Get Current Date result_format=%m/%d/%Y
301 ${license_end_date}= Add Time To Date ${license_temp_date} 365 days result_format=%m/%d/%Y
302 ${key_group_id}= Add SDC License Group ${license_model_id} ${license_model_version_id} ${license_start_date} ${license_end_date}
303 ${pool_id}= Add SDC Entitlement Pool ${license_model_id} ${license_model_version_id} ${license_start_date} ${license_end_date}
DR695Hc0cf6a42019-07-26 16:42:36 -0400304 ${feature_group_id}= Add SDC Feature Group ${license_model_id} ${key_group_id} ${pool_id} ${license_model_version_id}
305 ${license_agreement_id}= Add SDC License Agreement ${license_model_id} ${feature_group_id} ${license_model_version_id}
306 Submit SDC License Model ${license_model_id} ${license_model_version_id}
307 ${license_model_resp}= Get SDC License Model ${license_model_id} ${license_model_version_id}
krzysztof kuzmickidadd0e62019-07-31 20:08:36 +0200308 ${matches}= Run Keyword If '${resourceType}'=='PNF' Get Regexp Matches ${model_zip_path} temp/(.*)\.csar 1
309 ... ELSE Get Regexp Matches ${model_zip_path} temp/(.*)\.zip 1
DR695Hc0cf6a42019-07-26 16:42:36 -0400310 ${software_product_name_prefix}= Set Variable ${matches[0]}
311 ${software_product_id} ${software_product_version_id}= Add SDC Software Product ${license_agreement_id} ${feature_group_id} ${license_model_resp['vendorName']} ${license_model_id} ${license_model_version_id} ${software_product_name_prefix}
312 Upload SDC Heat Package ${software_product_id} ${model_zip_path} ${software_product_version_id}
313 Validate SDC Software Product ${software_product_id} ${software_product_version_id}
314 Submit SDC Software Product ${software_product_id} ${software_product_version_id}
315 Package SDC Software Product ${software_product_id} ${software_product_version_id}
316 ${software_product_resp}= Get SDC Software Product ${software_product_id} ${software_product_version_id}
krzysztof kuzmickidadd0e62019-07-31 20:08:36 +0200317 ${catalog_resource_id}= Add SDC Catalog Resource ${license_agreement_id} ${software_product_resp['name']} ${license_model_resp['vendorName']} ${software_product_id} ${resourceType}
DR695Hc0cf6a42019-07-26 16:42:36 -0400318 # Check if need to set up CDS properties
319 Run Keyword If '${cds}' == 'vfwng' Setup SDC Catalog Resource CDS Properties ${catalog_resource_id}
320
kaihlavia724b232019-08-07 12:37:17 +0300321 ${catalog_resource_id} ${catalog_resource_uuid} Certify SDC Catalog Resource ${catalog_resource_id} ${SDC_DESIGNER_USER_ID}
DR695Hc0cf6a42019-07-26 16:42:36 -0400322 [Return] ${catalog_resource_id}
323
DR695Hc0cf6a42019-07-26 16:42:36 -0400324Setup SDC Catalog Resource Deployment Artifact Properties
325 [Documentation] Set up Deployment Artiface properties
326 [Arguments] ${catalog_service_id} ${catalog_parent_service_id} ${catalog_resource_unique_id} ${blueprint_file}
327 ${resp}= Get SDC Catalog Resource Component Instances Properties ${catalog_service_id}
328 ${blueprint_data} OperatingSystem.Get File ${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH}${blueprint_file}
329 ${payloadData}= Base64 Encode ${blueprint_data}
330 ${dict}= Create Dictionary artifactLabel=blueprint artifactName=${blueprint_file} artifactType=DCAE_INVENTORY_BLUEPRINT artifactGroupType=DEPLOYMENT description=${blueprint_file} payloadData=${payloadData}
331 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
332 ${data}= Templating.Apply Template sdc ${SDC_ARTIFACT_UPLOAD_TEMPLATE} ${dict}
333 # POST artifactUpload to resource
334 ${artifact_upload_path}= Catenate ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/resourceInstance/${catalog_resource_unique_id}${SDC_CATALOG_SERVICE_RESOURCE_ARTIFACT_PATH}
335 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${artifact_upload_path} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
336 Should Be Equal As Strings ${resp.status_code} 200
337 [Return] ${resp}
338
339
340Setup SDC Catalog Resource GenericNeutronNet Properties
341 [Documentation] Set up GenericNeutronNet properties and inputs
342 [Arguments] ${catalog_service_id} ${nf_role} ${catalog_parent_service_id}
343 ${resp}= Get SDC Catalog Resource Component Instances Properties ${catalog_service_id}
344 ${componentInstances} Set Variable @{resp['componentInstancesProperties']}
345 # componentInstances can have 1 or more than 1 entry
346 ${passed}= Run Keyword And Return Status Evaluate type(${componentInstances})
347 ${type}= Run Keyword If ${passed} Evaluate type(${componentInstances})
348 ${componentInstancesList}= Run Keyword If "${type}"!="<type 'list'>" Create List ${componentInstances}
349 ... ELSE Set Variable ${componentInstances}
350 :FOR ${item} IN @{componentInstancesList}
351 \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${item} ${nf_role}
352 \ Run Keyword If '${test}' == 'FAIL' Continue For Loop
353 \ ${componentInstance1}= Set Variable ${item}
354 :FOR ${comp} IN @{resp['componentInstancesProperties']["${componentInstance1}"]}
355 \ ${name} Set Variable ${comp['name']}
356 \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${name} network_role
357 \ Run Keyword If '${test}' == 'FAIL' Continue For Loop
358 \ ${description} Set Variable ${comp['description']}
359 \ ${description}= Replace String ${description} ${\n} \
360 \ ${uniqueId} Set Variable ${comp['uniqueId']}
361 \ ${parentUniqueId} Set Variable ${comp['parentUniqueId']}
362 \ ${ownerId} Set Variable ${comp['ownerId']}
363 \ ${dict}= Create Dictionary parentUniqueId=${parentUniqueId} ownerId=${ownerId} uniqueId=${uniqueId} description=${description}
364 \ Run Keyword If '${name}'=='network_role' Set To Dictionary ${dict} name=${name} value=${nf_role}
365 \ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
366 \ ${data}= Templating.Apply Template sdc ${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} ${dict}
367 \ ${response}= Set SDC Catalog Resource Component Instance Properties ${catalog_parent_service_id} ${catalog_service_id} ${data}
368
369
370Setup SDC Catalog Resource AllottedResource Properties
371 [Documentation] Set up Allotted Resource properties and inputs
372 [Arguments] ${catalog_service_id} ${nf_role} ${catalog_resource_id} ${invariantUUID} ${UUID} ${node_type}
373 # Set component instances properties
374 ${nf_role_lc}= Convert To Lowercase ${nf_role}
375 ${resp}= Get SDC Catalog Resource Component Instances Properties For Resource ${catalog_resource_id}
376 ${componentInstances} Set Variable @{resp['componentInstancesProperties']}
377 # componentInstances can have 1 or more than 1 entry
378 ${passed}= Run Keyword And Return Status Evaluate type(${componentInstances})
379 ${type}= Run Keyword If ${passed} Evaluate type(${componentInstances})
380 ${componentInstancesList}= Run Keyword If "${type}"!="<type 'list'>" Create List ${componentInstances}
381 ... ELSE Set Variable ${componentInstances}
382 :FOR ${item} IN @{componentInstancesList}
383 \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${item} ${nf_role_lc}
384 \ Run Keyword If '${test}' == 'FAIL' Continue For Loop
385 \ ${componentInstance1}= Set Variable ${item}
386 ${dict}= Create Dictionary
387 :FOR ${comp} IN @{resp['componentInstancesProperties']["${componentInstance1}"]}
388 \ ${name} Set Variable ${comp['name']}
389 \ ${test} ${v}= Run Keyword and Ignore Error Should Contain Any ${name} network_role providing_service_invariant_uuid providing_service_uuid providing_service_name uniqueId
390 \ Run Keyword If '${test}' == 'FAIL' Continue For Loop
391 \ ${parentUniqueId} Set Variable ${comp['parentUniqueId']}
392 \ ${ownerId} Set Variable ${comp['ownerId']}
393 \ Set To Dictionary ${dict} parentUniqueId=${parentUniqueId} ownerId=${ownerId}
394 \ Run Keyword If '${name}'=='providing_service_invariant_uuid' Set To Dictionary ${dict} providing_service_invariant_uuid=${invariantUUID}
395 \ Run Keyword If '${name}'=='providing_service_uuid' Set To Dictionary ${dict} providing_service_uuid=${UUID}
396 \ Run Keyword If '${name}'=='providing_service_name' Set To Dictionary ${dict} providing_service_name=${node_type}
397 # Sets it for each loop but should be one
398 \ ${uniqueId} Set Variable ${comp['uniqueId']}
399 \ ${uniqueId} Fetch From Left ${uniqueId} .
400 \ Set To Dictionary ${dict} uniqueId=${uniqueId}
401 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
402 ${data}= Templating.Apply Template sdc ${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE} ${dict}
403 ${response}= Set SDC Catalog Resource Component Instance Properties For Resource ${catalog_resource_id} ${componentInstance1} ${data}
404 Log resp=${response}
405
406
407Setup SDC Catalog Resource AllottedResource Inputs
408 [Documentation] Set up Allotted Resource inputs
409 [Arguments] ${catalog_service_id} ${nf_role} ${catalog_resource_id}
410 # Set vnf inputs
411 ${resp}= Get SDC Catalog Resource Inputs ${catalog_resource_id}
412 ${dict}= Create Dictionary
413 :FOR ${comp} IN @{resp['inputs']}
414 \ ${name} Set Variable ${comp['name']}
415 \ ${uid} Set Variable ${comp['uniqueId']}
416 \ Run Keyword If '${name}'=='nf_type' Set To Dictionary ${dict} nf_type=${nf_role} nf_type_uid=${uid}
417 \ Run Keyword If '${name}'=='nf_role' Set To Dictionary ${dict} nf_role=${nf_role} nf_role_uid=${uid}
418 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
419 ${data}= Templating.Apply Template sdc ${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE} ${dict}
420 ${response}= Set SDC Catalog Resource VNF Inputs ${catalog_resource_id} ${data}
421 [Return] ${response}
422
423Setup SDC Catalog Resource CDS Properties
424 [Documentation] Set up vfwng VNF properties and inputs for CDS
425 [Arguments] ${catalog_resource_id}
426 # Set vnf module properties
427 ${resp}= Get SDC Catalog Resource Component Instances ${catalog_resource_id}
428 :FOR ${comp} IN @{resp['componentInstances']}
429 \ ${name} Set Variable ${comp['name']}
430 \ ${uniqueId} Set Variable ${comp['uniqueId']}
431 \ ${actualComponentUid} Set Variable ${comp['actualComponentUid']}
432 \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${name} abstract_
433 \ Run Keyword If '${test}' == 'FAIL' Continue For Loop
434 \ ${response}= Get SDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${actualComponentUid}
435 \ ${dict}= Create Dictionary parent_id=${response[6]['parentUniqueId']}
436 \ Run Keyword If '${name}'=='abstract_vfw' Set To Dictionary ${dict} nfc_function=vfw nfc_naming_policy=SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP
437 \ Run Keyword If '${name}'=='abstract_vpg' Set To Dictionary ${dict} nfc_function=vpg nfc_naming_policy=SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP
438 \ Run Keyword If '${name}'=='abstract_vsn' Set To Dictionary ${dict} nfc_function=vsn nfc_naming_policy=SDNC_Policy.ONAP_VSN_NAMING_TIMESTAMP
439 \ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
440 \ ${data}= Templating.Apply Template sdc ${SDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} ${dict}
441 \ ${response}= Set SDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${data}
442 \ Log resp=${response}
443
444 # Set vnf inputs
445 ${resp}= Get SDC Catalog Resource Inputs ${catalog_resource_id}
446 ${dict}= Create Dictionary
447 :FOR ${comp} IN @{resp['inputs']}
448 \ ${name} Set Variable ${comp['name']}
449 \ ${uid} Set Variable ${comp['uniqueId']}
450 \ Run Keyword If '${name}'=='nf_function' Set To Dictionary ${dict} nf_function=ONAP-FIREWALL nf_function_uid=${uid}
451 \ Run Keyword If '${name}'=='nf_type' Set To Dictionary ${dict} nf_type=FIREWALL nf_type_uid=${uid}
452 \ Run Keyword If '${name}'=='nf_naming_code' Set To Dictionary ${dict} nf_naming_code=vfw nf_naming_code_uid=${uid}
453 \ Run Keyword If '${name}'=='nf_role' Set To Dictionary ${dict} nf_role=vFW nf_role_uid=${uid}
454 \ Run Keyword If '${name}'=='cloud_env' Set To Dictionary ${dict} cloud_env=openstack cloud_env_uid=${uid}
455 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
456 ${data}= Templating.Apply Template sdc ${SDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} ${dict}
457 ${response}= Set SDC Catalog Resource VNF Inputs ${catalog_resource_id} ${data}
458
459Add SDC License Model
460 [Documentation] Creates an SDC License Model and returns its id
461 ${uuid}= Generate UUID4
462 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
463 ${map}= Create Dictionary vendor_name=${shortened_uuid}
464 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
465 ${data}= Templating.Apply Template sdc ${SDC_LICENSE_MODEL_TEMPLATE} ${map}
466 ${resp}= SDC.Run Post Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
467 Should Be Equal As Strings ${resp.status_code} 200
468 [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']}
469
470Get SDC License Model
471 [Documentation] gets an SDC license model by its id
472 [Arguments] ${id} ${version_id}=0.1
473 ${resp}= SDC.Run Get Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
474 [Return] ${resp.json()}
475
476Get SDC License Models
477 [Documentation] Gets all SDC License Models
478 ${resp}= SDC.Run Get Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
479 [Return] ${resp.json()}
480
481Checkin SDC License Model
482 [Documentation] Checks in an SDC License Model by its id
483 [Arguments] ${id} ${version_id}=0.1
484 ${map}= Create Dictionary action=Checkin
485 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
486 ${data}= Templating.Apply Template sdc ${SDC_ACTION_TEMPLATE} ${map}
487 ${resp}= SDC.Run Put Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${SDC_VENDOR_ACTIONS_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
488 Should Be Equal As Strings ${resp.status_code} 200
489 [Return] ${resp.json()}
490
491Submit SDC License Model
492 [Documentation] Submits an SDC License Model by its id
493 [Arguments] ${id} ${version_id}=0.1
494 ${map}= Create Dictionary action=Submit
495 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
496 ${data}= Templating.Apply Template sdc ${SDC_ACTION_TEMPLATE} ${map}
497 ${resp}= SDC.Run Put Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${SDC_VENDOR_ACTIONS_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
498 [Return] ${resp.json()}
499
500Checkin SDC Software Product
501 [Documentation] Checks in an SDC Software Product by its id
502 [Arguments] ${id} ${version_id}=0.1
503 ${map}= Create Dictionary action=Checkin
504 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
505 ${data}= Templating.Apply Template sdc ${SDC_ACTION_TEMPLATE} ${map}
506 ${resp}= SDC.Run Put Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${SDC_VENDOR_ACTIONS_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
507 Should Be Equal As Strings ${resp.status_code} 200
508 [Return] ${resp.json()}
509
510Validate SDC Software Product
511 [Documentation] Validates an SDC Software Product by its id
512 [Arguments] ${id} ${version_id}=0.1
513 ${data}= Catenate
514 ${resp}= SDC.Run Put Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}/orchestration-template-candidate/process ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
515 Should Be Equal As Strings ${resp.status_code} 200
516 [Return] ${resp.json()}
517
518Submit SDC Software Product
519 [Documentation] Submits an SDC Software Product by its id
520 [Arguments] ${id} ${version_id}=0.1
521 ${map}= Create Dictionary action=Submit
522 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
523 ${data}= Templating.Apply Template sdc ${SDC_ACTION_TEMPLATE} ${map}
524 ${resp}= SDC.Run Put Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${SDC_VENDOR_ACTIONS_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
525 Should Be Equal As Strings ${resp.status_code} 200
526 [Return] ${resp.json()}
527
528Package SDC Software Product
529 [Documentation] Creates a package of an SDC Software Product by its id
530 [Arguments] ${id} ${version_id}=0.1
531 ${map}= Create Dictionary action=Create_Package
532 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
533 ${data}= Templating.Apply Template sdc ${SDC_ACTION_TEMPLATE} ${map}
534 ${resp}= SDC.Run Put Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${SDC_VENDOR_ACTIONS_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
535 Should Be Equal As Strings ${resp.status_code} 200
536 [Return] ${resp.json()}
537
538Add SDC Entitlement Pool
539 [Documentation] Creates an SDC Entitlement Pool and returns its id
540 [Arguments] ${license_model_id} ${version_id}=0.1 ${license_start_date}="01/01/1960" ${license_end_date}="01/01/1961"
541 ${uuid}= Generate UUID4
542 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
543 ${map}= Create Dictionary entitlement_pool_name=${shortened_uuid} license_start_date=${license_start_date} license_end_date=${license_end_date}
544 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
545 ${data}= Templating.Apply Template sdc ${SDC_ENTITLEMENT_POOL_TEMPLATE} ${map}
546 ${resp}= SDC.Run Post Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${SDC_VENDOR_ENTITLEMENT_POOL_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
547 Should Be Equal As Strings ${resp.status_code} 200
548 [Return] ${resp.json()['value']}
549
550Get SDC Entitlement Pool
551 [Documentation] Gets an SDC Entitlement Pool by its id
552 [Arguments] ${license_model_id} ${pool_id}
553 ${resp}= SDC.Run Get Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${SDC_VENDOR_ENTITLEMENT_POOL_PATH}/${pool_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
554 [Return] ${resp.json()}
555
556Add SDC License Group
557 [Documentation] Creates an SDC License Group and returns its id
558 [Arguments] ${license_model_id} ${version_id}=1.0 ${license_start_date}="01/01/1960" ${license_end_date}="01/01/1961"
559 ${uuid}= Generate UUID4
560 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
561 ${map}= Create Dictionary key_group_name=${shortened_uuid} license_start_date=${license_start_date} license_end_date=${license_end_date}
562 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
563 ${data}= Templating.Apply Template sdc ${SDC_KEY_GROUP_TEMPLATE} ${map}
564 ${resp}= SDC.Run Post Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${SDC_VENDOR_KEY_GROUP_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
565 Should Be Equal As Strings ${resp.status_code} 200
566 [Return] ${resp.json()['value']}
567
568Get SDC License Group
569 [Documentation] Gets an SDC License Group by its id
570 [Arguments] ${license_model_id} ${group_id} ${version_id}
571 ${resp}= SDC.Run Get Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${SDC_VENDOR_KEY_GROUP_PATH}/${group_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
572 [Return] ${resp.json()}
573
574Add SDC Feature Group
575 [Documentation] Creates an SDC Feature Group and returns its id
576 [Arguments] ${license_model_id} ${key_group_id} ${entitlement_pool_id} ${version_id}=0.1
577 ${uuid}= Generate UUID4
578 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
579 ${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}
580 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
581 ${data}= Templating.Apply Template sdc ${SDC_FEATURE_GROUP_TEMPLATE} ${map}
582 ${resp}= SDC.Run Post Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${SDC_VENDOR_FEATURE_GROUP_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
583 Should Be Equal As Strings ${resp.status_code} 200
584 [Return] ${resp.json()['value']}
585
586Get SDC Feature Group
587 [Documentation] Gets an SDC Feature Group by its id
588 [Arguments] ${license_model_id} ${group_id}
589 ${resp}= SDC.Run Get Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${SDC_VENDOR_FEATURE_GROUP_PATH}/${group_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
590 [Return] ${resp.json()}
591
592Add SDC License Agreement
593 [Documentation] Creates an SDC License Agreement and returns its id
594 [Arguments] ${license_model_id} ${feature_group_id} ${version_id}=0.1
595 ${uuid}= Generate UUID4
596 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
597 ${map}= Create Dictionary license_agreement_name=${shortened_uuid} feature_group_id=${feature_group_id}
598 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
599 ${data}= Templating.Apply Template sdc ${SDC_LICENSE_AGREEMENT_TEMPLATE} ${map}
600 ${resp}= SDC.Run Post Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${SDC_VENDOR_LICENSE_AGREEMENT_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
601 Should Be Equal As Strings ${resp.status_code} 200
602 [Return] ${resp.json()['value']}
603
604Get SDC License Agreement
605 [Documentation] Gets an SDC License Agreement by its id
606 [Arguments] ${license_model_id} ${agreement_id}
607 ${resp}= SDC.Run Get Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${SDC_VENDOR_LICENSE_AGREEMENT_PATH}/${agreement_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
608 [Return] ${resp.json()}
609
610Add SDC Software Product
611 [Documentation] Creates an SDC Software Product and returns its id
612 [Arguments] ${license_agreement_id} ${feature_group_id} ${license_model_name} ${license_model_id} ${license_model_version_id} ${name_prefix}
613 ${uuid}= Generate UUID4
614 ${shortened_uuid}= Evaluate str("${uuid}")[:13]
615 ${software_product_name}= Catenate ${name_prefix} ${shortened_uuid}
616 ${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}
617 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
618 ${data}= Templating.Apply Template sdc ${SDC_SOFTWARE_PRODUCT_TEMPLATE} ${map}
619 ${resp}= SDC.Run Post Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_SOFTWARE_PRODUCT_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
620 Should Be Equal As Strings ${resp.status_code} 200
621 [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']}
622
623Get SDC Software Product
624 [Documentation] Gets an SDC Software Product by its id
625 [Arguments] ${software_product_id} ${version_id}=0.1
626 ${resp}= SDC.Run Get Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
627 [Return] ${resp.json()}
628
629Add SDC Catalog Resource
630 [Documentation] Creates an SDC Catalog Resource and returns its id
krzysztof kuzmickidadd0e62019-07-31 20:08:36 +0200631 [Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id} ${resourceType}=VF
632 ${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} resource_type=${resourceType}
DR695Hc0cf6a42019-07-26 16:42:36 -0400633 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
634 ${data}= Templating.Apply Template sdc ${SDC_CATALOG_RESOURCE_TEMPLATE} ${map}
635 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
636 Should Be Equal As Strings ${resp.status_code} 201
637 [Return] ${resp.json()['uniqueId']}
638
639Add SDC Allotted Resource Catalog Resource
640 [Documentation] Creates an SDC Allotted Resource Catalog Resource and returns its id
641 [Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id} ${subcategory}
642 ${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}
643 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
644 ${data}= Templating.Apply Template sdc ${SDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE} ${map}
645 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
646 Should Be Equal As Strings ${resp.status_code} 201
647 [Return] ${resp.json()['uniqueId']}
648
649Mark SDC Catalog Resource Inactive
650 [Documentation] Marks SDC Catalog Resource as inactive
651 [Arguments] ${catalog_resource_id}
652 ${resp}= SDC.Run Delete Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${None} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
653 Should Be Equal As Strings ${resp.status_code} 204
654 [Return] ${resp}
655
656Delete Inactive SDC Catalog Resources
657 [Documentation] Delete all SDC Catalog Resources that are inactive
658 ${resp}= SDC.Run Delete Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_INACTIVE_RESOURCES_PATH} ${None} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
659 Should Be Equal As Strings ${resp.status_code} 200
660 [Return] ${resp.json()}
661
662Get SDC Catalog Resource
663 [Documentation] Gets an SDC Catalog Resource by its id
664 [Arguments] ${catalog_resource_id}
665 ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
666 [Return] ${resp.json()}
667
668Get SDC Catalog Resource Component Instances
669 [Documentation] Gets component instances of an SDC Catalog Resource by its id
670 [Arguments] ${catalog_resource_id}
671 ${resp}= SDC.Run Get Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstances ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
672 [Return] ${resp.json()}
673
674Get SDC Catalog Resource Deployment Artifact Properties
675 [Documentation] Gets deployment artifact properties of an SDC Catalog Resource by its id
676 [Arguments] ${catalog_resource_id}
677 ${resp}= SDC.Run Get Request ${SDC_FE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_resource_id}/filteredDataByParams?include=deploymentArtifacts ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
678 [Return] ${resp.json()}
679
680
681Get SDC Catalog Resource Component Instances Properties
682 [Documentation] Gets SDC Catalog Resource component instances properties by its id
683 [Arguments] ${catalog_resource_id}
684 ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstancesProperties ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
685 [Return] ${resp.json()}
686
687Get SDC Catalog Resource Component Instances Properties For Resource
688 [Documentation] Gets SDC Catalog Resource component instances properties for a Resource (VF) by its id
689 [Arguments] ${catalog_resource_id}
690 ${resp}= SDC.Run Get Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstancesProperties ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
691 [Return] ${resp.json()}
692
693Get SDC Catalog Resource Inputs
694 [Documentation] Gets SDC Catalog Resource inputs by its id
695 [Arguments] ${catalog_resource_id}
696 ${resp}= SDC.Run Get Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=inputs ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
697 [Return] ${resp.json()}
698
699Get SDC Catalog Resource Component Instance Properties
700 [Documentation] Gets component instance properties of an SDC Catalog Resource by their ids
701 [Arguments] ${catalog_resource_id} ${component_instance_id} ${component_id}
702 ${resp}= SDC.Run Get Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/componentInstances/${component_instance_id}/${component_id}/inputs ${SDC_DESIGNER_USER_ID}auth=${GLOBAL_SDC_AUTHENTICATION}
703 [Return] ${resp.json()}
704
705Set SDC Catalog Resource Component Instance Properties
706 [Documentation] Sets SDC Catalog Resource component instance properties by ids
707 [Arguments] ${catalog_resource_id} ${component_parent_service_id} ${data}
708 ${resp}= SDC.Run Post Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_SERVICES_PATH}/${component_parent_service_id}/resourceInstance/${catalog_resource_id}/properties ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
709 [Return] ${resp.json()}
710
711Set SDC Catalog Resource Component Instance Properties For Resource
712 [Documentation] Sets SDC Resource component instance properties by ids
713 [Arguments] ${catalog_parent_resource_id} ${catalog_resource_id} ${data}
714 ${resp}= SDC.Run Post Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_RESOURCES_PATH}/${catalog_parent_resource_id}/resourceInstance/${catalog_resource_id}/properties ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
715 [Return] ${resp.json()}
716
717Set CDS Catalog Resource Component Instance Properties
718 [Documentation] Sets CDS Catalog Resource component instance properties by ids
719 [Arguments] ${catalog_resource_id} ${component_instance_id} ${data}
720 ${resp}= SDC.Run Post Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/resourceInstance/${component_instance_id}/inputs ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
721 [Return] ${resp.json()}
722
723Set SDC Catalog Resource VNF Inputs
724 [Documentation] Sets VNF Inputs for an SDC Catalog Resource by its id
725 [Arguments] ${catalog_resource_id} ${data}
726 ${resp}= SDC.Run Post Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/update/inputs ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
727 [Return] ${resp.json()}
728
DR695Hcccad652019-09-16 13:21:47 -0400729Get Service Catalog
730 [Arguments] ${service_name}
731 ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/serviceName/${service_name}/serviceVersion/1.0 ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
732 [Return] ${resp.json()}
733
DR695Hc0cf6a42019-07-26 16:42:36 -0400734Get SDC Demo Vnf Catalog Resource
735 [Documentation] Gets Resource ids of demonstration VNFs for instantiation
736 [Arguments] ${service_name}
DR695Hcccad652019-09-16 13:21:47 -0400737 ${resp}= Get Service Catalog ${service_name}
DR695Hc0cf6a42019-07-26 16:42:36 -0400738 @{ITEMS}= Copy List ${resp.json()['componentInstances']}
739 ${demo_catalog_resource}= Create Dictionary
740 :FOR ${ELEMENT} IN @{ITEMS}
741 \ Log ${ELEMENT['name']}
742 \ Log ${ELEMENT['groupInstances'][0]['groupName']}
743 \ ${vnf}= Get VNF From Group Name ${ELEMENT['groupInstances'][0]['groupName']} ${service_name}
744 \ ${vnf_data}= Create Dictionary vnf_type=${ELEMENT['name']} vf_module=${ELEMENT['groupInstances'][0]['groupName']}
745 \ LOG ${vnf_data}
746 \ Set To Dictionary ${demo_catalog_resource} ${vnf}=${vnf_data}
747 \ LOG ${demo_catalog_resource}
748 [Return] ${demo_catalog_resource}
749
750Get VNF From Group Name
751 [Documentation] Looks up VNF key from service mapping for a regex on group_name and service_name
752 [Arguments] ${group_name} ${service_name}
753 ${vnf}= Set Variable If
754 ... ('${service_name}'=='demoVFWCL') and ('base_vfw' in '${group_name}') vFWCLvFWSNK
755 ... ('${service_name}'=='demoVFWCL') and ('base_vpkg' in '${group_name}') vFWCLvPKG
756 ... ('${service_name}'=='demoVLB') and ('base_vlb' in '${group_name}') vLB
757 [Return] ${vnf}
758
759Checkin SDC Catalog Resource
760 [Documentation] Checks in an SDC Catalog Resource by its id
761 [Arguments] ${catalog_resource_id}
762 ${map}= Create Dictionary user_remarks=Robot remarks
763 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
764 ${data}= Templating.Apply Template sdc ${SDC_USER_REMARKS_TEMPLATE} ${map}
765 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_DESIGNER_USER_ID} ${SDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${SDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} auth=${GLOBAL_SDC_AUTHENTICATION}
766 Should Be Equal As Strings ${resp.status_code} 200
767 [Return] ${resp.json()}
768
769Request Certify SDC Catalog Resource
770 [Documentation] Requests certification of an SDC Catalog Resource by its id
771 [Arguments] ${catalog_resource_id}
772 ${map}= Create Dictionary user_remarks=Robot remarks
773 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
774 ${data}= Templating.Apply Template sdc ${SDC_USER_REMARKS_TEMPLATE} ${map}
775 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${SDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
776 Should Be Equal As Strings ${resp.status_code} 200
777 [Return] ${resp.json()}
778
779Start Certify SDC Catalog Resource
780 [Documentation] Start certification of an SDC Catalog Resource by its id
781 [Arguments] ${catalog_resource_id}
782 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${SDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${SDC_TESTER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
783 Should Be Equal As Strings ${resp.status_code} 200
784 [Return] ${resp.json()}
785
786Certify SDC Catalog Resource
kaihlavia724b232019-08-07 12:37:17 +0300787 [Documentation] Certifies an SDC Catalog Resource by its id and returns the new uniqueId and uuid
DR695Hc0cf6a42019-07-26 16:42:36 -0400788 [Arguments] ${catalog_resource_id} ${user_id}=${SDC_TESTER_USER_ID}
789 ${map}= Create Dictionary user_remarks=Robot remarks
790 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
791 ${data}= Templating.Apply Template sdc ${SDC_USER_REMARKS_TEMPLATE} ${map}
792 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${SDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${user_id} auth=${GLOBAL_SDC_AUTHENTICATION}
793 Should Be Equal As Strings ${resp.status_code} 200
kaihlavia724b232019-08-07 12:37:17 +0300794 [Return] ${resp.json()['uniqueId']} ${resp.json()['uuid']}
DR695Hc0cf6a42019-07-26 16:42:36 -0400795
796Upload SDC Heat Package
797 [Documentation] Creates an SDC Software Product and returns its id
798 [Arguments] ${software_product_id} ${file_path} ${version_id}=0.1
799 ${files}= Create Dictionary
800 Create Multi Part ${files} upload ${file_path} contentType=application/zip
801 ${resp}= SDC.Run Post Files Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id}${SDC_VENDOR_SOFTWARE_UPLOAD_PATH} ${files} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
802 Should Be Equal As Strings ${resp.status_code} 200
803
804Add SDC Catalog Service
805 [Documentation] Creates an SDC Catalog Service and returns its id
krzysztof kuzmickidadd0e62019-07-31 20:08:36 +0200806 [Arguments] ${catalog_service_name} ${instantiationType}=A-la-carte
DR695Hc0cf6a42019-07-26 16:42:36 -0400807 ${uuid}= Generate UUID4
808 ${shortened_uuid}= Evaluate str("${uuid}")[:23]
809 ${catalog_service_name}= Set Variable If '${catalog_service_name}' =='' ${shortened_uuid} ${catalog_service_name}
krzysztof kuzmickidadd0e62019-07-31 20:08:36 +0200810 ${map}= Create Dictionary service_name=${catalog_service_name} instantiation_type=${instantiationType}
DR695Hc0cf6a42019-07-26 16:42:36 -0400811 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
812 ${data}= Templating.Apply Template sdc ${SDC_CATALOG_SERVICE_TEMPLATE} ${map}
813 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
814 Should Be Equal As Strings ${resp.status_code} 201
815 [Return] ${resp.json()['uniqueId']}
816
817Mark SDC Catalog Service Inactive
818 [Documentation] Deletes an SDC Catalog Service
819 [Arguments] ${catalog_service_id}
820 ${resp}= SDC.Run Delete Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${None} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
821 Should Be Equal As Strings ${resp.status_code} 204
822 [Return] ${resp}
823
824Delete Inactive SDC Catalog Services
825 [Documentation] Delete all SDC Catalog Services that are inactive
826 ${resp}= SDC.Run Delete Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_INACTIVE_SERVICES_PATH} ${None} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
827 Should Be Equal As Strings ${resp.status_code} 200
828 [Return] ${resp.json()}
829
830Get SDC Catalog Service
831 [Documentation] Gets an SDC Catalog Service by its id
832 [Arguments] ${catalog_service_id}
833 ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
834 [Return] ${resp.json()}
835
836Checkin SDC Catalog Service
837 [Documentation] Checks in an SDC Catalog Service by its id
838 [Arguments] ${catalog_service_id}
839 ${map}= Create Dictionary user_remarks=Robot remarks
840 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
841 ${data}= Templating.Apply Template sdc ${SDC_USER_REMARKS_TEMPLATE} ${map}
842 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
843 Should Be Equal As Strings ${resp.status_code} 200
844 [Return] ${resp.json()}
845
846Request Certify SDC Catalog Service
847 [Documentation] Requests certification of an SDC Catalog Service by its id
848 [Arguments] ${catalog_service_id}
849 ${map}= Create Dictionary user_remarks=Robot remarks
850 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
851 ${data}= Templating.Apply Template sdc ${SDC_USER_REMARKS_TEMPLATE} ${map}
852 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
853 Should Be Equal As Strings ${resp.status_code} 200
854 [Return] ${resp.json()}
855
856Start Certify SDC Catalog Service
857 [Documentation] Start certification of an SDC Catalog Service by its id
858 [Arguments] ${catalog_service_id}
859 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${SDC_TESTER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
860 Should Be Equal As Strings ${resp.status_code} 200
861 [Return] ${resp.json()}
862
863Certify SDC Catalog Service
864 [Documentation] Certifies an SDC Catalog Service by its id and returns the new id
865 [Arguments] ${catalog_service_id}
866 ${map}= Create Dictionary user_remarks=Robot remarks
867 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
868 ${data}= Templating.Apply Template sdc ${SDC_USER_REMARKS_TEMPLATE} ${map}
869 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${SDC_TESTER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
870 Should Be Equal As Strings ${resp.status_code} 200
871 [Return] ${resp.json()['uniqueId']}
872
873Approve SDC Catalog Service
874 [Documentation] Approves an SDC Catalog Service by its id
875 [Arguments] ${catalog_service_id}
876 ${map}= Create Dictionary user_remarks=Robot remarks
877 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
878 ${data}= Templating.Apply Template sdc ${SDC_USER_REMARKS_TEMPLATE} ${map}
879 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH}${SDC_DISTRIBUTION_STATE_APPROVE_PATH} ${data} ${SDC_GOVERNOR_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
880 Should Be Equal As Strings ${resp.status_code} 200
881 [Return] ${resp.json()}
kaihlavia724b232019-08-07 12:37:17 +0300882
DR695Hc0cf6a42019-07-26 16:42:36 -0400883Distribute SDC Catalog Service
884 [Documentation] distribute an SDC Catalog Service by its id
885 [Arguments] ${catalog_service_id}
886 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} ${None} ${SDC_OPS_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
887 Should Be Equal As Strings ${resp.status_code} 200
888 [Return] ${resp.json()}
889
890Add SDC Resource Instance
kaihlavia724b232019-08-07 12:37:17 +0300891 [Documentation] Creates an SDC Resource Instance and returns its id and name
DR695Hc0cf6a42019-07-26 16:42:36 -0400892 [Arguments] ${catalog_service_id} ${catalog_resource_id} ${catalog_resource_name} ${xoffset}=${0} ${yoffset}=${0} ${resourceType}=VF
893 ${milli_timestamp}= Generate Timestamp
894 ${xoffset}= Set Variable ${xoffset+306}
895 ${yoffset}= Set Variable ${yoffset+248}
896 ${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}
897 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
898 ${data}= Templating.Apply Template sdc ${SDC_RESOURCE_INSTANCE_TEMPLATE} ${map}
899 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
900 Should Be Equal As Strings ${resp.status_code} 201
kaihlavia724b232019-08-07 12:37:17 +0300901 [Return] ${resp.json()['uniqueId']} ${resp.json()['name']}
DR695Hc0cf6a42019-07-26 16:42:36 -0400902
903Add SDC Resource Instance To Resource
904 [Documentation] Creates an SDC Resource Instance in a Resource (VF) and returns its id
905 [Arguments] ${parent_catalog_resource_id} ${catalog_resource_id} ${catalog_resource_name} ${xoffset}=${0} ${yoffset}=${0} ${resourceType}=VF
906 ${milli_timestamp}= Generate Timestamp
907 ${xoffset}= Set Variable ${xoffset+306}
908 ${yoffset}= Set Variable ${yoffset+248}
909 ${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}
910 Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
911 ${data}= Templating.Apply Template sdc ${SDC_RESOURCE_INSTANCE_TEMPLATE} ${map}
912 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH}/${parent_catalog_resource_id}${SDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
913 Should Be Equal As Strings ${resp.status_code} 201
914 [Return] ${resp.json()['uniqueId']}
915
916Get Catalog Service Distribution
917 [Documentation] Gets an SDC Catalog Service distribution
918 [Arguments] ${catalog_service_uuid}
919 ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_uuid}${SDC_CATALOG_SERVICE_DISTRIBUTION_PATH} ${SDC_OPS_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
920 Should Be Equal As Strings ${resp.status_code} 200
921 [Return] ${resp.json()}
922
923Check Catalog Service Distributed
924 [Documentation] Checks if an SDC Catalog Service is distributed
925 [Arguments] ${catalog_service_uuid} ${dist_status}
926 ${dist_resp}= Get Catalog Service Distribution ${catalog_service_uuid}
927 Should Be Equal As Strings ${dist_resp['distributionStatusOfServiceList'][0]['deployementStatus']} Distributed
928 ${det_resp}= Get Catalog Service Distribution Details ${dist_resp['distributionStatusOfServiceList'][0]['distributionID']}
929 @{ITEMS}= Copy List ${det_resp['distributionStatusList']}
930 Should Not Be Empty ${ITEMS}
931 ${SO_COMPLETE} Set Variable FALSE
932 ${dist_status} Set Variable CONTINUE
933 Should Not Be Empty ${ITEMS}
934 :FOR ${ELEMENT} IN @{ITEMS}
935 \ Log ${ELEMENT['omfComponentID']}
936 \ Log ${ELEMENT['status']}
937 \ ${SO_COMPLETE} Set Variable If (('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_OK')) or ('${SO_COMPLETE}'=='TRUE') TRUE
938 \ Exit For Loop If ('${SO_COMPLETE}'=='TRUE')
Brian Freemand1339742019-10-07 11:37:14 -0500939 \ Run Keyword If ('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_ERROR') Fatal Error "SO DISTRIBUTION_COMPLETE_ERROR"
DR695Hc0cf6a42019-07-26 16:42:36 -0400940 \ ${dist_status}= Set Variable If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml')) EXIT
941 \ Exit For Loop If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml'))
942 Should Be True ( '${SO_COMPLETE}'=='TRUE') SO Test
943
944Get Catalog Service Distribution Details
945 [Documentation] Gets SDC Catalog Service distribution details
946 [Arguments] ${catalog_service_distribution_id}
947 ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}${SDC_CATALOG_SERVICE_DISTRIBUTION_PATH}/${catalog_service_distribution_id} ${SDC_OPS_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
948 Should Be Equal As Strings ${resp.status_code} 200
949 [Return] ${resp.json()}
950
951Run SDC Health Check
952 [Documentation] Runs a SDC health check
953 ${resp}= SDC.Run Get Request ${SDC_FE_ENDPOINT} ${SDC_HEALTH_CHECK_PATH} user=${None}
954 # only test for HTTP 200 to determine SDC Health. SDC_DE_HEALTH is informational
955 Should Be Equal As Strings ${resp.status_code} 200 SDC DOWN
956 ${SDC_DE_HEALTH}= Catenate DOWN
957 @{ITEMS}= Copy List ${resp.json()['componentsInfo']}
958 :FOR ${ELEMENT} IN @{ITEMS}
959 \ Log ${ELEMENT['healthCheckStatus']}
960 \ ${SDC_DE_HEALTH} Set Variable If (('DE' in '${ELEMENT['healthCheckComponent']}') and ('${ELEMENT['healthCheckStatus']}' == 'UP')) or ('${SDC_DE_HEALTH}'=='UP') UP
DR695Hf23314c2019-08-19 10:39:16 -0400961 Log (DMaaP:${SDC_DE_HEALTH}) console=True
DR695Hc0cf6a42019-07-26 16:42:36 -0400962
963Open SDC GUI
964 [Documentation] Logs in to SDC GUI
965 [Arguments] ${PATH}
966 ## Setup Browever now being managed by the test case
967 ##Setup Browser
968 Go To ${SDC_FE_ENDPOINT}${PATH}
969 Maximize Browser Window
970
971 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
972 Log Logging in to ${SDC_FE_ENDPOINT}${PATH}
973 Title Should Be SDC
974 Wait Until Page Contains Element xpath=//div/a[text()='SDC'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
975 Log Logged in to ${SDC_FE_ENDPOINT}${PATH}
976
977
978Create Multi Part
979 [Arguments] ${addTo} ${partName} ${filePath} ${contentType}=${None}
980 ${fileData}= Get Binary File ${filePath}
981 ${fileDir} ${fileName}= Split Path ${filePath}
982 ${partData}= Create List ${fileName} ${fileData} ${contentType}
983 Set To Dictionary ${addTo} ${partName}=${partData}
984
985
kaihlavia724b232019-08-07 12:37:17 +0300986Add CDS Parameters
987 [Arguments] ${catalog_service_name}
DR695Hc0cf6a42019-07-26 16:42:36 -0400988 ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/serviceName/${catalog_service_name}/serviceVersion/0.1 ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
DR695Hc0cf6a42019-07-26 16:42:36 -0400989 ${service_uuid}= Set Variable ${resp.json()['uniqueId']}
990 ${component_uuid}= Set Variable ${resp.json()['componentInstances'][0]['uniqueId']}
Abdelmuhaimen Seaudi498057b2019-08-02 18:36:00 +0000991 ${skip_post_instatiation}= Set Variable If '${catalog_service_name}' == "demoVLB_CDS" false true
DR695Hc0cf6a42019-07-26 16:42:36 -0400992 @{inputs}= Copy List ${resp.json()['componentInstances'][0]['inputs']}
993 :FOR ${input} IN @{inputs}
Abdelmuhaimen Seaudi498057b2019-08-02 18:36:00 +0000994 \ Run Keyword If '${input['name']}' == "sdnc_artifact_name" Set Input Parameter ${service_uuid} ${component_uuid} ${input} string vnf
hanybaki3bee75e2019-10-14 17:43:47 +0200995 ... ELSE IF '${input['name']}' == "sdnc_model_name" Set Input Parameter ${service_uuid} ${component_uuid} ${input} string vLB_CDS
DR695H0ccf9e32019-08-06 17:28:56 -0400996 ... ELSE IF '${input['name']}' == "sdnc_model_version" Set Input Parameter ${service_uuid} ${component_uuid} ${input} string 1.0.0
997 ... ELSE IF '${input['name']}' == "skip_post_instantiation_configuration" Set Input Parameter ${service_uuid} ${component_uuid} ${input} boolean ${skip_post_instatiation}
DR695Hc0cf6a42019-07-26 16:42:36 -0400998
kaihlavia724b232019-08-07 12:37:17 +0300999
1000Set Input Parameter
Abdelmuhaimen Seaudi498057b2019-08-02 18:36:00 +00001001 [Arguments] ${service_uuid} ${component_uuid} ${input} ${input_type} ${input_value}
krzysztof kuzmickidadd0e62019-07-31 20:08:36 +02001002 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${service_uuid}/resourceInstance/${component_uuid}/inputs {"constraints":[],"name":"${input['name']}","parentUniqueId":"${input['parentUniqueId']}","password":false,"required":false,"schema":{"property":{}},"type":"${input_type}","uniqueId":"${input['uniqueId']}","value":"${input_value}","definition":false,"toscaPresentation":{"ownerId":"${input['ownerId']}"}} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
DR695Hc0cf6a42019-07-26 16:42:36 -04001003 Should Be Equal As Strings ${resp.status_code} 200
krzysztof kuzmickidadd0e62019-07-31 20:08:36 +02001004
1005
1006Get Service Model Parameter from SDC Service Catalog
1007 [Documentation] Returns Service Model UUID
1008 [Arguments] ${service_name} ${parameter_name}
1009 ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/serviceName/${service_name}/serviceVersion/1.0 ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
1010 ${json_resp}= Set Variable ${resp.json()}
1011 ${parameter_value}= Set Variable ${json_resp["${parameter_name}"]}
Abdelmuhaimen Seaudi498057b2019-08-02 18:36:00 +00001012 [Return] ${parameter_value}
kaihlavia724b232019-08-07 12:37:17 +03001013
1014Onboard DCAE Microservice
1015 [Documentation] Create DCAE Microservice with a given name, add Tosca artifacts to it and certify it
1016 ... Return the unique_id and uuid of the certified VF
1017 [Arguments] ${test_vf_name}
1018 ${data}= Create SDC Catalog Resource For DCAE Component MicroService Data ${test_vf_name} TestVendor
1019 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
1020 Should Be Equal As Strings ${resp.status_code} 201
1021
1022 ${vf_unique_id}= Set Variable ${resp.json()['uniqueId']}
1023
1024 Add Tosca Artifact to Resource template ${vf_unique_id}
1025 Add Tosca Artifact to Resource translate ${vf_unique_id}
1026 Add Tosca Artifact to Resource schema ${vf_unique_id}
1027
1028 ${cert_vf_unique_id} ${cert_vf_uuid} Certify SDC Catalog Resource ${vf_unique_id} ${SDC_DESIGNER_USER_ID}
1029 [return] ${cert_vf_unique_id} ${cert_vf_uuid}
1030
1031Create SDC Catalog Resource For DCAE Component MicroService Data
1032 [Documentation] Creates and returns data for DCAE Component MicroService SDC Catalog Resource
1033 [Arguments] ${resource_name} ${vendor_name}
1034 ${map}= Create Dictionary resource_name=${resource_name} vendor_name=${vendor_name}
1035 Templating.Create Environment sdc_dcaed ${GLOBAL_TEMPLATE_FOLDER}
1036 ${data}= Templating.Apply Template sdc_dcaed ${SDC_DCAE_COMPONENT_MICROSERVICE_TEMPLATE} ${map}
1037 [Return] ${data}
1038
1039Add Tosca Artifact To Resource
1040 [Documentation] Add Tosca artifacts to given resource id
1041 [Arguments] ${artifact} ${vf_id}
1042 ${blueprint_data} OperatingSystem.Get File ${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH}${artifact}.yaml
1043 ${payloadData}= Base64 Encode ${blueprint_data}
1044 ${dict}= Create Dictionary artifactLabel=${artifact} artifactName=${artifact}.yaml artifactType=DCAE_TOSCA artifactGroupType=DEPLOYMENT description=${artifact}.yaml payloadData=${payloadData}
1045 Templating.Create Environment sdc_artifact_upload ${GLOBAL_TEMPLATE_FOLDER}
1046 ${data}= Templating.Apply Template sdc_artifact_upload ${SDC_ARTIFACT_UPLOAD_TEMPLATE} ${dict}
1047 # POST artifactUpload to resource
1048 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH}/${vf_id}/artifacts ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
1049 Should Be Equal As Strings ${resp.status_code} 200
1050 [Return] ${resp}
1051
1052Add Catalog Service For Monitoring Template
1053 [Documentation] Creates SDC Catalog Service for Monitoring Template with given name
1054 [Arguments] ${service_name}
1055 ${map}= Create Dictionary service_name=${service_name}
1056 Templating.Create Environment sdc_catalog_service ${GLOBAL_TEMPLATE_FOLDER}
1057 ${data}= Templating.Apply Template sdc_catalog_service ${SDC_CATALOG_SERVICE_MONITORING_TEMPLATE} ${map}
1058 ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
1059 Should Be Equal As Strings ${resp.status_code} 201
1060 [Return] ${resp.json()['uniqueId']} ${resp.json()['uuid']}
1061
1062Generate Unique Postfix
1063 [Documentation] Create and return unique postfix to be used in various unique names
1064 ${tmp_id} = Generate Timestamp
1065 ${tmp_str} = Convert To String ${tmp_id}
1066 [return] ${tmp_str}
1067
1068Certify And Approve SDC Catalog Service
1069 [Documentation] Perform the required steps to certify and approve the given SDC catalog service
1070 [Arguments] ${cs_unique_id}
1071
1072 Checkin SDC Catalog Service ${cs_unique_id}
1073 Request Certify SDC Catalog Service ${cs_unique_id}
1074 Start Certify SDC Catalog Service ${cs_unique_id}
1075 ${cert_cs_unique_id}= Certify SDC Catalog Service ${cs_unique_id}
1076 Approve SDC Catalog Service ${cert_cs_unique_id}
1077
1078Create Monitoring Configuration
1079 [Documentation] Create a monitoring configuration for a given service based on a previously created VFCMT
1080 ... Return the unique_id and uuid of the created catalog service for the monitoring configuration
1081 ... and the name of the related VFCMT instance
1082 [Arguments] ${service_name} ${vf_unique_id} ${vf_name}
1083 ${cs_unique_id} ${cs_uuid} Add Catalog Service For Monitoring Template ${service_name}
1084 ${vfi_uuid} ${vfi_name} Add SDC Resource Instance ${cs_unique_id} ${vf_unique_id} ${vf_name}
1085 [return] ${cs_unique_id} ${cs_uuid} ${vfi_name}
1086