Loading SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot +22 −0 Original line number Diff line number Diff line Loading @@ -308,6 +308,28 @@ GET Subscriptions ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} GET Subscriptions with permitted authorization scope Log Get the list of active subscriptions Set Headers {"Accept": "${ACCEPT}"} ${scopeValue}= Create Dictionary scope=${SUBSCRIPTIONS_PERMITTED_SCOPE} ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} Log Authorization Token: ${authorizationToken} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} GET Subscriptions with not permitted authorization scope Log Get the list of active subscriptions Set Headers {"Accept": "${ACCEPT}"} ${scopeValue}= Create Dictionary scope=${NOT_PERMITTED_SCOPE} ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} Log Authorization Token: ${authorizationToken} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} GET Subscriptions with filter Log Get the list of active subscriptions using a filter Set Headers {"Accept": "${ACCEPT}"} Loading SOL009/NFVMANOFaultManagement-API/Subscriptions.robot +25 −0 Original line number Diff line number Diff line Loading @@ -230,3 +230,28 @@ POST Create a new Fault Management alarm subscription - Unprocessable content POST Subscription with Unreachable callbackUri Check HTTP Response Status Code Is 422 Check HTTP Response Body Json Schema Is ProblemDetails Get list of alarm subscriptions with permitted authorization scope [Documentation] Test ID: 8.3.3.3.18 ... Test title: Retrieve a list of alarm subscriptions with permitted authorization scope ... Test objective: The objective is to retrieve the list of active subscriptions with permitted authorization scope. ... Pre-conditions: none ... Reference: clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: noe GET Subscriptions with permitted authorization scope Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions Get list of alarm subscriptions with not permitted authorization scope [Documentation] Test ID: 8.3.3.3.19 ... Test title: Retrieve a list of alarm subscriptions with not permitted authorization scope ... Test objective: The objective is to test that retrieving the list of active subscriptions fails with not permitted authorization scope. ... Pre-conditions: none ... Reference: clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: noe GET Subscriptions with not permitted authorization scope Check HTTP Response Status Code Is 401 No newline at end of file SOL009/NFVMANOFaultManagement-API/environment/variables.txt +2 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ ${BAD_AUTHORIZATION_TOKEN} Bear sometoken ${OAUTH_ENCRIPTION_ALGORITHM} HS256 ${ALAMRS_PERMITTED_SCOPE} nfvmanofm:v2:alarm_info ${ALARMS_NOT_PERMITTED_SCOPE} nfvmanofm:v2:alarm_info:readonly ${SUBSCRIPTIONS_PERMITTED_SCOPE} nfvmanofm:v2:subscriptions ${SUBSCRIPTIONS_NOT_PERMITTED_SCOPE} nfvmanofm:v2:subscriptions:readonly ${NOT_PERMITTED_SCOPE} nfvmanofm:v2:policies:invalid Loading Loading
SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot +22 −0 Original line number Diff line number Diff line Loading @@ -308,6 +308,28 @@ GET Subscriptions ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} GET Subscriptions with permitted authorization scope Log Get the list of active subscriptions Set Headers {"Accept": "${ACCEPT}"} ${scopeValue}= Create Dictionary scope=${SUBSCRIPTIONS_PERMITTED_SCOPE} ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} Log Authorization Token: ${authorizationToken} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} GET Subscriptions with not permitted authorization scope Log Get the list of active subscriptions Set Headers {"Accept": "${ACCEPT}"} ${scopeValue}= Create Dictionary scope=${NOT_PERMITTED_SCOPE} ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} Log Authorization Token: ${authorizationToken} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} GET Subscriptions with filter Log Get the list of active subscriptions using a filter Set Headers {"Accept": "${ACCEPT}"} Loading
SOL009/NFVMANOFaultManagement-API/Subscriptions.robot +25 −0 Original line number Diff line number Diff line Loading @@ -230,3 +230,28 @@ POST Create a new Fault Management alarm subscription - Unprocessable content POST Subscription with Unreachable callbackUri Check HTTP Response Status Code Is 422 Check HTTP Response Body Json Schema Is ProblemDetails Get list of alarm subscriptions with permitted authorization scope [Documentation] Test ID: 8.3.3.3.18 ... Test title: Retrieve a list of alarm subscriptions with permitted authorization scope ... Test objective: The objective is to retrieve the list of active subscriptions with permitted authorization scope. ... Pre-conditions: none ... Reference: clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: noe GET Subscriptions with permitted authorization scope Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions Get list of alarm subscriptions with not permitted authorization scope [Documentation] Test ID: 8.3.3.3.19 ... Test title: Retrieve a list of alarm subscriptions with not permitted authorization scope ... Test objective: The objective is to test that retrieving the list of active subscriptions fails with not permitted authorization scope. ... Pre-conditions: none ... Reference: clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: noe GET Subscriptions with not permitted authorization scope Check HTTP Response Status Code Is 401 No newline at end of file
SOL009/NFVMANOFaultManagement-API/environment/variables.txt +2 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ ${BAD_AUTHORIZATION_TOKEN} Bear sometoken ${OAUTH_ENCRIPTION_ALGORITHM} HS256 ${ALAMRS_PERMITTED_SCOPE} nfvmanofm:v2:alarm_info ${ALARMS_NOT_PERMITTED_SCOPE} nfvmanofm:v2:alarm_info:readonly ${SUBSCRIPTIONS_PERMITTED_SCOPE} nfvmanofm:v2:subscriptions ${SUBSCRIPTIONS_NOT_PERMITTED_SCOPE} nfvmanofm:v2:subscriptions:readonly ${NOT_PERMITTED_SCOPE} nfvmanofm:v2:policies:invalid Loading