Commit 7e28b22d authored by Elian Kraja's avatar Elian Kraja
Browse files

Fix on issues: 66, 69, 73 (NXW endpoints), 74, 76, 78, 79, 80, 81, 85, 87, 88

parent d03f349e
......@@ -36,7 +36,7 @@ Get NSD Management Subscriptions with attribute-based filter
... Post-Conditions: none
Get NSD Management Subscriptions with attribute-based filters
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is NsdmSubscription
Check HTTP Response Body Json Schema Is NsdmSubscriptions
Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter
......@@ -110,7 +110,7 @@ Create duplicated NSD Management subscription with NFVO creating duplicated subs
... Post-Conditions: The duplicated NSD Management subscription is successfully set and it matches the issued subscription
Send Post Request for Duplicated NSD Management Subscription
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is PmSubscription
Check HTTP Response Body Json Schema Is NsdmSubscription
Check HTTP Response Body NsdmSubscription Attributes Values Match the Issued Subscription
Check Postcondition NSD Management Subscription Is Set
......
......@@ -27,4 +27,5 @@ ${BAD_AUTHORIZATION} Bear sometoken
${original_etag} 1234
${wrong_etag} abcd
${usageState} state
${length} 1024
\ No newline at end of file
${length} 1024
${createdNsdInfoId} f27200b1-1d8b-48c2-9d98-a993b8ab117f
......@@ -33,7 +33,7 @@ Create a new alarm subscription - DUPLICATION
... Applicability: the NFVO allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists
... Post-Conditions: none
Depends On Test Create a new subscription
Pass Execution If ${NFVO_DUPLICATION} == 0 NVFO is not permitting duplication. Skipping the test
Pass Execution If ${NFVO_ALLOWS_DUPLICATE_SUBS} == 0 NVFO is not permitting duplication. Skipping the test
POST Subscription
Check HTTP Response Status Code Is 201
Check HTTP Response Header Contains Location
......@@ -49,7 +49,7 @@ Create a new alarm subscription - NO DUPLICATION
... Applicability: the NFVO decides to not create a duplicate subscription resource
... Post-Conditions: none
Depends On Test Create a new subscription
Pass Execution If ${NFVO_DUPLICATION} == 1 NFVO permits duplication. Skipping the test
Pass Execution If ${NFVO_ALLOWS_DUPLICATE_SUBS} == 1 NFVO permits duplication. Skipping the test
POST Subscription
Check HTTP Response Status Code Is 303
Check HTTP Response Header Contains Location
......
......@@ -13,7 +13,7 @@ ${apiName} nsfm
${apiVersion} v1
${CONTENT_TYPE} application/json
${NFVO_DUPLICATION} 0
${NFVO_ALLOWS_DUPLICATE_SUBS} 0
${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
${invalidAlarmId} invalidAlramID
......
......@@ -13,7 +13,7 @@ Post Individual VNFInstance - Method not implemented
Check HTTP Response Status Code Is 405
Get Information about an individual NS Instance
Do POST individualNSInstance
Do GET IndividualNSInstance
Check HTTP Response Status Code Is 200
Check HTTP Response Header ContentType is ${CONTENT_TYPE}
Check HTTP Response Body Json Schema Is NsInstance.schema.json
......
......@@ -254,6 +254,15 @@ Do DELETE IndividualNSInstance
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Do DELETE IndividualNSInstance Conflict
log Trying to delete an individual VNF instance
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${ConflictNsInstanceId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Do DELETE Instantiate NSInstance
log Trying to delete an instantiate NS instance. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
......
......@@ -6,7 +6,7 @@ Resource environment/IndividualPmJob.txt
Resource environment/reports.txt
Resource environment/thresholds.txt
Resource environment/individualThresholds.txt
Resource environment/individualSubscription.txt
Resource environment/individualSubscription.txt
Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false
Library MockServerLibrary
Library OperatingSystem
......@@ -143,11 +143,11 @@ Check HTTP Response Body PmJobs Matches the requested exclude selector
Check HTTP Response Body PmJobs Matches the requested include selector
Log Trying to validate criteria schema
${criteria}= Get Value From Json ${response['body']} $..criteria
Validate Json criteria.schema.json ${criteria[0]}
Validate Json criteria.schema.json ${criteria}
Log Validation for criteria schema OK
Log Trying to validate criteria schema
${reports}= Get Value From Json ${response['body']} $..reports
Validate Json reports.schema.json ${reports[0]}
Validate Json reports.schema.json ${reports}
Log Validation for reports schema OK
Check HTTP Response Body PmJobs Matches the requested exclude_default selector
......@@ -159,15 +159,15 @@ Check HTTP Response Body PmJobs Matches the requested exclude_default selector
Check HTTP Response Body PmJobs Matches the requested all_fields selector
Log Trying to validate criteria schema
${criteria}= Get Value From Json ${response['body']} $..criteria
Validate Json criteria.schema.json ${criteria[0]}
Validate Json criteria.schema.json ${criteria}
Log Validation for criteria schema OK
Log Trying to validate criteria schema
${reports}= Get Value From Json ${response['body']} $..reports
Validate Json reports.schema.json ${reports[0]}
Validate Json reports.schema.json ${reports}
Log Validation for reports schema OK
Log Validating _links schema
${links}= Get Value From Json ${response['body']} $.._links
Validate Json links.schema.json ${links[0]}
Validate Json links.schema.json ${links}
Log Validation for _links schema OK
Check HTTP Response Body PmJobs Matches the requested Attribute-Based Filter
......@@ -641,7 +641,7 @@ Check HTTP Response Status Code Is
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/json
${schema} = Catenate ${input} .schema.json
${schema} = Catenate SEPARATOR= ${input} .schema.json
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
......@@ -677,7 +677,7 @@ Check Postcondition NS Performance Subscription Is Set
Check Postcondition Subscription Resource URI Returned in Location Header Is Available
Log Going to check postcondition
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${response.headers['Location']}
GET ${response['headers']['Location']}
Integer response status 200
Log Received a 200 OK as expected
${contentType}= Output response headers Content-Type
......@@ -771,7 +771,7 @@ Check HTTP Response Body Subscription Identifier matches the requested Subscript
Check HTTP Response Header Contains
[Arguments] ${CONTENT_TYPE}
Should Contain ${response.headers} ${CONTENT_TYPE}
Should Contain ${response['headers']} ${CONTENT_TYPE}
Log Header is present
......
{
"description": "Links for this resource.\n",
"type": "object",
"required": ["self"],
"properties": {
"self": {
"description": "This type represents a link to a resource.\n",
"type": "object",
"required": ["href"],
"properties": {
"href": {
"description": "URI of the referenced resource.\n",
"type": "string",
"format": "url"
}
}
},
"objects": {
"description": "Links to resources representing the VNF instances for which performance information is collected. Shall be present if the VNF instance information is accessible as a resource.\n",
"type": "array",
"items": {
"description": "This type represents a link to a resource.\n",
"type": "object",
"required": ["href"],
"properties": {
"href": {
"description": "URI of the referenced resource.\n",
"type": "string",
"format": "url"
}
}
}
}
}
"type": "array",
"items": {
"type": "object",
"description": "Links to resources related to this resource.\n",
"required": [
"self",
"packageContent"
],
"properties": {
"self": {
"description": "This type represents a link to a resource.\n",
"type": "object",
"required": [
"href"
],
"properties": {
"href": {
"description": "URI of the referenced resource.\n",
"type": "string",
"format": "url"
}
}
},
"vnfd": {
"description": "This type represents a link to a resource.\n",
"type": "object",
"required": [
"href"
],
"properties": {
"href": {
"description": "URI of the referenced resource.\n",
"type": "string",
"format": "url"
}
}
},
"packageContent": {
"description": "This type represents a link to a resource.\n",
"type": "object",
"required": [
"href"
],
"properties": {
"href": {
"description": "URI of the referenced resource.\n",
"type": "string",
"format": "url"
}
}
}
}
}
}
\ No newline at end of file
{
"description": "Information about available reports collected by this PM job.\n",
"type": "object",
"required": ["href", "readyTime"],
"properties": {
"href": {
"description": "The Uri where the report can be obtained.\n",
"type": "string",
"format": "url"
},
"readyTime": {
"description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
"type": "string",
"format": "date-time"
},
"expiryTime": {
"description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
"type": "string",
"format": "date-time"
},
"fileSize": {
"description": "The size of the report file in bytes, if known.\n",
"type": "integer"
}
}
"type": "array",
"items": {
"description": "Information about available reports collected by this PM job.\n",
"type": "object",
"required": [
"href",
"readyTime"
],
"properties": {
"href": {
"description": "The Uri where the report can be obtained.\n",
"type": "string",
"format": "url"
},
"readyTime": {
"description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
"type": "string",
"format": "date-time"
},
"expiryTime": {
"description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
"type": "string",
"format": "date-time"
},
"fileSize": {
"description": "The size of the report file in bytes, if known.\n",
"type": "integer"
}
}
}
}
\ No newline at end of file
......@@ -16,7 +16,7 @@ GET Individual VNF Package
Should Contain ${contentType} ${CONTENT_TYPE_JSON}
Log Trying to validate response
${vnfPkgInfo}= Output response body
Validate Json vnfPkgInfo.schema.json ${vnfPackageId}
Validate Json vnfPkgInfo.schema.json ${vnfPkgInfo}
Log Validation OK
GET Individual VNF Package - Negative (Not Found)
......
......@@ -13,7 +13,6 @@ GET VNF Package Artifact
Integer response status 200
Log Received a 200 OK as expected
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE_OCTET}
GET VNF Package Artifact - Range
Log Trying to get an Artifact using RANGE Header and using an NFVO that can handle it
......
......@@ -13,7 +13,7 @@ POST VNF Package Content
Log Trying to perform a POST. The POST method provides the information for the NFVO to get the content of a VNF package.
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
${body}= Get Binary File jsons/UploadVnfPkgFromUriRequest.json
${body}= Get File jsons/UploadVnfPkgFromUriRequest.json
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content/upload_from_uri ${body}
Integer response status 202
Log Received 202 Accepted as expected
......@@ -27,7 +27,7 @@ POST VNF Package Content - Negative (VNF Package not in CREATED operational stat
Log Trying to perform a POST. The POST method provides the information for the NFVO to get the content of a VNF package.
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
${body}= Get Binary File jsons/UploadVnfPkgFromUriRequest.json
${body}= Get File jsons/UploadVnfPkgFromUriRequest.json
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${creatingVnfPackageId}/package_content/upload_from_uri ${body}
Integer response status 409
Log Received 409 Conflict as expected
......
......@@ -100,14 +100,14 @@ GET all Packages - all_fields
Log Validation OK
Log Trying to validate softwareImages schema
${softwareImages}= Get Value From Json ${vnfPkgInfos} $..softwareImages
Validate Json softwareImage.schema.json ${softwareImages[0]}
Validate Json softwareImage.schema.json ${softwareImages}
Log Validation for softwareImage schema OK
Log Trying to validate additionalArtifacts schema
${additional_artifacts}= Get Value From Json ${vnfPkgInfos} $..additionalArtifacts
Validate Json additionalArtifacts.schema.json ${additional_artifacts[0]}
Validate Json additionalArtifacts.schema.json ${additional_artifacts}
Log Validation for additionalArtifacts schema OK
${links}= Get Value From Json ${vnfPkgInfos} $.._links
Validate Json links.schema.json ${links[0]}
Validate Json links.schema.json ${links}
Log Validation for _links schema OK
GET all Packages - exclude_default
......@@ -147,11 +147,11 @@ GET all Packages - fields
Log Validation for vnfPkgInfo OK
Log Trying to validate softwareImages schema
${softwareImages}= Get Value From Json ${vnfPkgInfos} $..softwareImages
Validate Json softwareImage.schema.json ${softwareImages[0]}
Validate Json softwareImage.schema.json ${softwareImages}
Log Validation for softwareImage schema OK
Log Trying to validate additionalArtifacts schema
${additional_artifacts}= Get Value From Json ${vnfPkgInfos} $..additionalArtifacts
Validate Json additionalArtifacts.schema.json ${additional_artifacts[0]}
Validate Json additionalArtifacts.schema.json ${additional_artifacts}
Log Validation for additionalArtifacts schema OK
GET all Packages - exclude_fields
......
{
"callbackUri": "http://127.0.0.1/subscribe",
"filter": {
"vnfPkgId": "788106a2-d692-44f3-a86d-384f0ce35e42"
"vnfPkgId": ["491ed430-67f5-4c6c-b78e-797f5d718868"]
}
}
\ No newline at end of file
Supports Markdown
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