Commit 26d949d9 authored by Najam UI Hassan's avatar Najam UI Hassan
Browse files

new test cases added for IndividualPmJob

parent ec254083
Loading
Loading
Loading
Loading
+27 −11
Original line number Original line Diff line number Diff line
*** Settings ***
*** Settings ***
Library           OperatingSystem
Library           JSONSchemaLibrary    schemas/
Library           JSONSchemaLibrary    schemas/
Resource          environment/variables.txt    # Generic Parameters
Resource          environment/variables.txt    # Generic Parameters
Library           JSONLibrary
Library           JSONLibrary
@@ -76,7 +77,7 @@ PUT Individual VNF Performance Job - Method not implemented
    ...    Test title: PUT Individual VNF Performance Job - method not implemented
    ...    Test title: PUT Individual VNF Performance Job - method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance Monitoring Job
    ...    Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance Monitoring Job
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Reference: Clause 6.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Job is not modified by the operation
    ...    Post-Conditions: The VNF Performance Job is not modified by the operation
@@ -84,19 +85,32 @@ PUT Individual VNF Performance Job - Method not implemented
    Check HTTP Response Status Code Is    405
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Performance Job is Unmodified (Implicit)
    Check Postcondition VNF Performance Job is Unmodified (Implicit)


PATCH Individual VNF Performance Job - Method not implemented
PATCH Individual VNF Performance Job
    [Documentation]    Test ID: 7.3.4.2.7
    [Documentation]    Test ID: 7.3.4.2.7
    ...    Test title: PATCH Individual VNF Performance Job - method not implemented
    ...    Test title: PATCH Individual VNF Performance Job
    ...    Test objective: The objective is to test that PATCH method is not allowed to modify an existing new VNF Performance Monitoring Job
    ...    Test objective: The objective is to test that PATCH method is not allowed to modify an existing VNF Performance Monitoring Job
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: 
    Send Patch request for individual VNF Performance Job
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    PMJobModifications
    
PATCH Individual VNF Performance Job - Precondition failed
    [Documentation]    Test ID: 7.3.4.2.8
    ...    Test title: PATCH Individual VNF Performance Job - Precondition failed
    ...    Test objective: The objective is to attempt to Modify an individual alarm resource, where the precondition was not met.
    ...    Pre-conditions:  A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [2] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions:  The VNF Performance Job is not modified by the operation
    ...    Post-Conditions:  The VNF Performance Job is not modified by the operation
    Send Patch request for individual VNF Performance Job
    Send Patch request for individual VNF Performance Job
    Check HTTP Response Status Code Is    405
    Check HTTP Response Status Code Is    412
    Check HTTP Response Body Json Schema Is   ProblemDetails
    Check Postcondition VNF Performance Job is Unmodified (Implicit)    
    Check Postcondition VNF Performance Job is Unmodified (Implicit)    
    
*** Keywords ***
*** Keywords ***
GET individual VNF Performance Job
GET individual VNF Performance Job
    Log    Trying to get a Pm Job present in the NFVO Catalogue
    Log    Trying to get a Pm Job present in the NFVO Catalogue
@@ -150,10 +164,12 @@ Send Put request for individual VNF Performance Job
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${response}    ${output}
    
    
Send Patch request for individual VNF Performance Job    
Send Patch request for individual VNF Performance Job    
    Log    Trying to perform a PATCH (method should not be implemented)
    Set Headers  {"Accept":"${ACCEPT_JSON}"} 
    Set Headers  {"Accept":"${ACCEPT_JSON}"} 
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    PATCH    ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}
    ${body}=    Get File    jsons/PMJobModifications.json
    PATCH    ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}     ${body}

    ${output}=    Output    response
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${response}    ${output}


+3 −0
Original line number Original line Diff line number Diff line
{
	"callbackUri":"127.0.0.3"
}
 No newline at end of file
+62 −0
Original line number Original line Diff line number Diff line
{
    "description": "This type represents modifications to a PM job. It shall comply with the provisions defined in table 6.5.2.12-1.\n",
    "type": "object",
    "properties": {
      "callbackUri": {
        "description": "String formatted according to IETF RFC 3986.\n",
        "type": "string"
      },
      "authentication": {
        "type": "object",
        "required": [
          "authType"
        ],
        "properties": {
          "authType": {
            "description": "Defines the types of Authentication / Authorization which the API consumer is willing to accept when receiving a notification. Permitted values: * BASIC: In every HTTP request to the notification endpoint, use\n  HTTP Basic authentication with the client credentials. \n* OAUTH2_CLIENT_CREDENTIALS: In every HTTP request to the\n  notification endpoint, use an OAuth 2.0 Bearer token, obtained\n  using the client credentials grant type.\n* TLS_CERT: Every HTTP request to the notification endpoint is sent\n  over a mutually authenticated TLS session, i.e. not only the\n  server is authenticated, but also the client is authenticated\n  during the TLS tunnel setup.\n",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "BASIC",
                "OAUTH2_CLIENT_CREDENTIALS",
                "TLS_CERT"
              ]
            }
          },
          "paramsBasic": {
            "description": "Parameters for authentication/authorization using BASIC. Shall be present if authType is \"BASIC\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n",
            "type": "object",
            "properties": {
              "userName": {
                "description": "Username to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n",
                "type": "string"
              },
              "password": {
                "description": "Password to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n",
                "type": "string"
              }
            }
          },
          "paramsOauth2ClientCredentials": {
            "description": "Parameters for authentication/authorization using OAUTH2_CLIENT_CREDENTIALS. Shall be present if authType is \"OAUTH2_CLIENT_CREDENTIALS\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n",
            "type": "object",
            "properties": {
              "clientId": {
                "description": "Client identifier to be used in the access token request of the OAuth 2.0 client credentials grant type.  Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n",
                "type": "string"
              },
              "clientPassword": {
                "description": "Client password to be used in the access token request of the OAuth 2.0 client credentials grant type.  Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n",
                "type": "string"
              },
              "tokenEndpoint": {
                "description": "String formatted according to IETF RFC 3986.\n",
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
 No newline at end of file