Commit d693824f authored by Elian Kraja's avatar Elian Kraja
Browse files

Completed bug fixing on SOL002 and SOL003

parent 8c753aac
......@@ -7,7 +7,7 @@ Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library OperatingSystem
*** Test cases ***
*** Test Cases ***
POST Alarms - Method not implemented
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
......@@ -28,7 +28,7 @@ Get information about multiple alarms
Should Contain ${contentType} ${CONTENT_TYPE}
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json alarm.schema.json ${json}
Validate Json alarms.schema.json ${json}
Log Validation OK
Get information about multiple alarms with filters
......@@ -43,7 +43,7 @@ Get information about multiple alarms with filters
Should Contain ${contentType} ${CONTENT_TYPE}
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json alarm.schema.json ${json}
Validate Json alarms.schema.json ${json}
Log Validation OK
Get information about multiple alarms Bad Request Invalid attribute-based filtering parameters
......
......@@ -2,7 +2,7 @@
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL002-VNFFaultManagement-API.yaml
Suite setup Check resource existance
Suite Setup Check resource existance
*** Test Cases ***
Escalate the perceived severity
......@@ -43,7 +43,7 @@ DELETE Escalate the perceived severity - Method not implemented
Log Validate Status code
Integer response status 405
*** Key words ***
*** Keywords ***
Check resource existance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
......
......@@ -12,7 +12,7 @@ Library DependencyLibrary
${Etag}= an etag
${Etag_modified}= a modified etag
*** Test cases ***
*** Test Cases ***
POST Alarm - Method not implemented
log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
......@@ -66,9 +66,9 @@ PATCH Alarm
PATCH Alarm - Conflict
[Documentation] Conflict
... The operation cannot be executed currently, due to a conflict with the state of the Individual alarm resource.
... The operation cannot be executed currently, due to a conflict with the state of the �Individual alarm� resource.
... Typically, this is due to the fact that the alarm is already in the state that is requested to be set (such as trying to acknowledge an already-acknowledged alarm).
... The response body shall contain a ProblemDetails structure, in which the detail attribute should convey more information about the error.
... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
Depends On Test PATCH Alarm # If the previous test scceeded, it means that the alarm is in ackownledged state
log Trying to perform a PATCH. This method modifies an individual alarm resource
Set Headers {"Accept":"${ACCEPT}"}
......@@ -87,7 +87,7 @@ PATCH Alarm - Precondition failed
[Documentation] Precondition Failed
... A precondition given in an HTTP request header is not fulfilled. Typically, this is due to an ETag mismatch,
... indicating that the resource was modified by another entity. The response body should contain a ProblemDetails structure,
... in which the detail attribute should convey more information about the error.
... in which the �detail� attribute should convey more information about the error.
Depends On Test PATCH Alarm # If the previous test scceeded, it means that Etag has been modified
log Trying to perform a PATCH. This method modifies an individual alarm resource
Set Headers {"Accept":"${ACCEPT}"}
......@@ -109,5 +109,4 @@ DELETE Alarm - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}
Log Validate Status code
Integer response status 405
......@@ -6,7 +6,7 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL002-VNFFaultManagement-API.yaml
Documentation This resource represents an individual subscription for VNF alarms.
... The client can use this resource to read and to terminate a subscription to notifications related to VNF fault management.
Suite setup Check resource existance
Suite Setup Check resource existance
*** Test Cases ***
Post Individual Subscription - Method not implemented
......@@ -29,7 +29,7 @@ Get Information about an individual subscription
Should Contain ${contentType} ${CONTENT_TYPE}
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json subscriptions.schema.json ${json}
Validate Json FmSubscription.schema.json ${json}
Log Validation OK
PUT an individual subscription - Method not implemented
......@@ -60,7 +60,7 @@ DELETE an individual subscription
Output response
Integer response status 204
*** Key words ***
*** Keywords ***
Check resource existance
Set Headers {"Accept":"${ACCEPT}"}
......
......@@ -22,7 +22,7 @@ Create a new subscription
Should Contain ${contentType} ${CONTENT_TYPE}
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json subscriptions.schema.json ${json}
Validate Json FmSubscription.schema.json ${json}
Log Validation OK
Create a new Subscription - DUPLICATION
......@@ -39,7 +39,7 @@ Create a new Subscription - DUPLICATION
Should Contain ${contentType} ${CONTENT_TYPE}
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json subscriptions.schema.json ${json}
Validate Json FmSubscription.schema.json ${json}
Log Validation OK
Create a new Subscription - NO-DUPLICATION
......@@ -67,7 +67,7 @@ GET Subscriptions
Integer response status 200
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json subscriptions.schema.json ${json}
Validate Json FmSubscriptions.schema.json ${json}
Log Validation OK
GET Subscription - Filter
......@@ -79,7 +79,7 @@ GET Subscription - Filter
Log Received a 200 OK as expected
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json subscriptions.schema.json ${json}
Validate Json FmSubscriptions.schema.json ${json}
Log Validation OK
GET subscriptions - Bad Request Invalid attribute-based filtering parameters
......
{
"type": "array",
"items": {
"description": "This type represents a subscription related to notifications related to the availability of the virtualised resources quotas.\n",
"type": "object",
"required": [
"id",
"callbackUri",
"_links"
],
"properties": {
"id": {
"description": "An identifier with the intention of being globally unique.\n",
"type": "string"
},
"filter": {
"description": "This type represents a subscription filter related to notifications about the availability of the virtualised resources quotas. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n",
"type": "object",
"properties": {
"vimIds": {
"description": "Match VIMs that were created the quota for a consumer of the virtualised resources. This attribute shall only be supported when VNF-related Resource Management in direct mode is applicable.\n",
"type": "array",
"items": {
"description": "An identifier with the intention of being globally unique.\n",
"type": "string"
}
},
"resourceProviderIds": {
"description": "Match the entities responsible for the management of the virtualised resources that were allocated by the NFVO. This attribute shall only be supported when VNF-related Resource Management in indirect mode is applicable. The identification scheme is outside the scope of the present document.\n",
"type": "array",
"items": {
"description": "An identifier with the intention of being globally unique.\n",
"type": "string"
}
},
"resourceTypes": {
"description": "Match particular resource types.\n",
"type": "array",
"items": {
"type": "string",
"enum": [
"COMPUTE",
"STORAGE",
"NETWORK"
]
}
},
"resourceGroupIds": {
"description": "Match the \"infrastructure resource groups\" that are logical groupings of the virtualised resources assigned to a tenant within an infrastructure Domain.\n",
"type": "array",
"items": {
"description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
"type": "string"
}
}
}
},
"callbackUri": {
"description": "String formatted according to IETF RFC 3986.\n",
"type": "string"
},
"_links": {
"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"
}
}
}
}
}
}
}
}
\ No newline at end of file
{
"name": "AlarmNotification",
"description": "Information of a VNF alarm.\n",
"in": "body",
"required": true,
"schema": {
"description": "This type represents an alarm notification about VNF faults. This notification shall be triggered by the VNFM when: * An alarm has been created. * An alarm has been updated, e.g. if the severity of the alarm has changed.\n",
"type": "object",
"required": [
......@@ -246,5 +241,4 @@
}
}
}
}
}
\ No newline at end of file
}
\ No newline at end of file
{
"type": "object",
"items": {
"description": "The alarm data type encapsulates information about an alarm.\n",
"type": "object",
"required": [
"id",
"managedObjectId",
"rootCauseFaultyResource",
"alarmRaisedTime",
"ackState",
"perceivedSeverity",
"eventTime",
"eventType",
"probableCause",
"isRootCause",
"_links"
],
"properties": {
"id": {
"description": "An identifier with the intention of being globally unique.\n",
"type": "string"
},
"managedObjectId": {
"description": "An identifier with the intention of being globally unique.\n",
"type": "string"
},
"rootCauseFaultyResource": {
"description": "This type represents the faulty virtual resources that have a negative impact on a VNF.\n",
"type": "object",
"required": [
"faultyResource",
"faultyResourceType"
],
"properties": {
"faultyResource": {
"required": [
"vimConnectionId",
"resourceId"
],
"type": "object",
"description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
"properties": {
"vimConnectionId": {
"description": "An identifier with the intention of being globally unique.\n",
"type": "string"
},
"resourceProviderId": {
"description": "An identifier with the intention of being globally unique.\n",
"type": "string"
},
"resourceId": {
"description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
"type": "string"
},
"vimLevelResourceType": {
"description": "Type of the resource in the scope of the VIM or the resource provider.\n",
"type": "string"
}
}
},
"faultyResourceType": {
"description": "The enumeration FaultyResourceType represents those types of faulty resource.\n",
"type": "string",
"enum": [
"COMPUTE",
"STORAGE",
"NETWORK"
]
}
}
},
"alarmRaisedTime": {
"description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
"type": "string",
"format": "date-time"
},
"alarmChangedTime": {
"description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
"type": "string",
"format": "date-time"
},
"alarmClearedTime": {
"description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
"type": "string",
"format": "date-time"
},
"ackState": {
"description": "Acknowledgement state of the alarm. Permitted values: * UNACKNOWLEDGED * ACKNOWLEDGED.\n",
"type": "string",
"enum": [
"UNACKNOWLEDGED",
"ACKNOWLEDGED"
]
},
"perceivedSeverity": {
"description": "Indicates the relative level of urgency for operator attention. * CRITICAL: The Critical severity level indicates that a service affecting condition has occurred and an immediate corrective action\n is required. Such a severity can be reported, for example, when a\n managed object becomes totally out of service and its capability needs\n to be restored (ITU-T Recommendation X.733).\n* MAJOR: The Major severity level indicates that a service affecting condition has developed and an urgent corrective action is required.\n Such a severity can be reported, for example, when there is a severe\n degradation in the capability of the managed object and its full\n capability needs to be restored (ITU-T Recommendation X.733).\n* MINOR: The Minor severity level indicates the existence of a non-service affecting fault condition and that corrective action\n should be taken in order to prevent a more serious (for example,\n service affecting) fault. Such a severity can be reported, for\n example, when the detected alarm condition is not currently degrading\n the capacity of the managed object (ITU-T Recommendation X.733).\n* WARNING: The Warning severity level indicates the detection of a potential or impending service affecting fault, before any significant\n effects have been felt. Action should be taken to further diagnose (if\n necessary) and correct the problem in order to prevent it from\n becoming a more serious service affecting fault (ITU-T Recommendation\n X.733).\n* INDETERMINATE: The Indeterminate severity level indicates that the severity level cannot be determined (ITU-T Recommendation X.733).\n* CLEARED: The Cleared severity level indicates the clearing of one or more previously reported alarms. This alarm clears all alarms for this\n managed object that have the same Alarm type, Probable cause and\n Specific problems (if given) (ITU-T Recommendation X.733).\n",
"type": "string",
"enum": [
"CRITICAL",
"MAJOR",
"MINOR",
"WARNING",
"INDETERMINATE",
"CLEARED"
]
},
"eventTime": {
"description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
"type": "string",
"format": "date-time"
},
"eventType": {
"description": "The enumeration EventType represents those types of events that trigger an alarm. * COMMUNICATIONS_ALARM: An alarm of this type is associated with the procedure and/or process required conveying information from one point\n to another (ITU-T Recommendation X.733).\n* PROCESSING_ERROR_ALARM: An alarm of this type is associated with a software or processing fault (ITU-T Recommendation X.733).\n* ENVIRONMENTAL_ALARM: An alarm of this type is associated with a condition related to an enclosure in which the equipment resides\n (ITU-T Recommendation X.733).\n* QOS_ALARM: An alarm of this type is associated with degradation in the quality of a service (ITU-T Recommendation X.733).\n* EQUIPMENT_ALARM: An alarm of this type is associated with an equipment fault (ITU-T Recommendation X.733).\n",
"type": "string",
"enum": [
"COMMUNICATIONS_ALARM",
"PROCESSING_ERROR_ALARM",
"ENVIRONMENTAL_ALARM",
"QOS_ALARM",
"EQUIPMENT_ALARM"
]
},
"faultType": {
"description": "Additional information to clarify the type of the fault.\n",
"type": "string"
},
"probableCause": {
"description": "Information about the probable cause of the fault.\n",
"type": "string"
},
"isRootCause": {
"description": "Attribute indicating if this fault is the root for other correlated alarms. If TRUE, then the alarms listed in the attribute CorrelatedAlarmId are caused by this fault.\n",
"type": "boolean"
},
"correlatedAlarmIds": {
"description": "List of identifiers of other alarms correlated to this fault.\n",
"type": "array",
"items": {
"description": "An identifier with the intention of being globally unique.\n",
"type": "string"
}
},
"faultDetails": {
"description": "Provides additional information about the fault.\n",
"type": "array",
"items": {
"type": "string"
}
},
"_links": {
"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"
}
}
},
"objectInstance": {
"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
......@@ -16,7 +16,7 @@ GET Individual VNF Indicator
Log Trying to validate response
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json vnfIndicators.schema.json ${json}
Validate Json vnfIndicator.schema.json ${json}
Log Validation OK
GET Individual VNF Indicator - Negative (Not Found)
......
......@@ -18,8 +18,8 @@ GET Subscription
Should Contain ${contentType} application/json
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json VnfIndicatorSubscription.schema.json ${json}
Log Validated VnfIndicatorSubscription schema
Validate Json VnfIndicatorSubscriptions.schema.json ${json}
Log Validated VnfIndicatorSubscriptions schema
GET Subscription - Filter
Log Trying to get the list of subscriptions using filters
......@@ -32,7 +32,7 @@ GET Subscription - Filter
Log Received a 200 OK as expected
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json VnfIndicatorSubscription.schema.json ${json}
Validate Json VnfIndicatorSubscriptions.schema.json ${json}
Log Validated VnfIndicatorSubscriptions schema
GET Subscription - Negative Filter
......
{ "type": "array", "items": { "description": "This type represents a subscription related to notifications about VNF indicator value changes.\n", "type": "object", "required": [ "callbackUri", "id", "_links" ], "properties": { "id": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" }, "filter": { "description": "This type represents a subscription filter related to notifications about VNF indicator value changes. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n", "type": "object", "properties": { "vnfInstanceSubscriptionFilter": { "description": "This type represents subscription filter criteria to match VNF instances. * NOTE 1:\n The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to \n VNF instances that are based on certain VNFDs in a filter. They should not be used both\n in the same filter instance, but one alternative should be chosen.\n * NOTE 2:\n The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to\n particular VNF instances in a filter. They should not be used both in the same filter instance,\n but one alternative should be chosen.\n", "type": "object", "properties": { "vnfdIds": { "description": "If present, match VNF instances that were created based on a VNFD identified by one of the vnfdId values listed in this attribute. See NOTE 1.\n", "type": "array", "items": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" } }, "vnfProductsFromProviders": { "description": "If present, match VNF instances that belong to VNF products from certain providers. See NOTE 1.\n", "type": "array", "items": { "type": "object", "required": [ "vnfProvider" ], "properties": { "vnfProvider": { "description": "Name of the VNF provider to match.\n", "type": "string" }, "vnfProducts": { "description": "If present, match VNF instances that belong to VNF products with certain product names, from one particular provider.\n", "type": "array", "items": { "type": "object", "required": [ "vnfProductName" ], "properties": { "vnfProductName": { "description": "Name of the VNF product to match.\n", "type": "string" }, "versions": { "description": "If present, match VNF instances that belong to VNF products with certain versions and a certain product name, from one particular provider.\n", "type": "array", "items": { "type": "object", "required": [ "vnfSoftwareVersions" ], "properties": { "vnfSoftwareVersions": { "description": "A version.\n", "type": "string" }, "vnfdVersions": { "description": "If present, match VNF instances that belong to VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n", "type": "array", "items": { "description": "A version.\n", "type": "string" } } } } } } } } } } }, "vnfInstanceIds": { "description": "If present, match VNF instances with an instance identifier listed in this attribute. See NOTE 2.\n", "type": "array", "items": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" } }, "vnfInstanceNames": { "description": "If present, match VNF instances with a VNF Instance Name listed in this attribute. See NOTE 2\n", "type": "array", "items": { "type": "string" } } } }, "indicatorIds": { "description": "Match particular VNF indicator identifiers.\n", "type": "array", "items": { "description": "An identifier that is unique within a VNF descriptor.\n", "type": "string" } } } }, "callbackUri": { "description": "The URI of the endpoint to send the notification to.\n", "type": "string", "format": "URI" }, "_links": { "description": "Links to resources related to 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" } } } } } } }}
\ No newline at end of file
{
"description": "This type represents a subscription related to notifications about VNF indicator value changes.\n",
"type": "object",
"required": [
"callbackUri",
"id",
"_links"
],
"properties": {
"id": {
"description": "An identifier with the intention of being globally unique.\n",
"type": "string"
},
"filter": {
"description": "This type represents a subscription filter related to notifications about VNF indicator value changes. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n",
"type": "object",
"properties": {
"vnfInstanceSubscriptionFilter": {
"description": "This type represents subscription filter criteria to match VNF instances. * NOTE 1:\n The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to \n VNF instances that are based on certain VNFDs in a filter. They should not be used both\n in the same filter instance, but one alternative should be chosen.\n * NOTE 2:\n The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to\n particular VNF instances in a filter. They should not be used both in the same filter instance,\n but one alternative should be chosen.\n",
"type": "object",
"properties": {
"vnfdIds": {
"description": "If present, match VNF instances that were created based on a VNFD identified by one of the vnfdId values listed in this attribute. See NOTE 1.\n",
"type": "array",
"items": {
"description": "An identifier with the intention of being globally unique.\n",
"type": "string"
}
},
"vnfProductsFromProviders": {
"description": "If present, match VNF instances that belong to VNF products from certain providers. See NOTE 1.\n",
"type": "array",
"items": {
"type": "object",
"required": [
"vnfProvider"
],
"properties": {
"vnfProvider": {
"description": "Name of the VNF provider to match.\n",
"type": "string"
},
"vnfProducts": {
"description": "If present, match VNF instances that belong to VNF products with certain product names, from one particular provider.\n",
"type": "array",
"items": {
"type": "object",
"required": [
"vnfProductName"
],
"properties": {
"vnfProductName": {
"description": "Name of the VNF product to match.\n",
"type": "string"
},
"versions": {
"description": "If present, match VNF instances that belong to VNF products with certain versions and a certain product name, from one particular provider.\n",
"type": "array",
"items": {
"type": "object",
"required": [
"vnfSoftwareVersions"
],
"properties": {
"vnfSoftwareVersions": {
"description": "A version.\n",
"type": "string"
},
"vnfdVersions": {
"description": "If present, match VNF instances that belong to VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n",
"type": "array",
"items": {
"description": "A version.\n",
"type": "string"
}
}
}
}
}
}
}
}
}
}
},
"vnfInstanceIds": {
"description": "If present, match VNF instances with an instance identifier listed in this attribute. See NOTE 2.\n",
"type": "array",
"items": {
"description": "An identifier with the intention of being globally unique.\n",
"type": "string"
}
},
"vnfInstanceNames": {