Commit 38600bde authored by Frank Bryden's avatar Frank Bryden
Browse files

More minor bug fixes

parent afc6032a
Loading
Loading
Loading
Loading
+7 −7
Original line number Original line Diff line number Diff line
@@ -410,7 +410,7 @@ Send PUT Request to upload NSD Content as plain text file in asynchronous mode
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Create Session      nbi     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}  headers={"Accept": "${ACCEPT_PLAIN}", "Authorization": "${AUTHORIZATION}", "Content-Type": "text/plain"}      verify=False
    Create Session      nbi     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}  headers={"Accept": "${ACCEPT_PLAIN}", "Authorization": "${AUTHORIZATION}", "Content-Type": "text/plain"}      verify=False
    ${body}=  Get File  ${contentPlainFile}
    ${body}=  Get File  ${contentPlainFile}
    ${response}=    Put Request     nbi     ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content     data=${body}
    ${response}=    Put Request     nbi     ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdPlain}/nsd_content     data=${body}
    Should Be Empty     ${response.text}
    Should Be Empty     ${response.text}
    ${response}=    Create Dictionary   status=${response.status_code}
    ${response}=    Create Dictionary   status=${response.status_code}
    Set Suite Variable  ${response}     ${response} 
    Set Suite Variable  ${response}     ${response} 
@@ -427,7 +427,7 @@ Send PUT Request to upload NSD Content as plain text file in synchronous mode
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Create Session      nbi     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}  headers={"Accept": "${ACCEPT_PLAIN}", "Authorization": "${AUTHORIZATION}", "Content-Type": "text/plain"}      verify=False
    Create Session      nbi     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}  headers={"Accept": "${ACCEPT_PLAIN}", "Authorization": "${AUTHORIZATION}", "Content-Type": "text/plain"}      verify=False
    ${body}=  Get File  ${contentPlainFile}
    ${body}=  Get File  ${contentPlainFile}
    ${response}=    Put Request     nbi     ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content     data=${body}
    ${response}=    Put Request     nbi     ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdPlain}/nsd_content     data=${body}
    Should Be Empty     ${response.text}
    Should Be Empty     ${response.text}
    ${response}=    Create Dictionary   status=${response.status_code}
    ${response}=    Create Dictionary   status=${response.status_code}
    Set Suite Variable  ${response}     ${response} 
    Set Suite Variable  ${response}     ${response} 
@@ -450,12 +450,12 @@ Check Postcondition NSD Content is uploaded and available in the NFVO
 
 
Send PUT Request to upload NSD Content with conflict due to onboarding state
Send PUT Request to upload NSD Content with conflict due to onboarding state
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Set Headers    {"Accept": "${ACCEPT_ZIP}"}
    Create Session      nbi     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}  headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"}      verify=False
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ${body}=  Get Binary File  ${contentZipFile}
    ${body}=  Get Binary File  ${contentZipFile}
    PUT    ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${creatingNsdInfoId}/nsd_content    ${body}
    ${response}=    Put Request     nbi     ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content     data=${body}
    ${output}=    Output    response
    Log         ${response}
    Set Suite Variable    ${response}    ${output} 
    ${response}=    Create Dictionary   status=${response.status_code}  headers=${response.headers}     body=${response.json()}
    Set Suite Variable      ${response}     ${response}


Send POST Request for NSD Content
Send POST Request for NSD Content
    Pass Execution If    ${testOptionalMethods} == 0    optional methods are not implemented on the FUT. Skipping test.
    Pass Execution If    ${testOptionalMethods} == 0    optional methods are not implemented on the FUT. Skipping test.
+2 −6
Original line number Original line Diff line number Diff line
@@ -11,12 +11,8 @@
      ]
      ]
    },
    },
    "userDefinedData": {
    "userDefinedData": {
      "description": "Modifications of the userDefinedData attribute in NsdInfo data type. See note. If present, these modifications shall be applied according to the rules of JSON Merge PATCH (see IETF RFC 7396 [25]).  NOTE- At least one of the attributes - nsdOperationalState and userDefinedData - shall be present.\n",
      "type": "array",
      "items": {
      "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions  defined in clause 4 of IETF RFC 7159. \n",
      "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions  defined in clause 4 of IETF RFC 7159. \n",
      "type": "object"
      "type": "object"
    }
    }
  }
  }
}
}
 No newline at end of file
}
 No newline at end of file
