Skip to content
Snippets Groups Projects
Commit 5d1b5ca5 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

Merge branch 'SOL003-VNFLifecycleOperationGranting' into '4.5.1-dev'

SOL003 VNF Lifecycle Operation Grant - Implementation of deltas between v4.5.1 and v4.4.1

See merge request !347
parents 9707f165 b097b5e8
Branches
Tags
2 merge requests!351Merge 4.5.1-dev into Release-4,!347SOL003 VNF Lifecycle Operation Grant - Implementation of deltas between v4.5.1 and v4.4.1
......@@ -22,7 +22,7 @@ Requests a grant for a particular VNF lifecycle operation - Synchronous mode
... Test title: Requests a grant for a particular VNF lifecycle operation - Synchronous mode
... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure
... Pre-conditions: none
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO can decide immediately what to respond to a grant request
... Post-Conditions: The grant information is available to the VNFM.
......@@ -36,7 +36,7 @@ Requests a grant for a particular VNF lifecycle operation - Asynchronous mode
... Test title: Requests a grant for a particular VNF lifecycle operation - Asynchronous mode
... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure
... Pre-conditions: none
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO can not decide immediately what to respond to a grant request
... Post-Conditions: The grant information is available to the VNFM.
......@@ -51,7 +51,7 @@ Requests a grant for a particular VNF lifecycle operation - Forbidden
... Test title: Requests a grant for a particular VNF lifecycle operation - Forbidden
... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and the grant is rejected
... Pre-conditions: none
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
......@@ -64,7 +64,7 @@ GET Grants - Method not implemented
... Test title: GET Grants - Method not implemented
... Test objective: The objective is to test that GET method is not allowed for Life cycle operation granting
... Pre-conditions: none
... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
......@@ -76,7 +76,7 @@ PUT Grants - Method not implemented
... Test title: PUT Grants - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed for Life cycle operation granting
... Pre-conditions: none
... Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
......@@ -88,7 +88,7 @@ PATCH Grants - Method not implemented
... Test title: PATCH Grants - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed for Life cycle operation granting
... Pre-conditions: none
... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
......@@ -100,7 +100,7 @@ DELETE Grants - Method not implemented
... Test title: DELETE Grants - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed for Life cycle operation granting
... Pre-conditions: none
... Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: resources are not deleted
......@@ -112,7 +112,7 @@ Requests a grant for a particular VNF lifecycle operation - Synchronous mode usi
... Test title: Requests a grant for a particular VNF lifecycle operation - Synchronous mode using instantiationLevelId for Target size
... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure
... Pre-conditions: none
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO can decide immediately what to respond to a grant request
... Post-Conditions: The grant information is available to the VNFM.
......@@ -126,7 +126,7 @@ Requests a grant for a particular VNF lifecycle operation - Synchronous mode usi
... Test title: Requests a grant for a particular VNF lifecycle operation - Synchronous mode using targetScaleLevelInfo for Target size
... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure
... Pre-conditions: none
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO can decide immediately what to respond to a grant request
... Post-Conditions: The grant information is available to the VNFM.
......@@ -140,7 +140,7 @@ Requests a grant for a particular VNF lifecycle operation - Synchronous mode usi
... Test title: Requests a grant for a particular VNF lifecycle operation - Synchronous mode using with attribute addResources for Target size
... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure
... Pre-conditions: none
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO can decide immediately what to respond to a grant request
... Post-Conditions: The grant information is available to the VNFM.
......@@ -149,6 +149,33 @@ Requests a grant for a particular VNF lifecycle operation - Synchronous mode usi
Check Operation Occurrence Id existence
Check HTTP Response Body Json Schema Is grant
Requests a grant for a particular VNF lifecycle operation - Synchronous mode with permitted authorization scope
[Documentation] Test ID: 7.3.2.1.11
... Test title: Requests a grant for a particular VNF lifecycle operation - Synchronous mode with permitted authorization scope
... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure with permitted authorization scope
... Pre-conditions: none
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO can decide immediately what to respond to a grant request
... Post-Conditions: The grant information is available to the VNFM.
Send Request Grant Request in Synchronous mode with permitted authorization scope
Check HTTP Response Status Code Is 201
Check Operation Occurrence Id existence
Check HTTP Response Body Json Schema Is grant
Requests a grant for a particular VNF lifecycle operation - Synchronous mode with not permitted authorization scope
[Documentation] Test ID: 7.3.2.1.12
... Test title: Requests a grant for a particular VNF lifecycle operation - Synchronous mode with not permitted authorization scope
... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure with not permitted authorization scope
... Pre-conditions: none
... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO can decide immediately what to respond to a grant request
... Post-Conditions: The grant information is available to the VNFM.
Send Request Grant Request in Synchronous mode with not permitted authorization scope
Check HTTP Response Status Code Is 403
Check HTTP Response Body Json Schema Is ProblemDetails
*** Keywords ***
Wait for individual grant successful notification
Wait Until Keyword Succeeds ${retry} ${polling} Get an individual grant - Successful
\ No newline at end of file
......@@ -18,7 +18,7 @@ POST Individual Grant - Method not implemented
... Test title: POST Individual Grant - Method not implemented
... Test objective: The objective is to test that POST method is not allowed for Life cycle operation granting
... Pre-conditions: none
... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
......@@ -30,7 +30,7 @@ GET an individual grant - Successful
... Test title: GET an individual grant - Successful
... Test objective: The objective is to retrieve a grant for a particular VNF Lifecycle Operation.
... Pre-conditions: The grant information is available to the NFVO
... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
......@@ -45,7 +45,7 @@ GET an individual grant - Process ongoing
... Test title: GET an individual grant - Process ongoing
... Test objective: The objective is to retrieve a grant for a particular VNF lifecycle operation when process is ongoing and no grant is available yet.
... Pre-conditions: The process of creating the grant is ongoing, no grant is available yet.
... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
......@@ -59,7 +59,7 @@ GET an individual grant - grant rejected
... Test title: GET an individual grant - grant rejected
... Test objective: The objective is to retrieve a grant for a particular VNF Lifecycle Operation but error returned because grant has been rejected.
... Pre-conditions: none
... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
......@@ -72,7 +72,7 @@ PUT an individual grant - Method not implemented
... Test title: PUT an individual grant - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to for Life cycle operation granting
... Pre-conditions: none
... Reference: Clause 9.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
......@@ -84,7 +84,7 @@ PATCH an individual grant - Method not implemented
... Test title: PATCH an individual grant - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to for Life cycle operation granting
... Pre-conditions: none
... Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
......@@ -96,7 +96,7 @@ DELETE an individual grant - Method not implemented
... Test title: DELETE an individual grant - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed to for Life cycle operation granting
... Pre-conditions: none
... Reference: Clause 9.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v4.4.1
... Reference: Clause 9.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v4.5.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
......
......@@ -91,6 +91,35 @@ Send Request for a new Grant Forbiden Operation
Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}
${body}= Output response
Set Suite Variable ${response} ${body}
Send Request Grant Request in Synchronous mode with permitted authorization scope
Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants with permitted authorization scope
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}"}
${scopeValue}= Create Dictionary scopeValue=${GRANT_PERMITTED_SCOPE}
${authorizationToken}= JWT Encode payload=${scopeValue} key=${OAUTH_KEY} algorithm=${OAUTH_ENCRYPTION_ALGORITHM}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File
${template}= Get File jsons/grantRequest.json
${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}
${body}= Output response
Set Suite Variable ${response} ${body}
Send Request Grant Request in Synchronous mode with not permitted authorization scope
Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants with not permitted authorization scope
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}"}
${scopeValue}= Create Dictionary scopeValue=${GRANT_NOT_PERMITTED_SCOPE}
${authorizationToken}= JWT Encode payload=${scopeValue} key=${OAUTH_KEY} algorithm=${OAUTH_ENCRYPTION_ALGORITHM}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File
${template}= Get File jsons/grantRequest.json
${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}
${body}= Output response
Set Suite Variable ${response} ${body}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
......@@ -347,4 +376,9 @@ Match the grant Response Attributes with Descriptors
Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${externalCP_IDs} ${response['body']['extVirtualLinks'][0]['extCps'][0]['cpdId']}
Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['extVirtualLinks'][0]['extCps'][0]['cpdId']}
List Should Contain Value ${VirtualLink_IDs} ${response['body']['extManagedVirtualLinkData'][0]['vnfVirtualLinkDescId']}
List Should Contain value ${Compute_IDs} ${response['body']['vimAssets']['computeResourceFlavours'][0]['vnfdVirtualComputeDescId']}
\ No newline at end of file
List Should Contain value ${Compute_IDs} ${response['body']['vimAssets']['computeResourceFlavours'][0]['vnfdVirtualComputeDescId']}
JWT Encode
[Arguments] ${payload} ${key} ${algorithm}
${encoded}= Evaluate jwt.encode(${payload}, ${key}, ${algorithm})
[Return] ${encoded}
\ No newline at end of file
......@@ -2,7 +2,11 @@
${NFVO_HOST} localhost # Hostname of the NFVO
${NFVO_PORT} 8081 # Listening port of the NFVO
${NFVO_SCHEMA} https
${OAUTH_ENCRYPTION_ALGORITHM} HS256
${OAUTH_KEY}
${AUTHORIZATION_HEADER} Authorization
${GRANT_PERMITTED_SCOPE} grant:v1:all
${GRANT_NOT_PERMITTED_SCOPE} grant:v1:all:invalid
${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
${CONTENT_TYPE} application/json
${ACCEPT} application/json
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment