diff options
author | Krzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com> | 2020-03-06 14:06:48 +0100 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2020-04-01 06:55:30 +0000 |
commit | 888614e469ca672ddac67cdc2b57ce48497da441 (patch) | |
tree | 9db2188d058097967f2b96795f70cc583e94139f /robot/resources/sdc_interface.robot | |
parent | 9f863418055651d4b6fa9772e1f9a94c3efe8c6c (diff) |
Extend PnF registrate test cases for GR API
Issue-ID: INT-1477
Signed-off-by: Krzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>
Change-Id: If7ade6850bd59799d5445cebe27db5c948522e06
Diffstat (limited to 'robot/resources/sdc_interface.robot')
-rw-r--r-- | robot/resources/sdc_interface.robot | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/robot/resources/sdc_interface.robot b/robot/resources/sdc_interface.robot index 4b1d61ba..a85ba27f 100644 --- a/robot/resources/sdc_interface.robot +++ b/robot/resources/sdc_interface.robot @@ -91,7 +91,7 @@ Distribute Model From SDC ... ELSE Get Regexp Matches ${zip} ${service}_(.*)\.zip 1 # Need to be able to distribute preload for vFWCL vFWSNK and vFWDT vFWSNK to prepend service to vnf_type \ ${resource_type_string}= Set Variable If len(${resource_type_match})==0 ${service} ${service}${resource_type_match[0]} - \ Set To Dictionary ${resource_types} ${resource_type_string} ${loop_catalog_resource_id} + \ Set To Dictionary ${resource_types} ${resource_type_string} ${loop_catalog_resource_id} \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY} @@ -260,14 +260,19 @@ Download CSAR Get Generic NeutronNet UUID [Documentation] Look up the UUID of the Generic NeutronNetwork Resource - ${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} - [Return] ${resp.json()['allVersions']['1.0']} + ${json}= Get Resource Catalog Generic%20NeutronNet + [Return] ${json['allVersions']['1.0']} Get AllottedResource UUID [Documentation] Look up the UUID of the Allotted Resource # if this fails then the AllottedResource template got deleted from SDC by mistake - ${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} - [Return] ${resp.json()['allVersions']['1.0']} + ${json}= Get Resource Catalog AllottedResource + [Return] ${json['allVersions']['1.0']} + +Get Resource Catalog + [Arguments] ${resource_name} + ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_QUERY_PATH}/${resource_name}/resourceVersion/1.0 ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} Loop Over Check Catalog Service Distributed [Arguments] ${catalog_service_id} @@ -456,7 +461,7 @@ Add SDC License Model ${resp}= SDC.Run Post Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} Should Be Equal As Strings ${resp.status_code} 200 [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']} - + Get SDC License Model [Documentation] gets an SDC license model by its id [Arguments] ${id} ${version_id}=0.1 @@ -717,7 +722,7 @@ Set SDC Catalog Resource VNF Inputs [Return] ${resp.json()} Get Service Catalog - [Arguments] ${service_name} + [Arguments] ${service_name} ${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} [Return] ${resp.json()} @@ -894,7 +899,7 @@ Get Catalog Service Distribution Details ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}${SDC_CATALOG_SERVICE_DISTRIBUTION_PATH}/${catalog_service_distribution_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} Should Be Equal As Strings ${resp.status_code} 200 [Return] ${resp.json()} - + Run SDC Health Check [Documentation] Runs a SDC health check ${resp}= SDC.Run Get Request ${SDC_FE_ENDPOINT} ${SDC_HEALTH_CHECK_PATH} user=${None} @@ -945,7 +950,7 @@ Add CDS Parameters Set Input Parameter - [Arguments] ${service_uuid} ${component_uuid} ${input} ${input_type} ${input_value} + [Arguments] ${service_uuid} ${component_uuid} ${input} ${input_type} ${input_value} ${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} Should Be Equal As Strings ${resp.status_code} 200 |