diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/ChangeStateOperationOccurance.robot b/SOL009/NFVManoConfigurationAndInformationManagement-API/ChangeStateOperationOccurance.robot new file mode 100644 index 0000000000000000000000000000000000000000..323e678d462330ad00dfd3c3fcd4a7fee772264d --- /dev/null +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/ChangeStateOperationOccurance.robot @@ -0,0 +1,188 @@ +** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library JSONLibrary +Library OperatingSystem +Resource NFVMANOCimKeywords.robot +Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false +Library MockServerLibrary + +*** Test Cases *** +POST Change State Operation Occurance - Method not implemented + [Documentation] Test ID: 8.3.1.3.1 + ... Test title: POST Change State Operation Occurance - Method not implemented + ... Test objective: The objective is to test that POST method is not implemeted. + ... Pre-conditions: + ... Reference: clause 5.5.8.3.1 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: + Send Post request for Change State Operation Occurance + Check HTTP Response Status Code Is 405 + +GET Change State Operation Occurance + [Documentation] Test ID: 8.3.1.3.2 + ... Test title: GET Change State Operation Occurance + ... Test objective: The objective is to query status information about multiple change state operation occurrences. + ... Pre-conditions: + ... Reference: clause 5.5.8.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: + ... Post-Conditions: + Get Change State OpOcc + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ChangeStateOpOccs + +GET Change State Operation Occurance - invalid attribute-based filter + [Documentation] Test ID: 8.3.1.3.3 + ... Test title: GET Change State Operation Occurance - invalid attribute-based filter + ... Test objective: The objective is to test that the retrieval of Change State Operation Occurance fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response. + ... Pre-conditions: + ... Reference: clause 5.5.8.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: + ... Post-Conditions: + Get Change State OpOcc with invalid filter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Change State Operation Occurance - invalid attribute selector + [Documentation] Test ID: 8.3.1.3.4 + ... Test title: GET Change State Operation Occurance - invalid attribute selector + ... Test objective: The objective is to test that the retrieval of Change State Operation Occurance fails when using invalid attribute selector, and perform the JSON schema validation of the failed operation HTTP response. + ... Pre-conditions: + ... Reference: clause 5.5.8.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: + ... Post-Conditions: + Get Change State OpOcc with invalid selector + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Change State Operation Occurance - Bad Request Response too Big + [Documentation] Test ID: 8.3.1.3.5 + ... Test title: GET Change State Operation Occurance - Bad Request Response too Big + ... Test objective: The objective is to test that the retrieval of Change State Operation Occurance fails when response is too big, and perform the JSON schema validation of the failed operation HTTP response. + ... Pre-conditions: + ... Reference: clause 5.5.8.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: + ... Post-Conditions: + Get Change State OpOcc + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Change State Operation Occurance with attribute-based filter + [Documentation] Test ID: 8.3.1.3.6 + ... Test title: GET Change State Operation Occurance with attribute-based filter + ... Test objective: The objective is to query status information about multiple change state operation occurrences with attribute filters + ... Pre-conditions: + ... Reference: clause 5.5.8.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: + ... Post-Conditions: + Get Change State OpOcc with filter + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ChangeStateOpOcc + +GET Change State Operation Occurance with "all_fields" attribute selector + [Documentation] Test ID: 8.3.1.3.7 + ... Test title: GET Change State Operation Occurance with "all_fields" attribute selector + ... Test objective: The objective is to retrieve Change State Operation Occurance with "all_fields" attribute selector + ... Pre-conditions: + ... Reference: clause 5.5.8.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: + ... Post-Conditions: + Get Change State OpOcc with all_fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ChangeStateOpOcc + +GET Change State Operation Occurance with "exclude_default" attribute selector + [Documentation] Test ID: 8.3.1.3.8 + ... Test title: GET Change State Operation Occurance with "exclude_default" attribute selector + ... Test objective: The objective is to retrieve Change State Operation Occurance with "exclude_default" attribute selector + ... Pre-conditions: + ... Reference: clause 5.5.8.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: + ... Post-Conditions: + Get Change State OpOcc with all_fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ChangeStateOpOcc + + +GET Change State Operation Occurance with "fields" attribute selector + [Documentation] Test ID: 8.3.1.3.9 + ... Test title: GET Change State Operation Occurance with "fields" attribute selector + ... Test objective: The objective is to retrieve Change State Operation Occurance with fields attribute selector + ... Pre-conditions: + ... Reference: clause 5.5.8.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: + ... Post-Conditions: + Get Change State OpOcc with fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ChangeStateOpOcc + +GET Change State Operation Occurance with "exclude_fields" attribute selector + [Documentation] Test ID: 8.3.1.3.10 + ... Test title: GET Change State Operation Occurance with "exclude_fields" attribute selector + ... Test objective: The objective is to retrieve Change State Operation Occurance with "exclude_fields" attribute selector + ... Pre-conditions: + ... Reference: clause 5.5.8.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: + ... Post-Conditions: none + Get Change State OpOcc with exclude_fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ChangeStateOpOcc + +GET Change State Operation Occurance with Paged Response + [Documentation] Test ID: 8.3.1.3.11 + ... Test title: GET Change State Operation Occurance with Paged Response + ... Test objective: The objective is to query Change State Operation Occurance to get Paged Response. + ... Pre-conditions: + ... Reference: clause 5.5.8.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: + ... Post-Conditions: + Get Change State OpOcc + Check HTTP Response Status Code Is 200 + Check LINK in Header + +PUT Change State Operation Occurance - Method not implemented + [Documentation] Test ID: 8.3.1.3.12 + ... Test title: PUT Change State Operation Occurance - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemeted. + ... Pre-conditions: + ... Reference: clause 5.5.8.3.3 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: + Send Put request for Change State Operation Occurance + Check HTTP Response Status Code Is 405 + +PATCH Change State Operation Occurance - Method not implemented + [Documentation] Test ID: 8.3.1.3.13 + ... Test title: PATCH Change State Operation Occurance - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemeted. + ... Pre-conditions: + ... Reference: clause 5.5.8.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: + Send Patch request for Change State Operation Occurance + Check HTTP Response Status Code Is 405 + +DELETE Change State Operation Occurance - Method not implemented + [Documentation] Test ID: 8.3.1.3.14 + ... Test title: DELETE Change State Operation Occurance - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemeted. + ... Pre-conditions: + ... Reference: clause 5.5.8.3.5 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: + Send Delete request for Change State Operation Occurance + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/NFVMANOCimKeywords.robot b/SOL009/NFVManoConfigurationAndInformationManagement-API/NFVMANOCimKeywords.robot index 8eed9958ef2247842e95b6e6d3c1b6c11b25215a..5e3d67847cc55d039f58ba9ba62315e7939fc103 100644 --- a/SOL009/NFVManoConfigurationAndInformationManagement-API/NFVMANOCimKeywords.robot +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/NFVMANOCimKeywords.robot @@ -118,4 +118,98 @@ Send Delete request for NFV-MANO functional entity application state change Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/mano_entity/change_state ${output}= Output response - Set Suite Variable ${response} ${output} \ No newline at end of file + Set Suite Variable ${response} ${output} + +Send Post request for Change State Operation Occurance + Log Trying to perform a POST (method should not be implemented) + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/change_state_ops + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Change State OpOcc + Log Query to GET information about multiple change state operation occurrences. + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiMajorVersion}/change_state_ops + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Get Change State OpOcc with invalid filter + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiMajorVersion}/change_state_ops?attribute_not_exist=some_value + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Get Change State OpOcc with invalid selector + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiMajorVersion}/change_state_ops?fields=wrong_field + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Get Change State OpOcc with filter + Log Query information about multiple change state operation occurrences with attribute filters. + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiMajorVersion}/change_state_ops?${filter}=${filter_value} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Get Change State OpOcc with all_fields attribute selector + Log Queries information about multiple change state operation occurrences, using all_fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/change_state_ops?exclude_default + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Change State OpOcc with fields attribute selector + Log Queries information about multiple change state operation occurrences, using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/change_state_ops?fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Change State OpOcc with exclude_fields attribute selector + Log Queries information about multiple change state operation occurrences, using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/change_state_ops?exclude_fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check LINK in Header + ${linkURL}= Get Value From Json ${response['headers']} $..Link + Should Not Be Empty ${linkURL} + +Send PUT request for Change State Operation Occurance + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/change_state_ops + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Send PATCH request for Change State Operation Occurance + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/change_state_ops + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Send DELETE request for Change State Operation Occurance + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/change_state_ops + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/environment/variables.txt b/SOL009/NFVManoConfigurationAndInformationManagement-API/environment/variables.txt index f0ea010723f94c5f0381c8044ddb601201205409..f94eed9d736ed05bb15dbd2adaac67d19d4ff563 100644 --- a/SOL009/NFVManoConfigurationAndInformationManagement-API/environment/variables.txt +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/environment/variables.txt @@ -20,4 +20,9 @@ ${apiRoot} / ${apiMajorVersion} v1 ${apiName} nfvmanocim -${response} \ No newline at end of file +${response} + +${filter} +${filter_value} + +${fields} \ No newline at end of file diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/schemas/ChangeStateOpOcc.json b/SOL009/NFVManoConfigurationAndInformationManagement-API/schemas/ChangeStateOpOcc.json new file mode 100644 index 0000000000000000000000000000000000000000..f9238e4d2584d597cb50714a9a9d31bb7ea47d74 --- /dev/null +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/schemas/ChangeStateOpOcc.json @@ -0,0 +1,85 @@ +{ + "description": "This type represents a Change state operation occurrence. \n", + "type": "object", + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "operationState": { + "description": "The enumeration ChangeStateOpOccStateEnumType defines permitted values for the change state operation. It shall comply with the provisions :\n - PROCESSING\tThe change state operation is currently in execution.\n - COMPLETED\tThe change state operation has been completed successfully.\n - FAILED\tThe change state operation has failed.\n", + "type": "string", + "enum": [ + "PROCESSING", + "COMPLETED", + "FAILED" + ] + }, + "stateEnteredTime": { + "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", + "type": "string", + "format": "date-time" + }, + "startTime": { + "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", + "type": "string", + "format": "date-time" + }, + "managedObjectRef": { + "description": "This type represents the identifier to reference a managed object of a particular type. \n", + "type": "object", + "properties": { + "type": { + "description": "Indicates the type of managed object. Permitted values:\n - MANO_ENTITY\n - MANO_SERVICE\n - MANO_SERVICE_IF\n - CONSUMED_MANO_IF\n - MANO_ENTITY_COMPONENT\n\nThe \"MANO_ENTITY COMPONENT\" is only applicable if attribute \"manoEntityComponents\" in \"ManoEntity\" is supported by the API producer.\n", + "type": "string", + "enum": [ + "MANO_ENTITY", + "MANO_SERVICE", + "MANO_SERVICE_IF", + "CONSUMED_MANO_IF", + "MANO_ENTITY_COMPONENT" + ] + }, + "objectId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "subObjectId": { + "description": "An identifier that is unique for the respective type within a NFV-MANO functional entity, but that need not be globally unique. Representation: string of variable length..\n", + "type": "string" + } + }, + "required": [ + "type", + "objectId" + ] + }, + "changeOperationalStateRequest": { + "description": "The enumeration ChangeOperationalStateEnumType defines permitted values for the change state operation. The ChangeOperationalStateEnumType shall comply with the provisions:\n - START\tTo start the managed entity.\n - STOP\tTo stop the managed entity.\n - RESTART\tTo stop and start again the managed entity.\n", + "type": "string", + "enum": [ + "START", + "STOP", + "RESTART" + ] + }, + "changeAdministrativeStateRequest": { + "description": "The enumeration ChangeAdministrativeStateEnumType defines permitted values for the change of administrative state operation. The ChangeAdministrativeStateEnumType shall comply with the provisions:\n - LOCK\tTo lock the managed entity.\n - UNLOCK\tTo unlock the managed entity.\n", + "type": "string", + "enum": [ + "LOCK", + "UNLOCK" + ] + }, + "operationParams": { + "description": "Input parameters of the change state operation. This attribute shall be formatted according to the request data type of the related change state operation. \nThe following mapping between operationType and the data type of this attribute shall apply:\n - CHANGE_STATE: ChangeStateRequest\n \nThis attribute shall be present if this data type is returned in a response to reading an individual resource, and may be present according to the chosen attribute selector parameter if this data type is returned in a response to a query of a container resource.\n" + } + }, + "required": [ + "id", + "operationState", + "stateEnteredTime", + "startTime", + "managedObjectRef" + ] + } \ No newline at end of file diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/schemas/ChangeStateOpOccs.json b/SOL009/NFVManoConfigurationAndInformationManagement-API/schemas/ChangeStateOpOccs.json new file mode 100644 index 0000000000000000000000000000000000000000..7c203be47c174936e0fb1fd53fcde49c2a89a483 --- /dev/null +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/schemas/ChangeStateOpOccs.json @@ -0,0 +1,87 @@ +{ "type": "array", + "items": { + "description": "This type represents a Change state operation occurrence. \n", + "type": "object", + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "operationState": { + "description": "The enumeration ChangeStateOpOccStateEnumType defines permitted values for the change state operation. It shall comply with the provisions :\n - PROCESSING\tThe change state operation is currently in execution.\n - COMPLETED\tThe change state operation has been completed successfully.\n - FAILED\tThe change state operation has failed.\n", + "type": "string", + "enum": [ + "PROCESSING", + "COMPLETED", + "FAILED" + ] + }, + "stateEnteredTime": { + "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", + "type": "string", + "format": "date-time" + }, + "startTime": { + "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", + "type": "string", + "format": "date-time" + }, + "managedObjectRef": { + "description": "This type represents the identifier to reference a managed object of a particular type. \n", + "type": "object", + "properties": { + "type": { + "description": "Indicates the type of managed object. Permitted values:\n - MANO_ENTITY\n - MANO_SERVICE\n - MANO_SERVICE_IF\n - CONSUMED_MANO_IF\n - MANO_ENTITY_COMPONENT\n\nThe \"MANO_ENTITY COMPONENT\" is only applicable if attribute \"manoEntityComponents\" in \"ManoEntity\" is supported by the API producer.\n", + "type": "string", + "enum": [ + "MANO_ENTITY", + "MANO_SERVICE", + "MANO_SERVICE_IF", + "CONSUMED_MANO_IF", + "MANO_ENTITY_COMPONENT" + ] + }, + "objectId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "subObjectId": { + "description": "An identifier that is unique for the respective type within a NFV-MANO functional entity, but that need not be globally unique. Representation: string of variable length..\n", + "type": "string" + } + }, + "required": [ + "type", + "objectId" + ] + }, + "changeOperationalStateRequest": { + "description": "The enumeration ChangeOperationalStateEnumType defines permitted values for the change state operation. The ChangeOperationalStateEnumType shall comply with the provisions:\n - START\tTo start the managed entity.\n - STOP\tTo stop the managed entity.\n - RESTART\tTo stop and start again the managed entity.\n", + "type": "string", + "enum": [ + "START", + "STOP", + "RESTART" + ] + }, + "changeAdministrativeStateRequest": { + "description": "The enumeration ChangeAdministrativeStateEnumType defines permitted values for the change of administrative state operation. The ChangeAdministrativeStateEnumType shall comply with the provisions:\n - LOCK\tTo lock the managed entity.\n - UNLOCK\tTo unlock the managed entity.\n", + "type": "string", + "enum": [ + "LOCK", + "UNLOCK" + ] + }, + "operationParams": { + "description": "Input parameters of the change state operation. This attribute shall be formatted according to the request data type of the related change state operation. \nThe following mapping between operationType and the data type of this attribute shall apply:\n - CHANGE_STATE: ChangeStateRequest\n \nThis attribute shall be present if this data type is returned in a response to reading an individual resource, and may be present according to the chosen attribute selector parameter if this data type is returned in a response to a query of a container resource.\n" + } + }, + "required": [ + "id", + "operationState", + "stateEnteredTime", + "startTime", + "managedObjectRef" + ] + } + } \ No newline at end of file