diff options
author | jf9860 <jf9860@att.com> | 2017-02-22 14:44:06 -0500 |
---|---|---|
committer | jf9860 <jf9860@att.com> | 2017-02-22 14:44:46 -0500 |
commit | 0f7f2653d2190514d923046b40975967f82b0b3e (patch) | |
tree | 6023b56fe89b5d2242065262cb79670011e64942 /robot/resources | |
parent | ccff30b6e325f359879595998e83bbfe6624c851 (diff) |
Add keywords for deleting A&AI entities
Change-Id: Ia1218f1e1bba661272bbc29cc683506f21d3692f
Signed-off-by: jf9860 <jf9860@att.com>
Diffstat (limited to 'robot/resources')
-rw-r--r-- | robot/resources/aai/aai_interface.robot | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/robot/resources/aai/aai_interface.robot b/robot/resources/aai/aai_interface.robot index 43451809..11979f0b 100644 --- a/robot/resources/aai/aai_interface.robot +++ b/robot/resources/aai/aai_interface.robot @@ -6,6 +6,7 @@ Resource ../global_properties.robot *** Variables *** ${AAI_HEALTH_PATH} /aai/util/echo?action=long +${VERSIONED_INDEX_PATH} /aai/v8 *** Keywords *** Run A&AI Health Check @@ -55,4 +56,18 @@ Run A&AI Delete Request ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} ${resp}= Delete Request aai ${data_path}?resource-version=${resource_version} headers=${headers} Log Received response from aai ${resp.text} - [Return] ${resp}
\ No newline at end of file + [Return] ${resp} + +Delete A&AI Entity + [Documentation] Deletes an entity in A&AI + [Arguments] ${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} + ${put_resp}= Run A&AI Delete Request ${VERSIONED_INDEX PATH}${uri} ${resource_version_id} + Should Be Equal As Strings ${put_resp.status_code} 204 + +
\ No newline at end of file |