summaryrefslogtreecommitdiffstats
path: root/robot/resources/aai
diff options
context:
space:
mode:
authorJerry Flood <jf9860@att.com>2017-04-21 16:53:10 -0400
committerJerry Flood <jf9860@att.com>2017-04-21 16:53:25 -0400
commitfe22bf1bff99ec4daa22fdf90cb16ac1e3d175e0 (patch)
tree9f6243d09210b04b27260084f62924ec07183886 /robot/resources/aai
parent0618b4d3a154ab55d63a77147b30ea1fe7048859 (diff)
[TEST-18] Add function to suppress cert warnings
Change-Id: I9ddc3fe40ce813489ecd6237e18a0ebc6e32ae41 Signed-off-by: Jerry Flood <jf9860@att.com>
Diffstat (limited to 'robot/resources/aai')
-rw-r--r--robot/resources/aai/aai_interface.robot22
1 files changed, 13 insertions, 9 deletions
diff --git a/robot/resources/aai/aai_interface.robot b/robot/resources/aai/aai_interface.robot
index 11979f0b..49f98f0c 100644
--- a/robot/resources/aai/aai_interface.robot
+++ b/robot/resources/aai/aai_interface.robot
@@ -1,7 +1,8 @@
*** Settings ***
Documentation The main interface for interacting with A&AI. It handles low level stuff like managing the http request library and A&AI required fields
Library RequestsLibrary
-Library UUID
+Library UUID
+Library HTTPUtils
Resource ../global_properties.robot
*** Variables ***
@@ -11,12 +12,13 @@ ${VERSIONED_INDEX_PATH} /aai/v8
*** Keywords ***
Run A&AI Health Check
[Documentation] Runs an A&AI health check
- ${resp}= Run A&AI Get Request ${AAI_HEALTH_PATH}
+ ${resp}= Run A&AI Get Request ${AAI_HEALTH_PATH}
Should Be Equal As Strings ${resp.status_code} 200
Run A&AI Get Request
[Documentation] Runs an A&AI get request
[Arguments] ${data_path}
+ Disable Warnings
${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
${session}= Create Session aai ${GLOBAL_AAI_SERVER_URL} auth=${auth}
${uuid}= Generate UUID
@@ -24,10 +26,11 @@ Run A&AI Get Request
${resp}= Get Request aai ${data_path} headers=${headers}
Log Received response from aai ${resp.text}
[Return] ${resp}
-
+
Run A&AI Put Request
[Documentation] Runs an A&AI put request
[Arguments] ${data_path} ${data}
+ Disable Warnings
${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
${session}= Create Session aai ${GLOBAL_AAI_SERVER_URL} auth=${auth}
${uuid}= Generate UUID
@@ -39,6 +42,7 @@ Run A&AI Put Request
Run A&AI Post Request
[Documentation] Runs an A&AI Post request
[Arguments] ${data_path} ${data}
+ Disable Warnings
${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
${session}= Create Session aai ${GLOBAL_AAI_SERVER_URL} auth=${auth}
${uuid}= Generate UUID
@@ -46,10 +50,11 @@ Run A&AI Post Request
${resp}= Post Request aai ${data_path} data=${data} headers=${headers}
Log Received response from aai ${resp.text}
[Return] ${resp}
-
+
Run A&AI Delete Request
[Documentation] Runs an A&AI delete request
[Arguments] ${data_path} ${resource_version}
+ Disable Warnings
${auth}= Create List ${GLOBAL_AAI_USERNAME} ${GLOBAL_AAI_PASSWORD}
${session}= Create Session aai ${GLOBAL_AAI_SERVER_URL} auth=${auth}
${uuid}= Generate UUID
@@ -59,15 +64,14 @@ Run A&AI Delete Request
[Return] ${resp}
Delete A&AI Entity
- [Documentation] Deletes an entity in A&AI
+ [Documentation] Deletes an entity in A&AI
[Arguments] ${uri}
- ${get_resp}= Run A&AI Get Request ${VERSIONED_INDEX PATH}${uri}
+ ${get_resp}= Run A&AI Get Request ${VERSIONED_INDEX PATH}${uri}
Run Keyword If '${get_resp.status_code}' == '200' Delete A&AI Entity Exists ${uri} ${get_resp.json()['resource-version']}
Delete A&AI Entity Exists
[Documentation] Deletes an A&AI entity
- [Arguments] ${uri} ${resource_version_id}
+ [Arguments] ${uri} ${resource_version_id}
${put_resp}= Run A&AI Delete Request ${VERSIONED_INDEX PATH}${uri} ${resource_version_id}
- Should Be Equal As Strings ${put_resp.status_code} 204
+ Should Be Equal As Strings ${put_resp.status_code} 204
- \ No newline at end of file