aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/asdc_interface.robot
diff options
context:
space:
mode:
authorBrian Freeman <bf1936@att.com>2018-11-01 14:57:53 -0500
committerBrian Freeman <bf1936@att.com>2018-11-01 14:58:02 -0500
commit79b00ceb68537bf4cd03dee2f281c1ddd46a62d8 (patch)
treef9a4b68a413da5d20231752c6f92e4a23410cd30 /robot/resources/asdc_interface.robot
parent17ccf95911c5673608f52254403679fa103bbba8 (diff)
Get UUID's from SDC for Demo Instantiate
Issue-ID: INT-704 Change-Id: Id63ddaeec2796e494075a8677a34e4ccb42ef73d Signed-off-by: Brian Freeman <bf1936@att.com>
Diffstat (limited to 'robot/resources/asdc_interface.robot')
-rw-r--r--robot/resources/asdc_interface.robot24
1 files changed, 24 insertions, 0 deletions
diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot
index 8d61c84b..c9edfae3 100644
--- a/robot/resources/asdc_interface.robot
+++ b/robot/resources/asdc_interface.robot
@@ -338,6 +338,30 @@ Set ASDC Catalog Resource VNF Inputs
[Arguments] ${catalog_resource_id} ${data}
${resp}= Run ASDC Post Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/update/inputs ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
[Return] ${resp.json()}
+Get SDC Demo Vnf Catalog Resource
+ [Documentation] gets resource id's for demonstration VNFs for instantiate
+ [Arguments] ${service_name}
+ ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/serviceName/${service_name}/serviceVersion/1.0
+ @{ITEMS}= Copy List ${resp.json()['componentInstances']}
+ ${demo_catalog_resource}= Create Dictionary
+ :FOR ${ELEMENT} IN @{ITEMS}
+ \ Log ${ELEMENT['name']}
+ \ Log ${ELEMENT['groupInstances'][0]['groupName']}
+ \ ${vnf}= Get VNF From Group Name ${ELEMENT['groupInstances'][0]['groupName']} ${service_name}
+ \ ${vnf_data}= Create Dictionary vnf_type=${ELEMENT['name']} vf_module=${ELEMENT['groupInstances'][0]['groupName']}
+ \ LOG ${vnf_data}
+ \ Set To Dictionary ${demo_catalog_resource} ${vnf}=${vnf_data}
+ \ LOG ${demo_catalog_resource}
+ [Return] ${demo_catalog_resource}
+
+Get VNF From Group Name
+ [Documentation] looks up vnf key from service mapping for a regex on groupName and service_name
+ [Arguments] ${group_name} ${service_name}
+ ${vnf}= Set Variable If
+ ... ('${service_name}'=='demoVFWCL') and ('base_vfw' in '${group_name}') vFWSNK
+ ... ('${service_name}'=='demoVFWCL') and ('base_vpkg' in '${group_name}') vPKG
+ ... ('${service_name}'=='demoVLB') and ('base_vlb' in '${group_name}') vLB
+ [Return] ${vnf}
Checkin ASDC Catalog Resource
[Documentation] checksin an asdc Catalog Resource by its id
[Arguments] ${catalog_resource_id}