From a7e61db1cb393e54225ec3d267e637382293c373 Mon Sep 17 00:00:00 2001 From: Elian Kraja <e.kraja@nextworks.it> Date: Thu, 10 Jan 2019 16:54:26 +0100 Subject: [PATCH] Fix on schemas. Removed to definitions --- .../VNFConfiguration-API/Configuration.robot | 4 +- ...schema.json => ProblemDetails.schema.json} | 0 ...schema.json => ProblemDetails.schema.json} | 0 ...schema.json => ProblemDetails.schema.json} | 0 .../Subscriptions.robot | 2 +- .../schemas/AlarmSubscriptions.schema.json | 1 - .../schemas/Alarms.schema.json | 191 +++++++++++++++++- ...schema.json => ProblemDetails.schema.json} | 0 ...schema.json => ProblemDetails.schema.json} | 0 .../InstantiateVNFTask.robot | 2 +- ...schema.json => ProblemDetails.schema.json} | 0 ...schema.json => ProblemDetails.schema.json} | 0 .../PackageOnboardingNotification.schema.json | 80 ++++++++ ...schema.json => ProblemDetails.schema.json} | 0 .../VrQuotaAvailSubscriptions.schema.json | 88 +++++++- 15 files changed, 361 insertions(+), 7 deletions(-) rename SOL002/VNFConfiguration-API/schemas/{problemDetails.schema.json => ProblemDetails.schema.json} (100%) rename SOL002/VNFFaultManagement-API/schemas/{problemDetails.schema.json => ProblemDetails.schema.json} (100%) rename SOL002/VNFLifecycleManagement-API/schemas/{problemDetails.schema.json => ProblemDetails.schema.json} (100%) delete mode 100644 SOL003/VNFFaultManagement-API/schemas/AlarmSubscriptions.schema.json rename SOL003/VNFFaultManagement-API/schemas/{problemDetails.schema.json => ProblemDetails.schema.json} (100%) rename SOL003/VNFFaultManagementNotification-API/schemas/{problemDetails.schema.json => ProblemDetails.schema.json} (100%) rename SOL003/VNFLifecycleManagement-API/schemas/{problemDetails.schema.json => ProblemDetails.schema.json} (100%) rename SOL003/VNFLifecycleOperationGranting-API/schemas/{problemDetails.schema.json => ProblemDetails.schema.json} (100%) create mode 100644 SOL003/VNFPackageManagementNotification-API_nxw/schemas/PackageOnboardingNotification.schema.json rename SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/{problemDetails.schema.json => ProblemDetails.schema.json} (100%) diff --git a/SOL002/VNFConfiguration-API/Configuration.robot b/SOL002/VNFConfiguration-API/Configuration.robot index c0bb4e90..dfcc1368 100644 --- a/SOL002/VNFConfiguration-API/Configuration.robot +++ b/SOL002/VNFConfiguration-API/Configuration.robot @@ -11,7 +11,7 @@ Library DependencyLibrary ${Etag}= an etag ${Etag_modified}= a modified etag -*** Test cases *** +*** Test Cases *** POST Configuration - Method not implemented log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} @@ -66,7 +66,7 @@ PATCH Config - Precondition failed [Documentation] Precondition Failed ... 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. + ... The response body should 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 Etag has been modified log Trying to perform a PATCH. This method modifies an individual alarm resource Set Headers {"Accept":"${ACCEPT}"} diff --git a/SOL002/VNFConfiguration-API/schemas/problemDetails.schema.json b/SOL002/VNFConfiguration-API/schemas/ProblemDetails.schema.json similarity index 100% rename from SOL002/VNFConfiguration-API/schemas/problemDetails.schema.json rename to SOL002/VNFConfiguration-API/schemas/ProblemDetails.schema.json diff --git a/SOL002/VNFFaultManagement-API/schemas/problemDetails.schema.json b/SOL002/VNFFaultManagement-API/schemas/ProblemDetails.schema.json similarity index 100% rename from SOL002/VNFFaultManagement-API/schemas/problemDetails.schema.json rename to SOL002/VNFFaultManagement-API/schemas/ProblemDetails.schema.json diff --git a/SOL002/VNFLifecycleManagement-API/schemas/problemDetails.schema.json b/SOL002/VNFLifecycleManagement-API/schemas/ProblemDetails.schema.json similarity index 100% rename from SOL002/VNFLifecycleManagement-API/schemas/problemDetails.schema.json rename to SOL002/VNFLifecycleManagement-API/schemas/ProblemDetails.schema.json diff --git a/SOL003/VNFFaultManagement-API/Subscriptions.robot b/SOL003/VNFFaultManagement-API/Subscriptions.robot index 51a5a191..23e88e3a 100644 --- a/SOL003/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL003/VNFFaultManagement-API/Subscriptions.robot @@ -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 FmSubscriptions.schema.json ${json} + Validate Json FmSubscription.schema.json ${json} Log Validation OK Create a new Subscription - NO-DUPLICATION diff --git a/SOL003/VNFFaultManagement-API/schemas/AlarmSubscriptions.schema.json b/SOL003/VNFFaultManagement-API/schemas/AlarmSubscriptions.schema.json deleted file mode 100644 index 910e29d1..00000000 --- a/SOL003/VNFFaultManagement-API/schemas/AlarmSubscriptions.schema.json +++ /dev/null @@ -1 +0,0 @@ -{ "$ref": "#/definitions/FmSubscription"} \ No newline at end of file diff --git a/SOL003/VNFFaultManagement-API/schemas/Alarms.schema.json b/SOL003/VNFFaultManagement-API/schemas/Alarms.schema.json index 543411fa..218ce5f6 100644 --- a/SOL003/VNFFaultManagement-API/schemas/Alarms.schema.json +++ b/SOL003/VNFFaultManagement-API/schemas/Alarms.schema.json @@ -1 +1,190 @@ -{ "$ref": "#/definitions/Alarm"} \ No newline at end of file +{ + "type": "array", + "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\n 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\n 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\n 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\n 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\n severity level cannot be determined (ITU-T Recommendation X.733).\n* CLEARED: The Cleared severity level indicates the clearing of one or\n 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\n 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\n software or processing fault (ITU-T Recommendation X.733).\n* ENVIRONMENTAL_ALARM: An alarm of this type is associated with a\n 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\n quality of a service (ITU-T Recommendation X.733).\n* EQUIPMENT_ALARM: An alarm of this type is associated with an equipment\n 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 diff --git a/SOL003/VNFFaultManagement-API/schemas/problemDetails.schema.json b/SOL003/VNFFaultManagement-API/schemas/ProblemDetails.schema.json similarity index 100% rename from SOL003/VNFFaultManagement-API/schemas/problemDetails.schema.json rename to SOL003/VNFFaultManagement-API/schemas/ProblemDetails.schema.json diff --git a/SOL003/VNFFaultManagementNotification-API/schemas/problemDetails.schema.json b/SOL003/VNFFaultManagementNotification-API/schemas/ProblemDetails.schema.json similarity index 100% rename from SOL003/VNFFaultManagementNotification-API/schemas/problemDetails.schema.json rename to SOL003/VNFFaultManagementNotification-API/schemas/ProblemDetails.schema.json diff --git a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot index 70be1f05..2cb09602 100644 --- a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot @@ -29,7 +29,7 @@ Instantiate a vnfInstance Conflict [Documentation] Conflict. ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. ... Typically, this is due to the fact that the VNF instance resource is in INSTANTIATED state. - ... 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. [Setup] Check resource instantiated Log Trying to Instantiate a vnf Instance Set Headers {"Accept":"${ACCEPT}"} diff --git a/SOL003/VNFLifecycleManagement-API/schemas/problemDetails.schema.json b/SOL003/VNFLifecycleManagement-API/schemas/ProblemDetails.schema.json similarity index 100% rename from SOL003/VNFLifecycleManagement-API/schemas/problemDetails.schema.json rename to SOL003/VNFLifecycleManagement-API/schemas/ProblemDetails.schema.json diff --git a/SOL003/VNFLifecycleOperationGranting-API/schemas/problemDetails.schema.json b/SOL003/VNFLifecycleOperationGranting-API/schemas/ProblemDetails.schema.json similarity index 100% rename from SOL003/VNFLifecycleOperationGranting-API/schemas/problemDetails.schema.json rename to SOL003/VNFLifecycleOperationGranting-API/schemas/ProblemDetails.schema.json diff --git a/SOL003/VNFPackageManagementNotification-API_nxw/schemas/PackageOnboardingNotification.schema.json b/SOL003/VNFPackageManagementNotification-API_nxw/schemas/PackageOnboardingNotification.schema.json new file mode 100644 index 00000000..903f0bf4 --- /dev/null +++ b/SOL003/VNFPackageManagementNotification-API_nxw/schemas/PackageOnboardingNotification.schema.json @@ -0,0 +1,80 @@ +{ + "description": "This type represents a VNF package management notification, which informs the receiver that the onboarding process of a VNF package is complete and the package is ready for use. The notification shall be triggered by the NFVO when the \"onboardingState\" attribute of a new VNF package has changed to \"ONBOARDED\".", + "type": "object", + "required": [ + "id", + "notificationType", + "timeStamp", + "vnfPkgId", + "vnfdId", + "_links" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "notificationType": { + "description": "Discriminator for the different notification types. Shall be set to \"VnfPackageOnboardingNotification\" for this notification type.\n", + "type": "string", + "enum": [ + "VnfPackageOnboardingNotification" + ] + }, + "subscriptionId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "timeStamp": { + "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", + "type": "string", + "format": "date-time" + }, + "vnfPkgId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "vnfdId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "_links": { + "description": "This type represents the links to resources that a VNF package management notification can contain.\n", + "type": "object", + "required": [ + "vnfPackage", + "subscription" + ], + "properties": { + "vnfPackage": { + "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" + } + } + }, + "subscription": { + "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 diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/problemDetails.schema.json b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/ProblemDetails.schema.json similarity index 100% rename from SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/problemDetails.schema.json rename to SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/ProblemDetails.schema.json diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/VrQuotaAvailSubscriptions.schema.json b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/VrQuotaAvailSubscriptions.schema.json index ec747fa4..6394f381 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/VrQuotaAvailSubscriptions.schema.json +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/VrQuotaAvailSubscriptions.schema.json @@ -1 +1,87 @@ -null \ No newline at end of file +{ + "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 -- GitLab