+18 −16
Original line number Original line Diff line number Diff line
@@ -11,6 +11,7 @@ Resource environment/vnfPackageArtifacts.txt
Resource          environment/individualSubscription.txt
Resource          environment/individualSubscription.txt
Library           OperatingSystem
Library           OperatingSystem
Library           JSONLibrary
Library           JSONLibrary
Library           RequestsLibrary
Library           REST    ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}    ssl_verify=false
Library           REST    ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}    ssl_verify=false
Library           Process
Library           Process
Library           MockServerLibrary
Library           MockServerLibrary
@@ -503,14 +504,13 @@ Send PUT Request for individual VNF Package Content


Send PUT Request to upload VNF Package Content
Send PUT Request to upload VNF Package Content
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Set Headers    {"Accept": "${ACCEPT_ZIP}"}
    Create Session      nbi     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}  headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"}      verify=False
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ${body}=  Get Binary File     files/hackfest_gateway_vnfd-1.0.tar.gz
    ${body}=  Get Binary File     files/vnfPackage.zip
    ${response}=    Put Request     nbi     ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${newVnfPackageId}/package_content    data=${body}
    PUT    ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${newVnfPackageId}/package_content    ${body}
    Should Be Empty     ${response.text}
    ${response}=    Output    response body
    ${response}=    Create Dictionary   status=${response.status_code}
    Should Be Empty    ${response} 
    Set Suite Variable      ${response}     ${response}
    ${output}=    Output    response

    Set Suite Variable    ${response}    ${output}


Check Postcondition VNF Package Content is uploaded and available in the NFVO
Check Postcondition VNF Package Content is uploaded and available in the NFVO
    Log    Trying to get a VNF Package Content
    Log    Trying to get a VNF Package Content
@@ -521,12 +521,12 @@ Check Postcondition VNF Package Content is uploaded and available in the NFVO
 
 
Send PUT Request to upload VNF Package Content with conflict due to onboarding state
Send PUT Request to upload VNF Package Content with conflict due to onboarding state
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Set Headers    {"Accept": "${ACCEPT_ZIP}"}
    Create Session      nbi     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}  headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"}      verify=False
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ${body}=  Get Binary File     files/hackfest_gateway_vnfd-1.0.tar.gz
    ${body}=  Get Binary File  files/vnfPackage.zip
    ${response}=    Put Request     nbi     ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${creatingVnfPackageId}/package_content    data=${body}
    PUT    ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${creatingVnfPackageId}/nsd_content    ${body}
    Should Be Empty     ${response.text}
    ${output}=    Output    response
    ${response}=    Create Dictionary   status=${response.status_code}
    Set Suite Variable    ${response}    ${output} 
    Set Suite Variable      ${response}     ${response}
 
 
Send PATCH Request for individual VNF Package Content
Send PATCH Request for individual VNF Package Content
    Log    Trying to perform a PATCH (method should not be implemented)
    Log    Trying to perform a PATCH (method should not be implemented)
@@ -630,9 +630,11 @@ Send DELETE Request for individual VNF Package Artifact


Check Postcondition VNF Package Artifact Exist
Check Postcondition VNF Package Artifact Exist
    Log    Checking that vnf pacakge still exists
    Log    Checking that vnf pacakge still exists
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_PLAIN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath}
    GET    ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Check HTTP Response Status Code Is    200
    Check HTTP Response Status Code Is    200


Send POST Request to upload VNF Package Content from URI
Send POST Request to upload VNF Package Content from URI
+1 −1
Original line number Original line Diff line number Diff line
{
{
  "description": "This type represents a VNF package management notification, which informs the receiver of a change of the status in an on-boarded VNF package. Only changes in the \"operationalState\" attribute of an on-boarded VNF package and the deletion of the VNF package will be reported. Change in the \"usageState\" and \"onboardingState\" attributes are not reported. The notification shall comply with the provisions defined in Table 9.5.2.9-1. The support of this notification is mandatory. The notification shall be triggered by the NFVO when there is a change in the status of an onboarded VNF package, as follows. The \"operationalState\" attribute of a VNF package has changed, and the \"onboardingState\" attribute of the package has the value \"ONBOARDED\".  The on-boarded VNF package has been deleted.\n",
  "description": "This type represents a VNF package management notification, which informs the receiver of a change of the status in an on-boarded VNF package. Only changes in the \"operationalState\" attribute of an on-boarded VNF package and the deletion of the VNF package will be reported. Change in the \"usageState\" and \"onboardingState\" attributes are not reported. The notification shall comply with the provisions defined in Table 9.5.2.9-1. The support of this notification is mandatory. The notification shall be triggered by the NFVO when there is a change in the status of an onboarded VNF package, as follows. The \"operationalState\" attribute of a VNF package has changed, and the \"onboardingState\" attribute of the package has the value \"ONBOARDED\". � The on-boarded VNF package has been deleted.\n",
  "type": "object",
  "type": "object",
  "required": [
  "required": [
    "id",
    "id",