Skip to content
Snippets Groups Projects
Commit 55c5c94e authored by Najam UI Hassan's avatar Najam UI Hassan
Browse files

added majorApiVersion

parent 9296d9f6
No related branches found
No related tags found
3 merge requests!199Merge "3.3.1 dev" into "release 3" master,!193Merge 2.7.1 dev into Master, for TST010ed271 publication,!122SOL003 VNF Lifecycle Operation Granting - Implementation of deltas between v2.7.1 and v2.6.1
......@@ -169,35 +169,35 @@ DELETE API Version
POST API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/v1/api_version
Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/v1/api_version
Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/v1/api_version
Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/v1/api_version
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/v1/api_version
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_version
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
......
......@@ -109,38 +109,38 @@ DELETE Grants - Method not implemented
Wait for individual grant successful notification
Wait Until Keyword Succeeds ${retry} ${polling} Get an individual grant - Successful
Send Request Grant Request in Synchronous mode
Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants
Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants
Pass Execution If ${SYNC_MODE} == 0 The Granting process is asynchronous mode. Skipping the test
Set Headers {"Accept": "${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
${template}= Get File jsons/grantRequest.json
${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId}
Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}
${body}= Output response
Set Suite Variable ${response} ${body}
Send Request Grant Request in Asynchronous mode
Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants
Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants
Pass Execution If ${SYNC_MODE} == 1 The Granting process is synchronous mode. Skipping the test
Set Headers {"Accept": "${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
${template}= Get File jsons/grantRequest.json
${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId}
Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}
${body}= Output response
Set Suite Variable ${response} ${body}
Send Request for a new Grant Forbiden Operation
Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants
Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants
Log The grant request should be rejected
Set Headers {"Accept": "${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
${template}= Get File jsons/grantRejectedRequest.json
${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId}
Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}
${body}= Output response
Set Suite Variable ${response} ${body}
......@@ -150,7 +150,7 @@ Send Request Grant Request
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
${template}= Get File jsons/grantRequest.json
${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId}
Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} allow_redirects=false
Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} allow_redirects=false
${resp} Output response
${result}= evaluate json.loads(json.dumps(${resp})) json
Log ${result}
......@@ -187,7 +187,7 @@ Get Grants
Log Trying to perform a GET. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/grants
Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants
${body}= Output response
Set Suite Variable ${response} ${body}
......@@ -195,7 +195,7 @@ Put Grants
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/${apiVersion}/grants
Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants
${body}= Output response
Set Suite Variable ${response} ${body}
......@@ -203,7 +203,7 @@ Patch Grants
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/grants
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants
${body}= Output response
Set Suite Variable ${response} ${body}
......@@ -212,7 +212,7 @@ Delete Grants
Log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/grants
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants
${body}= Output response
Set Suite Variable ${response} ${body}
......
......@@ -103,14 +103,14 @@ Get individual grant
log Trying to read an individual grant
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId}
${body}= Output response
Set Suite Variable ${response} ${body}
Check resource existence
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
Integer response status 200
Post individual Grant
......@@ -118,7 +118,7 @@ Post individual Grant
Pass Execution If ${SYNC_MODE} == 1 Skipping. Synchronous mode is supported
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId}
${body}= Output response
Set Suite Variable ${response} ${body}
......@@ -126,7 +126,7 @@ Put individual Grant
Log Trying to perform a GET. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId}
${body}= Output response
Set Suite Variable ${response} ${body}
......@@ -134,7 +134,7 @@ Patch individual Grant
Log Trying to perform a GET. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId}
${body}= Output response
Set Suite Variable ${response} ${body}
......@@ -142,7 +142,7 @@ Delete individual Grant
Log Trying to perform a GET. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId}
${body}= Output response
Set Suite Variable ${response} ${body}
......
......@@ -10,7 +10,7 @@ ${grantId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
${apiRoot} /
${apiName} grant
${apiVersion} v1
${apiMajorVersion} v1
${SYNC_MODE} 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment