aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/aai/ccvpn-vpn-bindings.robot
diff options
context:
space:
mode:
Diffstat (limited to 'robot/resources/aai/ccvpn-vpn-bindings.robot')
-rw-r--r--robot/resources/aai/ccvpn-vpn-bindings.robot30
1 files changed, 10 insertions, 20 deletions
diff --git a/robot/resources/aai/ccvpn-vpn-bindings.robot b/robot/resources/aai/ccvpn-vpn-bindings.robot
index 192753e0..9ba8c588 100644
--- a/robot/resources/aai/ccvpn-vpn-bindings.robot
+++ b/robot/resources/aai/ccvpn-vpn-bindings.robot
@@ -23,8 +23,7 @@ ${AAI_VPNB_API_IMPL_INDEX_PATH}= ${AAI_CASABLANCA_INDEX_PATH}
Create VPN Binding If Not Exists
[Documentation] Creates VPN Binding in AAI if it doesn't exist
[Arguments] ${vpn_id}
- ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
- ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} auth=${auth}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} auth=${GLOBAL_AAI_AUTHENTICATION}
Return From Keyword If '${get_resp.status_code}' == '200'
Create VPN Binding ${vpn_id}
@@ -34,62 +33,54 @@ Create VPN Binding
${arguments}= Create Dictionary vpn_id=${vpn_id}
Templating.Create Environment aai ${GLOBAL_TEMPLATE_FOLDER}
${data}= Templating.Apply Template aai ${AAI_ADD_VPNBINDING_BODY} ${arguments}
- ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
- ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} ${data} auth=${auth}
+ ${put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} ${data} auth=${GLOBAL_AAI_AUTHENTICATION}
${status_string}= Convert To String ${put_resp.status_code}
Should Match Regexp ${status_string} ^(201|200)$
Delete VPN Binding If Exists
[Documentation] Removes VPN Binding from AAI if it exists
[Arguments] ${vpn_id}
- ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
- ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} auth=${auth}
+ ${get_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} auth=${GLOBAL_AAI_AUTHENTICATION}
Run Keyword If '${get_resp.status_code}' == '200' Delete VPN Binding ${vpn_id} ${get_resp.json()}
Delete VPN Binding
[Documentation] Removes VPN Binding from AAI
[Arguments] ${vpn_id} ${json}
${resource_version}= Catenate ${json['resource-version']}
- ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
- ${put_resp}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} ${resource_version} auth=${auth}
+ ${put_resp}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} ${resource_version} auth=${GLOBAL_AAI_AUTHENTICATION}
Should Be Equal As Strings ${put_resp.status_code} 204
Get VPN Binding
[Documentation] Return VPN Binding
[Arguments] ${vpn_id}
- ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
- ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} auth=${auth}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} auth=${GLOBAL_AAI_AUTHENTICATION}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
Get Valid VPN Binding URL
[Documentation] Return Valid VPN Binding URL
[Arguments] ${vpn_id}
- ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
- ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} auth=${auth}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} auth=${GLOBAL_AAI_AUTHENTICATION}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id}
Get Nodes Query VPN Binding
[Documentation] Return Nodes query VPN Binding
[Arguments] ${vpn_id}
- ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
- ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_NODES_PATH}?vpn-id=${vpn_id} auth=${auth}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_NODES_PATH}?vpn-id=${vpn_id} auth=${GLOBAL_AAI_AUTHENTICATION}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
Get Example VPN Binding
[Documentation] Return Example VPN Binding
- ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
- ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_EXAMPLES_PATH} auth=${auth}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_EXAMPLES_PATH} auth=${GLOBAL_AAI_AUTHENTICATION}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
Confirm No VPN Binding
[Documentation] Confirm No VPN Binding
[Arguments] ${vpn_id}
- ${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
- ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} auth=${auth}
+ ${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id} auth=${GLOBAL_AAI_AUTHENTICATION}
Should Be Equal As Strings ${resp.status_code} 404
Add VPN Binding Relationship
@@ -107,5 +98,4 @@ Get VPN Binding With RelationshipList
[Documentation] Return VPN Binding with relationship-list
[Arguments] ${vpn_id}
${resp}= Get Object With Depth ${AAI_VPNB_API_IMPL_INDEX_PATH}${AAI_VPNB_ROOT_PATH}/${vpn_id}
- [Return] ${resp}
-
+ [Return] ${resp} \ No newline at end of file