summaryrefslogtreecommitdiffstats
path: root/robot/resources/aai
diff options
context:
space:
mode:
authorKrzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>2020-03-06 14:06:48 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2020-04-01 06:55:30 +0000
commit888614e469ca672ddac67cdc2b57ce48497da441 (patch)
tree9db2188d058097967f2b96795f70cc583e94139f /robot/resources/aai
parent9f863418055651d4b6fa9772e1f9a94c3efe8c6c (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/aai')
-rw-r--r--robot/resources/aai/create_customer.robot13
-rw-r--r--robot/resources/aai/create_service.robot11
2 files changed, 23 insertions, 1 deletions
diff --git a/robot/resources/aai/create_customer.robot b/robot/resources/aai/create_customer.robot
index 6fbb84c7..c0498b6c 100644
--- a/robot/resources/aai/create_customer.robot
+++ b/robot/resources/aai/create_customer.robot
@@ -33,4 +33,15 @@ Delete Customer Exists
[Documentation] Deletes a customer in A&AI
[Arguments] ${customer_id} ${resource_version_id}
${put_resp}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id} ${resource_version_id} auth=${GLOBAL_AAI_AUTHENTICATION}
- Should Be Equal As Strings ${put_resp.status_code} 204 \ No newline at end of file
+ Should Be Equal As Strings ${put_resp.status_code} 204
+
+Get OwningEntity Id
+ [Documentation] Returns OwningEntity Id based on OwningEntity name
+ [Arguments] ${name}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} /aai/v11/business/owning-entities auth=${GLOBAL_AAI_AUTHENTICATION}
+ @{list}= Copy List ${resp.json['owning-entity']}
+ :FOR ${map} IN @{list}
+ \ ${owning_entity_name}= Run Keyword And Ignore Error Get From Dictionary ${map} owning-entity-name
+ \ ${owning_entity_id}= Run Keyword And Ignore Error Get From Dictionary ${map} owning-entity-id
+ \ ${id} Run Keyword If '${owning_entity_name}' == '${name}' Set Variable ${owning_entity_id}
+ [Return] ${id} \ No newline at end of file
diff --git a/robot/resources/aai/create_service.robot b/robot/resources/aai/create_service.robot
index e473d491..0dc7a2f2 100644
--- a/robot/resources/aai/create_service.robot
+++ b/robot/resources/aai/create_service.robot
@@ -59,6 +59,17 @@ Get Services
Run Keyword If '${status}' == 'PASS' Update Service Dictionary ${dict} ${resp.json()}
[Return] ${dict}
+Get Service Id
+ [Documentation] Gets a service id in A&AI
+ [Arguments] ${service_description}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${INDEX PATH}${ROOT_SERVICE_PATH} auth=${GLOBAL_AAI_AUTHENTICATION}
+ @{list}= Copy List ${resp.json['service']}
+ :FOR ${map} IN @{list}
+ \ ${service_type}= Run Keyword And Ignore Error Get From Dictionary ${map} service-description
+ \ ${service_id}= Run Keyword And Ignore Error Get From Dictionary ${map} service-id
+ \ ${id} Run Keyword If '${service_type}' == '${service_description}' Set Variable ${service_id}
+ [Return] ${id}
+
Update Service Dictionary
[Arguments] ${dict} ${json}
@{list}= Copy List ${json['service']}