diff --git a/.gitignore b/.gitignore index a40199d342c5986c89ce93910b37b8e41e9d7221..1b6e272e04717ec62023ea57fe18977d0f287ce8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /red.xml build/ dist/ +libspecs/ diff --git a/SOL009/NFVMANOPerformanceManagement-API/ApiVersion.robot b/SOL009/NFVMANOPerformanceManagement-API/ApiVersion.robot new file mode 100644 index 0000000000000000000000000000000000000000..104a87b268336de0a098d4cfd2ca376414cd6fbb --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/ApiVersion.robot @@ -0,0 +1,211 @@ +*** Settings *** +Resource environment/variables.txt +Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 8.3.2.9.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 8.3.2.9.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 8.3.2.9.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 8.3.2.9.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 8.3.2.9.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 8.3.2.9.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 8.3.2.9.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 8.3.2.9.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 8.3.2.9.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 8.3.2.9.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/api_version + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/api_version + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/api_version + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/api_version + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/api_version + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate ${input} .schema.json + Validate Json ${schema} ${response['body']} + Log Json Schema Validation OK diff --git a/SOL009/NFVMANOPerformanceManagement-API/IndividualPmJob.robot b/SOL009/NFVMANOPerformanceManagement-API/IndividualPmJob.robot new file mode 100644 index 0000000000000000000000000000000000000000..e1a351ae0eca4aba15355684bd0bc2306aeb1f86 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/IndividualPmJob.robot @@ -0,0 +1,183 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Library JSONLibrary +Resource environment/IndividualPmJob.txt +Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false + +*** Test Cases *** +POST Individual NFV-MANO Performance Job - Method not implemented + [Documentation] Test ID: 8.3.2.2.1 + ... Test title: POST Individual NFV-MANO Performance Job - method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new NFV-MANO Performance Monitoring Job + ... Pre-conditions: none + ... Reference: clause 6.5.4.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Post request for individual NFV-MANO Performance Job + Check HTTP Response Status Code Is 405 + +GET individual NFV-MANO Performance Job + [Documentation] Test ID: 8.3.2.2.2 + ... Test title: Get individual NFV-MANO Performance Job + ... Test objective: The objective is to test the retrieval of an individual performance monitoring job and perform a JSON schema validation of the collected job data structure + ... Pre-conditions: A NFV-MANO instance is instantiated. + ... Reference: clause 6.5.4.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET individual NFV-MANO Performance Job + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJob + Check HTTP Response Body Pm Job Identifier matches the requested Pm Job + +GET individual NFV-MANO Performance Job with invalid resource identifier + [Documentation] Test ID: 8.3.2.2.3 + ... Test title: Get individual NFV-MANO Performance Job with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of an individual performance monitoring job fails when using an invalid resource identifier, and perform the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.4.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET individual NFV-MANO Performance Job with invalid resource identifier + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +PUT Individual NFV-MANO Performance Job - Method not implemented + [Documentation] Test ID: 8.3.2.2.4 + ... Test title: PUT Individual NFV-MANO Performance Job - method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to update an existing NFV-MANO Performance Monitoring Job + ... Pre-conditions: none + ... Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Put request for individual NFV-MANO Performance Job + Check HTTP Response Status Code Is 405 + +PATCH Individual NFV-MANO Performance Job - Method not implemented + [Documentation] Test ID: 8.3.2.2.5 + ... Test title: PATCH Individual NFV-MANO Performance Job - method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing new NFV-MANO Performance Monitoring Job + ... Pre-conditions: none + ... Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Patch request for individual NFV-MANO Performance Job + Check HTTP Response Status Code Is 405 + +DELETE Individual NFV-MANO Performance Job + [Documentation] Test ID: 8.3.2.2.6 + ... Test title: Delete Individual NFV-MANO Performance Job + ... Test objective: The objective is to test the deletion of an individual performance monitoring job + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.4.3.5 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: The NFV-MANO Performance Job is no more available. + Send Delete request for individual NFV-MANO Performance Job + Check HTTP Response Status Code Is 204 + Check Postcondition NFV-MANO Pm Job is Deleted + +DELETE Individual NFV-MANO Performance Job with invalid resource identifier + [Documentation] Test ID: 8.3.2.2.7 + ... Test title: Delete individual NFV-MANO Performance Job with invalid resource identifier + ... Test objective: The objective is to test that the deletion of an individual NFV-MANO performance monitoring job fails when using an invalid resource identifier + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.4.3.5 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Delete request for individual NFV-MANO Performance Job with invalid resource identifier + Check HTTP Response Status Code Is 404 + +*** Keywords *** +GET individual NFV-MANO Performance Job + Log Trying to get a Pm Job + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET individual NFV-MANO Performance Job with invalid resource identifier + Log Trying to perform a negative get, using erroneous PM Job identifier + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Delete request for individual NFV-MANO Performance Job + Log Trying to delete an existing PM Job + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Delete request for individual NFV-MANO Performance Job with invalid resource identifier + Log Trying to perform a negative delete, using erroneous PM Job identifier + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Post request for individual NFV-MANO Performance Job + 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}/pm_jobs/${newPmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Put request for individual NFV-MANO Performance Job + 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}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Patch request for individual NFV-MANO Performance Job + Log Trying to perform a PATCH (method should not be implemented) + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check Postcondition NFV-MANO Pm Job is Deleted + Log Check Postcondition + GET individual NFV-MANO Performance Job + Check HTTP Response Status Code Is 404 + +Check HTTP Response Body Pm Job Identifier matches the requested Pm Job + Log Going to validate Pm Job info retrieved + Should Be Equal ${response['body']['id']} ${pmJobId} + Log Pm Job identifier as expected + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + ${status}= Convert To Integer ${expected_status} + Should Be Equal ${response['status']} ${status} + Log Status code validated + +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} + Log Header is present + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + Should Contain ${response['headers']['Content-Type']} application/json + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} + Log Json Schema Validation OK diff --git a/SOL009/NFVMANOPerformanceManagement-API/IndividualReport.robot b/SOL009/NFVMANOPerformanceManagement-API/IndividualReport.robot new file mode 100644 index 0000000000000000000000000000000000000000..c3339721c55a8ff7f059b54c074b8bd03974a887 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/IndividualReport.robot @@ -0,0 +1,150 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Resource environment/reports.txt +Library JSONLibrary +Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false + +*** Test Cases *** +POST Individual Performance Report - Method not implemented + [Documentation] Test ID: 8.3.2.3.1 + ... Test title: POST Individual Performance Report - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new NFV-MANO performance report within a monitoring job. + ... Pre-conditions: none + ... Reference: clause 6.5.5.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Post request for Individual Performance Report + Check HTTP Response Status Code Is 405 + +Get Individual Performance Report + [Documentation] Test ID: 8.3.2.3.2 + ... Test title: Get Individual Performance Report + ... Test objective: The objective is to test the retrieval of an individual performance report associated to a monitoring job and perform a JSON schema validation of the collected report data structure + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance reports are set for a monitoring job. + ... Reference: clause 6.5.5.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get Individual Performance Report + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PerformanceReport + +Get Individual Performance Report with invalid resource endpoint + [Documentation] Test ID: 8.3.2.3.3 + ... Test title: Get Individual Performance Report with invalid resource endpoint + ... Test objective: The objective is to test that the retrieval of an individual NFV-MANO performance report associated to a monitoring job fails when using an invalid resource endpoint. + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance reports are set for a monitoring job. + ... Reference: clause 6.5.5.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get Individual Performance Report with invalid resource endpoint + Check HTTP Response Status Code Is 404 + +PUT Individual Performance Report - Method not implemented + [Documentation] Test ID: 8.3.2.3.4 + ... Test title: PUT Individual Performance Report - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to update an existing NFV-MANO performance report within a monitoring job. + ... Pre-conditions: none + ... Reference: clause 6.5.5.3.3 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Put request for Individual Performance Report + Check HTTP Response Status Code Is 405 + +PATCH Individual Performance Report - Method not implemented + [Documentation] Test ID: 8.3.2.3.5 + ... Test title: PATCH Individual Performance Report - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing NFV-MANO performance report within a monitoring job. + ... Pre-conditions: none + ... Reference: clause 6.5.5.3.4 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Patch request for Individual Performance Report + Check HTTP Response Status Code Is 405 + +DELETE Individual Performance Report - Method not implemented + [Documentation] Test ID: 8.3.2.3.6 + ... Test title: DELETE Individual Performance Report - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing NFV-MANO performance report within a monitoring job + ... Pre-conditions: none + ... Reference: clause 6.5.5.3.5 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANOM + ... Applicability: none + ... Post-Conditions: none + Send Delete request for Individual Performance Report + Check HTTP Response Status Code Is 405 + +*** Keywords *** +Get Individual Performance Report + Log Trying to get a performance report present in the NFV-MANOM + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Individual Performance Report with invalid resource endpoint + Log Trying to get a performance report with invalid resource endpoint + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Post request for Individual Performance Report + Log Trying to create new performance report + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${newReportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Put request for Individual Performance Report + Log Trying to update performance report + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Patch request for Individual Performance Report + Log Trying to update performance report + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Delete request for Individual Performance Report + Log Trying to delete performance report + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + ${status}= Convert To Integer ${expected_status} + Should Be Equal ${response['status']} ${status} + Log Status code validated + +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} + Log Header is present + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + Should Contain ${response['headers']['Content-Type']} application/json + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} + Log Json Schema Validation OK + diff --git a/SOL009/NFVMANOPerformanceManagement-API/IndividualSubscription.robot b/SOL009/NFVMANOPerformanceManagement-API/IndividualSubscription.robot new file mode 100644 index 0000000000000000000000000000000000000000..14b777ec484b3427e4f4f96696e34dc4715252dd --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/IndividualSubscription.robot @@ -0,0 +1,170 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false +Library OperatingSystem +Library JSONLibrary +Resource environment/individualSubscription.txt + +*** Test Cases *** +GET Individual Performance Subscription + [Documentation] Test ID: 8.3.2.7.1 + ... Test title: GET Individual Performance Subscription + ... Test objective: The objective is to test the retrieval of individual performance subscription and perform a JSON schema validation of the returned subscription data structure. + ... Pre-conditions: An instance is instantiated. At least one performance subscription is available in the NFV-MANO. + ... Reference: clause 6.5.9.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get Individual Performance Subscription + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmSubscription + Check HTTP Response Body Subscription Identifier matches the requested Subscription + +GET Individual Performance Subscription with invalid resource identifier + [Documentation] Test ID: 8.3.2.7.2 + ... Test title: GET Individual Performance Subscription with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of an individual performance subscription fails when using an invalid resource identifier. + ... Pre-conditions: An instance is instantiated. At least one performance subscription is available in the NFV-MANO. + ... Reference: clause 6.5.9.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET individual Performance Subscription with invalid resource identifier + Check HTTP Response Status Code Is 404 + +DELETE Individual Performance Subscription + [Documentation] Test ID: 8.3.2.7.3 + ... Test title: DELETE Individual Performance Subscription + ... Test objective: The objective is to test the deletion of an individual performance subscription + ... Pre-conditions: An instance is instantiated. At least one performance subscription is available in the NFV-MANO. + ... Reference: clause 6.5.9.3.5 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: The Performance Subscription is not available anymore in the NFV-MANO + Send Delete request for individual Performance Subscription + Check HTTP Response Status Code Is 204 + Check Postcondition Performance Subscription is Deleted + +DELETE Individual Performance Subscription with invalid resource identifier + [Documentation] Test ID: 8.3.2.7.4 + ... Test title: DELETE Individual Performance Subscription with invalid resource identifier + ... Test objective: The objective is to test that the deletion of an individual performance subscription fails when using an invalid resource identifier. + ... Pre-conditions: An instance is instantiated. At least one performance subscription is available in the NFV-MANO. + ... Reference: clause 6.5.9.3.5 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Delete request for individual Performance Subscription with invalid resource identifier + Check HTTP Response Status Code Is 404 + +POST Individual Performance Subscription - Method not implemented + [Documentation] Test ID: 8.3.2.7.5 + ... Test title: POST Individual Performance Subscription - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new Performance Subscription + ... Pre-conditions: none + ... Reference: clause 6.5.9.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Post request for individual Performance Subscription + Check HTTP Response Status Code Is 405 + +PUT Individual Performance Subscription - Method not implemented + [Documentation] Test ID: 8.3.2.7.6 + ... Test title: PUT Individual Performance Subscription - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to update an existing Performance subscription. + ... Pre-conditions: none + ... Reference: clause 6.5.9.3.3 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Put request for individual Performance Threshold + Check HTTP Response Status Code Is 405 + +PATCH Individual Performance Subscription - Method not implemented + [Documentation] Test ID: 8.3.2.7.7 + ... Test title: PATCH Individual Performance Subscription - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing Performance subscription + ... Pre-conditions: none + ... Reference: clause 6.5.9.3.4 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Patch request for individual Performance Threshold + Check HTTP Response Status Code Is 405 + +*** Keywords *** +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + Should Contain ${response['headers']['Content-Type']} application/json + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} + Log Json Schema Validation OK + +Get Individual Performance Subscription + Set headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check HTTP Response Body Subscription Identifier matches the requested Subscription + Log Trying to check response ID + Should Be Equal As Strings ${response['body']['id']} ${subscriptionId} + Log Subscription identifier as expected + +GET individual Performance Subscription with invalid resource identifier + Set headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Delete request for individual Performance Subscription + Set headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Delete request for individual Performance Subscription with invalid resource identifier + Log Trying to delete a subscription in the NFV-MANO with invalid id + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Check Postcondition Performance Subscription is Deleted + Log Check Postcondition Subscription is deleted + GET individual Performance Subscription + Check HTTP Response Status Code Is 404 + +Send Post request for individual Performance Subscription + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Put request for individual Performance Threshold + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Patch request for individual Performance Threshold + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable @{response} ${output} \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/IndividualThreshold.robot b/SOL009/NFVMANOPerformanceManagement-API/IndividualThreshold.robot new file mode 100644 index 0000000000000000000000000000000000000000..34f912e5c49762e7ddf0d96e1f77443649393343 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/IndividualThreshold.robot @@ -0,0 +1,183 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Library JSONLibrary +Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false +Library OperatingSystem +Resource environment/individualThresholds.txt + +*** Test Cases *** +POST Individual Threshold - Method not implemented + [Documentation] Test ID: 8.3.2.5.1 + ... Test title: POST Individual Threshold - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new Performance Threshold + ... Pre-conditions: none + ... Reference: clause 6.5.7.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Post request for individual Performance Threshold + Check HTTP Response Status Code Is 405 + +GET Individual Threshold + [Documentation] Test ID: 8.3.2.5.2 + ... Test title: GET Individual Threshold + ... Test objective: The objective is to test the retrieval of an individual NFV-MANO performance threshold and perform a JSON schema and content validation of the collected threshold data structure + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more performance thresholds are set. + ... Reference: clause 6.5.7.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET individual Performance Threshold + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is Threshold + Check HTTP Response Body Threshold Identifier matches the requested Threshold + +GET Individual Threshold with invalid resource identifier + [Documentation] Test ID: 8.3.2.5.3 + ... Test title: GET Individual Threshold with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of an individual performance threshold fails when using an invalid resource identifier + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more performance jobs are set. + ... Reference: clause 6.5.7.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET individual Performance Threshold with invalid resource identifier + Check HTTP Response Status Code Is 404 + +PUT Individual Threshold - Method not implemented + [Documentation] Test ID: 8.3.2.5.4 + ... Test title: PUT Individual Threshold - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to update an existing Performance threshold + ... Pre-conditions: none + ... Reference: clause 6.5.7.3.3 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Put request for individual Performance Threshold + Check HTTP Response Status Code Is 405 + +PATCH Individual Threshold - Method not implemented + [Documentation] Test ID: 8.3.2.5.5 + ... Test title: PATCH Individual Threshold - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing Performance threshold + ... Pre-conditions: none + ... Reference: clause 6.5.7.3.4 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Patch request for individual Performance Threshold + Check HTTP Response Status Code Is 405 + +DELETE Individual Threshold + [Documentation] Test ID: 8.3.2.5.6 + ... Test title: DELETE Individual Threshold + ... Test objective: The objective is to test the deletion of an individual performance threshold + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more performance thresholds are set. + ... Reference: clause 6.5.7.3.5 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: The Performance Threshold is not available anymore in the NFV-MANO + Send Delete request for individual Performance Threshold + Check HTTP Response Status Code Is 204 + Check Postcondition Performance Threshold is Deleted + +DELETE Individual Threshold with invalid resource identifier + [Documentation] Test ID: 8.3.2.5.7 + ... Test title: DELETE Individual Threshold with invalid resource identifier + ... Test objective: The objective is to test the deletion of an individual performance threshold + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more performance thresholds are set. + ... Reference: clause 6.5.7.3.5 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Delete request for individual Performance Threshold with invalid resource identifier + Check HTTP Response Status Code Is 404 + +*** Keywords *** +GET Individual Performance Threshold + Log Trying to get a Threhsold present in the NFV-MANO + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +GET individual Performance Threshold with invalid resource identifier + Log Trying to get a Threhsold with invalid resource endpoint + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Delete request for individual Performance Threshold + Log Trying to delete a Threhsold in the NFV-MANO + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Delete request for individual Performance Threshold with invalid resource identifier + Log Trying to delete a Threhsold in the NFV-MANO with invalid id + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Post request for individual Performance Threshold + Log Trying to create new threshold + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${newThresholdId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Put request for individual Performance Threshold + Log Trying to PUT threshold + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Patch request for individual Performance Threshold + Log Trying to PUT threshold + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Check Postcondition Performance Threshold is Deleted + Log Check Postcondition Threshold is deleted + GET individual Performance Threshold + Check HTTP Response Status Code Is 404 + +Check HTTP Response Body Threshold Identifier matches the requested Threshold + Log Trying to check response ID + Should Be Equal ${response['body']['id']} ${thresholdId} + Log Pm Job identifier as expected + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + ${status}= Convert To Integer ${expected_status} + Should Be Equal ${response['status']} ${status} + Log Status code validated + +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} + Log Header is present + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + Should Contain ${response['headers']['Content-Type']} application/json + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} + Log Json Schema Validation OK diff --git a/SOL009/NFVMANOPerformanceManagement-API/PMJobs.robot b/SOL009/NFVMANOPerformanceManagement-API/PMJobs.robot new file mode 100644 index 0000000000000000000000000000000000000000..5e9129e49d4dcb5423d8a313b5bdec673d9df5d3 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/PMJobs.robot @@ -0,0 +1,413 @@ +*** Settings *** +Library String +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Resource environment/pmJobs.txt +Library JSONLibrary +Library OperatingSystem +Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false +Library MockServerLibrary + +*** Test Cases *** +Create new NFV-MANO Performance Monitoring Job + [Documentation] Test ID: 8.3.2.1.1 + ... Test title: Create a new NFV-MANO Performance Monitoring Job + ... Test objective: The objective is to test the creation of a new NFV-MANO performance monitoring job and perform the JSON schema validation of the returned job data structure + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.3.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: The NFV-MANO Performance Job is successfully created on the NFV-MANO + Send Post Request Create new NFV-MANO Performance Monitoring Job + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is PmJob + Check Postcondition PmJob Exists + +GET all NFV-MANO Performance Monitoring Jobs + [Documentation] Test ID: 8.3.2.1.2 + ... Test title: GET all NFV-MANO Performance Monitoring Jobs + ... Test objective: The objective is to test the retrieval of all the available NFV-MANO performance monitoring jobs and perform a JSON schema validation + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET all NFV-MANO Performance Monitoring Jobs + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs + +GET NFV-MANO Performance Monitoring Jobs with attribute-based filter + [Documentation] Test ID: 8.3.2.1.3 + ... Test title: GET all NFV-MANO Performance Monitoring Jobs with attribute-based filter + ... Test objective: The objective is to test the retrieval of NFV-MANO performance monitoring jobs using attribute-based filter, perform a JSON schema validation of the collected jobs data structure + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET NFV-MANO Performance Monitoring Jobs with attribute-based filter + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs + +GET all NFV-MANO Performance Monitoring Jobs with all_fields attribute selector + [Documentation] Test ID: 8.3.2.1.4 + ... Test title: GET all NFV-MANO Performance Monitoring Jobs with all_fields attribute selector + ... Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs all_fields attribute selector, perform a JSON schema validation of the collected jobs data structure + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET NFV-MANO Performance Monitoring Jobs with all_fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs + +GET all NFV-MANO Performance Monitoring Jobs with exclude_default attribute selector + [Documentation] Test ID: 8.3.2.1.5 + ... Test title: GET all NFV-MANO Performance Monitoring Jobs with exclude_default attribute selector + ... Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs exclude_default attribute selector, perform a JSON schema validation of the collected jobs data structure + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET NFV-MANO Performance Monitoring Jobs with exclude_default attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs + +GET all NFV-MANO Performance Monitoring Jobs with fields attribute selector + [Documentation] Test ID: 8.3.2.1.6 + ... Test title: GET all NFV-MANO Performance Monitoring Jobs with fields attribute selector + ... Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs fields attribute selector, perform a JSON schema validation of the collected jobs data structure + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: The NFV-MANO supports the use of fields attribute selector + ... Post-Conditions: none + GET NFV-MANO Performance Monitoring Jobs with fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs + +GET all NFV-MANO Performance Monitoring Jobs with exclude_fields attribute selector + [Documentation] Test ID: 8.3.2.1.7 + ... Test title: GET all NFV-MANO Performance Monitoring Jobs with exclude_fields attribute selector + ... Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs exclude_fields attribute selector, perform a JSON schema validation of the collected jobs data structure + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: The NFV-MANO supports the use of exclude_fields attribute selector + ... Post-Conditions: none + GET NFV-MANO Performance Monitoring Jobs with exclude_fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs + +GET NFV-MANO Performance Monitoring Jobs with invalid attribute-based filter + [Documentation] Test ID: 8.3.2.1.8 + ... Test title: GET NFV-MANO Performance Monitoring Jobs with invalid attribute-based filter + ... Test objective: The objective is to test that the retrieval of NFV-MANO performance monitoring jobs fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET NFV-MANO Performance Monitoring Jobs with invalid attribute-based filter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET NFV-MANO Performance Monitoring Jobs with invalid attribute selector + [Documentation] Test ID: 8.3.2.1.9 + ... Test title: GET NFV-MANO Performance Monitoring Jobs with invalid resource endpoint + ... Test objective: The objective is to test that the retrieval of NFV-MANO performance monitoring jobs fails with invalid attribute selector + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET NFV-MANO Performance Monitoring Jobs with invalid attribute selector + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET information about multiple Performance Monitoring Jobs to get Paged Response + [Documentation] Test ID: 8.3.2.1.10 + ... Test title: GET information about multiple Performance Monitoring Jobs to get Paged Response + ... Test objective: The objective is to retrieve information about the performance monitoring jobs to get paged response + ... Pre-conditions: none + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET all NFV-MANO Performance Monitoring Jobs + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Contains Link + +GET information about multiple Performance Monitoring Jobs for Bad Request Response too big + [Documentation] Test ID: 8.3.2.1.11 + ... Test title: GET information about multiple Performance Monitoring Jobs for Bad Request Response too big + ... Test objective: The objective is to test that GET method fail retrieving status information about performance monitoring jobs when Response is too big, and perform the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: none + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET all NFV-MANO Performance Monitoring Jobs + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET information about multiple Performance Monitoring Jobs with "fields" and "exclude_default" attribute selector + [Documentation] Test ID: 8.3.2.1.12 + ... Test title: GET all NFV-MANO Performance Monitoring Jobs with "fields" and "exclude_default" attribute selector + ... Test objective: The objective is to retrieve all performance monitoring jobs with fields and exclude default attribute selector, and perform the JSON schema validation of the HTTP response. + ... Pre-conditions: none + ... Reference: clause 5.5.8.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET NFV-MANO Performance Monitoring Jobs with fields and exclude_default attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs + +Get information about multiple Performance Monitoring Jobs with malformed authorization token + [Documentation] Test ID: 8.3.2.1.13 + ... Test title: Get information about multiple Performance Monitoring Jobs with malformed authorization token + ... Test objective: The objective is to test that the retrieval of information about Performance Monitoring Jobs fails when using malformed authorization token + ... Pre-conditions: none + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [6] v3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests. + ... Post-Conditions: none + GET Performance Monitoring Jobs with malformed authorization token + Check HTTP Response Status Code Is 401 + +Get information about multiple Performance Monitoring Jobs without authorization token + [Documentation] Test ID: 8.3.2.1.14 + ... Test title: Get information about multiple Performance Monitoring Jobs without authorization token + ... Test objective: The objective is to test that the retrieval of information about Performance Monitoring Jobs fails when omitting the authorization token + ... Pre-conditions: none + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [3] v3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests. + ... Post-Conditions: none + GET Performance Monitoring Jobs without authorization token + Check HTTP Response Status Code Is 401 + +GET information about multiple Performance Monitoring Jobs with expired or revoked authorization token + [Documentation] Test ID: 8.3.2.1.15 + ... Test title: GET information about multiple Performance Monitoring Jobs with expired or revoked authorization token + ... Test objective: The objective is to test that the retrieval of information about Performance Monitoring Jobs fails when using expired or revoked authorization token + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [3] v3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests. + ... Post-Conditions: none + GET Performance Monitoring Jobs with expired or revoked authorization token + Check HTTP Response Status Code Is 401 + +PUT all NFV-MANO Performance Monitoring Jobs - Method not implemented + [Documentation] Test ID: 8.3.2.1.16 + ... Test title: PUT all NFV-MANO Performance Monitoring Jobs - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify NFV-MANO Performance Monitoring Jobs + ... Pre-conditions: none + ... Reference: clause 6.5.3.3.3 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for all NFV-MANO Performance Monitoring Jobs + Check HTTP Response Status Code Is 405 + +PATCH all NFV-MANO Performance Monitoring Jobs - (Method not implemented) + [Documentation] Test ID: 8.3.2.1.17 + ... Test title: PATCH all NFV-MANO Performance Monitoring Jobs - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update NFV-MANO Performance Monitoring Jobs + ... Pre-conditions: none + ... Reference: clause 6.5.3.3.4 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for all NFV-MANO Performance Monitoring Jobs + Check HTTP Response Status Code Is 405 + +DELETE all NFV-MANO Performance Monitoring Jobs - Method not implemented + [Documentation] Test ID: 8.3.2.1.18 + ... Test title: DELETE all NFV-MANO Performance Monitoring Jobs - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to update NFV-MANO Performance Monitoring Jobs + ... Pre-conditions: none + ... Reference: clause 6.5.3.3.5 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for all NFV-MANO Performance Monitoring Jobs + Check HTTP Response Status Code Is 405 + +*** Keywords *** +GET all NFV-MANO Performance Monitoring Jobs + Log Trying to get all PM Jobs present in the NFV-MANO + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET Performance Monitoring Jobs with malformed authorization token + Pass Execution If ${AUTH_USAGE} == 0 Skipping test as NFVO is not supporting authentication + Log The GET method queries using invalid token + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Authorization": "${BAD_AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET Performance Monitoring Jobs without authorization token + Pass Execution If ${AUTH_USAGE} == 0 Skipping test as it is not supporting authentication + Log The GET method queries omitting token + Set Headers {"Accept": "${ACCEPT_JSON}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET Performance Monitoring Jobs with expired or revoked authorization token + Pass Execution If ${AUTH_USAGE} == 0 Skipping test as it is not supporting authentication + Log The GET method queries using invalid token + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Authorization": "${NEG_AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NFV-MANO Performance Monitoring Jobs with attribute-based filter + Log Trying to get all PM Jobs present in the NFV-MANO, using filter params + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${POS_FILTER} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NFV-MANO Performance Monitoring Jobs with all_fields attribute selector + Log Trying to get all PM Jobs present in the NFV-MANO, using 'all_fields' filter + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?all_fields + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NFV-MANO Performance Monitoring Jobs with exclude_default attribute selector + Log Trying to get all NFV-MANO Packages present in the NFV-MANO, using filter params + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?exclude_default + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NFV-MANO Performance Monitoring Jobs with fields attribute selector + Log Trying to get all NFV-MANO Packages present in the NFV-MANO, using filter params + Pass Execution If ${FIELD_USAGE} == 0 Skipping test as NFV-MANO is not supporting 'fields' + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NFV-MANO Performance Monitoring Jobs with fields and exclude_default attribute selector + Log Trying to get all NFV-MANO Packages present in the NFV-MANO, using filter params + Pass Execution If ${FIELD_USAGE} == 0 Skipping test as NFV-MANO is not supporting 'fields' + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?exclude_default&fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NFV-MANO Performance Monitoring Jobs with exclude_fields attribute selector + Log Trying to get all NFV-MANO Packages present in the NFV-MANO, using filter params + Pass Execution If ${FIELD_USAGE} == 0 Skipping test as NFV-MANO is not supporting 'fields' + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NFV-MANO Performance Monitoring Jobs with invalid attribute-based filter + Log Trying to get all PM Jobs present in the NFV-MANO, using an erroneous filter param + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${NEG_FILTER} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NFV-MANO Performance Monitoring Jobs with invalid attribute selector + Log Query VNF The GET method queries information about multiple VNF instances. + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=wrong_field + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Send Post Request Create new NFV-MANO Performance Monitoring Job + Log Creating a new PM Job + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + ${template}= Get File jsons/CreatePmJobRequest.json + ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} + + POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PUT Request for all NFV-MANO Performance Monitoring Jobs + 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}/pm_jobs + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for all NFV-MANO Performance Monitoring Jobs + 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}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for all NFV-MANO Performance Monitoring Jobs + 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}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check Postcondition PmJob Exists + Log Checking that Pm Job exists + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${response['body']['id']} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJob + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + ${status}= Convert To Integer ${expected_status} + Should Be Equal ${response['status']} ${status} + Log Status code validated + +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} + Log Header is present + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + Should Contain ${response['headers']['Content-Type']} application/json + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} + Log Json Schema Validation OK + +Check HTTP Response Header Contains Link + ${linkURL}= Get Value From Json ${response['headers']} $..Link + Should Not Be Empty ${linkURL} \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/PerformanceManagementNotification.robot b/SOL009/NFVMANOPerformanceManagement-API/PerformanceManagementNotification.robot new file mode 100644 index 0000000000000000000000000000000000000000..d864a87ea3957455d93d05a8164d54ac4cd4a2a6 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/PerformanceManagementNotification.robot @@ -0,0 +1,113 @@ +*** Setting *** +Resource environment/notifications.txt +Resource environment/variables.txt +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true +Library MockServerLibrary +Library Process +Library OperatingSystem +Library BuiltIn +Library Collections +Library String + + +*** Test Cases *** +Performance Information Availability Notification + [Documentation] Test ID: 8.3.2.8.1 + ... Test title: Performance Information Availability Notification + ... Test objective: The objective is to test the dispatch of Performance Information Availability Notification when new performance information is available in the NFV-MANO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A performance job is created, and a subscription for information availability notifications is available in the NFV-MANO. + ... Reference: clause 6.5.10.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Trigger the availability of Performance Information (external action) + Check Performance Information Available Notification Http POST Request Body Json Schema Is PerformanceInformationAvailableNotification + Check Performance Information Available Notification Http POST Request Body notificationType attribute Is PerformanceInformationAvailableNotification + +Threshold Crossed Notification + [Documentation] Test ID: 8.3.2.8.2 + ... Test title: Threshold Crossed Notification + ... Test objective: The objective is to test the dispatch of Threshold Crossed Notification when a previously set performance metric threshold is crossed, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A performance job is created, and a threshold subscription is available in the NFV-MANO. + ... Reference: clause 6.5.10.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Trigger the cross of Performance Threshold (external action) + Check Threshold Crossed Notification Http POST Request Body Json Schema Is ThresholdCrossedNotification + Check Threshold Crossed Notification Http POST Request Body notificationType attribute Is ThresholdCrossedNotification + + +*** Keywords *** +Trigger the availability of Performance Information (external action) + #do nothing + Log do nothing + +Trigger the cross of Performance Threshold (external action) + #do nothing + Log do nothing + +Check Performance Information Available Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check Performance Information Available Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification Performance Information Available Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Check Threshold Crossed Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + + +Check Threshold Crossed Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification Threshold Crossed Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + + +Check Threshold Crossed Notification Http POST Request Body changeType attribute Is + [Arguments] ${type} + #do nothing + Log do nothing + + +Configure Notification Performance Information Available Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Configure Notification Threshold Crossed Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Configure Notification Forward + [Arguments] ${schema} ${endpoint} ${endpoint_fwd} + Log Creating mock Http POST forward to handle ${schema} + &{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema} + &{notification_fwd}= Create Mock Http Forward ${endpoint_fwd} + Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} + +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/SOL009-NFVMANOPerformanceManagement-API.yaml b/SOL009/NFVMANOPerformanceManagement-API/SOL009-NFVMANOPerformanceManagement-API.yaml new file mode 100644 index 0000000000000000000000000000000000000000..38e44fa0caa6c44bb07896cdcdf429adaeb2d3a4 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/SOL009-NFVMANOPerformanceManagement-API.yaml @@ -0,0 +1,20940 @@ +openapi: 3.0.2 +info: + version: '1.0.0-impl:etsi.org:ETSI_NFV_OpenAPI:1' + title: SOL009 - NFV-MANO Performance Management Interface + description: > + SOL009 - NFV-MANO Performance Management Interface + + IMPORTANT: Please note that this file might be not aligned to the current + version of the ETSI Group Specification it refers to and has not been + approved by the ETSI NFV ISG. In case of discrepancies the published ETSI + Group Specification takes precedence. Please report bugs to + https://forge.etsi.org/bugzilla/buglist.cgi?component=Nfv-Openapis + license: + name: ETSI Forge copyright notice + url: 'https://forge.etsi.org/etsi-forge-copyright-notice.txt' + contact: + name: NFV-SOL WG +externalDocs: + description: ETSI GS NFV-SOL 009 V3.3.1 + url: >- + https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/009/03.03.01_60/gs_NFV-SOL009v030301p.pdf +servers: + - url: 'http://0.0.0.0/nfvmanopm/v1' + description: | + API HTTP Server + - url: 'https://0.0.0.0/nfvmanopm/v1' + description: | + API HTTPS Server +paths: + /api_versions: + parameters: + - name: Version + description: | + Version of the API requested to use when responding to this request. + in: header + required: false + schema: + type: string + - name: Authorization + description: 'The authorization token for the request. Reference: IETF RFC 7235' + in: header + required: false + schema: + type: string + get: + summary: Retrieve API version information + description: > + The GET method reads API version information. This method shall follow + the provisions specified in table 4.6.3.3.3.2-1 for request and response + data structures, and response codes. URI query parameters are not + supported. + responses: + '200': + description: > + 200 OK + + API version information was read successfully. The response body + shall contain 4.4 API version information, as defined in clause + 4.4.1.13. + content: + application/json: + schema: + description: | + This type represents API version information. + type: object + required: + - uriPrefix + - apiVersions + properties: + uriPrefix: + description: > + Specifies the URI prefix for the API, in the following + form {apiRoot}/{apiName}/{apiMajorVersion}/. + type: string + apiVersions: + description: > + Version(s) supported for the API signaled by the uriPrefix + attribute. + type: array + items: + type: object + required: + - version + properties: + version: + description: > + Identifies a supported version. The value of the + version attribute shall be a version identifier as + specified in clause 9.1 (SOL013). + type: string + isDeprecated: + description: > + If such information is available, this attribute + indicates whether use of the version signaled by the + version attribute is deprecated (true) or not + (false). + + A deprecated version is still supported by the API + producer but is recommended not to be used any + longer. When a version is no longer supported, it + does not appear in the response body. + type: boolean + retirementDate: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: The used API version. + schema: + type: string + maximum: 1 + minimum: 1 + '400': + description: > + 400 BAD REQUEST + + 400 code can be returned in the following specified cases, the + specific cause has to be proper specified in the "ProblemDetails" + structure to be returned. + + If the request is malformed or syntactically incorrect (e.g. if the + request URI contains incorrect query parameters or the payload body + contains a syntactically incorrect data structure), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + If the response to a GET request which queries a container resource + would be so big that the performance of the API producer is + adversely affected, and the API producer does not support paging for + the affected resource, it shall respond with this response code. The + "ProblemDetails" structure shall be provided, and should include in + the "detail" attribute more information about the source of the + problem. + + If there is an application error related to the client's input that + cannot be easily mapped to any other HTTP response code ("catch all + error"), the API producer shall respond with this response code. The + "ProblemDetails" structure shall be provided, and shall include in + the "detail" attribute more information about the source of the + problem. + + If the request contains a malformed access token, the API producer + should respond with this response. The details of the error shall be + returned in the WWW Authenticate HTTP header, as defined in IETF RFC + 6750 and IETF RFC 7235. The ProblemDetails structure may be + provided. + + The use of this HTTP error response code described above is + applicable to the use of the OAuth 2.0 for the authorization of API + requests and notifications, as defined in clauses 4.5.3.3 and + 4.5.3.4. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '401': + description: > + 401 UNAUTHORIZED + + If the request contains no access token even though one is required, + or if the request contains an authorization token that is invalid + (e.g. expired or revoked), the API producer should respond with this + response. The details of the error shall be returned in the + WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF + RFC 7235. The ProblemDetails structure may be provided. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '403': + description: > + 403 FORBIDDEN + + If the API consumer is not allowed to perform a particular request + to a particular resource, the API producer shall respond with this + response code. The "ProblemDetails" structure shall be provided. It + should include in the "detail" attribute information about the + source of the problem, and may indicate how to solve it. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '404': + description: > + 404 NOT FOUND + + If the API producer did not find a current representation for the + resource addressed by the URI passed in the request or is not + willing to disclose that one exists, it shall respond with this + response code. The "ProblemDetails" structure may be provided, + including in the "detail" attribute information about the source of + the problem, e.g. a wrong resource URI variable. + + This response code is not appropriate in case the resource addressed + by the URI is a container resource which is designed to contain + child resources, but does not contain any child resource at the time + the request is received. For a GET request to an existing empty + container resource, a typical response contains a 200 OK response + code and a payload body with an empty array. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '405': + description: > + 405 METHOD NOT ALLOWED + + If a particular HTTP method is not supported for a particular + resource, the API producer shall respond with this response code. + The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '406': + description: > + 406 NOT ACCEPTABLE + + If the "Accept" HTTP header does not contain at least one name of a + content type that is acceptable to the API producer, the API + producer shall respond with this response code. The "ProblemDetails" + structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '413': + description: > + 413 PAYLOAD TOO LARGE + + If the payload body of a request is larger than the amount of data + the API producer is willing or able to process, it shall respond + with this response code, following the provisions in IETF RFC 7231 + for the use of the "Retry-After" HTTP header and for closing the + connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '414': + description: > + 414 URI TOO LONG + + If the request URI of a request is longer than the API producer is + willing or able to process, it shall respond with this response + code. This condition can e.g. be caused by passing long queries in + the request URI of a GET request. The "ProblemDetails" structure may + be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '416': + description: | + 416 Range Not Satisfiable + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '422': + description: > + 422 UNPROCESSABLE ENTITY + + If the payload body of a request contains syntactically correct data + (e.g. well-formed JSON) but the data cannot be processed (e.g. + because it fails validation against a schema), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + This error response code is only applicable for methods that have a + request body. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '429': + description: > + 429 TOO MANY REQUESTS + + If the API consumer has sent too many requests in a defined period + of time and the API producer is able to detect that condition ("rate + limiting"), the API producer shall respond with this response code, + following the provisions in IETF RFC 6585 [17] for the use of the + "Retry-After" HTTP header. The "ProblemDetails" structure shall be + provided and shall include in the "detail" attribute more + information about the source of the problem. + + The period of time and allowed number of requests are configured + within the API producer by means outside the scope of the present + document. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '500': + description: > + 500 INTERNAL SERVER ERROR + + If there is an application error not related to the client's input + that cannot be easily mapped to any other HTTP response code ("catch + all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include + in the "detail" attribute more information about the source of the + problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '503': + description: > + 503 SERVICE UNAVAILABLE + + If the API producer encounters an internal overload situation of + itself or of a system it relies on, it should respond with this + response code, following the provisions in IETF RFC 7231 for the use + of the "Retry-After" HTTP header and for the alternative to refuse + the connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '504': + description: > + 504 GATEWAY TIMEOUT + + If the API producer encounters a timeout while waiting for a + response from an upstream server (i.e. a server that the API + producer communicates with when fulfilling a request), it should + respond with this response code. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + /pm_jobs: + post: + description: > + Creates a PM job. + + This method shall follow the provisions specified in the tables + 6.5.3.3.1-1 and 6.5.3.3.1-2 for URI query parameters, request and + response data structures, and response codes. + parameters: + - name: Version + description: | + Version of the API requested to use when responding to this request. + in: header + required: true + schema: + type: string + - name: Accept + description: > + Content-Types that are acceptable for the response. Reference: IETF + RFC 7231. + in: header + required: true + schema: + type: string + - name: Authorization + description: | + The authorization token for the request. Reference: IETF RFC 7235. + in: header + required: false + schema: + type: string + requestBody: + description: | + PM job creation request. + content: + application/json: + schema: + description: | + This type represents a request to create a PM job. + type: object + properties: + objectType: + description: > + Type of measured object. The applicable measured object type + for a measurement is defined in clause 8.2 of ETSI GS + NFV-IFA 031. + type: string + objectInstanceIds: + description: > + Identifiers of the measured object instance for which + performance information is requested to be collected. This + attribute shall contain the identifier of the instance of + the measure object according to their type. See also + definitions in clause 8.2 of ETSI GS NFV-IFA 031. If more + than one identifier is provided, values shall all refer to + measured object instances of the same type, for which the + same criteria is then applicable. + type: array + items: + description: | + An identifier with the intention of being globally unique. + type: string + minItems: 1 + subObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured + object instance for which performance information is + requested to be collected. May be present if a sub-object + is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the + related measured object type. If this attribute is present, + the cardinality of the "objectInstanceIds" attribute shall + be 1. If this attribute is absent and a sub-object is + defined in clause 8.2 of ETSI GS NFV-IFA 031 for the + related measured object type, measurements will be taken + for all sub-object instances of the measured object + instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents collection criteria for PM jobs. + type: object + properties: + performanceMetric: + description: > + This defines the types of performance metrics for the + specified measured object(s). This attribute’s value + shall contain the related "Measurement Name" values as + defined in clause 8.4 of ETSI GS NFV-IFA 031. At least + one of the two attributes (performance metric or group) + shall be present. + type: array + items: + type: string + performanceMetricGroup: + description: > + Group of performance metrics. A metric group is a + pre-defined list of metrics, known to the producer that + it can decompose to individual metrics. This + attribute’s value shall contain the related + "Measurement Group" values as defined in clause 8.4 of + ETSI GS NFV-IFA 031. At least one of the two attributes + (performance metric or group) shall be present. + type: array + items: + type: string + collectionPeriod: + description: > + Specifies the periodicity at which the producer will + collect performance information. The unit shall be + seconds. + + At the end of each reportingPeriod, the producer will + inform the API consumer about availability of the + performance data collected for each completed + collection period during this reportingPeriod. The + reportingPeriod should be equal to or a multiple of the + collectionPeriod. In the latter case, the performance + data for the collection periods within one reporting + period are reported together. + + In particular when choosing short collection and + reporting periods, the number of PM jobs that can be + supported depends on the capability of the producing + entity. + type: integer + reportingPeriod: + description: > + Specifies the periodicity at which the producer will + report to the API consumer about performance + information. The unit shall be seconds. + + At the end of each reportingPeriod, the producer will + inform the API consumer about availability of the + performance data collected for each completed + collection period during this reportingPeriod. The + reportingPeriod should be equal to or a multiple of the + collectionPeriod. In the latter case, the performance + data for the collection periods within one reporting + period are reported together. + + In particular when choosing short collection and + reporting periods, the number of PM jobs that can be + supported depends on the capability of the producing + entity. + type: integer + reportingBoundary: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + required: + - collectionPeriod + - reportingPeriod + required: + - objectType + - objectInstanceIds + - criteria + required: true + responses: + '201': + description: > + 201 CREATED + + Shall be returned when the PM job has been created successfully. + + The response body shall contain a representation of the created + "Individual PM job" resource, as defined in clause 6.6.2.7. + + The HTTP response shall include a "Location" HTTP header that + points to the created "Individual PM job" resource. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: | + This type represents a PM job. + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + objectType: + description: > + Type of measured object. The applicable measured object + type for a measurement is defined in clause 8.2 of ETSI + GS NFV-IFA 031. + type: string + objectInstanceIds: + description: > + Identifiers of the measured object instance for which + performance information is collected. This attribute + shall contain the identifier of the instance of the + measure object according to their type. See also + definitions in clause 8.2 of ETSI GS NFV-IFA 031. + type: array + items: + description: > + An identifier with the intention of being globally + unique. + type: string + minItems: 1 + subObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured + object instance for which performance information is + requested to be collected. May be present if a sub-object + is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the + related measured object type. If this attribute is + present, the cardinality of the "objectInstanceIds" + attribute shall be 1. If this attribute is absent and a + sub-object is defined in clause 8.2 of ETSI GS NFV-IFA + 031 for the related measured object type, measurements + will be taken for all sub-object instances of the + measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents collection criteria for PM jobs. + type: object + properties: + performanceMetric: + description: > + This defines the types of performance metrics for the + specified measured object(s). This attribute’s value + shall contain the related "Measurement Name" values + as defined in clause 8.4 of ETSI GS NFV-IFA 031. At + least one of the two attributes (performance metric or + group) shall be present. + type: array + items: + type: string + performanceMetricGroup: + description: > + Group of performance metrics. A metric group is a + pre-defined list of metrics, known to the producer + that it can decompose to individual metrics. This + attribute’s value shall contain the related + "Measurement Group" values as defined in clause 8.4 of + ETSI GS NFV-IFA 031. At least one of the two + attributes (performance metric or group) shall be + present. + type: array + items: + type: string + collectionPeriod: + description: > + Specifies the periodicity at which the producer will + collect performance information. The unit shall be + seconds. + + At the end of each reportingPeriod, the producer will + inform the API consumer about availability of the + performance data collected for each completed + collection period during this reportingPeriod. The + reportingPeriod should be equal to or a multiple of + the collectionPeriod. In the latter case, the + performance data for the collection periods within one + reporting period are reported together. + + In particular when choosing short collection and + reporting periods, the number of PM jobs that can be + supported depends on the capability of the producing + entity. + type: integer + reportingPeriod: + description: > + Specifies the periodicity at which the producer will + report to the API consumer about performance + information. The unit shall be seconds. + + At the end of each reportingPeriod, the producer will + inform the API consumer about availability of the + performance data collected for each completed + collection period during this reportingPeriod. The + reportingPeriod should be equal to or a multiple of + the collectionPeriod. In the latter case, the + performance data for the collection periods within one + reporting period are reported together. + + In particular when choosing short collection and + reporting periods, the number of PM jobs that can be + supported depends on the capability of the producing + entity. + type: integer + reportingBoundary: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + required: + - collectionPeriod + - reportingPeriod + reports: + description: > + Information about available reports collected by this PM + job. + type: array + items: + type: object + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + readyTime: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + expiryTime: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + fileSize: + description: | + Unsigned integer + type: number + required: + - href + - readyTime + _links: + description: | + Links for this resource. + type: object + properties: + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + objects: + description: > + Links to resources representing the measured object + instances for which performance information is + collected. Shall be present if the measured object + instance information is accessible as a resource. + type: array + items: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - self + required: + - id + - objectType + - objectInstanceIds + - criteria + - _links + '400': + description: > + 400 BAD REQUEST + + 400 code can be returned in the following specified cases, the + specific cause has to be proper specified in the "ProblemDetails" + structure to be returned. + + If the request is malformed or syntactically incorrect (e.g. if the + request URI contains incorrect query parameters or the payload body + contains a syntactically incorrect data structure), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + If the response to a GET request which queries a container resource + would be so big that the performance of the API producer is + adversely affected, and the API producer does not support paging for + the affected resource, it shall respond with this response code. The + "ProblemDetails" structure shall be provided, and should include in + the "detail" attribute more information about the source of the + problem. + + If there is an application error related to the client's input that + cannot be easily mapped to any other HTTP response code ("catch all + error"), the API producer shall respond with this response code. The + "ProblemDetails" structure shall be provided, and shall include in + the "detail" attribute more information about the source of the + problem. + + If the request contains a malformed access token, the API producer + should respond with this response. The details of the error shall be + returned in the WWW Authenticate HTTP header, as defined in IETF RFC + 6750 and IETF RFC 7235. The ProblemDetails structure may be + provided. + + The use of this HTTP error response code described above is + applicable to the use of the OAuth 2.0 for the authorization of API + requests and notifications, as defined in clauses 4.5.3.3 and + 4.5.3.4. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '401': + description: > + 401 UNAUTHORIZED + + If the request contains no access token even though one is required, + or if the request contains an authorization token that is invalid + (e.g. expired or revoked), the API producer should respond with this + response. The details of the error shall be returned in the + WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF + RFC 7235. The ProblemDetails structure may be provided. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '403': + description: > + 403 FORBIDDEN + + If the API consumer is not allowed to perform a particular request + to a particular resource, the API producer shall respond with this + response code. The "ProblemDetails" structure shall be provided. It + should include in the "detail" attribute information about the + source of the problem, and may indicate how to solve it. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '404': + description: > + 404 NOT FOUND + + If the API producer did not find a current representation for the + resource addressed by the URI passed in the request or is not + willing to disclose that one exists, it shall respond with this + response code. The "ProblemDetails" structure may be provided, + including in the "detail" attribute information about the source of + the problem, e.g. a wrong resource URI variable. + + This response code is not appropriate in case the resource addressed + by the URI is a container resource which is designed to contain + child resources, but does not contain any child resource at the time + the request is received. For a GET request to an existing empty + container resource, a typical response contains a 200 OK response + code and a payload body with an empty array. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '405': + description: > + 405 METHOD NOT ALLOWED + + If a particular HTTP method is not supported for a particular + resource, the API producer shall respond with this response code. + The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '406': + description: > + 406 NOT ACCEPTABLE + + If the "Accept" HTTP header does not contain at least one name of a + content type that is acceptable to the API producer, the API + producer shall respond with this response code. The "ProblemDetails" + structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '422': + description: > + 422 UNPROCESSABLE ENTITY + + If the payload body of a request contains syntactically correct data + (e.g. well-formed JSON) but the data cannot be processed (e.g. + because it fails validation against a schema), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + This error response code is only applicable for methods that have a + request body. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '500': + description: > + 500 INTERNAL SERVER ERROR + + If there is an application error not related to the client's input + that cannot be easily mapped to any other HTTP response code ("catch + all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include + in the "detail" attribute more information about the source of the + problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '503': + description: > + 503 SERVICE UNAVAILABLE + + If the API producer encounters an internal overload situation of + itself or of a system it relies on, it should respond with this + response code, following the provisions in IETF RFC 7231 for the use + of the "Retry-After" HTTP header and for the alternative to refuse + the connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '504': + description: > + 504 GATEWAY TIMEOUT + + If the API producer encounters a timeout while waiting for a + response from an upstream server (i.e. a server that the API + producer communicates with when fulfilling a request), it should + respond with this response code. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + get: + description: | + The client can use this method to retrieve information about PM jobs. + parameters: + - name: filter + description: > + Attribute-based filtering expression according to clause 5.2 of + ETSI GS NFV-SOL 013. + + The NFV-MANO functional entity shall support receiving this + parameter as part of the URI query string. The API consumer may + supply this parameter. + + All attribute names that appear in the PmJob and in data types + referenced from it shall be supported by the NFV-MANO functional + entity in the expression. + in: query + required: false + schema: + type: string + - name: all_fields + description: > + Include all complex attributes in the response. See clause 5.3 of + ETSI GS NFV-SOL 013. The NFV-MANO functional entity shall support + this parameter. + in: query + required: false + schema: + type: string + - name: fields + description: > + Complex attributes to be included into the response. See clause 5.3 + of ETSI GS NFV-SOL 013 for details. The NFV-MANO functional entity + should support this parameter. + in: query + required: false + schema: + type: string + - name: exclude_fields + description: > + Complex attributes to be excluded from the response. See clause 5.3 + of ETSI GS NFV-SOL 013 for details. The NFV-MANO functional entity + should support this parameter. + in: query + required: false + schema: + type: string + - name: exclude_default + description: > + Indicates to exclude the following complex attributes from the + response. See clause 5.3 of ETSI GS NFV-SOL 013 for details. The + NFV-MANO functional entity shall support this parameter. + + The following attributes shall be excluded from the PmJob structure + in the response body if this parameter is provided, or none of the + parameters "all_fields," "fields", "exclude_fields", + "exclude_default" are provided: - none + in: query + required: false + schema: + type: string + - name: nextpage_opaque_marker + description: > + Marker to obtain the next page of a paged response. Shall be + supported by the NFV-MANO functional entity if the entity supports + alternative 2 (paging) according to clause 5.4.2.1 of ETSI GS + NFV-SOL 013 for this resource. + in: query + required: false + schema: + type: string + - name: Version + description: | + Version of the API requested to use when responding to this request. + in: header + required: true + schema: + type: string + - name: Accept + description: > + Content-Types that are acceptable for the response. Reference: IETF + RFC 7231. + in: header + required: true + schema: + type: string + - name: Authorization + description: | + The authorization token for the request. Reference: IETF RFC 7235. + in: header + required: false + schema: + type: string + responses: + '200': + description: > + 200 OK + + Shall be returned when information about zero or more PM jobs has + been queried successfully. + + The response body shall contain in an array the representations of + zero or more PM jobs, as defined in clause 6.6.2.7. + + If the "filter" URI parameter or one of the "all_fields", "fields" + (if supported), "exclude_fields" (if supported) or + "exclude_default" URI parameters was supplied in the request, the + data in the response body shall have been transformed according to + the rules specified in clauses 5.2.2 and 5.3.2 of ETSI GS NFV-SOL + 013, respectively. + + If the NFV-MANO functional entity supports alternative 2 (paging) + according to clause 5.4.2.1 of ETSI GS NFV-SOL 013 for this + resource, inclusion of the Link HTTP header in this response shall + follow the provisions in clause 5.4.2.3 of ETSI GS NFV-SOL 013 . + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + Link: + description: > + Reference to other resources. Link HTTP header in this response + shall follow the provisions in clause 5.4.2.3 of ETSI GS NFV-SOL + 013. + schema: + type: string + minimum: 0 + maximum: 1 + content: + application/json: + schema: + type: array + items: + description: | + This type represents a PM job. + type: object + properties: + id: + description: > + An identifier with the intention of being globally + unique. + type: string + objectType: + description: > + Type of measured object. The applicable measured object + type for a measurement is defined in clause 8.2 of ETSI + GS NFV-IFA 031. + type: string + objectInstanceIds: + description: > + Identifiers of the measured object instance for which + performance information is collected. This attribute + shall contain the identifier of the instance of the + measure object according to their type. See also + definitions in clause 8.2 of ETSI GS NFV-IFA 031. + type: array + items: + description: > + An identifier with the intention of being globally + unique. + type: string + minItems: 1 + subObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured + object instance for which performance information is + requested to be collected. May be present if a + sub-object is defined in clause 8.2 of ETSI GS NFV-IFA + 031 for the related measured object type. If this + attribute is present, the cardinality of the + "objectInstanceIds" attribute shall be 1. If this + attribute is absent and a sub-object is defined in + clause 8.2 of ETSI GS NFV-IFA 031 for the related + measured object type, measurements will be taken for + all sub-object instances of the measured object + instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents collection criteria for PM jobs. + type: object + properties: + performanceMetric: + description: > + This defines the types of performance metrics for + the specified measured object(s). This attribute’s + value shall contain the related "Measurement Name" + values as defined in clause 8.4 of ETSI GS NFV-IFA + 031. At least one of the two attributes + (performance metric or group) shall be present. + type: array + items: + type: string + performanceMetricGroup: + description: > + Group of performance metrics. A metric group is a + pre-defined list of metrics, known to the producer + that it can decompose to individual metrics. This + attribute’s value shall contain the related + "Measurement Group" values as defined in clause 8.4 + of ETSI GS NFV-IFA 031. At least one of the two + attributes (performance metric or group) shall be + present. + type: array + items: + type: string + collectionPeriod: + description: > + Specifies the periodicity at which the producer will + collect performance information. The unit shall be + seconds. + + At the end of each reportingPeriod, the producer + will inform the API consumer about availability of + the performance data collected for each completed + collection period during this reportingPeriod. The + reportingPeriod should be equal to or a multiple of + the collectionPeriod. In the latter case, the + performance data for the collection periods within + one reporting period are reported together. + + In particular when choosing short collection and + reporting periods, the number of PM jobs that can + be supported depends on the capability of the + producing entity. + type: integer + reportingPeriod: + description: > + Specifies the periodicity at which the producer will + report to the API consumer about performance + information. The unit shall be seconds. + + At the end of each reportingPeriod, the producer + will inform the API consumer about availability of + the performance data collected for each completed + collection period during this reportingPeriod. The + reportingPeriod should be equal to or a multiple of + the collectionPeriod. In the latter case, the + performance data for the collection periods within + one reporting period are reported together. + + In particular when choosing short collection and + reporting periods, the number of PM jobs that can + be supported depends on the capability of the + producing entity. + type: integer + reportingBoundary: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + required: + - collectionPeriod + - reportingPeriod + reports: + description: > + Information about available reports collected by this PM + job. + type: array + items: + type: object + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + readyTime: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + expiryTime: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + fileSize: + description: | + Unsigned integer + type: number + required: + - href + - readyTime + _links: + description: | + Links for this resource. + type: object + properties: + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + objects: + description: > + Links to resources representing the measured object + instances for which performance information is + collected. Shall be present if the measured object + instance information is accessible as a resource. + type: array + items: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - self + required: + - id + - objectType + - objectInstanceIds + - criteria + - _links + '400': + description: | + 400 BAD REQUEST + Shall be returned upon the following errors: + - Invalid attribute-based filtering expression. + The response body shall contain a ProblemDetails structure, in which + the "detail" attribute should convey more information about the error. + - Invalid attribute selector. + The response body shall contain a ProblemDetails structure, in which + the "detail" attribute should convey more information about the error. + - Response too big. + If the NFV-MANO functional entity supports alternative N°1 (error) + according to clause 5.4.2.1 of ETSI GS NFV-SOL 013 for this resource, + this error response shall follow the provisions in clause 5.4.2.2 of + ETSI GS NFV-SOL 013. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '401': + description: > + 401 UNAUTHORIZED + + If the request contains no access token even though one is required, + or if the request contains an authorization token that is invalid + (e.g. expired or revoked), the API producer should respond with this + response. The details of the error shall be returned in the + WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF + RFC 7235. The ProblemDetails structure may be provided. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '403': + description: > + 403 FORBIDDEN + + If the API consumer is not allowed to perform a particular request + to a particular resource, the API producer shall respond with this + response code. The "ProblemDetails" structure shall be provided. It + should include in the "detail" attribute information about the + source of the problem, and may indicate how to solve it. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '404': + description: > + 404 NOT FOUND + + If the API producer did not find a current representation for the + resource addressed by the URI passed in the request or is not + willing to disclose that one exists, it shall respond with this + response code. The "ProblemDetails" structure may be provided, + including in the "detail" attribute information about the source of + the problem, e.g. a wrong resource URI variable. + + This response code is not appropriate in case the resource addressed + by the URI is a container resource which is designed to contain + child resources, but does not contain any child resource at the time + the request is received. For a GET request to an existing empty + container resource, a typical response contains a 200 OK response + code and a payload body with an empty array. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '405': + description: > + 405 METHOD NOT ALLOWED + + If a particular HTTP method is not supported for a particular + resource, the API producer shall respond with this response code. + The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '406': + description: > + 406 NOT ACCEPTABLE + + If the "Accept" HTTP header does not contain at least one name of a + content type that is acceptable to the API producer, the API + producer shall respond with this response code. The "ProblemDetails" + structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '422': + description: > + 422 UNPROCESSABLE ENTITY + + If the payload body of a request contains syntactically correct data + (e.g. well-formed JSON) but the data cannot be processed (e.g. + because it fails validation against a schema), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + This error response code is only applicable for methods that have a + request body. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '500': + description: > + 500 INTERNAL SERVER ERROR + + If there is an application error not related to the client's input + that cannot be easily mapped to any other HTTP response code ("catch + all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include + in the "detail" attribute more information about the source of the + problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '503': + description: > + 503 SERVICE UNAVAILABLE + + If the API producer encounters an internal overload situation of + itself or of a system it relies on, it should respond with this + response code, following the provisions in IETF RFC 7231 for the use + of the "Retry-After" HTTP header and for the alternative to refuse + the connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '504': + description: > + 504 GATEWAY TIMEOUT + + If the API producer encounters a timeout while waiting for a + response from an upstream server (i.e. a server that the API + producer communicates with when fulfilling a request), it should + respond with this response code. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '/pm_jobs/{pmJobId}': + parameters: + - name: pmJobId + in: path + description: Identifier of the PM Job + required: true + schema: + description: | + An identifier with the intention of being globally unique. + type: string + get: + description: | + The client can use this method for reading an individual PM job. + parameters: + - name: Version + description: | + Version of the API requested to use when responding to this request. + in: header + required: true + schema: + type: string + - name: Accept + description: > + Content-Types that are acceptable for the response. Reference: IETF + RFC 7231. + in: header + required: true + schema: + type: string + - name: Authorization + description: | + The authorization token for the request. Reference: IETF RFC 7235. + in: header + required: false + schema: + type: string + responses: + '200': + description: > + 200 OK + + Shall be returned when information about an individual PM job has + been read successfully. + + The response body shall contain a representation of the "Individual + PM job" resource, as defined in clause 6.6.2.7. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: | + This type represents a PM job. + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + objectType: + description: > + Type of measured object. The applicable measured object + type for a measurement is defined in clause 8.2 of ETSI + GS NFV-IFA 031. + type: string + objectInstanceIds: + description: > + Identifiers of the measured object instance for which + performance information is collected. This attribute + shall contain the identifier of the instance of the + measure object according to their type. See also + definitions in clause 8.2 of ETSI GS NFV-IFA 031. + type: array + items: + description: > + An identifier with the intention of being globally + unique. + type: string + minItems: 1 + subObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured + object instance for which performance information is + requested to be collected. May be present if a sub-object + is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the + related measured object type. If this attribute is + present, the cardinality of the "objectInstanceIds" + attribute shall be 1. If this attribute is absent and a + sub-object is defined in clause 8.2 of ETSI GS NFV-IFA + 031 for the related measured object type, measurements + will be taken for all sub-object instances of the + measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents collection criteria for PM jobs. + type: object + properties: + performanceMetric: + description: > + This defines the types of performance metrics for the + specified measured object(s). This attribute’s value + shall contain the related "Measurement Name" values + as defined in clause 8.4 of ETSI GS NFV-IFA 031. At + least one of the two attributes (performance metric or + group) shall be present. + type: array + items: + type: string + performanceMetricGroup: + description: > + Group of performance metrics. A metric group is a + pre-defined list of metrics, known to the producer + that it can decompose to individual metrics. This + attribute’s value shall contain the related + "Measurement Group" values as defined in clause 8.4 of + ETSI GS NFV-IFA 031. At least one of the two + attributes (performance metric or group) shall be + present. + type: array + items: + type: string + collectionPeriod: + description: > + Specifies the periodicity at which the producer will + collect performance information. The unit shall be + seconds. + + At the end of each reportingPeriod, the producer will + inform the API consumer about availability of the + performance data collected for each completed + collection period during this reportingPeriod. The + reportingPeriod should be equal to or a multiple of + the collectionPeriod. In the latter case, the + performance data for the collection periods within one + reporting period are reported together. + + In particular when choosing short collection and + reporting periods, the number of PM jobs that can be + supported depends on the capability of the producing + entity. + type: integer + reportingPeriod: + description: > + Specifies the periodicity at which the producer will + report to the API consumer about performance + information. The unit shall be seconds. + + At the end of each reportingPeriod, the producer will + inform the API consumer about availability of the + performance data collected for each completed + collection period during this reportingPeriod. The + reportingPeriod should be equal to or a multiple of + the collectionPeriod. In the latter case, the + performance data for the collection periods within one + reporting period are reported together. + + In particular when choosing short collection and + reporting periods, the number of PM jobs that can be + supported depends on the capability of the producing + entity. + type: integer + reportingBoundary: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + required: + - collectionPeriod + - reportingPeriod + reports: + description: > + Information about available reports collected by this PM + job. + type: array + items: + type: object + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + readyTime: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + expiryTime: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + fileSize: + description: | + Unsigned integer + type: number + required: + - href + - readyTime + _links: + description: | + Links for this resource. + type: object + properties: + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + objects: + description: > + Links to resources representing the measured object + instances for which performance information is + collected. Shall be present if the measured object + instance information is accessible as a resource. + type: array + items: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - self + required: + - id + - objectType + - objectInstanceIds + - criteria + - _links + '400': + description: > + 400 BAD REQUEST + + 400 code can be returned in the following specified cases, the + specific cause has to be proper specified in the "ProblemDetails" + structure to be returned. + + If the request is malformed or syntactically incorrect (e.g. if the + request URI contains incorrect query parameters or the payload body + contains a syntactically incorrect data structure), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + If the response to a GET request which queries a container resource + would be so big that the performance of the API producer is + adversely affected, and the API producer does not support paging for + the affected resource, it shall respond with this response code. The + "ProblemDetails" structure shall be provided, and should include in + the "detail" attribute more information about the source of the + problem. + + If there is an application error related to the client's input that + cannot be easily mapped to any other HTTP response code ("catch all + error"), the API producer shall respond with this response code. The + "ProblemDetails" structure shall be provided, and shall include in + the "detail" attribute more information about the source of the + problem. + + If the request contains a malformed access token, the API producer + should respond with this response. The details of the error shall be + returned in the WWW Authenticate HTTP header, as defined in IETF RFC + 6750 and IETF RFC 7235. The ProblemDetails structure may be + provided. + + The use of this HTTP error response code described above is + applicable to the use of the OAuth 2.0 for the authorization of API + requests and notifications, as defined in clauses 4.5.3.3 and + 4.5.3.4. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '401': + description: > + 401 UNAUTHORIZED + + If the request contains no access token even though one is required, + or if the request contains an authorization token that is invalid + (e.g. expired or revoked), the API producer should respond with this + response. The details of the error shall be returned in the + WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF + RFC 7235. The ProblemDetails structure may be provided. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '403': + description: > + 403 FORBIDDEN + + If the API consumer is not allowed to perform a particular request + to a particular resource, the API producer shall respond with this + response code. The "ProblemDetails" structure shall be provided. It + should include in the "detail" attribute information about the + source of the problem, and may indicate how to solve it. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '404': + description: > + 404 NOT FOUND + + If the API producer did not find a current representation for the + resource addressed by the URI passed in the request or is not + willing to disclose that one exists, it shall respond with this + response code. The "ProblemDetails" structure may be provided, + including in the "detail" attribute information about the source of + the problem, e.g. a wrong resource URI variable. + + This response code is not appropriate in case the resource addressed + by the URI is a container resource which is designed to contain + child resources, but does not contain any child resource at the time + the request is received. For a GET request to an existing empty + container resource, a typical response contains a 200 OK response + code and a payload body with an empty array. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '405': + description: > + 405 METHOD NOT ALLOWED + + If a particular HTTP method is not supported for a particular + resource, the API producer shall respond with this response code. + The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '406': + description: > + 406 NOT ACCEPTABLE + + If the "Accept" HTTP header does not contain at least one name of a + content type that is acceptable to the API producer, the API + producer shall respond with this response code. The "ProblemDetails" + structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '422': + description: > + 422 UNPROCESSABLE ENTITY + + If the payload body of a request contains syntactically correct data + (e.g. well-formed JSON) but the data cannot be processed (e.g. + because it fails validation against a schema), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + This error response code is only applicable for methods that have a + request body. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '500': + description: > + 500 INTERNAL SERVER ERROR + + If there is an application error not related to the client's input + that cannot be easily mapped to any other HTTP response code ("catch + all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include + in the "detail" attribute more information about the source of the + problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '503': + description: > + 503 SERVICE UNAVAILABLE + + If the API producer encounters an internal overload situation of + itself or of a system it relies on, it should respond with this + response code, following the provisions in IETF RFC 7231 for the use + of the "Retry-After" HTTP header and for the alternative to refuse + the connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '504': + description: > + 504 GATEWAY TIMEOUT + + If the API producer encounters a timeout while waiting for a + response from an upstream server (i.e. a server that the API + producer communicates with when fulfilling a request), it should + respond with this response code. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + delete: + description: | + This method terminates an individual PM job. + parameters: + - name: Version + description: | + Version of the API requested to use when responding to this request. + in: header + required: true + schema: + type: string + - name: Accept + description: > + Content-Types that are acceptable for the response. Reference: IETF + RFC 7231. + in: header + required: true + schema: + type: string + - name: Authorization + description: | + The authorization token for the request. Reference: IETF RFC 7235. + in: header + required: false + schema: + type: string + responses: + '204': + description: | + 204 NO CONTENT + Shall be returned when the PM job has been deleted successfully. + The response body shall be empty. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + '400': + description: > + 400 BAD REQUEST + + 400 code can be returned in the following specified cases, the + specific cause has to be proper specified in the "ProblemDetails" + structure to be returned. + + If the request is malformed or syntactically incorrect (e.g. if the + request URI contains incorrect query parameters or the payload body + contains a syntactically incorrect data structure), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + If the response to a GET request which queries a container resource + would be so big that the performance of the API producer is + adversely affected, and the API producer does not support paging for + the affected resource, it shall respond with this response code. The + "ProblemDetails" structure shall be provided, and should include in + the "detail" attribute more information about the source of the + problem. + + If there is an application error related to the client's input that + cannot be easily mapped to any other HTTP response code ("catch all + error"), the API producer shall respond with this response code. The + "ProblemDetails" structure shall be provided, and shall include in + the "detail" attribute more information about the source of the + problem. + + If the request contains a malformed access token, the API producer + should respond with this response. The details of the error shall be + returned in the WWW Authenticate HTTP header, as defined in IETF RFC + 6750 and IETF RFC 7235. The ProblemDetails structure may be + provided. + + The use of this HTTP error response code described above is + applicable to the use of the OAuth 2.0 for the authorization of API + requests and notifications, as defined in clauses 4.5.3.3 and + 4.5.3.4. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '401': + description: > + 401 UNAUTHORIZED + + If the request contains no access token even though one is required, + or if the request contains an authorization token that is invalid + (e.g. expired or revoked), the API producer should respond with this + response. The details of the error shall be returned in the + WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF + RFC 7235. The ProblemDetails structure may be provided. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '403': + description: > + 403 FORBIDDEN + + If the API consumer is not allowed to perform a particular request + to a particular resource, the API producer shall respond with this + response code. The "ProblemDetails" structure shall be provided. It + should include in the "detail" attribute information about the + source of the problem, and may indicate how to solve it. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '404': + description: > + 404 NOT FOUND + + If the API producer did not find a current representation for the + resource addressed by the URI passed in the request or is not + willing to disclose that one exists, it shall respond with this + response code. The "ProblemDetails" structure may be provided, + including in the "detail" attribute information about the source of + the problem, e.g. a wrong resource URI variable. + + This response code is not appropriate in case the resource addressed + by the URI is a container resource which is designed to contain + child resources, but does not contain any child resource at the time + the request is received. For a GET request to an existing empty + container resource, a typical response contains a 200 OK response + code and a payload body with an empty array. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '405': + description: > + 405 METHOD NOT ALLOWED + + If a particular HTTP method is not supported for a particular + resource, the API producer shall respond with this response code. + The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '406': + description: > + 406 NOT ACCEPTABLE + + If the "Accept" HTTP header does not contain at least one name of a + content type that is acceptable to the API producer, the API + producer shall respond with this response code. The "ProblemDetails" + structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '422': + description: > + 422 UNPROCESSABLE ENTITY + + If the payload body of a request contains syntactically correct data + (e.g. well-formed JSON) but the data cannot be processed (e.g. + because it fails validation against a schema), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + This error response code is only applicable for methods that have a + request body. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '500': + description: > + 500 INTERNAL SERVER ERROR + + If there is an application error not related to the client's input + that cannot be easily mapped to any other HTTP response code ("catch + all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include + in the "detail" attribute more information about the source of the + problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '503': + description: > + 503 SERVICE UNAVAILABLE + + If the API producer encounters an internal overload situation of + itself or of a system it relies on, it should respond with this + response code, following the provisions in IETF RFC 7231 for the use + of the "Retry-After" HTTP header and for the alternative to refuse + the connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '504': + description: > + 504 GATEWAY TIMEOUT + + If the API producer encounters a timeout while waiting for a + response from an upstream server (i.e. a server that the API + producer communicates with when fulfilling a request), it should + respond with this response code. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '/pm_jobs/{pmJobId}/reports/{reportId}': + parameters: + - name: pmJobId + in: path + description: Identifier of the PM Job + required: true + schema: + description: | + An identifier with the intention of being globally unique. + type: string + - name: reportId + in: path + description: Identifier of the PM report + required: true + schema: + description: | + An identifier with the intention of being globally unique. + type: string + get: + description: > + The client can use this method for reading an individual performance + report. + parameters: + - name: Version + description: | + Version of the API requested to use when responding to this request. + in: header + required: true + schema: + type: string + - name: Accept + description: > + Content-Types that are acceptable for the response. Reference: IETF + RFC 7231. + in: header + required: true + schema: + type: string + - name: Authorization + description: | + The authorization token for the request. Reference: IETF RFC 7235. + in: header + required: false + schema: + type: string + responses: + '200': + description: > + 200 OK + + Shall be returned when information of an individual performance + report has been read successfully. + + The response body shall contain a representation of the "Individual + performance report" resource, as defined in clause 6.6.2.10. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: > + This type defines the format of a performance report provided + by the NFV-MANO functional entity to the API consumer as a + result of collecting performance information as part of a PM + job. + type: object + properties: + entries: + description: > + List of performance information entries. Each performance + report entry is for a given metric of a given object + (i.e. measured object instance) corresponding to the + related measured object types, but can include multiple + collected values. + type: array + items: + type: object + properties: + objectType: + description: > + Type of measured object. The applicable measured + object type for a measurement is defined in clause + 8.2 of ETSI GS NFV-IFA 031. + type: string + objectInstanceId: + description: > + This type represents the identifier to reference a + managed object of a particular type. + type: object + properties: + type: + description: > + Indicates the type of managed object. Permitted + values: + - MANO_ENTITY + - MANO_SERVICE + - MANO_SERVICE_IF + - CONSUMED_MANO_IF + - MANO_ENTITY_COMPONENT + + The "MANO_ENTITY COMPONENT" is only applicable + if attribute "manoEntityComponents" in + "ManoEntity" is supported by the API producer. + 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. + 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.. + type: string + required: + - type + - objectId + subObjectInstanceId: + 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.. + type: string + performanceMetric: + description: > + Name of the metric collected. This attribute shall + contain the related "Measurement Name" value as + defined in clause 8.4 of ETSI GS NFV-IFA 031. + type: string + performanceValues: + description: > + List of performance values with associated + timestamp. + type: array + items: + type: object + properties: + timeStamp: + description: > + Date-time stamp. Representation: String + formatted according to IETF RFC 3339. + type: string + format: date-time + value: + description: > + Value of the metric collected. The type of + this attribute shall correspond to the + related "Measurement Unit" as defined in + clause 8.4 of ETSI GS NFV-IFA 031. + context: + 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 keyvalue + pairs is represented as an object. It shall + comply with the provisions defined in clause 4 + of IETF RFC 8259. In the following example, a + list of key-value pairs with four keys + ("aString", "aNumber", "anArray" and + "anObject") is provided to illustrate that the + values associated with different keys can be + of different type. + type: object + required: + - timeStamp + - value + minItems: 1 + required: + - objectType + - objectInstanceId + - performanceMetric + - performanceValues + minItems: 1 + required: + - entries + '400': + description: > + 400 BAD REQUEST + + 400 code can be returned in the following specified cases, the + specific cause has to be proper specified in the "ProblemDetails" + structure to be returned. + + If the request is malformed or syntactically incorrect (e.g. if the + request URI contains incorrect query parameters or the payload body + contains a syntactically incorrect data structure), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + If the response to a GET request which queries a container resource + would be so big that the performance of the API producer is + adversely affected, and the API producer does not support paging for + the affected resource, it shall respond with this response code. The + "ProblemDetails" structure shall be provided, and should include in + the "detail" attribute more information about the source of the + problem. + + If there is an application error related to the client's input that + cannot be easily mapped to any other HTTP response code ("catch all + error"), the API producer shall respond with this response code. The + "ProblemDetails" structure shall be provided, and shall include in + the "detail" attribute more information about the source of the + problem. + + If the request contains a malformed access token, the API producer + should respond with this response. The details of the error shall be + returned in the WWW Authenticate HTTP header, as defined in IETF RFC + 6750 and IETF RFC 7235. The ProblemDetails structure may be + provided. + + The use of this HTTP error response code described above is + applicable to the use of the OAuth 2.0 for the authorization of API + requests and notifications, as defined in clauses 4.5.3.3 and + 4.5.3.4. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '401': + description: > + 401 UNAUTHORIZED + + If the request contains no access token even though one is required, + or if the request contains an authorization token that is invalid + (e.g. expired or revoked), the API producer should respond with this + response. The details of the error shall be returned in the + WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF + RFC 7235. The ProblemDetails structure may be provided. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '403': + description: > + 403 FORBIDDEN + + If the API consumer is not allowed to perform a particular request + to a particular resource, the API producer shall respond with this + response code. The "ProblemDetails" structure shall be provided. It + should include in the "detail" attribute information about the + source of the problem, and may indicate how to solve it. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '404': + description: > + 404 NOT FOUND + + If the API producer did not find a current representation for the + resource addressed by the URI passed in the request or is not + willing to disclose that one exists, it shall respond with this + response code. The "ProblemDetails" structure may be provided, + including in the "detail" attribute information about the source of + the problem, e.g. a wrong resource URI variable. + + This response code is not appropriate in case the resource addressed + by the URI is a container resource which is designed to contain + child resources, but does not contain any child resource at the time + the request is received. For a GET request to an existing empty + container resource, a typical response contains a 200 OK response + code and a payload body with an empty array. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '405': + description: > + 405 METHOD NOT ALLOWED + + If a particular HTTP method is not supported for a particular + resource, the API producer shall respond with this response code. + The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '406': + description: > + 406 NOT ACCEPTABLE + + If the "Accept" HTTP header does not contain at least one name of a + content type that is acceptable to the API producer, the API + producer shall respond with this response code. The "ProblemDetails" + structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '422': + description: > + 422 UNPROCESSABLE ENTITY + + If the payload body of a request contains syntactically correct data + (e.g. well-formed JSON) but the data cannot be processed (e.g. + because it fails validation against a schema), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + This error response code is only applicable for methods that have a + request body. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '500': + description: > + 500 INTERNAL SERVER ERROR + + If there is an application error not related to the client's input + that cannot be easily mapped to any other HTTP response code ("catch + all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include + in the "detail" attribute more information about the source of the + problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '503': + description: > + 503 SERVICE UNAVAILABLE + + If the API producer encounters an internal overload situation of + itself or of a system it relies on, it should respond with this + response code, following the provisions in IETF RFC 7231 for the use + of the "Retry-After" HTTP header and for the alternative to refuse + the connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '504': + description: > + 504 GATEWAY TIMEOUT + + If the API producer encounters a timeout while waiting for a + response from an upstream server (i.e. a server that the API + producer communicates with when fulfilling a request), it should + respond with this response code. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + /thresholds: + post: + description: | + The POST method can be used by the client to create a threshold. + parameters: + - name: Version + description: | + Version of the API requested to use when responding to this request. + in: header + required: true + schema: + type: string + - name: Accept + description: > + Content-Types that are acceptable for the response. Reference: IETF + RFC 7231. + in: header + required: true + schema: + type: string + - name: Authorization + description: | + The authorization token for the request. Reference: IETF RFC 7235. + in: header + required: false + schema: + type: string + requestBody: + description: | + Request parameters to create a threshold. + content: + application/json: + schema: + description: | + This type represents a request to create a threshold. + type: object + properties: + objectType: + description: > + Type of measured object. The applicable measured object type + for a measurement is defined in clause 8.2 of ETSI GS + NFV-IFA 031. + type: string + objectInstanceId: + description: | + An identifier with the intention of being globally unique. + type: string + subjObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured + object instance associated with this threshold. May be + present if a sub-object is defined in clause 8.2 of ETSI GS + NFV-IFA 031 for the related measured object type. If this + attribute is absent and a sub-object is defined in clause + 8.2 of ETSI GS NFV-IFA 031 for the related measured object + type, thresholds will be set for all sub-object instances + of the measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents criteria that define a threshold. + type: object + properties: + performanceMetric: + description: > + Defines the performance metric associated with the + threshold. This attribute’s value shall contain the + related "Measurement Name" values as defined in clause + 8.4 of ETSI GS NFV-IFA 031 + type: string + thresholdType: + description: > + Type of threshold. This attribute determines which other + attributes are present in the data structure. Permitted + values: + - SIMPLE: Single-valued static threshold + + In the present document, simple thresholds are defined. + The definition of additional threshold types is left + for future specification. + type: string + enum: + - SIMPLE + simpleThresholdDetails: + description: > + Details of a simple threshold. Shall be present if + thresholdType="SIMPLE". + type: object + properties: + thresholdValue: + description: | + A number defined in IETF RFC 8259. + type: number + hysteresis: + description: | + A number defined in IETF RFC 8259. + type: number + required: + - thresholdValue + - hysteresis + required: + - performanceMetric + - thresholdType + required: + - objectType + - objectInstanceId + - criteria + required: true + responses: + '201': + description: > + 201 CREATED + + Shall be returned when a threshold has been created successfully. + + The response body shall contain a representation of the created + "Individual threshold" resource, as defined in clause 6.6.2.9. + + The HTTP response shall include a "Location" HTTP header that + contains the resource URI of the created "Individual threshold" + resource. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + Location: + description: > + The resource URI of the created "Individual change state + operation occurence" resource. + schema: + type: string + format: url + minimum: 1 + maximum: 1 + content: + application/json: + schema: + description: '' + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + objectType: + description: >- + Type of measured object. The applicable measured object + type for a measurement is defined in clause 8.2 of ETSI GS + NFV-IFA 031. + type: string + objectInstanceId: + description: | + An identifier with the intention of being globally unique. + type: string + subjObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured + object instance associated with this threshold. May be + present if a sub-object is defined in clause 8.2 of ETSI + GS NFV-IFA 031 for the related measured object type. If + this attribute is absent and a sub-object is defined in + clause 8.2 of ETSI GS NFV-IFA 031 for the related + measured object type, thresholds are set for all + sub-object instances of the measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents criteria that define a threshold. + type: object + properties: + performanceMetric: + description: > + Defines the performance metric associated with the + threshold. This attribute’s value shall contain the + related "Measurement Name" values as defined in + clause 8.4 of ETSI GS NFV-IFA 031 + type: string + thresholdType: + description: > + Type of threshold. This attribute determines which + other attributes are present in the data structure. + Permitted values: + - SIMPLE: Single-valued static threshold + + In the present document, simple thresholds are + defined. The definition of additional threshold types + is left for future specification. + type: string + enum: + - SIMPLE + simpleThresholdDetails: + description: > + Details of a simple threshold. Shall be present if + thresholdType="SIMPLE". + type: object + properties: + thresholdValue: + description: | + A number defined in IETF RFC 8259. + type: number + hysteresis: + description: | + A number defined in IETF RFC 8259. + type: number + required: + - thresholdValue + - hysteresis + required: + - performanceMetric + - thresholdType + _links: + description: | + Links for this resource. + type: object + properties: + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + object: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - self + required: + - id + - objectType + - objectInstanceId + - subjObjectInstanceIds + - criteria + - _links + '400': + description: > + 400 BAD REQUEST + + 400 code can be returned in the following specified cases, the + specific cause has to be proper specified in the "ProblemDetails" + structure to be returned. + + If the request is malformed or syntactically incorrect (e.g. if the + request URI contains incorrect query parameters or the payload body + contains a syntactically incorrect data structure), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + If the response to a GET request which queries a container resource + would be so big that the performance of the API producer is + adversely affected, and the API producer does not support paging for + the affected resource, it shall respond with this response code. The + "ProblemDetails" structure shall be provided, and should include in + the "detail" attribute more information about the source of the + problem. + + If there is an application error related to the client's input that + cannot be easily mapped to any other HTTP response code ("catch all + error"), the API producer shall respond with this response code. The + "ProblemDetails" structure shall be provided, and shall include in + the "detail" attribute more information about the source of the + problem. + + If the request contains a malformed access token, the API producer + should respond with this response. The details of the error shall be + returned in the WWW Authenticate HTTP header, as defined in IETF RFC + 6750 and IETF RFC 7235. The ProblemDetails structure may be + provided. + + The use of this HTTP error response code described above is + applicable to the use of the OAuth 2.0 for the authorization of API + requests and notifications, as defined in clauses 4.5.3.3 and + 4.5.3.4. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '401': + description: > + 401 UNAUTHORIZED + + If the request contains no access token even though one is required, + or if the request contains an authorization token that is invalid + (e.g. expired or revoked), the API producer should respond with this + response. The details of the error shall be returned in the + WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF + RFC 7235. The ProblemDetails structure may be provided. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '403': + description: > + 403 FORBIDDEN + + If the API consumer is not allowed to perform a particular request + to a particular resource, the API producer shall respond with this + response code. The "ProblemDetails" structure shall be provided. It + should include in the "detail" attribute information about the + source of the problem, and may indicate how to solve it. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '404': + description: > + 404 NOT FOUND + + If the API producer did not find a current representation for the + resource addressed by the URI passed in the request or is not + willing to disclose that one exists, it shall respond with this + response code. The "ProblemDetails" structure may be provided, + including in the "detail" attribute information about the source of + the problem, e.g. a wrong resource URI variable. + + This response code is not appropriate in case the resource addressed + by the URI is a container resource which is designed to contain + child resources, but does not contain any child resource at the time + the request is received. For a GET request to an existing empty + container resource, a typical response contains a 200 OK response + code and a payload body with an empty array. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '405': + description: > + 405 METHOD NOT ALLOWED + + If a particular HTTP method is not supported for a particular + resource, the API producer shall respond with this response code. + The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '406': + description: > + 406 NOT ACCEPTABLE + + If the "Accept" HTTP header does not contain at least one name of a + content type that is acceptable to the API producer, the API + producer shall respond with this response code. The "ProblemDetails" + structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '422': + description: > + 422 UNPROCESSABLE ENTITY + + If the payload body of a request contains syntactically correct data + (e.g. well-formed JSON) but the data cannot be processed (e.g. + because it fails validation against a schema), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + This error response code is only applicable for methods that have a + request body. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '500': + description: > + 500 INTERNAL SERVER ERROR + + If there is an application error not related to the client's input + that cannot be easily mapped to any other HTTP response code ("catch + all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include + in the "detail" attribute more information about the source of the + problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '503': + description: > + 503 SERVICE UNAVAILABLE + + If the API producer encounters an internal overload situation of + itself or of a system it relies on, it should respond with this + response code, following the provisions in IETF RFC 7231 for the use + of the "Retry-After" HTTP header and for the alternative to refuse + the connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '504': + description: > + 504 GATEWAY TIMEOUT + + If the API producer encounters a timeout while waiting for a + response from an upstream server (i.e. a server that the API + producer communicates with when fulfilling a request), it should + respond with this response code. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + get: + description: | + The client can use this method to query information about thresholds. + parameters: + - name: filter + description: > + Attribute-based filtering expression according to clause 5.2 of + ETSI GS NFV-SOL 013. + + The NFV-MANO functional entity shall support receiving this + parameter as part of the URI query string. The API consumer may + supply this parameter. + + All attribute names that appear in the Threshold and in data types + referenced from it shall be supported by the NFV-MANO functional + entity in the expression. + in: query + required: false + schema: + type: string + - name: nextpage_opaque_marker + description: > + Marker to obtain the next page of a paged response. Shall be + supported by the NFV-MANO functional entity if the entity supports + alternative 2 (paging) according to clause 5.4.2.1 of ETSI GS + NFV-SOL 013 for this resource. + in: query + required: false + schema: + type: string + - name: Version + description: | + Version of the API requested to use when responding to this request. + in: header + required: true + schema: + type: string + - name: Accept + description: > + Content-Types that are acceptable for the response. Reference: IETF + RFC 7231. + in: header + required: true + schema: + type: string + - name: Authorization + description: | + The authorization token for the request. Reference: IETF RFC 7235. + in: header + required: false + schema: + type: string + responses: + '200': + description: > + 200 OK + + Shall be returned when information about zero or more thresholds + has been queried successfully. + + The response body shall contain in an array the representations of + zero or more thresholds, as defined in clause 6.6.2.9. + + If the "filter" URI parameter was supplied in the request, the data + in the response body shall have been transformed according to the + rules specified in clause 5.2.2 of ETSI GS NFV-SOL 013. + + If the NFV-MANO functional entity supports alternative 2 (paging) + according to clause 5.4.2.1 of ETSI GS NFV-SOL 013 for this + resource, inclusion of the Link HTTP header in this response shall + follow the provisions in clause 5.4.2.3 of ETSI GS NFV-SOL 013. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + type: array + items: + description: '' + type: object + properties: + id: + description: > + An identifier with the intention of being globally + unique. + type: string + objectType: + description: >- + Type of measured object. The applicable measured object + type for a measurement is defined in clause 8.2 of ETSI + GS NFV-IFA 031. + type: string + objectInstanceId: + description: > + An identifier with the intention of being globally + unique. + type: string + subjObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured + object instance associated with this threshold. May be + present if a sub-object is defined in clause 8.2 of ETSI + GS NFV-IFA 031 for the related measured object type. If + this attribute is absent and a sub-object is defined in + clause 8.2 of ETSI GS NFV-IFA 031 for the related + measured object type, thresholds are set for all + sub-object instances of the measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents criteria that define a threshold. + type: object + properties: + performanceMetric: + description: > + Defines the performance metric associated with the + threshold. This attribute’s value shall contain the + related "Measurement Name" values as defined in + clause 8.4 of ETSI GS NFV-IFA 031 + type: string + thresholdType: + description: > + Type of threshold. This attribute determines which + other attributes are present in the data structure. + Permitted values: + - SIMPLE: Single-valued static threshold + + In the present document, simple thresholds are + defined. The definition of additional threshold + types is left for future specification. + type: string + enum: + - SIMPLE + simpleThresholdDetails: + description: > + Details of a simple threshold. Shall be present if + thresholdType="SIMPLE". + type: object + properties: + thresholdValue: + description: | + A number defined in IETF RFC 8259. + type: number + hysteresis: + description: | + A number defined in IETF RFC 8259. + type: number + required: + - thresholdValue + - hysteresis + required: + - performanceMetric + - thresholdType + _links: + description: | + Links for this resource. + type: object + properties: + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + object: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - self + required: + - id + - objectType + - objectInstanceId + - subjObjectInstanceIds + - criteria + - _links + '400': + description: | + 400 BAD REQUEST + Shall be returned upon the following errors: + - Invalid attribute-based filtering expression. + The response body shall contain a ProblemDetails structure, in which + the "detail" attribute should convey more information about the error. + - Response too big. + If the NFV-MANO functional entity supports alternative N°1 (error) + according to clause 5.4.2.1 of ETSI GS NFV-SOL 013 for this resource, + this error response shall follow the provisions in clause 5.4.2.2 of + ETSI GS NFV-SOL 013. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '401': + description: > + 401 UNAUTHORIZED + + If the request contains no access token even though one is required, + or if the request contains an authorization token that is invalid + (e.g. expired or revoked), the API producer should respond with this + response. The details of the error shall be returned in the + WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF + RFC 7235. The ProblemDetails structure may be provided. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '403': + description: > + 403 FORBIDDEN + + If the API consumer is not allowed to perform a particular request + to a particular resource, the API producer shall respond with this + response code. The "ProblemDetails" structure shall be provided. It + should include in the "detail" attribute information about the + source of the problem, and may indicate how to solve it. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '404': + description: > + 404 NOT FOUND + + If the API producer did not find a current representation for the + resource addressed by the URI passed in the request or is not + willing to disclose that one exists, it shall respond with this + response code. The "ProblemDetails" structure may be provided, + including in the "detail" attribute information about the source of + the problem, e.g. a wrong resource URI variable. + + This response code is not appropriate in case the resource addressed + by the URI is a container resource which is designed to contain + child resources, but does not contain any child resource at the time + the request is received. For a GET request to an existing empty + container resource, a typical response contains a 200 OK response + code and a payload body with an empty array. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '405': + description: > + 405 METHOD NOT ALLOWED + + If a particular HTTP method is not supported for a particular + resource, the API producer shall respond with this response code. + The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '406': + description: > + 406 NOT ACCEPTABLE + + If the "Accept" HTTP header does not contain at least one name of a + content type that is acceptable to the API producer, the API + producer shall respond with this response code. The "ProblemDetails" + structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '422': + description: > + 422 UNPROCESSABLE ENTITY + + If the payload body of a request contains syntactically correct data + (e.g. well-formed JSON) but the data cannot be processed (e.g. + because it fails validation against a schema), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + This error response code is only applicable for methods that have a + request body. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '500': + description: > + 500 INTERNAL SERVER ERROR + + If there is an application error not related to the client's input + that cannot be easily mapped to any other HTTP response code ("catch + all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include + in the "detail" attribute more information about the source of the + problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '503': + description: > + 503 SERVICE UNAVAILABLE + + If the API producer encounters an internal overload situation of + itself or of a system it relies on, it should respond with this + response code, following the provisions in IETF RFC 7231 for the use + of the "Retry-After" HTTP header and for the alternative to refuse + the connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '504': + description: > + 504 GATEWAY TIMEOUT + + If the API producer encounters a timeout while waiting for a + response from an upstream server (i.e. a server that the API + producer communicates with when fulfilling a request), it should + respond with this response code. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '/thresholds/{thresholdId}': + parameters: + - name: thresholdId + in: path + description: Identifier of the PM threshold + required: true + schema: + description: | + An identifier with the intention of being globally unique. + type: string + get: + description: | + The client can use this method for reading an individual threshold + parameters: + - name: Version + description: | + Version of the API requested to use when responding to this request. + in: header + required: true + schema: + type: string + - name: Accept + description: > + Content-Types that are acceptable for the response. Reference: IETF + RFC 7231. + in: header + required: true + schema: + type: string + - name: Authorization + description: | + The authorization token for the request. Reference: IETF RFC 7235. + in: header + required: false + schema: + type: string + responses: + '200': + description: > + 200 OK + + Shall be returned when information about an individual threshold + has been read successfully. + + The response body shall contain a representation of the threshold, + as defined in clause 6.6.2.9. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: '' + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + objectType: + description: >- + Type of measured object. The applicable measured object + type for a measurement is defined in clause 8.2 of ETSI GS + NFV-IFA 031. + type: string + objectInstanceId: + description: | + An identifier with the intention of being globally unique. + type: string + subjObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured + object instance associated with this threshold. May be + present if a sub-object is defined in clause 8.2 of ETSI + GS NFV-IFA 031 for the related measured object type. If + this attribute is absent and a sub-object is defined in + clause 8.2 of ETSI GS NFV-IFA 031 for the related + measured object type, thresholds are set for all + sub-object instances of the measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents criteria that define a threshold. + type: object + properties: + performanceMetric: + description: > + Defines the performance metric associated with the + threshold. This attribute’s value shall contain the + related "Measurement Name" values as defined in + clause 8.4 of ETSI GS NFV-IFA 031 + type: string + thresholdType: + description: > + Type of threshold. This attribute determines which + other attributes are present in the data structure. + Permitted values: + - SIMPLE: Single-valued static threshold + + In the present document, simple thresholds are + defined. The definition of additional threshold types + is left for future specification. + type: string + enum: + - SIMPLE + simpleThresholdDetails: + description: > + Details of a simple threshold. Shall be present if + thresholdType="SIMPLE". + type: object + properties: + thresholdValue: + description: | + A number defined in IETF RFC 8259. + type: number + hysteresis: + description: | + A number defined in IETF RFC 8259. + type: number + required: + - thresholdValue + - hysteresis + required: + - performanceMetric + - thresholdType + _links: + description: | + Links for this resource. + type: object + properties: + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + object: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - self + required: + - id + - objectType + - objectInstanceId + - subjObjectInstanceIds + - criteria + - _links + '400': + description: > + 400 BAD REQUEST + + 400 code can be returned in the following specified cases, the + specific cause has to be proper specified in the "ProblemDetails" + structure to be returned. + + If the request is malformed or syntactically incorrect (e.g. if the + request URI contains incorrect query parameters or the payload body + contains a syntactically incorrect data structure), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + If the response to a GET request which queries a container resource + would be so big that the performance of the API producer is + adversely affected, and the API producer does not support paging for + the affected resource, it shall respond with this response code. The + "ProblemDetails" structure shall be provided, and should include in + the "detail" attribute more information about the source of the + problem. + + If there is an application error related to the client's input that + cannot be easily mapped to any other HTTP response code ("catch all + error"), the API producer shall respond with this response code. The + "ProblemDetails" structure shall be provided, and shall include in + the "detail" attribute more information about the source of the + problem. + + If the request contains a malformed access token, the API producer + should respond with this response. The details of the error shall be + returned in the WWW Authenticate HTTP header, as defined in IETF RFC + 6750 and IETF RFC 7235. The ProblemDetails structure may be + provided. + + The use of this HTTP error response code described above is + applicable to the use of the OAuth 2.0 for the authorization of API + requests and notifications, as defined in clauses 4.5.3.3 and + 4.5.3.4. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '401': + description: > + 401 UNAUTHORIZED + + If the request contains no access token even though one is required, + or if the request contains an authorization token that is invalid + (e.g. expired or revoked), the API producer should respond with this + response. The details of the error shall be returned in the + WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF + RFC 7235. The ProblemDetails structure may be provided. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '403': + description: > + 403 FORBIDDEN + + If the API consumer is not allowed to perform a particular request + to a particular resource, the API producer shall respond with this + response code. The "ProblemDetails" structure shall be provided. It + should include in the "detail" attribute information about the + source of the problem, and may indicate how to solve it. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '404': + description: > + 404 NOT FOUND + + If the API producer did not find a current representation for the + resource addressed by the URI passed in the request or is not + willing to disclose that one exists, it shall respond with this + response code. The "ProblemDetails" structure may be provided, + including in the "detail" attribute information about the source of + the problem, e.g. a wrong resource URI variable. + + This response code is not appropriate in case the resource addressed + by the URI is a container resource which is designed to contain + child resources, but does not contain any child resource at the time + the request is received. For a GET request to an existing empty + container resource, a typical response contains a 200 OK response + code and a payload body with an empty array. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '405': + description: > + 405 METHOD NOT ALLOWED + + If a particular HTTP method is not supported for a particular + resource, the API producer shall respond with this response code. + The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '406': + description: > + 406 NOT ACCEPTABLE + + If the "Accept" HTTP header does not contain at least one name of a + content type that is acceptable to the API producer, the API + producer shall respond with this response code. The "ProblemDetails" + structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '422': + description: > + 422 UNPROCESSABLE ENTITY + + If the payload body of a request contains syntactically correct data + (e.g. well-formed JSON) but the data cannot be processed (e.g. + because it fails validation against a schema), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + This error response code is only applicable for methods that have a + request body. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '500': + description: > + 500 INTERNAL SERVER ERROR + + If there is an application error not related to the client's input + that cannot be easily mapped to any other HTTP response code ("catch + all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include + in the "detail" attribute more information about the source of the + problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '503': + description: > + 503 SERVICE UNAVAILABLE + + If the API producer encounters an internal overload situation of + itself or of a system it relies on, it should respond with this + response code, following the provisions in IETF RFC 7231 for the use + of the "Retry-After" HTTP header and for the alternative to refuse + the connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '504': + description: > + 504 GATEWAY TIMEOUT + + If the API producer encounters a timeout while waiting for a + response from an upstream server (i.e. a server that the API + producer communicates with when fulfilling a request), it should + respond with this response code. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + delete: + description: | + This method allows to delete a threshold. + parameters: + - name: Version + description: | + Version of the API requested to use when responding to this request. + in: header + required: true + schema: + type: string + - name: Accept + description: > + Content-Types that are acceptable for the response. Reference: IETF + RFC 7231. + in: header + required: true + schema: + type: string + - name: Authorization + description: | + The authorization token for the request. Reference: IETF RFC 7235. + in: header + required: false + schema: + type: string + responses: + '204': + description: | + 204 NO CONTENT + Shall be returned when the threshold has been deleted successfully. + The response body shall be empty. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + '400': + description: > + 400 BAD REQUEST + + 400 code can be returned in the following specified cases, the + specific cause has to be proper specified in the "ProblemDetails" + structure to be returned. + + If the request is malformed or syntactically incorrect (e.g. if the + request URI contains incorrect query parameters or the payload body + contains a syntactically incorrect data structure), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + If the response to a GET request which queries a container resource + would be so big that the performance of the API producer is + adversely affected, and the API producer does not support paging for + the affected resource, it shall respond with this response code. The + "ProblemDetails" structure shall be provided, and should include in + the "detail" attribute more information about the source of the + problem. + + If there is an application error related to the client's input that + cannot be easily mapped to any other HTTP response code ("catch all + error"), the API producer shall respond with this response code. The + "ProblemDetails" structure shall be provided, and shall include in + the "detail" attribute more information about the source of the + problem. + + If the request contains a malformed access token, the API producer + should respond with this response. The details of the error shall be + returned in the WWW Authenticate HTTP header, as defined in IETF RFC + 6750 and IETF RFC 7235. The ProblemDetails structure may be + provided. + + The use of this HTTP error response code described above is + applicable to the use of the OAuth 2.0 for the authorization of API + requests and notifications, as defined in clauses 4.5.3.3 and + 4.5.3.4. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '401': + description: > + 401 UNAUTHORIZED + + If the request contains no access token even though one is required, + or if the request contains an authorization token that is invalid + (e.g. expired or revoked), the API producer should respond with this + response. The details of the error shall be returned in the + WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF + RFC 7235. The ProblemDetails structure may be provided. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '403': + description: > + 403 FORBIDDEN + + If the API consumer is not allowed to perform a particular request + to a particular resource, the API producer shall respond with this + response code. The "ProblemDetails" structure shall be provided. It + should include in the "detail" attribute information about the + source of the problem, and may indicate how to solve it. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '404': + description: > + 404 NOT FOUND + + If the API producer did not find a current representation for the + resource addressed by the URI passed in the request or is not + willing to disclose that one exists, it shall respond with this + response code. The "ProblemDetails" structure may be provided, + including in the "detail" attribute information about the source of + the problem, e.g. a wrong resource URI variable. + + This response code is not appropriate in case the resource addressed + by the URI is a container resource which is designed to contain + child resources, but does not contain any child resource at the time + the request is received. For a GET request to an existing empty + container resource, a typical response contains a 200 OK response + code and a payload body with an empty array. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '405': + description: > + 405 METHOD NOT ALLOWED + + If a particular HTTP method is not supported for a particular + resource, the API producer shall respond with this response code. + The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '406': + description: > + 406 NOT ACCEPTABLE + + If the "Accept" HTTP header does not contain at least one name of a + content type that is acceptable to the API producer, the API + producer shall respond with this response code. The "ProblemDetails" + structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '422': + description: > + 422 UNPROCESSABLE ENTITY + + If the payload body of a request contains syntactically correct data + (e.g. well-formed JSON) but the data cannot be processed (e.g. + because it fails validation against a schema), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + This error response code is only applicable for methods that have a + request body. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '500': + description: > + 500 INTERNAL SERVER ERROR + + If there is an application error not related to the client's input + that cannot be easily mapped to any other HTTP response code ("catch + all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include + in the "detail" attribute more information about the source of the + problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '503': + description: > + 503 SERVICE UNAVAILABLE + + If the API producer encounters an internal overload situation of + itself or of a system it relies on, it should respond with this + response code, following the provisions in IETF RFC 7231 for the use + of the "Retry-After" HTTP header and for the alternative to refuse + the connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '504': + description: > + 504 GATEWAY TIMEOUT + + If the API producer encounters a timeout while waiting for a + response from an upstream server (i.e. a server that the API + producer communicates with when fulfilling a request), it should + respond with this response code. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + /subscriptions: + post: + description: | + The POST method creates a new subscription. + parameters: + - name: Version + description: | + Version of the API requested to use when responding to this request. + in: header + required: true + schema: + type: string + - name: Accept + description: > + Content-Types that are acceptable for the response. Reference: IETF + RFC 7231. + in: header + required: true + schema: + type: string + - name: Authorization + description: | + The authorization token for the request. Reference: IETF RFC 7235. + in: header + required: false + schema: + type: string + requestBody: + description: | + Details of the subscription to be created. + content: + application/json: + schema: + description: | + This type represents a subscription request. + type: object + properties: + filter: + description: > + This type represents a filter that can be used to subscribe + for notifications related to performance management + events. 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). + type: object + properties: + pmSubscriptionFilter: + description: > + This type represents subscription filter criteria to + match NFV-MANO functional entities and their associated + managed objects. + type: object + properties: + manoEntityId: + description: > + An identifier with the intention of being globally + unique. + type: string + manoServiceIds: + description: "manoServiceIds\tIdentifierInManoEntity\t0..N\tIf present, match NFV-MANO services with an instance identifier listed in this attribute.\nThe attributes \"manoServiceIds\" and \"manoServiceNames\" are alternatives to reference to NFV-MANO services in a filter. They should not be used together in the same filter instance, but one alternative should be chosen.\n" + type: array + items: + 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.. + type: string + manoServiceNames: + description: > + If present, match NFV-MANO services with an NFV-MANO + service name listed in this attribute. + + The attributes "manoServiceIds" and + "manoServiceNames" are alternatives to reference to + NFV-MANO services in a filter. They should not be + used together in the same filter instance, but one + alternative should be chosen. + type: array + items: + type: string + manoServiceInterfaceIds: + description: > + If present, match NFV-MANO functional entity + produced interfaces with an instance identifier + listed in this attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity produced + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + 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.. + type: string + manoServiceInterfaceNames: + description: > + If present, match NFV-MANO functional entity + produced interfaces with an instance Name listed in + this attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity produced + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + type: string + consumedManoInterfaceIds: + description: > + If present, match NFV-MANO functional entity + consumed interfaces with an instance identifier + listed in this attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to + reference to NFV-MANO functional entity consumed + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + description: > + An identifier with the intention of being globally + unique. + type: string + consumedManoInterfaceNames: + description: > + If present, match NFV-MANO functional entity + consumed interfaces with an instance Name listed in + this attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to + reference to NFV-MANO functional entity consumed + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + type: string + notificationTypes: + description: > + Match particular notification types. Permitted values: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + + The permitted values of the "notificationTypes" + attribute are spelled exactly as the names of the + notification types to facilitate automated code + generation systems. + type: string + enum: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + callbackUri: + description: | + String formatted according to IETF RFC 3986. + type: string + authentication: + type: object + required: + - authType + properties: + authType: + description: > + Defines the types of Authentication / Authorization + which the API consumer is willing to accept when + receiving a notification. Permitted values: * BASIC: In + every HTTP request to the notification endpoint, use + HTTP Basic authentication with the client credentials. + * OAUTH2_CLIENT_CREDENTIALS: In every HTTP request to + the + notification endpoint, use an OAuth 2.0 Bearer token, obtained + using the client credentials grant type. + * TLS_CERT: Every HTTP request to the notification + endpoint is sent + over a mutually authenticated TLS session, i.e. not only the + server is authenticated, but also the client is authenticated + during the TLS tunnel setup. + type: array + items: + type: string + enum: + - BASIC + - OAUTH2_CLIENT_CREDENTIALS + - TLS_CERT + paramsBasic: + description: > + Parameters for authentication/authorization using BASIC. + Shall be present if authType is "BASIC" and the + contained information has not been provisioned out of + band. Shall be absent otherwise. + type: object + properties: + userName: + description: > + Username to be used in HTTP Basic authentication. + Shall be present if it has not been provisioned out + of band. + type: string + password: + description: > + Password to be used in HTTP Basic authentication. + Shall be present if it has not been provisioned out + of band. + type: string + paramsOauth2ClientCredentials: + description: > + Parameters for authentication/authorization using + OAUTH2_CLIENT_CREDENTIALS. Shall be present if authType + is "OAUTH2_CLIENT_CREDENTIALS" and the contained + information has not been provisioned out of band. Shall + be absent otherwise. + type: object + properties: + clientId: + description: > + Client identifier to be used in the access token + request of the OAuth 2.0 client credentials grant + type. Shall be present if it has not been + provisioned out of band. The clientId and + clientPassword passed in a subscription shall not be + the same as the clientId and clientPassword that are + used to obtain authorization for API requests. + Client credentials may differ between subscriptions. + The value of clientPassword should be generated by a + random process. + type: string + clientPassword: + description: > + Client password to be used in the access token + request of the OAuth 2.0 client credentials grant + type. Shall be present if it has not been + provisioned out of band. The clientId and + clientPassword passed in a subscription shall not be + the same as the clientId and clientPassword that are + used to obtain authorization for API requests. + Client credentials may differ between subscriptions. + The value of clientPassword should be generated by a + random process. + type: string + tokenEndpoint: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - callbackUri + required: true + responses: + '201': + description: > + 201 CREATED + + Shall be returned when the subscription has been created + successfully. + + A representation of the created subscription resource shall be + returned in the response body, as defined in clause 6.6.2.3. + + The HTTP response shall include a "Location" HTTP header that + contains the resource URI of the created "Individual subscription" + resource. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + Location: + description: > + The resource URI of the created "Individual change state + operation occurence" resource. + schema: + type: string + format: url + minimum: 1 + maximum: 1 + content: + application/json: + schema: + description: | + This type represents a subscription. + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + filter: + description: > + This type represents a filter that can be used to + subscribe for notifications related to performance + management events. 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). + type: object + properties: + pmSubscriptionFilter: + description: > + This type represents subscription filter criteria to + match NFV-MANO functional entities and their + associated managed objects. + type: object + properties: + manoEntityId: + description: > + An identifier with the intention of being globally + unique. + type: string + manoServiceIds: + description: "manoServiceIds\tIdentifierInManoEntity\t0..N\tIf present, match NFV-MANO services with an instance identifier listed in this attribute.\nThe attributes \"manoServiceIds\" and \"manoServiceNames\" are alternatives to reference to NFV-MANO services in a filter. They should not be used together in the same filter instance, but one alternative should be chosen.\n" + type: array + items: + 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.. + type: string + manoServiceNames: + description: > + If present, match NFV-MANO services with an + NFV-MANO service name listed in this attribute. + + The attributes "manoServiceIds" and + "manoServiceNames" are alternatives to reference + to NFV-MANO services in a filter. They should not + be used together in the same filter instance, but + one alternative should be chosen. + type: array + items: + type: string + manoServiceInterfaceIds: + description: > + If present, match NFV-MANO functional entity + produced interfaces with an instance identifier + listed in this attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity produced + interfaces in a filter. They should not be used + both in the same filter instance, but one + alternative should be chosen. + type: array + items: + 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.. + type: string + manoServiceInterfaceNames: + description: > + If present, match NFV-MANO functional entity + produced interfaces with an instance Name listed + in this attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity produced + interfaces in a filter. They should not be used + both in the same filter instance, but one + alternative should be chosen. + type: array + items: + type: string + consumedManoInterfaceIds: + description: > + If present, match NFV-MANO functional entity + consumed interfaces with an instance identifier + listed in this attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to + reference to NFV-MANO functional entity consumed + interfaces in a filter. They should not be used + both in the same filter instance, but one + alternative should be chosen. + type: array + items: + description: > + An identifier with the intention of being + globally unique. + type: string + consumedManoInterfaceNames: + description: > + If present, match NFV-MANO functional entity + consumed interfaces with an instance Name listed + in this attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to + reference to NFV-MANO functional entity consumed + interfaces in a filter. They should not be used + both in the same filter instance, but one + alternative should be chosen. + type: array + items: + type: string + notificationTypes: + description: > + Match particular notification types. Permitted + values: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + + The permitted values of the "notificationTypes" + attribute are spelled exactly as the names of the + notification types to facilitate automated code + generation systems. + type: string + enum: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + callbackUri: + description: | + The URI of the endpoint to send the notification to. + type: object + properties: + links: + description: | + String formatted according to IETF RFC 3986. + type: string + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - links + - self + required: + - id + - callbackUri + '303': + description: > + 303 SEE OTHER + + Shall be returned when a subscription with the same callbackURI and + the same filter already exists and the policy of the NFV-MANO + functional entity is to not create redundant subscriptions. + + The HTTP response shall include a "Location" HTTP header that + contains the resource URI of the existing "Individual subscription" + resource. + + The response body shall be empty. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + Location: + description: > + The resource URI of the created "Individual change state + operation occurence" resource. + schema: + type: string + format: url + minimum: 1 + maximum: 1 + '400': + description: > + 400 BAD REQUEST + + 400 code can be returned in the following specified cases, the + specific cause has to be proper specified in the "ProblemDetails" + structure to be returned. + + If the request is malformed or syntactically incorrect (e.g. if the + request URI contains incorrect query parameters or the payload body + contains a syntactically incorrect data structure), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + If the response to a GET request which queries a container resource + would be so big that the performance of the API producer is + adversely affected, and the API producer does not support paging for + the affected resource, it shall respond with this response code. The + "ProblemDetails" structure shall be provided, and should include in + the "detail" attribute more information about the source of the + problem. + + If there is an application error related to the client's input that + cannot be easily mapped to any other HTTP response code ("catch all + error"), the API producer shall respond with this response code. The + "ProblemDetails" structure shall be provided, and shall include in + the "detail" attribute more information about the source of the + problem. + + If the request contains a malformed access token, the API producer + should respond with this response. The details of the error shall be + returned in the WWW Authenticate HTTP header, as defined in IETF RFC + 6750 and IETF RFC 7235. The ProblemDetails structure may be + provided. + + The use of this HTTP error response code described above is + applicable to the use of the OAuth 2.0 for the authorization of API + requests and notifications, as defined in clauses 4.5.3.3 and + 4.5.3.4. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '401': + description: > + 401 UNAUTHORIZED + + If the request contains no access token even though one is required, + or if the request contains an authorization token that is invalid + (e.g. expired or revoked), the API producer should respond with this + response. The details of the error shall be returned in the + WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF + RFC 7235. The ProblemDetails structure may be provided. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '403': + description: > + 403 FORBIDDEN + + If the API consumer is not allowed to perform a particular request + to a particular resource, the API producer shall respond with this + response code. The "ProblemDetails" structure shall be provided. It + should include in the "detail" attribute information about the + source of the problem, and may indicate how to solve it. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '404': + description: > + 404 NOT FOUND + + If the API producer did not find a current representation for the + resource addressed by the URI passed in the request or is not + willing to disclose that one exists, it shall respond with this + response code. The "ProblemDetails" structure may be provided, + including in the "detail" attribute information about the source of + the problem, e.g. a wrong resource URI variable. + + This response code is not appropriate in case the resource addressed + by the URI is a container resource which is designed to contain + child resources, but does not contain any child resource at the time + the request is received. For a GET request to an existing empty + container resource, a typical response contains a 200 OK response + code and a payload body with an empty array. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '405': + description: > + 405 METHOD NOT ALLOWED + + If a particular HTTP method is not supported for a particular + resource, the API producer shall respond with this response code. + The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '406': + description: > + 406 NOT ACCEPTABLE + + If the "Accept" HTTP header does not contain at least one name of a + content type that is acceptable to the API producer, the API + producer shall respond with this response code. The "ProblemDetails" + structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '422': + description: > + 422 UNPROCESSABLE ENTITY + + If the payload body of a request contains syntactically correct data + (e.g. well-formed JSON) but the data cannot be processed (e.g. + because it fails validation against a schema), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + This error response code is only applicable for methods that have a + request body. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '500': + description: > + 500 INTERNAL SERVER ERROR + + If there is an application error not related to the client's input + that cannot be easily mapped to any other HTTP response code ("catch + all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include + in the "detail" attribute more information about the source of the + problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '503': + description: > + 503 SERVICE UNAVAILABLE + + If the API producer encounters an internal overload situation of + itself or of a system it relies on, it should respond with this + response code, following the provisions in IETF RFC 7231 for the use + of the "Retry-After" HTTP header and for the alternative to refuse + the connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '504': + description: > + 504 GATEWAY TIMEOUT + + If the API producer encounters a timeout while waiting for a + response from an upstream server (i.e. a server that the API + producer communicates with when fulfilling a request), it should + respond with this response code. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + get: + description: > + The client can use this method to query the list of active + subscriptions to performance management notifications subscribed by the + client. + parameters: + - name: filter + description: > + Attribute-based filtering expression according to clause 5.2 of + ETSI GS NFV-SOL 013. + + The NFV-MANO functional entity shall support receiving this + parameter as part of the URI query string. The API consumer may + supply this parameter. + + All attribute names that appear in the PmSubscription and in data + types referenced from it shall be supported by the NFV-MANO + functional entity in the expression. + in: query + required: false + schema: + type: string + - name: nextpage_opaque_marker + description: > + Marker to obtain the next page of a paged response. Shall be + supported by the NFV-MANO functional entity if the entity supports + alternative 2 (paging) according to clause 5.4.2.1 of ETSI GS + NFV-SOL 013 for this resource. + in: query + required: false + schema: + type: string + - name: Version + description: | + Version of the API requested to use when responding to this request. + in: header + required: true + schema: + type: string + - name: Accept + description: > + Content-Types that are acceptable for the response. Reference: IETF + RFC 7231. + in: header + required: true + schema: + type: string + - name: Authorization + description: | + The authorization token for the request. Reference: IETF RFC 7235. + in: header + required: false + schema: + type: string + responses: + '200': + description: > + Shall be returned when the list of subscriptions has been queried + successfully. + + The response body shall contain in an array the representations of + all active subscriptions of the functional block that invokes the + method, i.e. zero or more representations of PM subscriptions as + defined in clause 6.6.2.3. + + If the "filter" URI parameter was supplied in the request, the data + in the response body shall have been transformed according to the + rules specified in clause 5.2.2 of ETSI GS NFV-SOL 013. + + If the NFV-MANO functional entity supports alternative 2 (paging) + according to clause 5.4.2.1 of ETSI GS NFV-SOL 013 for this + resource, inclusion of the Link HTTP header in this response shall + follow the provisions in clause 5.4.2.3 of ETSI GS NFV-SOL 013. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + type: array + items: + description: | + This type represents a subscription. + type: object + properties: + id: + description: > + An identifier with the intention of being globally + unique. + type: string + filter: + description: > + This type represents a filter that can be used to + subscribe for notifications related to performance + management events. 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). + type: object + properties: + pmSubscriptionFilter: + description: > + This type represents subscription filter criteria to + match NFV-MANO functional entities and their + associated managed objects. + type: object + properties: + manoEntityId: + description: > + An identifier with the intention of being + globally unique. + type: string + manoServiceIds: + description: "manoServiceIds\tIdentifierInManoEntity\t0..N\tIf present, match NFV-MANO services with an instance identifier listed in this attribute.\nThe attributes \"manoServiceIds\" and \"manoServiceNames\" are alternatives to reference to NFV-MANO services in a filter. They should not be used together in the same filter instance, but one alternative should be chosen.\n" + type: array + items: + 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.. + type: string + manoServiceNames: + description: > + If present, match NFV-MANO services with an + NFV-MANO service name listed in this attribute. + + The attributes "manoServiceIds" and + "manoServiceNames" are alternatives to + reference to NFV-MANO services in a filter. They + should not be used together in the same filter + instance, but one alternative should be chosen. + type: array + items: + type: string + manoServiceInterfaceIds: + description: > + If present, match NFV-MANO functional entity + produced interfaces with an instance identifier + listed in this attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity + produced interfaces in a filter. They should + not be used both in the same filter instance, + but one alternative should be chosen. + type: array + items: + 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.. + type: string + manoServiceInterfaceNames: + description: > + If present, match NFV-MANO functional entity + produced interfaces with an instance Name + listed in this attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity + produced interfaces in a filter. They should + not be used both in the same filter instance, + but one alternative should be chosen. + type: array + items: + type: string + consumedManoInterfaceIds: + description: > + If present, match NFV-MANO functional entity + consumed interfaces with an instance identifier + listed in this attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives + to reference to NFV-MANO functional entity + consumed interfaces in a filter. They should + not be used both in the same filter instance, + but one alternative should be chosen. + type: array + items: + description: > + An identifier with the intention of being + globally unique. + type: string + consumedManoInterfaceNames: + description: > + If present, match NFV-MANO functional entity + consumed interfaces with an instance Name + listed in this attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives + to reference to NFV-MANO functional entity + consumed interfaces in a filter. They should + not be used both in the same filter instance, + but one alternative should be chosen. + type: array + items: + type: string + notificationTypes: + description: > + Match particular notification types. Permitted + values: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + + The permitted values of the "notificationTypes" + attribute are spelled exactly as the names of the + notification types to facilitate automated code + generation systems. + type: string + enum: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + callbackUri: + description: | + The URI of the endpoint to send the notification to. + type: object + properties: + links: + description: | + String formatted according to IETF RFC 3986. + type: string + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - links + - self + required: + - id + - callbackUri + '400': + description: | + 400 BAD REQUEST + Shall be returned upon the following errors: + - Invalid attribute-based filtering expression. + The response body shall contain a ProblemDetails structure, in which + the "detail" attribute should convey more information about the error. + - Response too big. + If the NFV-MANO functional entity supports alternative N°1 (error) + according to clause 5.4.2.1 of ETSI GS NFV-SOL 013 for this resource, + this error response shall follow the provisions in clause 5.4.2.2 of + ETSI GS NFV-SOL 013. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '401': + description: > + 401 UNAUTHORIZED + + If the request contains no access token even though one is required, + or if the request contains an authorization token that is invalid + (e.g. expired or revoked), the API producer should respond with this + response. The details of the error shall be returned in the + WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF + RFC 7235. The ProblemDetails structure may be provided. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '403': + description: > + 403 FORBIDDEN + + If the API consumer is not allowed to perform a particular request + to a particular resource, the API producer shall respond with this + response code. The "ProblemDetails" structure shall be provided. It + should include in the "detail" attribute information about the + source of the problem, and may indicate how to solve it. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '404': + description: > + 404 NOT FOUND + + If the API producer did not find a current representation for the + resource addressed by the URI passed in the request or is not + willing to disclose that one exists, it shall respond with this + response code. The "ProblemDetails" structure may be provided, + including in the "detail" attribute information about the source of + the problem, e.g. a wrong resource URI variable. + + This response code is not appropriate in case the resource addressed + by the URI is a container resource which is designed to contain + child resources, but does not contain any child resource at the time + the request is received. For a GET request to an existing empty + container resource, a typical response contains a 200 OK response + code and a payload body with an empty array. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '405': + description: > + 405 METHOD NOT ALLOWED + + If a particular HTTP method is not supported for a particular + resource, the API producer shall respond with this response code. + The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '406': + description: > + 406 NOT ACCEPTABLE + + If the "Accept" HTTP header does not contain at least one name of a + content type that is acceptable to the API producer, the API + producer shall respond with this response code. The "ProblemDetails" + structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '422': + description: > + 422 UNPROCESSABLE ENTITY + + If the payload body of a request contains syntactically correct data + (e.g. well-formed JSON) but the data cannot be processed (e.g. + because it fails validation against a schema), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + This error response code is only applicable for methods that have a + request body. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '500': + description: > + 500 INTERNAL SERVER ERROR + + If there is an application error not related to the client's input + that cannot be easily mapped to any other HTTP response code ("catch + all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include + in the "detail" attribute more information about the source of the + problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '503': + description: > + 503 SERVICE UNAVAILABLE + + If the API producer encounters an internal overload situation of + itself or of a system it relies on, it should respond with this + response code, following the provisions in IETF RFC 7231 for the use + of the "Retry-After" HTTP header and for the alternative to refuse + the connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '504': + description: > + 504 GATEWAY TIMEOUT + + If the API producer encounters a timeout while waiting for a + response from an upstream server (i.e. a server that the API + producer communicates with when fulfilling a request), it should + respond with this response code. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '/subscriptions/{subscriptionId}': + parameters: + - name: subscriptionId + in: path + description: Identifier of the subscription + required: true + schema: + description: | + An identifier with the intention of being globally unique. + type: string + get: + description: > + The client can use this method for reading an individual subscription + about performance management notifications subscribed by the client. + parameters: + - name: Version + description: | + Version of the API requested to use when responding to this request. + in: header + required: true + schema: + type: string + - name: Accept + description: > + Content-Types that are acceptable for the response. Reference: IETF + RFC 7231. + in: header + required: true + schema: + type: string + - name: Authorization + description: | + The authorization token for the request. Reference: IETF RFC 7235. + in: header + required: false + schema: + type: string + responses: + '200': + description: > + 200 OK + + Shall be returned when the subscription has been read successfully. + + The response body shall contain a representation of the "Individual + subscription" resource, as defined in clause 6.6.2.3. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: | + This type represents a subscription. + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + filter: + description: > + This type represents a filter that can be used to + subscribe for notifications related to performance + management events. 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). + type: object + properties: + pmSubscriptionFilter: + description: > + This type represents subscription filter criteria to + match NFV-MANO functional entities and their + associated managed objects. + type: object + properties: + manoEntityId: + description: > + An identifier with the intention of being globally + unique. + type: string + manoServiceIds: + description: "manoServiceIds\tIdentifierInManoEntity\t0..N\tIf present, match NFV-MANO services with an instance identifier listed in this attribute.\nThe attributes \"manoServiceIds\" and \"manoServiceNames\" are alternatives to reference to NFV-MANO services in a filter. They should not be used together in the same filter instance, but one alternative should be chosen.\n" + type: array + items: + 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.. + type: string + manoServiceNames: + description: > + If present, match NFV-MANO services with an + NFV-MANO service name listed in this attribute. + + The attributes "manoServiceIds" and + "manoServiceNames" are alternatives to reference + to NFV-MANO services in a filter. They should not + be used together in the same filter instance, but + one alternative should be chosen. + type: array + items: + type: string + manoServiceInterfaceIds: + description: > + If present, match NFV-MANO functional entity + produced interfaces with an instance identifier + listed in this attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity produced + interfaces in a filter. They should not be used + both in the same filter instance, but one + alternative should be chosen. + type: array + items: + 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.. + type: string + manoServiceInterfaceNames: + description: > + If present, match NFV-MANO functional entity + produced interfaces with an instance Name listed + in this attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity produced + interfaces in a filter. They should not be used + both in the same filter instance, but one + alternative should be chosen. + type: array + items: + type: string + consumedManoInterfaceIds: + description: > + If present, match NFV-MANO functional entity + consumed interfaces with an instance identifier + listed in this attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to + reference to NFV-MANO functional entity consumed + interfaces in a filter. They should not be used + both in the same filter instance, but one + alternative should be chosen. + type: array + items: + description: > + An identifier with the intention of being + globally unique. + type: string + consumedManoInterfaceNames: + description: > + If present, match NFV-MANO functional entity + consumed interfaces with an instance Name listed + in this attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to + reference to NFV-MANO functional entity consumed + interfaces in a filter. They should not be used + both in the same filter instance, but one + alternative should be chosen. + type: array + items: + type: string + notificationTypes: + description: > + Match particular notification types. Permitted + values: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + + The permitted values of the "notificationTypes" + attribute are spelled exactly as the names of the + notification types to facilitate automated code + generation systems. + type: string + enum: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + callbackUri: + description: | + The URI of the endpoint to send the notification to. + type: object + properties: + links: + description: | + String formatted according to IETF RFC 3986. + type: string + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - links + - self + required: + - id + - callbackUri + '400': + description: > + 400 BAD REQUEST + + 400 code can be returned in the following specified cases, the + specific cause has to be proper specified in the "ProblemDetails" + structure to be returned. + + If the request is malformed or syntactically incorrect (e.g. if the + request URI contains incorrect query parameters or the payload body + contains a syntactically incorrect data structure), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + If the response to a GET request which queries a container resource + would be so big that the performance of the API producer is + adversely affected, and the API producer does not support paging for + the affected resource, it shall respond with this response code. The + "ProblemDetails" structure shall be provided, and should include in + the "detail" attribute more information about the source of the + problem. + + If there is an application error related to the client's input that + cannot be easily mapped to any other HTTP response code ("catch all + error"), the API producer shall respond with this response code. The + "ProblemDetails" structure shall be provided, and shall include in + the "detail" attribute more information about the source of the + problem. + + If the request contains a malformed access token, the API producer + should respond with this response. The details of the error shall be + returned in the WWW Authenticate HTTP header, as defined in IETF RFC + 6750 and IETF RFC 7235. The ProblemDetails structure may be + provided. + + The use of this HTTP error response code described above is + applicable to the use of the OAuth 2.0 for the authorization of API + requests and notifications, as defined in clauses 4.5.3.3 and + 4.5.3.4. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '401': + description: > + 401 UNAUTHORIZED + + If the request contains no access token even though one is required, + or if the request contains an authorization token that is invalid + (e.g. expired or revoked), the API producer should respond with this + response. The details of the error shall be returned in the + WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF + RFC 7235. The ProblemDetails structure may be provided. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '403': + description: > + 403 FORBIDDEN + + If the API consumer is not allowed to perform a particular request + to a particular resource, the API producer shall respond with this + response code. The "ProblemDetails" structure shall be provided. It + should include in the "detail" attribute information about the + source of the problem, and may indicate how to solve it. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '404': + description: > + 404 NOT FOUND + + If the API producer did not find a current representation for the + resource addressed by the URI passed in the request or is not + willing to disclose that one exists, it shall respond with this + response code. The "ProblemDetails" structure may be provided, + including in the "detail" attribute information about the source of + the problem, e.g. a wrong resource URI variable. + + This response code is not appropriate in case the resource addressed + by the URI is a container resource which is designed to contain + child resources, but does not contain any child resource at the time + the request is received. For a GET request to an existing empty + container resource, a typical response contains a 200 OK response + code and a payload body with an empty array. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '405': + description: > + 405 METHOD NOT ALLOWED + + If a particular HTTP method is not supported for a particular + resource, the API producer shall respond with this response code. + The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '406': + description: > + 406 NOT ACCEPTABLE + + If the "Accept" HTTP header does not contain at least one name of a + content type that is acceptable to the API producer, the API + producer shall respond with this response code. The "ProblemDetails" + structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '422': + description: > + 422 UNPROCESSABLE ENTITY + + If the payload body of a request contains syntactically correct data + (e.g. well-formed JSON) but the data cannot be processed (e.g. + because it fails validation against a schema), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + This error response code is only applicable for methods that have a + request body. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '500': + description: > + 500 INTERNAL SERVER ERROR + + If there is an application error not related to the client's input + that cannot be easily mapped to any other HTTP response code ("catch + all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include + in the "detail" attribute more information about the source of the + problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '503': + description: > + 503 SERVICE UNAVAILABLE + + If the API producer encounters an internal overload situation of + itself or of a system it relies on, it should respond with this + response code, following the provisions in IETF RFC 7231 for the use + of the "Retry-After" HTTP header and for the alternative to refuse + the connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '504': + description: > + 504 GATEWAY TIMEOUT + + If the API producer encounters a timeout while waiting for a + response from an upstream server (i.e. a server that the API + producer communicates with when fulfilling a request), it should + respond with this response code. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + delete: + description: | + This method terminates an individual subscription. + parameters: + - name: Version + description: | + Version of the API requested to use when responding to this request. + in: header + required: true + schema: + type: string + - name: Accept + description: > + Content-Types that are acceptable for the response. Reference: IETF + RFC 7231. + in: header + required: true + schema: + type: string + - name: Authorization + description: | + The authorization token for the request. Reference: IETF RFC 7235. + in: header + required: false + schema: + type: string + responses: + '204': + description: > + 204 NO CONTENT + + Shall be returned when the "Individual subscription" resource has + been deleted successfully. + + The response body shall be empty. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + '400': + description: > + 400 BAD REQUEST + + 400 code can be returned in the following specified cases, the + specific cause has to be proper specified in the "ProblemDetails" + structure to be returned. + + If the request is malformed or syntactically incorrect (e.g. if the + request URI contains incorrect query parameters or the payload body + contains a syntactically incorrect data structure), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + If the response to a GET request which queries a container resource + would be so big that the performance of the API producer is + adversely affected, and the API producer does not support paging for + the affected resource, it shall respond with this response code. The + "ProblemDetails" structure shall be provided, and should include in + the "detail" attribute more information about the source of the + problem. + + If there is an application error related to the client's input that + cannot be easily mapped to any other HTTP response code ("catch all + error"), the API producer shall respond with this response code. The + "ProblemDetails" structure shall be provided, and shall include in + the "detail" attribute more information about the source of the + problem. + + If the request contains a malformed access token, the API producer + should respond with this response. The details of the error shall be + returned in the WWW Authenticate HTTP header, as defined in IETF RFC + 6750 and IETF RFC 7235. The ProblemDetails structure may be + provided. + + The use of this HTTP error response code described above is + applicable to the use of the OAuth 2.0 for the authorization of API + requests and notifications, as defined in clauses 4.5.3.3 and + 4.5.3.4. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '401': + description: > + 401 UNAUTHORIZED + + If the request contains no access token even though one is required, + or if the request contains an authorization token that is invalid + (e.g. expired or revoked), the API producer should respond with this + response. The details of the error shall be returned in the + WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF + RFC 7235. The ProblemDetails structure may be provided. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '403': + description: > + 403 FORBIDDEN + + If the API consumer is not allowed to perform a particular request + to a particular resource, the API producer shall respond with this + response code. The "ProblemDetails" structure shall be provided. It + should include in the "detail" attribute information about the + source of the problem, and may indicate how to solve it. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '404': + description: > + 404 NOT FOUND + + If the API producer did not find a current representation for the + resource addressed by the URI passed in the request or is not + willing to disclose that one exists, it shall respond with this + response code. The "ProblemDetails" structure may be provided, + including in the "detail" attribute information about the source of + the problem, e.g. a wrong resource URI variable. + + This response code is not appropriate in case the resource addressed + by the URI is a container resource which is designed to contain + child resources, but does not contain any child resource at the time + the request is received. For a GET request to an existing empty + container resource, a typical response contains a 200 OK response + code and a payload body with an empty array. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '405': + description: > + 405 METHOD NOT ALLOWED + + If a particular HTTP method is not supported for a particular + resource, the API producer shall respond with this response code. + The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '406': + description: > + 406 NOT ACCEPTABLE + + If the "Accept" HTTP header does not contain at least one name of a + content type that is acceptable to the API producer, the API + producer shall respond with this response code. The "ProblemDetails" + structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '422': + description: > + 422 UNPROCESSABLE ENTITY + + If the payload body of a request contains syntactically correct data + (e.g. well-formed JSON) but the data cannot be processed (e.g. + because it fails validation against a schema), the API producer + shall respond with this response code. The "ProblemDetails" + structure shall be provided, and should include in the "detail" + attribute more information about the source of the problem. + + This error response code is only applicable for methods that have a + request body. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '500': + description: > + 500 INTERNAL SERVER ERROR + + If there is an application error not related to the client's input + that cannot be easily mapped to any other HTTP response code ("catch + all error"), the API producer shall respond with this response code. + The "ProblemDetails" structure shall be provided, and shall include + in the "detail" attribute more information about the source of the + problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '503': + description: > + 503 SERVICE UNAVAILABLE + + If the API producer encounters an internal overload situation of + itself or of a system it relies on, it should respond with this + response code, following the provisions in IETF RFC 7231 for the use + of the "Retry-After" HTTP header and for the alternative to refuse + the connection. The "ProblemDetails" structure may be omitted. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI + '504': + description: > + 504 GATEWAY TIMEOUT + + If the API producer encounters a timeout while waiting for a + response from an upstream server (i.e. a server that the API + producer communicates with when fulfilling a request), it should + respond with this response code. + headers: + Content-Type: + description: The MIME type of the body of the response. + schema: + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + schema: + type: string + maximum: 1 + minimum: 0 + Version: + description: | + Version of the API used in the response. + schema: + type: string + maximum: 1 + minimum: 1 + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure + from IETF RFC 7807 [19] is reproduced inthis structure. + Compared to the general framework defined in IETF RFC 7807 + [19], the "status" and "detail" attributes are mandated to be + included by the present document, to ensure that the response + contains additional textual information about an error. IETF + RFC 7807 [19] foresees extensibility of the "ProblemDetails" + type. It is possible that particular APIs in the present + document, or particular implementations, define extensions to + define additional attributes that provide more information + about the error. The description column only provides some + explanation of the meaning to Facilitate understanding of the + design. For a full description, see IETF RFC 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that + identifies the problem type. It is encouraged that the URI + provides human-readable documentation for the problem + (e.g. using HTML) when dereferenced. When this member is + not present, its value is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It + should not change from occurrence to occurrence of the + problem, except for purposes of localization. If type is + given and other than "about:blank", this attribute shall + also be provided. A short, human-readable summary of the + problem type. It SHOULD NOT change from occurrence to + occurrence of the problem, except for purposes of + localization (e.g., using proactive content negotiation; + see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. + The HTTP status code ([RFC7231], Section 6) generated by + the origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence + of the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of + the problem. It may yield further information if + dereferenced. + type: string + format: URI +components: + schemas: + PmSubscriptionRequest: + description: | + This type represents a subscription request. + type: object + properties: + filter: + description: > + This type represents a filter that can be used to subscribe for + notifications related to performance management events. 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). + type: object + properties: + pmSubscriptionFilter: + description: > + This type represents subscription filter criteria to match + NFV-MANO functional entities and their associated managed + objects. + type: object + properties: + manoEntityId: + description: | + An identifier with the intention of being globally unique. + type: string + manoServiceIds: + description: "manoServiceIds\tIdentifierInManoEntity\t0..N\tIf present, match NFV-MANO services with an instance identifier listed in this attribute.\nThe attributes \"manoServiceIds\" and \"manoServiceNames\" are alternatives to reference to NFV-MANO services in a filter. They should not be used together in the same filter instance, but one alternative should be chosen.\n" + type: array + items: + 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.. + type: string + manoServiceNames: + description: > + If present, match NFV-MANO services with an NFV-MANO service + name listed in this attribute. + + The attributes "manoServiceIds" and "manoServiceNames" are + alternatives to reference to NFV-MANO services in a filter. + They should not be used together in the same filter + instance, but one alternative should be chosen. + type: array + items: + type: string + manoServiceInterfaceIds: + description: > + If present, match NFV-MANO functional entity produced + interfaces with an instance identifier listed in this + attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to reference + to NFV-MANO functional entity produced interfaces in a + filter. They should not be used both in the same filter + instance, but one alternative should be chosen. + type: array + items: + 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.. + type: string + manoServiceInterfaceNames: + description: > + If present, match NFV-MANO functional entity produced + interfaces with an instance Name listed in this attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to reference + to NFV-MANO functional entity produced interfaces in a + filter. They should not be used both in the same filter + instance, but one alternative should be chosen. + type: array + items: + type: string + consumedManoInterfaceIds: + description: > + If present, match NFV-MANO functional entity consumed + interfaces with an instance identifier listed in this + attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to reference + to NFV-MANO functional entity consumed interfaces in a + filter. They should not be used both in the same filter + instance, but one alternative should be chosen. + type: array + items: + description: | + An identifier with the intention of being globally unique. + type: string + consumedManoInterfaceNames: + description: > + If present, match NFV-MANO functional entity consumed + interfaces with an instance Name listed in this attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to reference + to NFV-MANO functional entity consumed interfaces in a + filter. They should not be used both in the same filter + instance, but one alternative should be chosen. + type: array + items: + type: string + notificationTypes: + description: > + Match particular notification types. Permitted values: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + + The permitted values of the "notificationTypes" attribute are + spelled exactly as the names of the notification types to + facilitate automated code generation systems. + type: string + enum: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + callbackUri: + description: | + String formatted according to IETF RFC 3986. + type: string + authentication: + type: object + required: + - authType + properties: + authType: + description: > + Defines the types of Authentication / Authorization which the + API consumer is willing to accept when receiving a notification. + Permitted values: * BASIC: In every HTTP request to the + notification endpoint, use + HTTP Basic authentication with the client credentials. + * OAUTH2_CLIENT_CREDENTIALS: In every HTTP request to the + notification endpoint, use an OAuth 2.0 Bearer token, obtained + using the client credentials grant type. + * TLS_CERT: Every HTTP request to the notification endpoint is + sent + over a mutually authenticated TLS session, i.e. not only the + server is authenticated, but also the client is authenticated + during the TLS tunnel setup. + type: array + items: + type: string + enum: + - BASIC + - OAUTH2_CLIENT_CREDENTIALS + - TLS_CERT + paramsBasic: + description: > + Parameters for authentication/authorization using BASIC. Shall + be present if authType is "BASIC" and the contained information + has not been provisioned out of band. Shall be absent otherwise. + type: object + properties: + userName: + description: > + Username to be used in HTTP Basic authentication. Shall be + present if it has not been provisioned out of band. + type: string + password: + description: > + Password to be used in HTTP Basic authentication. Shall be + present if it has not been provisioned out of band. + type: string + paramsOauth2ClientCredentials: + description: > + Parameters for authentication/authorization using + OAUTH2_CLIENT_CREDENTIALS. Shall be present if authType is + "OAUTH2_CLIENT_CREDENTIALS" and the contained information has + not been provisioned out of band. Shall be absent otherwise. + type: object + properties: + clientId: + description: > + Client identifier to be used in the access token request of + the OAuth 2.0 client credentials grant type. Shall be + present if it has not been provisioned out of band. The + clientId and clientPassword passed in a subscription shall + not be the same as the clientId and clientPassword that are + used to obtain authorization for API requests. Client + credentials may differ between subscriptions. The value of + clientPassword should be generated by a random process. + type: string + clientPassword: + description: > + Client password to be used in the access token request of + the OAuth 2.0 client credentials grant type. Shall be + present if it has not been provisioned out of band. The + clientId and clientPassword passed in a subscription shall + not be the same as the clientId and clientPassword that are + used to obtain authorization for API requests. Client + credentials may differ between subscriptions. The value of + clientPassword should be generated by a random process. + type: string + tokenEndpoint: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - callbackUri + PmSubscription: + description: | + This type represents a subscription. + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + filter: + description: > + This type represents a filter that can be used to subscribe for + notifications related to performance management events. 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). + type: object + properties: + pmSubscriptionFilter: + description: > + This type represents subscription filter criteria to match + NFV-MANO functional entities and their associated managed + objects. + type: object + properties: + manoEntityId: + description: | + An identifier with the intention of being globally unique. + type: string + manoServiceIds: + description: "manoServiceIds\tIdentifierInManoEntity\t0..N\tIf present, match NFV-MANO services with an instance identifier listed in this attribute.\nThe attributes \"manoServiceIds\" and \"manoServiceNames\" are alternatives to reference to NFV-MANO services in a filter. They should not be used together in the same filter instance, but one alternative should be chosen.\n" + type: array + items: + 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.. + type: string + manoServiceNames: + description: > + If present, match NFV-MANO services with an NFV-MANO service + name listed in this attribute. + + The attributes "manoServiceIds" and "manoServiceNames" are + alternatives to reference to NFV-MANO services in a filter. + They should not be used together in the same filter + instance, but one alternative should be chosen. + type: array + items: + type: string + manoServiceInterfaceIds: + description: > + If present, match NFV-MANO functional entity produced + interfaces with an instance identifier listed in this + attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to reference + to NFV-MANO functional entity produced interfaces in a + filter. They should not be used both in the same filter + instance, but one alternative should be chosen. + type: array + items: + 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.. + type: string + manoServiceInterfaceNames: + description: > + If present, match NFV-MANO functional entity produced + interfaces with an instance Name listed in this attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to reference + to NFV-MANO functional entity produced interfaces in a + filter. They should not be used both in the same filter + instance, but one alternative should be chosen. + type: array + items: + type: string + consumedManoInterfaceIds: + description: > + If present, match NFV-MANO functional entity consumed + interfaces with an instance identifier listed in this + attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to reference + to NFV-MANO functional entity consumed interfaces in a + filter. They should not be used both in the same filter + instance, but one alternative should be chosen. + type: array + items: + description: | + An identifier with the intention of being globally unique. + type: string + consumedManoInterfaceNames: + description: > + If present, match NFV-MANO functional entity consumed + interfaces with an instance Name listed in this attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to reference + to NFV-MANO functional entity consumed interfaces in a + filter. They should not be used both in the same filter + instance, but one alternative should be chosen. + type: array + items: + type: string + notificationTypes: + description: > + Match particular notification types. Permitted values: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + + The permitted values of the "notificationTypes" attribute are + spelled exactly as the names of the notification types to + facilitate automated code generation systems. + type: string + enum: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + callbackUri: + description: | + The URI of the endpoint to send the notification to. + type: object + properties: + links: + description: | + String formatted according to IETF RFC 3986. + type: string + self: + description: | + This type represents a link to a resource using an absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - links + - self + required: + - id + - callbackUri + CreatePmJobRequest: + description: | + This type represents a request to create a PM job. + type: object + properties: + objectType: + description: > + Type of measured object. The applicable measured object type for a + measurement is defined in clause 8.2 of ETSI GS NFV-IFA 031. + type: string + objectInstanceIds: + description: > + Identifiers of the measured object instance for which performance + information is requested to be collected. This attribute shall + contain the identifier of the instance of the measure object + according to their type. See also definitions in clause 8.2 of ETSI + GS NFV-IFA 031. If more than one identifier is provided, values + shall all refer to measured object instances of the same type, for + which the same criteria is then applicable. + type: array + items: + description: | + An identifier with the intention of being globally unique. + type: string + minItems: 1 + subObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured object + instance for which performance information is requested to be + collected. May be present if a sub-object is defined in clause 8.2 + of ETSI GS NFV-IFA 031 for the related measured object type. If this + attribute is present, the cardinality of the "objectInstanceIds" + attribute shall be 1. If this attribute is absent and a sub-object + is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the related + measured object type, measurements will be taken for all sub-object + instances of the measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents collection criteria for PM jobs. + type: object + properties: + performanceMetric: + description: > + This defines the types of performance metrics for the specified + measured object(s). This attribute’s value shall contain the + related "Measurement Name" values as defined in clause 8.4 of + ETSI GS NFV-IFA 031. At least one of the two attributes + (performance metric or group) shall be present. + type: array + items: + type: string + performanceMetricGroup: + description: > + Group of performance metrics. A metric group is a pre-defined + list of metrics, known to the producer that it can decompose to + individual metrics. This attribute’s value shall contain the + related "Measurement Group" values as defined in clause 8.4 of + ETSI GS NFV-IFA 031. At least one of the two attributes + (performance metric or group) shall be present. + type: array + items: + type: string + collectionPeriod: + description: > + Specifies the periodicity at which the producer will collect + performance information. The unit shall be seconds. + + At the end of each reportingPeriod, the producer will inform the + API consumer about availability of the performance data + collected for each completed collection period during this + reportingPeriod. The reportingPeriod should be equal to or a + multiple of the collectionPeriod. In the latter case, the + performance data for the collection periods within one reporting + period are reported together. + + In particular when choosing short collection and reporting + periods, the number of PM jobs that can be supported depends on + the capability of the producing entity. + type: integer + reportingPeriod: + description: > + Specifies the periodicity at which the producer will report to + the API consumer about performance information. The unit shall + be seconds. + + At the end of each reportingPeriod, the producer will inform the + API consumer about availability of the performance data + collected for each completed collection period during this + reportingPeriod. The reportingPeriod should be equal to or a + multiple of the collectionPeriod. In the latter case, the + performance data for the collection periods within one reporting + period are reported together. + + In particular when choosing short collection and reporting + periods, the number of PM jobs that can be supported depends on + the capability of the producing entity. + type: integer + reportingBoundary: + description: > + Date-time stamp. Representation: String formatted according to + IETF RFC 3339. + type: string + format: date-time + required: + - collectionPeriod + - reportingPeriod + required: + - objectType + - objectInstanceIds + - criteria + PmJob: + description: | + This type represents a PM job. + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + objectType: + description: > + Type of measured object. The applicable measured object type for a + measurement is defined in clause 8.2 of ETSI GS NFV-IFA 031. + type: string + objectInstanceIds: + description: > + Identifiers of the measured object instance for which performance + information is collected. This attribute shall contain the + identifier of the instance of the measure object according to their + type. See also definitions in clause 8.2 of ETSI GS NFV-IFA 031. + type: array + items: + description: | + An identifier with the intention of being globally unique. + type: string + minItems: 1 + subObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured object + instance for which performance information is requested to be + collected. May be present if a sub-object is defined in clause 8.2 + of ETSI GS NFV-IFA 031 for the related measured object type. If this + attribute is present, the cardinality of the "objectInstanceIds" + attribute shall be 1. If this attribute is absent and a sub-object + is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the related + measured object type, measurements will be taken for all sub-object + instances of the measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents collection criteria for PM jobs. + type: object + properties: + performanceMetric: + description: > + This defines the types of performance metrics for the specified + measured object(s). This attribute’s value shall contain the + related "Measurement Name" values as defined in clause 8.4 of + ETSI GS NFV-IFA 031. At least one of the two attributes + (performance metric or group) shall be present. + type: array + items: + type: string + performanceMetricGroup: + description: > + Group of performance metrics. A metric group is a pre-defined + list of metrics, known to the producer that it can decompose to + individual metrics. This attribute’s value shall contain the + related "Measurement Group" values as defined in clause 8.4 of + ETSI GS NFV-IFA 031. At least one of the two attributes + (performance metric or group) shall be present. + type: array + items: + type: string + collectionPeriod: + description: > + Specifies the periodicity at which the producer will collect + performance information. The unit shall be seconds. + + At the end of each reportingPeriod, the producer will inform the + API consumer about availability of the performance data + collected for each completed collection period during this + reportingPeriod. The reportingPeriod should be equal to or a + multiple of the collectionPeriod. In the latter case, the + performance data for the collection periods within one reporting + period are reported together. + + In particular when choosing short collection and reporting + periods, the number of PM jobs that can be supported depends on + the capability of the producing entity. + type: integer + reportingPeriod: + description: > + Specifies the periodicity at which the producer will report to + the API consumer about performance information. The unit shall + be seconds. + + At the end of each reportingPeriod, the producer will inform the + API consumer about availability of the performance data + collected for each completed collection period during this + reportingPeriod. The reportingPeriod should be equal to or a + multiple of the collectionPeriod. In the latter case, the + performance data for the collection periods within one reporting + period are reported together. + + In particular when choosing short collection and reporting + periods, the number of PM jobs that can be supported depends on + the capability of the producing entity. + type: integer + reportingBoundary: + description: > + Date-time stamp. Representation: String formatted according to + IETF RFC 3339. + type: string + format: date-time + required: + - collectionPeriod + - reportingPeriod + reports: + description: | + Information about available reports collected by this PM job. + type: array + items: + type: object + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + readyTime: + description: > + Date-time stamp. Representation: String formatted according to + IETF RFC 3339. + type: string + format: date-time + expiryTime: + description: > + Date-time stamp. Representation: String formatted according to + IETF RFC 3339. + type: string + format: date-time + fileSize: + description: | + Unsigned integer + type: number + required: + - href + - readyTime + _links: + description: | + Links for this resource. + type: object + properties: + self: + description: | + This type represents a link to a resource using an absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + objects: + description: > + Links to resources representing the measured object instances + for which performance information is collected. Shall be + present if the measured object instance information is + accessible as a resource. + type: array + items: + description: > + This type represents a link to a resource using an absolute + URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - self + required: + - id + - objectType + - objectInstanceIds + - criteria + - _links + CreateThresholdRequest: + description: | + This type represents a request to create a threshold. + type: object + properties: + objectType: + description: > + Type of measured object. The applicable measured object type for a + measurement is defined in clause 8.2 of ETSI GS NFV-IFA 031. + type: string + objectInstanceId: + description: | + An identifier with the intention of being globally unique. + type: string + subjObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured object + instance associated with this threshold. May be present if a + sub-object is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the + related measured object type. If this attribute is absent and a + sub-object is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the + related measured object type, thresholds will be set for all + sub-object instances of the measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents criteria that define a threshold. + type: object + properties: + performanceMetric: + description: > + Defines the performance metric associated with the threshold. + This attribute’s value shall contain the related "Measurement + Name" values as defined in clause 8.4 of ETSI GS NFV-IFA 031 + type: string + thresholdType: + description: > + Type of threshold. This attribute determines which other + attributes are present in the data structure. Permitted values: + - SIMPLE: Single-valued static threshold + + In the present document, simple thresholds are defined. The + definition of additional threshold types is left for future + specification. + type: string + enum: + - SIMPLE + simpleThresholdDetails: + description: > + Details of a simple threshold. Shall be present if + thresholdType="SIMPLE". + type: object + properties: + thresholdValue: + description: | + A number defined in IETF RFC 8259. + type: number + hysteresis: + description: | + A number defined in IETF RFC 8259. + type: number + required: + - thresholdValue + - hysteresis + required: + - performanceMetric + - thresholdType + required: + - objectType + - objectInstanceId + - criteria + Threshold: + description: '' + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + objectType: + description: >- + Type of measured object. The applicable measured object type for a + measurement is defined in clause 8.2 of ETSI GS NFV-IFA 031. + type: string + objectInstanceId: + description: | + An identifier with the intention of being globally unique. + type: string + subjObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured object + instance associated with this threshold. May be present if a + sub-object is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the + related measured object type. If this attribute is absent and a + sub-object is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the + related measured object type, thresholds are set for all sub-object + instances of the measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents criteria that define a threshold. + type: object + properties: + performanceMetric: + description: > + Defines the performance metric associated with the threshold. + This attribute’s value shall contain the related "Measurement + Name" values as defined in clause 8.4 of ETSI GS NFV-IFA 031 + type: string + thresholdType: + description: > + Type of threshold. This attribute determines which other + attributes are present in the data structure. Permitted values: + - SIMPLE: Single-valued static threshold + + In the present document, simple thresholds are defined. The + definition of additional threshold types is left for future + specification. + type: string + enum: + - SIMPLE + simpleThresholdDetails: + description: > + Details of a simple threshold. Shall be present if + thresholdType="SIMPLE". + type: object + properties: + thresholdValue: + description: | + A number defined in IETF RFC 8259. + type: number + hysteresis: + description: | + A number defined in IETF RFC 8259. + type: number + required: + - thresholdValue + - hysteresis + required: + - performanceMetric + - thresholdType + _links: + description: | + Links for this resource. + type: object + properties: + self: + description: | + This type represents a link to a resource using an absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + object: + description: | + This type represents a link to a resource using an absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - self + required: + - id + - objectType + - objectInstanceId + - subjObjectInstanceIds + - criteria + - _links + PerformanceReport: + description: > + This type defines the format of a performance report provided by the + NFV-MANO functional entity to the API consumer as a result of + collecting performance information as part of a PM job. + type: object + properties: + entries: + description: > + List of performance information entries. Each performance report + entry is for a given metric of a given object (i.e. measured object + instance) corresponding to the related measured object types, but + can include multiple collected values. + type: array + items: + type: object + properties: + objectType: + description: > + Type of measured object. The applicable measured object type + for a measurement is defined in clause 8.2 of ETSI GS NFV-IFA + 031. + type: string + objectInstanceId: + description: > + This type represents the identifier to reference a managed + object of a particular type. + type: object + properties: + type: + description: > + Indicates the type of managed object. Permitted values: + - MANO_ENTITY + - MANO_SERVICE + - MANO_SERVICE_IF + - CONSUMED_MANO_IF + - MANO_ENTITY_COMPONENT + + The "MANO_ENTITY COMPONENT" is only applicable if + attribute "manoEntityComponents" in "ManoEntity" is + supported by the API producer. + 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. + 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.. + type: string + required: + - type + - objectId + subObjectInstanceId: + 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.. + type: string + performanceMetric: + description: > + Name of the metric collected. This attribute shall contain the + related "Measurement Name" value as defined in clause 8.4 of + ETSI GS NFV-IFA 031. + type: string + performanceValues: + description: | + List of performance values with associated timestamp. + type: array + items: + type: object + properties: + timeStamp: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + value: + description: > + Value of the metric collected. The type of this + attribute shall correspond to the related "Measurement + Unit" as defined in clause 8.4 of ETSI GS NFV-IFA 031. + context: + 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 keyvalue pairs is represented as an + object. It shall comply with the provisions defined in + clause 4 of IETF RFC 8259. In the following example, a + list of key-value pairs with four keys ("aString", + "aNumber", "anArray" and "anObject") is provided to + illustrate that the values associated with different + keys can be of different type. + type: object + required: + - timeStamp + - value + minItems: 1 + required: + - objectType + - objectInstanceId + - performanceMetric + - performanceValues + minItems: 1 + required: + - entries + PmNotificationsFilter: + description: > + This type represents a filter that can be used to subscribe for + notifications related to performance management events. 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). + type: object + properties: + pmSubscriptionFilter: + description: > + This type represents subscription filter criteria to match NFV-MANO + functional entities and their associated managed objects. + type: object + properties: + manoEntityId: + description: | + An identifier with the intention of being globally unique. + type: string + manoServiceIds: + description: "manoServiceIds\tIdentifierInManoEntity\t0..N\tIf present, match NFV-MANO services with an instance identifier listed in this attribute.\nThe attributes \"manoServiceIds\" and \"manoServiceNames\" are alternatives to reference to NFV-MANO services in a filter. They should not be used together in the same filter instance, but one alternative should be chosen.\n" + type: array + items: + 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.. + type: string + manoServiceNames: + description: > + If present, match NFV-MANO services with an NFV-MANO service + name listed in this attribute. + + The attributes "manoServiceIds" and "manoServiceNames" are + alternatives to reference to NFV-MANO services in a filter. + They should not be used together in the same filter instance, + but one alternative should be chosen. + type: array + items: + type: string + manoServiceInterfaceIds: + description: > + If present, match NFV-MANO functional entity produced interfaces + with an instance identifier listed in this attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to reference to + NFV-MANO functional entity produced interfaces in a filter. + They should not be used both in the same filter instance, but + one alternative should be chosen. + type: array + items: + 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.. + type: string + manoServiceInterfaceNames: + description: > + If present, match NFV-MANO functional entity produced interfaces + with an instance Name listed in this attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to reference to + NFV-MANO functional entity produced interfaces in a filter. + They should not be used both in the same filter instance, but + one alternative should be chosen. + type: array + items: + type: string + consumedManoInterfaceIds: + description: > + If present, match NFV-MANO functional entity consumed interfaces + with an instance identifier listed in this attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to reference to + NFV-MANO functional entity consumed interfaces in a filter. + They should not be used both in the same filter instance, but + one alternative should be chosen. + type: array + items: + description: | + An identifier with the intention of being globally unique. + type: string + consumedManoInterfaceNames: + description: > + If present, match NFV-MANO functional entity consumed interfaces + with an instance Name listed in this attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to reference to + NFV-MANO functional entity consumed interfaces in a filter. + They should not be used both in the same filter instance, but + one alternative should be chosen. + type: array + items: + type: string + notificationTypes: + description: > + Match particular notification types. Permitted values: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + + The permitted values of the "notificationTypes" attribute are + spelled exactly as the names of the notification types to + facilitate automated code generation systems. + type: string + enum: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + PmJobCriteria: + description: | + This type represents collection criteria for PM jobs. + type: object + properties: + performanceMetric: + description: > + This defines the types of performance metrics for the specified + measured object(s). This attribute’s value shall contain the + related "Measurement Name" values as defined in clause 8.4 of ETSI + GS NFV-IFA 031. At least one of the two attributes (performance + metric or group) shall be present. + type: array + items: + type: string + performanceMetricGroup: + description: > + Group of performance metrics. A metric group is a pre-defined list + of metrics, known to the producer that it can decompose to + individual metrics. This attribute’s value shall contain the + related "Measurement Group" values as defined in clause 8.4 of ETSI + GS NFV-IFA 031. At least one of the two attributes (performance + metric or group) shall be present. + type: array + items: + type: string + collectionPeriod: + description: > + Specifies the periodicity at which the producer will collect + performance information. The unit shall be seconds. + + At the end of each reportingPeriod, the producer will inform the API + consumer about availability of the performance data collected for + each completed collection period during this reportingPeriod. The + reportingPeriod should be equal to or a multiple of the + collectionPeriod. In the latter case, the performance data for the + collection periods within one reporting period are reported + together. + + In particular when choosing short collection and reporting periods, + the number of PM jobs that can be supported depends on the + capability of the producing entity. + type: integer + reportingPeriod: + description: > + Specifies the periodicity at which the producer will report to the + API consumer about performance information. The unit shall be + seconds. + + At the end of each reportingPeriod, the producer will inform the API + consumer about availability of the performance data collected for + each completed collection period during this reportingPeriod. The + reportingPeriod should be equal to or a multiple of the + collectionPeriod. In the latter case, the performance data for the + collection periods within one reporting period are reported + together. + + In particular when choosing short collection and reporting periods, + the number of PM jobs that can be supported depends on the + capability of the producing entity. + type: integer + reportingBoundary: + description: > + Date-time stamp. Representation: String formatted according to IETF + RFC 3339. + type: string + format: date-time + required: + - collectionPeriod + - reportingPeriod + ThresholdCriteria: + description: | + This type represents criteria that define a threshold. + type: object + properties: + performanceMetric: + description: > + Defines the performance metric associated with the threshold. This + attribute’s value shall contain the related "Measurement Name" + values as defined in clause 8.4 of ETSI GS NFV-IFA 031 + type: string + thresholdType: + description: > + Type of threshold. This attribute determines which other attributes + are present in the data structure. Permitted values: + - SIMPLE: Single-valued static threshold + + In the present document, simple thresholds are defined. The + definition of additional threshold types is left for future + specification. + type: string + enum: + - SIMPLE + simpleThresholdDetails: + description: > + Details of a simple threshold. Shall be present if + thresholdType="SIMPLE". + type: object + properties: + thresholdValue: + description: | + A number defined in IETF RFC 8259. + type: number + hysteresis: + description: | + A number defined in IETF RFC 8259. + type: number + required: + - thresholdValue + - hysteresis + required: + - performanceMetric + - thresholdType + responses: + pm_jobs.post.201: + description: > + 201 CREATED + + Shall be returned when the PM job has been created successfully. + + The response body shall contain a representation of the created + "Individual PM job" resource, as defined in clause 6.6.2.7. + + The HTTP response shall include a "Location" HTTP header that points to + the created "Individual PM job" resource. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: | + This type represents a PM job. + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + objectType: + description: > + Type of measured object. The applicable measured object type + for a measurement is defined in clause 8.2 of ETSI GS NFV-IFA + 031. + type: string + objectInstanceIds: + description: > + Identifiers of the measured object instance for which + performance information is collected. This attribute shall + contain the identifier of the instance of the measure object + according to their type. See also definitions in clause 8.2 of + ETSI GS NFV-IFA 031. + type: array + items: + description: | + An identifier with the intention of being globally unique. + type: string + minItems: 1 + subObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured object + instance for which performance information is requested to be + collected. May be present if a sub-object is defined in + clause 8.2 of ETSI GS NFV-IFA 031 for the related measured + object type. If this attribute is present, the cardinality of + the "objectInstanceIds" attribute shall be 1. If this + attribute is absent and a sub-object is defined in clause 8.2 + of ETSI GS NFV-IFA 031 for the related measured object type, + measurements will be taken for all sub-object instances of + the measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents collection criteria for PM jobs. + type: object + properties: + performanceMetric: + description: > + This defines the types of performance metrics for the + specified measured object(s). This attribute’s value + shall contain the related "Measurement Name" values as + defined in clause 8.4 of ETSI GS NFV-IFA 031. At least + one of the two attributes (performance metric or group) + shall be present. + type: array + items: + type: string + performanceMetricGroup: + description: > + Group of performance metrics. A metric group is a + pre-defined list of metrics, known to the producer that + it can decompose to individual metrics. This attribute’s + value shall contain the related "Measurement Group" + values as defined in clause 8.4 of ETSI GS NFV-IFA 031. + At least one of the two attributes (performance metric or + group) shall be present. + type: array + items: + type: string + collectionPeriod: + description: > + Specifies the periodicity at which the producer will + collect performance information. The unit shall be + seconds. + + At the end of each reportingPeriod, the producer will + inform the API consumer about availability of the + performance data collected for each completed collection + period during this reportingPeriod. The reportingPeriod + should be equal to or a multiple of the collectionPeriod. + In the latter case, the performance data for the + collection periods within one reporting period are + reported together. + + In particular when choosing short collection and reporting + periods, the number of PM jobs that can be supported + depends on the capability of the producing entity. + type: integer + reportingPeriod: + description: > + Specifies the periodicity at which the producer will + report to the API consumer about performance information. + The unit shall be seconds. + + At the end of each reportingPeriod, the producer will + inform the API consumer about availability of the + performance data collected for each completed collection + period during this reportingPeriod. The reportingPeriod + should be equal to or a multiple of the collectionPeriod. + In the latter case, the performance data for the + collection periods within one reporting period are + reported together. + + In particular when choosing short collection and reporting + periods, the number of PM jobs that can be supported + depends on the capability of the producing entity. + type: integer + reportingBoundary: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + required: + - collectionPeriod + - reportingPeriod + reports: + description: | + Information about available reports collected by this PM job. + type: array + items: + type: object + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + readyTime: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + expiryTime: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + fileSize: + description: | + Unsigned integer + type: number + required: + - href + - readyTime + _links: + description: | + Links for this resource. + type: object + properties: + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + objects: + description: > + Links to resources representing the measured object + instances for which performance information is collected. + Shall be present if the measured object instance + information is accessible as a resource. + type: array + items: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - self + required: + - id + - objectType + - objectInstanceIds + - criteria + - _links + pm_jobs.get.200: + description: > + 200 OK + + Shall be returned when information about zero or more PM jobs has been + queried successfully. + + The response body shall contain in an array the representations of zero + or more PM jobs, as defined in clause 6.6.2.7. + + If the "filter" URI parameter or one of the "all_fields", "fields" (if + supported), "exclude_fields" (if supported) or "exclude_default" URI + parameters was supplied in the request, the data in the response body + shall have been transformed according to the rules specified in clauses + 5.2.2 and 5.3.2 of ETSI GS NFV-SOL 013, respectively. + + If the NFV-MANO functional entity supports alternative 2 (paging) + according to clause 5.4.2.1 of ETSI GS NFV-SOL 013 for this resource, + inclusion of the Link HTTP header in this response shall follow the + provisions in clause 5.4.2.3 of ETSI GS NFV-SOL 013 . + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + Link: + description: > + Reference to other resources. Link HTTP header in this response + shall follow the provisions in clause 5.4.2.3 of ETSI GS NFV-SOL + 013. + schema: + type: string + minimum: 0 + maximum: 1 + content: + application/json: + schema: + type: array + items: + description: | + This type represents a PM job. + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + objectType: + description: > + Type of measured object. The applicable measured object type + for a measurement is defined in clause 8.2 of ETSI GS + NFV-IFA 031. + type: string + objectInstanceIds: + description: > + Identifiers of the measured object instance for which + performance information is collected. This attribute shall + contain the identifier of the instance of the measure + object according to their type. See also definitions in + clause 8.2 of ETSI GS NFV-IFA 031. + type: array + items: + description: | + An identifier with the intention of being globally unique. + type: string + minItems: 1 + subObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured + object instance for which performance information is + requested to be collected. May be present if a sub-object + is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the + related measured object type. If this attribute is present, + the cardinality of the "objectInstanceIds" attribute shall + be 1. If this attribute is absent and a sub-object is + defined in clause 8.2 of ETSI GS NFV-IFA 031 for the + related measured object type, measurements will be taken + for all sub-object instances of the measured object + instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents collection criteria for PM jobs. + type: object + properties: + performanceMetric: + description: > + This defines the types of performance metrics for the + specified measured object(s). This attribute’s value + shall contain the related "Measurement Name" values as + defined in clause 8.4 of ETSI GS NFV-IFA 031. At least + one of the two attributes (performance metric or group) + shall be present. + type: array + items: + type: string + performanceMetricGroup: + description: > + Group of performance metrics. A metric group is a + pre-defined list of metrics, known to the producer that + it can decompose to individual metrics. This + attribute’s value shall contain the related + "Measurement Group" values as defined in clause 8.4 of + ETSI GS NFV-IFA 031. At least one of the two attributes + (performance metric or group) shall be present. + type: array + items: + type: string + collectionPeriod: + description: > + Specifies the periodicity at which the producer will + collect performance information. The unit shall be + seconds. + + At the end of each reportingPeriod, the producer will + inform the API consumer about availability of the + performance data collected for each completed + collection period during this reportingPeriod. The + reportingPeriod should be equal to or a multiple of the + collectionPeriod. In the latter case, the performance + data for the collection periods within one reporting + period are reported together. + + In particular when choosing short collection and + reporting periods, the number of PM jobs that can be + supported depends on the capability of the producing + entity. + type: integer + reportingPeriod: + description: > + Specifies the periodicity at which the producer will + report to the API consumer about performance + information. The unit shall be seconds. + + At the end of each reportingPeriod, the producer will + inform the API consumer about availability of the + performance data collected for each completed + collection period during this reportingPeriod. The + reportingPeriod should be equal to or a multiple of the + collectionPeriod. In the latter case, the performance + data for the collection periods within one reporting + period are reported together. + + In particular when choosing short collection and + reporting periods, the number of PM jobs that can be + supported depends on the capability of the producing + entity. + type: integer + reportingBoundary: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + required: + - collectionPeriod + - reportingPeriod + reports: + description: > + Information about available reports collected by this PM + job. + type: array + items: + type: object + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + readyTime: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + expiryTime: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + fileSize: + description: | + Unsigned integer + type: number + required: + - href + - readyTime + _links: + description: | + Links for this resource. + type: object + properties: + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + objects: + description: > + Links to resources representing the measured object + instances for which performance information is + collected. Shall be present if the measured object + instance information is accessible as a resource. + type: array + items: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - self + required: + - id + - objectType + - objectInstanceIds + - criteria + - _links + pm_jobs.get.400: + description: | + 400 BAD REQUEST + Shall be returned upon the following errors: + - Invalid attribute-based filtering expression. + The response body shall contain a ProblemDetails structure, in which + the "detail" attribute should convey more information about the error. + - Invalid attribute selector. + The response body shall contain a ProblemDetails structure, in which + the "detail" attribute should convey more information about the error. + - Response too big. + If the NFV-MANO functional entity supports alternative N°1 (error) + according to clause 5.4.2.1 of ETSI GS NFV-SOL 013 for this resource, + this error response shall follow the provisions in clause 5.4.2.2 of + ETSI GS NFV-SOL 013. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure from + IETF RFC 7807 [19] is reproduced inthis structure. Compared to the + general framework defined in IETF RFC 7807 [19], the "status" and + "detail" attributes are mandated to be included by the present + document, to ensure that the response contains additional textual + information about an error. IETF RFC 7807 [19] foresees + extensibility of the "ProblemDetails" type. It is possible that + particular APIs in the present document, or particular + implementations, define extensions to define additional attributes + that provide more information about the error. The description + column only provides some explanation of the meaning to Facilitate + understanding of the design. For a full description, see IETF RFC + 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that identifies + the problem type. It is encouraged that the URI provides + human-readable documentation for the problem (e.g. using HTML) + when dereferenced. When this member is not present, its value + is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It should + not change from occurrence to occurrence of the problem, + except for purposes of localization. If type is given and + other than "about:blank", this attribute shall also be + provided. A short, human-readable summary of the problem + type. It SHOULD NOT change from occurrence to occurrence of + the problem, except for purposes of localization (e.g., using + proactive content negotiation; see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. The + HTTP status code ([RFC7231], Section 6) generated by the + origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence of + the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of the + problem. It may yield further information if dereferenced. + type: string + format: URI + pm_job.get.200: + description: > + 200 OK + + Shall be returned when information about an individual PM job has been + read successfully. + + The response body shall contain a representation of the "Individual PM + job" resource, as defined in clause 6.6.2.7. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: | + This type represents a PM job. + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + objectType: + description: > + Type of measured object. The applicable measured object type + for a measurement is defined in clause 8.2 of ETSI GS NFV-IFA + 031. + type: string + objectInstanceIds: + description: > + Identifiers of the measured object instance for which + performance information is collected. This attribute shall + contain the identifier of the instance of the measure object + according to their type. See also definitions in clause 8.2 of + ETSI GS NFV-IFA 031. + type: array + items: + description: | + An identifier with the intention of being globally unique. + type: string + minItems: 1 + subObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured object + instance for which performance information is requested to be + collected. May be present if a sub-object is defined in + clause 8.2 of ETSI GS NFV-IFA 031 for the related measured + object type. If this attribute is present, the cardinality of + the "objectInstanceIds" attribute shall be 1. If this + attribute is absent and a sub-object is defined in clause 8.2 + of ETSI GS NFV-IFA 031 for the related measured object type, + measurements will be taken for all sub-object instances of + the measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents collection criteria for PM jobs. + type: object + properties: + performanceMetric: + description: > + This defines the types of performance metrics for the + specified measured object(s). This attribute’s value + shall contain the related "Measurement Name" values as + defined in clause 8.4 of ETSI GS NFV-IFA 031. At least + one of the two attributes (performance metric or group) + shall be present. + type: array + items: + type: string + performanceMetricGroup: + description: > + Group of performance metrics. A metric group is a + pre-defined list of metrics, known to the producer that + it can decompose to individual metrics. This attribute’s + value shall contain the related "Measurement Group" + values as defined in clause 8.4 of ETSI GS NFV-IFA 031. + At least one of the two attributes (performance metric or + group) shall be present. + type: array + items: + type: string + collectionPeriod: + description: > + Specifies the periodicity at which the producer will + collect performance information. The unit shall be + seconds. + + At the end of each reportingPeriod, the producer will + inform the API consumer about availability of the + performance data collected for each completed collection + period during this reportingPeriod. The reportingPeriod + should be equal to or a multiple of the collectionPeriod. + In the latter case, the performance data for the + collection periods within one reporting period are + reported together. + + In particular when choosing short collection and reporting + periods, the number of PM jobs that can be supported + depends on the capability of the producing entity. + type: integer + reportingPeriod: + description: > + Specifies the periodicity at which the producer will + report to the API consumer about performance information. + The unit shall be seconds. + + At the end of each reportingPeriod, the producer will + inform the API consumer about availability of the + performance data collected for each completed collection + period during this reportingPeriod. The reportingPeriod + should be equal to or a multiple of the collectionPeriod. + In the latter case, the performance data for the + collection periods within one reporting period are + reported together. + + In particular when choosing short collection and reporting + periods, the number of PM jobs that can be supported + depends on the capability of the producing entity. + type: integer + reportingBoundary: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + required: + - collectionPeriod + - reportingPeriod + reports: + description: | + Information about available reports collected by this PM job. + type: array + items: + type: object + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + readyTime: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + expiryTime: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + fileSize: + description: | + Unsigned integer + type: number + required: + - href + - readyTime + _links: + description: | + Links for this resource. + type: object + properties: + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + objects: + description: > + Links to resources representing the measured object + instances for which performance information is collected. + Shall be present if the measured object instance + information is accessible as a resource. + type: array + items: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - self + required: + - id + - objectType + - objectInstanceIds + - criteria + - _links + pm_job.delete.204: + description: | + 204 NO CONTENT + Shall be returned when the PM job has been deleted successfully. + The response body shall be empty. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + pm_job.report.get.200: + description: > + 200 OK + + Shall be returned when information of an individual performance report + has been read successfully. + + The response body shall contain a representation of the "Individual + performance report" resource, as defined in clause 6.6.2.10. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: > + This type defines the format of a performance report provided by + the NFV-MANO functional entity to the API consumer as a result of + collecting performance information as part of a PM job. + type: object + properties: + entries: + description: > + List of performance information entries. Each performance + report entry is for a given metric of a given object (i.e. + measured object instance) corresponding to the related + measured object types, but can include multiple collected + values. + type: array + items: + type: object + properties: + objectType: + description: > + Type of measured object. The applicable measured object + type for a measurement is defined in clause 8.2 of ETSI + GS NFV-IFA 031. + type: string + objectInstanceId: + description: > + This type represents the identifier to reference a + managed object of a particular type. + type: object + properties: + type: + description: > + Indicates the type of managed object. Permitted + values: + - MANO_ENTITY + - MANO_SERVICE + - MANO_SERVICE_IF + - CONSUMED_MANO_IF + - MANO_ENTITY_COMPONENT + + The "MANO_ENTITY COMPONENT" is only applicable if + attribute "manoEntityComponents" in "ManoEntity" is + supported by the API producer. + 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. + 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.. + type: string + required: + - type + - objectId + subObjectInstanceId: + 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.. + type: string + performanceMetric: + description: > + Name of the metric collected. This attribute shall + contain the related "Measurement Name" value as defined + in clause 8.4 of ETSI GS NFV-IFA 031. + type: string + performanceValues: + description: | + List of performance values with associated timestamp. + type: array + items: + type: object + properties: + timeStamp: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + value: + description: > + Value of the metric collected. The type of this + attribute shall correspond to the related + "Measurement Unit" as defined in clause 8.4 of + ETSI GS NFV-IFA 031. + context: + 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 keyvalue pairs is + represented as an object. It shall comply with the + provisions defined in clause 4 of IETF RFC 8259. + In the following example, a list of key-value + pairs with four keys ("aString", "aNumber", + "anArray" and "anObject") is provided to + illustrate that the values associated with + different keys can be of different type. + type: object + required: + - timeStamp + - value + minItems: 1 + required: + - objectType + - objectInstanceId + - performanceMetric + - performanceValues + minItems: 1 + required: + - entries + thresholds.post.201: + description: > + 201 CREATED + + Shall be returned when a threshold has been created successfully. + + The response body shall contain a representation of the created + "Individual threshold" resource, as defined in clause 6.6.2.9. + + The HTTP response shall include a "Location" HTTP header that contains + the resource URI of the created "Individual threshold" resource. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + Location: + description: > + The resource URI of the created "Individual change state operation + occurence" resource. + schema: + type: string + format: url + minimum: 1 + maximum: 1 + content: + application/json: + schema: + description: '' + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + objectType: + description: >- + Type of measured object. The applicable measured object type + for a measurement is defined in clause 8.2 of ETSI GS NFV-IFA + 031. + type: string + objectInstanceId: + description: | + An identifier with the intention of being globally unique. + type: string + subjObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured object + instance associated with this threshold. May be present if a + sub-object is defined in clause 8.2 of ETSI GS NFV-IFA 031 for + the related measured object type. If this attribute is absent + and a sub-object is defined in clause 8.2 of ETSI GS NFV-IFA + 031 for the related measured object type, thresholds are set + for all sub-object instances of the measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents criteria that define a threshold. + type: object + properties: + performanceMetric: + description: > + Defines the performance metric associated with the + threshold. This attribute’s value shall contain the + related "Measurement Name" values as defined in clause + 8.4 of ETSI GS NFV-IFA 031 + type: string + thresholdType: + description: > + Type of threshold. This attribute determines which other + attributes are present in the data structure. Permitted + values: + - SIMPLE: Single-valued static threshold + + In the present document, simple thresholds are defined. + The definition of additional threshold types is left for + future specification. + type: string + enum: + - SIMPLE + simpleThresholdDetails: + description: > + Details of a simple threshold. Shall be present if + thresholdType="SIMPLE". + type: object + properties: + thresholdValue: + description: | + A number defined in IETF RFC 8259. + type: number + hysteresis: + description: | + A number defined in IETF RFC 8259. + type: number + required: + - thresholdValue + - hysteresis + required: + - performanceMetric + - thresholdType + _links: + description: | + Links for this resource. + type: object + properties: + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + object: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - self + required: + - id + - objectType + - objectInstanceId + - subjObjectInstanceIds + - criteria + - _links + thresholds.get.200: + description: > + 200 OK + + Shall be returned when information about zero or more thresholds has + been queried successfully. + + The response body shall contain in an array the representations of zero + or more thresholds, as defined in clause 6.6.2.9. + + If the "filter" URI parameter was supplied in the request, the data in + the response body shall have been transformed according to the rules + specified in clause 5.2.2 of ETSI GS NFV-SOL 013. + + If the NFV-MANO functional entity supports alternative 2 (paging) + according to clause 5.4.2.1 of ETSI GS NFV-SOL 013 for this resource, + inclusion of the Link HTTP header in this response shall follow the + provisions in clause 5.4.2.3 of ETSI GS NFV-SOL 013. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + type: array + items: + description: '' + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + objectType: + description: >- + Type of measured object. The applicable measured object type + for a measurement is defined in clause 8.2 of ETSI GS + NFV-IFA 031. + type: string + objectInstanceId: + description: | + An identifier with the intention of being globally unique. + type: string + subjObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured + object instance associated with this threshold. May be + present if a sub-object is defined in clause 8.2 of ETSI GS + NFV-IFA 031 for the related measured object type. If this + attribute is absent and a sub-object is defined in clause + 8.2 of ETSI GS NFV-IFA 031 for the related measured object + type, thresholds are set for all sub-object instances of + the measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents criteria that define a threshold. + type: object + properties: + performanceMetric: + description: > + Defines the performance metric associated with the + threshold. This attribute’s value shall contain the + related "Measurement Name" values as defined in clause + 8.4 of ETSI GS NFV-IFA 031 + type: string + thresholdType: + description: > + Type of threshold. This attribute determines which other + attributes are present in the data structure. Permitted + values: + - SIMPLE: Single-valued static threshold + + In the present document, simple thresholds are defined. + The definition of additional threshold types is left + for future specification. + type: string + enum: + - SIMPLE + simpleThresholdDetails: + description: > + Details of a simple threshold. Shall be present if + thresholdType="SIMPLE". + type: object + properties: + thresholdValue: + description: | + A number defined in IETF RFC 8259. + type: number + hysteresis: + description: | + A number defined in IETF RFC 8259. + type: number + required: + - thresholdValue + - hysteresis + required: + - performanceMetric + - thresholdType + _links: + description: | + Links for this resource. + type: object + properties: + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + object: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - self + required: + - id + - objectType + - objectInstanceId + - subjObjectInstanceIds + - criteria + - _links + thresholds.get.400: + description: | + 400 BAD REQUEST + Shall be returned upon the following errors: + - Invalid attribute-based filtering expression. + The response body shall contain a ProblemDetails structure, in which + the "detail" attribute should convey more information about the error. + - Response too big. + If the NFV-MANO functional entity supports alternative N°1 (error) + according to clause 5.4.2.1 of ETSI GS NFV-SOL 013 for this resource, + this error response shall follow the provisions in clause 5.4.2.2 of + ETSI GS NFV-SOL 013. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure from + IETF RFC 7807 [19] is reproduced inthis structure. Compared to the + general framework defined in IETF RFC 7807 [19], the "status" and + "detail" attributes are mandated to be included by the present + document, to ensure that the response contains additional textual + information about an error. IETF RFC 7807 [19] foresees + extensibility of the "ProblemDetails" type. It is possible that + particular APIs in the present document, or particular + implementations, define extensions to define additional attributes + that provide more information about the error. The description + column only provides some explanation of the meaning to Facilitate + understanding of the design. For a full description, see IETF RFC + 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that identifies + the problem type. It is encouraged that the URI provides + human-readable documentation for the problem (e.g. using HTML) + when dereferenced. When this member is not present, its value + is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It should + not change from occurrence to occurrence of the problem, + except for purposes of localization. If type is given and + other than "about:blank", this attribute shall also be + provided. A short, human-readable summary of the problem + type. It SHOULD NOT change from occurrence to occurrence of + the problem, except for purposes of localization (e.g., using + proactive content negotiation; see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. The + HTTP status code ([RFC7231], Section 6) generated by the + origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence of + the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of the + problem. It may yield further information if dereferenced. + type: string + format: URI + threshold.get.200: + description: > + 200 OK + + Shall be returned when information about an individual threshold has + been read successfully. + + The response body shall contain a representation of the threshold, as + defined in clause 6.6.2.9. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: '' + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + objectType: + description: >- + Type of measured object. The applicable measured object type + for a measurement is defined in clause 8.2 of ETSI GS NFV-IFA + 031. + type: string + objectInstanceId: + description: | + An identifier with the intention of being globally unique. + type: string + subjObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured object + instance associated with this threshold. May be present if a + sub-object is defined in clause 8.2 of ETSI GS NFV-IFA 031 for + the related measured object type. If this attribute is absent + and a sub-object is defined in clause 8.2 of ETSI GS NFV-IFA + 031 for the related measured object type, thresholds are set + for all sub-object instances of the measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents criteria that define a threshold. + type: object + properties: + performanceMetric: + description: > + Defines the performance metric associated with the + threshold. This attribute’s value shall contain the + related "Measurement Name" values as defined in clause + 8.4 of ETSI GS NFV-IFA 031 + type: string + thresholdType: + description: > + Type of threshold. This attribute determines which other + attributes are present in the data structure. Permitted + values: + - SIMPLE: Single-valued static threshold + + In the present document, simple thresholds are defined. + The definition of additional threshold types is left for + future specification. + type: string + enum: + - SIMPLE + simpleThresholdDetails: + description: > + Details of a simple threshold. Shall be present if + thresholdType="SIMPLE". + type: object + properties: + thresholdValue: + description: | + A number defined in IETF RFC 8259. + type: number + hysteresis: + description: | + A number defined in IETF RFC 8259. + type: number + required: + - thresholdValue + - hysteresis + required: + - performanceMetric + - thresholdType + _links: + description: | + Links for this resource. + type: object + properties: + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + object: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - self + required: + - id + - objectType + - objectInstanceId + - subjObjectInstanceIds + - criteria + - _links + threshold.delete.204: + description: | + 204 NO CONTENT + Shall be returned when the threshold has been deleted successfully. + The response body shall be empty. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + subscriptions.post.201: + description: > + 201 CREATED + + Shall be returned when the subscription has been created successfully. + + A representation of the created subscription resource shall be returned + in the response body, as defined in clause 6.6.2.3. + + The HTTP response shall include a "Location" HTTP header that contains + the resource URI of the created "Individual subscription" resource. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + Location: + description: > + The resource URI of the created "Individual change state operation + occurence" resource. + schema: + type: string + format: url + minimum: 1 + maximum: 1 + content: + application/json: + schema: + description: | + This type represents a subscription. + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + filter: + description: > + This type represents a filter that can be used to subscribe + for notifications related to performance management events. + 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). + type: object + properties: + pmSubscriptionFilter: + description: > + This type represents subscription filter criteria to match + NFV-MANO functional entities and their associated managed + objects. + type: object + properties: + manoEntityId: + description: > + An identifier with the intention of being globally + unique. + type: string + manoServiceIds: + description: "manoServiceIds\tIdentifierInManoEntity\t0..N\tIf present, match NFV-MANO services with an instance identifier listed in this attribute.\nThe attributes \"manoServiceIds\" and \"manoServiceNames\" are alternatives to reference to NFV-MANO services in a filter. They should not be used together in the same filter instance, but one alternative should be chosen.\n" + type: array + items: + 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.. + type: string + manoServiceNames: + description: > + If present, match NFV-MANO services with an NFV-MANO + service name listed in this attribute. + + The attributes "manoServiceIds" and "manoServiceNames" + are alternatives to reference to NFV-MANO services in + a filter. They should not be used together in the + same filter instance, but one alternative should be + chosen. + type: array + items: + type: string + manoServiceInterfaceIds: + description: > + If present, match NFV-MANO functional entity produced + interfaces with an instance identifier listed in this + attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity produced + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + 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.. + type: string + manoServiceInterfaceNames: + description: > + If present, match NFV-MANO functional entity produced + interfaces with an instance Name listed in this + attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity produced + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + type: string + consumedManoInterfaceIds: + description: > + If present, match NFV-MANO functional entity consumed + interfaces with an instance identifier listed in this + attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to + reference to NFV-MANO functional entity consumed + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + description: > + An identifier with the intention of being globally + unique. + type: string + consumedManoInterfaceNames: + description: > + If present, match NFV-MANO functional entity consumed + interfaces with an instance Name listed in this + attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to + reference to NFV-MANO functional entity consumed + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + type: string + notificationTypes: + description: > + Match particular notification types. Permitted values: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + + The permitted values of the "notificationTypes" attribute + are spelled exactly as the names of the notification + types to facilitate automated code generation systems. + type: string + enum: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + callbackUri: + description: | + The URI of the endpoint to send the notification to. + type: object + properties: + links: + description: | + String formatted according to IETF RFC 3986. + type: string + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - links + - self + required: + - id + - callbackUri + subscriptions.post.303: + description: > + 303 SEE OTHER + + Shall be returned when a subscription with the same callbackURI and the + same filter already exists and the policy of the NFV-MANO functional + entity is to not create redundant subscriptions. + + The HTTP response shall include a "Location" HTTP header that contains + the resource URI of the existing "Individual subscription" resource. + + The response body shall be empty. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + Location: + description: > + The resource URI of the created "Individual change state operation + occurence" resource. + schema: + type: string + format: url + minimum: 1 + maximum: 1 + subscriptions.get.200: + description: > + Shall be returned when the list of subscriptions has been queried + successfully. + + The response body shall contain in an array the representations of all + active subscriptions of the functional block that invokes the method, + i.e. zero or more representations of PM subscriptions as defined in + clause 6.6.2.3. + + If the "filter" URI parameter was supplied in the request, the data in + the response body shall have been transformed according to the rules + specified in clause 5.2.2 of ETSI GS NFV-SOL 013. + + If the NFV-MANO functional entity supports alternative 2 (paging) + according to clause 5.4.2.1 of ETSI GS NFV-SOL 013 for this resource, + inclusion of the Link HTTP header in this response shall follow the + provisions in clause 5.4.2.3 of ETSI GS NFV-SOL 013. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + type: array + items: + description: | + This type represents a subscription. + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + filter: + description: > + This type represents a filter that can be used to subscribe + for notifications related to performance management + events. 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). + type: object + properties: + pmSubscriptionFilter: + description: > + This type represents subscription filter criteria to + match NFV-MANO functional entities and their associated + managed objects. + type: object + properties: + manoEntityId: + description: > + An identifier with the intention of being globally + unique. + type: string + manoServiceIds: + description: "manoServiceIds\tIdentifierInManoEntity\t0..N\tIf present, match NFV-MANO services with an instance identifier listed in this attribute.\nThe attributes \"manoServiceIds\" and \"manoServiceNames\" are alternatives to reference to NFV-MANO services in a filter. They should not be used together in the same filter instance, but one alternative should be chosen.\n" + type: array + items: + 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.. + type: string + manoServiceNames: + description: > + If present, match NFV-MANO services with an NFV-MANO + service name listed in this attribute. + + The attributes "manoServiceIds" and + "manoServiceNames" are alternatives to reference to + NFV-MANO services in a filter. They should not be + used together in the same filter instance, but one + alternative should be chosen. + type: array + items: + type: string + manoServiceInterfaceIds: + description: > + If present, match NFV-MANO functional entity + produced interfaces with an instance identifier + listed in this attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity produced + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + 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.. + type: string + manoServiceInterfaceNames: + description: > + If present, match NFV-MANO functional entity + produced interfaces with an instance Name listed in + this attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity produced + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + type: string + consumedManoInterfaceIds: + description: > + If present, match NFV-MANO functional entity + consumed interfaces with an instance identifier + listed in this attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to + reference to NFV-MANO functional entity consumed + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + description: > + An identifier with the intention of being globally + unique. + type: string + consumedManoInterfaceNames: + description: > + If present, match NFV-MANO functional entity + consumed interfaces with an instance Name listed in + this attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to + reference to NFV-MANO functional entity consumed + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + type: string + notificationTypes: + description: > + Match particular notification types. Permitted values: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + + The permitted values of the "notificationTypes" + attribute are spelled exactly as the names of the + notification types to facilitate automated code + generation systems. + type: string + enum: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + callbackUri: + description: | + The URI of the endpoint to send the notification to. + type: object + properties: + links: + description: | + String formatted according to IETF RFC 3986. + type: string + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - links + - self + required: + - id + - callbackUri + subscriptions.get.400: + description: | + 400 BAD REQUEST + Shall be returned upon the following errors: + - Invalid attribute-based filtering expression. + The response body shall contain a ProblemDetails structure, in which + the "detail" attribute should convey more information about the error. + - Response too big. + If the NFV-MANO functional entity supports alternative N°1 (error) + according to clause 5.4.2.1 of ETSI GS NFV-SOL 013 for this resource, + this error response shall follow the provisions in clause 5.4.2.2 of + ETSI GS NFV-SOL 013. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: > + The definition of the general "ProblemDetails" data structure from + IETF RFC 7807 [19] is reproduced inthis structure. Compared to the + general framework defined in IETF RFC 7807 [19], the "status" and + "detail" attributes are mandated to be included by the present + document, to ensure that the response contains additional textual + information about an error. IETF RFC 7807 [19] foresees + extensibility of the "ProblemDetails" type. It is possible that + particular APIs in the present document, or particular + implementations, define extensions to define additional attributes + that provide more information about the error. The description + column only provides some explanation of the meaning to Facilitate + understanding of the design. For a full description, see IETF RFC + 7807 [19]. + type: object + required: + - status + - detail + properties: + type: + description: > + A URI reference according to IETF RFC 3986 [5] that identifies + the problem type. It is encouraged that the URI provides + human-readable documentation for the problem (e.g. using HTML) + when dereferenced. When this member is not present, its value + is assumed to be "about:blank". + type: string + format: URI + title: + description: > + A short, human-readable summary of the problem type. It should + not change from occurrence to occurrence of the problem, + except for purposes of localization. If type is given and + other than "about:blank", this attribute shall also be + provided. A short, human-readable summary of the problem + type. It SHOULD NOT change from occurrence to occurrence of + the problem, except for purposes of localization (e.g., using + proactive content negotiation; see [RFC7231], Section 3.4). + type: string + status: + description: > + The HTTP status code for this occurrence of the problem. The + HTTP status code ([RFC7231], Section 6) generated by the + origin server for this occurrence of the problem. + type: integer + detail: + description: > + A human-readable explanation specific to this occurrence of + the problem. + type: string + instance: + description: > + A URI reference that identifies the specific occurrence of the + problem. It may yield further information if dereferenced. + type: string + format: URI + subscription.get.200: + description: > + 200 OK + + Shall be returned when the subscription has been read successfully. + + The response body shall contain a representation of the "Individual + subscription" resource, as defined in clause 6.6.2.3. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + content: + application/json: + schema: + description: | + This type represents a subscription. + type: object + properties: + id: + description: | + An identifier with the intention of being globally unique. + type: string + filter: + description: > + This type represents a filter that can be used to subscribe + for notifications related to performance management events. + 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). + type: object + properties: + pmSubscriptionFilter: + description: > + This type represents subscription filter criteria to match + NFV-MANO functional entities and their associated managed + objects. + type: object + properties: + manoEntityId: + description: > + An identifier with the intention of being globally + unique. + type: string + manoServiceIds: + description: "manoServiceIds\tIdentifierInManoEntity\t0..N\tIf present, match NFV-MANO services with an instance identifier listed in this attribute.\nThe attributes \"manoServiceIds\" and \"manoServiceNames\" are alternatives to reference to NFV-MANO services in a filter. They should not be used together in the same filter instance, but one alternative should be chosen.\n" + type: array + items: + 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.. + type: string + manoServiceNames: + description: > + If present, match NFV-MANO services with an NFV-MANO + service name listed in this attribute. + + The attributes "manoServiceIds" and "manoServiceNames" + are alternatives to reference to NFV-MANO services in + a filter. They should not be used together in the + same filter instance, but one alternative should be + chosen. + type: array + items: + type: string + manoServiceInterfaceIds: + description: > + If present, match NFV-MANO functional entity produced + interfaces with an instance identifier listed in this + attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity produced + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + 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.. + type: string + manoServiceInterfaceNames: + description: > + If present, match NFV-MANO functional entity produced + interfaces with an instance Name listed in this + attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity produced + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + type: string + consumedManoInterfaceIds: + description: > + If present, match NFV-MANO functional entity consumed + interfaces with an instance identifier listed in this + attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to + reference to NFV-MANO functional entity consumed + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + description: > + An identifier with the intention of being globally + unique. + type: string + consumedManoInterfaceNames: + description: > + If present, match NFV-MANO functional entity consumed + interfaces with an instance Name listed in this + attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to + reference to NFV-MANO functional entity consumed + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + type: string + notificationTypes: + description: > + Match particular notification types. Permitted values: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + + The permitted values of the "notificationTypes" attribute + are spelled exactly as the names of the notification + types to facilitate automated code generation systems. + type: string + enum: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + callbackUri: + description: | + The URI of the endpoint to send the notification to. + type: object + properties: + links: + description: | + String formatted according to IETF RFC 3986. + type: string + self: + description: > + This type represents a link to a resource using an + absolute URI. + type: object + required: + - href + properties: + href: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - links + - self + required: + - id + - callbackUri + subscription.delete.204: + description: > + 204 NO CONTENT + + Shall be returned when the "Individual subscription" resource has been + deleted successfully. + + The response body shall be empty. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP request + has provided an invalid authorization token. + schema: + type: string + Version: + description: | + Version of the API used in the response. + schema: + type: string + parameters: + filter.PmJob: + name: filter + description: > + Attribute-based filtering expression according to clause 5.2 of ETSI GS + NFV-SOL 013. + + The NFV-MANO functional entity shall support receiving this parameter + as part of the URI query string. The API consumer may supply this + parameter. + + All attribute names that appear in the PmJob and in data types + referenced from it shall be supported by the NFV-MANO functional entity + in the expression. + in: query + required: false + schema: + type: string + filter.Threshold: + name: filter + description: > + Attribute-based filtering expression according to clause 5.2 of ETSI GS + NFV-SOL 013. + + The NFV-MANO functional entity shall support receiving this parameter + as part of the URI query string. The API consumer may supply this + parameter. + + All attribute names that appear in the Threshold and in data types + referenced from it shall be supported by the NFV-MANO functional entity + in the expression. + in: query + required: false + schema: + type: string + filter.PmSubscription: + name: filter + description: > + Attribute-based filtering expression according to clause 5.2 of ETSI GS + NFV-SOL 013. + + The NFV-MANO functional entity shall support receiving this parameter + as part of the URI query string. The API consumer may supply this + parameter. + + All attribute names that appear in the PmSubscription and in data + types referenced from it shall be supported by the NFV-MANO functional + entity in the expression. + in: query + required: false + schema: + type: string + exclude_default.PmJob: + name: exclude_default + description: > + Indicates to exclude the following complex attributes from the + response. See clause 5.3 of ETSI GS NFV-SOL 013 for details. The + NFV-MANO functional entity shall support this parameter. + + The following attributes shall be excluded from the PmJob structure in + the response body if this parameter is provided, or none of the + parameters "all_fields," "fields", "exclude_fields", "exclude_default" + are provided: - none + in: query + required: false + schema: + type: string + subscriptionId: + name: subscriptionId + in: path + description: Identifier of the subscription + required: true + schema: + description: | + An identifier with the intention of being globally unique. + type: string + pmJobId: + name: pmJobId + in: path + description: Identifier of the PM Job + required: true + schema: + description: | + An identifier with the intention of being globally unique. + type: string + reportId: + name: reportId + in: path + description: Identifier of the PM report + required: true + schema: + description: | + An identifier with the intention of being globally unique. + type: string + thresholdId: + name: thresholdId + in: path + description: Identifier of the PM threshold + required: true + schema: + description: | + An identifier with the intention of being globally unique. + type: string + requestBodies: + CreatePMJobRequest: + description: | + PM job creation request. + content: + application/json: + schema: + description: | + This type represents a request to create a PM job. + type: object + properties: + objectType: + description: > + Type of measured object. The applicable measured object type + for a measurement is defined in clause 8.2 of ETSI GS NFV-IFA + 031. + type: string + objectInstanceIds: + description: > + Identifiers of the measured object instance for which + performance information is requested to be collected. This + attribute shall contain the identifier of the instance of the + measure object according to their type. See also definitions + in clause 8.2 of ETSI GS NFV-IFA 031. If more than one + identifier is provided, values shall all refer to measured + object instances of the same type, for which the same criteria + is then applicable. + type: array + items: + description: | + An identifier with the intention of being globally unique. + type: string + minItems: 1 + subObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured object + instance for which performance information is requested to be + collected. May be present if a sub-object is defined in + clause 8.2 of ETSI GS NFV-IFA 031 for the related measured + object type. If this attribute is present, the cardinality of + the "objectInstanceIds" attribute shall be 1. If this + attribute is absent and a sub-object is defined in clause 8.2 + of ETSI GS NFV-IFA 031 for the related measured object type, + measurements will be taken for all sub-object instances of + the measured object instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents collection criteria for PM jobs. + type: object + properties: + performanceMetric: + description: > + This defines the types of performance metrics for the + specified measured object(s). This attribute’s value + shall contain the related "Measurement Name" values as + defined in clause 8.4 of ETSI GS NFV-IFA 031. At least + one of the two attributes (performance metric or group) + shall be present. + type: array + items: + type: string + performanceMetricGroup: + description: > + Group of performance metrics. A metric group is a + pre-defined list of metrics, known to the producer that + it can decompose to individual metrics. This attribute’s + value shall contain the related "Measurement Group" + values as defined in clause 8.4 of ETSI GS NFV-IFA 031. + At least one of the two attributes (performance metric or + group) shall be present. + type: array + items: + type: string + collectionPeriod: + description: > + Specifies the periodicity at which the producer will + collect performance information. The unit shall be + seconds. + + At the end of each reportingPeriod, the producer will + inform the API consumer about availability of the + performance data collected for each completed collection + period during this reportingPeriod. The reportingPeriod + should be equal to or a multiple of the collectionPeriod. + In the latter case, the performance data for the + collection periods within one reporting period are + reported together. + + In particular when choosing short collection and reporting + periods, the number of PM jobs that can be supported + depends on the capability of the producing entity. + type: integer + reportingPeriod: + description: > + Specifies the periodicity at which the producer will + report to the API consumer about performance information. + The unit shall be seconds. + + At the end of each reportingPeriod, the producer will + inform the API consumer about availability of the + performance data collected for each completed collection + period during this reportingPeriod. The reportingPeriod + should be equal to or a multiple of the collectionPeriod. + In the latter case, the performance data for the + collection periods within one reporting period are + reported together. + + In particular when choosing short collection and reporting + periods, the number of PM jobs that can be supported + depends on the capability of the producing entity. + type: integer + reportingBoundary: + description: > + Date-time stamp. Representation: String formatted + according to IETF RFC 3339. + type: string + format: date-time + required: + - collectionPeriod + - reportingPeriod + required: + - objectType + - objectInstanceIds + - criteria + required: true + CreateThesholdRequest: + description: | + Request parameters to create a threshold. + content: + application/json: + schema: + description: | + This type represents a request to create a threshold. + type: object + properties: + objectType: + description: > + Type of measured object. The applicable measured object type + for a measurement is defined in clause 8.2 of ETSI GS NFV-IFA + 031. + type: string + objectInstanceId: + description: | + An identifier with the intention of being globally unique. + type: string + subjObjectInstanceIds: + description: > + Identifiers of the sub-object instances of the measured object + instance associated with this threshold. May be present if a + sub-object is defined in clause 8.2 of ETSI GS NFV-IFA 031 for + the related measured object type. If this attribute is absent + and a sub-object is defined in clause 8.2 of ETSI GS NFV-IFA + 031 for the related measured object type, thresholds will be + set for all sub-object instances of the measured object + instance. + type: array + items: + 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.. + type: string + criteria: + description: | + This type represents criteria that define a threshold. + type: object + properties: + performanceMetric: + description: > + Defines the performance metric associated with the + threshold. This attribute’s value shall contain the + related "Measurement Name" values as defined in clause + 8.4 of ETSI GS NFV-IFA 031 + type: string + thresholdType: + description: > + Type of threshold. This attribute determines which other + attributes are present in the data structure. Permitted + values: + - SIMPLE: Single-valued static threshold + + In the present document, simple thresholds are defined. + The definition of additional threshold types is left for + future specification. + type: string + enum: + - SIMPLE + simpleThresholdDetails: + description: > + Details of a simple threshold. Shall be present if + thresholdType="SIMPLE". + type: object + properties: + thresholdValue: + description: | + A number defined in IETF RFC 8259. + type: number + hysteresis: + description: | + A number defined in IETF RFC 8259. + type: number + required: + - thresholdValue + - hysteresis + required: + - performanceMetric + - thresholdType + required: + - objectType + - objectInstanceId + - criteria + required: true + CreateSubscriptionRequest: + description: | + Details of the subscription to be created. + content: + application/json: + schema: + description: | + This type represents a subscription request. + type: object + properties: + filter: + description: > + This type represents a filter that can be used to subscribe + for notifications related to performance management events. + 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). + type: object + properties: + pmSubscriptionFilter: + description: > + This type represents subscription filter criteria to match + NFV-MANO functional entities and their associated managed + objects. + type: object + properties: + manoEntityId: + description: > + An identifier with the intention of being globally + unique. + type: string + manoServiceIds: + description: "manoServiceIds\tIdentifierInManoEntity\t0..N\tIf present, match NFV-MANO services with an instance identifier listed in this attribute.\nThe attributes \"manoServiceIds\" and \"manoServiceNames\" are alternatives to reference to NFV-MANO services in a filter. They should not be used together in the same filter instance, but one alternative should be chosen.\n" + type: array + items: + 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.. + type: string + manoServiceNames: + description: > + If present, match NFV-MANO services with an NFV-MANO + service name listed in this attribute. + + The attributes "manoServiceIds" and "manoServiceNames" + are alternatives to reference to NFV-MANO services in + a filter. They should not be used together in the + same filter instance, but one alternative should be + chosen. + type: array + items: + type: string + manoServiceInterfaceIds: + description: > + If present, match NFV-MANO functional entity produced + interfaces with an instance identifier listed in this + attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity produced + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + 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.. + type: string + manoServiceInterfaceNames: + description: > + If present, match NFV-MANO functional entity produced + interfaces with an instance Name listed in this + attribute. + + The attributes "manoServiceInterfaceIds" and + "manoServiceInterfaceNames" are alternatives to + reference to NFV-MANO functional entity produced + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + type: string + consumedManoInterfaceIds: + description: > + If present, match NFV-MANO functional entity consumed + interfaces with an instance identifier listed in this + attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to + reference to NFV-MANO functional entity consumed + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + description: > + An identifier with the intention of being globally + unique. + type: string + consumedManoInterfaceNames: + description: > + If present, match NFV-MANO functional entity consumed + interfaces with an instance Name listed in this + attribute. + + The attributes "consumedManoInterfaceIds" and + "consumedManoInterfaceNames" are alternatives to + reference to NFV-MANO functional entity consumed + interfaces in a filter. They should not be used both + in the same filter instance, but one alternative + should be chosen. + type: array + items: + type: string + notificationTypes: + description: > + Match particular notification types. Permitted values: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + + The permitted values of the "notificationTypes" attribute + are spelled exactly as the names of the notification + types to facilitate automated code generation systems. + type: string + enum: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + callbackUri: + description: | + String formatted according to IETF RFC 3986. + type: string + authentication: + type: object + required: + - authType + properties: + authType: + description: > + Defines the types of Authentication / Authorization which + the API consumer is willing to accept when receiving a + notification. Permitted values: * BASIC: In every HTTP + request to the notification endpoint, use + HTTP Basic authentication with the client credentials. + * OAUTH2_CLIENT_CREDENTIALS: In every HTTP request to the + notification endpoint, use an OAuth 2.0 Bearer token, obtained + using the client credentials grant type. + * TLS_CERT: Every HTTP request to the notification + endpoint is sent + over a mutually authenticated TLS session, i.e. not only the + server is authenticated, but also the client is authenticated + during the TLS tunnel setup. + type: array + items: + type: string + enum: + - BASIC + - OAUTH2_CLIENT_CREDENTIALS + - TLS_CERT + paramsBasic: + description: > + Parameters for authentication/authorization using BASIC. + Shall be present if authType is "BASIC" and the contained + information has not been provisioned out of band. Shall be + absent otherwise. + type: object + properties: + userName: + description: > + Username to be used in HTTP Basic authentication. + Shall be present if it has not been provisioned out of + band. + type: string + password: + description: > + Password to be used in HTTP Basic authentication. + Shall be present if it has not been provisioned out of + band. + type: string + paramsOauth2ClientCredentials: + description: > + Parameters for authentication/authorization using + OAUTH2_CLIENT_CREDENTIALS. Shall be present if authType is + "OAUTH2_CLIENT_CREDENTIALS" and the contained information + has not been provisioned out of band. Shall be absent + otherwise. + type: object + properties: + clientId: + description: > + Client identifier to be used in the access token + request of the OAuth 2.0 client credentials grant + type. Shall be present if it has not been provisioned + out of band. The clientId and clientPassword passed in + a subscription shall not be the same as the clientId + and clientPassword that are used to obtain + authorization for API requests. Client credentials may + differ between subscriptions. The value of + clientPassword should be generated by a random + process. + type: string + clientPassword: + description: > + Client password to be used in the access token request + of the OAuth 2.0 client credentials grant type. Shall + be present if it has not been provisioned out of band. + The clientId and clientPassword passed in a + subscription shall not be the same as the clientId and + clientPassword that are used to obtain authorization + for API requests. Client credentials may differ + between subscriptions. The value of clientPassword + should be generated by a random process. + type: string + tokenEndpoint: + description: | + String formatted according to IETF RFC 3986. + type: string + required: + - callbackUri + required: true + diff --git a/SOL009/NFVMANOPerformanceManagement-API/Subscriptions.robot b/SOL009/NFVMANOPerformanceManagement-API/Subscriptions.robot new file mode 100644 index 0000000000000000000000000000000000000000..3af4db1308aac340ab40465804f5fa0d3cda0abf --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/Subscriptions.robot @@ -0,0 +1,322 @@ +*** Settings *** +Library String +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false +Library OperatingSystem +Library JSONLibrary +Resource environment/subscriptions.txt +Library MockServerLibrary +Library Process +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true + +*** Test Cases *** +GET all Performance Subscriptions + [Documentation] Test ID: 8.3.2.6.1 + ... Test title: GET all Performance Subscriptions + ... Test objective: The objective is to test the retrieval of all performance subscriptions and perform a JSON schema validation of the returned subscriptions data structure. + ... Pre-conditions: An instance is instantiated. At least one performance subscription is available. + ... Reference: clause 6.5.8.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get all Performance Subscriptions + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmSubscriptions + +GET Performance Subscriptions with attribute-based filter + [Documentation] Test ID: 8.3.2.6.2 + ... Test title: GET Performance Subscriptions with attribute-based filter + ... Test objective: The objective is to test the retrieval of performance subscriptions using attribute-based filter, perform a JSON schema validation of the collected indicators data structure. + ... Pre-conditions: An instance is instantiated. At least one performance subscription is available. + ... Reference: clause 6.5.8.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get Performance Subscriptions with attribute-based filters + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmSubscriptions + +GET Performance Management Subscriptions with Paged Response + [Documentation] Test ID: 8.3.2.6.3 + ... Test title: GET Performance Management Subscriptions with Paged Response + ... Test objective: The objective is to query information about NFV-MANO Performance Subscriptions to get Paged Response. + ... Pre-conditions: An instance is instantiated. At least one performance subscription is available. + ... Reference: clauseclause 6.5.8.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get all Performance Subscriptions + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Contains Link + +GET Performance Subscriptions with invalid attribute-based filter + [Documentation] Test ID: 8.3.2.6.4 + ... Test title: GET Performance Subscriptions with invalid attribute-based filter + ... Test objective: The objective is to test that the retrieval of performance subscriptions fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. + ... Pre-conditions: An instance is instantiated. At least one performance subscription is available. + ... Reference: clause 6.5.8.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get Performance Subscriptions with invalid attribute-based filters + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Performance Subscriptions - Bad Request Response too Big + [Documentation] Test ID: 8.3.2.6.5 + ... Test title: GET Performance Subscriptions - Bad Request Response too Big + ... Test objective: The objective is to test that the retrieval of NFV-MANO performance subscriptions fails when response is too big, and perform the JSON schema validation of the failed operation HTTP response. + ... Pre-conditions: An instance is instantiated. At least one performance subscription is available. + ... Reference: clause 6.5.8.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: + ... Post-Conditions: + Get all Performance Subscriptions + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Performance Subscriptions with invalid resource endpoint + [Documentation] Test ID: 8.3.2.6.6 + ... Test title: GET Performance Subscriptions with invalid resource endpoint + ... Test objective: The objective is to test that the retrieval of all performance subscriptions fails when using invalid resource endpoint. + ... Pre-conditions: An instance is instantiated. At least one performance subscription is available. + ... Reference: clause 6.5.8.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get Performance Subscriptions with invalid resource endpoint + Check HTTP Response Status Code Is 404 + +Create new Performance subscription + [Documentation] Test ID 8.3.2.6.7 + ... Test title: Create new Performance subscription + ... Test objective: The objective is to test the creation of a new performance subscription and perform a JSON schema and content validation of the returned subscription data structure. + ... Pre-conditions: An instance is instantiated. + ... Reference: clause 6.5.8.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: The performance subscription is successfully set and it matches the issued subscription. + Send Post Request for Performance Subscription + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is PmSubscription + Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription + Check Postcondition Performance Subscription Is Set + + +Create duplicated Performance subscription with NFV-MANO not creating duplicated subscriptions + [Tags] no-duplicated-subs + [Documentation] Test ID 8.3.2.6.8 + ... Test title: Create duplicated Performance subscription with NFV-MANO not creating duplicated subscriptions + ... Test objective: The objective is to test the attempt of a creation of a duplicated performance subscription and check that no new subscription is created by the NFV-MANO and a link to the original subscription is returned + ... Pre-conditions: An instance is instantiated. At least one performance subscription is available in the NFV-MANO. + ... Reference: clause 6.5.8.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: The NFV-MANO does not support the creation of duplicated subscriptions + ... Post-Conditions: The existing performance subscription returned is available in the NFV-MANO + Send Post Request for Duplicated Performance Subscription + Check HTTP Response Status Code Is 303 + Check HTTP Response Body Is Empty + Check HTTP Response Header Contains Location + Check Postcondition Subscription Resource Returned in Location Header Is Available + +Create duplicated Performance subscription with NFV-MANO creating duplicated subscriptions + [Tags] duplicated-subs + [Documentation] Test ID 8.3.2.6.9 + ... Test title: Create duplicated Performance subscription with NFV-MANO creating duplicated subscriptions + ... Test objective: The objective is to test the creation of a duplicated performance subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure. + ... Pre-conditions: An instance is instantiated. At least one performance subscription is available in the NFV-MANO. + ... Reference: clause 6.5.8.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: The NFV-MANO supports the creation of duplicated subscriptions + ... Post-Conditions: The duplicated performance subscription is successfully set and it matches the issued subscription + Send Post Request for Duplicated Performance Subscription + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is PmSubscription + Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription + Check Postcondition Performance Subscription Is Set + +PUT Performance Subscriptions - Method not implemented + [Documentation] Test ID 8.3.2.6.10 + ... Test title: PUT Performance Subscriptions - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify performance subscriptions + ... Pre-conditions: none + ... Reference: clause 6.5.8.3.3 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Put Request for Performance Subscriptions + Check HTTP Response Status Code Is 405 + +PATCH Performance Subscriptions - Method not implemented + [Documentation] Test ID 8.3.2.6.11 + ... Test title: PATCH Performance Subscriptions - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update performance subscriptions + ... Pre-conditions: none + ... Reference: clause 6.5.8.3.4 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Patch Request for Performance Subscriptions + Check HTTP Response Status Code Is 405 + +DELETE Performance Subscriptions - Method not implemented + [Documentation] Test ID 8.3.2.6.12 + ... Test title: DELETE Performance Subscriptions - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete performance subscriptions + ... Pre-conditions: none + ... Reference: clause 6.5.8.3.5 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send Delete Request for Performance Subscriptions + Check HTTP Response Status Code Is 405 + +*** Keywords *** + +Create Sessions + Pass Execution If ${NFVMANO_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not necessary to run + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + +Check Notification Endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + +Check HTTP Response Body Subscription Identifier matches the requested Subscription + Log Trying to check response ID + Should Be Equal As Strings ${response['body']['id']} ${subscriptionId} + Log Subscription identifier as expected + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Header Contains Link + ${linkURL}= Get Value From Json ${response['headers']} $..Link + Should Not Be Empty ${linkURL} + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + Should Contain ${response['headers']['Content-Type']} application/json + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} + Log Json Schema Validation OK + +Check HTTP Response Body Is Empty + Should Be Empty ${response['body']} + Log No json schema is provided. Validation OK + +Get all Performance Subscriptions + Set headers {"Accept": "application/json"} + Set headers {"Content-Type": "application/json"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions + ${output}= Output response + Set Suite Variable ${response} ${output} + + Get Performance Subscriptions with attribute-based filters + Set headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ok} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Performance Subscriptions with invalid attribute-based filters + Set headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ko} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Performance Subscriptions with invalid resource endpoint + Set headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Post Request for Performance Subscription + Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Set headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + Run Keyword If ${NFVMANO_CHECKS_NOTIF_ENDPOINT} == 1 + ... Check Notification Endpoint + +Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription + Log Check Response matches subscription + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + ${subscription}= evaluate json.loads('''${body}''') json + Should Be Equal As Strings ${response['body']['callbackUri']} ${subscription['callbackUri']} + +Check Postcondition Performance Subscription Is Set + Log Check Postcondition subscription exist + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 200 + +Send Post Request for Duplicated Performance Subscription + Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Set headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} + Log Header is present + +Check Postcondition Subscription Resource 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']} + Integer response status 200 + Log Received a 200 OK as expected + ${contentType}= Output response headers Content-Type + Should Contain ${contentType} application/json + ${result}= Output response body + Validate Json PmSubscription.schema.json ${result} + Log Validated PmSubscription schema + +Send Put Request for Performance Subscriptions + [Documentation] This method is not supported. When this method is requested on this resource, the NFV-MANO shall return a "405 Method + ... Not Allowed" response as defined in clause 4.3.5.4. + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Patch Request for Performance Subscriptions + [Documentation] This method is not supported. When this method is requested on this resource, the NFV-MANO shall return a "405 Method + ... Not Allowed" response as defined in clause 4.3.5.4. + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Delete Request for Performance Subscriptions + [Documentation] This method is not supported. When this method is requested on this resource, the NFV-MANO shall return a "405 Method + ... Not Allowed" response as defined in clause 4.3.5.4. + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions + ${output}= Output response + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/Thresholds.robot b/SOL009/NFVMANOPerformanceManagement-API/Thresholds.robot new file mode 100644 index 0000000000000000000000000000000000000000..2cc794a63f6817448a81f92389c38bfcab05d256 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/Thresholds.robot @@ -0,0 +1,223 @@ +*** Settings *** +Library String +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Library JSONLibrary +Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false +Resource environment/thresholds.txt +Library OperatingSystem + +*** Test Cases *** +Create new Performance Threshold + [Documentation] Test ID: 8.3.2.4.1 + ... Test title: Create new Performance Threshold + ... Test objective: The objective is to test the creation of a new NFV-MANO performance threshold and perform the JSON schema validation of the returned threshold data structure. + ... Pre-conditions: A NFV-MANO instance is instantiated. + ... Reference: clause 6.5.6.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: The NFV-MANO Performance Threshold is successfully created on the NFV-MANO + Send Post Request Create new Performance Threshold + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is Threshold + Check HTTP Response Header Contains Location + Check Postcondition Threshold Exists + +GET All Performance Thresholds + [Documentation] Test ID: 8.3.2.4.2 + ... Test title: GET All Performance Thresholds + ... Test objective: The objective is to test the retrieval of all the available NFV-MANO performance thresholds and perform a JSON schema validation of the collected thresholds data structure. + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance thresholds are set. + ... Reference: clause 6.5.6.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET all Performance Thresholds + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is Thresholds + +GET Performance Thresholds with attribute-based filter + [Documentation] Test ID: 8.3.2.4.3 + ... Test title: GET Performance Thresholds with attribute-based filter + ... Test objective: The objective is to test the retrieval of all the available NFV-MANO performance thresholds when using attribute-based filters, perform a JSON schema validation of the collected thresholds data structure, and verify that the retrieved information matches the issued attribute-based filter + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance thresholds are set in the NFV-MANO. + ... Reference: clause 6.5.6.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET Performance Thresholds with attribute-based filter + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is Thresholds + Check HTTP Response Body Thresholds match the requested attribute-based filter + +GET Performance Threshold with Paged Response + [Documentation] Test ID: 8.3.2.4.4 + ... Test title: GET Performance Threshold with Paged Response + ... Test objective: The objective is to query information about NFV-MANO Performance Thresholds to get Paged Response. + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance thresholds are set. + ... Reference: clause 6.5.6.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET all Performance Thresholds + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Contains Link + +GET Performance Thresholds - Invalid attribute-based filter + [Documentation] Test ID: 8.3.2.4.5 + ... Test title: GET Performance Thresholds - Invalid attribute-based filter + ... Test objective: The objective is to test that the retrieval of NFV-MANO performance thresholds fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response. + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance thresholds are set. + ... Reference: clause 6.5.6.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET Performance Thresholds with invalid attribute-based filter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Performance Threshold - Bad Request Response too Big + [Documentation] Test ID: 8.3.2.4.6 + ... Test title: GET Performance Threshold - Bad Request Response too Big + ... Test objective: The objective is to test that the retrieval of NFV-MANO performance thresholds fails when response is too big, and perform the JSON schema validation of the failed operation HTTP response. + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance thresholds are set. + ... Reference: clause 6.5.6.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET all Performance Thresholds + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +PUT Performance Thresholds - Method not implemented + [Documentation] Test ID: 8.3.2.4.7 + ... Test title: PUT Performance Thresholds - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify NFV-MANO Performance Thresholds + ... Pre-conditions: none + ... Reference: clause 6.5.6.3.3 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for all Performance Thresholds + Check HTTP Response Status Code Is 405 + +PATCH Performance Thresholds - Method not implemented + [Documentation] Test ID: 8.3.2.4.8 + ... Test title: PATCH Performance Thresholds - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to modify NFV-MANO Performance Thresholds + ... Pre-conditions: none + ... Reference: clause 6.5.6.3.4 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for all Performance Thresholds + Check HTTP Response Status Code Is 405 + +DELETE Performance Thresholds - Method not implemented + [Documentation] Test ID: 8.3.2.4.9 + ... Test title: DELETE Performance Thresholds - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to update NFV-MANO Performance Thresholds + ... Pre-conditions: none + ... Reference: clause 6.5.6.3.5 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for all Performance Thresholds + Check HTTP Response Status Code Is 405 + +*** Keywords *** +GET all Performance Thresholds + Log Trying to get all thresholds present in the NFV-MANO + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET Performance Thresholds with attribute-based filter + Log Trying to get thresholds present in the NFV-MANO with filter + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_OK} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET Performance Thresholds with invalid attribute-based filter + Log Trying to get thresholds present in the NFV-MANO with invalid filter + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_KO} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Post Request Create new Performance Threshold + Log Creating a new THreshold + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${template}= Get File jsons/CreateThresholdRequest.json + ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PUT Request for all Performance Thresholds + Log PUT THresholds + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for all Performance Thresholds + Log PUT THresholds + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for all Performance Thresholds + Log DELETE THresholds + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check Postcondition Threshold Exists + Log Checking that Threshold exists + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${response['body']['id']} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is Threshold + +Check HTTP Response Body Thresholds match the requested attribute-based filter + Log Checking that attribute-based filter is matched + #todo + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + ${status}= Convert To Integer ${expected_status} + Should Be Equal ${response['status']} ${status} + Log Status code validated + +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} + Log Header is present + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + Should Contain ${response['headers']['Content-Type']} application/json + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} + Log Json Schema Validation OK + +Check HTTP Response Header Contains Link + ${linkURL}= Get Value From Json ${response['headers']} $..Link + Should Not Be Empty ${linkURL} \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/environment/IndividualPmJob.txt b/SOL009/NFVMANOPerformanceManagement-API/environment/IndividualPmJob.txt new file mode 100644 index 0000000000000000000000000000000000000000..b3616b30fa43a63e10b0a61efbaf3c1d1eaf8690 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/environment/IndividualPmJob.txt @@ -0,0 +1,6 @@ +*** Variables *** +${pmJobId} 29f4ff6a-be91-4ec8-856e-fcf1e2479e4e +${erroneousPmJobId} erroneousPmJobId +${newPmJobId} newPmJobId +${response}= httpresponse +${OrigResponse}= httpresponse \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/environment/individualSubscription.txt b/SOL009/NFVMANOPerformanceManagement-API/environment/individualSubscription.txt new file mode 100644 index 0000000000000000000000000000000000000000..945e4c67fb02eb0edffcf2117a82c3a09be6f21d --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/environment/individualSubscription.txt @@ -0,0 +1,5 @@ +*** Variables *** +${erroneousSubscriptionId} erroneousSubscriptionId +${newSubscriptionId} newSubsciptionId +${response} httpresponse +${origResponse} httpresponse \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/environment/individualThresholds.txt b/SOL009/NFVMANOPerformanceManagement-API/environment/individualThresholds.txt new file mode 100644 index 0000000000000000000000000000000000000000..1efba79c6e00a105cad4aadd6afad956a538aece --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/environment/individualThresholds.txt @@ -0,0 +1,6 @@ +*** Variables *** +${thresholdId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a +${erroneousThresholdId} erroneousThresholdId +${newThresholdId} newThresholdId +${response}= httpresponse +${origResponse}= httpresponse \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/environment/notifications.txt b/SOL009/NFVMANOPerformanceManagement-API/environment/notifications.txt new file mode 100644 index 0000000000000000000000000000000000000000..cd1193ae50b7d17b51b86c8ce7582d1fbed8db59 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/environment/notifications.txt @@ -0,0 +1,12 @@ +*** Variables *** +${callback_uri} http://localhost +${callback_port} 9091 +${callback_endpoint} /endpoint +${callback_endpoint_fwd} /endpoint/check +${callback_endpoint_error} /endpoint_404 +${sleep_interval} 20s +${total_polling_time} 2 min +${polling_interval} 10 sec + +${notification_request} [] +${notification_response} [] \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/environment/pmJobs.txt b/SOL009/NFVMANOPerformanceManagement-API/environment/pmJobs.txt new file mode 100644 index 0000000000000000000000000000000000000000..30b6682ef16874d7784cdbcf8a6f1926ecbe06f3 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/environment/pmJobs.txt @@ -0,0 +1,5 @@ +*** Variables *** +${POS_FILTER} objectInstanceIds=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a +${NEG_FILTER} criteriaPmJob=erroneousAttributeName +${fields} criteria,objectInstanceIds +${response} httpresponse diff --git a/SOL009/NFVMANOPerformanceManagement-API/environment/reports.txt b/SOL009/NFVMANOPerformanceManagement-API/environment/reports.txt new file mode 100644 index 0000000000000000000000000000000000000000..6ac5f7c0b020825db1e44161c95118d9b08b5dbd --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/environment/reports.txt @@ -0,0 +1,7 @@ +*** Variables *** +${pmJobId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a +${reportId} 0fb4c875-e07f-46ca-a9dd-13907667a568 +${erroneousReportId} erroneousReportId +${newReportId} newReportId +${response}= httpresponse +${OrigResponse}= httpresponse diff --git a/SOL009/NFVMANOPerformanceManagement-API/environment/subscriptions.txt b/SOL009/NFVMANOPerformanceManagement-API/environment/subscriptions.txt new file mode 100644 index 0000000000000000000000000000000000000000..49e695b6ef244b4e2eb0e96d3ee83f3f3ecbac62 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/environment/subscriptions.txt @@ -0,0 +1,7 @@ +*** Variables *** +${callbackUri} http://172.22.1.7:9091/nfvmanopm/subscriptions +${filter_ok} callbackUri=${callbackUri} +${filter_ko} erroneousFilter=erroneous +${total_polling_time} 2 min +${polling_interval} 10 sec +${response} httpresponse diff --git a/SOL009/NFVMANOPerformanceManagement-API/environment/thresholds.txt b/SOL009/NFVMANOPerformanceManagement-API/environment/thresholds.txt new file mode 100644 index 0000000000000000000000000000000000000000..a2b025eefe44ac943781af1d821275cfc9a5ce0b --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/environment/thresholds.txt @@ -0,0 +1,4 @@ +*** Variables *** +${FILTER_OK} objectInstanceId=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a +${FILTER_KO} criterias=erroneousFilter +${response}= httpresponse \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/environment/variables.txt b/SOL009/NFVMANOPerformanceManagement-API/environment/variables.txt new file mode 100644 index 0000000000000000000000000000000000000000..0d578a2769edb323a6ac4fef20018be45c2c8f00 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/environment/variables.txt @@ -0,0 +1,38 @@ +*** Variables *** +${NFVMANOHOST} localhost # Hostname of the VNFM +${NFVMANO_PORT} 8080 # Listening port of the VNFM +${NFVMANO_SCHEMA} https + + +${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${NEG_AUTHORIZATION} Bearer negativetoken +${BAD_AUTHORIZATION} Bear sometoken + +${CONTENT_TYPE_JSON} application/json +${ACCEPT_JSON} application/json +${AUTH_USAGE} 1 +${FIELD_USAGE} 1 +${NFVMANO_CHECKS_NOTIF_ENDPOINT} 1 ## If true, during subscription, the FUT performs a get to the notification endpoint + +${NFVMANO_ALLOWS_DUPLICATE_SUBS} 1 + +${apiRoot} / +${apiMajorVersion} v1 +${apiName} nfvmanopm + +${callback_port} 9091 +${callback_uri} http://172.22.1.7:${callback_port} +${callback_endpoint} /nfvmanopm/subscriptions +${callback_endpoint_error} /subs_404 +${sleep_interval} 20s + +${total_polling_time} 2 min +${polling_interval} 10 sec + +${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa + +${response} + +${objectInstanceIds} daca910b0-00d4f1a2b675d-604257e42 \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/jsons/CreatePmJobRequest.json b/SOL009/NFVMANOPerformanceManagement-API/jsons/CreatePmJobRequest.json new file mode 100644 index 0000000000000000000000000000000000000000..b69b9f03fac165ad68c7b36224ddb1083037ee9f --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/jsons/CreatePmJobRequest.json @@ -0,0 +1,12 @@ +{{ + "objectType":"dummy", + "objectInstanceIds" : [ + "{objectInstanceIds}" + ], + "criteria" : {{ + "performanceMetric": [], + "performanceMetricGroup": [], + "collectionPeriod": 10, + "reportingPeriod": 30 + }} +}} \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/jsons/CreateThresholdRequest.json b/SOL009/NFVMANOPerformanceManagement-API/jsons/CreateThresholdRequest.json new file mode 100644 index 0000000000000000000000000000000000000000..1162190f7b4a1ded590c469c2c99e8c6f2c9d8e6 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/jsons/CreateThresholdRequest.json @@ -0,0 +1,13 @@ +{{ + "objectType":"", + "objectInstanceIds" : "{objectInstanceIds}", + "criteria" : {{ + "performanceMetric": "cpu_util", + "thresholdType": "SIMPLE", + "simpleThresholdDetails": {{ + "thresholdValue": 10, + "hysteresis": 50 + }} + + }} +}} \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/jsons/subscriptions.json b/SOL009/NFVMANOPerformanceManagement-API/jsons/subscriptions.json new file mode 100644 index 0000000000000000000000000000000000000000..3ca4fc25ae9b33163639f7041e3f50efe537c320 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/jsons/subscriptions.json @@ -0,0 +1,6 @@ +{{ + "callbackUri": "{callback_uri}{callback_endpoint}", + "filter": {{ + "notificationTypes": ["ThresholdCrossedNotification"] + }} +}} \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/schemas/PerformanceInformationAvailableNotification.schema.json b/SOL009/NFVMANOPerformanceManagement-API/schemas/PerformanceInformationAvailableNotification.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..04ae7ead49cbd6f5840c13492612774825d0fb24 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/schemas/PerformanceInformationAvailableNotification.schema.json @@ -0,0 +1,105 @@ +{ + "description": "This notification informs the receiver that performance information is available. The timing of sending this notification is determined by the capability of the producing entity to evaluate the threshold crossing condition. The notification shall be triggered by the VNFM when new performance information collected by a PM job is available.\n", + "type": "object", + "required": [ + "id", + "notificationType", + "subscriptionId", + "timeStamp", + "objectInstanceId", + "_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 \"PerformanceInformationAvailableNotification\" for this notification type.\n", + "type": "string", + "enum": [ + "PerformanceInformationAvailableNotification" + ] + }, + "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" + }, + "objectInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "_links": { + "description": "Links to resources related to this notification.\n", + "type": "object", + "required": [ + "subscription", + "pmJob", + "performanceReport" + ], + "properties": { + "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" + } + } + }, + "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" + } + } + }, + "pmJob": { + "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" + } + } + }, + "performanceReport": { + "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/SOL009/NFVMANOPerformanceManagement-API/schemas/PerformanceReport.schema.json b/SOL009/NFVMANOPerformanceManagement-API/schemas/PerformanceReport.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..9ca35fcfad6ece2c167822cecce9247083479f38 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/schemas/PerformanceReport.schema.json @@ -0,0 +1,92 @@ +{ + "description": "This type defines the format of a performance report provided by the NFV-MANO functional entity to the API consumer as a result of collecting performance information as part of a PM job. \n", + "type": "object", + "properties": { + "entries": { + "description": "List of performance information entries. Each performance report entry is for a given metric of a given object (i.e. measured object instance) corresponding to the related measured object types, but can include multiple collected values.\n", + "type": "array", + "items": { + "type": "object", + "properties": { + "objectType": { + "description": "Type of measured object. The applicable measured object type for a measurement is defined in clause 8.2 of ETSI GS NFV-IFA 031.\n", + "type": "string" + }, + "objectInstanceId": { + "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" + ] + }, + "subObjectInstanceId": { + "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" + }, + "performanceMetric": { + "description": "Name of the metric collected. This attribute shall contain the related \"Measurement Name\" value as defined in clause 8.4 of ETSI GS NFV-IFA 031.\n", + "type": "string" + }, + "performanceValues": { + "description": "List of performance values with associated timestamp.\n", + "type": "array", + "items": { + "type": "object", + "properties": { + "timeStamp": { + "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", + "type": "string", + "format": "date-time" + }, + "value": { + "description": "Value of the metric collected. The type of this attribute shall correspond to the related \"Measurement Unit\" as defined in clause 8.4 of ETSI GS NFV-IFA 031.\n" + }, + "context": { + "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 keyvalue pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259. In the following example, a list of key-value pairs with four keys (\"aString\", \"aNumber\", \"anArray\" and \"anObject\") is provided to illustrate that the values associated with different keys can be of different type.\n", + "type": "object" + } + }, + "required": [ + "timeStamp", + "value" + ] + }, + "minItems": 1 + } + }, + "required": [ + "objectType", + "objectInstanceId", + "performanceMetric", + "performanceValues" + ] + }, + "minItems": 1 + } + }, + "required": [ + "entries" + ] + } \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/schemas/PmJob.schema.json b/SOL009/NFVMANOPerformanceManagement-API/schemas/PmJob.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..7b48339025f1174223872001c61c9d5b9636efa7 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/schemas/PmJob.schema.json @@ -0,0 +1,145 @@ +{ + "description": "This type represents a PM job. \n", + "type": "object", + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "objectType": { + "description": "Type of measured object. The applicable measured object type for a measurement is defined in clause 8.2 of ETSI GS NFV-IFA 031.\n", + "type": "string" + }, + "objectInstanceIds": { + "description": "Identifiers of the measured object instance for which performance information is collected. This attribute shall contain the identifier of the instance of the measure object according to their type. See also definitions in clause 8.2 of ETSI GS NFV-IFA 031.\n", + "type": "array", + "items": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "minItems": 1 + }, + "subObjectInstanceIds": { + "description": "Identifiers of the sub-object instances of the measured object instance for which performance information is requested to be collected. May be present if a sub-object is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the related measured object type. If this attribute is present, the cardinality of the \"objectInstanceIds\" attribute shall be 1. If this attribute is absent and a sub-object is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the related measured object type, measurements will be taken for all sub-object instances of the measured object instance.\n", + "type": "array", + "items": { + "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" + } + }, + "criteria": { + "description": "This type represents collection criteria for PM jobs.\n", + "type": "object", + "properties": { + "performanceMetric": { + "description": "This defines the types of performance metrics for the specified measured object(s). This attribute’s value shall contain the related \"Measurement Name\" values as defined in clause 8.4 of ETSI GS NFV-IFA 031. At least one of the two attributes (performance metric or group) shall be present.\n", + "type": "array", + "items": { + "type": "string" + } + }, + "performanceMetricGroup": { + "description": "Group of performance metrics. A metric group is a pre-defined list of metrics, known to the producer that it can decompose to individual metrics. This attribute’s value shall contain the related \"Measurement Group\" values as defined in clause 8.4 of ETSI GS NFV-IFA 031. At least one of the two attributes (performance metric or group) shall be present.\n", + "type": "array", + "items": { + "type": "string" + } + }, + "collectionPeriod": { + "description": "Specifies the periodicity at which the producer will collect performance information. The unit shall be seconds. \nAt the end of each reportingPeriod, the producer will inform the API consumer about availability of the performance data collected for each completed collection period during this reportingPeriod. The reportingPeriod should be equal to or a multiple of the collectionPeriod. In the latter case, the performance data for the collection periods within one reporting period are reported together. \nIn particular when choosing short collection and reporting periods, the number of PM jobs that can be supported depends on the capability of the producing entity.\n", + "type": "integer" + }, + "reportingPeriod": { + "description": "Specifies the periodicity at which the producer will report to the API consumer about performance information. The unit shall be seconds.\nAt the end of each reportingPeriod, the producer will inform the API consumer about availability of the performance data collected for each completed collection period during this reportingPeriod. The reportingPeriod should be equal to or a multiple of the collectionPeriod. In the latter case, the performance data for the collection periods within one reporting period are reported together. \nIn particular when choosing short collection and reporting periods, the number of PM jobs that can be supported depends on the capability of the producing entity.\n", + "type": "integer" + }, + "reportingBoundary": { + "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "collectionPeriod", + "reportingPeriod" + ] + }, + "reports": { + "description": "Information about available reports collected by this PM job.\n", + "type": "array", + "items": { + "type": "object", + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + }, + "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": "Unsigned integer\n", + "type": "number" + } + }, + "required": [ + "href", + "readyTime" + ] + } + }, + "_links": { + "description": "Links for this resource.\n", + "type": "object", + "properties": { + "self": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "objects": { + "description": "Links to resources representing the measured object instances for which performance information is collected. Shall be present if the measured object instance information is accessible as a resource.\n", + "type": "array", + "items": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + }, + "required": [ + "self" + ] + } + }, + "required": [ + "id", + "objectType", + "objectInstanceIds", + "criteria", + "_links" + ] +} \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/schemas/PmJobs.schema.json b/SOL009/NFVMANOPerformanceManagement-API/schemas/PmJobs.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..95ada1a027d9f038cfeff106698e5f03f420ea49 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/schemas/PmJobs.schema.json @@ -0,0 +1,148 @@ +{ + "type": "array", + "items": { + "description": "This type represents a PM job. \n", + "type": "object", + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "objectType": { + "description": "Type of measured object. The applicable measured object type for a measurement is defined in clause 8.2 of ETSI GS NFV-IFA 031.\n", + "type": "string" + }, + "objectInstanceIds": { + "description": "Identifiers of the measured object instance for which performance information is collected. This attribute shall contain the identifier of the instance of the measure object according to their type. See also definitions in clause 8.2 of ETSI GS NFV-IFA 031.\n", + "type": "array", + "items": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "minItems": 1 + }, + "subObjectInstanceIds": { + "description": "Identifiers of the sub-object instances of the measured object instance for which performance information is requested to be collected. May be present if a sub-object is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the related measured object type. If this attribute is present, the cardinality of the \"objectInstanceIds\" attribute shall be 1. If this attribute is absent and a sub-object is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the related measured object type, measurements will be taken for all sub-object instances of the measured object instance.\n", + "type": "array", + "items": { + "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" + } + }, + "criteria": { + "description": "This type represents collection criteria for PM jobs.\n", + "type": "object", + "properties": { + "performanceMetric": { + "description": "This defines the types of performance metrics for the specified measured object(s). This attribute’s value shall contain the related \"Measurement Name\" values as defined in clause 8.4 of ETSI GS NFV-IFA 031. At least one of the two attributes (performance metric or group) shall be present.\n", + "type": "array", + "items": { + "type": "string" + } + }, + "performanceMetricGroup": { + "description": "Group of performance metrics. A metric group is a pre-defined list of metrics, known to the producer that it can decompose to individual metrics. This attribute’s value shall contain the related \"Measurement Group\" values as defined in clause 8.4 of ETSI GS NFV-IFA 031. At least one of the two attributes (performance metric or group) shall be present.\n", + "type": "array", + "items": { + "type": "string" + } + }, + "collectionPeriod": { + "description": "Specifies the periodicity at which the producer will collect performance information. The unit shall be seconds. \nAt the end of each reportingPeriod, the producer will inform the API consumer about availability of the performance data collected for each completed collection period during this reportingPeriod. The reportingPeriod should be equal to or a multiple of the collectionPeriod. In the latter case, the performance data for the collection periods within one reporting period are reported together. \nIn particular when choosing short collection and reporting periods, the number of PM jobs that can be supported depends on the capability of the producing entity.\n", + "type": "integer" + }, + "reportingPeriod": { + "description": "Specifies the periodicity at which the producer will report to the API consumer about performance information. The unit shall be seconds.\nAt the end of each reportingPeriod, the producer will inform the API consumer about availability of the performance data collected for each completed collection period during this reportingPeriod. The reportingPeriod should be equal to or a multiple of the collectionPeriod. In the latter case, the performance data for the collection periods within one reporting period are reported together. \nIn particular when choosing short collection and reporting periods, the number of PM jobs that can be supported depends on the capability of the producing entity.\n", + "type": "integer" + }, + "reportingBoundary": { + "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "collectionPeriod", + "reportingPeriod" + ] + }, + "reports": { + "description": "Information about available reports collected by this PM job.\n", + "type": "array", + "items": { + "type": "object", + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + }, + "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": "Unsigned integer\n", + "type": "number" + } + }, + "required": [ + "href", + "readyTime" + ] + } + }, + "_links": { + "description": "Links for this resource.\n", + "type": "object", + "properties": { + "self": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "objects": { + "description": "Links to resources representing the measured object instances for which performance information is collected. Shall be present if the measured object instance information is accessible as a resource.\n", + "type": "array", + "items": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + }, + "required": [ + "self" + ] + } + }, + "required": [ + "id", + "objectType", + "objectInstanceIds", + "criteria", + "_links" + ] +} +} \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/schemas/PmSubscription.schema.json b/SOL009/NFVMANOPerformanceManagement-API/schemas/PmSubscription.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..848628dcc1ad95cd5852a32b90cd59380e43b235 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/schemas/PmSubscription.schema.json @@ -0,0 +1,110 @@ +{ + "description": "This type represents a subscription. \n", + "type": "object", + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "filter": { + "description": "This type represents a filter that can be used to subscribe for notifications related to performance management events. 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": { + "pmSubscriptionFilter": { + "description": "This type represents subscription filter criteria to match NFV-MANO functional entities and their associated managed objects. \n", + "type": "object", + "properties": { + "manoEntityId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "manoServiceIds": { + "description": "manoServiceIds\tIdentifierInManoEntity\t0..N\tIf present, match NFV-MANO services with an instance identifier listed in this attribute.\nThe attributes \"manoServiceIds\" and \"manoServiceNames\" are alternatives to reference to NFV-MANO services in a filter. They should not be used together in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "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" + } + }, + "manoServiceNames": { + "description": "If present, match NFV-MANO services with an NFV-MANO service name listed in this attribute.\nThe attributes \"manoServiceIds\" and \"manoServiceNames\" are alternatives to reference to NFV-MANO services in a filter. They should not be used together in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "type": "string" + } + }, + "manoServiceInterfaceIds": { + "description": "If present, match NFV-MANO functional entity produced interfaces with an instance identifier listed in this attribute.\nThe attributes \"manoServiceInterfaceIds\" and \"manoServiceInterfaceNames\" are alternatives to reference to NFV-MANO functional entity produced interfaces in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "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" + } + }, + "manoServiceInterfaceNames": { + "description": "If present, match NFV-MANO functional entity produced interfaces with an instance Name listed in this attribute.\nThe attributes \"manoServiceInterfaceIds\" and \"manoServiceInterfaceNames\" are alternatives to reference to NFV-MANO functional entity produced interfaces in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "type": "string" + } + }, + "consumedManoInterfaceIds": { + "description": "If present, match NFV-MANO functional entity consumed interfaces with an instance identifier listed in this attribute.\nThe attributes \"consumedManoInterfaceIds\" and \"consumedManoInterfaceNames\" are alternatives to reference to NFV-MANO functional entity consumed interfaces in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + } + }, + "consumedManoInterfaceNames": { + "description": "If present, match NFV-MANO functional entity consumed interfaces with an instance Name listed in this attribute.\nThe attributes \"consumedManoInterfaceIds\" and \"consumedManoInterfaceNames\" are alternatives to reference to NFV-MANO functional entity consumed interfaces in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "notificationTypes": { + "description": "Match particular notification types. Permitted values:\n - ThresholdCrossedNotification\n - PerformanceInformationAvailableNotification\n\nThe permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n", + "type": "string", + "enum": [ + "ThresholdCrossedNotification", + "PerformanceInformationAvailableNotification" + ] + } + } + }, + "callbackUri": { + "description": "The URI of the endpoint to send the notification to.\n", + "type": "object", + "properties": { + "links": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + }, + "self": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + }, + "required": [ + "links", + "self" + ] + } + }, + "required": [ + "id", + "callbackUri" + ] + } \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/schemas/PmSubscriptions.schema.json b/SOL009/NFVMANOPerformanceManagement-API/schemas/PmSubscriptions.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..50d8ef1dd9e2a5fa3803fb3d6b3ffd02f79e7905 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/schemas/PmSubscriptions.schema.json @@ -0,0 +1,113 @@ +{ +"type": "array", + "items": { + "description": "This type represents a subscription. \n", + "type": "object", + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "filter": { + "description": "This type represents a filter that can be used to subscribe for notifications related to performance management events. 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": { + "pmSubscriptionFilter": { + "description": "This type represents subscription filter criteria to match NFV-MANO functional entities and their associated managed objects. \n", + "type": "object", + "properties": { + "manoEntityId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "manoServiceIds": { + "description": "manoServiceIds\tIdentifierInManoEntity\t0..N\tIf present, match NFV-MANO services with an instance identifier listed in this attribute.\nThe attributes \"manoServiceIds\" and \"manoServiceNames\" are alternatives to reference to NFV-MANO services in a filter. They should not be used together in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "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" + } + }, + "manoServiceNames": { + "description": "If present, match NFV-MANO services with an NFV-MANO service name listed in this attribute.\nThe attributes \"manoServiceIds\" and \"manoServiceNames\" are alternatives to reference to NFV-MANO services in a filter. They should not be used together in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "type": "string" + } + }, + "manoServiceInterfaceIds": { + "description": "If present, match NFV-MANO functional entity produced interfaces with an instance identifier listed in this attribute.\nThe attributes \"manoServiceInterfaceIds\" and \"manoServiceInterfaceNames\" are alternatives to reference to NFV-MANO functional entity produced interfaces in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "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" + } + }, + "manoServiceInterfaceNames": { + "description": "If present, match NFV-MANO functional entity produced interfaces with an instance Name listed in this attribute.\nThe attributes \"manoServiceInterfaceIds\" and \"manoServiceInterfaceNames\" are alternatives to reference to NFV-MANO functional entity produced interfaces in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "type": "string" + } + }, + "consumedManoInterfaceIds": { + "description": "If present, match NFV-MANO functional entity consumed interfaces with an instance identifier listed in this attribute.\nThe attributes \"consumedManoInterfaceIds\" and \"consumedManoInterfaceNames\" are alternatives to reference to NFV-MANO functional entity consumed interfaces in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + } + }, + "consumedManoInterfaceNames": { + "description": "If present, match NFV-MANO functional entity consumed interfaces with an instance Name listed in this attribute.\nThe attributes \"consumedManoInterfaceIds\" and \"consumedManoInterfaceNames\" are alternatives to reference to NFV-MANO functional entity consumed interfaces in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "notificationTypes": { + "description": "Match particular notification types. Permitted values:\n - ThresholdCrossedNotification\n - PerformanceInformationAvailableNotification\n\nThe permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n", + "type": "string", + "enum": [ + "ThresholdCrossedNotification", + "PerformanceInformationAvailableNotification" + ] + } + } + }, + "callbackUri": { + "description": "The URI of the endpoint to send the notification to.\n", + "type": "object", + "properties": { + "links": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + }, + "self": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + }, + "required": [ + "links", + "self" + ] + } + }, + "required": [ + "id", + "callbackUri" + ] + } +} \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/schemas/ProblemDetails.schema.json b/SOL009/NFVMANOPerformanceManagement-API/schemas/ProblemDetails.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..2af3ef9b3f8c0e1dc6bfa39a818ba45e63ca223c --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/schemas/ProblemDetails.schema.json @@ -0,0 +1 @@ +{ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n", "type": "object", "required": [ "status", "detail" ], "properties": { "type": { "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n", "type": "string", "format": "URI" }, "title": { "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n", "type": "string" }, "status": { "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n", "type": "integer" }, "detail": { "description": "A human-readable explanation specific to this occurrence of the problem.\n", "type": "string" }, "instance": { "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n", "type": "string", "format": "URI" } }} \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/schemas/Threshold.schema.json b/SOL009/NFVMANOPerformanceManagement-API/schemas/Threshold.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..02454617308f2280494512f81d4b96e7b9ca9a0c --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/schemas/Threshold.schema.json @@ -0,0 +1,108 @@ +{ + "description": "", + "type": "object", + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "objectType": { + "description": "Type of measured object. The applicable measured object type for a measurement is defined in clause 8.2 of ETSI GS NFV-IFA 031.", + "type": "string" + }, + "objectInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "subjObjectInstanceIds": { + "description": "Identifiers of the sub-object instances of the measured object instance associated with this threshold. May be present if a sub-object is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the related measured object type. If this attribute is absent and a sub-object is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the related measured object type, thresholds are set for all sub-object instances of the measured object instance.\n", + "type": "array", + "items": { + "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" + } + }, + "criteria": { + "description": "This type represents criteria that define a threshold.\n", + "type": "object", + "properties": { + "performanceMetric": { + "description": "Defines the performance metric associated with the threshold. This attribute’s value shall contain the related \"Measurement Name\" values as defined in clause 8.4 of ETSI GS NFV-IFA 031 \n", + "type": "string" + }, + "thresholdType": { + "description": "Type of threshold. This attribute determines which other attributes are present in the data structure. Permitted values:\n - SIMPLE: Single-valued static threshold\n\nIn the present document, simple thresholds are defined. The definition of additional threshold types is left for future specification.\n", + "type": "string", + "enum": [ + "SIMPLE" + ] + }, + "simpleThresholdDetails": { + "description": "Details of a simple threshold. Shall be present if thresholdType=\"SIMPLE\".\n", + "type": "object", + "properties": { + "thresholdValue": { + "description": "A number defined in IETF RFC 8259.\n", + "type": "number" + }, + "hysteresis": { + "description": "A number defined in IETF RFC 8259.\n", + "type": "number" + } + }, + "required": [ + "thresholdValue", + "hysteresis" + ] + } + }, + "required": [ + "performanceMetric", + "thresholdType" + ] + }, + "_links": { + "description": "Links for this resource.\n", + "type": "object", + "properties": { + "self": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "object": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + }, + "required": [ + "self" + ] + } + }, + "required": [ + "id", + "objectType", + "objectInstanceId", + "subjObjectInstanceIds", + "criteria", + "_links" + ] + } \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/schemas/ThresholdCrossedNotification.schema.json b/SOL009/NFVMANOPerformanceManagement-API/schemas/ThresholdCrossedNotification.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..e5cec2303f1bcfcfdb9df5affc9fc0767cd8a2c8 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/schemas/ThresholdCrossedNotification.schema.json @@ -0,0 +1,113 @@ +{ + "description": "This type represents a notification that is sent when a threshold has been crossed. The notification shall be triggered by the VNFM when a threshold has been crossed.\n", + "type": "object", + "required": [ + "id", + "notificationType", + "subscriptionId", + "timeStamp", + "thresholdId", + "crossingDirection", + "objectInstanceId", + "performanceMetric", + "performanceValue", + "_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 \"ThresholdCrossedNotification\" for this notification type.\n", + "type": "string", + "enum": [ + "ThresholdCrossedNotification" + ] + }, + "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" + }, + "thresholdId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "crossingDirection": { + "type": "string", + "enum": [ + "UP", + "DOWN" + ] + }, + "objectInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "performanceMetric": { + "description": "Performance metric associated with the threshold.\n", + "type": "string" + }, + "performanceValue": { + "description": "Value of the metric that resulted in threshold crossing. The type of the \"performanceValue\" attribute (i.e. scalar, structure (Object in JSON), or array (of scalars, arrays or structures / Objects)) is assumed to be defined in the external measurement specification (see ETSI GS NFV-IFA 027).\n", + "type": "object" + }, + "_links": { + "description": "Links to resources related to this notification.\n", + "type": "object", + "required": [ + "subscription", + "threshold" + ], + "properties": { + "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" + } + } + }, + "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" + } + } + }, + "threshold": { + "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/SOL009/NFVMANOPerformanceManagement-API/schemas/Thresholds.schema.json b/SOL009/NFVMANOPerformanceManagement-API/schemas/Thresholds.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..4b1ce898104ba3ce7a5af0fd81e0f59660b24e86 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/schemas/Thresholds.schema.json @@ -0,0 +1,111 @@ +{ + "type": "array", + "items": { + "description": "", + "type": "object", + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "objectType": { + "description": "Type of measured object. The applicable measured object type for a measurement is defined in clause 8.2 of ETSI GS NFV-IFA 031.", + "type": "string" + }, + "objectInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "subjObjectInstanceIds": { + "description": "Identifiers of the sub-object instances of the measured object instance associated with this threshold. May be present if a sub-object is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the related measured object type. If this attribute is absent and a sub-object is defined in clause 8.2 of ETSI GS NFV-IFA 031 for the related measured object type, thresholds are set for all sub-object instances of the measured object instance.\n", + "type": "array", + "items": { + "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" + } + }, + "criteria": { + "description": "This type represents criteria that define a threshold.\n", + "type": "object", + "properties": { + "performanceMetric": { + "description": "Defines the performance metric associated with the threshold. This attribute’s value shall contain the related \"Measurement Name\" values as defined in clause 8.4 of ETSI GS NFV-IFA 031 \n", + "type": "string" + }, + "thresholdType": { + "description": "Type of threshold. This attribute determines which other attributes are present in the data structure. Permitted values:\n - SIMPLE: Single-valued static threshold\n\nIn the present document, simple thresholds are defined. The definition of additional threshold types is left for future specification.\n", + "type": "string", + "enum": [ + "SIMPLE" + ] + }, + "simpleThresholdDetails": { + "description": "Details of a simple threshold. Shall be present if thresholdType=\"SIMPLE\".\n", + "type": "object", + "properties": { + "thresholdValue": { + "description": "A number defined in IETF RFC 8259.\n", + "type": "number" + }, + "hysteresis": { + "description": "A number defined in IETF RFC 8259.\n", + "type": "number" + } + }, + "required": [ + "thresholdValue", + "hysteresis" + ] + } + }, + "required": [ + "performanceMetric", + "thresholdType" + ] + }, + "_links": { + "description": "Links for this resource.\n", + "type": "object", + "properties": { + "self": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "object": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + }, + "required": [ + "self" + ] + } + }, + "required": [ + "id", + "objectType", + "objectInstanceId", + "subjObjectInstanceIds", + "criteria", + "_links" + ] + } +} \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/schemas/criteria.schema.json b/SOL009/NFVMANOPerformanceManagement-API/schemas/criteria.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..319d15f53d4d49980a3c4c451bc82efd983abf36 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/schemas/criteria.schema.json @@ -0,0 +1,34 @@ +{ + "description": "Criteria of the collection of performance information.\n", + "type": "object", + "required": ["collectionPeriod", "reportingPeriod"], + "properties": { + "performanceMetric": { + "description": "This defines the types of performance metrics for the specified object instances, as specified in ETSI GS NFV-IFA 027). At least one of the two attributes (performance metric or group) shall be present.\n", + "type": "array", + "items": { + "type": "string" + } + }, + "performanceMetricGroup": { + "description": "Group of performance metrics. A metric group is a pre-defined list of metrics, known to the producer that it can decompose to individual metrics. At least one of the two attributes (performance metric or group) shall be present.\n", + "type": "array", + "items": { + "type": "string" + } + }, + "collectionPeriod": { + "description": "Specifies the periodicity at which the producer will collect performance information. The unit shall be seconds. At the end of each reportingPeriod, the producer will inform the consumer about availability of the performance data collected for each completed collection period during this reportingPeriod. The reportingPeriod should be equal to or a multiple of the collectionPeriod. In the latter case, the performance data for the collection periods within one reporting period are reported together.\n", + "type": "integer" + }, + "reportingPeriod": { + "description": "Specifies the periodicity at which the producer will report to the consumer. about performance information. The unit shall be seconds. At the end of each reportingPeriod, the producer will inform the consumer about availability of the performance data collected for each completed collection period during this reportingPeriod. The reportingPeriod should be equal to or a multiple of the collectionPeriod. In the latter case, the performance data for the collection periods within one reporting period are reported together.\n", + "type": "integer" + }, + "reportingBoundary": { + "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", + "type": "string", + "format": "date-time" + } + } +} \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/schemas/links.schema.json b/SOL009/NFVMANOPerformanceManagement-API/schemas/links.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..ef262a8c875b5c00bf32d4fd6f279cc4d5965bc9 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/schemas/links.schema.json @@ -0,0 +1,35 @@ +{ + "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" + } + } + } + } + } +} \ No newline at end of file diff --git a/libspecs/BuiltIn.libspec b/libspecs/BuiltIn.libspec new file mode 100644 index 0000000000000000000000000000000000000000..1f1b093cfa0ee9e161638b03e820e4d8b3b59853 --- /dev/null +++ b/libspecs/BuiltIn.libspec @@ -0,0 +1,2823 @@ + + +3.1 +global +yes +An always available standard library with often needed keywords. + +``BuiltIn`` is Robot Framework's standard library that provides a set +of generic keywords needed often. It is imported automatically and +thus always available. The provided keywords can be used, for example, +for verifications (e.g. `Should Be Equal`, `Should Contain`), +conversions (e.g. `Convert To Integer`) and for various other purposes +(e.g. `Log`, `Sleep`, `Run Keyword If`, `Set Global Variable`). + +== Table of contents == + +- `HTML error messages` +- `Evaluating expressions` +- `Boolean arguments` +- `Pattern matching` +- `Multiline string comparisons` +- `Shortcuts` +- `Keywords` + += HTML error messages = + +Many of the keywords accept an optional error message to use if the keyword +fails, and it is possible to use HTML in these messages by prefixing them +with ``*HTML*``. See `Fail` keyword for a usage example. Notice that using +HTML in messages is not limited to BuiltIn library but works with any +error message. + += Evaluating expressions = + +Many keywords, such as `Evaluate`, `Run Keyword If` and `Should Be True`, +accept an expression that is evaluated in Python. These expressions are +evaluated using Python's +[http://docs.python.org/library/functions.html#eval|eval] function so +that all Python built-ins like ``len()`` and ``int()`` are available. +`Evaluate` allows configuring the execution namespace with custom modules, +and other keywords have [http://docs.python.org/library/os.html|os] +and [http://docs.python.org/library/sys.html|sys] modules available +automatically. + +Examples: +| `Run Keyword If` | os.sep == '/' | Log | Not on Windows | +| ${random int} = | `Evaluate` | random.randint(0, 5) | modules=random | + +When a variable is used in the expressing using the normal ``${variable}`` +syntax, its value is replaces before the expression is evaluated. This +means that the value used in the expression will be the string +representation of the variable value, not the variable value itself. +This is not a problem with numbers and other objects that have a string +representation that can be evaluated directly, but with other objects +the behavior depends on the string representation. Most importantly, +strings must always be quoted, and if they can contain newlines, they must +be triple quoted. + +Examples: +| `Should Be True` | ${rc} < 10 | Return code greater than 10 | +| `Run Keyword If` | '${status}' == 'PASS' | Log | Passed | +| `Run Keyword If` | 'FAIL' in '''${output}''' | Log | Output contains FAIL | + +Starting from Robot Framework 2.9, variables themselves are automatically +available in the evaluation namespace. They can be accessed using special +variable syntax without the curly braces like ``$variable``. These +variables should never be quoted, and in fact they are not even replaced +inside strings. + +Examples: +| `Should Be True` | $rc < 10 | Return code greater than 10 | +| `Run Keyword If` | $status == 'PASS' | `Log` | Passed | +| `Run Keyword If` | 'FAIL' in $output | `Log` | Output contains FAIL | +| `Should Be True` | len($result) > 1 and $result[1] == 'OK' | + +Using the ``$variable`` syntax slows down expression evaluation a little. +This should not typically matter, but should be taken into account if +complex expressions are evaluated often and there are strict time +constrains. + +Notice that instead of creating complicated expressions, it is often better +to move the logic into a test library. That eases maintenance and can also +enhance execution speed. + += Boolean arguments = + +Some keywords accept arguments that are handled as Boolean values true or +false. If such an argument is given as a string, it is considered false if +it is an empty string or equal to ``FALSE``, ``NONE``, ``NO``, ``OFF`` or +``0``, case-insensitively. Keywords verifying something that allow dropping +actual and expected values from the possible error message also consider +string ``no values`` to be false. Other strings are considered true +regardless their value, and other argument types are tested using the same +[http://docs.python.org/library/stdtypes.html#truth|rules as in Python]. + +True examples: +| `Should Be Equal` | ${x} | ${y} | Custom error | values=True | # Strings are generally true. | +| `Should Be Equal` | ${x} | ${y} | Custom error | values=yes | # Same as the above. | +| `Should Be Equal` | ${x} | ${y} | Custom error | values=${TRUE} | # Python ``True`` is true. | +| `Should Be Equal` | ${x} | ${y} | Custom error | values=${42} | # Numbers other than 0 are true. | + +False examples: +| `Should Be Equal` | ${x} | ${y} | Custom error | values=False | # String ``false`` is false. | +| `Should Be Equal` | ${x} | ${y} | Custom error | values=no | # Also string ``no`` is false. | +| `Should Be Equal` | ${x} | ${y} | Custom error | values=${EMPTY} | # Empty string is false. | +| `Should Be Equal` | ${x} | ${y} | Custom error | values=${FALSE} | # Python ``False`` is false. | +| `Should Be Equal` | ${x} | ${y} | Custom error | values=no values | # ``no values`` works with ``values`` argument | + +Considering string ``NONE`` false is new in Robot Framework 3.0.3 and +considering also ``OFF`` and ``0`` false is new in Robot Framework 3.1. + += Pattern matching = + +Many keywords accepts arguments as either glob or regular expression +patterns. + +== Glob patterns == + +Some keywords, for example `Should Match`, support so called +[http://en.wikipedia.org/wiki/Glob_(programming)|glob patterns] where: + +| ``*`` | matches any string, even an empty string | +| ``?`` | matches any single character | +| ``[chars]`` | matches one character in the bracket | +| ``[!chars]`` | matches one character not in the bracket | +| ``[a-z]`` | matches one character from the range in the bracket | +| ``[!a-z]`` | matches one character not from the range in the bracket | + +Unlike with glob patterns normally, path separator characters ``/`` and +``\`` and the newline character ``\n`` are matches by the above +wildcards. + +Support for brackets like ``[abc]`` and ``[!a-z]`` is new in +Robot Framework 3.1 + +== Regular expressions == + +Some keywords, for example `Should Match Regexp`, support +[http://en.wikipedia.org/wiki/Regular_expression|regular expressions] +that are more powerful but also more complicated that glob patterns. +The regular expression support is implemented using Python's +[http://docs.python.org/library/re.html|re module] and its documentation +should be consulted for more information about the syntax. + +Because the backslash character (``\``) is an escape character in +Robot Framework test data, possible backslash characters in regular +expressions need to be escaped with another backslash like ``\\d\\w+``. +Strings that may contain special characters but should be handled +as literal strings, can be escaped with the `Regexp Escape` keyword. + += Multiline string comparisons = + +`Should Be Equal` and `Should Be Equal As Strings` report the failures using +[http://en.wikipedia.org/wiki/Diff_utility#Unified_format|unified diff +format] if both strings have more than two lines. New in Robot Framework +2.9.1. + +Example: +| ${first} = | `Catenate` | SEPARATOR=\n | Not in second | Same | Differs | Same | +| ${second} = | `Catenate` | SEPARATOR=\n | Same | Differs2 | Same | Not in first | +| `Should Be Equal` | ${first} | ${second} | + +Results in the following error message: + +| Multiline strings are different: +| --- first +| +++ second +| @@ -1,4 +1,4 @@ +| -Not in second +| Same +| -Differs +| +Differs2 +| Same +| +Not in first + + +object +method_name +*args +**kwargs + +Calls the named method of the given object with the provided arguments. + +The possible return value from the method is returned and can be +assigned to a variable. Keyword fails both if the object does not have +a method with the given name or if executing the method raises an +exception. + +Support for ``**kwargs`` is new in Robot Framework 2.9. Since that +possible equal signs in other arguments must be escaped with a +backslash like ``\=``. + +Examples: +| Call Method | ${hashtable} | put | myname | myvalue | +| ${isempty} = | Call Method | ${hashtable} | isEmpty | | +| Should Not Be True | ${isempty} | | | | +| ${value} = | Call Method | ${hashtable} | get | myname | +| Should Be Equal | ${value} | myvalue | | | +| Call Method | ${object} | kwargs | name=value | foo=bar | +| Call Method | ${object} | positional | escaped\=equals | + + + + + +*items + +Catenates the given items together and returns the resulted string. + +By default, items are catenated with spaces, but if the first item +contains the string ``SEPARATOR=<sep>``, the separator ``<sep>`` is +used instead. Items are converted into strings when necessary. + +Examples: +| ${str1} = | Catenate | Hello | world | | +| ${str2} = | Catenate | SEPARATOR=--- | Hello | world | +| ${str3} = | Catenate | SEPARATOR= | Hello | world | +=> +| ${str1} = 'Hello world' +| ${str2} = 'Hello---world' +| ${str3} = 'Helloworld' + + + + + +*messages + +Displays the given messages in the log file as keyword arguments. + +This keyword does nothing with the arguments it receives, but as they +are visible in the log, this keyword can be used to display simple +messages. Given arguments are ignored so thoroughly that they can even +contain non-existing variables. If you are interested about variable +values, you can use the `Log` or `Log Many` keywords. + + + + + + +Skips the current for loop iteration and continues from the next. + +Skips the remaining keywords in the current for loop iteration and +continues from the next one. Can be used directly in a for loop or +in a keyword that the loop uses. + +Example: +| :FOR | ${var} | IN | @{VALUES} | +| | Run Keyword If | '${var}' == 'CONTINUE' | Continue For Loop | +| | Do Something | ${var} | + +See `Continue For Loop If` to conditionally continue a for loop without +using `Run Keyword If` or other wrapper keywords. + + + + + +condition + +Skips the current for loop iteration if the ``condition`` is true. + +A wrapper for `Continue For Loop` to continue a for loop based on +the given condition. The condition is evaluated using the same +semantics as with `Should Be True` keyword. + +Example: +| :FOR | ${var} | IN | @{VALUES} | +| | Continue For Loop If | '${var}' == 'CONTINUE' | +| | Do Something | ${var} | + + + + + +item +base=None +prefix=None +length=None + +Converts the given item to a binary string. + +The ``item``, with an optional ``base``, is first converted to an +integer using `Convert To Integer` internally. After that it +is converted to a binary number (base 2) represented as a +string such as ``1011``. + +The returned value can contain an optional ``prefix`` and can be +required to be of minimum ``length`` (excluding the prefix and a +possible minus sign). If the value is initially shorter than +the required length, it is padded with zeros. + +Examples: +| ${result} = | Convert To Binary | 10 | | | # Result is 1010 | +| ${result} = | Convert To Binary | F | base=16 | prefix=0b | # Result is 0b1111 | +| ${result} = | Convert To Binary | -2 | prefix=B | length=4 | # Result is -B0010 | + +See also `Convert To Integer`, `Convert To Octal` and `Convert To Hex`. + + + + + +item + +Converts the given item to Boolean true or false. + +Handles strings ``True`` and ``False`` (case-insensitive) as expected, +otherwise returns item's +[http://docs.python.org/library/stdtypes.html#truth|truth value] +using Python's ``bool()`` method. + + + + + +input +input_type=text + +Converts the given ``input`` to bytes according to the ``input_type``. + +Valid input types are listed below: + +- ``text:`` Converts text to bytes character by character. All + characters with ordinal below 256 can be used and are converted to + bytes with same values. Many characters are easiest to represent + using escapes like ``\x00`` or ``\xff``. Supports both Unicode + strings and bytes. + +- ``int:`` Converts integers separated by spaces to bytes. Similarly as + with `Convert To Integer`, it is possible to use binary, octal, or + hex values by prefixing the values with ``0b``, ``0o``, or ``0x``, + respectively. + +- ``hex:`` Converts hexadecimal values to bytes. Single byte is always + two characters long (e.g. ``01`` or ``FF``). Spaces are ignored and + can be used freely as a visual separator. + +- ``bin:`` Converts binary values to bytes. Single byte is always eight + characters long (e.g. ``00001010``). Spaces are ignored and can be + used freely as a visual separator. + +In addition to giving the input as a string, it is possible to use +lists or other iterables containing individual characters or numbers. +In that case numbers do not need to be padded to certain length and +they cannot contain extra spaces. + +Examples (last column shows returned bytes): +| ${bytes} = | Convert To Bytes | hyvä | | # hyv\xe4 | +| ${bytes} = | Convert To Bytes | \xff\x07 | | # \xff\x07 | +| ${bytes} = | Convert To Bytes | 82 70 | int | # RF | +| ${bytes} = | Convert To Bytes | 0b10 0x10 | int | # \x02\x10 | +| ${bytes} = | Convert To Bytes | ff 00 07 | hex | # \xff\x00\x07 | +| ${bytes} = | Convert To Bytes | 5246212121 | hex | # RF!!! | +| ${bytes} = | Convert To Bytes | 0000 1000 | bin | # \x08 | +| ${input} = | Create List | 1 | 2 | 12 | +| ${bytes} = | Convert To Bytes | ${input} | int | # \x01\x02\x0c | +| ${bytes} = | Convert To Bytes | ${input} | hex | # \x01\x02\x12 | + +Use `Encode String To Bytes` in ``String`` library if you need to +convert text to bytes using a certain encoding. + + + + + +item +base=None +prefix=None +length=None +lowercase=False + +Converts the given item to a hexadecimal string. + +The ``item``, with an optional ``base``, is first converted to an +integer using `Convert To Integer` internally. After that it +is converted to a hexadecimal number (base 16) represented as +a string such as ``FF0A``. + +The returned value can contain an optional ``prefix`` and can be +required to be of minimum ``length`` (excluding the prefix and a +possible minus sign). If the value is initially shorter than +the required length, it is padded with zeros. + +By default the value is returned as an upper case string, but the +``lowercase`` argument a true value (see `Boolean arguments`) turns +the value (but not the given prefix) to lower case. + +Examples: +| ${result} = | Convert To Hex | 255 | | | # Result is FF | +| ${result} = | Convert To Hex | -10 | prefix=0x | length=2 | # Result is -0x0A | +| ${result} = | Convert To Hex | 255 | prefix=X | lowercase=yes | # Result is Xff | + +See also `Convert To Integer`, `Convert To Binary` and `Convert To Octal`. + + + + + +item +base=None + +Converts the given item to an integer number. + +If the given item is a string, it is by default expected to be an +integer in base 10. There are two ways to convert from other bases: + +- Give base explicitly to the keyword as ``base`` argument. + +- Prefix the given string with the base so that ``0b`` means binary + (base 2), ``0o`` means octal (base 8), and ``0x`` means hex (base 16). + The prefix is considered only when ``base`` argument is not given and + may itself be prefixed with a plus or minus sign. + +The syntax is case-insensitive and possible spaces are ignored. + +Examples: +| ${result} = | Convert To Integer | 100 | | # Result is 100 | +| ${result} = | Convert To Integer | FF AA | 16 | # Result is 65450 | +| ${result} = | Convert To Integer | 100 | 8 | # Result is 64 | +| ${result} = | Convert To Integer | -100 | 2 | # Result is -4 | +| ${result} = | Convert To Integer | 0b100 | | # Result is 4 | +| ${result} = | Convert To Integer | -0x100 | | # Result is -256 | + +See also `Convert To Number`, `Convert To Binary`, `Convert To Octal`, +`Convert To Hex`, and `Convert To Bytes`. + + + + + +item +precision=None + +Converts the given item to a floating point number. + +If the optional ``precision`` is positive or zero, the returned number +is rounded to that number of decimal digits. Negative precision means +that the number is rounded to the closest multiple of 10 to the power +of the absolute precision. If a number is equally close to a certain +precision, it is always rounded away from zero. + +Examples: +| ${result} = | Convert To Number | 42.512 | | # Result is 42.512 | +| ${result} = | Convert To Number | 42.512 | 1 | # Result is 42.5 | +| ${result} = | Convert To Number | 42.512 | 0 | # Result is 43.0 | +| ${result} = | Convert To Number | 42.512 | -1 | # Result is 40.0 | + +Notice that machines generally cannot store floating point numbers +accurately. This may cause surprises with these numbers in general +and also when they are rounded. For more information see, for example, +these resources: + +- http://docs.python.org/tutorial/floatingpoint.html +- http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition + +If you want to avoid possible problems with floating point numbers, +you can implement custom keywords using Python's +[http://docs.python.org/library/decimal.html|decimal] or +[http://docs.python.org/library/fractions.html|fractions] modules. + +If you need an integer number, use `Convert To Integer` instead. + + + + + +item +base=None +prefix=None +length=None + +Converts the given item to an octal string. + +The ``item``, with an optional ``base``, is first converted to an +integer using `Convert To Integer` internally. After that it +is converted to an octal number (base 8) represented as a +string such as ``775``. + +The returned value can contain an optional ``prefix`` and can be +required to be of minimum ``length`` (excluding the prefix and a +possible minus sign). If the value is initially shorter than +the required length, it is padded with zeros. + +Examples: +| ${result} = | Convert To Octal | 10 | | | # Result is 12 | +| ${result} = | Convert To Octal | -F | base=16 | prefix=0 | # Result is -017 | +| ${result} = | Convert To Octal | 16 | prefix=oct | length=4 | # Result is oct0020 | + +See also `Convert To Integer`, `Convert To Binary` and `Convert To Hex`. + + + + + +item + +Converts the given item to a Unicode string. + +Uses ``__unicode__`` or ``__str__`` method with Python objects and +``toString`` with Java objects. + +Use `Encode String To Bytes` and `Decode Bytes To String` keywords +in ``String`` library if you need to convert between Unicode and byte +strings using different encodings. Use `Convert To Bytes` if you just +want to create byte strings. + + + + + +*items + +Creates and returns a dictionary based on the given ``items``. + +Items are typically given using the ``key=value`` syntax same way as +``&{dictionary}`` variables are created in the Variable table. Both +keys and values can contain variables, and possible equal sign in key +can be escaped with a backslash like ``escaped\=key=value``. It is +also possible to get items from existing dictionaries by simply using +them like ``&{dict}``. + +Alternatively items can be specified so that keys and values are given +separately. This and the ``key=value`` syntax can even be combined, +but separately given items must be first. + +If same key is used multiple times, the last value has precedence. +The returned dictionary is ordered, and values with strings as keys +can also be accessed using a convenient dot-access syntax like +``${dict.key}``. + +Examples: +| &{dict} = | Create Dictionary | key=value | foo=bar | | | # key=value syntax | +| Should Be True | ${dict} == {'key': 'value', 'foo': 'bar'} | +| &{dict2} = | Create Dictionary | key | value | foo | bar | # separate key and value | +| Should Be Equal | ${dict} | ${dict2} | +| &{dict} = | Create Dictionary | ${1}=${2} | &{dict} | foo=new | | # using variables | +| Should Be True | ${dict} == {1: 2, 'key': 'value', 'foo': 'new'} | +| Should Be Equal | ${dict.key} | value | | | | # dot-access | + +This keyword was changed in Robot Framework 2.9 in many ways: +- Moved from ``Collections`` library to ``BuiltIn``. +- Support also non-string keys in ``key=value`` syntax. +- Returned dictionary is ordered and dot-accessible. +- Old syntax to give keys and values separately was deprecated, but + deprecation was later removed in RF 3.0.1. + + + + + +*items + +Returns a list containing given items. + +The returned list can be assigned both to ``${scalar}`` and ``@{list}`` +variables. + +Examples: +| @{list} = | Create List | a | b | c | +| ${scalar} = | Create List | a | b | c | +| ${ints} = | Create List | ${1} | ${2} | ${3} | + + + + + +expression +modules=None +namespace=None + +Evaluates the given expression in Python and returns the results. + +``expression`` is evaluated in Python as explained in `Evaluating +expressions`. + +``modules`` argument can be used to specify a comma separated +list of Python modules to be imported and added to the evaluation +namespace. + +``namespace`` argument can be used to pass a custom evaluation +namespace as a dictionary. Possible ``modules`` are added to this +namespace. + +Variables used like ``${variable}`` are replaced in the expression +before evaluation. Variables are also available in the evaluation +namespace and can be accessed using special syntax ``$variable``. +This is a new feature in Robot Framework 2.9 and it is explained more +thoroughly in `Evaluating expressions`. + +Examples (expecting ``${result}`` is 3.14): +| ${status} = | Evaluate | 0 < ${result} < 10 | # Would also work with string '3.14' | +| ${status} = | Evaluate | 0 < $result < 10 | # Using variable itself, not string representation | +| ${random} = | Evaluate | random.randint(0, sys.maxint) | modules=random, sys | +| ${ns} = | Create Dictionary | x=${4} | y=${2} | +| ${result} = | Evaluate | x*10 + y | namespace=${ns} | +=> +| ${status} = True +| ${random} = <random integer> +| ${result} = 42 + + + + + + +Stops executing the enclosing for loop. + +Exits the enclosing for loop and continues execution after it. +Can be used directly in a for loop or in a keyword that the loop uses. + +Example: +| :FOR | ${var} | IN | @{VALUES} | +| | Run Keyword If | '${var}' == 'EXIT' | Exit For Loop | +| | Do Something | ${var} | + +See `Exit For Loop If` to conditionally exit a for loop without +using `Run Keyword If` or other wrapper keywords. + + + + + +condition + +Stops executing the enclosing for loop if the ``condition`` is true. + +A wrapper for `Exit For Loop` to exit a for loop based on +the given condition. The condition is evaluated using the same +semantics as with `Should Be True` keyword. + +Example: +| :FOR | ${var} | IN | @{VALUES} | +| | Exit For Loop If | '${var}' == 'EXIT' | +| | Do Something | ${var} | + + + + + +msg=None +*tags + +Fails the test with the given message and optionally alters its tags. + +The error message is specified using the ``msg`` argument. +It is possible to use HTML in the given error message, similarly +as with any other keyword accepting an error message, by prefixing +the error with ``*HTML*``. + +It is possible to modify tags of the current test case by passing tags +after the message. Tags starting with a hyphen (e.g. ``-regression``) +are removed and others added. Tags are modified using `Set Tags` and +`Remove Tags` internally, and the semantics setting and removing them +are the same as with these keywords. + +Examples: +| Fail | Test not ready | | | # Fails with the given message. | +| Fail | *HTML*<b>Test not ready</b> | | | # Fails using HTML in the message. | +| Fail | Test not ready | not-ready | | # Fails and adds 'not-ready' tag. | +| Fail | OS not supported | -regression | | # Removes tag 'regression'. | +| Fail | My message | tag | -t* | # Removes all tags starting with 't' except the newly added 'tag'. | + +See `Fatal Error` if you need to stop the whole test execution. + + + + + +msg=None + +Stops the whole test execution. + +The test or suite where this keyword is used fails with the provided +message, and subsequent tests fail with a canned message. +Possible teardowns will nevertheless be executed. + +See `Fail` if you only want to stop one test case unconditionally. + + + + + +item1 +item2 + +Returns and logs how many times ``item2`` is found from ``item1``. + +This keyword works with Python strings and lists and all objects +that either have ``count`` method or can be converted to Python lists. + +Example: +| ${count} = | Get Count | ${some item} | interesting value | +| Should Be True | 5 < ${count} < 10 | + + + + + +item + +Returns and logs the length of the given item as an integer. + +The item can be anything that has a length, for example, a string, +a list, or a mapping. The keyword first tries to get the length with +the Python function ``len``, which calls the item's ``__len__`` method +internally. If that fails, the keyword tries to call the item's +possible ``length`` and ``size`` methods directly. The final attempt is +trying to get the value of the item's ``length`` attribute. If all +these attempts are unsuccessful, the keyword fails. + +Examples: +| ${length} = | Get Length | Hello, world! | | +| Should Be Equal As Integers | ${length} | 13 | +| @{list} = | Create List | Hello, | world! | +| ${length} = | Get Length | ${list} | | +| Should Be Equal As Integers | ${length} | 2 | + +See also `Length Should Be`, `Should Be Empty` and `Should Not Be +Empty`. + + + + + +name=None +all=False + +Returns the currently active instance of the specified test library. + +This keyword makes it easy for test libraries to interact with +other test libraries that have state. This is illustrated by +the Python example below: + +| from robot.libraries.BuiltIn import BuiltIn +| +| def title_should_start_with(expected): +| seleniumlib = BuiltIn().get_library_instance('SeleniumLibrary') +| title = seleniumlib.get_title() +| if not title.startswith(expected): +| raise AssertionError("Title '%s' did not start with '%s'" +| % (title, expected)) + +It is also possible to use this keyword in the test data and +pass the returned library instance to another keyword. If a +library is imported with a custom name, the ``name`` used to get +the instance must be that name and not the original library name. + +If the optional argument ``all`` is given a true value, then a +dictionary mapping all library names to instances will be returned. +This feature is new in Robot Framework 2.9.2. + +Example: +| &{all libs} = | Get library instance | all=True | + + + + + +format=timestamp +time_=NOW + +Returns the given time in the requested format. + +*NOTE:* DateTime library contains much more flexible keywords for +getting the current date and time and for date and time handling in +general. + +How time is returned is determined based on the given ``format`` +string as follows. Note that all checks are case-insensitive. + +1) If ``format`` contains the word ``epoch``, the time is returned + in seconds after the UNIX epoch (1970-01-01 00:00:00 UTC). + The return value is always an integer. + +2) If ``format`` contains any of the words ``year``, ``month``, + ``day``, ``hour``, ``min``, or ``sec``, only the selected parts are + returned. The order of the returned parts is always the one + in the previous sentence and the order of words in ``format`` + is not significant. The parts are returned as zero-padded + strings (e.g. May -> ``05``). + +3) Otherwise (and by default) the time is returned as a + timestamp string in the format ``2006-02-24 15:08:31``. + +By default this keyword returns the current local time, but +that can be altered using ``time`` argument as explained below. +Note that all checks involving strings are case-insensitive. + +1) If ``time`` is a number, or a string that can be converted to + a number, it is interpreted as seconds since the UNIX epoch. + This documentation was originally written about 1177654467 + seconds after the epoch. + +2) If ``time`` is a timestamp, that time will be used. Valid + timestamp formats are ``YYYY-MM-DD hh:mm:ss`` and + ``YYYYMMDD hhmmss``. + +3) If ``time`` is equal to ``NOW`` (default), the current local + time is used. + +4) If ``time`` is equal to ``UTC``, the current time in + [http://en.wikipedia.org/wiki/Coordinated_Universal_Time|UTC] + is used. + +5) If ``time`` is in the format like ``NOW - 1 day`` or ``UTC + 1 hour + 30 min``, the current local/UTC time plus/minus the time + specified with the time string is used. The time string format + is described in an appendix of Robot Framework User Guide. + +Examples (expecting the current local time is 2006-03-29 15:06:21): +| ${time} = | Get Time | | | | +| ${secs} = | Get Time | epoch | | | +| ${year} = | Get Time | return year | | | +| ${yyyy} | ${mm} | ${dd} = | Get Time | year,month,day | +| @{time} = | Get Time | year month day hour min sec | | | +| ${y} | ${s} = | Get Time | seconds and year | | +=> +| ${time} = '2006-03-29 15:06:21' +| ${secs} = 1143637581 +| ${year} = '2006' +| ${yyyy} = '2006', ${mm} = '03', ${dd} = '29' +| @{time} = ['2006', '03', '29', '15', '06', '21'] +| ${y} = '2006' +| ${s} = '21' + +Examples (expecting the current local time is 2006-03-29 15:06:21 and +UTC time is 2006-03-29 12:06:21): +| ${time} = | Get Time | | 1177654467 | # Time given as epoch seconds | +| ${secs} = | Get Time | sec | 2007-04-27 09:14:27 | # Time given as a timestamp | +| ${year} = | Get Time | year | NOW | # The local time of execution | +| @{time} = | Get Time | hour min sec | NOW + 1h 2min 3s | # 1h 2min 3s added to the local time | +| @{utc} = | Get Time | hour min sec | UTC | # The UTC time of execution | +| ${hour} = | Get Time | hour | UTC - 1 hour | # 1h subtracted from the UTC time | +=> +| ${time} = '2007-04-27 09:14:27' +| ${secs} = 27 +| ${year} = '2006' +| @{time} = ['16', '08', '24'] +| @{utc} = ['12', '06', '21'] +| ${hour} = '11' + + + + + +name +default=None + +Returns variable value or ``default`` if the variable does not exist. + +The name of the variable can be given either as a normal variable name +(e.g. ``${NAME}``) or in escaped format (e.g. ``\${NAME}``). Notice +that the former has some limitations explained in `Set Suite Variable`. + +Examples: +| ${x} = | Get Variable Value | ${a} | default | +| ${y} = | Get Variable Value | ${a} | ${b} | +| ${z} = | Get Variable Value | ${z} | | +=> +| ${x} gets value of ${a} if ${a} exists and string 'default' otherwise +| ${y} gets value of ${a} if ${a} exists and value of ${b} otherwise +| ${z} is set to Python None if it does not exist previously + +See `Set Variable If` for another keyword to set variables dynamically. + + + + + +no_decoration=False + +Returns a dictionary containing all variables in the current scope. + +Variables are returned as a special dictionary that allows accessing +variables in space, case, and underscore insensitive manner similarly +as accessing variables in the test data. This dictionary supports all +same operations as normal Python dictionaries and, for example, +Collections library can be used to access or modify it. Modifying the +returned dictionary has no effect on the variables available in the +current scope. + +By default variables are returned with ``${}``, ``@{}`` or ``&{}`` +decoration based on variable types. Giving a true value (see `Boolean +arguments`) to the optional argument ``no_decoration`` will return +the variables without the decoration. This option is new in Robot +Framework 2.9. + +Example: +| ${example_variable} = | Set Variable | example value | +| ${variables} = | Get Variables | | +| Dictionary Should Contain Key | ${variables} | \${example_variable} | +| Dictionary Should Contain Key | ${variables} | \${ExampleVariable} | +| Set To Dictionary | ${variables} | \${name} | value | +| Variable Should Not Exist | \${name} | | | +| ${no decoration} = | Get Variables | no_decoration=Yes | +| Dictionary Should Contain Key | ${no decoration} | example_variable | + + + + + +name +*args + +Imports a library with the given name and optional arguments. + +This functionality allows dynamic importing of libraries while tests +are running. That may be necessary, if the library itself is dynamic +and not yet available when test data is processed. In a normal case, +libraries should be imported using the Library setting in the Setting +table. + +This keyword supports importing libraries both using library +names and physical paths. When paths are used, they must be +given in absolute format or found from +[http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#pythonpath-jythonpath-and-ironpythonpath| +search path]. Forward slashes can be used as path separators in all +operating systems. + +It is possible to pass arguments to the imported library and also +named argument syntax works if the library supports it. ``WITH NAME`` +syntax can be used to give a custom name to the imported library. + +Examples: +| Import Library | MyLibrary | +| Import Library | ${CURDIR}/../Library.py | arg1 | named=arg2 | +| Import Library | ${LIBRARIES}/Lib.java | arg | WITH NAME | JavaLib | + + + + + +path + +Imports a resource file with the given path. + +Resources imported with this keyword are set into the test suite scope +similarly when importing them in the Setting table using the Resource +setting. + +The given path must be absolute or found from +[http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#pythonpath-jythonpath-and-ironpythonpath| +search path]. Forward slashes can be used as path separator regardless +the operating system. + +Examples: +| Import Resource | ${CURDIR}/resource.txt | +| Import Resource | ${CURDIR}/../resources/resource.html | +| Import Resource | found_from_pythonpath.robot | + + + + + +path +*args + +Imports a variable file with the given path and optional arguments. + +Variables imported with this keyword are set into the test suite scope +similarly when importing them in the Setting table using the Variables +setting. These variables override possible existing variables with +the same names. This functionality can thus be used to import new +variables, for example, for each test in a test suite. + +The given path must be absolute or found from +[http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#pythonpath-jythonpath-and-ironpythonpath| +search path]. Forward slashes can be used as path separator regardless +the operating system. + +Examples: +| Import Variables | ${CURDIR}/variables.py | | | +| Import Variables | ${CURDIR}/../vars/env.py | arg1 | arg2 | +| Import Variables | file_from_pythonpath.py | | | + + + + + +name +msg=None + +Fails unless the given keyword exists in the current scope. + +Fails also if there are more than one keywords with the same name. +Works both with the short name (e.g. ``Log``) and the full name +(e.g. ``BuiltIn.Log``). + +The default error message can be overridden with the ``msg`` argument. + +See also `Variable Should Exist`. + + + + + +item +length +msg=None + +Verifies that the length of the given item is correct. + +The length of the item is got using the `Get Length` keyword. The +default error message can be overridden with the ``msg`` argument. + + + + + +message +level=INFO +html=False +console=False +repr=False + +Logs the given message with the given level. + +Valid levels are TRACE, DEBUG, INFO (default), HTML, WARN, and ERROR. +Messages below the current active log level are ignored. See +`Set Log Level` keyword and ``--loglevel`` command line option +for more details about setting the level. + +Messages logged with the WARN or ERROR levels will be automatically +visible also in the console and in the Test Execution Errors section +in the log file. + +Logging can be configured using optional ``html``, ``console`` and +``repr`` arguments. They are off by default, but can be enabled +by giving them a true value. See `Boolean arguments` section for more +information about true and false values. + +If the ``html`` argument is given a true value, the message will be +considered HTML and special characters such as ``<`` in it are not +escaped. For example, logging ``<img src="image.png">`` creates an +image when ``html`` is true, but otherwise the message is that exact +string. An alternative to using the ``html`` argument is using the HTML +pseudo log level. It logs the message as HTML using the INFO level. + +If the ``console`` argument is true, the message will be written to +the console where test execution was started from in addition to +the log file. This keyword always uses the standard output stream +and adds a newline after the written message. Use `Log To Console` +instead if either of these is undesirable, + +If the ``repr`` argument is true, the given item will be passed through +a custom version of Python's ``pprint.pformat()`` function before +logging it. This is useful, for example, when working with strings or +bytes containing invisible characters, or when working with nested data +structures. The custom version differs from the standard one so that it +omits the ``u`` prefix from Unicode strings and adds ``b`` prefix to +byte strings on Python 2. + +Examples: +| Log | Hello, world! | | | # Normal INFO message. | +| Log | Warning, world! | WARN | | # Warning. | +| Log | <b>Hello</b>, world! | html=yes | | # INFO message as HTML. | +| Log | <b>Hello</b>, world! | HTML | | # Same as above. | +| Log | <b>Hello</b>, world! | DEBUG | html=true | # DEBUG as HTML. | +| Log | Hello, console! | console=yes | | # Log also to the console. | +| Log | Hyvä \x00 | repr=yes | | # Log ``'Hyv\xe4 \x00'``. | + +See `Log Many` if you want to log multiple messages in one go, and +`Log To Console` if you only want to write to the console. + + + + + +*messages + +Logs the given messages as separate entries using the INFO level. + +Supports also logging list and dictionary variable items individually. + +Examples: +| Log Many | Hello | ${var} | +| Log Many | @{list} | &{dict} | + +See `Log` and `Log To Console` keywords if you want to use alternative +log levels, use HTML, or log to the console. + + + + + +message +stream=STDOUT +no_newline=False + +Logs the given message to the console. + +By default uses the standard output stream. Using the standard error +stream is possibly by giving the ``stream`` argument value ``STDERR`` +(case-insensitive). + +By default appends a newline to the logged message. This can be +disabled by giving the ``no_newline`` argument a true value (see +`Boolean arguments`). + +Examples: +| Log To Console | Hello, console! | | +| Log To Console | Hello, stderr! | STDERR | +| Log To Console | Message starts here and is | no_newline=true | +| Log To Console | continued without newline. | | + +This keyword does not log the message to the normal log file. Use +`Log` keyword, possibly with argument ``console``, if that is desired. + + + + + +level=INFO + +Logs all variables in the current scope with given log level. + + + + + + +Does absolutely nothing. + + + + + +message +*tags + +Skips rest of the current test, setup, or teardown with PASS status. + +This keyword can be used anywhere in the test data, but the place where +used affects the behavior: + +- When used in any setup or teardown (suite, test or keyword), passes + that setup or teardown. Possible keyword teardowns of the started + keywords are executed. Does not affect execution or statuses + otherwise. +- When used in a test outside setup or teardown, passes that particular + test case. Possible test and keyword teardowns are executed. + +Possible continuable failures before this keyword is used, as well as +failures in executed teardowns, will fail the execution. + +It is mandatory to give a message explaining why execution was passed. +By default the message is considered plain text, but starting it with +``*HTML*`` allows using HTML formatting. + +It is also possible to modify test tags passing tags after the message +similarly as with `Fail` keyword. Tags starting with a hyphen +(e.g. ``-regression``) are removed and others added. Tags are modified +using `Set Tags` and `Remove Tags` internally, and the semantics +setting and removing them are the same as with these keywords. + +Examples: +| Pass Execution | All features available in this version tested. | +| Pass Execution | Deprecated test. | deprecated | -regression | + +This keyword is typically wrapped to some other keyword, such as +`Run Keyword If`, to pass based on a condition. The most common case +can be handled also with `Pass Execution If`: + +| Run Keyword If | ${rc} < 0 | Pass Execution | Negative values are cool. | +| Pass Execution If | ${rc} < 0 | Negative values are cool. | + +Passing execution in the middle of a test, setup or teardown should be +used with care. In the worst case it leads to tests that skip all the +parts that could actually uncover problems in the tested application. +In cases where execution cannot continue do to external factors, +it is often safer to fail the test case and make it non-critical. + + + + + +condition +message +*tags + +Conditionally skips rest of the current test, setup, or teardown with PASS status. + +A wrapper for `Pass Execution` to skip rest of the current test, +setup or teardown based the given ``condition``. The condition is +evaluated similarly as with `Should Be True` keyword, and ``message`` +and ``*tags`` have same semantics as with `Pass Execution`. + +Example: +| :FOR | ${var} | IN | @{VALUES} | +| | Pass Execution If | '${var}' == 'EXPECTED' | Correct value was found | +| | Do Something | ${var} | + + + + + +*patterns + +Returns each argument string escaped for use as a regular expression. + +This keyword can be used to escape strings to be used with +`Should Match Regexp` and `Should Not Match Regexp` keywords. + +Escaping is done with Python's ``re.escape()`` function. + +Examples: +| ${escaped} = | Regexp Escape | ${original} | +| @{strings} = | Regexp Escape | @{strings} | + + + + + +name_or_instance + +Rechecks what keywords the specified library provides. + +Can be called explicitly in the test data or by a library itself +when keywords it provides have changed. + +The library can be specified by its name or as the active instance of +the library. The latter is especially useful if the library itself +calls this keyword as a method. + +New in Robot Framework 2.9. + + + + + +*tags + +Removes given ``tags`` from the current test or all tests in a suite. + +Tags can be given exactly or using a pattern with ``*``, ``?`` and +``[chars]`` acting as wildcards. See the `Glob patterns` section +for more information. + +This keyword can affect either one test case or all test cases in a +test suite similarly as `Set Tags` keyword. + +The current tags are available as a built-in variable ``@{TEST TAGS}``. + +Example: +| Remove Tags | mytag | something-* | ?ython | + +See `Set Tags` if you want to add certain tags and `Fail` if you want +to fail the test case after setting and/or removing tags. + + + + + +repeat +name +*args + +Executes the specified keyword multiple times. + +``name`` and ``args`` define the keyword that is executed similarly as +with `Run Keyword`. ``repeat`` specifies how many times (as a count) or +how long time (as a timeout) the keyword should be executed. + +If ``repeat`` is given as count, it specifies how many times the +keyword should be executed. ``repeat`` can be given as an integer or +as a string that can be converted to an integer. If it is a string, +it can have postfix ``times`` or ``x`` (case and space insensitive) +to make the expression more explicit. + +If ``repeat`` is given as timeout, it must be in Robot Framework's +time format (e.g. ``1 minute``, ``2 min 3 s``). Using a number alone +(e.g. ``1`` or ``1.5``) does not work in this context. + +If ``repeat`` is zero or negative, the keyword is not executed at +all. This keyword fails immediately if any of the execution +rounds fails. + +Examples: +| Repeat Keyword | 5 times | Go to Previous Page | +| Repeat Keyword | ${var} | Some Keyword | arg1 | arg2 | +| Repeat Keyword | 2 minutes | Some Keyword | arg1 | arg2 | + +Specifying ``repeat`` as a timeout is new in Robot Framework 3.0. + + + + + +text + +Replaces variables in the given text with their current values. + +If the text contains undefined variables, this keyword fails. +If the given ``text`` contains only a single variable, its value is +returned as-is and it can be any object. Otherwise this keyword +always returns a string. + +Example: + +The file ``template.txt`` contains ``Hello ${NAME}!`` and variable +``${NAME}`` has the value ``Robot``. + +| ${template} = | Get File | ${CURDIR}/template.txt | +| ${message} = | Replace Variables | ${template} | +| Should Be Equal | ${message} | Hello Robot! | + + + + + +*return_values + +Returns from the enclosing user keyword. + +This keyword can be used to return from a user keyword with PASS status +without executing it fully. It is also possible to return values +similarly as with the ``[Return]`` setting. For more detailed information +about working with the return values, see the User Guide. + +This keyword is typically wrapped to some other keyword, such as +`Run Keyword If` or `Run Keyword If Test Passed`, to return based +on a condition: + +| Run Keyword If | ${rc} < 0 | Return From Keyword | +| Run Keyword If Test Passed | Return From Keyword | + +It is possible to use this keyword to return from a keyword also inside +a for loop. That, as well as returning values, is demonstrated by the +`Find Index` keyword in the following somewhat advanced example. +Notice that it is often a good idea to move this kind of complicated +logic into a test library. + +| ***** Variables ***** +| @{LIST} = foo baz +| +| ***** Test Cases ***** +| Example +| ${index} = Find Index baz @{LIST} +| Should Be Equal ${index} ${1} +| ${index} = Find Index non existing @{LIST} +| Should Be Equal ${index} ${-1} +| +| ***** Keywords ***** +| Find Index +| [Arguments] ${element} @{items} +| ${index} = Set Variable ${0} +| :FOR ${item} IN @{items} +| \ Run Keyword If '${item}' == '${element}' Return From Keyword ${index} +| \ ${index} = Set Variable ${index + 1} +| Return From Keyword ${-1} # Also [Return] would work here. + +The most common use case, returning based on an expression, can be +accomplished directly with `Return From Keyword If`. See also +`Run Keyword And Return` and `Run Keyword And Return If`. + + + + + +condition +*return_values + +Returns from the enclosing user keyword if ``condition`` is true. + +A wrapper for `Return From Keyword` to return based on the given +condition. The condition is evaluated using the same semantics as +with `Should Be True` keyword. + +Given the same example as in `Return From Keyword`, we can rewrite the +`Find Index` keyword as follows: + +| ***** Keywords ***** +| Find Index +| [Arguments] ${element} @{items} +| ${index} = Set Variable ${0} +| :FOR ${item} IN @{items} +| \ Return From Keyword If '${item}' == '${element}' ${index} +| \ ${index} = Set Variable ${index + 1} +| Return From Keyword ${-1} # Also [Return] would work here. + +See also `Run Keyword And Return` and `Run Keyword And Return If`. + + + + + +name +*args + +Executes the given keyword with the given arguments. + +Because the name of the keyword to execute is given as an argument, it +can be a variable and thus set dynamically, e.g. from a return value of +another keyword or from the command line. + + + + + +name +*args + +Runs the keyword and continues execution even if a failure occurs. + +The keyword name and arguments work as with `Run Keyword`. + +Example: +| Run Keyword And Continue On Failure | Fail | This is a stupid example | +| Log | This keyword is executed | + +The execution is not continued if the failure is caused by invalid syntax, +timeout, or fatal exception. +Since Robot Framework 2.9, variable errors are caught by this keyword. + + + + + +expected_error +name +*args + +Runs the keyword and checks that the expected error occurred. + +The keyword to execute and its arguments are specified using ``name`` +and ``*args`` exactly like with `Run Keyword`. + +The expected error must be given in the same format as in Robot +Framework reports. By default it is interpreted as a glob pattern +with ``*``, ``?`` and ``[chars]`` as wildcards, but starting from +Robot Framework 3.1 that can be changed by using various prefixes +explained in the table below. Prefixes are case-sensitive and they +must be separated from the actual message with a colon and an +optional space like ``PREFIX: Message`` or ``PREFIX:Message``. + +| = Prefix = | = Explanation = | +| ``EQUALS`` | Exact match. Especially useful if the error contains glob wildcards. | +| ``STARTS`` | Error must start with the specified error. | +| ``REGEXP`` | Regular expression match. | +| ``GLOB`` | Same as the default behavior. | + +See the `Pattern matching` section for more information about glob +patterns and regular expressions. + +If the expected error occurs, the error message is returned and it can +be further processed or tested if needed. If there is no error, or the +error does not match the expected error, this keyword fails. + +Examples: +| Run Keyword And Expect Error | My error | Keyword | arg | +| Run Keyword And Expect Error | ValueError: * | Some Keyword | +| Run Keyword And Expect Error | STARTS: ValueError: | Some Keyword | +| Run Keyword And Expect Error | EQUALS:No match for '//input[@type="text"]' | +| ... | Find Element | //input[@type="text"] | +| ${msg} = | Run Keyword And Expect Error | * | +| ... | Keyword | arg1 | arg2 | +| Log To Console | ${msg} | + +Errors caused by invalid syntax, timeouts, or fatal exceptions are not +caught by this keyword. +Since Robot Framework 2.9, variable errors are caught by this keyword. + + + + + +name +*args + +Runs the given keyword with the given arguments and ignores possible error. + +This keyword returns two values, so that the first is either string +``PASS`` or ``FAIL``, depending on the status of the executed keyword. +The second value is either the return value of the keyword or the +received error message. See `Run Keyword And Return Status` If you are +only interested in the execution status. + +The keyword name and arguments work as in `Run Keyword`. See +`Run Keyword If` for a usage example. + +Errors caused by invalid syntax, timeouts, or fatal exceptions are not +caught by this keyword. Otherwise this keyword itself never fails. +Since Robot Framework 2.9, variable errors are caught by this keyword. + + + + + +name +*args + +Runs the specified keyword and returns from the enclosing user keyword. + +The keyword to execute is defined with ``name`` and ``*args`` exactly +like with `Run Keyword`. After running the keyword, returns from the +enclosing user keyword and passes possible return value from the +executed keyword further. Returning from a keyword has exactly same +semantics as with `Return From Keyword`. + +Example: +| `Run Keyword And Return` | `My Keyword` | arg1 | arg2 | +| # Above is equivalent to: | +| ${result} = | `My Keyword` | arg1 | arg2 | +| `Return From Keyword` | ${result} | | | + +Use `Run Keyword And Return If` if you want to run keyword and return +based on a condition. + + + + + +condition +name +*args + +Runs the specified keyword and returns from the enclosing user keyword. + +A wrapper for `Run Keyword And Return` to run and return based on +the given ``condition``. The condition is evaluated using the same +semantics as with `Should Be True` keyword. + +Example: +| `Run Keyword And Return If` | ${rc} > 0 | `My Keyword` | arg1 | arg2 | +| # Above is equivalent to: | +| `Run Keyword If` | ${rc} > 0 | `Run Keyword And Return` | `My Keyword ` | arg1 | arg2 | + +Use `Return From Keyword If` if you want to return a certain value +based on a condition. + + + + + +name +*args + +Runs the given keyword with given arguments and returns the status as a Boolean value. + +This keyword returns Boolean ``True`` if the keyword that is executed +succeeds and ``False`` if it fails. This is useful, for example, in +combination with `Run Keyword If`. If you are interested in the error +message or return value, use `Run Keyword And Ignore Error` instead. + +The keyword name and arguments work as in `Run Keyword`. + +Example: +| ${passed} = | `Run Keyword And Return Status` | Keyword | args | +| `Run Keyword If` | ${passed} | Another keyword | + +Errors caused by invalid syntax, timeouts, or fatal exceptions are not +caught by this keyword. Otherwise this keyword itself never fails. + + + + + +condition +name +*args + +Runs the given keyword with the given arguments, if ``condition`` is true. + +The given ``condition`` is evaluated in Python as explained in +`Evaluating expressions`, and ``name`` and ``*args`` have same +semantics as with `Run Keyword`. + +Example, a simple if/else construct: +| ${status} | ${value} = | `Run Keyword And Ignore Error` | `My Keyword` | +| `Run Keyword If` | '${status}' == 'PASS' | `Some Action` | arg | +| `Run Keyword Unless` | '${status}' == 'PASS' | `Another Action` | + +In this example, only either `Some Action` or `Another Action` is +executed, based on the status of `My Keyword`. Instead of `Run Keyword +And Ignore Error` you can also use `Run Keyword And Return Status`. + +Variables used like ``${variable}``, as in the examples above, are +replaced in the expression before evaluation. Variables are also +available in the evaluation namespace and can be accessed using special +syntax ``$variable``. This is a new feature in Robot Framework 2.9 +and it is explained more thoroughly in `Evaluating expressions`. + +Example: +| `Run Keyword If` | $result is None or $result == 'FAIL' | `Keyword` | + +This keyword supports also optional ELSE and ELSE IF branches. Both +of them are defined in ``*args`` and must use exactly format ``ELSE`` +or ``ELSE IF``, respectively. ELSE branches must contain first the +name of the keyword to execute and then its possible arguments. ELSE +IF branches must first contain a condition, like the first argument +to this keyword, and then the keyword to execute and its possible +arguments. It is possible to have ELSE branch after ELSE IF and to +have multiple ELSE IF branches. Nested `Run Keyword If` usage is not +supported when using ELSE and/or ELSE IF branches. + +Given previous example, if/else construct can also be created like this: +| ${status} | ${value} = | `Run Keyword And Ignore Error` | `My Keyword` | +| `Run Keyword If` | '${status}' == 'PASS' | `Some Action` | arg | ELSE | `Another Action` | + +The return value of this keyword is the return value of the actually +executed keyword or Python ``None`` if no keyword was executed (i.e. +if ``condition`` was false). Hence, it is recommended to use ELSE +and/or ELSE IF branches to conditionally assign return values from +keyword to variables (see `Set Variable If` if you need to set fixed +values conditionally). This is illustrated by the example below: + +| ${var1} = | `Run Keyword If` | ${rc} == 0 | `Some keyword returning a value` | +| ... | ELSE IF | 0 < ${rc} < 42 | `Another keyword` | +| ... | ELSE IF | ${rc} < 0 | `Another keyword with args` | ${rc} | arg2 | +| ... | ELSE | `Final keyword to handle abnormal cases` | ${rc} | +| ${var2} = | `Run Keyword If` | ${condition} | `Some keyword` | + +In this example, ${var2} will be set to ``None`` if ${condition} is +false. + +Notice that ``ELSE`` and ``ELSE IF`` control words must be used +explicitly and thus cannot come from variables. If you need to use +literal ``ELSE`` and ``ELSE IF`` strings as arguments, you can escape +them with a backslash like ``\ELSE`` and ``\ELSE IF``. + +Python's [http://docs.python.org/library/os.html|os] and +[http://docs.python.org/library/sys.html|sys] modules are +automatically imported when evaluating the ``condition``. +Attributes they contain can thus be used in the condition: + +| `Run Keyword If` | os.sep == '/' | `Unix Keyword` | +| ... | ELSE IF | sys.platform.startswith('java') | `Jython Keyword` | +| ... | ELSE | `Windows Keyword` | + + + + + +name +*args + +Runs the given keyword with the given arguments, if all critical tests passed. + +This keyword can only be used in suite teardown. Trying to use it in +any other place will result in an error. + +Otherwise, this keyword works exactly like `Run Keyword`, see its +documentation for more details. + + + + + +name +*args + +Runs the given keyword with the given arguments, if all tests passed. + +This keyword can only be used in a suite teardown. Trying to use it +anywhere else results in an error. + +Otherwise, this keyword works exactly like `Run Keyword`, see its +documentation for more details. + + + + + +name +*args + +Runs the given keyword with the given arguments, if any critical tests failed. + +This keyword can only be used in a suite teardown. Trying to use it +anywhere else results in an error. + +Otherwise, this keyword works exactly like `Run Keyword`, see its +documentation for more details. + + + + + +name +*args + +Runs the given keyword with the given arguments, if one or more tests failed. + +This keyword can only be used in a suite teardown. Trying to use it +anywhere else results in an error. + +Otherwise, this keyword works exactly like `Run Keyword`, see its +documentation for more details. + + + + + +name +*args + +Runs the given keyword with the given arguments, if the test failed. + +This keyword can only be used in a test teardown. Trying to use it +anywhere else results in an error. + +Otherwise, this keyword works exactly like `Run Keyword`, see its +documentation for more details. + +Prior to Robot Framework 2.9 failures in test teardown itself were +not detected by this keyword. + + + + + +name +*args + +Runs the given keyword with the given arguments, if the test passed. + +This keyword can only be used in a test teardown. Trying to use it +anywhere else results in an error. + +Otherwise, this keyword works exactly like `Run Keyword`, see its +documentation for more details. + +Prior to Robot Framework 2.9 failures in test teardown itself were +not detected by this keyword. + + + + + +name +*args + +Runs the given keyword if either a test or a keyword timeout has occurred. + +This keyword can only be used in a test teardown. Trying to use it +anywhere else results in an error. + +Otherwise, this keyword works exactly like `Run Keyword`, see its +documentation for more details. + + + + + +condition +name +*args + +Runs the given keyword with the given arguments if ``condition`` is false. + +See `Run Keyword If` for more information and an example. Notice that +this keyword does not support ``ELSE`` or ``ELSE IF`` branches like +`Run Keyword If` does, though. + + + + + +*keywords + +Executes all the given keywords in a sequence. + +This keyword is mainly useful in setups and teardowns when they need +to take care of multiple actions and creating a new higher level user +keyword would be an overkill. + +By default all arguments are expected to be keywords to be executed. + +Examples: +| `Run Keywords` | `Initialize database` | `Start servers` | `Clear logs` | +| `Run Keywords` | ${KW 1} | ${KW 2} | +| `Run Keywords` | @{KEYWORDS} | + +Keywords can also be run with arguments using upper case ``AND`` as +a separator between keywords. The keywords are executed so that the +first argument is the first keyword and proceeding arguments until +the first ``AND`` are arguments to it. First argument after the first +``AND`` is the second keyword and proceeding arguments until the next +``AND`` are its arguments. And so on. + +Examples: +| `Run Keywords` | `Initialize database` | db1 | AND | `Start servers` | server1 | server2 | +| `Run Keywords` | `Initialize database` | ${DB NAME} | AND | `Start servers` | @{SERVERS} | AND | `Clear logs` | +| `Run Keywords` | ${KW} | AND | @{KW WITH ARGS} | + +Notice that the ``AND`` control argument must be used explicitly and +cannot itself come from a variable. If you need to use literal ``AND`` +string as argument, you can either use variables or escape it with +a backslash like ``\AND``. + + + + + +name +*values + +Makes a variable available globally in all tests and suites. + +Variables set with this keyword are globally available in all +subsequent test suites, test cases and user keywords. Also variables +in variable tables are overridden. Variables assigned locally based +on keyword return values or by using `Set Test Variable` and +`Set Suite Variable` override these variables in that scope, but +the global value is not changed in those cases. + +In practice setting variables with this keyword has the same effect +as using command line options ``--variable`` and ``--variablefile``. +Because this keyword can change variables everywhere, it should be +used with care. + +See `Set Suite Variable` for more information and examples. + + + + + +*search_order + +Sets the resolution order to use when a name matches multiple keywords. + +The library search order is used to resolve conflicts when a keyword +name in the test data matches multiple keywords. The first library +(or resource, see below) containing the keyword is selected and that +keyword implementation used. If the keyword is not found from any library +(or resource), test executing fails the same way as when the search +order is not set. + +When this keyword is used, there is no need to use the long +``LibraryName.Keyword Name`` notation. For example, instead of +having + +| MyLibrary.Keyword | arg | +| MyLibrary.Another Keyword | +| MyLibrary.Keyword | xxx | + +you can have + +| Set Library Search Order | MyLibrary | +| Keyword | arg | +| Another Keyword | +| Keyword | xxx | + +This keyword can be used also to set the order of keywords in different +resource files. In this case resource names must be given without paths +or extensions like: + +| Set Library Search Order | resource | another_resource | + +*NOTE:* +- The search order is valid only in the suite where this keywords is used. +- Keywords in resources always have higher priority than + keywords in libraries regardless the search order. +- The old order is returned and can be used to reset the search order later. +- Library and resource names in the search order are both case and space + insensitive. + + + + + +level + +Sets the log threshold to the specified level and returns the old level. + +Messages below the level will not logged. The default logging level is +INFO, but it can be overridden with the command line option +``--loglevel``. + +The available levels: TRACE, DEBUG, INFO (default), WARN, ERROR and NONE (no +logging). + + + + + +doc +append=False +top=False + +Sets documentation for the current test suite. + +By default the possible existing documentation is overwritten, but +this can be changed using the optional ``append`` argument similarly +as with `Set Test Message` keyword. + +This keyword sets the documentation of the current suite by default. +If the optional ``top`` argument is given a true value (see `Boolean +arguments`), the documentation of the top level suite is altered +instead. + +The documentation of the current suite is available as a built-in +variable ``${SUITE DOCUMENTATION}``. + + + + + +name +value +append=False +top=False + +Sets metadata for the current test suite. + +By default possible existing metadata values are overwritten, but +this can be changed using the optional ``append`` argument similarly +as with `Set Test Message` keyword. + +This keyword sets the metadata of the current suite by default. +If the optional ``top`` argument is given a true value (see `Boolean +arguments`), the metadata of the top level suite is altered instead. + +The metadata of the current suite is available as a built-in variable +``${SUITE METADATA}`` in a Python dictionary. Notice that modifying this +variable directly has no effect on the actual metadata the suite has. + + + + + +name +*values + +Makes a variable available everywhere within the scope of the current suite. + +Variables set with this keyword are available everywhere within the +scope of the currently executed test suite. Setting variables with this +keyword thus has the same effect as creating them using the Variable +table in the test data file or importing them from variable files. + +Possible child test suites do not see variables set with this keyword +by default. Starting from Robot Framework 2.9, that can be controlled +by using ``children=<option>`` as the last argument. If the specified +``<option>`` is a non-empty string or any other value considered true +in Python, the variable is set also to the child suites. Parent and +sibling suites will never see variables set with this keyword. + +The name of the variable can be given either as a normal variable name +(e.g. ``${NAME}``) or in escaped format as ``\${NAME}`` or ``$NAME``. +Variable value can be given using the same syntax as when variables +are created in the Variable table. + +If a variable already exists within the new scope, its value will be +overwritten. Otherwise a new variable is created. If a variable already +exists within the current scope, the value can be left empty and the +variable within the new scope gets the value within the current scope. + +Examples: +| Set Suite Variable | ${SCALAR} | Hello, world! | +| Set Suite Variable | ${SCALAR} | Hello, world! | children=true | +| Set Suite Variable | @{LIST} | First item | Second item | +| Set Suite Variable | &{DICT} | key=value | foo=bar | +| ${ID} = | Get ID | +| Set Suite Variable | ${ID} | + +To override an existing value with an empty value, use built-in +variables ``${EMPTY}``, ``@{EMPTY}`` or ``&{EMPTY}``: + +| Set Suite Variable | ${SCALAR} | ${EMPTY} | +| Set Suite Variable | @{LIST} | @{EMPTY} | +| Set Suite Variable | &{DICT} | &{EMPTY} | + +*NOTE:* If the variable has value which itself is a variable (escaped +or not), you must always use the escaped format to set the variable: + +Example: +| ${NAME} = | Set Variable | \${var} | +| Set Suite Variable | ${NAME} | value | # Sets variable ${var} | +| Set Suite Variable | \${NAME} | value | # Sets variable ${NAME} | + +This limitation applies also to `Set Test Variable`, `Set Global +Variable`, `Variable Should Exist`, `Variable Should Not Exist` and +`Get Variable Value` keywords. + + + + + +*tags + +Adds given ``tags`` for the current test or all tests in a suite. + +When this keyword is used inside a test case, that test gets +the specified tags and other tests are not affected. + +If this keyword is used in a suite setup, all test cases in +that suite, recursively, gets the given tags. It is a failure +to use this keyword in a suite teardown. + +The current tags are available as a built-in variable ``@{TEST TAGS}``. + +See `Remove Tags` if you want to remove certain tags and `Fail` if +you want to fail the test case after setting and/or removing tags. + + + + + +name +*values + +Makes a variable available everywhere within the scope of the current task. + +This is an alias for `Set Test Variable` that is more applicable when +creating tasks, not tests. New in RF 3.1. + + + + + +doc +append=False + +Sets documentation for the current test case. + +By default the possible existing documentation is overwritten, but +this can be changed using the optional ``append`` argument similarly +as with `Set Test Message` keyword. + +The current test documentation is available as a built-in variable +``${TEST DOCUMENTATION}``. This keyword can not be used in suite +setup or suite teardown. + + + + + +message +append=False + +Sets message for the current test case. + +If the optional ``append`` argument is given a true value (see `Boolean +arguments`), the given ``message`` is added after the possible earlier +message by joining the messages with a space. + +In test teardown this keyword can alter the possible failure message, +but otherwise failures override messages set by this keyword. Notice +that in teardown the message is available as a built-in variable +``${TEST MESSAGE}``. + +It is possible to use HTML format in the message by starting the message +with ``*HTML*``. + +Examples: +| Set Test Message | My message | | +| Set Test Message | is continued. | append=yes | +| Should Be Equal | ${TEST MESSAGE} | My message is continued. | +| Set Test Message | `*`HTML`*` <b>Hello!</b> | | + +This keyword can not be used in suite setup or suite teardown. + + + + + +name +*values + +Makes a variable available everywhere within the scope of the current test. + +Variables set with this keyword are available everywhere within the +scope of the currently executed test case. For example, if you set a +variable in a user keyword, it is available both in the test case level +and also in all other user keywords used in the current test. Other +test cases will not see variables set with this keyword. + +See `Set Suite Variable` for more information and examples. + + + + + +*values + +Returns the given values which can then be assigned to a variables. + +This keyword is mainly used for setting scalar variables. +Additionally it can be used for converting a scalar variable +containing a list to a list variable or to multiple scalar variables. +It is recommended to use `Create List` when creating new lists. + +Examples: +| ${hi} = | Set Variable | Hello, world! | +| ${hi2} = | Set Variable | I said: ${hi} | +| ${var1} | ${var2} = | Set Variable | Hello | world | +| @{list} = | Set Variable | ${list with some items} | +| ${item1} | ${item2} = | Set Variable | ${list with 2 items} | + +Variables created with this keyword are available only in the +scope where they are created. See `Set Global Variable`, +`Set Test Variable` and `Set Suite Variable` for information on how to +set variables so that they are available also in a larger scope. + + + + + +condition +*values + +Sets variable based on the given condition. + +The basic usage is giving a condition and two values. The +given condition is first evaluated the same way as with the +`Should Be True` keyword. If the condition is true, then the +first value is returned, and otherwise the second value is +returned. The second value can also be omitted, in which case +it has a default value None. This usage is illustrated in the +examples below, where ``${rc}`` is assumed to be zero. + +| ${var1} = | Set Variable If | ${rc} == 0 | zero | nonzero | +| ${var2} = | Set Variable If | ${rc} > 0 | value1 | value2 | +| ${var3} = | Set Variable If | ${rc} > 0 | whatever | | +=> +| ${var1} = 'zero' +| ${var2} = 'value2' +| ${var3} = None + +It is also possible to have 'else if' support by replacing the +second value with another condition, and having two new values +after it. If the first condition is not true, the second is +evaluated and one of the values after it is returned based on +its truth value. This can be continued by adding more +conditions without a limit. + +| ${var} = | Set Variable If | ${rc} == 0 | zero | +| ... | ${rc} > 0 | greater than zero | less then zero | +| | +| ${var} = | Set Variable If | +| ... | ${rc} == 0 | zero | +| ... | ${rc} == 1 | one | +| ... | ${rc} == 2 | two | +| ... | ${rc} > 2 | greater than two | +| ... | ${rc} < 0 | less than zero | + +Use `Get Variable Value` if you need to set variables +dynamically based on whether a variable exist or not. + + + + + +item +msg=None + +Verifies that the given item is empty. + +The length of the item is got using the `Get Length` keyword. The +default error message can be overridden with the ``msg`` argument. + + + + + +first +second +msg=None +values=True +ignore_case=False + +Fails if the given objects are unequal. + +Optional ``msg`` and ``values`` arguments specify how to construct +the error message if this keyword fails: + +- If ``msg`` is not given, the error message is ``<first> != <second>``. +- If ``msg`` is given and ``values`` gets a true value (default), + the error message is ``<msg>: <first> != <second>``. +- If ``msg`` is given and ``values`` gets a false value, the error + message is simply ``<msg>``. See `Boolean arguments` for more details + about using false values. + +If ``ignore_case`` is given a true value (see `Boolean arguments`) and +arguments are strings, it indicates that comparison should be +case-insensitive. New option in Robot Framework 3.0.1. + +If both arguments are multiline strings, the comparison is done using +`multiline string comparisons`. + +Examples: +| Should Be Equal | ${x} | expected | +| Should Be Equal | ${x} | expected | Custom error message | +| Should Be Equal | ${x} | expected | Custom message | values=False | +| Should Be Equal | ${x} | expected | ignore_case=True | + + + + + +first +second +msg=None +values=True +base=None + +Fails if objects are unequal after converting them to integers. + +See `Convert To Integer` for information how to convert integers from +other bases than 10 using ``base`` argument or ``0b/0o/0x`` prefixes. + +See `Should Be Equal` for an explanation on how to override the default +error message with ``msg`` and ``values``. + +Examples: +| Should Be Equal As Integers | 42 | ${42} | Error message | +| Should Be Equal As Integers | ABCD | abcd | base=16 | +| Should Be Equal As Integers | 0b1011 | 11 | + + + + + +first +second +msg=None +values=True +precision=6 + +Fails if objects are unequal after converting them to real numbers. + +The conversion is done with `Convert To Number` keyword using the +given ``precision``. + +Examples: +| Should Be Equal As Numbers | ${x} | 1.1 | | # Passes if ${x} is 1.1 | +| Should Be Equal As Numbers | 1.123 | 1.1 | precision=1 | # Passes | +| Should Be Equal As Numbers | 1.123 | 1.4 | precision=0 | # Passes | +| Should Be Equal As Numbers | 112.3 | 75 | precision=-2 | # Passes | + +As discussed in the documentation of `Convert To Number`, machines +generally cannot store floating point numbers accurately. Because of +this limitation, comparing floats for equality is problematic and +a correct approach to use depends on the context. This keyword uses +a very naive approach of rounding the numbers before comparing them, +which is both prone to rounding errors and does not work very well if +numbers are really big or small. For more information about comparing +floats, and ideas on how to implement your own context specific +comparison algorithm, see +http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/. + +If you want to avoid possible problems with floating point numbers, +you can implement custom keywords using Python's +[http://docs.python.org/library/decimal.html|decimal] or +[http://docs.python.org/library/fractions.html|fractions] modules. + +See `Should Not Be Equal As Numbers` for a negative version of this +keyword and `Should Be Equal` for an explanation on how to override +the default error message with ``msg`` and ``values``. + + + + + +first +second +msg=None +values=True +ignore_case=False + +Fails if objects are unequal after converting them to strings. + +See `Should Be Equal` for an explanation on how to override the default +error message with ``msg`` and ``values``. + +If ``ignore_case`` is given a true value (see `Boolean arguments`), it +indicates that comparison should be case-insensitive. New option in +Robot Framework 3.0.1. + +If both arguments are multiline strings, the comparison is done using +`multiline string comparisons`. + + + + + +condition +msg=None + +Fails if the given condition is not true. + +If ``condition`` is a string (e.g. ``${rc} < 10``), it is evaluated as +a Python expression as explained in `Evaluating expressions` and the +keyword status is decided based on the result. If a non-string item is +given, the status is got directly from its +[http://docs.python.org/library/stdtypes.html#truth|truth value]. + +The default error message (``<condition> should be true``) is not very +informative, but it can be overridden with the ``msg`` argument. + +Examples: +| Should Be True | ${rc} < 10 | +| Should Be True | '${status}' == 'PASS' | # Strings must be quoted | +| Should Be True | ${number} | # Passes if ${number} is not zero | +| Should Be True | ${list} | # Passes if ${list} is not empty | + +Variables used like ``${variable}``, as in the examples above, are +replaced in the expression before evaluation. Variables are also +available in the evaluation namespace and can be accessed using special +syntax ``$variable``. This is a new feature in Robot Framework 2.9 +and it is explained more thoroughly in `Evaluating expressions`. + +Examples: +| Should Be True | $rc < 10 | +| Should Be True | $status == 'PASS' | # Expected string must be quoted | + +`Should Be True` automatically imports Python's +[http://docs.python.org/library/os.html|os] and +[http://docs.python.org/library/sys.html|sys] modules that contain +several useful attributes: + +| Should Be True | os.linesep == '\n' | # Unixy | +| Should Be True | os.linesep == '\r\n' | # Windows | +| Should Be True | sys.platform == 'darwin' | # OS X | +| Should Be True | sys.platform.startswith('java') | # Jython | + + + + + +container +item +msg=None +values=True +ignore_case=False + +Fails if ``container`` does not contain ``item`` one or more times. + +Works with strings, lists, and anything that supports Python's ``in`` +operator. + +See `Should Be Equal` for an explanation on how to override the default +error message with arguments ``msg`` and ``values``. + +If ``ignore_case`` is given a true value (see `Boolean arguments`) and +compared items are strings, it indicates that comparison should be +case-insensitive. If the ``container`` is a list-like object, string +items in it are compared case-insensitively. New option in Robot +Framework 3.0.1. + +Examples: +| Should Contain | ${output} | PASS | +| Should Contain | ${some list} | value | msg=Failure! | values=False | +| Should Contain | ${some list} | value | ignore_case=True | + + + + + +container +*items +**configuration + +Fails if ``container`` does not contain any of the ``*items``. + +Works with strings, lists, and anything that supports Python's ``in`` +operator. + +Supports additional configuration parameters ``msg``, ``values`` +and ``ignore_case``, which have exactly the same semantics as arguments +with same names have with `Should Contain`. These arguments must +always be given using ``name=value`` syntax after all ``items``. + +Note that possible equal signs in ``items`` must be escaped with +a backslash (e.g. ``foo\=bar``) to avoid them to be passed in +as ``**configuration``. + +Examples: +| Should Contain Any | ${string} | substring 1 | substring 2 | +| Should Contain Any | ${list} | item 1 | item 2 | item 3 | +| Should Contain Any | ${list} | item 1 | item 2 | item 3 | ignore_case=True | +| Should Contain Any | ${list} | @{items} | msg=Custom message | values=False | + +New in Robot Framework 3.0.1. + + + + + +item1 +item2 +count +msg=None +ignore_case=False + +Fails if ``item1`` does not contain ``item2`` ``count`` times. + +Works with strings, lists and all objects that `Get Count` works +with. The default error message can be overridden with ``msg`` and +the actual count is always logged. + +If ``ignore_case`` is given a true value (see `Boolean arguments`) and +compared items are strings, it indicates that comparison should be +case-insensitive. If the ``item1`` is a list-like object, string +items in it are compared case-insensitively. New option in Robot +Framework 3.0.1. + +Examples: +| Should Contain X Times | ${output} | hello | 2 | +| Should Contain X Times | ${some list} | value | 3 | ignore_case=True | + + + + + +str1 +str2 +msg=None +values=True +ignore_case=False + +Fails if the string ``str1`` does not end with the string ``str2``. + +See `Should Be Equal` for an explanation on how to override the default +error message with ``msg`` and ``values``, as well as for semantics +of the ``ignore_case`` option. + + + + + +string +pattern +msg=None +values=True +ignore_case=False + +Fails if the given ``string`` does not match the given ``pattern``. + +Pattern matching is similar as matching files in a shell with +``*``, ``?`` and ``[chars]`` acting as wildcards. See the +`Glob patterns` section for more information. + +See `Should Be Equal` for an explanation on how to override the default +error message with ``msg`` and ``values``, as well as for semantics +of the ``ignore_case`` option. + + + + + +string +pattern +msg=None +values=True + +Fails if ``string`` does not match ``pattern`` as a regular expression. + +See the `Regular expressions` section for more information about +regular expressions and how to use then in Robot Framework test data. + +Notice that the given pattern does not need to match the whole string. +For example, the pattern ``ello`` matches the string ``Hello world!``. +If a full match is needed, the ``^`` and ``$`` characters can be used +to denote the beginning and end of the string, respectively. +For example, ``^ello$`` only matches the exact string ``ello``. + +Possible flags altering how the expression is parsed (e.g. +``re.IGNORECASE``, ``re.MULTILINE``) must be embedded to the +pattern like ``(?im)pattern``. The most useful flags are ``i`` +(case-insensitive), ``m`` (multiline mode), ``s`` (dotall mode) +and ``x`` (verbose). + +If this keyword passes, it returns the portion of the string that +matched the pattern. Additionally, the possible captured groups are +returned. + +See the `Should Be Equal` keyword for an explanation on how to override +the default error message with the ``msg`` and ``values`` arguments. + +Examples: +| Should Match Regexp | ${output} | \\d{6} | # Output contains six numbers | +| Should Match Regexp | ${output} | ^\\d{6}$ | # Six numbers and nothing more | +| ${ret} = | Should Match Regexp | Foo: 42 | (?i)foo: \\d+ | +| ${match} | ${group1} | ${group2} = | +| ... | Should Match Regexp | Bar: 43 | (Foo|Bar): (\\d+) | +=> +| ${ret} = 'Foo: 42' +| ${match} = 'Bar: 43' +| ${group1} = 'Bar' +| ${group2} = '43' + + + + + +item +msg=None + +Verifies that the given item is not empty. + +The length of the item is got using the `Get Length` keyword. The +default error message can be overridden with the ``msg`` argument. + + + + + +first +second +msg=None +values=True +ignore_case=False + +Fails if the given objects are equal. + +See `Should Be Equal` for an explanation on how to override the default +error message with ``msg`` and ``values``. + +If ``ignore_case`` is given a true value (see `Boolean arguments`) and +both arguments are strings, it indicates that comparison should be +case-insensitive. New option in Robot Framework 3.0.1. + + + + + +first +second +msg=None +values=True +base=None + +Fails if objects are equal after converting them to integers. + +See `Convert To Integer` for information how to convert integers from +other bases than 10 using ``base`` argument or ``0b/0o/0x`` prefixes. + +See `Should Be Equal` for an explanation on how to override the default +error message with ``msg`` and ``values``. + +See `Should Be Equal As Integers` for some usage examples. + + + + + +first +second +msg=None +values=True +precision=6 + +Fails if objects are equal after converting them to real numbers. + +The conversion is done with `Convert To Number` keyword using the +given ``precision``. + +See `Should Be Equal As Numbers` for examples on how to use +``precision`` and why it does not always work as expected. See also +`Should Be Equal` for an explanation on how to override the default +error message with ``msg`` and ``values``. + + + + + +first +second +msg=None +values=True +ignore_case=False + +Fails if objects are equal after converting them to strings. + +If ``ignore_case`` is given a true value (see `Boolean arguments`), it +indicates that comparison should be case-insensitive. New option in +Robot Framework 3.0.1. + +See `Should Be Equal` for an explanation on how to override the default +error message with ``msg`` and ``values``. + + + + + +condition +msg=None + +Fails if the given condition is true. + +See `Should Be True` for details about how ``condition`` is evaluated +and how ``msg`` can be used to override the default error message. + + + + + +container +item +msg=None +values=True +ignore_case=False + +Fails if ``container`` contains ``item`` one or more times. + +Works with strings, lists, and anything that supports Python's ``in`` +operator. + +See `Should Be Equal` for an explanation on how to override the default +error message with arguments ``msg`` and ``values``. ``ignore_case`` +has exactly the same semantics as with `Should Contain`. + +Examples: +| Should Not Contain | ${some list} | value | +| Should Not Contain | ${output} | FAILED | ignore_case=True | + + + + + +container +*items +**configuration + +Fails if ``container`` contains one or more of the ``*items``. + +Works with strings, lists, and anything that supports Python's ``in`` +operator. + +Supports additional configuration parameters ``msg``, ``values`` +and ``ignore_case``, which have exactly the same semantics as arguments +with same names have with `Should Contain`. These arguments must +always be given using ``name=value`` syntax after all ``items``. + +Note that possible equal signs in ``items`` must be escaped with +a backslash (e.g. ``foo\=bar``) to avoid them to be passed in +as ``**configuration``. + +Examples: +| Should Not Contain Any | ${string} | substring 1 | substring 2 | +| Should Not Contain Any | ${list} | item 1 | item 2 | item 3 | +| Should Not Contain Any | ${list} | item 1 | item 2 | item 3 | ignore_case=True | +| Should Not Contain Any | ${list} | @{items} | msg=Custom message | values=False | + +New in Robot Framework 3.0.1. + + + + + +str1 +str2 +msg=None +values=True +ignore_case=False + +Fails if the string ``str1`` ends with the string ``str2``. + +See `Should Be Equal` for an explanation on how to override the default +error message with ``msg`` and ``values``, as well as for semantics +of the ``ignore_case`` option. + + + + + +string +pattern +msg=None +values=True +ignore_case=False + +Fails if the given ``string`` matches the given ``pattern``. + +Pattern matching is similar as matching files in a shell with +``*``, ``?`` and ``[chars]`` acting as wildcards. See the +`Glob patterns` section for more information. + +See `Should Be Equal` for an explanation on how to override the default +error message with ``msg`` and ``values``, as well as for semantics +of the ``ignore_case`` option. + + + + + +string +pattern +msg=None +values=True + +Fails if ``string`` matches ``pattern`` as a regular expression. + +See `Should Match Regexp` for more information about arguments. + + + + + +str1 +str2 +msg=None +values=True +ignore_case=False + +Fails if the string ``str1`` starts with the string ``str2``. + +See `Should Be Equal` for an explanation on how to override the default +error message with ``msg`` and ``values``, as well as for semantics +of the ``ignore_case`` option. + + + + + +str1 +str2 +msg=None +values=True +ignore_case=False + +Fails if the string ``str1`` does not start with the string ``str2``. + +See `Should Be Equal` for an explanation on how to override the default +error message with ``msg`` and ``values``, as well as for semantics +of the ``ignore_case`` option. + + + + + +time_ +reason=None + +Pauses the test executed for the given time. + +``time`` may be either a number or a time string. Time strings are in +a format such as ``1 day 2 hours 3 minutes 4 seconds 5milliseconds`` or +``1d 2h 3m 4s 5ms``, and they are fully explained in an appendix of +Robot Framework User Guide. Optional `reason` can be used to explain why +sleeping is necessary. Both the time slept and the reason are logged. + +Examples: +| Sleep | 42 | +| Sleep | 1.5 | +| Sleep | 2 minutes 10 seconds | +| Sleep | 10s | Wait for a reply | + + + + + +name +msg=None + +Fails unless the given variable exists within the current scope. + +The name of the variable can be given either as a normal variable name +(e.g. ``${NAME}``) or in escaped format (e.g. ``\${NAME}``). Notice +that the former has some limitations explained in `Set Suite Variable`. + +The default error message can be overridden with the ``msg`` argument. + +See also `Variable Should Not Exist` and `Keyword Should Exist`. + + + + + +name +msg=None + +Fails if the given variable exists within the current scope. + +The name of the variable can be given either as a normal variable name +(e.g. ``${NAME}``) or in escaped format (e.g. ``\${NAME}``). Notice +that the former has some limitations explained in `Set Suite Variable`. + +The default error message can be overridden with the ``msg`` argument. + +See also `Variable Should Exist` and `Keyword Should Exist`. + + + + + +retry +retry_interval +name +*args + +Runs the specified keyword and retries if it fails. + +``name`` and ``args`` define the keyword that is executed similarly +as with `Run Keyword`. How long to retry running the keyword is +defined using ``retry`` argument either as timeout or count. +``retry_interval`` is the time to wait before trying to run the +keyword again after the previous run has failed. + +If ``retry`` is given as timeout, it must be in Robot Framework's +time format (e.g. ``1 minute``, ``2 min 3 s``, ``4.5``) that is +explained in an appendix of Robot Framework User Guide. If it is +given as count, it must have ``times`` or ``x`` postfix (e.g. +``5 times``, ``10 x``). ``retry_interval`` must always be given in +Robot Framework's time format. + +If the keyword does not succeed regardless of retries, this keyword +fails. If the executed keyword passes, its return value is returned. + +Examples: +| Wait Until Keyword Succeeds | 2 min | 5 sec | My keyword | argument | +| ${result} = | Wait Until Keyword Succeeds | 3x | 200ms | My keyword | + +All normal failures are caught by this keyword. Errors caused by +invalid syntax, test or keyword timeouts, or fatal exceptions (caused +e.g. by `Fatal Error`) are not caught. + +Running the same keyword multiple times inside this keyword can create +lots of output and considerably increase the size of the generated +output files. It is possible to remove unnecessary keywords from +the outputs using ``--RemoveKeywords WUKS`` command line option. + +Support for specifying ``retry`` as a number of times to retry is +a new feature in Robot Framework 2.9. +Since Robot Framework 2.9, variable errors are caught by this keyword. + + + + diff --git a/libspecs/Collections.libspec b/libspecs/Collections.libspec new file mode 100644 index 0000000000000000000000000000000000000000..75feb0881f7df70c573206e8da22a076e2f8383b --- /dev/null +++ b/libspecs/Collections.libspec @@ -0,0 +1,880 @@ + + +3.1 +global +yes +A test library providing keywords for handling lists and dictionaries. + +``Collections`` is Robot Framework's standard library that provides a +set of keywords for handling Python lists and dictionaries. This +library has keywords, for example, for modifying and getting +values from lists and dictionaries (e.g. `Append To List`, `Get +From Dictionary`) and for verifying their contents (e.g. `Lists +Should Be Equal`, `Dictionary Should Contain Value`). + += Related keywords in BuiltIn = + +Following keywords in the BuiltIn library can also be used with +lists and dictionaries: + +| = Keyword Name = | = Applicable With = | = Comment = | +| `Create List` | lists | +| `Create Dictionary` | dicts | Was in Collections until RF 2.9. | +| `Get Length` | both | +| `Length Should Be` | both | +| `Should Be Empty` | both | +| `Should Not Be Empty` | both | +| `Should Contain` | both | +| `Should Not Contain` | both | +| `Should Contain X Times` | lists | +| `Should Not Contain X Times` | lists | +| `Get Count` | lists | + += Using with list-like and dictionary-like objects = + +List keywords that do not alter the given list can also be used +with tuples, and to some extend also with other iterables. +`Convert To List` can be used to convert tuples and other iterables +to Python ``list`` objects. + +Similarly dictionary keywords can, for most parts, be used with other +mappings. `Convert To Dictionary` can be used if real Python ``dict`` +objects are needed. + += Boolean arguments = + +Some keywords accept arguments that are handled as Boolean values true or +false. If such an argument is given as a string, it is considered false if +it is an empty string or equal to ``FALSE``, ``NONE``, ``NO``, ``OFF`` or +``0``, case-insensitively. Keywords verifying something that allow dropping +actual and expected values from the possible error message also consider +string ``no values`` to be false. Other strings are considered true +regardless their value, and other argument types are tested using the same +[http://docs.python.org/library/stdtypes.html#truth|rules as in Python]. + +True examples: +| `Should Contain Match` | ${list} | ${pattern} | case_insensitive=True | # Strings are generally true. | +| `Should Contain Match` | ${list} | ${pattern} | case_insensitive=yes | # Same as the above. | +| `Should Contain Match` | ${list} | ${pattern} | case_insensitive=${TRUE} | # Python ``True`` is true. | +| `Should Contain Match` | ${list} | ${pattern} | case_insensitive=${42} | # Numbers other than 0 are true. | + +False examples: +| `Should Contain Match` | ${list} | ${pattern} | case_insensitive=False | # String ``false`` is false. | +| `Should Contain Match` | ${list} | ${pattern} | case_insensitive=no | # Also string ``no`` is false. | +| `Should Contain Match` | ${list} | ${pattern} | case_insensitive=${EMPTY} | # Empty string is false. | +| `Should Contain Match` | ${list} | ${pattern} | case_insensitive=${FALSE} | # Python ``False`` is false. | +| `Lists Should Be Equal` | ${x} | ${y} | Custom error | values=no values | # ``no values`` works with ``values`` argument | + +Considering string ``NONE`` false is new in Robot Framework 3.0.3 and +considering also ``OFF`` and ``0`` false is new in Robot Framework 3.1. + += Data in examples = + +List related keywords use variables in format ``${Lx}`` in their examples. +They mean lists with as many alphabetic characters as specified by ``x``. +For example, ``${L1}`` means ``['a']`` and ``${L3}`` means +``['a', 'b', 'c']``. + +Dictionary keywords use similar ``${Dx}`` variables. For example, ``${D1}`` +means ``{'a': 1}`` and ``${D3}`` means ``{'a': 1, 'b': 2, 'c': 3}``. + + +list_ +*values + +Adds ``values`` to the end of ``list``. + +Example: +| Append To List | ${L1} | xxx | | | +| Append To List | ${L2} | x | y | z | +=> +| ${L1} = ['a', 'xxx'] +| ${L2} = ['a', 'b', 'x', 'y', 'z'] + + + + + +*lists + +Combines the given ``lists`` together and returns the result. + +The given lists are not altered by this keyword. + +Example: +| ${x} = | Combine List | ${L1} | ${L2} | | +| ${y} = | Combine List | ${L1} | ${L2} | ${L1} | +=> +| ${x} = ['a', 'a', 'b'] +| ${y} = ['a', 'a', 'b', 'a'] +| ${L1} and ${L2} are not changed. + + + + + +item + +Converts the given ``item`` to a Python ``dict`` type. + +Mainly useful for converting other mappings to dictionaries. Use +`Create Dictionary` from the BuiltIn library for constructing new +dictionaries. + +New in Robot Framework 2.9. + + + + + +item + +Converts the given ``item`` to a Python ``list`` type. + +Mainly useful for converting tuples and other iterable to lists. +Use `Create List` from the BuiltIn library for constructing new lists. + + + + + +dictionary + +Returns a copy of the given dictionary. + +The given dictionary is never altered by this keyword. + + + + + +list_ + +Returns a copy of the given list. + +The given list is never altered by this keyword. + + + + + +list_ +value +start=0 +end=None + +Returns the number of occurrences of the given ``value`` in ``list``. + +The search can be narrowed to the selected sublist by the ``start`` and +``end`` indexes having the same semantics as with `Get Slice From List` +keyword. The given list is never altered by this keyword. + +Example: +| ${x} = | Count Values In List | ${L3} | b | +=> +| ${x} = 1 +| ${L3} is not changed + + + + + +dict1 +dict2 +msg=None +values=True + +Fails if the given dictionaries are not equal. + +First the equality of dictionaries' keys is checked and after that all +the key value pairs. If there are differences between the values, those +are listed in the error message. The types of the dictionaries do not +need to be same. + +See `Lists Should Be Equal` for more information about configuring +the error message with ``msg`` and ``values`` arguments. + +The given dictionaries are never altered by this keyword. + + + + + +dictionary +key +value +msg=None + +An item of ``key`` / ``value`` must be found in a ``dictionary``. + +Value is converted to unicode for comparison. + +See `Lists Should Be Equal` for an explanation of ``msg``. +The given dictionary is never altered by this keyword. + + + + + +dictionary +key +msg=None + +Fails if ``key`` is not found from ``dictionary``. + +See `List Should Contain Value` for an explanation of ``msg``. + +The given dictionary is never altered by this keyword. + + + + + +dict1 +dict2 +msg=None +values=True + +Fails unless all items in ``dict2`` are found from ``dict1``. + +See `Lists Should Be Equal` for more information about configuring +the error message with ``msg`` and ``values`` arguments. + +The given dictionaries are never altered by this keyword. + + + + + +dictionary +value +msg=None + +Fails if ``value`` is not found from ``dictionary``. + +See `List Should Contain Value` for an explanation of ``msg``. + +The given dictionary is never altered by this keyword. + + + + + +dictionary +key +msg=None + +Fails if ``key`` is found from ``dictionary``. + +See `List Should Contain Value` for an explanation of ``msg``. + +The given dictionary is never altered by this keyword. + + + + + +dictionary +value +msg=None + +Fails if ``value`` is found from ``dictionary``. + +See `List Should Contain Value` for an explanation of ``msg``. + +The given dictionary is never altered by this keyword. + + + + + +dictionary + +Returns items of the given ``dictionary``. + +Items are returned sorted by keys. The given ``dictionary`` is not +altered by this keyword. + +Example: +| ${items} = | Get Dictionary Items | ${D3} | +=> +| ${items} = ['a', 1, 'b', 2, 'c', 3] + + + + + +dictionary + +Returns keys of the given ``dictionary``. + +If keys are sortable, they are returned in sorted order. The given +``dictionary`` is never altered by this keyword. + +Example: +| ${keys} = | Get Dictionary Keys | ${D3} | +=> +| ${keys} = ['a', 'b', 'c'] + + + + + +dictionary + +Returns values of the given dictionary. + +Values are returned sorted according to keys. The given dictionary is +never altered by this keyword. + +Example: +| ${values} = | Get Dictionary Values | ${D3} | +=> +| ${values} = [1, 2, 3] + + + + + +dictionary +key + +Returns a value from the given ``dictionary`` based on the given ``key``. + +If the given ``key`` cannot be found from the ``dictionary``, this +keyword fails. + +The given dictionary is never altered by this keyword. + +Example: +| ${value} = | Get From Dictionary | ${D3} | b | +=> +| ${value} = 2 + + + + + +list_ +index + +Returns the value specified with an ``index`` from ``list``. + +The given list is never altered by this keyword. + +Index ``0`` means the first position, ``1`` the second, and so on. +Similarly, ``-1`` is the last position, ``-2`` the second last, and so on. +Using an index that does not exist on the list causes an error. +The index can be either an integer or a string that can be converted +to an integer. + +Examples (including Python equivalents in comments): +| ${x} = | Get From List | ${L5} | 0 | # L5[0] | +| ${y} = | Get From List | ${L5} | -2 | # L5[-2] | +=> +| ${x} = 'a' +| ${y} = 'd' +| ${L5} is not changed + + + + + +list_ +value +start=0 +end=None + +Returns the index of the first occurrence of the ``value`` on the list. + +The search can be narrowed to the selected sublist by the ``start`` and +``end`` indexes having the same semantics as with `Get Slice From List` +keyword. In case the value is not found, -1 is returned. The given list +is never altered by this keyword. + +Example: +| ${x} = | Get Index From List | ${L5} | d | +=> +| ${x} = 3 +| ${L5} is not changed + + + + + +list +pattern +case_insensitive=False +whitespace_insensitive=False + +Returns the count of matches to ``pattern`` in ``list``. + +For more information on ``pattern``, ``case_insensitive``, and +``whitespace_insensitive``, see `Should Contain Match`. + +Examples: +| ${count}= | Get Match Count | ${list} | a* | # ${count} will be the count of strings beginning with 'a' | +| ${count}= | Get Match Count | ${list} | regexp=a.* | # ${matches} will be the count of strings beginning with 'a' (regexp version) | +| ${count}= | Get Match Count | ${list} | a* | case_insensitive=${True} | # ${matches} will be the count of strings beginning with 'a' or 'A' | + + + + + +list +pattern +case_insensitive=False +whitespace_insensitive=False + +Returns a list of matches to ``pattern`` in ``list``. + +For more information on ``pattern``, ``case_insensitive``, and +``whitespace_insensitive``, see `Should Contain Match`. + +Examples: +| ${matches}= | Get Matches | ${list} | a* | # ${matches} will contain any string beginning with 'a' | +| ${matches}= | Get Matches | ${list} | regexp=a.* | # ${matches} will contain any string beginning with 'a' (regexp version) | +| ${matches}= | Get Matches | ${list} | a* | case_insensitive=${True} | # ${matches} will contain any string beginning with 'a' or 'A' | + + + + + +list_ +start=0 +end=None + +Returns a slice of the given list between ``start`` and ``end`` indexes. + +The given list is never altered by this keyword. + +If both ``start`` and ``end`` are given, a sublist containing values +from ``start`` to ``end`` is returned. This is the same as +``list[start:end]`` in Python. To get all items from the beginning, +use 0 as the start value, and to get all items until and including +the end, use ``None`` (default) as the end value. + +Using ``start`` or ``end`` not found on the list is the same as using +the largest (or smallest) available index. + +Examples (incl. Python equivalents in comments): +| ${x} = | Get Slice From List | ${L5} | 2 | 4 | # L5[2:4] | +| ${y} = | Get Slice From List | ${L5} | 1 | | # L5[1:None] | +| ${z} = | Get Slice From List | ${L5} | | -2 | # L5[0:-2] | +=> +| ${x} = ['c', 'd'] +| ${y} = ['b', 'c', 'd', 'e'] +| ${z} = ['a', 'b', 'c'] +| ${L5} is not changed + + + + + +list_ +index +value + +Inserts ``value`` into ``list`` to the position specified with ``index``. + +Index ``0`` adds the value into the first position, ``1`` to the second, +and so on. Inserting from right works with negative indices so that +``-1`` is the second last position, ``-2`` third last, and so on. Use +`Append To List` to add items to the end of the list. + +If the absolute value of the index is greater than +the length of the list, the value is added at the end +(positive index) or the beginning (negative index). An index +can be given either as an integer or a string that can be +converted to an integer. + +Example: +| Insert Into List | ${L1} | 0 | xxx | +| Insert Into List | ${L2} | ${-1} | xxx | +=> +| ${L1} = ['xxx', 'a'] +| ${L2} = ['a', 'xxx', 'b'] + + + + + +dictionary +*keys + +Keeps the given ``keys`` in the ``dictionary`` and removes all other. + +If the given ``key`` cannot be found from the ``dictionary``, it +is ignored. + +Example: +| Keep In Dictionary | ${D5} | b | x | d | +=> +| ${D5} = {'b': 2, 'd': 4} + + + + + +list1 +list2 +msg=None +values=True + +Fails if not all of the elements in ``list2`` are found in ``list1``. + +The order of values and the number of values are not taken into +account. + +See `Lists Should Be Equal` for more information about configuring +the error message with ``msg`` and ``values`` arguments. + + + + + +list_ +value +msg=None + +Fails if the ``value`` is not found from ``list``. + +If the keyword fails, the default error messages is ``<list> does +not contain value '<value>'``. A custom message can be given using +the ``msg`` argument. + + + + + +list_ +msg=None + +Fails if any element in the ``list`` is found from it more than once. + +The default error message lists all the elements that were found +from the ``list`` multiple times, but it can be overridden by giving +a custom ``msg``. All multiple times found items and their counts are +also logged. + +This keyword works with all iterables that can be converted to a list. +The original iterable is never altered. + + + + + +list_ +value +msg=None + +Fails if the ``value`` is found from ``list``. + +See `List Should Contain Value` for an explanation of ``msg``. + + + + + +list1 +list2 +msg=None +values=True +names=None + +Fails if given lists are unequal. + +The keyword first verifies that the lists have equal lengths, and then +it checks are all their values equal. Possible differences between the +values are listed in the default error message like ``Index 4: ABC != +Abc``. The types of the lists do not need to be the same. For example, +Python tuple and list with same content are considered equal. + + +The error message can be configured using ``msg`` and ``values`` +arguments: +- If ``msg`` is not given, the default error message is used. +- If ``msg`` is given and ``values`` gets a value considered true + (see `Boolean arguments`), the error message starts with the given + ``msg`` followed by a newline and the default message. +- If ``msg`` is given and ``values`` is not given a true value, + the error message is just the given ``msg``. + +Optional ``names`` argument can be used for naming the indices shown in +the default error message. It can either be a list of names matching +the indices in the lists or a dictionary where keys are indices that +need to be named. It is not necessary to name all of the indices. When +using a dictionary, keys can be either integers or strings that can be +converted to integers. + +Examples: +| ${names} = | Create List | First Name | Family Name | Email | +| Lists Should Be Equal | ${people1} | ${people2} | names=${names} | +| ${names} = | Create Dictionary | 0=First Name | 2=Email | +| Lists Should Be Equal | ${people1} | ${people2} | names=${names} | + +If the items in index 2 would differ in the above examples, the error +message would contain a row like ``Index 2 (email): name@foo.com != +name@bar.com``. + + + + + +dictionary +level=INFO + +Logs the size and contents of the ``dictionary`` using given ``level``. + +Valid levels are TRACE, DEBUG, INFO (default), and WARN. + +If you only want to log the size, use keyword `Get Length` from +the BuiltIn library. + + + + + +list_ +level=INFO + +Logs the length and contents of the ``list`` using given ``level``. + +Valid levels are TRACE, DEBUG, INFO (default), and WARN. + +If you only want to the length, use keyword `Get Length` from +the BuiltIn library. + + + + + +dictionary +key +default= + +Pops the given ``key`` from the ``dictionary`` and returns its value. + +By default the keyword fails if the given ``key`` cannot be found from +the ``dictionary``. If optional ``default`` value is given, it will be +returned instead of failing. + +Example: +| ${val}= | Pop From Dictionary | ${D3} | b | +=> +| ${val} = 2 +| ${D3} = {'a': 1, 'c': 3} + +New in Robot Framework 2.9.2. + + + + + +list_ + +Returns a list without duplicates based on the given ``list``. + +Creates and returns a new list that contains all items in the given +list so that one item can appear only once. Order of the items in +the new list is the same as in the original except for missing +duplicates. Number of the removed duplicates is logged. + + + + + +dictionary +*keys + +Removes the given ``keys`` from the ``dictionary``. + +If the given ``key`` cannot be found from the ``dictionary``, it +is ignored. + +Example: +| Remove From Dictionary | ${D3} | b | x | y | +=> +| ${D3} = {'a': 1, 'c': 3} + + + + + +list_ +index + +Removes and returns the value specified with an ``index`` from ``list``. + +Index ``0`` means the first position, ``1`` the second and so on. +Similarly, ``-1`` is the last position, ``-2`` the second last, and so on. +Using an index that does not exist on the list causes an error. +The index can be either an integer or a string that can be converted +to an integer. + +Example: +| ${x} = | Remove From List | ${L2} | 0 | +=> +| ${x} = 'a' +| ${L2} = ['b'] + + + + + +list_ +*values + +Removes all occurrences of given ``values`` from ``list``. + +It is not an error if a value does not exist in the list at all. + +Example: +| Remove Values From List | ${L4} | a | c | e | f | +=> +| ${L4} = ['b', 'd'] + + + + + +list_ + +Reverses the given list in place. + +Note that the given list is changed and nothing is returned. Use +`Copy List` first, if you need to keep also the original order. + +| Reverse List | ${L3} | +=> +| ${L3} = ['c', 'b', 'a'] + + + + + +list_ +index +value + +Sets the value of ``list`` specified by ``index`` to the given ``value``. + +Index ``0`` means the first position, ``1`` the second and so on. +Similarly, ``-1`` is the last position, ``-2`` second last, and so on. +Using an index that does not exist on the list causes an error. +The index can be either an integer or a string that can be converted to +an integer. + +Example: +| Set List Value | ${L3} | 1 | xxx | +| Set List Value | ${L3} | -1 | yyy | +=> +| ${L3} = ['a', 'xxx', 'yyy'] + + + + + +dictionary +*key_value_pairs +**items + +Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``. + +Giving items as ``key_value_pairs`` means giving keys and values +as separate arguments: + +| Set To Dictionary | ${D1} | key | value | second | ${2} | +=> +| ${D1} = {'a': 1, 'key': 'value', 'second': 2} + +| Set To Dictionary | ${D1} | key=value | second=${2} | + +The latter syntax is typically more convenient to use, but it has +a limitation that keys must be strings. + +If given keys already exist in the dictionary, their values are updated. + + + + + +list +pattern +msg=None +case_insensitive=False +whitespace_insensitive=False + +Fails if ``pattern`` is not found in ``list``. + +See `List Should Contain Value` for an explanation of ``msg``. + +By default, pattern matching is similar to matching files in a shell +and is case-sensitive and whitespace-sensitive. In the pattern syntax, +``*`` matches to anything and ``?`` matches to any single character. You +can also prepend ``glob=`` to your pattern to explicitly use this pattern +matching behavior. + +If you prepend ``regexp=`` to your pattern, your pattern will be used +according to the Python +[http://docs.python.org/library/re.html|re module] regular expression +syntax. Important note: Backslashes are an escape character, and must +be escaped with another backslash (e.g. ``regexp=\\d{6}`` to search for +``\d{6}``). See `BuiltIn.Should Match Regexp` for more details. + +If ``case_insensitive`` is given a true value (see `Boolean arguments`), +the pattern matching will ignore case. + +If ``whitespace_insensitive`` is given a true value (see `Boolean +arguments`), the pattern matching will ignore whitespace. + +Non-string values in lists are ignored when matching patterns. + +The given list is never altered by this keyword. + +See also ``Should Not Contain Match``. + +Examples: +| Should Contain Match | ${list} | a* | | | # Match strings beginning with 'a'. | +| Should Contain Match | ${list} | regexp=a.* | | | # Same as the above but with regexp. | +| Should Contain Match | ${list} | regexp=\\d{6} | | | # Match strings containing six digits. | +| Should Contain Match | ${list} | a* | case_insensitive=True | | # Match strings beginning with 'a' or 'A'. | +| Should Contain Match | ${list} | ab* | whitespace_insensitive=yes | | # Match strings beginning with 'ab' with possible whitespace ignored. | +| Should Contain Match | ${list} | ab* | whitespace_insensitive=true | case_insensitive=true | # Same as the above but also ignore case. | + + + + + +list +pattern +msg=None +case_insensitive=False +whitespace_insensitive=False + +Fails if ``pattern`` is found in ``list``. + +Exact opposite of `Should Contain Match` keyword. See that keyword +for information about arguments and usage in general. + + + + + +list_ + +Sorts the given list in place. + +The strings are sorted alphabetically and the numbers numerically. + +Note that the given list is changed and nothing is returned. Use +`Copy List` first, if you need to keep also the original order. + +${L} = [2,1,'a','c','b'] +| Sort List | ${L} | +=> +| ${L} = [1, 2, 'a', 'b', 'c'] + + + + diff --git a/libspecs/DateTime.libspec b/libspecs/DateTime.libspec new file mode 100644 index 0000000000000000000000000000000000000000..538dd5912ed4b85ee719016704bd6ca7a31ec6aa --- /dev/null +++ b/libspecs/DateTime.libspec @@ -0,0 +1,512 @@ + + +3.1 +global +yes +A test library for handling date and time values. + +``DateTime`` is a Robot Framework standard library that supports creating and +converting date and time values (e.g. `Get Current Date`, `Convert Time`), +as well as doing simple calculations with them (e.g. `Subtract Time From Date`, +`Add Time To Time`). It supports dates and times in various formats, and can +also be used by other libraries programmatically. + += Table of Contents = + +- `Terminology` +- `Date formats` +- `Time formats` +- `Millisecond handling` +- `Programmatic usage` +- `Shortcuts` +- `Keywords` + += Terminology = + +In the context of this library, ``date`` and ``time`` generally have following +meanings: + +- ``date``: An entity with both date and time components but without any + timezone information. For example, ``2014-06-11 10:07:42``. +- ``time``: A time interval. For example, ``1 hour 20 minutes`` or ``01:20:00``. + +This terminology differs from what Python's standard +[http://docs.python.org/library/datetime.html|datetime] module uses. +Basically its +[http://docs.python.org/library/datetime.html#datetime-objects|datetime] and +[http://docs.python.org/library/datetime.html#timedelta-objects|timedelta] +objects match ``date`` and ``time`` as defined by this library. + += Date formats = + +Dates can given to and received from keywords in `timestamp`, `custom +timestamp`, `Python datetime` and `epoch time` formats. These formats are +discussed thoroughly in subsequent sections. + +Input format is determined automatically based on the given date except when +using custom timestamps, in which case it needs to be given using +``date_format`` argument. Default result format is timestamp, but it can +be overridden using ``result_format`` argument. + +== Timestamp == + +If a date is given as a string, it is always considered to be a timestamp. +If no custom formatting is given using ``date_format`` argument, the timestamp +is expected to be in [http://en.wikipedia.org/wiki/ISO_8601|ISO 8601] like +format ``YYYY-MM-DD hh:mm:ss.mil``, where any non-digit character can be used +as a separator or separators can be omitted altogether. Additionally, +only the date part is mandatory, all possibly missing time components are +considered to be zeros. + +Dates can also be returned in the same ``YYYY-MM-DD hh:mm:ss.mil`` format by +using ``timestamp`` value with ``result_format`` argument. This is also the +default format that keywords returning dates use. Milliseconds can be excluded +using ``exclude_millis`` as explained in `Millisecond handling` section. + +Examples: +| ${date1} = | Convert Date | 2014-06-11 10:07:42.000 | +| ${date2} = | Convert Date | 20140611 100742 | result_format=timestamp | +| Should Be Equal | ${date1} | ${date2} | +| ${date} = | Convert Date | 20140612 12:57 | exclude_millis=yes | +| Should Be Equal | ${date} | 2014-06-12 12:57:00 | + +== Custom timestamp == + +It is possible to use custom timestamps in both input and output. +The custom format is same as accepted by Python's +[http://docs.python.org/library/datetime.html#strftime-strptime-behavior| +datatime.strptime] function. For example, the default timestamp discussed +in the previous section would match ``%Y-%m-%d %H:%M:%S.%f``. + +When using a custom timestamp in input, it must be specified using +``date_format`` argument. The actual input value must be a string that matches +the specified format exactly. When using a custom timestamp in output, it must +be given using ``result_format`` argument. + +Examples: +| ${date} = | Convert Date | 28.05.2014 12:05 | date_format=%d.%m.%Y %H:%M | +| Should Be Equal | ${date} | 2014-05-28 12:05:00.000 | +| ${date} = | Convert Date | ${date} | result_format=%d.%m.%Y | +| Should Be Equal | ${date} | 28.05.2014 | + +Notice that locale aware directives like ``%b`` do not work correctly with +Jython on non-English locales: http://bugs.jython.org/issue2285 + +== Python datetime == + +Python's standard +[http://docs.python.org/library/datetime.html#datetime-objects|datetime] +objects can be used both in input and output. In input they are recognized +automatically, and in output it is possible to get them by giving ``datetime`` +value to ``result_format`` argument. + +One nice benefit with datetime objects is that they have different time +components available as attributes that can be easily accessed using the +extended variable syntax. + +Examples: +| ${datetime} = | Convert Date | 2014-06-11 10:07:42.123 | datetime | +| Should Be Equal As Integers | ${datetime.year} | 2014 | +| Should Be Equal As Integers | ${datetime.month} | 6 | +| Should Be Equal As Integers | ${datetime.day} | 11 | +| Should Be Equal As Integers | ${datetime.hour} | 10 | +| Should Be Equal As Integers | ${datetime.minute} | 7 | +| Should Be Equal As Integers | ${datetime.second} | 42 | +| Should Be Equal As Integers | ${datetime.microsecond} | 123000 | + +== Epoch time == + +Epoch time is the time in seconds since the +[http://en.wikipedia.org/wiki/Unix_time|UNIX epoch] i.e. 00:00:00.000 (UTC) +1 January 1970. To give a date in epoch time, it must be given as a number +(integer or float), not as a string. To return a date in epoch time, +it is possible to use ``epoch`` value with ``result_format`` argument. +Epoch time is returned as a floating point number. + +Notice that epoch time itself is independent on timezones and thus same +around the world at a certain time. What local time a certain epoch time +matches obviously then depends on the timezone. For example, examples below +were tested in Finland but verifications would fail on other timezones. + +Examples: +| ${date} = | Convert Date | ${1000000000} | +| Should Be Equal | ${date} | 2001-09-09 04:46:40.000 | +| ${date} = | Convert Date | 2014-06-12 13:27:59.279 | epoch | +| Should Be Equal | ${date} | ${1402568879.279} | + +== Earliest supported date == + +The earliest date that is supported depends on the date format and to some +extend on the platform: + +- Timestamps support year 1900 and above. +- Python datetime objects support year 1 and above. +- Epoch time supports 1970 and above on Windows with Python and IronPython. +- On other platforms epoch time supports 1900 and above or even earlier. + +Prior to Robot Framework 2.9.2, all formats had same limitation as epoch time +has nowadays. + += Time formats = + +Similarly as dates, times can be given to and received from keywords in +various different formats. Supported formats are `number`, `time string` +(verbose and compact), `timer string` and `Python timedelta`. + +Input format for time is always determined automatically based on the input. +Result format is number by default, but it can be customised using +``result_format`` argument. + +== Number == + +Time given as a number is interpreted to be seconds. It can be given +either as an integer or a float, or it can be a string that can be converted +to a number. + +To return a time as a number, ``result_format`` argument must have value +``number``, which is also the default. Returned number is always a float. + +Examples: +| ${time} = | Convert Time | 3.14 | +| Should Be Equal | ${time} | ${3.14} | +| ${time} = | Convert Time | ${time} | result_format=number | +| Should Be Equal | ${time} | ${3.14} | + +== Time string == + +Time strings are strings in format like ``1 minute 42 seconds`` or ``1min 42s``. +The basic idea of this format is having first a number and then a text +specifying what time that number represents. Numbers can be either +integers or floating point numbers, the whole format is case and space +insensitive, and it is possible to add a minus prefix to specify negative +times. The available time specifiers are: + +- ``days``, ``day``, ``d`` +- ``hours``, ``hour``, ``h`` +- ``minutes``, ``minute``, ``mins``, ``min``, ``m`` +- ``seconds``, ``second``, ``secs``, ``sec``, ``s`` +- ``milliseconds``, ``millisecond``, ``millis``, ``ms`` + +When returning a time string, it is possible to select between ``verbose`` +and ``compact`` representations using ``result_format`` argument. The verbose +format uses long specifiers ``day``, ``hour``, ``minute``, ``second`` and +``millisecond``, and adds ``s`` at the end when needed. The compact format uses +shorter specifiers ``d``, ``h``, ``min``, ``s`` and ``ms``, and even drops +the space between the number and the specifier. + +Examples: +| ${time} = | Convert Time | 1 minute 42 seconds | +| Should Be Equal | ${time} | ${102} | +| ${time} = | Convert Time | 4200 | verbose | +| Should Be Equal | ${time} | 1 hour 10 minutes | +| ${time} = | Convert Time | - 1.5 hours | compact | +| Should Be Equal | ${time} | - 1h 30min | + +== Timer string == + +Timer string is a string given in timer like format ``hh:mm:ss.mil``. In this +format both hour and millisecond parts are optional, leading and trailing +zeros can be left out when they are not meaningful, and negative times can +be represented by adding a minus prefix. + +To return a time as timer string, ``result_format`` argument must be given +value ``timer``. Timer strings are by default returned in full ``hh:mm:ss.mil`` +format, but milliseconds can be excluded using ``exclude_millis`` as explained +in `Millisecond handling` section. + +Examples: +| ${time} = | Convert Time | 01:42 | +| Should Be Equal | ${time} | ${102} | +| ${time} = | Convert Time | 01:10:00.123 | +| Should Be Equal | ${time} | ${4200.123} | +| ${time} = | Convert Time | 102 | timer | +| Should Be Equal | ${time} | 00:01:42.000 | +| ${time} = | Convert Time | -101.567 | timer | exclude_millis=yes | +| Should Be Equal | ${time} | -00:01:42 | + +== Python timedelta == + +Python's standard +[http://docs.python.org/library/datetime.html#datetime.timedelta|timedelta] +objects are also supported both in input and in output. In input they are +recognized automatically, and in output it is possible to receive them by +giving ``timedelta`` value to ``result_format`` argument. + +Examples: +| ${timedelta} = | Convert Time | 01:10:02.123 | timedelta | +| Should Be Equal | ${timedelta.total_seconds()} | ${4202.123} | + += Millisecond handling = + +This library handles dates and times internally using the precision of the +given input. With `timestamp`, `time string`, and `timer string` result +formats seconds are, however, rounded to millisecond accuracy. Milliseconds +may also be included even if there would be none. + +All keywords returning dates or times have an option to leave milliseconds out +by giving a true value to ``exclude_millis`` argument. If the argument is given +as a string, it is considered true unless it is empty or case-insensitively +equal to ``false``, ``none`` or ``no``. Other argument types are tested using +same [http://docs.python.org/library/stdtypes.html#truth|rules as in +Python]. Notice that prior to Robot Framework 2.9, all strings except +the empty string were considered true, and that considering ``none`` false is +new in Robot Framework 3.0.3. + +When milliseconds are excluded, seconds in returned dates and times are +rounded to the nearest full second. With `timestamp` and `timer string` +result formats, milliseconds will also be removed from the returned string +altogether. + +Examples: +| ${date} = | Convert Date | 2014-06-11 10:07:42 | +| Should Be Equal | ${date} | 2014-06-11 10:07:42.000 | +| ${date} = | Convert Date | 2014-06-11 10:07:42.500 | exclude_millis=yes | +| Should Be Equal | ${date} | 2014-06-11 10:07:43 | +| ${dt} = | Convert Date | 2014-06-11 10:07:42.500 | datetime | exclude_millis=yes | +| Should Be Equal | ${dt.second} | ${43} | +| Should Be Equal | ${dt.microsecond} | ${0} | +| ${time} = | Convert Time | 102 | timer | exclude_millis=false | +| Should Be Equal | ${time} | 00:01:42.000 | | +| ${time} = | Convert Time | 102.567 | timer | exclude_millis=true | +| Should Be Equal | ${time} | 00:01:43 | | + += Programmatic usage = + +In addition to be used as normal library, this library is intended to +provide a stable API for other libraries to use if they want to support +same date and time formats as this library. All the provided keywords +are available as functions that can be easily imported: + +| from robot.libraries.DateTime import convert_time +| +| def example_keyword(timeout): +| seconds = convert_time(timeout) +| # ... + +Additionally helper classes ``Date`` and ``Time`` can be used directly: + +| from robot.libraries.DateTime import Date, Time +| +| def example_keyword(date, interval): +| date = Date(date).convert('datetime') +| interval = Time(interval).convert('number') +| # ... + + +date +time +result_format=timestamp +exclude_millis=False +date_format=None + +Adds time to date and returns the resulting date. + +Arguments: +- ``date:`` Date to add time to in one of the supported + `date formats`. +- ``time:`` Time that is added in one of the supported + `time formats`. +- ``result_format:`` Format of the returned date. +- ``exclude_millis:`` When set to any true value, rounds and drops + milliseconds as explained in `millisecond handling`. +- ``date_format:`` Possible `custom timestamp` format of ``date``. + +Examples: +| ${date} = | Add Time To Date | 2014-05-28 12:05:03.111 | 7 days | +| Should Be Equal | ${date} | 2014-06-04 12:05:03.111 | | +| ${date} = | Add Time To Date | 2014-05-28 12:05:03.111 | 01:02:03:004 | +| Should Be Equal | ${date} | 2014-05-28 13:07:06.115 | + + + + + +time1 +time2 +result_format=number +exclude_millis=False + +Adds time to another time and returns the resulting time. + +Arguments: +- ``time1:`` First time in one of the supported `time formats`. +- ``time2:`` Second time in one of the supported `time formats`. +- ``result_format:`` Format of the returned time. +- ``exclude_millis:`` When set to any true value, rounds and drops + milliseconds as explained in `millisecond handling`. + +Examples: +| ${time} = | Add Time To Time | 1 minute | 42 | +| Should Be Equal | ${time} | ${102} | +| ${time} = | Add Time To Time | 3 hours 5 minutes | 01:02:03 | timer | exclude_millis=yes | +| Should Be Equal | ${time} | 04:07:03 | + + + + + +date +result_format=timestamp +exclude_millis=False +date_format=None + +Converts between supported `date formats`. + +Arguments: +- ``date:`` Date in one of the supported `date formats`. +- ``result_format:`` Format of the returned date. +- ``exclude_millis:`` When set to any true value, rounds and drops + milliseconds as explained in `millisecond handling`. +- ``date_format:`` Specifies possible `custom timestamp` format. + +Examples: +| ${date} = | Convert Date | 20140528 12:05:03.111 | +| Should Be Equal | ${date} | 2014-05-28 12:05:03.111 | +| ${date} = | Convert Date | ${date} | epoch | +| Should Be Equal | ${date} | ${1401267903.111} | +| ${date} = | Convert Date | 5.28.2014 12:05 | exclude_millis=yes | date_format=%m.%d.%Y %H:%M | +| Should Be Equal | ${date} | 2014-05-28 12:05:00 | + + + + + +time +result_format=number +exclude_millis=False + +Converts between supported `time formats`. + +Arguments: +- ``time:`` Time in one of the supported `time formats`. +- ``result_format:`` Format of the returned time. +- ``exclude_millis:`` When set to any true value, rounds and drops + milliseconds as explained in `millisecond handling`. + +Examples: +| ${time} = | Convert Time | 10 seconds | +| Should Be Equal | ${time} | ${10} | +| ${time} = | Convert Time | 1:00:01 | verbose | +| Should Be Equal | ${time} | 1 hour 1 second | +| ${time} = | Convert Time | ${3661.5} | timer | exclude_milles=yes | +| Should Be Equal | ${time} | 01:01:02 | + + + + + +time_zone=local +increment=0 +result_format=timestamp +exclude_millis=False + +Returns current local or UTC time with an optional increment. + +Arguments: +- ``time_zone:`` Get the current time on this time zone. Currently only + ``local`` (default) and ``UTC`` are supported. +- ``increment:`` Optional time increment to add to the returned date in + one of the supported `time formats`. Can be negative. +- ``result_format:`` Format of the returned date (see `date formats`). +- ``exclude_millis:`` When set to any true value, rounds and drops + milliseconds as explained in `millisecond handling`. + +Examples: +| ${date} = | Get Current Date | +| Should Be Equal | ${date} | 2014-06-12 20:00:58.946 | +| ${date} = | Get Current Date | UTC | +| Should Be Equal | ${date} | 2014-06-12 17:00:58.946 | +| ${date} = | Get Current Date | increment=02:30:00 | +| Should Be Equal | ${date} | 2014-06-12 22:30:58.946 | +| ${date} = | Get Current Date | UTC | - 5 hours | +| Should Be Equal | ${date} | 2014-06-12 12:00:58.946 | +| ${date} = | Get Current Date | result_format=datetime | +| Should Be Equal | ${date.year} | ${2014} | +| Should Be Equal | ${date.month} | ${6} | + + + + + +date1 +date2 +result_format=number +exclude_millis=False +date1_format=None +date2_format=None + +Subtracts date from another date and returns time between. + +Arguments: +- ``date1:`` Date to subtract another date from in one of the + supported `date formats`. +- ``date2:`` Date that is subtracted in one of the supported + `date formats`. +- ``result_format:`` Format of the returned time (see `time formats`). +- ``exclude_millis:`` When set to any true value, rounds and drops + milliseconds as explained in `millisecond handling`. +- ``date1_format:`` Possible `custom timestamp` format of ``date1``. +- ``date2_format:`` Possible `custom timestamp` format of ``date2``. + + Examples: +| ${time} = | Subtract Date From Date | 2014-05-28 12:05:52 | 2014-05-28 12:05:10 | +| Should Be Equal | ${time} | ${42} | +| ${time} = | Subtract Date From Date | 2014-05-28 12:05:52 | 2014-05-27 12:05:10 | verbose | +| Should Be Equal | ${time} | 1 day 42 seconds | + + + + + +date +time +result_format=timestamp +exclude_millis=False +date_format=None + +Subtracts time from date and returns the resulting date. + +Arguments: +- ``date:`` Date to subtract time from in one of the supported + `date formats`. +- ``time:`` Time that is subtracted in one of the supported + `time formats`. +- ``result_format:`` Format of the returned date. +- ``exclude_millis:`` When set to any true value, rounds and drops + milliseconds as explained in `millisecond handling`. +- ``date_format:`` Possible `custom timestamp` format of ``date``. + +Examples: +| ${date} = | Subtract Time From Date | 2014-06-04 12:05:03.111 | 7 days | +| Should Be Equal | ${date} | 2014-05-28 12:05:03.111 | +| ${date} = | Subtract Time From Date | 2014-05-28 13:07:06.115 | 01:02:03:004 | +| Should Be Equal | ${date} | 2014-05-28 12:05:03.111 | + + + + + +time1 +time2 +result_format=number +exclude_millis=False + +Subtracts time from another time and returns the resulting time. + +Arguments: +- ``time1:`` Time to subtract another time from in one of + the supported `time formats`. +- ``time2:`` Time to subtract in one of the supported `time formats`. +- ``result_format:`` Format of the returned time. +- ``exclude_millis:`` When set to any true value, rounds and drops + milliseconds as explained in `millisecond handling`. + +Examples: +| ${time} = | Subtract Time From Time | 00:02:30 | 100 | +| Should Be Equal | ${time} | ${50} | +| ${time} = | Subtract Time From Time | ${time} | 1 minute | compact | +| Should Be Equal | ${time} | - 10s | + + + + diff --git a/libspecs/DependencyLibrary_bb1d1ad.libspec b/libspecs/DependencyLibrary_bb1d1ad.libspec new file mode 100644 index 0000000000000000000000000000000000000000..95e914a1aa3ece602a3be38bd5e3088cb447fee1 --- /dev/null +++ b/libspecs/DependencyLibrary_bb1d1ad.libspec @@ -0,0 +1,55 @@ + + + +global +yes +Documentation for library ``DependencyLibrary``. + + +name + + + + + + + +name + + + + + + + +name + + + + + + + +name + + + + + + + +name + + + + + + + +name + + + + + + diff --git a/libspecs/Dialogs.libspec b/libspecs/Dialogs.libspec new file mode 100644 index 0000000000000000000000000000000000000000..b02219559a906c41bf74c8d9046c49ddca9b0359 --- /dev/null +++ b/libspecs/Dialogs.libspec @@ -0,0 +1,112 @@ + + +3.1 +global +yes +A test library providing dialogs for interacting with users. + +``Dialogs`` is Robot Framework's standard library that provides means +for pausing the test execution and getting input from users. The +dialogs are slightly different depending on whether tests are run on +Python, IronPython or Jython but they provide the same functionality. + +Long lines in the provided messages are wrapped automatically. If you want +to wrap lines manually, you can add newlines using the ``\n`` character +sequence. + +The library has a known limitation that it cannot be used with timeouts +on Python. Support for IronPython was added in Robot Framework 2.9.2. + + +message +default_error= + +Pauses test execution until user sets the keyword status. + +User can press either ``PASS`` or ``FAIL`` button. In the latter case execution +fails and an additional dialog is opened for defining the error message. + +``message`` is the instruction shown in the initial dialog and +``default_error`` is the default value shown in the possible error message +dialog. + + + + + +message +*values + +Pauses test execution and asks user to select a value. + +The selected value is returned. Pressing ``Cancel`` fails the keyword. + +``message`` is the instruction shown in the dialog and ``values`` are +the options given to the user. + +Example: +| ${user} = | Get Selection From User | Select user | user1 | user2 | admin | + + + + + +message +*values + +Pauses test execution and asks user to select multiple values. + +The selected values are returned as a list. Selecting no values is OK +and in that case the returned list is empty. Pressing ``Cancel`` fails +the keyword. + +``message`` is the instruction shown in the dialog and ``values`` are +the options given to the user. + +Example: +| ${users} = | Get Selections From User | Select users | user1 | user2 | admin | + +New in Robot Framework 3.1. + + + + + +message +default_value= +hidden=False + +Pauses test execution and asks user to input a value. + +Value typed by the user, or the possible default value, is returned. +Returning an empty value is fine, but pressing ``Cancel`` fails the keyword. + +``message`` is the instruction shown in the dialog and ``default_value`` is +the possible default value shown in the input field. + +If ``hidden`` is given a true value, the value typed by the user is hidden. +``hidden`` is considered true if it is a non-empty string not equal to +``false``, ``none`` or ``no``, case-insensitively. If it is not a string, +its truth value is got directly using same +[http://docs.python.org/library/stdtypes.html#truth|rules as in Python]. + +Example: +| ${username} = | Get Value From User | Input user name | default | +| ${password} = | Get Value From User | Input password | hidden=yes | + +Considering strings ``false`` and ``no`` to be false is new in RF 2.9 +and considering string ``none`` false is new in RF 3.0.3. + + + + + +message=Test execution paused. Press OK to continue. + +Pauses test execution until user clicks ``Ok`` button. + +``message`` is the message shown in the dialog. + + + + diff --git a/libspecs/Easter.libspec b/libspecs/Easter.libspec new file mode 100644 index 0000000000000000000000000000000000000000..de6bc76ca896d9157c253c2e83d58cc98cdf940e --- /dev/null +++ b/libspecs/Easter.libspec @@ -0,0 +1,15 @@ + + + +global +yes +Documentation for library ``Easter``. + + +who + + + + + + diff --git a/libspecs/JSONLibrary_17ae429.libspec b/libspecs/JSONLibrary_17ae429.libspec new file mode 100644 index 0000000000000000000000000000000000000000..ce5576ce94907199a6905443c4585ada0cb862ca --- /dev/null +++ b/libspecs/JSONLibrary_17ae429.libspec @@ -0,0 +1,171 @@ + + + +global +yes +JSONLibrary is a robotframework testlibrary for manipulating JSON object (dictionary) + +You can get, add, update and delete your json object using JSONPath. + +== JSONPath Syntax == +| JSONPath | Description | +| $ | the root object/element | +| @ | the current object/element | +| . or [] | child operator | +| .. | recursive descent. JSONPath borrows this syntax from E4X | +| * | wildcard. All objects/element regardless their names. | +| [] | subscript operator. XPath uses it to iterate over element collections and for predicates. In Javascript and JSON it is the native array operator. | +| [,] | Union operator in XPath results in a combination of node sets. JSONPath allows alternate names or array indices as a set. | +| [start:end:step] | array slice operator borrowed from ES4 | +| ?() | applies a filter (script) expression. | +| () | script expression, using the underlying script engine. | + +== *** Known issue *** == +If there is a space in JSONPath expression, the module used by this library will throw an exception. +Therefore, please avoid the space in JSONPath expression if possible. + +*Example:* +| JSONPath | Exception? | +| $.[?(@.id == 1)] | Y | +| $.[?(@.id==1)] | N | +| $.[?(@.name=='test 123')] | N | + +== Example Test Cases == +| *** Settings *** | +| Library | JSONLibrary | +| | +| *** Test Cases *** | +| TestManipulatingJSON | +| ${json_object}= | Load JSON From File | example.json | +| ${object_to_add}= | Create Dictionary | country=Thailand | +| ${json_object}= | Add Object To Json | ${json_object} | $..address | ${object_to_add} | +| ${value}= | Get Value From Json | ${json_object} | $..country | +| Should Be Equal As Strings | ${value[0]} | Thailand | + + +json_object +json_path +object_to_add + +Add an dictionary or list object to json object using json_path + +Arguments: + - json_object: json as a dictionary object. + - json_path: jsonpath expression + - object_to_add: dictionary or list object to add to json_object which is matched by json_path + +Return new json object. + +Examples: +| ${dict}= | Create Dictionary | latitude=13.1234 | longitude=130.1234 | +| ${json}= | Add Object To Json | ${json} | $..address | ${dict} | + + + + + +json_object + +Convert JSON object to string + +Arguments: + - json_object: json as a dictionary object. + +Return new json_string + +Examples: +| ${json_str}= | Convert JSON To String | ${json_obj} | + + + + + +json_string + +Convert String to JSON object + +Arguments: + - json_string: JSON string + +Return new json_object + +Examples: +| ${json_object}= | Convert String to JSON | ${json_string} | + + + + + +json_object +json_path + +Delete Object From JSON using json_path + +Arguments: + - json_object: json as a dictionary object. + - json_path: jsonpath expression + +Return new json_object + +Examples: +| ${json_object}= | Delete Object From Json | ${json} | $..address.streetAddress | + + + + + +json_object +json_path + +Get Value From JSON using JSONPath + +Arguments: + - json_object: json as a dictionary object. + - json_path: jsonpath expression + +Return array of values + +Examples: +| ${values}= | Get Value From Json | ${json} | $..phone_number | + + + + + +file_name + +Load JSON from file. + +Return json as a dictionary object. + +Arguments: + - file_name: absolute json file name + +Return json object (list or dictionary) + +Examples: +| ${result}= | Load Json From File | /path/to/file.json | + + + + + +json_object +json_path +new_value + +Update value to JSON using JSONPath + +Arguments: + - json_object: json as a dictionary object. + - json_path: jsonpath expression + - new_value: value to update + +Return new json_object + +Examples: +| ${json_object}= | Update Value To Json | ${json} | $..address.streetAddress | Ratchadapisek Road | + + + + diff --git a/libspecs/JSONSchemaLibrary_c1d7acb.libspec b/libspecs/JSONSchemaLibrary_c1d7acb.libspec new file mode 100644 index 0000000000000000000000000000000000000000..1e176c935534cfd656273bb3ef2f49520d173aaf --- /dev/null +++ b/libspecs/JSONSchemaLibrary_c1d7acb.libspec @@ -0,0 +1,31 @@ + + + +global +yes +JSONSchemaLibrary is a library to validate JSON against JSON Schema definitions using Robot Framework. + +It uses the jsonschema library for Python: https://github.com/Julian/jsonschema + +*Before running tests* + +Prior to running JSONSchemaLibrary tests, you must make sure that the JSON Schema definitions are available +somewhere on the local filesystem. The default is to look in a subdirectory called `schemas`. + + +schema_location=schemas + +Initialize self. See help(type(self)) for accurate signature. + + + + + +schema_filename +sample + +Validates the sample JSON against the given schema. + + + + diff --git a/libspecs/MockServerLibrary_03fd3d4.libspec b/libspecs/MockServerLibrary_03fd3d4.libspec new file mode 100644 index 0000000000000000000000000000000000000000..46a38b604a17ed4a3f77bd09322fbd50c00f6cdc --- /dev/null +++ b/libspecs/MockServerLibrary_03fd3d4.libspec @@ -0,0 +1,258 @@ + + +0.0.6 +global +yes +Robot Framework library for interacting with [http://www.mock-server.com|MockServer] + +The purpose of this library is to provide a keyword-based API +towards MockServer to be used in robot tests. The project is hosted in +[https://github.com/etsi-cti-admin/robotframework-mockserver|GitHub], +and packages are released to PyPI. + += Installation = + +| pip install robotframework-mockserver + += Importing = + +The library does not currently support any import arguments, so use the +following setting to take the library into use: + +| Library | MockServerLibrary | + + +path + +Clears expectations and requests for a specific endpoint from the mockserver. + +`path` is the url of the endpoint for which to clean expectations and requests, e.g. /api + + + + + +method +path +response_code=200 +response_headers=None +body_type=JSON +response_body=None + +Creates a default expectation to be used by mockserver. + +`method` is the HTTP method of the mocked endpoint + +`path` is the url of the mocked endpoint, e.g. /api + +`response_code` is the HTTP status code of the response + +`response_headers` is a dictionary of headers to be added to the response + +`body_type` is the type of the response body, e.g. JSON + +`response_body` is a dictonary of JSON attribute(s) to be added to the response body + + + + + +request +response +count=1 +unlimited=True + +Creates a mock expectation to be used by mockserver. + +`request` is a mock request matcher in a dictionary format. + +`response` is a mock response in a dictionary format. + +`count` is the number of expected requests + +`unlimited` is a boolean value which, if enabled, allows unspecified number of +requests to reply to + + + + + +data + +Creates a mock expectation with defined data to be used by mockserver. + +`data` is a dictionary or JSON string with mock data. Please see +[https://app.swaggerhub.com/apis/jamesdbloom/mock-server_api|MockServer documentation] +for the detailed API reference. + + + + + +request +forward +count=1 +unlimited=True + +Creates a mock expectation with request and forward action to be used by mockserver. + +`request` is a mock request matcher in a dictionary format. + +`forward` is a mock forward in a dictionary format. + +`count` is the number of expected requests + +`unlimited` is a boolean value which, if enabled, allows unspecified number of +requests to reply to + + + + + +path +delay=1 +unit=SECONDS + +Creates a mock http override forward to be used by mockserver. + +Returns the http forward in a dictionary format. + +`path` is the new url where to forward the request + +`delay` is the delay of the forward action + +`unit` is the unit of the delay time (default "SECONDS") + + + + + +method +path +body_type=JSON +body=None +exact=True + +Creates a mock request matcher to be used by mockserver. + +Returns the request matcher in a dictionary format. + +`method` is the HTTP method of the mocked endpoint + +`path` is the url of the mocked endpoint, e.g. /api + +`body_type` is the type of the request body, e.g. JSON + +`body` is a dictionary of the json attribute(s) to match + +`exact` is a boolean value which specifies whether the body should match fully (=true), +or if only specified fields should match (=false) + + + + + +status_code +headers=None +body_type=JSON +body=None + +Creates a mock response to be used by mockserver. + +Returns the response in a dictionary format. + +`status_code` is the HTTP status code of the response + +`headers` is a dictionary of headers to be added to the response + +`body_type` is the type of the response body, e.g. JSON + +`body` is a dictonary of JSON attribute(s) to be added to the response body + + + + + +base_url + +Creates an HTTP session towards mockserver. + +`base_url` is the full url (including port, if applicable) of the mockserver, +e.g. http://localhost:1080. + + + + + + +Dumps logs at the mockserver. + + + + + + +Clears all expectations and received requests from the mockserver. + + + + + +path + +Retrieves expectations from the mockserver. + +`path` is the url of the endpoint for which to retrieve expectations, e.g. /api + + + + + +path + +Retrieves requests from the mockserver + +`path` is the url of the endpoint for which to retrieve requests, e.g. /api + + + + + +request +count=1 +exact=True + +Verifies that the mockserver has received a specific request. + +`request` is a request expectation created using the keyword `Create Mock Request Matcher` + +`count` is the minimum expected number of requests + +`exact` specifies whether the expected count should match the actual received count + + + + + +data + +Verifies a mock expectation with specified data. + +`data` is a dictionary or JSON string with mock data. Please see +[https://app.swaggerhub.com/apis/jamesdbloom/mock-server_api|MockServer documentation] +for the detailed API reference. + + + + + +requests + +Verifies that the mockserver has received a specific ordered request sequence. + +`requests` is a list of request expectations created using the keyword +`Create Mock Request Matcher` + + + + diff --git a/libspecs/OperatingSystem.libspec b/libspecs/OperatingSystem.libspec new file mode 100644 index 0000000000000000000000000000000000000000..2ec003cd73b8652badde437d81922a82fa89d472 --- /dev/null +++ b/libspecs/OperatingSystem.libspec @@ -0,0 +1,1138 @@ + + +3.1 +global +yes +A test library providing keywords for OS related tasks. + +``OperatingSystem`` is Robot Framework's standard library that +enables various operating system related tasks to be performed in +the system where Robot Framework is running. It can, among other +things, execute commands (e.g. `Run`), create and remove files and +directories (e.g. `Create File`, `Remove Directory`), check +whether files or directories exists or contain something +(e.g. `File Should Exist`, `Directory Should Be Empty`) and +manipulate environment variables (e.g. `Set Environment Variable`). + +== Table of contents == + +- `Path separators` +- `Pattern matching` +- `Tilde expansion` +- `Boolean arguments` +- `Example` +- `Shortcuts` +- `Keywords` + += Path separators = + +Because Robot Framework uses the backslash (``\``) as an escape character +in the test data, using a literal backslash requires duplicating it like +in ``c:\\path\\file.txt``. That can be inconvenient especially with +longer Windows paths, and thus all keywords expecting paths as arguments +convert forward slashes to backslashes automatically on Windows. This also +means that paths like ``${CURDIR}/path/file.txt`` are operating system +independent. + +Notice that the automatic path separator conversion does not work if +the path is only a part of an argument like with `Run` and `Start Process` +keywords. In these cases the built-in variable ``${/}`` that contains +``\`` or ``/``, depending on the operating system, can be used instead. + += Pattern matching = + +Some keywords allow their arguments to be specified as +[http://en.wikipedia.org/wiki/Glob_(programming)|glob patterns] where: + +| ``*`` | matches any string, even an empty string | +| ``?`` | matches any single character | +| ``[chars]`` | matches one character in the bracket | +| ``[!chars]`` | matches one character not in the bracket | +| ``[a-z]`` | matches one character from the range in the bracket | +| ``[!a-z]`` | matches one character not from the range in the bracket | + +Unless otherwise noted, matching is case-insensitive on +case-insensitive operating systems such as Windows. + +Starting from Robot Framework 2.9.1, globbing is not done if the given path +matches an existing file even if it would contain a glob pattern. + += Tilde expansion = + +Paths beginning with ``~`` or ``~username`` are expanded to the current or +specified user's home directory, respectively. The resulting path is +operating system dependent, but typically e.g. ``~/robot`` is expanded to +``C:\Users\<user>\robot`` on Windows and ``/home/<user>/robot`` on +Unixes. + +The ``~username`` form does not work on Jython. + += Boolean arguments = + +Some keywords accept arguments that are handled as Boolean values true or +false. If such an argument is given as a string, it is considered false if +it is an empty string or equal to ``FALSE``, ``NONE``, ``NO``, ``OFF`` or +``0``, case-insensitively. Other strings are considered true regardless +their value, and other argument types are tested using the same +[http://docs.python.org/library/stdtypes.html#truth|rules as in Python]. + +True examples: +| `Remove Directory` | ${path} | recursive=True | # Strings are generally true. | +| `Remove Directory` | ${path} | recursive=yes | # Same as the above. | +| `Remove Directory` | ${path} | recursive=${TRUE} | # Python ``True`` is true. | +| `Remove Directory` | ${path} | recursive=${42} | # Numbers other than 0 are true. | + +False examples: +| `Remove Directory` | ${path} | recursive=False | # String ``false`` is false. | +| `Remove Directory` | ${path} | recursive=no | # Also string ``no`` is false. | +| `Remove Directory` | ${path} | recursive=${EMPTY} | # Empty string is false. | +| `Remove Directory` | ${path} | recursive=${FALSE} | # Python ``False`` is false. | + +Considering string ``NONE`` false is new in Robot Framework 3.0.3 and +considering also ``OFF`` and ``0`` false is new in Robot Framework 3.1. + += Example = + +| =Setting= | =Value= | +| Library | OperatingSystem | + +| =Variable= | =Value= | +| ${PATH} | ${CURDIR}/example.txt | + +| =Test Case= | =Action= | =Argument= | =Argument= | +| Example | Create File | ${PATH} | Some text | +| | File Should Exist | ${PATH} | | +| | Copy File | ${PATH} | ~/file.txt | +| | ${output} = | Run | ${TEMPDIR}${/}script.py arg | + + +name +*values +**config + +Appends given ``values`` to environment variable ``name``. + +If the environment variable already exists, values are added after it, +and otherwise a new environment variable is created. + +Values are, by default, joined together using the operating system +path separator (``;`` on Windows, ``:`` elsewhere). This can be changed +by giving a separator after the values like ``separator=value``. No +other configuration parameters are accepted. + +Examples (assuming ``NAME`` and ``NAME2`` do not exist initially): +| Append To Environment Variable | NAME | first | | +| Should Be Equal | %{NAME} | first | | +| Append To Environment Variable | NAME | second | third | +| Should Be Equal | %{NAME} | first${:}second${:}third | +| Append To Environment Variable | NAME2 | first | separator=- | +| Should Be Equal | %{NAME2} | first | | +| Append To Environment Variable | NAME2 | second | separator=- | +| Should Be Equal | %{NAME2} | first-second | + + + + + +path +content +encoding=UTF-8 + +Appends the given content to the specified file. + +If the file does not exists, this keyword works exactly the same +way as `Create File`. + + + + + +source +destination + +Copies the source directory into the destination. + +If the destination exists, the source is copied under it. Otherwise +the destination directory and the possible missing intermediate +directories are created. + + + + + +source +destination + +Copies the source file into the destination. + +Source must be a path to an existing file or a glob pattern (see +`Pattern matching`) that matches exactly one file. How the +destination is interpreted is explained below. + +1) If the destination is an existing file, the source file is copied +over it. + +2) If the destination is an existing directory, the source file is +copied into it. A possible file with the same name as the source is +overwritten. + +3) If the destination does not exist and it ends with a path +separator (``/`` or ``\``), it is considered a directory. That +directory is created and a source file copied into it. +Possible missing intermediate directories are also created. + +4) If the destination does not exist and it does not end with a path +separator, it is considered a file. If the path to the file does not +exist, it is created. + +The resulting destination path is returned since Robot Framework 2.9.2. + +See also `Copy Files`, `Move File`, and `Move Files`. + + + + + +*sources_and_destination + +Copies specified files to the target directory. + +Source files can be given as exact paths and as glob patterns (see +`Pattern matching`). At least one source must be given, but it is +not an error if it is a pattern that does not match anything. + +Last argument must be the destination directory. If the destination +does not exist, it will be created. + +Examples: +| Copy Files | ${dir}/file1.txt | ${dir}/file2.txt | ${dir2} | +| Copy Files | ${dir}/file-*.txt | ${dir2} | | + +See also `Copy File`, `Move File`, and `Move Files`. + + + + + +path +pattern=None + +Wrapper for `Count Items In Directory` returning only directory count. + + + + + +path +pattern=None + +Wrapper for `Count Items In Directory` returning only file count. + + + + + +path +pattern=None + +Returns and logs the number of all items in the given directory. + +The argument ``pattern`` has the same semantics as with `List Directory` +keyword. The count is returned as an integer, so it must be checked e.g. +with the built-in keyword `Should Be Equal As Integers`. + + + + + +path +content + +Creates a binary file with the given content. + +If content is given as a Unicode string, it is first converted to bytes +character by character. All characters with ordinal below 256 can be +used and are converted to bytes with same values. Using characters +with higher ordinal is an error. + +Byte strings, and possible other types, are written to the file as is. + +If the directory for the file does not exist, it is created, along +with missing intermediate directories. + +Examples: +| Create Binary File | ${dir}/example.png | ${image content} | +| Create Binary File | ${path} | \x01\x00\xe4\x00 | + +Use `Create File` if you want to create a text file using a certain +encoding. `File Should Not Exist` can be used to avoid overwriting +existing files. + + + + + +path + +Creates the specified directory. + +Also possible intermediate directories are created. Passes if the +directory already exists, but fails if the path exists and is not +a directory. + + + + + +path +content= +encoding=UTF-8 + +Creates a file with the given content and encoding. + +If the directory for the file does not exist, it is created, along +with missing intermediate directories. + +See `Get File` for more information about possible ``encoding`` values, +including special values ``SYSTEM`` and ``CONSOLE``. + +Examples: +| Create File | ${dir}/example.txt | Hello, world! | | +| Create File | ${path} | Hyv\xe4 esimerkki | Latin-1 | +| Create File | /tmp/foo.txt | ${content} | SYSTEM | + +Use `Append To File` if you want to append to an existing file +and `Create Binary File` if you need to write bytes without encoding. +`File Should Not Exist` can be used to avoid overwriting existing +files. + +The support for ``SYSTEM`` and ``CONSOLE`` encodings is new in Robot +Framework 3.0. + + + + + +path +msg=None + +Fails unless the specified directory is empty. + +The default error message can be overridden with the ``msg`` argument. + + + + + +path +msg=None + +Fails unless the given path points to an existing directory. + +The path can be given as an exact path or as a glob pattern. +The pattern matching syntax is explained in `introduction`. +The default error message can be overridden with the ``msg`` argument. + + + + + +path +msg=None + +Fails if the specified directory is empty. + +The default error message can be overridden with the ``msg`` argument. + + + + + +path +msg=None + +Fails if the given path points to an existing file. + +The path can be given as an exact path or as a glob pattern. +The pattern matching syntax is explained in `introduction`. +The default error message can be overridden with the ``msg`` argument. + + + + + +path + +Deletes all the content from the given directory. + +Deletes both files and sub-directories, but the specified directory +itself if not removed. Use `Remove Directory` if you want to remove +the whole directory. + + + + + +name +msg=None + +Fails if the specified environment variable is not set. + +The default error message can be overridden with the ``msg`` argument. + + + + + +name +msg=None + +Fails if the specified environment variable is set. + +The default error message can be overridden with the ``msg`` argument. + + + + + +path +msg=None + +Fails unless the specified file is empty. + +The default error message can be overridden with the ``msg`` argument. + + + + + +path +msg=None + +Fails unless the given ``path`` points to an existing file. + +The path can be given as an exact path or as a glob pattern. +The pattern matching syntax is explained in `introduction`. +The default error message can be overridden with the ``msg`` argument. + + + + + +path +msg=None + +Fails if the specified directory is empty. + +The default error message can be overridden with the ``msg`` argument. + + + + + +path +msg=None + +Fails if the given path points to an existing file. + +The path can be given as an exact path or as a glob pattern. +The pattern matching syntax is explained in `introduction`. +The default error message can be overridden with the ``msg`` argument. + + + + + +path + +Returns the contents of a specified file. + +This keyword reads the specified file and returns the contents as is. +See also `Get File`. + + + + + +name +default=None + +Returns the value of an environment variable with the given name. + +If no such environment variable is set, returns the default value, if +given. Otherwise fails the test case. + +Returned variables are automatically decoded to Unicode using +the system encoding. + +Note that you can also access environment variables directly using +the variable syntax ``%{ENV_VAR_NAME}``. + + + + + + +Returns currently available environment variables as a dictionary. + +Both keys and values are decoded to Unicode using the system encoding. +Altering the returned dictionary has no effect on the actual environment +variables. + + + + + +path +encoding=UTF-8 +encoding_errors=strict + +Returns the contents of a specified file. + +This keyword reads the specified file and returns the contents. +Line breaks in content are converted to platform independent form. +See also `Get Binary File`. + +``encoding`` defines the encoding of the file. The default value is +``UTF-8``, which means that UTF-8 and ASCII encoded files are read +correctly. In addition to the encodings supported by the underlying +Python implementation, the following special encoding values can be +used: + +- ``SYSTEM``: Use the default system encoding. +- ``CONSOLE``: Use the console encoding. Outside Windows this is same + as the system encoding. + +``encoding_errors`` argument controls what to do if decoding some bytes +fails. All values accepted by ``decode`` method in Python are valid, but +in practice the following values are most useful: + +- ``strict``: Fail if characters cannot be decoded (default). +- ``ignore``: Ignore characters that cannot be decoded. +- ``replace``: Replace characters that cannot be decoded with + a replacement character. + +Support for ``SYSTEM`` and ``CONSOLE`` encodings in Robot Framework 3.0. + + + + + +path + +Returns and logs file size as an integer in bytes. + + + + + +path +format=timestamp + +Returns the last modification time of a file or directory. + +How time is returned is determined based on the given ``format`` +string as follows. Note that all checks are case-insensitive. +Returned time is also automatically logged. + +1) If ``format`` contains the word ``epoch``, the time is returned + in seconds after the UNIX epoch. The return value is always + an integer. + +2) If ``format`` contains any of the words ``year``, ``month``, + ``day``, ``hour``, ``min`` or ``sec``, only the selected parts are + returned. The order of the returned parts is always the one + in the previous sentence and the order of the words in + ``format`` is not significant. The parts are returned as + zero-padded strings (e.g. May -> ``05``). + +3) Otherwise, and by default, the time is returned as a + timestamp string in the format ``2006-02-24 15:08:31``. + +Examples (when the modified time of ``${CURDIR}`` is +2006-03-29 15:06:21): +| ${time} = | Get Modified Time | ${CURDIR} | +| ${secs} = | Get Modified Time | ${CURDIR} | epoch | +| ${year} = | Get Modified Time | ${CURDIR} | return year | +| ${y} | ${d} = | Get Modified Time | ${CURDIR} | year,day | +| @{time} = | Get Modified Time | ${CURDIR} | year,month,day,hour,min,sec | +=> +- ${time} = '2006-03-29 15:06:21' +- ${secs} = 1143637581 +- ${year} = '2006' +- ${y} = '2006' & ${d} = '29' +- @{time} = ['2006', '03', '29', '15', '06', '21'] + + + + + +path +pattern +encoding=UTF-8 +encoding_errors=strict + +Returns the lines of the specified file that match the ``pattern``. + +This keyword reads a file from the file system using the defined +``path``, ``encoding`` and ``encoding_errors`` similarly as `Get File`. +A difference is that only the lines that match the given ``pattern`` are +returned. Lines are returned as a single string catenated back together +with newlines and the number of matched lines is automatically logged. +Possible trailing newline is never returned. + +A line matches if it contains the ``pattern`` anywhere in it and +it *does not need to match the pattern fully*. The pattern +matching syntax is explained in `introduction`, and in this +case matching is case-sensitive. + +Examples: +| ${errors} = | Grep File | /var/log/myapp.log | ERROR | +| ${ret} = | Grep File | ${CURDIR}/file.txt | [Ww]ildc??d ex*ple | + +If more complex pattern matching is needed, it is possible to use +`Get File` in combination with String library keywords like `Get +Lines Matching Regexp`. + + + + + +base +*parts + +Joins the given path part(s) to the given base path. + +The path separator (``/`` or ``\``) is inserted when needed and +the possible absolute paths handled as expected. The resulted +path is also normalized. + +Examples: +| ${path} = | Join Path | my | path | +| ${p2} = | Join Path | my/ | path/ | +| ${p3} = | Join Path | my | path | my | file.txt | +| ${p4} = | Join Path | my | /path | +| ${p5} = | Join Path | /my/path/ | .. | path2 | +=> +- ${path} = 'my/path' +- ${p2} = 'my/path' +- ${p3} = 'my/path/my/file.txt' +- ${p4} = '/path' +- ${p5} = '/my/path2' + + + + + +base +*paths + +Joins given paths with base and returns resulted paths. + +See `Join Path` for more information. + +Examples: +| @{p1} = | Join Paths | base | example | other | | +| @{p2} = | Join Paths | /my/base | /example | other | | +| @{p3} = | Join Paths | my/base | example/path/ | other | one/more | +=> +- @{p1} = ['base/example', 'base/other'] +- @{p2} = ['/example', '/my/base/other'] +- @{p3} = ['my/base/example/path', 'my/base/other', 'my/base/one/more'] + + + + + +path +pattern=None +absolute=False + +Wrapper for `List Directory` that returns only directories. + + + + + +path +pattern=None +absolute=False + +Returns and logs items in a directory, optionally filtered with ``pattern``. + +File and directory names are returned in case-sensitive alphabetical +order, e.g. ``['A Name', 'Second', 'a lower case name', 'one more']``. +Implicit directories ``.`` and ``..`` are not returned. The returned +items are automatically logged. + +File and directory names are returned relative to the given path +(e.g. ``'file.txt'``) by default. If you want them be returned in +absolute format (e.g. ``'/home/robot/file.txt'``), give the ``absolute`` +argument a true value (see `Boolean arguments`). + +If ``pattern`` is given, only items matching it are returned. The pattern +matching syntax is explained in `introduction`, and in this case +matching is case-sensitive. + +Examples (using also other `List Directory` variants): +| @{items} = | List Directory | ${TEMPDIR} | +| @{files} = | List Files In Directory | /tmp | *.txt | absolute | +| ${count} = | Count Files In Directory | ${CURDIR} | ??? | + + + + + +path +pattern=None +absolute=False + +Wrapper for `List Directory` that returns only files. + + + + + +level=INFO + +Logs all environment variables using the given log level. + +Environment variables are also returned the same way as with +`Get Environment Variables` keyword. + + + + + +path +encoding=UTF-8 +encoding_errors=strict + +Wrapper for `Get File` that also logs the returned file. + +The file is logged with the INFO level. If you want something else, +just use `Get File` and the built-in keyword `Log` with the desired +level. + +See `Get File` for more information about ``encoding`` and +``encoding_errors`` arguments. + + + + + +source +destination + +Moves the source directory into a destination. + +Uses `Copy Directory` keyword internally, and ``source`` and +``destination`` arguments have exactly same semantics as with +that keyword. + + + + + +source +destination + +Moves the source file into the destination. + +Arguments have exactly same semantics as with `Copy File` keyword. +Destination file path is returned since Robot Framework 2.9.2. + +If the source and destination are on the same filesystem, rename +operation is used. Otherwise file is copied to the destination +filesystem and then removed from the original filesystem. + +See also `Move Files`, `Copy File`, and `Copy Files`. + + + + + +*sources_and_destination + +Moves specified files to the target directory. + +Arguments have exactly same semantics as with `Copy Files` keyword. + +See also `Move File`, `Copy File`, and `Copy Files`. + + + + + +path +case_normalize=False + +Normalizes the given path. + +- Collapses redundant separators and up-level references. +- Converts ``/`` to ``\`` on Windows. +- Replaces initial ``~`` or ``~user`` by that user's home directory. + The latter is not supported on Jython. +- If ``case_normalize`` is given a true value (see `Boolean arguments`) + on Windows, converts the path to all lowercase. New in Robot + Framework 3.1. + +Examples: +| ${path1} = | Normalize Path | abc/ | +| ${path2} = | Normalize Path | abc/../def | +| ${path3} = | Normalize Path | abc/./def//ghi | +| ${path4} = | Normalize Path | ~robot/stuff | +=> +- ${path1} = 'abc' +- ${path2} = 'def' +- ${path3} = 'abc/def/ghi' +- ${path4} = '/home/robot/stuff' + +On Windows result would use ``\`` instead of ``/`` and home directory +would be different. + + + + + +path +recursive=False + +Removes the directory pointed to by the given ``path``. + +If the second argument ``recursive`` is given a true value (see +`Boolean arguments`), the directory is removed recursively. Otherwise +removing fails if the directory is not empty. + +If the directory pointed to by the ``path`` does not exist, the keyword +passes, but it fails, if the ``path`` points to a file. + + + + + +*names + +Deletes the specified environment variable. + +Does nothing if the environment variable is not set. + +It is possible to remove multiple variables by passing them to this +keyword as separate arguments. + + + + + +path + +Removes a file with the given path. + +Passes if the file does not exist, but fails if the path does +not point to a regular file (e.g. it points to a directory). + +The path can be given as an exact path or as a glob pattern. +The pattern matching syntax is explained in `introduction`. +If the path is a pattern, all files matching it are removed. + + + + + +*paths + +Uses `Remove File` to remove multiple files one-by-one. + +Example: +| Remove Files | ${TEMPDIR}${/}foo.txt | ${TEMPDIR}${/}bar.txt | ${TEMPDIR}${/}zap.txt | + + + + + +command + +Runs the given command in the system and returns the output. + +The execution status of the command *is not checked* by this +keyword, and it must be done separately based on the returned +output. If the execution return code is needed, either `Run +And Return RC` or `Run And Return RC And Output` can be used. + +The standard error stream is automatically redirected to the standard +output stream by adding ``2>&1`` after the executed command. This +automatic redirection is done only when the executed command does not +contain additional output redirections. You can thus freely forward +the standard error somewhere else, for example, like +``my_command 2>stderr.txt``. + +The returned output contains everything written into the standard +output or error streams by the command (unless either of them +is redirected explicitly). Many commands add an extra newline +(``\n``) after the output to make it easier to read in the +console. To ease processing the returned output, this possible +trailing newline is stripped by this keyword. + +Examples: +| ${output} = | Run | ls -lhF /tmp | +| Log | ${output} | +| ${result} = | Run | ${CURDIR}${/}tester.py arg1 arg2 | +| Should Not Contain | ${result} | FAIL | +| ${stdout} = | Run | /opt/script.sh 2>/tmp/stderr.txt | +| Should Be Equal | ${stdout} | TEST PASSED | +| File Should Be Empty | /tmp/stderr.txt | + +*TIP:* `Run Process` keyword provided by the +[http://robotframework.org/robotframework/latest/libraries/Process.html| +Process library] supports better process configuration and is generally +recommended as a replacement for this keyword. + + + + + +command + +Runs the given command in the system and returns the return code. + +The return code (RC) is returned as a positive integer in +range from 0 to 255 as returned by the executed command. On +some operating systems (notable Windows) original return codes +can be something else, but this keyword always maps them to +the 0-255 range. Since the RC is an integer, it must be +checked e.g. with the keyword `Should Be Equal As Integers` +instead of `Should Be Equal` (both are built-in keywords). + +Examples: +| ${rc} = | Run and Return RC | ${CURDIR}${/}script.py arg | +| Should Be Equal As Integers | ${rc} | 0 | +| ${rc} = | Run and Return RC | /path/to/example.rb arg1 arg2 | +| Should Be True | 0 < ${rc} < 42 | + +See `Run` and `Run And Return RC And Output` if you need to get the +output of the executed command. + +*TIP:* `Run Process` keyword provided by the +[http://robotframework.org/robotframework/latest/libraries/Process.html| +Process library] supports better process configuration and is generally +recommended as a replacement for this keyword. + + + + + +command + +Runs the given command in the system and returns the RC and output. + +The return code (RC) is returned similarly as with `Run And Return RC` +and the output similarly as with `Run`. + +Examples: +| ${rc} | ${output} = | Run and Return RC and Output | ${CURDIR}${/}mytool | +| Should Be Equal As Integers | ${rc} | 0 | +| Should Not Contain | ${output} | FAIL | +| ${rc} | ${stdout} = | Run and Return RC and Output | /opt/script.sh 2>/tmp/stderr.txt | +| Should Be True | ${rc} > 42 | +| Should Be Equal | ${stdout} | TEST PASSED | +| File Should Be Empty | /tmp/stderr.txt | + +*TIP:* `Run Process` keyword provided by the +[http://robotframework.org/robotframework/latest/libraries/Process.html| +Process library] supports better process configuration and is generally +recommended as a replacement for this keyword. + + + + + +name +value + +Sets an environment variable to a specified value. + +Values are converted to strings automatically. Set variables are +automatically encoded using the system encoding. + + + + + +path +mtime + +Sets the file modification and access times. + +Changes the modification and access times of the given file to +the value determined by ``mtime``. The time can be given in +different formats described below. Note that all checks +involving strings are case-insensitive. Modified time can only +be set to regular files. + +1) If ``mtime`` is a number, or a string that can be converted + to a number, it is interpreted as seconds since the UNIX + epoch (1970-01-01 00:00:00 UTC). This documentation was + originally written about 1177654467 seconds after the epoch. + +2) If ``mtime`` is a timestamp, that time will be used. Valid + timestamp formats are ``YYYY-MM-DD hh:mm:ss`` and + ``YYYYMMDD hhmmss``. + +3) If ``mtime`` is equal to ``NOW``, the current local time is used. + +4) If ``mtime`` is equal to ``UTC``, the current time in + [http://en.wikipedia.org/wiki/Coordinated_Universal_Time|UTC] + is used. + +5) If ``mtime`` is in the format like ``NOW - 1 day`` or ``UTC + 1 + hour 30 min``, the current local/UTC time plus/minus the time + specified with the time string is used. The time string format + is described in an appendix of Robot Framework User Guide. + +Examples: +| Set Modified Time | /path/file | 1177654467 | # Time given as epoch seconds | +| Set Modified Time | /path/file | 2007-04-27 9:14:27 | # Time given as a timestamp | +| Set Modified Time | /path/file | NOW | # The local time of execution | +| Set Modified Time | /path/file | NOW - 1 day | # 1 day subtracted from the local time | +| Set Modified Time | /path/file | UTC + 1h 2min 3s | # 1h 2min 3s added to the UTC time | + + + + + +path +msg=None + +Fails unless the given path (file or directory) exists. + +The path can be given as an exact path or as a glob pattern. +The pattern matching syntax is explained in `introduction`. +The default error message can be overridden with the ``msg`` argument. + + + + + +path +msg=None + +Fails if the given path (file or directory) exists. + +The path can be given as an exact path or as a glob pattern. +The pattern matching syntax is explained in `introduction`. +The default error message can be overridden with the ``msg`` argument. + + + + + +path + +Splits the extension from the given path. + +The given path is first normalized (e.g. possible trailing +path separators removed, special directories ``..`` and ``.`` +removed). The base path and extension are returned as separate +components so that the dot used as an extension separator is +removed. If the path contains no extension, an empty string is +returned for it. Possible leading and trailing dots in the file +name are never considered to be extension separators. + +Examples: +| ${path} | ${ext} = | Split Extension | file.extension | +| ${p2} | ${e2} = | Split Extension | path/file.ext | +| ${p3} | ${e3} = | Split Extension | path/file | +| ${p4} | ${e4} = | Split Extension | p1/../p2/file.ext | +| ${p5} | ${e5} = | Split Extension | path/.file.ext | +| ${p6} | ${e6} = | Split Extension | path/.file | +=> +- ${path} = 'file' & ${ext} = 'extension' +- ${p2} = 'path/file' & ${e2} = 'ext' +- ${p3} = 'path/file' & ${e3} = '' +- ${p4} = 'p2/file' & ${e4} = 'ext' +- ${p5} = 'path/.file' & ${e5} = 'ext' +- ${p6} = 'path/.file' & ${e6} = '' + + + + + +path + +Splits the given path from the last path separator (``/`` or ``\``). + +The given path is first normalized (e.g. a possible trailing +path separator is removed, special directories ``..`` and ``.`` +removed). The parts that are split are returned as separate +components. + +Examples: +| ${path1} | ${dir} = | Split Path | abc/def | +| ${path2} | ${file} = | Split Path | abc/def/ghi.txt | +| ${path3} | ${d2} = | Split Path | abc/../def/ghi/ | +=> +- ${path1} = 'abc' & ${dir} = 'def' +- ${path2} = 'abc/def' & ${file} = 'ghi.txt' +- ${path3} = 'def' & ${d2} = 'ghi' + + + + + +path + +Emulates the UNIX touch command. + +Creates a file, if it does not exist. Otherwise changes its access and +modification times to the current time. + +Fails if used with the directories or the parent directory of the given +file does not exist. + + + + + +path +timeout=1 minute + +Waits until the given file or directory is created. + +The path can be given as an exact path or as a glob pattern. +The pattern matching syntax is explained in `introduction`. +If the path is a pattern, the keyword returns when an item matching +it is created. + +The optional ``timeout`` can be used to control the maximum time of +waiting. The timeout is given as a timeout string, e.g. in a format +``15 seconds``, ``1min 10s`` or just ``10``. The time string format is +described in an appendix of Robot Framework User Guide. + +If the timeout is negative, the keyword is never timed-out. The keyword +returns immediately, if the path already exists. + + + + + +path +timeout=1 minute + +Waits until the given file or directory is removed. + +The path can be given as an exact path or as a glob pattern. +The pattern matching syntax is explained in `introduction`. +If the path is a pattern, the keyword waits until all matching +items are removed. + +The optional ``timeout`` can be used to control the maximum time of +waiting. The timeout is given as a timeout string, e.g. in a format +``15 seconds``, ``1min 10s`` or just ``10``. The time string format is +described in an appendix of Robot Framework User Guide. + +If the timeout is negative, the keyword is never timed-out. The keyword +returns immediately, if the path does not exist in the first place. + + + + diff --git a/libspecs/Process.libspec b/libspecs/Process.libspec new file mode 100644 index 0000000000000000000000000000000000000000..ad9fe354c0a8d25424ed8b2b5ad7b5bde9f69144 --- /dev/null +++ b/libspecs/Process.libspec @@ -0,0 +1,637 @@ + + +3.1 +global +yes +Robot Framework test library for running processes. + +This library utilizes Python's +[http://docs.python.org/library/subprocess.html|subprocess] +module and its +[http://docs.python.org/library/subprocess.html#popen-constructor|Popen] +class. + +The library has following main usages: + +- Running processes in system and waiting for their completion using + `Run Process` keyword. +- Starting processes on background using `Start Process`. +- Waiting started process to complete using `Wait For Process` or + stopping them with `Terminate Process` or `Terminate All Processes`. + +== Table of contents == + +- `Specifying command and arguments` +- `Process configuration` +- `Active process` +- `Result object` +- `Boolean arguments` +- `Example` +- `Shortcuts` +- `Keywords` + += Specifying command and arguments = + +Both `Run Process` and `Start Process` accept the command to execute and +all arguments passed to the command as separate arguments. This makes usage +convenient and also allows these keywords to automatically escape possible +spaces and other special characters in commands and arguments. Notice that +if a command accepts options that themselves accept values, these options +and their values must be given as separate arguments. + +When `running processes in shell`, it is also possible to give the whole +command to execute as a single string. The command can then contain +multiple commands to be run together. When using this approach, the caller +is responsible on escaping. + +Examples: +| `Run Process` | ${tools}${/}prog.py | argument | second arg with spaces | +| `Run Process` | java | -jar | ${jars}${/}example.jar | --option | value | +| `Run Process` | prog.py "one arg" && tool.sh | shell=yes | cwd=${tools} | + +Possible non-string arguments are converted to strings automatically. + += Process configuration = + +`Run Process` and `Start Process` keywords can be configured using +optional ``**configuration`` keyword arguments. Configuration arguments +must be given after other arguments passed to these keywords and must +use syntax like ``name=value``. Available configuration arguments are +listed below and discussed further in sections afterwards. + +| = Name = | = Explanation = | +| shell | Specifies whether to run the command in shell or not. | +| cwd | Specifies the working directory. | +| env | Specifies environment variables given to the process. | +| env:<name> | Overrides the named environment variable(s) only. | +| stdout | Path of a file where to write standard output. | +| stderr | Path of a file where to write standard error. | +| output_encoding | Encoding to use when reading command outputs. | +| alias | Alias given to the process. | + +Note that because ``**configuration`` is passed using ``name=value`` syntax, +possible equal signs in other arguments passed to `Run Process` and +`Start Process` must be escaped with a backslash like ``name\=value``. +See `Run Process` for an example. + +== Running processes in shell == + +The ``shell`` argument specifies whether to run the process in a shell or +not. By default shell is not used, which means that shell specific commands, +like ``copy`` and ``dir`` on Windows, are not available. You can, however, +run shell scripts and batch files without using a shell. + +Giving the ``shell`` argument any non-false value, such as ``shell=True``, +changes the program to be executed in a shell. It allows using the shell +capabilities, but can also make the process invocation operating system +dependent. Having a shell between the actually started process and this +library can also interfere communication with the process such as stopping +it and reading its outputs. Because of these problems, it is recommended +to use the shell only when absolutely necessary. + +When using a shell it is possible to give the whole command to execute +as a single string. See `Specifying command and arguments` section for +examples and more details in general. + +== Current working directory == + +By default the child process will be executed in the same directory +as the parent process, the process running tests, is executed. This +can be changed by giving an alternative location using the ``cwd`` argument. +Forward slashes in the given path are automatically converted to +backslashes on Windows. + +`Standard output and error streams`, when redirected to files, +are also relative to the current working directory possibly set using +the ``cwd`` argument. + +Example: +| `Run Process` | prog.exe | cwd=${ROOT}/directory | stdout=stdout.txt | + +== Environment variables == + +By default the child process will get a copy of the parent process's +environment variables. The ``env`` argument can be used to give the +child a custom environment as a Python dictionary. If there is a need +to specify only certain environment variable, it is possible to use the +``env:<name>=<value>`` format to set or override only that named variables. +It is also possible to use these two approaches together. + +Examples: +| `Run Process` | program | env=${environ} | +| `Run Process` | program | env:http_proxy=10.144.1.10:8080 | env:PATH=%{PATH}${:}${PROGDIR} | +| `Run Process` | program | env=${environ} | env:EXTRA=value | + +== Standard output and error streams == + +By default processes are run so that their standard output and standard +error streams are kept in the memory. This works fine normally, +but if there is a lot of output, the output buffers may get full and +the program can hang. Additionally on Jython, everything written to +these in-memory buffers can be lost if the process is terminated. + +To avoid the above mentioned problems, it is possible to use ``stdout`` +and ``stderr`` arguments to specify files on the file system where to +redirect the outputs. This can also be useful if other processes or +other keywords need to read or manipulate the outputs somehow. + +Given ``stdout`` and ``stderr`` paths are relative to the `current working +directory`. Forward slashes in the given paths are automatically converted +to backslashes on Windows. + +As a special feature, it is possible to redirect the standard error to +the standard output by using ``stderr=STDOUT``. + +Regardless are outputs redirected to files or not, they are accessible +through the `result object` returned when the process ends. Commands are +expected to write outputs using the console encoding, but `output encoding` +can be configured using the ``output_encoding`` argument if needed. + +Examples: +| ${result} = | `Run Process` | program | stdout=${TEMPDIR}/stdout.txt | stderr=${TEMPDIR}/stderr.txt | +| `Log Many` | stdout: ${result.stdout} | stderr: ${result.stderr} | +| ${result} = | `Run Process` | program | stderr=STDOUT | +| `Log` | all output: ${result.stdout} | + +Note that the created output files are not automatically removed after +the test run. The user is responsible to remove them if needed. + +== Output encoding == + +Executed commands are, by default, expected to write outputs to the +`standard output and error streams` using the encoding used by the +system console. If the command uses some other encoding, that can be +configured using the ``output_encoding`` argument. This is especially +useful on Windows where the console uses a different encoding than rest +of the system, and many commands use the general system encoding instead +of the console encoding. + +The value used with the ``output_encoding`` argument must be a valid +encoding and must match the encoding actually used by the command. As a +convenience, it is possible to use strings ``CONSOLE`` and ``SYSTEM`` +to specify that the console or system encoding is used, respectively. +If produced outputs use different encoding then configured, values got +through the `result object` will be invalid. + +Examples: +| `Start Process` | program | output_encoding=UTF-8 | +| `Run Process` | program | stdout=${path} | output_encoding=SYSTEM | + +The support to set output encoding is new in Robot Framework 3.0. + +== Alias == + +A custom name given to the process that can be used when selecting the +`active process`. + +Examples: +| `Start Process` | program | alias=example | +| `Run Process` | python | -c | print 'hello' | alias=hello | + += Active process = + +The test library keeps record which of the started processes is currently +active. By default it is latest process started with `Start Process`, +but `Switch Process` can be used to select a different one. Using +`Run Process` does not affect the active process. + +The keywords that operate on started processes will use the active process +by default, but it is possible to explicitly select a different process +using the ``handle`` argument. The handle can be the identifier returned by +`Start Process` or an ``alias`` explicitly given to `Start Process` or +`Run Process`. + += Result object = + +`Run Process`, `Wait For Process` and `Terminate Process` keywords return a +result object that contains information about the process execution as its +attributes. The same result object, or some of its attributes, can also +be get using `Get Process Result` keyword. Attributes available in the +object are documented in the table below. + +| = Attribute = | = Explanation = | +| rc | Return code of the process as an integer. | +| stdout | Contents of the standard output stream. | +| stderr | Contents of the standard error stream. | +| stdout_path | Path where stdout was redirected or ``None`` if not redirected. | +| stderr_path | Path where stderr was redirected or ``None`` if not redirected. | + +Example: +| ${result} = | `Run Process` | program | +| `Should Be Equal As Integers` | ${result.rc} | 0 | +| `Should Match` | ${result.stdout} | Some t?xt* | +| `Should Be Empty` | ${result.stderr} | | +| ${stdout} = | `Get File` | ${result.stdout_path} | +| `Should Be Equal` | ${stdout} | ${result.stdout} | +| `File Should Be Empty` | ${result.stderr_path} | | + += Boolean arguments = + +Some keywords accept arguments that are handled as Boolean values true or +false. If such an argument is given as a string, it is considered false if +it is an empty string or equal to ``FALSE``, ``NONE``, ``NO``, ``OFF`` or +``0``, case-insensitively. Other strings are considered true regardless +their value, and other argument types are tested using the same +[http://docs.python.org/library/stdtypes.html#truth|rules as in Python]. + +True examples: +| `Terminate Process` | kill=True | # Strings are generally true. | +| `Terminate Process` | kill=yes | # Same as the above. | +| `Terminate Process` | kill=${TRUE} | # Python ``True`` is true. | +| `Terminate Process` | kill=${42} | # Numbers other than 0 are true. | + +False examples: +| `Terminate Process` | kill=False | # String ``false`` is false. | +| `Terminate Process` | kill=no | # Also string ``no`` is false. | +| `Terminate Process` | kill=${EMPTY} | # Empty string is false. | +| `Terminate Process` | kill=${FALSE} | # Python ``False`` is false. | + +Considering string ``NONE`` false is new in Robot Framework 3.0.3 and +considering also ``OFF`` and ``0`` false is new in Robot Framework 3.1. + += Example = + +| ***** Settings ***** +| Library Process +| Suite Teardown `Terminate All Processes` kill=True +| +| ***** Test Cases ***** +| Example +| `Start Process` program arg1 arg2 alias=First +| ${handle} = `Start Process` command.sh arg | command2.sh shell=True cwd=/path +| ${result} = `Run Process` ${CURDIR}/script.py +| `Should Not Contain` ${result.stdout} FAIL +| `Terminate Process` ${handle} +| ${result} = `Wait For Process` First +| `Should Be Equal As Integers` ${result.rc} 0 + + +handle=None + +Returns the process ID (pid) of the process as an integer. + +If ``handle`` is not given, uses the current `active process`. + +Notice that the pid is not the same as the handle returned by +`Start Process` that is used internally by this library. + + + + + +handle=None + +Return the underlying ``subprocess.Popen`` object. + +If ``handle`` is not given, uses the current `active process`. + + + + + +handle=None +rc=False +stdout=False +stderr=False +stdout_path=False +stderr_path=False + +Returns the specified `result object` or some of its attributes. + +The given ``handle`` specifies the process whose results should be +returned. If no ``handle`` is given, results of the current `active +process` are returned. In either case, the process must have been +finishes before this keyword can be used. In practice this means +that processes started with `Start Process` must be finished either +with `Wait For Process` or `Terminate Process` before using this +keyword. + +If no other arguments than the optional ``handle`` are given, a whole +`result object` is returned. If one or more of the other arguments +are given any true value, only the specified attributes of the +`result object` are returned. These attributes are always returned +in the same order as arguments are specified in the keyword signature. +See `Boolean arguments` section for more details about true and false +values. + +Examples: +| Run Process | python | -c | print 'Hello, world!' | alias=myproc | +| # Get result object | | | +| ${result} = | Get Process Result | myproc | +| Should Be Equal | ${result.rc} | ${0} | +| Should Be Equal | ${result.stdout} | Hello, world! | +| Should Be Empty | ${result.stderr} | | +| # Get one attribute | | | +| ${stdout} = | Get Process Result | myproc | stdout=true | +| Should Be Equal | ${stdout} | Hello, world! | +| # Multiple attributes | | | +| ${stdout} | ${stderr} = | Get Process Result | myproc | stdout=yes | stderr=yes | +| Should Be Equal | ${stdout} | Hello, world! | +| Should Be Empty | ${stderr} | | + +Although getting results of a previously executed process can be handy +in general, the main use case for this keyword is returning results +over the remote library interface. The remote interface does not +support returning the whole result object, but individual attributes +can be returned without problems. + + + + + +handle=None + +Checks is the process running or not. + +If ``handle`` is not given, uses the current `active process`. + +Returns ``True`` if the process is still running and ``False`` otherwise. + + + + + +*args + +Joins arguments into one command line string. + +In resulting command line string arguments are delimited with a space, +arguments containing spaces are surrounded with quotes, and possible +quotes are escaped with a backslash. + +If this keyword is given only one argument and that is a list like +object, then the values of that list are joined instead. + +Example: +| ${cmd} = | Join Command Line | --option | value with spaces | +| Should Be Equal | ${cmd} | --option "value with spaces" | + +New in Robot Framework 2.9.2. + + + + + +handle=None +error_message=Process is not running. + +Verifies that the process is running. + +If ``handle`` is not given, uses the current `active process`. + +Fails if the process has stopped. + + + + + +handle=None +error_message=Process is running. + +Verifies that the process is not running. + +If ``handle`` is not given, uses the current `active process`. + +Fails if the process is still running. + + + + + +command +*arguments +**configuration + +Runs a process and waits for it to complete. + +``command`` and ``*arguments`` specify the command to execute and +arguments passed to it. See `Specifying command and arguments` for +more details. + +``**configuration`` contains additional configuration related to +starting processes and waiting for them to finish. See `Process +configuration` for more details about configuration related to starting +processes. Configuration related to waiting for processes consists of +``timeout`` and ``on_timeout`` arguments that have same semantics as +with `Wait For Process` keyword. By default there is no timeout, and +if timeout is defined the default action on timeout is ``terminate``. + +Returns a `result object` containing information about the execution. + +Note that possible equal signs in ``*arguments`` must be escaped +with a backslash (e.g. ``name\=value``) to avoid them to be passed in +as ``**configuration``. + +Examples: +| ${result} = | Run Process | python | -c | print 'Hello, world!' | +| Should Be Equal | ${result.stdout} | Hello, world! | +| ${result} = | Run Process | ${command} | stderr=STDOUT | timeout=10s | +| ${result} = | Run Process | ${command} | timeout=1min | on_timeout=continue | +| ${result} = | Run Process | java -Dname\=value Example | shell=True | cwd=${EXAMPLE} | + +This keyword does not change the `active process`. + + + + + +signal +handle=None +group=False + +Sends the given ``signal`` to the specified process. + +If ``handle`` is not given, uses the current `active process`. + +Signal can be specified either as an integer as a signal name. In the +latter case it is possible to give the name both with or without ``SIG`` +prefix, but names are case-sensitive. For example, all the examples +below send signal ``INT (2)``: + +| Send Signal To Process | 2 | | # Send to active process | +| Send Signal To Process | INT | | | +| Send Signal To Process | SIGINT | myproc | # Send to named process | + +This keyword is only supported on Unix-like machines, not on Windows. +What signals are supported depends on the system. For a list of +existing signals on your system, see the Unix man pages related to +signal handling (typically ``man signal`` or ``man 7 signal``). + +By default sends the signal only to the parent process, not to possible +child processes started by it. Notice that when `running processes in +shell`, the shell is the parent process and it depends on the system +does the shell propagate the signal to the actual started process. + +To send the signal to the whole process group, ``group`` argument can +be set to any true value (see `Boolean arguments`). This is not +supported by Jython, however. + + + + + +args +escaping=False + +Splits command line string into a list of arguments. + +String is split from spaces, but argument surrounded in quotes may +contain spaces in them. If ``escaping`` is given a true value, then +backslash is treated as an escape character. It can escape unquoted +spaces, quotes inside quotes, and so on, but it also requires using +double backslashes when using Windows paths. + +Examples: +| @{cmd} = | Split Command Line | --option "value with spaces" | +| Should Be True | $cmd == ['--option', 'value with spaces'] | + +New in Robot Framework 2.9.2. + + + + + +command +*arguments +**configuration + +Starts a new process on background. + +See `Specifying command and arguments` and `Process configuration` +for more information about the arguments, and `Run Process` keyword +for related examples. + +Makes the started process new `active process`. Returns an identifier +that can be used as a handle to activate the started process if needed. + +Processes are started so that they create a new process group. This +allows sending signals to and terminating also possible child +processes. This is not supported on Jython. + + + + + +handle + +Makes the specified process the current `active process`. + +The handle can be an identifier returned by `Start Process` or +the ``alias`` given to it explicitly. + +Example: +| Start Process | prog1 | alias=process1 | +| Start Process | prog2 | alias=process2 | +| # currently active process is process2 | +| Switch Process | process1 | +| # now active process is process1 | + + + + + +kill=False + +Terminates all still running processes started by this library. + +This keyword can be used in suite teardown or elsewhere to make +sure that all processes are stopped, + +By default tries to terminate processes gracefully, but can be +configured to forcefully kill them immediately. See `Terminate Process` +that this keyword uses internally for more details. + + + + + +handle=None +kill=False + +Stops the process gracefully or forcefully. + +If ``handle`` is not given, uses the current `active process`. + +By default first tries to stop the process gracefully. If the process +does not stop in 30 seconds, or ``kill`` argument is given a true value, +(see `Boolean arguments`) kills the process forcefully. Stops also all +the child processes of the originally started process. + +Waits for the process to stop after terminating it. Returns a `result +object` containing information about the execution similarly as `Wait +For Process`. + +On Unix-like machines graceful termination is done using ``TERM (15)`` +signal and killing using ``KILL (9)``. Use `Send Signal To Process` +instead if you just want to send either of these signals without +waiting for the process to stop. + +On Windows graceful termination is done using ``CTRL_BREAK_EVENT`` +event and killing using Win32 API function ``TerminateProcess()``. + +Examples: +| ${result} = | Terminate Process | | +| Should Be Equal As Integers | ${result.rc} | -15 | # On Unixes | +| Terminate Process | myproc | kill=true | + +Limitations: +- Graceful termination is not supported on Windows when using Jython. + Process is killed instead. +- Stopping the whole process group is not supported when using Jython. +- On Windows forceful kill only stops the main process, not possible + child processes. + + + + + +handle=None +timeout=None +on_timeout=continue + +Waits for the process to complete or to reach the given timeout. + +The process to wait for must have been started earlier with +`Start Process`. If ``handle`` is not given, uses the current +`active process`. + +``timeout`` defines the maximum time to wait for the process. It can be +given in +[http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#time-format| +various time formats] supported by Robot Framework, for example, ``42``, +``42 s``, or ``1 minute 30 seconds``. + +``on_timeout`` defines what to do if the timeout occurs. Possible values +and corresponding actions are explained in the table below. Notice +that reaching the timeout never fails the test. + +| = Value = | = Action = | +| continue | The process is left running (default). | +| terminate | The process is gracefully terminated. | +| kill | The process is forcefully stopped. | + +See `Terminate Process` keyword for more details how processes are +terminated and killed. + +If the process ends before the timeout or it is terminated or killed, +this keyword returns a `result object` containing information about +the execution. If the process is left running, Python ``None`` is +returned instead. + +Examples: +| # Process ends cleanly | | | +| ${result} = | Wait For Process | example | +| Process Should Be Stopped | example | | +| Should Be Equal As Integers | ${result.rc} | 0 | +| # Process does not end | | | +| ${result} = | Wait For Process | timeout=42 secs | +| Process Should Be Running | | | +| Should Be Equal | ${result} | ${NONE} | +| # Kill non-ending process | | | +| ${result} = | Wait For Process | timeout=1min 30s | on_timeout=kill | +| Process Should Be Stopped | | | +| Should Be Equal As Integers | ${result.rc} | -9 | + + + + diff --git a/libspecs/REST_04a9321.libspec b/libspecs/REST_04a9321.libspec new file mode 100644 index 0000000000000000000000000000000000000000..c4e9d3a37e04e9586565983f7b2f8b43d24dbc7d --- /dev/null +++ b/libspecs/REST_04a9321.libspec @@ -0,0 +1,999 @@ + + + +test suite +yes +RESTinstance is revolutionary and peaceful HTTP JSON API test library. + +It guides you to write more stable API tests relying on constraints (e.g. "people's email addresses must be valid"), rather than on values having the nature of change (e.g "the first created user's email is expected to stay foo@bar.com"). + +It bases on observations that we are more often concerned whether and which properties changed, when they should (not) had as this signals a bug, and less often what the actual values were/are. This also helps in tackling tests failing only because the test environment data was (not) reset. + +These resolutions in mind, it walks the path with you to contract-driven testing, from automatically generated JSON Schema data models to having formal OpenAPI service specs, as the both are essentially of the same origin. Both are also supported by major forces (Google, Microsoft, IBM et al. founded OpenAPI Initiative), and are language-agnostic which goes as well with Robot Framework. + +Contracts represent a common language within software teams, recognising our differing talents as designers, developers and test experts; or perhaps your new business companion wants to integrate to the system as well, but there is still some noise in signal - yet you don't feel very content providing them the source code, let alone explaining technical details, like which JSON properties are must in the response body, over the phone. + +Rest your mind. OSS got your back. + + += Tutorial = + +There is a [https://github.com/asyrjasalo/RESTinstance/blob/master/examples/README.rst|step-by-step tutorial] in the making on using the library. + +For RESTful APIs, this library is intended to be used so that a test suite +is dedicated per endpoint. The test suite is divided into test cases so that +the differing operations (implemented by the endpoint via HTTP methods) +are tested with separate test cases. + + += The state = + +The library represents its own state as JSON itself, as an array of objects. +Together these objects are commonly called instances. + +A single instance always has these three properties: + +- Request data as a JSON object +- Response data as a JSON object +- JSON Schema for the above two properties + +For each request-response, as soon as the response has been gotten +(and the request did not timeout), a new instance is created with these +properties. + +Request and response schemas are inferred if they are not already +expected by using expectation keywords. All the validations the library +implements are based on JSON Schema [http://json-schema.org/draft-07/json-schema-validation.html|draft-07] by default +but also [http://json-schema.org/draft-06/json-schema-validation.html|draft-06] and +[http://json-schema.org/draft-04/json-schema-validation.html|draft-04] can be configured. + += The scope = + +All the assertion keywords, `Output` and `Output Schema` are effective +in the scope of the last instance. + +The scope of the library itself is test suite, meaning the instances +are persisted in memory until the execution of the test suite is finished, +regardless whether successfully or not. + +The last request and response is easiest seen with `Output`. +The output is written to terminal by default, as this is usually faster +for debugging purposes than finding the right keyword in ``log.html``. + +All instances can be output to a file with `RESTinstances` which can +be useful for additional logging. + + +url=None +ssl_verify=True +accept=application/json, */* +content_type=application/json +user_agent=RESTinstance/1.0.0rc4 +proxies={} +schema={} +spec={} +instances=[] + +Initialize self. See help(type(self)) for accurate signature. + + + + + +field +*enum +**validations + +*Asserts the field as JSON array.* + +The field consists of parts separated by spaces, the parts being +object property names or array indices starting from 0, and the root +being the instance created by the last request (see `Output` for it). + +For asserting deeply nested properties or multiple objects at once, +[http://goessner.net/articles/JsonPath|JSONPath] can be used with +[https://github.com/h2non/jsonpath-ng#jsonpath-syntax|supported JSONPath expressions], +the root being the response body. + +*Enum* + +The allowed values for the property as zero or more arguments. +If none given, the value of the property is not asserted. + +*Validations* + +The JSON Schema validation keywords +[https://json-schema.org/understanding-json-schema/reference/array.html|for array] +can be used. Validations are optional but update the schema of +the property (more accurate) if given. +`Output Schema` can be used for the current schema of the field. + +The keyword will fail if any of the given validations fail. +Given validations can be skipped altogether by adding ``skip=true``. +When skipped, the schema is updated but the validations are not ran. +Skip is intented mainly for debugging the updated schema before aborting. + +*Examples* +| `GET` | /users?_limit=10 | | | | # https://jsonplaceholder.typicode.com/users | +| `Array` | response body | | | +| `Array` | $ | | | | # same as above | +| `Array` | $ | minItems=1 | maxItems=10 | uniqueItems=true | + +assertions + + + + +field +value=None +**validations + +*Asserts the field as JSON boolean.* + +The field consists of parts separated by spaces, the parts being +object property names or array indices starting from 0, and the root +being the instance created by the last request (see `Output` for it). + +For asserting deeply nested properties or multiple objects at once, +[http://goessner.net/articles/JsonPath|JSONPath] can be used with +[https://github.com/h2non/jsonpath-ng#jsonpath-syntax|supported JSONPath expressions], the root being the response body. + +*Value* + +If given, the property value is validated in addition to the type. + +*Validations* + +The JSON Schema validation keywords +[https://json-schema.org/understanding-json-schema/reference/generic.html|common for all types] +can be used. Validations are optional but update the schema of +the property (more accurate) if given. +`Output Schema` can be used for the current schema of the field. + +The keyword will fail if any of the given validations fail. +Given validations can be skipped altogether by adding ``skip=true``. +When skipped, the schema is updated but the validations are not ran. +Skip is intented mainly for debugging the updated schema before aborting. + +*Examples* + +| `PUT` | /users/1 | { "verified_email": true } | | | # https://jsonplaceholder.typicode.com/users/1 | +| `Boolean` | response body verified_email | | | | # value is optional | +| `Boolean` | response body verified_email | true | +| `Boolean` | response body verified_email | ${True} | | | # same as above | +| `Boolean` | $.verified_email | true | | | # JSONPath alternative | +| `Boolean` | $.verified_email | true | enum=[1, "1"] | skip=true | # would pass | + +assertions + + + + + +*Resets the expectations for both request and response.* + +Using this keyword resets any expectations set with keywords +`Expect Response`, `Expect Response Body` and `Expect Request`. + +expectations + + + + +endpoint +timeout=None +allow_redirects=None +validate=True +headers=None + +*Sends a DELETE request to the endpoint.* + +The endpoint is joined with the URL given on library init (if any). +If endpoint starts with ``http://`` or ``https://``, it is assumed +an URL outside the tested API (which may affect logging). + +*Options* + +``timeout``: A number of seconds to wait for the response before failing the keyword. + +``allow_redirects``: If false, do not follow any redirects. + +``validate``: If false, skips any request and response validations set +by expectation keywords and a spec given on library init. + +``headers``: Headers as a JSON object to add or override for the request. + +*Examples* + +| `DELETE` | /users/6 | +| `DELETE` | http://localhost:8273/state | validate=false | + +http + + + + +schema +merge=False + +*Sets the schema to validate the request properties* + +Expectations are effective for following requests in the test suite, +or until they are reset or updated by using expectation keywords again. +On the test suite level (suite setup), they are best used for expecting +the endpoint wide properties that are common regardless of the tested +HTTP method, and on the test case level (test setup) to merge in +the HTTP method specific properties. + +`Expect Request` is intented to be used with tests that have some of the +request properties, e.g. body or query parameters, randomized ("fuzzing") +for validating that the sent values are within the expected scope. + +If the keyword is used, following HTTP keywords will fail when +their request properties are not valid against the expected schema. + +If the keyword is not used, a new schema is generated for each following +request for its ``body`` and ``query`` properties. Use `Output Schema` to output it and use it as an input to this keyword. + +*Options* + +``merge``: Merges the new schema with the current instead of replacing it + +*Examples* + +| `Expect Request` | ${CURDIR}/valid_payload.json | | # See `Output Schema` | +| `Expect Request` | { "body": { "required": ["id"] } } | merge=true | + +expectations + + + + +schema +merge=False + +*Sets the schema to validate the response properties.* + +Expectations are effective for following requests in the test suite, +or until they are reset or updated by using expectation keywords again. +On the test suite level (suite setup), they are best used for expecting +the endpoint wide properties that are common regardless of the tested +HTTP method, and on the test case level (test setup) to merge in +the HTTP method specific properties. + +`Expect Response` is intented to be used on the suite level to validate +the endpoint properties that hold regardless of the HTTP method, +such as body property types, responded headers, authentication, etc. + +If the keyword is used, following HTTP keywords will fail when +their response properties are not valid against the expected schema. + +If the keyword is not used, a new schema is inferred for each following +response for its ``body``. Use `Output Schema` to output it and use it +as an input to this keyword. + +*Options* + +``merge``: Merges the new schema with the current instead of replacing it + +*Examples* + +| `Expect Response` | ${CURDIR}/endpoint_data_model.json | | # See `Output Schema` | +| `Expect Response` | { "headers": { "required": ["Via"] } } | merge=true | +| `Expect Response` | { "seconds": { "maximum": "1.0" } } | merge=true | + +expectations + + + + +schema + +*Updates the schema to validate the response body properties.* + +Expectations are effective for following requests in the test suite, +or until they are reset or updated by using expectation keywords again. +On the test suite level (suite setup), they are best used for expecting +the endpoint wide properties that are common regardless of the tested +HTTP method, and on the test case level (test setup) to merge in +the HTTP method specific properties. + +`Expect Response Body` is intented to be used on the test case level, +to validate that the response body has the expected properties for +the particular HTTP method. Note that if something about response body +has been already expected with `Expected Response`, using this keyword +updates the expectations in terms of given response body properties. + +If the keyword is used, following HTTP keywords will fail if +their response body is not valid against the expected schema. + +If the keyword is not used, and no schema is already expected with +`Expect Response` for response ``body``, a new schema is inferred for it. +Use `Output Schema` to output it and use it as an input to this keyword. + +*Tips* + +Regardless whether the HTTP method returns one (an object) or many +(an array of objects), the validation of the object property types and features can usually be done to some extent on the test suite level +with `Expect Response`, then extended on the test case level using this +keyword. This helps in ensuring that the data model is unified between +the different HTTP methods. + +*Examples* + +| `Expect Response Body` | ${CURDIR}/user_properties.json | # See `Output Schema` | +| `Expect Response Body` | { "required": ["id", "token"] } | # Only these are required from this method | +| `Expect Response Body` | { "additionalProperties": false } | # Nothing extra should be responded by this method | + +expectations + + + + +endpoint +query=None +timeout=None +allow_redirects=None +validate=True +headers=None + +*Sends a GET request to the endpoint.* + +The endpoint is joined with the URL given on library init (if any). +If endpoint starts with ``http://`` or ``https://``, it is assumed +an URL outside the tested API (which may affect logging). + +*Options* + +``query``: Request query parameters as a JSON object or a dictionary. +Alternatively, query parameters can be given as part of endpoint as well. + +``timeout``: A number of seconds to wait for the response before failing the keyword. + +``allow_redirects``: If false, do not follow any redirects. + +``validate``: If false, skips any request and response validations set +by expectation keywords and a spec given on library init. + +``headers``: Headers as a JSON object to add or override for the request. + +*Examples* + +| `GET` | /users/1 | +| `GET` | /users | timeout=2.5 | +| `GET` | /users?_limit=2 | +| `GET` | /users | _limit=2 | +| `GET` | /users | { "_limit": "2" } | +| `GET` | https://jsonplaceholder.typicode.com/users | headers={ "Authentication": "" } | + +http + + + + +endpoint +timeout=None +allow_redirects=None +validate=True +headers=None + +*Sends a HEAD request to the endpoint.* + +The endpoint is joined with the URL given on library init (if any). +If endpoint starts with ``http://`` or ``https://``, it is assumed +an URL outside the tested API (which may affect logging). + +*Options* + +``timeout``: A number of seconds to wait for the response before failing the keyword. + +``allow_redirects``: If true, follow all redirects. +In contrary to other methods, no HEAD redirects are followed by default. + +``validate``: If false, skips any request and response validations set +by expectation keywords and a spec given on library init. + +``headers``: The headers to add or override for this request. + +*Examples* + +| `HEAD` | /users/1 | +| `HEAD` | /users/1 | timeout=0.5 | + +http + + + + +what + +*Converts the input to JSON and returns it.* + +Any of the following is accepted: + +- The path to JSON file +- Any scalar that can be interpreted as JSON +- A dictionary or a list + +*Examples* + +| ${payload} | `Input` | ${CURDIR}/payload.json | + +| ${object} | `Input` | { "name": "Julie Langford", "username": "jlangfor" } | +| ${object} | `Input` | ${dict} | + +| ${array} | `Input` | ["name", "username"] | +| ${array} | `Input` | ${list} | + +| ${boolean} | `Input` | true | +| ${boolean} | `Input` | ${True} | + +| ${number} | `Input` | 2.0 | +| ${number} | `Input` | ${2.0} | + +| ${string} | `Input` | Quotes are optional for strings | + +I/O + + + + +field +*enum +**validations + +*Asserts the field as JSON integer.* + +The field consists of parts separated by spaces, the parts being +object property names or array indices starting from 0, and the root +being the instance created by the last request (see `Output` for it). + +For asserting deeply nested properties or multiple objects at once, +[http://goessner.net/articles/JsonPath|JSONPath] can be used with +[https://github.com/h2non/jsonpath-ng#jsonpath-syntax|supported JSONPath expressions], +the root being the response body. + +*Enum* + +The allowed values for the property as zero or more arguments. +If none given, the value of the property is not asserted. + +*Validations* + +The JSON Schema validation keywords +[https://json-schema.org/understanding-json-schema/reference/numeric.html#integer|for numeric types] +can be used. Validations are optional but update the schema of +the property (more accurate) if given. +`Output Schema` can be used for the current schema of the field. + +The keyword will fail if any of the given validations fail. +Given validations can be skipped altogether by adding ``skip=true``. +When skipped, the schema is updated but the validations are not ran. +Skip is intented mainly for debugging the updated schema before aborting. + +*Examples* + +| `GET` | /users/1 | | # https://jsonplaceholder.typicode.com/users/1 | +| `Integer` | response body id | | # value is optional | +| `Integer` | response body id | 1 | +| `Integer` | response body id | ${1} | # same as above | +| `Integer` | $.id | 1 | # JSONPath alternative | + +| `GET` | /users?_limit=10 | | | | # https://jsonplaceholder.typicode.com/users | +| `Integer` | response body 0 id | 1 | | | +| `Integer` | $[0].id | 1 | | | # same as above | +| `Integer` | $[*].id | | minimum=1 | maximum=10 | + +assertions + + + + +field + +*Asserts the field does not exist.* + +The field consists of parts separated by spaces, the parts being +object property names or array indices starting from 0, and the root +being the instance created by the last request (see `Output` for it). + +For asserting deeply nested properties or multiple objects at once, +[http://goessner.net/articles/JsonPath|JSONPath] can be used with +[https://github.com/h2non/jsonpath-ng#jsonpath-syntax|supported JSONPath expressions], +the root being the response body. + +*Examples* + +| `GET` | /users/1 | # https://jsonplaceholder.typicode.com/users/1 | +| `Missing` | response body password | +| `Missing` | $.password | +| `Missing` | $..geo.elevation | # response body address geo elevation | + +| `GET` | /users | # https://jsonplaceholder.typicode.com/users | +| `Missing` | response body 0 password | +| `Missing` | $[*].password | +| `Missing` | $[*]..geo.elevation | + +assertions + + + + +field +**validations + +*Asserts the field as JSON null.* + +The field consists of parts separated by spaces, the parts being +object property names or array indices starting from 0, and the root +being the instance created by the last request (see `Output` for it). + +For asserting deeply nested properties or multiple objects at once, +[http://goessner.net/articles/JsonPath|JSONPath] can be used with +[https://github.com/h2non/jsonpath-ng#jsonpath-syntax|supported JSONPath expressions], +the root being the response body. + +*Validations* + +The JSON Schema validation keywords +[https://json-schema.org/understanding-json-schema/reference/generic.html|common for all types] +can be used. Validations are optional but update the schema of +the property (more accurate) if given. +`Output Schema` can be used for the current schema of the field. + +The keyword will fail if any of the given validations fail. +Given validations can be skipped altogether by adding ``skip=true``. +When skipped, the schema is updated but the validations are not ran. +Skip is intented mainly for debugging the updated schema before aborting. + +*Examples* + +| `PUT` | /users/1 | { "deactivated_at": null } | # https://jsonplaceholder.typicode.com/users/1 | +| `Null` | response body deactivated_at | | +| `Null` | $.deactivated_at | | # JSONPath alternative | + +assertions + + + + +field +*enum +**validations + +*Asserts the field as JSON number.* + +The field consists of parts separated by spaces, the parts being +object property names or array indices starting from 0, and the root +being the instance created by the last request (see `Output` for it). + +For asserting deeply nested properties or multiple objects at once, +[http://goessner.net/articles/JsonPath|JSONPath] can be used with +[https://github.com/h2non/jsonpath-ng#jsonpath-syntax|supported JSONPath expressions], +the root being the response body. + +*Enum* + +The allowed values for the property as zero or more arguments. +If none given, the value of the property is not asserted. + +*Validations* + +The JSON Schema validation keywords +[https://json-schema.org/understanding-json-schema/reference/numeric.html#number|for numeric types] can be used. Validations are optional but update the schema of +the property (more accurate) if given. +`Output Schema` can be used for the current schema of the field. + +The keyword will fail if any of the given validations fail. +Given validations can be skipped altogether by adding ``skip=true``. +When skipped, the schema is updated but the validations are not ran. +Skip is intented mainly for debugging the updated schema before aborting. + +*Examples* + +| `PUT` | /users/1 | { "allocation": 95.0 } | # https://jsonplaceholder.typicode.com/users/1 | +| `Number` | response body allocation | | # value is optional | +| `Number` | response body allocation | 95.0 | +| `Number` | response body allocation | ${95.0} | # same as above | +| `Number` | $.allocation | 95.0 | # JSONPath alternative | + +| `GET` | /users?_limit=10 | | | | # https://jsonplaceholder.typicode.com/users | +| `Number` | $[0].id | 1 | | | # integers are also numbers | +| `Number` | $[*].id | | minimum=1 | maximum=10 | + +assertions + + + + +field +*enum +**validations + +*Asserts the field as JSON object.* + +The field consists of parts separated by spaces, the parts being +object property names or array indices starting from 0, and the root +being the instance created by the last request (see `Output` for it). + +For asserting deeply nested properties or multiple objects at once, +[http://goessner.net/articles/JsonPath|JSONPath] can be used with +[https://github.com/h2non/jsonpath-ng#jsonpath-syntax|supported JSONPath expressions], the root being the response body. + +*Enum* + +The allowed values for the property as zero or more arguments. +If none given, the value of the property is not asserted. + +*Validations* + +The JSON Schema validation keywords +[https://json-schema.org/understanding-json-schema/reference/object.html|for object] +can be used. Validations are optional but update the schema of +the property (more accurate) if given. +`Output Schema` can be used for the current schema of the field. + +The keyword will fail if any of the given validations fail. +Given validations can be skipped altogether by adding ``skip=true``. +When skipped, the schema is updated but the validations are not ran. +Skip is intented mainly for debugging the updated schema before aborting. + +*Examples* + +| `GET` | /users/1 | | # https://jsonplaceholder.typicode.com/users/1 | +| `Object` | response body | | +| `Object` | response body | required=["id", "name"] | # can have other properties | + +| `GET` | /users/1 | | # https://jsonplaceholder.typicode.com/users/1 | +| `Object` | $.address.geo | required=["lat", "lng"] | +| `Object` | $..geo | additionalProperties=false | # cannot have other properties | + +assertions + + + + +endpoint +timeout=None +allow_redirects=None +validate=True +headers=None + +*Sends an OPTIONS request to the endpoint.* + +The endpoint is joined with the URL given on library init (if any). +If endpoint starts with ``http://`` or ``https://``, it is assumed +an URL outside the tested API (which may affect logging). + +*Options* + +``timeout``: A number of seconds to wait for the response before failing the keyword. + +``allow_redirects``: If false, do not follow any redirects. + +``validate``: If false, skips any request and response validations set +by expectation keywords and a spec given on library init. + +``headers``: Headers as a JSON object to add or override for the request. + +*Examples* + +| `OPTIONS` | /users/1 | +| `OPTIONS` | /users/1 | allow_redirects=false | + +http + + + + +what= +file_path=None +append=False +sort_keys=False + +*Outputs JSON to terminal or a file.* + +By default, the last request and response are output to terminal. + +The output can be limited further by: + +- The property of the last instance, e.g. ``request`` or ``response`` +- Any nested property that exists, similarly as for assertion keywords + +Also variables and values that can be converted to JSON are accepted, +in which case those are output as JSON instead. + +*Options* + +``file_path``: The JSON is written to a file instead of terminal. +The file is created if it does not exist. + +``append``: If true, the JSON is appended to the given file +instead of truncating it first. + +``sort_keys``: If true, the JSON is sorted alphabetically by +property names before it is output. + +*Examples* + +| `Output` | response | # only the response is output | +| `Output` | response body | # only the response body is output | +| `Output` | $.email | # only the response body property is output | +| `Output` | $..geo | # only the nested response body property is output | + +| `Output` | request | # only the request is output | +| `Output` | request headers | # only the request headers are output | +| `Output` | request headers Authentication | # only this header is output | + +| `Output` | response body | ${CURDIR}/response_body.json | | # write the response body to a file | +| `Output` | response seconds | ${CURDIR}/response_delays.log | append=true | # keep track of response delays in a file | + +I/O + + + + +what= +file_path=None +append=False +sort_keys=False + +*Outputs JSON Schema to terminal or a file.* + +By default, the schema is output for the last request and response. + +The output can be limited further by: + +- The property of the last instance, e.g. ``request`` or ``response`` +- Any nested property that exists, similarly as for assertion keywords + +Also variables and values that can be converted to JSON are accepted, +in which case the schema is generated for those instead. + +*Options* + +``file_path``: The JSON Schema is written to a file instead of terminal. +The file is created if it does not exist. + +``append``: If true, the JSON Schema is appended to the given file +instead of truncating it first. + +``sort_keys``: If true, the JSON Schema is sorted alphabetically by +property names before it is output. + +*Examples* + +| `Output Schema` | response | ${CURDIR}/response_schema.json | # Write a file to use with `Expect Response` | +| `Output Schema` | response body | ${CURDIR}/response_body_schema.json | # Write a file to use with `Expect Response Body` | + +| `Output Schema` | $.email | # only the schema for one response body property | +| `Output Schema` | $..geo | # only the schema for the nested response body property | + +I/O + + + + +endpoint +body=None +timeout=None +allow_redirects=None +validate=True +headers=None + +*Sends a PATCH request to the endpoint.* + +The endpoint is joined with the URL given on library init (if any). +If endpoint starts with ``http://`` or ``https://``, it is assumed +an URL outside the tested API (which may affect logging). + +*Options* + +``body``: Request body parameters as a JSON object, file or a dictionary. + +``timeout``: A number of seconds to wait for the response before failing the keyword. + +``allow_redirects``: If false, do not follow any redirects. + +``validate``: If false, skips any request and response validations set +by expectation keywords and a spec given on library init. + +``headers``: Headers as a JSON object to add or override for the request. + +*Examples* + +| `PATCH` | /users/4 | { "name": "Clementine Bauch" } | +| `PATCH` | /users/4 | ${dict} | + +http + + + + +endpoint +body=None +timeout=None +allow_redirects=None +validate=True +headers=None + +*Sends a POST request to the endpoint.* + +The endpoint is joined with the URL given on library init (if any). +If endpoint starts with ``http://`` or ``https://``, it is assumed +an URL outside the tested API (which may affect logging). + +*Options* + +``body``: Request body parameters as a JSON object, file or a dictionary. + +``timeout``: A number of seconds to wait for the response before failing the keyword. + +``allow_redirects``: If false, do not follow any redirects. + +``validate``: If false, skips any request and response validations set +by expectation keywords and a spec given on library init. + +``headers``: Headers as a JSON object to add or override for the request. + +*Examples* + +| `POST` | /users | { "id": 11, "name": "Gil Alexander" } | +| `POST` | /users | ${CURDIR}/new_user.json | + +http + + + + +endpoint +body=None +timeout=None +allow_redirects=None +validate=True +headers=None + +*Sends a PUT request to the endpoint.* + +The endpoint is joined with the URL given on library init (if any). +If endpoint starts with ``http://`` or ``https://``, it is assumed +an URL outside the tested API (which may affect logging). + +*Options* + +``body``: Request body parameters as a JSON object, file or a dictionary. + +``timeout``: A number of seconds to wait for the response before failing the keyword. + +``allow_redirects``: If false, do not follow any redirects. + +``validate``: If false, skips any request and response validations set +by expectation keywords and a spec given on library init. + +``headers``: Headers as a JSON object to add or override for the request. + +*Examples* + +| `PUT` | /users/2 | { "name": "Julie Langford", "username": "jlangfor" } | +| `PUT` | /users/2 | ${dict} | + +http + + + + +file_path=None +sort_keys=False + +*Writes the instances as JSON to a file.* + +The instances are written to file as a JSON array of JSON objects, +each object representing a single instance, and having three properties: + +- the request +- the response +- the schema for both, which have been updated according to the tests + +The file is created if it does not exist, otherwise it is truncated. + +*Options* + +``sort_keys``: If true, the instances are sorted alphabetically by +property names. + +*Examples* + +| `Rest Instances` | ${CURDIR}/log.json | + +I/O + + + + +cert + +*Sets the client cert for the requests.* + +The cert is either a path to a .pem file, or a JSON array, or a list +having the cert path and the key path. + +Values ``null`` and ``${None}`` can be used for clearing the cert. + +*Examples* + +| `Set Client Cert` | ${CURDIR}/client.pem | +| `Set Client Cert` | ["${CURDIR}/client.cert", "${CURDIR}/client.key"] | +| `Set Client Cert` | ${paths_list} | + +settings + + + + +headers + +*Sets new request headers or updates the existing.* + +``headers``: The headers to add or update as a JSON object or a +dictionary. + +*Examples* + +| `Set Headers` | { "authorization": "Basic QWxhZGRpbjpPcGVuU2VzYW1"} | +| `Set Headers` | { "Accept-Encoding": "identity"} | +| `Set Headers` | ${auth_dict} | + +settings + + + + +field +*enum +**validations + +*Asserts the field as JSON string.* + +The field consists of parts separated by spaces, the parts being +object property names or array indices starting from 0, and the root +being the instance created by the last request (see `Output` for it). + +For asserting deeply nested properties or multiple objects at once, +[http://goessner.net/articles/JsonPath|JSONPath] can be used with +[https://github.com/h2non/jsonpath-ng#jsonpath-syntax|supported JSONPath expressions], the root being the response body. + +*Enum* + +The allowed values for the property as zero or more arguments. +If none given, the value of the property is not asserted. + +*Validations* + +The JSON Schema validation keywords +[https://json-schema.org/understanding-json-schema/reference/string.html|for string] +can be used. Validations are optional but update the schema of +the property (more accurate) if given. +`Output Schema` can be used for the current schema of the field. + +The keyword will fail if any of the given validations fail. +Given validations can be skipped altogether by adding ``skip=true``. +When skipped, the schema is updated but the validations are not ran. +Skip is intented mainly for debugging the updated schema before aborting. + +*Examples* + +| `GET` | /users/1 | | | # https://jsonplaceholder.typicode.com/users/1 | +| `String` | response body email | | | # value is optional | +| `String` | response body email | Sincere@april.biz | +| `String` | $.email | Sincere@april.biz | | # JSONPath alternative | +| `String` | $.email | | format=email | + +| `GET` | /users?_limit=10 | | | # https://jsonplaceholder.typicode.com/users | +| `String` | response body 0 email | Sincere@april.biz | +| `String` | $[0].email | Sincere@april.biz | | # same as above | +| `String` | $[*].email | | format=email | + +assertions + + + diff --git a/libspecs/Reserved.libspec b/libspecs/Reserved.libspec new file mode 100644 index 0000000000000000000000000000000000000000..54f85645e7c4e26ba7f1837617d6f9f8cb11ad6a --- /dev/null +++ b/libspecs/Reserved.libspec @@ -0,0 +1,87 @@ + + + +global +yes +Documentation for library ``Reserved``. + + +*varargs + + + + + + + +*varargs + + + + + + + +*varargs + + + + + + + +*varargs + + + + + + + +*varargs + + + + + + + +*varargs + + + + + + + +*varargs + + + + + + + +*varargs + + + + + + + +*varargs + + + + + + + +*varargs + + + + + + diff --git a/libspecs/Screenshot.libspec b/libspecs/Screenshot.libspec new file mode 100644 index 0000000000000000000000000000000000000000..5703b5b9e6f391866137d401feb647b0ec0d9232 --- /dev/null +++ b/libspecs/Screenshot.libspec @@ -0,0 +1,132 @@ + + +3.1 +test suite +yes +Test library for taking screenshots on the machine where tests are run. + +Notice that successfully taking screenshots requires tests to be run with +a physical or virtual display. + += Using with Python = + +How screenshots are taken when using Python depends on the operating +system. On OSX screenshots are taken using the built-in ``screencapture`` +utility. On other operating systems you need to have one of the following +tools or Python modules installed. You can specify the tool/module to use +when `importing` the library. If no tool or module is specified, the first +one found will be used. + +- wxPython :: http://wxpython.org :: Required also by RIDE so many Robot + Framework users already have this module installed. +- PyGTK :: http://pygtk.org :: This module is available by default on most + Linux distributions. +- Pillow :: http://python-pillow.github.io :: + Only works on Windows. Also the original PIL package is supported. +- Scrot :: http://en.wikipedia.org/wiki/Scrot :: Not used on Windows. + Install with ``apt-get install scrot`` or similar. + +Using ``screencapture`` on OSX and specifying explicit screenshot module +are new in Robot Framework 2.9.2. The support for using ``scrot`` is new +in Robot Framework 3.0. + += Using with Jython and IronPython = + +With Jython and IronPython this library uses APIs provided by JVM and .NET +platforms, respectively. These APIs are always available and thus no +external modules are needed. + += Where screenshots are saved = + +By default screenshots are saved into the same directory where the Robot +Framework log file is written. If no log is created, screenshots are saved +into the directory where the XML output file is written. + +It is possible to specify a custom location for screenshots using +``screenshot_directory`` argument when `importing` the library and +using `Set Screenshot Directory` keyword during execution. It is also +possible to save screenshots using an absolute path. + + +screenshot_directory=None +screenshot_module=None + +Configure where screenshots are saved. + +If ``screenshot_directory`` is not given, screenshots are saved into +same directory as the log file. The directory can also be set using +`Set Screenshot Directory` keyword. + +``screenshot_module`` specifies the module or tool to use when using +this library on Python outside OSX. Possible values are ``wxPython``, +``PyGTK``, ``PIL`` and ``scrot``, case-insensitively. If no value is +given, the first module/tool found is used in that order. See `Using +with Python` for more information. + +Examples (use only one of these): +| =Setting= | =Value= | =Value= | +| Library | Screenshot | | +| Library | Screenshot | ${TEMPDIR} | +| Library | Screenshot | screenshot_module=PyGTK | + +Specifying explicit screenshot module is new in Robot Framework 2.9.2. + + + + + +path + +Sets the directory where screenshots are saved. + +It is possible to use ``/`` as a path separator in all operating +systems. Path to the old directory is returned. + +The directory can also be set in `importing`. + + + + + +name=screenshot +width=800px + +Takes a screenshot in JPEG format and embeds it into the log file. + +Name of the file where the screenshot is stored is derived from the +given ``name``. If the ``name`` ends with extension ``.jpg`` or +``.jpeg``, the screenshot will be stored with that exact name. +Otherwise a unique name is created by adding an underscore, a running +index and an extension to the ``name``. + +The name will be interpreted to be relative to the directory where +the log file is written. It is also possible to use absolute paths. +Using ``/`` as a path separator works in all operating systems. + +``width`` specifies the size of the screenshot in the log file. + +Examples: (LOGDIR is determined automatically by the library) +| Take Screenshot | | | # LOGDIR/screenshot_1.jpg (index automatically incremented) | +| Take Screenshot | mypic | | # LOGDIR/mypic_1.jpg (index automatically incremented) | +| Take Screenshot | ${TEMPDIR}/mypic | | # /tmp/mypic_1.jpg (index automatically incremented) | +| Take Screenshot | pic.jpg | | # LOGDIR/pic.jpg (always uses this file) | +| Take Screenshot | images/login.jpg | 80% | # Specify both name and width. | +| Take Screenshot | width=550px | | # Specify only width. | + +The path where the screenshot is saved is returned. + + + + + +name=screenshot + +Takes a screenshot and links it from the log file. + +This keyword is otherwise identical to `Take Screenshot` but the saved +screenshot is not embedded into the log file. The screenshot is linked +so it is nevertheless easily available. + + + + diff --git a/libspecs/String.libspec b/libspecs/String.libspec new file mode 100644 index 0000000000000000000000000000000000000000..f82c78ea92842ac51116d9d571c5e344102fc7bc --- /dev/null +++ b/libspecs/String.libspec @@ -0,0 +1,722 @@ + + +3.1 +global +yes +A test library for string manipulation and verification. + +``String`` is Robot Framework's standard library for manipulating +strings (e.g. `Replace String Using Regexp`, `Split To Lines`) and +verifying their contents (e.g. `Should Be String`). + +Following keywords from ``BuiltIn`` library can also be used with strings: + +- `Catenate` +- `Get Length` +- `Length Should Be` +- `Should (Not) Be Empty` +- `Should (Not) Be Equal (As Strings/Integers/Numbers)` +- `Should (Not) Match (Regexp)` +- `Should (Not) Contain` +- `Should (Not) Start With` +- `Should (Not) End With` +- `Convert To String` +- `Convert To Bytes` + + +string + +Converts string to lowercase. + +Examples: +| ${str1} = | Convert To Lowercase | ABC | +| ${str2} = | Convert To Lowercase | 1A2c3D | +| Should Be Equal | ${str1} | abc | +| Should Be Equal | ${str2} | 1a2c3d | + + + + + +string + +Converts string to uppercase. + +Examples: +| ${str1} = | Convert To Uppercase | abc | +| ${str2} = | Convert To Uppercase | 1a2C3d | +| Should Be Equal | ${str1} | ABC | +| Should Be Equal | ${str2} | 1A2C3D | + + + + + +bytes +encoding +errors=strict + +Decodes the given ``bytes`` to a Unicode string using the given ``encoding``. + +``errors`` argument controls what to do if decoding some bytes fails. +All values accepted by ``decode`` method in Python are valid, but in +practice the following values are most useful: + +- ``strict``: fail if characters cannot be decoded (default) +- ``ignore``: ignore characters that cannot be decoded +- ``replace``: replace characters that cannot be decoded with + a replacement character + +Examples: +| ${string} = | Decode Bytes To String | ${bytes} | UTF-8 | +| ${string} = | Decode Bytes To String | ${bytes} | ASCII | errors=ignore | + +Use `Encode String To Bytes` if you need to convert Unicode strings to +byte strings, and `Convert To String` in ``BuiltIn`` if you need to +convert arbitrary objects to Unicode strings. + + + + + +string +encoding +errors=strict + +Encodes the given Unicode ``string`` to bytes using the given ``encoding``. + +``errors`` argument controls what to do if encoding some characters fails. +All values accepted by ``encode`` method in Python are valid, but in +practice the following values are most useful: + +- ``strict``: fail if characters cannot be encoded (default) +- ``ignore``: ignore characters that cannot be encoded +- ``replace``: replace characters that cannot be encoded with + a replacement character + +Examples: +| ${bytes} = | Encode String To Bytes | ${string} | UTF-8 | +| ${bytes} = | Encode String To Bytes | ${string} | ASCII | errors=ignore | + +Use `Convert To Bytes` in ``BuiltIn`` if you want to create bytes based +on character or integer sequences. Use `Decode Bytes To String` if you +need to convert byte strings to Unicode strings and `Convert To String` +in ``BuiltIn`` if you need to convert arbitrary objects to Unicode. + + + + + +string +marker + +Returns contents of the ``string`` before the first occurrence of ``marker``. + +If the ``marker`` is not found, whole string is returned. + +See also `Fetch From Right`, `Split String` and `Split String +From Right`. + + + + + +string +marker + +Returns contents of the ``string`` after the last occurrence of ``marker``. + +If the ``marker`` is not found, whole string is returned. + +See also `Fetch From Left`, `Split String` and `Split String +From Right`. + + + + + +template +*positional +**named + +Formats a ``template`` using the given ``positional`` and ``named`` arguments. + +The template can be either be a string or an absolute path to +an existing file. In the latter case the file is read and its contents +are used as the template. If the template file contains non-ASCII +characters, it must be encoded using UTF-8. + +The template is formatted using Python's +[https://docs.python.org/library/string.html#format-string-syntax|format +string syntax]. Placeholders are marked using ``{}`` with possible +field name and format specification inside. Literal curly braces +can be inserted by doubling them like `{{` and `}}`. + +Examples: +| ${to} = | Format String | To: {} <{}> | ${user} | ${email} | +| ${to} = | Format String | To: {name} <{email}> | name=${name} | email=${email} | +| ${to} = | Format String | To: {user.name} <{user.email}> | user=${user} | +| ${xx} = | Format String | {:*^30} | centered | +| ${yy} = | Format String | {0:{width}{base}} | ${42} | base=X | width=10 | +| ${zz} = | Format String | ${CURDIR}/template.txt | positional | named=value | + +New in Robot Framework 3.1. + + + + + +length=8 +chars=[LETTERS][NUMBERS] + +Generates a string with a desired ``length`` from the given ``chars``. + +The population sequence ``chars`` contains the characters to use +when generating the random string. It can contain any +characters, and it is possible to use special markers +explained in the table below: + +| = Marker = | = Explanation = | +| ``[LOWER]`` | Lowercase ASCII characters from ``a`` to ``z``. | +| ``[UPPER]`` | Uppercase ASCII characters from ``A`` to ``Z``. | +| ``[LETTERS]`` | Lowercase and uppercase ASCII characters. | +| ``[NUMBERS]`` | Numbers from 0 to 9. | + +Examples: +| ${ret} = | Generate Random String | +| ${low} = | Generate Random String | 12 | [LOWER] | +| ${bin} = | Generate Random String | 8 | 01 | +| ${hex} = | Generate Random String | 4 | [NUMBERS]abcdef | + + + + + +string +line_number + +Returns the specified line from the given ``string``. + +Line numbering starts from 0 and it is possible to use +negative indices to refer to lines from the end. The line is +returned without the newline character. + +Examples: +| ${first} = | Get Line | ${string} | 0 | +| ${2nd last} = | Get Line | ${string} | -2 | + +Use `Split To Lines` if all lines are needed. + + + + + +string + +Returns and logs the number of lines in the given string. + + + + + +string +pattern +case_insensitive=False + +Returns lines of the given ``string`` that contain the ``pattern``. + +The ``pattern`` is always considered to be a normal string, not a glob +or regexp pattern. A line matches if the ``pattern`` is found anywhere +on it. + +The match is case-sensitive by default, but giving ``case_insensitive`` +a true value makes it case-insensitive. The value is considered true +if it is a non-empty string that is not equal to ``false``, ``none`` or +``no``. If the value is not a string, its truth value is got directly +in Python. Considering ``none`` false is new in RF 3.0.3. + +Lines are returned as one string catenated back together with +newlines. Possible trailing newline is never returned. The +number of matching lines is automatically logged. + +Examples: +| ${lines} = | Get Lines Containing String | ${result} | An example | +| ${ret} = | Get Lines Containing String | ${ret} | FAIL | case-insensitive | + +See `Get Lines Matching Pattern` and `Get Lines Matching Regexp` +if you need more complex pattern matching. + + + + + +string +pattern +case_insensitive=False + +Returns lines of the given ``string`` that match the ``pattern``. + +The ``pattern`` is a _glob pattern_ where: +| ``*`` | matches everything | +| ``?`` | matches any single character | +| ``[chars]`` | matches any character inside square brackets (e.g. ``[abc]`` matches either ``a``, ``b`` or ``c``) | +| ``[!chars]`` | matches any character not inside square brackets | + +A line matches only if it matches the ``pattern`` fully. + +The match is case-sensitive by default, but giving ``case_insensitive`` +a true value makes it case-insensitive. The value is considered true +if it is a non-empty string that is not equal to ``false``, ``none`` or +``no``. If the value is not a string, its truth value is got directly +in Python. Considering ``none`` false is new in RF 3.0.3. + +Lines are returned as one string catenated back together with +newlines. Possible trailing newline is never returned. The +number of matching lines is automatically logged. + +Examples: +| ${lines} = | Get Lines Matching Pattern | ${result} | Wild???? example | +| ${ret} = | Get Lines Matching Pattern | ${ret} | FAIL: * | case_insensitive=true | + +See `Get Lines Matching Regexp` if you need more complex +patterns and `Get Lines Containing String` if searching +literal strings is enough. + + + + + +string +pattern +partial_match=False + +Returns lines of the given ``string`` that match the regexp ``pattern``. + +See `BuiltIn.Should Match Regexp` for more information about +Python regular expression syntax in general and how to use it +in Robot Framework test data in particular. + +By default lines match only if they match the pattern fully, but +partial matching can be enabled by giving the ``partial_match`` +argument a true value. The value is considered true +if it is a non-empty string that is not equal to ``false``, ``none`` or +``no``. If the value is not a string, its truth value is got directly +in Python. Considering ``none`` false is new in RF 3.0.3. + +If the pattern is empty, it matches only empty lines by default. +When partial matching is enabled, empty pattern matches all lines. + +Notice that to make the match case-insensitive, you need to prefix +the pattern with case-insensitive flag ``(?i)``. + +Lines are returned as one string concatenated back together with +newlines. Possible trailing newline is never returned. The +number of matching lines is automatically logged. + +Examples: +| ${lines} = | Get Lines Matching Regexp | ${result} | Reg\\w{3} example | +| ${lines} = | Get Lines Matching Regexp | ${result} | Reg\\w{3} example | partial_match=true | +| ${ret} = | Get Lines Matching Regexp | ${ret} | (?i)FAIL: .* | + +See `Get Lines Matching Pattern` and `Get Lines Containing +String` if you do not need full regular expression powers (and +complexity). + +``partial_match`` argument is new in Robot Framework 2.9. In earlier + versions exact match was always required. + + + + + +string +pattern +*groups + +Returns a list of all non-overlapping matches in the given string. + +``string`` is the string to find matches from and ``pattern`` is the +regular expression. See `BuiltIn.Should Match Regexp` for more +information about Python regular expression syntax in general and how +to use it in Robot Framework test data in particular. + +If no groups are used, the returned list contains full matches. If one +group is used, the list contains only contents of that group. If +multiple groups are used, the list contains tuples that contain +individual group contents. All groups can be given as indexes (starting +from 1) and named groups also as names. + +Examples: +| ${no match} = | Get Regexp Matches | the string | xxx | +| ${matches} = | Get Regexp Matches | the string | t.. | +| ${one group} = | Get Regexp Matches | the string | t(..) | 1 | +| ${named group} = | Get Regexp Matches | the string | t(?P<name>..) | name | +| ${two groups} = | Get Regexp Matches | the string | t(.)(.) | 1 | 2 | +=> +| ${no match} = [] +| ${matches} = ['the', 'tri'] +| ${one group} = ['he', 'ri'] +| ${named group} = ['he', 'ri'] +| ${two groups} = [('h', 'e'), ('r', 'i')] + +New in Robot Framework 2.9. + + + + + +string +start +end=None + +Returns a substring from ``start`` index to ``end`` index. + +The ``start`` index is inclusive and ``end`` is exclusive. +Indexing starts from 0, and it is possible to use +negative indices to refer to characters from the end. + +Examples: +| ${ignore first} = | Get Substring | ${string} | 1 | | +| ${ignore last} = | Get Substring | ${string} | | -1 | +| ${5th to 10th} = | Get Substring | ${string} | 4 | 10 | +| ${first two} = | Get Substring | ${string} | | 1 | +| ${last two} = | Get Substring | ${string} | -2 | | + + + + + +string +*removables + +Removes all ``removables`` from the given ``string``. + +``removables`` are used as literal strings. Each removable will be +matched to a temporary string from which preceding removables have +been already removed. See second example below. + +Use `Remove String Using Regexp` if more powerful pattern matching is +needed. If only a certain number of matches should be removed, +`Replace String` or `Replace String Using Regexp` can be used. + +A modified version of the string is returned and the original +string is not altered. + +Examples: +| ${str} = | Remove String | Robot Framework | work | +| Should Be Equal | ${str} | Robot Frame | +| ${str} = | Remove String | Robot Framework | o | bt | +| Should Be Equal | ${str} | R Framewrk | + + + + + +string +*patterns + +Removes ``patterns`` from the given ``string``. + +This keyword is otherwise identical to `Remove String`, but +the ``patterns`` to search for are considered to be a regular +expression. See `Replace String Using Regexp` for more information +about the regular expression syntax. That keyword can also be +used if there is a need to remove only a certain number of +occurrences. + + + + + +string +search_for +replace_with +count=-1 + +Replaces ``search_for`` in the given ``string`` with ``replace_with``. + +``search_for`` is used as a literal string. See `Replace String +Using Regexp` if more powerful pattern matching is needed. +If you need to just remove a string see `Remove String`. + +If the optional argument ``count`` is given, only that many +occurrences from left are replaced. Negative ``count`` means +that all occurrences are replaced (default behaviour) and zero +means that nothing is done. + +A modified version of the string is returned and the original +string is not altered. + +Examples: +| ${str} = | Replace String | Hello, world! | world | tellus | +| Should Be Equal | ${str} | Hello, tellus! | | | +| ${str} = | Replace String | Hello, world! | l | ${EMPTY} | count=1 | +| Should Be Equal | ${str} | Helo, world! | | | + + + + + +string +pattern +replace_with +count=-1 + +Replaces ``pattern`` in the given ``string`` with ``replace_with``. + +This keyword is otherwise identical to `Replace String`, but +the ``pattern`` to search for is considered to be a regular +expression. See `BuiltIn.Should Match Regexp` for more +information about Python regular expression syntax in general +and how to use it in Robot Framework test data in particular. + +If you need to just remove a string see `Remove String Using Regexp`. + +Examples: +| ${str} = | Replace String Using Regexp | ${str} | 20\\d\\d-\\d\\d-\\d\\d | <DATE> | +| ${str} = | Replace String Using Regexp | ${str} | (Hello|Hi) | ${EMPTY} | count=1 | + + + + + +item +msg=None + +Fails if the given ``item`` is not a byte string. + +Use `Should Be Unicode String` if you want to verify the ``item`` is a +Unicode string, or `Should Be String` if both Unicode and byte strings +are fine. See `Should Be String` for more details about Unicode strings +and byte strings. + +The default error message can be overridden with the optional +``msg`` argument. + + + + + +string +msg=None + +Fails if the given ``string`` is not in lowercase. + +For example, ``'string'`` and ``'with specials!'`` would pass, and +``'String'``, ``''`` and ``' '`` would fail. + +The default error message can be overridden with the optional +``msg`` argument. + +See also `Should Be Uppercase` and `Should Be Titlecase`. + + + + + +item +msg=None + +Fails if the given ``item`` is not a string. + +With Python 2, except with IronPython, this keyword passes regardless +is the ``item`` a Unicode string or a byte string. Use `Should Be +Unicode String` or `Should Be Byte String` if you want to restrict +the string type. Notice that with Python 2, except with IronPython, +``'string'`` creates a byte string and ``u'unicode'`` must be used to +create a Unicode string. + +With Python 3 and IronPython, this keyword passes if the string is +a Unicode string but fails if it is bytes. Notice that with both +Python 3 and IronPython, ``'string'`` creates a Unicode string, and +``b'bytes'`` must be used to create a byte string. + +The default error message can be overridden with the optional +``msg`` argument. + + + + + +string +msg=None + +Fails if given ``string`` is not title. + +``string`` is a titlecased string if there is at least one +character in it, uppercase characters only follow uncased +characters and lowercase characters only cased ones. + +For example, ``'This Is Title'`` would pass, and ``'Word In UPPER'``, +``'Word In lower'``, ``''`` and ``' '`` would fail. + +The default error message can be overridden with the optional +``msg`` argument. + +See also `Should Be Uppercase` and `Should Be Lowercase`. + + + + + +item +msg=None + +Fails if the given ``item`` is not a Unicode string. + +Use `Should Be Byte String` if you want to verify the ``item`` is a +byte string, or `Should Be String` if both Unicode and byte strings +are fine. See `Should Be String` for more details about Unicode +strings and byte strings. + +The default error message can be overridden with the optional +``msg`` argument. + + + + + +string +msg=None + +Fails if the given ``string`` is not in uppercase. + +For example, ``'STRING'`` and ``'WITH SPECIALS!'`` would pass, and +``'String'``, ``''`` and ``' '`` would fail. + +The default error message can be overridden with the optional +``msg`` argument. + +See also `Should Be Titlecase` and `Should Be Lowercase`. + + + + + +item +msg=None + +Fails if the given ``item`` is a string. + +See `Should Be String` for more details about Unicode strings and byte +strings. + +The default error message can be overridden with the optional +``msg`` argument. + + + + + +string +separator=None +max_split=-1 + +Splits the ``string`` using ``separator`` as a delimiter string. + +If a ``separator`` is not given, any whitespace string is a +separator. In that case also possible consecutive whitespace +as well as leading and trailing whitespace is ignored. + +Split words are returned as a list. If the optional +``max_split`` is given, at most ``max_split`` splits are done, and +the returned list will have maximum ``max_split + 1`` elements. + +Examples: +| @{words} = | Split String | ${string} | +| @{words} = | Split String | ${string} | ,${SPACE} | +| ${pre} | ${post} = | Split String | ${string} | :: | 1 | + +See `Split String From Right` if you want to start splitting +from right, and `Fetch From Left` and `Fetch From Right` if +you only want to get first/last part of the string. + + + + + +string +separator=None +max_split=-1 + +Splits the ``string`` using ``separator`` starting from right. + +Same as `Split String`, but splitting is started from right. This has +an effect only when ``max_split`` is given. + +Examples: +| ${first} | ${rest} = | Split String | ${string} | - | 1 | +| ${rest} | ${last} = | Split String From Right | ${string} | - | 1 | + + + + + +string + +Splits the given ``string`` to characters. + +Example: +| @{characters} = | Split String To Characters | ${string} | + + + + + +string +start=0 +end=None + +Splits the given string to lines. + +It is possible to get only a selection of lines from ``start`` +to ``end`` so that ``start`` index is inclusive and ``end`` is +exclusive. Line numbering starts from 0, and it is possible to +use negative indices to refer to lines from the end. + +Lines are returned without the newlines. The number of +returned lines is automatically logged. + +Examples: +| @{lines} = | Split To Lines | ${manylines} | | | +| @{ignore first} = | Split To Lines | ${manylines} | 1 | | +| @{ignore last} = | Split To Lines | ${manylines} | | -1 | +| @{5th to 10th} = | Split To Lines | ${manylines} | 4 | 10 | +| @{first two} = | Split To Lines | ${manylines} | | 1 | +| @{last two} = | Split To Lines | ${manylines} | -2 | | + +Use `Get Line` if you only need to get a single line. + + + + + +string +mode=both +characters=None + +Remove leading and/or trailing whitespaces from the given string. + +``mode`` is either ``left`` to remove leading characters, ``right`` to +remove trailing characters, ``both`` (default) to remove the +characters from both sides of the string or ``none`` to return the +unmodified string. + +If the optional ``characters`` is given, it must be a string and the +characters in the string will be stripped in the string. Please note, +that this is not a substring to be removed but a list of characters, +see the example below. + +Examples: +| ${stripped}= | Strip String | ${SPACE}Hello${SPACE} | | +| Should Be Equal | ${stripped} | Hello | | +| ${stripped}= | Strip String | ${SPACE}Hello${SPACE} | mode=left | +| Should Be Equal | ${stripped} | Hello${SPACE} | | +| ${stripped}= | Strip String | aabaHelloeee | characters=abe | +| Should Be Equal | ${stripped} | Hello | | + +New in Robot Framework 3.0. + + + + diff --git a/libspecs/Telnet.libspec b/libspecs/Telnet.libspec new file mode 100644 index 0000000000000000000000000000000000000000..0e1aa812a26df1f443b592d3b3b283fa8b6dbe12 --- /dev/null +++ b/libspecs/Telnet.libspec @@ -0,0 +1,744 @@ + + +3.1 +test suite +yes +A test library providing communication over Telnet connections. + +``Telnet`` is Robot Framework's standard library that makes it possible to +connect to Telnet servers and execute commands on the opened connections. + +== Table of contents == + +- `Connections` +- `Writing and reading` +- `Configuration` +- `Terminal emulation` +- `Logging` +- `Time string format` +- `Boolean arguments` +- `Importing` +- `Shortcuts` +- `Keywords` + += Connections = + +The first step of using ``Telnet`` is opening a connection with `Open +Connection` keyword. Typically the next step is logging in with `Login` +keyword, and in the end the opened connection can be closed with `Close +Connection`. + +It is possible to open multiple connections and switch the active one +using `Switch Connection`. `Close All Connections` can be used to close +all the connections, which is especially useful in suite teardowns to +guarantee that all connections are always closed. + += Writing and reading = + +After opening a connection and possibly logging in, commands can be +executed or text written to the connection for other reasons using `Write` +and `Write Bare` keywords. The main difference between these two is that +the former adds a [#Configuration|configurable newline] after the text +automatically. + +After writing something to the connection, the resulting output can be +read using `Read`, `Read Until`, `Read Until Regexp`, and `Read Until +Prompt` keywords. Which one to use depends on the context, but the latest +one is often the most convenient. + +As a convenience when running a command, it is possible to use `Execute +Command` that simply uses `Write` and `Read Until Prompt` internally. +`Write Until Expected Output` is useful if you need to wait until writing +something produces a desired output. + +Written and read text is automatically encoded/decoded using a +[#Configuration|configured encoding]. + +The ANSI escape codes, like cursor movement and color codes, are +normally returned as part of the read operation. If an escape code occurs +in middle of a search pattern it may also prevent finding the searched +string. `Terminal emulation` can be used to process these +escape codes as they would be if a real terminal would be in use. + += Configuration = + +Many aspects related the connections can be easily configured either +globally or per connection basis. Global configuration is done when +[#Importing|library is imported], and these values can be overridden per +connection by `Open Connection` or with setting specific keywords +`Set Timeout`, `Set Newline`, `Set Prompt`, `Set Encoding`, +`Set Default Log Level` and `Set Telnetlib Log Level`. + +Values of ``environ_user``, ``window_size``, ``terminal_emulation``, and +``terminal_type`` can not be changed after opening the connection. + +== Timeout == + +Timeout defines how long is the maximum time to wait when reading +output. It is used internally by `Read Until`, `Read Until Regexp`, +`Read Until Prompt`, and `Login` keywords. The default value is 3 seconds. + +== Connection Timeout == + +Connection Timeout defines how long is the maximum time to wait when +opening the telnet connection. It is used internally by `Open Connection`. +The default value is the system global default timeout. + +New in Robot Framework 2.9.2. + +== Newline == + +Newline defines which line separator `Write` keyword should use. The +default value is ``CRLF`` that is typically used by Telnet connections. + +Newline can be given either in escaped format using ``\n`` and ``\r`` or +with special ``LF`` and ``CR`` syntax. + +Examples: +| `Set Newline` | \n | +| `Set Newline` | CRLF | + +== Prompt == + +Often the easiest way to read the output of a command is reading all +the output until the next prompt with `Read Until Prompt`. It also makes +it easier, and faster, to verify did `Login` succeed. + +Prompt can be specified either as a normal string or a regular expression. +The latter is especially useful if the prompt changes as a result of +the executed commands. Prompt can be set to be a regular expression +by giving ``prompt_is_regexp`` argument a true value (see `Boolean +arguments`). + +Examples: +| `Open Connection` | lolcathost | prompt=$ | +| `Set Prompt` | (> |# ) | prompt_is_regexp=true | + +== Encoding == + +To ease handling text containing non-ASCII characters, all written text is +encoded and read text decoded by default. The default encoding is UTF-8 +that works also with ASCII. Encoding can be disabled by using a special +encoding value ``NONE``. This is mainly useful if you need to get the bytes +received from the connection as-is. + +Notice that when writing to the connection, only Unicode strings are +encoded using the defined encoding. Byte strings are expected to be already +encoded correctly. Notice also that normal text in test data is passed to +the library as Unicode and you need to use variables to use bytes. + +It is also possible to configure the error handler to use if encoding or +decoding characters fails. Accepted values are the same that encode/decode +functions in Python strings accept. In practice the following values are +the most useful: + +- ``ignore``: ignore characters that cannot be encoded (default) +- ``strict``: fail if characters cannot be encoded +- ``replace``: replace characters that cannot be encoded with a replacement + character + +Examples: +| `Open Connection` | lolcathost | encoding=Latin1 | encoding_errors=strict | +| `Set Encoding` | ISO-8859-15 | +| `Set Encoding` | errors=ignore | + +== Default log level == + +Default log level specifies the log level keywords use for `logging` unless +they are given an explicit log level. The default value is ``INFO``, and +changing it, for example, to ``DEBUG`` can be a good idea if there is lot +of unnecessary output that makes log files big. + +== Terminal type == + +By default the Telnet library does not negotiate any specific terminal type +with the server. If a specific terminal type, for example ``vt100``, is +desired, the terminal type can be configured in `importing` and with +`Open Connection`. + +== Window size == + +Window size for negotiation with the server can be configured when +`importing` the library and with `Open Connection`. + +== USER environment variable == + +Telnet protocol allows the ``USER`` environment variable to be sent when +connecting to the server. On some servers it may happen that there is no +login prompt, and on those cases this configuration option will allow still +to define the desired username. The option ``environ_user`` can be used in +`importing` and with `Open Connection`. + += Terminal emulation = + +Telnet library supports terminal +emulation with [http://pyte.readthedocs.io|Pyte]. Terminal emulation +will process the output in a virtual screen. This means that ANSI escape +codes, like cursor movements, and also control characters, like +carriage returns and backspaces, have the same effect on the result as they +would have on a normal terminal screen. For example the sequence +``acdc\x1b[3Dbba`` will result in output ``abba``. + +Terminal emulation is taken into use by giving ``terminal_emulation`` +argument a true value (see `Boolean arguments`) either in the library +initialization or with `Open Connection`. + +As Pyte approximates vt-style terminal, you may also want to set the +terminal type as ``vt100``. We also recommend that you increase the window +size, as the terminal emulation will break all lines that are longer than +the window row length. + +When terminal emulation is used, the `newline` and `encoding` can not be +changed anymore after opening the connection. + +Examples: +| `Open Connection` | lolcathost | terminal_emulation=True | terminal_type=vt100 | window_size=400x100 | + +As a prerequisite for using terminal emulation, you need to have Pyte +installed. Due to backwards incompatible changes in Pyte, different +Robot Framework versions support different Pyte versions: + +- Pyte 0.6 and newer are supported by Robot Framework 3.0.3. + Latest Pyte version can be installed (or upgraded) with + ``pip install --upgrade pyte``. +- Pyte 0.5.2 and older are supported by Robot Framework 3.0.2 and earlier. + Pyte 0.5.2 can be installed with ``pip install pyte==0.5.2``. + += Logging = + +All keywords that read something log the output. These keywords take the +log level to use as an optional argument, and if no log level is specified +they use the [#Configuration|configured] default value. + +The valid log levels to use are ``TRACE``, ``DEBUG``, ``INFO`` (default), +and ``WARN``. Levels below ``INFO`` are not shown in log files by default +whereas warnings are shown more prominently. + +The [http://docs.python.org/library/telnetlib.html|telnetlib module] +used by this library has a custom logging system for logging content it +sends and receives. By default these messages are written using ``TRACE`` +level, but the level is configurable with the ``telnetlib_log_level`` +option either in the library initialization, to the `Open Connection` +or by using the `Set Telnetlib Log Level` keyword to the active +connection. Special level ``NONE`` con be used to disable the logging +altogether. + += Time string format = + +Timeouts and other times used must be given as a time string using format +like ``15 seconds`` or ``1min 10s``. If the timeout is given as just +a number, for example, ``10`` or ``1.5``, it is considered to be seconds. +The time string format is described in more detail in an appendix of +[http://robotframework.org/robotframework/#user-guide|Robot Framework User Guide]. + += Boolean arguments = + +Some keywords accept arguments that are handled as Boolean values true or +false. If such an argument is given as a string, it is considered false if +it is an empty string or equal to ``FALSE``, ``NONE``, ``NO``, ``OFF`` or +``0``, case-insensitively. Other strings are considered true regardless +their value, and other argument types are tested using the same +[http://docs.python.org/library/stdtypes.html#truth|rules as in Python]. + +True examples: +| `Open Connection` | lolcathost | terminal_emulation=True | # Strings are generally true. | +| `Open Connection` | lolcathost | terminal_emulation=yes | # Same as the above. | +| `Open Connection` | lolcathost | terminal_emulation=${TRUE} | # Python ``True`` is true. | +| `Open Connection` | lolcathost | terminal_emulation=${42} | # Numbers other than 0 are true. | + +False examples: +| `Open Connection` | lolcathost | terminal_emulation=False | # String ``false`` is false. | +| `Open Connection` | lolcathost | terminal_emulation=no | # Also string ``no`` is false. | +| `Open Connection` | lolcathost | terminal_emulation=${EMPTY} | # Empty string is false. | +| `Open Connection` | lolcathost | terminal_emulation=${FALSE} | # Python ``False`` is false. | + +Considering string ``NONE`` false is new in Robot Framework 3.0.3 and +considering also ``OFF`` and ``0`` false is new in Robot Framework 3.1. + + +timeout=3 seconds +newline=CRLF +prompt=None +prompt_is_regexp=False +encoding=UTF-8 +encoding_errors=ignore +default_log_level=INFO +window_size=None +environ_user=None +terminal_emulation=False +terminal_type=None +telnetlib_log_level=TRACE +connection_timeout=None + +Telnet library can be imported with optional configuration parameters. + +Configuration parameters are used as default values when new +connections are opened with `Open Connection` keyword. They can also be +overridden after opening the connection using the `Set ...` `keywords`. +See these keywords as well as `Configuration`, `Terminal emulation` and +`Logging` sections above for more information about these parameters +and their possible values. + +See `Time string format` and `Boolean arguments` sections for +information about using arguments accepting times and Boolean values, +respectively. + +Examples (use only one of these): +| = Setting = | = Value = | = Value = | = Value = | = Value = | = Comment = | +| Library | Telnet | | | | # default values | +| Library | Telnet | 5 seconds | | | # set only timeout | +| Library | Telnet | newline=LF | encoding=ISO-8859-1 | | # set newline and encoding using named arguments | +| Library | Telnet | prompt=$ | | | # set prompt | +| Library | Telnet | prompt=(> |# ) | prompt_is_regexp=yes | | # set prompt as a regular expression | +| Library | Telnet | terminal_emulation=True | terminal_type=vt100 | window_size=400x100 | # use terminal emulation with defined window size and terminal type | +| Library | Telnet | telnetlib_log_level=NONE | | | # disable logging messages from the underlying telnetlib | + + + + + + +Closes all open connections and empties the connection cache. + +If multiple connections are opened, this keyword should be used in +a test or suite teardown to make sure that all connections are closed. +It is not an error is some of the connections have already been closed +by `Close Connection`. + +After this keyword, new indexes returned by `Open Connection` +keyword are reset to 1. + + + + + +loglevel=None + +Closes the current Telnet connection. + +Remaining output in the connection is read, logged, and returned. +It is not an error to close an already closed connection. + +Use `Close All Connections` if you want to make sure all opened +connections are closed. + +See `Logging` section for more information about log levels. + + + + + +command +loglevel=None +strip_prompt=False + +Executes the given ``command`` and reads, logs, and returns everything until the prompt. + +This keyword requires the prompt to be [#Configuration|configured] +either in `importing` or with `Open Connection` or `Set Prompt` keyword. + +This is a convenience keyword that uses `Write` and `Read Until Prompt` +internally. Following two examples are thus functionally identical: + +| ${out} = | `Execute Command` | pwd | + +| `Write` | pwd | +| ${out} = | `Read Until Prompt` | + +See `Logging` section for more information about log levels and `Read +Until Prompt` for more information about the ``strip_prompt`` parameter. + + + + + +username +password +login_prompt=login: +password_prompt=Password: +login_timeout=1 second +login_incorrect=Login incorrect + +Logs in to the Telnet server with the given user information. + +This keyword reads from the connection until the ``login_prompt`` is +encountered and then types the given ``username``. Then it reads until +the ``password_prompt`` and types the given ``password``. In both cases +a newline is appended automatically and the connection specific +timeout used when waiting for outputs. + +How logging status is verified depends on whether a prompt is set for +this connection or not: + +1) If the prompt is set, this keyword reads the output until the prompt +is found using the normal timeout. If no prompt is found, login is +considered failed and also this keyword fails. Note that in this case +both ``login_timeout`` and ``login_incorrect`` arguments are ignored. + +2) If the prompt is not set, this keywords sleeps until ``login_timeout`` +and then reads all the output available on the connection. If the +output contains ``login_incorrect`` text, login is considered failed +and also this keyword fails. + +See `Configuration` section for more information about setting +newline, timeout, and prompt. + + + + + +host +alias=None +port=23 +timeout=None +newline=None +prompt=None +prompt_is_regexp=False +encoding=None +encoding_errors=None +default_log_level=None +window_size=None +environ_user=None +terminal_emulation=None +terminal_type=None +telnetlib_log_level=None +connection_timeout=None + +Opens a new Telnet connection to the given host and port. + +The ``timeout``, ``newline``, ``prompt``, ``prompt_is_regexp``, +``encoding``, ``default_log_level``, ``window_size``, ``environ_user``, +``terminal_emulation``, ``terminal_type`` and ``telnetlib_log_level`` +arguments get default values when the library is [#Importing|imported]. +Setting them here overrides those values for the opened connection. +See `Configuration`, `Terminal emulation` and `Logging` sections for +more information about these parameters and their possible values. + +Possible already opened connections are cached and it is possible to +switch back to them using `Switch Connection` keyword. It is possible to +switch either using explicitly given ``alias`` or using index returned +by this keyword. Indexing starts from 1 and is reset back to it by +`Close All Connections` keyword. + + + + + +loglevel=None + +Reads everything that is currently available in the output. + +Read output is both returned and logged. See `Logging` section for more +information about log levels. + + + + + +expected +loglevel=None + +Reads output until ``expected`` text is encountered. + +Text up to and including the match is returned and logged. If no match +is found, this keyword fails. How much to wait for the output depends +on the [#Configuration|configured timeout]. + +See `Logging` section for more information about log levels. Use +`Read Until Regexp` if more complex matching is needed. + + + + + +loglevel=None +strip_prompt=False + +Reads output until the prompt is encountered. + +This keyword requires the prompt to be [#Configuration|configured] +either in `importing` or with `Open Connection` or `Set Prompt` keyword. + +By default, text up to and including the prompt is returned and logged. +If no prompt is found, this keyword fails. How much to wait for the +output depends on the [#Configuration|configured timeout]. + +If you want to exclude the prompt from the returned output, set +``strip_prompt`` to a true value (see `Boolean arguments`). If your +prompt is a regular expression, make sure that the expression spans the +whole prompt, because only the part of the output that matches the +regular expression is stripped away. + +See `Logging` section for more information about log levels. + + + + + +*expected + +Reads output until any of the ``expected`` regular expressions match. + +This keyword accepts any number of regular expressions patterns or +compiled Python regular expression objects as arguments. Text up to +and including the first match to any of the regular expressions is +returned and logged. If no match is found, this keyword fails. How much +to wait for the output depends on the [#Configuration|configured timeout]. + +If the last given argument is a [#Logging|valid log level], it is used +as ``loglevel`` similarly as with `Read Until` keyword. + +See the documentation of +[http://docs.python.org/library/re.html|Python re module] +for more information about the supported regular expression syntax. +Notice that possible backslashes need to be escaped in Robot Framework +test data. + +Examples: +| `Read Until Regexp` | (#|$) | +| `Read Until Regexp` | first_regexp | second_regexp | +| `Read Until Regexp` | \\d{4}-\\d{2}-\\d{2} | DEBUG | + + + + + +level + +Sets the default log level used for `logging` in the current connection. + +The old default log level is returned and can be used to restore the +log level later. + +See `Configuration` section for more information about global and +connection specific configuration. + + + + + +encoding=None +errors=None + +Sets the encoding to use for `writing and reading` in the current connection. + +The given ``encoding`` specifies the encoding to use when written/read +text is encoded/decoded, and ``errors`` specifies the error handler to +use if encoding/decoding fails. Either of these can be omitted and in +that case the old value is not affected. Use string ``NONE`` to disable +encoding altogether. + +See `Configuration` section for more information about encoding and +error handlers, as well as global and connection specific configuration +in general. + +The old values are returned and can be used to restore the encoding +and the error handler later. See `Set Prompt` for a similar example. + +If terminal emulation is used, the encoding can not be changed on an open +connection. + + + + + +newline + +Sets the newline used by `Write` keyword in the current connection. + +The old newline is returned and can be used to restore the newline later. +See `Set Timeout` for a similar example. + +If terminal emulation is used, the newline can not be changed on an open +connection. + +See `Configuration` section for more information about global and +connection specific configuration. + + + + + +prompt +prompt_is_regexp=False + +Sets the prompt used by `Read Until Prompt` and `Login` in the current connection. + +If ``prompt_is_regexp`` is given a true value (see `Boolean arguments`), +the given ``prompt`` is considered to be a regular expression. + +The old prompt is returned and can be used to restore the prompt later. + +Example: +| ${prompt} | ${regexp} = | `Set Prompt` | $ | +| `Do Something` | +| `Set Prompt` | ${prompt} | ${regexp} | + +See the documentation of +[http://docs.python.org/library/re.html|Python re module] +for more information about the supported regular expression syntax. +Notice that possible backslashes need to be escaped in Robot Framework +test data. + +See `Configuration` section for more information about global and +connection specific configuration. + + + + + +level + +Sets the log level used for `logging` in the underlying ``telnetlib``. + +Note that ``telnetlib`` can be very noisy thus using the level ``NONE`` +can shutdown the messages generated by this library. + + + + + +timeout + +Sets the timeout used for waiting output in the current connection. + +Read operations that expect some output to appear (`Read Until`, `Read +Until Regexp`, `Read Until Prompt`, `Login`) use this timeout and fail +if the expected output does not appear before this timeout expires. + +The ``timeout`` must be given in `time string format`. The old timeout +is returned and can be used to restore the timeout later. + +Example: +| ${old} = | `Set Timeout` | 2 minute 30 seconds | +| `Do Something` | +| `Set Timeout` | ${old} | + +See `Configuration` section for more information about global and +connection specific configuration. + + + + + +index_or_alias + +Switches between active connections using an index or an alias. + +Aliases can be given to `Open Connection` keyword which also always +returns the connection index. + +This keyword returns the index of previous active connection. + +Example: +| `Open Connection` | myhost.net | | | +| `Login` | john | secret | | +| `Write` | some command | | | +| `Open Connection` | yourhost.com | 2nd conn | | +| `Login` | root | password | | +| `Write` | another cmd | | | +| ${old index}= | `Switch Connection` | 1 | # index | +| `Write` | something | | | +| `Switch Connection` | 2nd conn | | # alias | +| `Write` | whatever | | | +| `Switch Connection` | ${old index} | | # back to original | +| [Teardown] | `Close All Connections` | | | + +The example above expects that there were no other open +connections when opening the first one, because it used index +``1`` when switching to the connection later. If you are not +sure about that, you can store the index into a variable as +shown below. + +| ${index} = | `Open Connection` | myhost.net | +| `Do Something` | | | +| `Switch Connection` | ${index} | | + + + + + +text +loglevel=None + +Writes the given text plus a newline into the connection. + +The newline character sequence to use can be [#Configuration|configured] +both globally and per connection basis. The default value is ``CRLF``. + +This keyword consumes the written text, until the added newline, from +the output and logs and returns it. The given text itself must not +contain newlines. Use `Write Bare` instead if either of these features +causes a problem. + +*Note:* This keyword does not return the possible output of the executed +command. To get the output, one of the `Read ...` `keywords` must be +used. See `Writing and reading` section for more details. + +See `Logging` section for more information about log levels. + + + + + +text + +Writes the given text, and nothing else, into the connection. + +This keyword does not append a newline nor consume the written text. +Use `Write` if these features are needed. + + + + + +character + +Writes the given control character into the connection. + +The control character is prepended with an IAC (interpret as command) +character. + +The following control character names are supported: BRK, IP, AO, AYT, +EC, EL, NOP. Additionally, you can use arbitrary numbers to send any +control character. + +Example: +| Write Control Character | BRK | # Send Break command | +| Write Control Character | 241 | # Send No operation command | + + + + + +text +expected +timeout +retry_interval +loglevel=None + +Writes the given ``text`` repeatedly, until ``expected`` appears in the output. + +``text`` is written without appending a newline and it is consumed from +the output before trying to find ``expected``. If ``expected`` does not +appear in the output within ``timeout``, this keyword fails. + +``retry_interval`` defines the time to wait ``expected`` to appear before +writing the ``text`` again. Consuming the written ``text`` is subject to +the normal [#Configuration|configured timeout]. + +Both ``timeout`` and ``retry_interval`` must be given in `time string +format`. See `Logging` section for more information about log levels. + +Example: +| Write Until Expected Output | ps -ef| grep myprocess\r\n | myprocess | +| ... | 5 s | 0.5 s | + +The above example writes command ``ps -ef | grep myprocess\r\n`` until +``myprocess`` appears in the output. The command is written every 0.5 +seconds and the keyword fails if ``myprocess`` does not appear in +the output in 5 seconds. + + + + diff --git a/libspecs/XML.libspec b/libspecs/XML.libspec new file mode 100644 index 0000000000000000000000000000000000000000..a5b64dc041a811887e8e705c6e39a2bfc7e93391 --- /dev/null +++ b/libspecs/XML.libspec @@ -0,0 +1,1365 @@ + + +3.1 +global +yes +Robot Framework test library for verifying and modifying XML documents. + +As the name implies, _XML_ is a test library for verifying contents of XML +files. In practice it is a pretty thin wrapper on top of Python's +[http://docs.python.org/library/xml.etree.elementtree.html|ElementTree XML API]. + +The library has the following main usages: + +- Parsing an XML file, or a string containing XML, into an XML element + structure and finding certain elements from it for for further analysis + (e.g. `Parse XML` and `Get Element` keywords). +- Getting text or attributes of elements + (e.g. `Get Element Text` and `Get Element Attribute`). +- Directly verifying text, attributes, or whole elements + (e.g `Element Text Should Be` and `Elements Should Be Equal`). +- Modifying XML and saving it (e.g. `Set Element Text`, `Add Element` + and `Save XML`). + +== Table of contents == + +- `Parsing XML` +- `Using lxml` +- `Example` +- `Finding elements with xpath` +- `Element attributes` +- `Handling XML namespaces` +- `Boolean arguments` +- `Pattern matching` +- `Shortcuts` +- `Keywords` + += Parsing XML = + +XML can be parsed into an element structure using `Parse XML` keyword. +It accepts both paths to XML files and strings that contain XML. The +keyword returns the root element of the structure, which then contains +other elements as its children and their children. Possible comments and +processing instructions in the source XML are removed. + +XML is not validated during parsing even if has a schema defined. How +possible doctype elements are handled otherwise depends on the used XML +module and on the platform. The standard ElementTree strips doctypes +altogether but when `using lxml` they are preserved when XML is saved. + +The element structure returned by `Parse XML`, as well as elements +returned by keywords such as `Get Element`, can be used as the ``source`` +argument with other keywords. In addition to an already parsed XML +structure, other keywords also accept paths to XML files and strings +containing XML similarly as `Parse XML`. Notice that keywords that modify +XML do not write those changes back to disk even if the source would be +given as a path to a file. Changes must always saved explicitly using +`Save XML` keyword. + +When the source is given as a path to a file, the forward slash character +(``/``) can be used as the path separator regardless the operating system. +On Windows also the backslash works, but it the test data it needs to be +escaped by doubling it (``\\``). Using the built-in variable ``${/}`` +naturally works too. + += Using lxml = + +By default this library uses Python's standard +[http://docs.python.org/library/xml.etree.elementtree.html|ElementTree] +module for parsing XML, but it can be configured to use +[http://lxml.de|lxml] module instead when `importing` the library. +The resulting element structure has same API regardless which module +is used for parsing. + +The main benefits of using lxml is that it supports richer xpath syntax +than the standard ElementTree and enables using `Evaluate Xpath` keyword. +It also preserves the doctype and possible namespace prefixes saving XML. + += Example = + +The following simple example demonstrates parsing XML and verifying its +contents both using keywords in this library and in _BuiltIn_ and +_Collections_ libraries. How to use xpath expressions to find elements +and what attributes the returned elements contain are discussed, with +more examples, in `Finding elements with xpath` and `Element attributes` +sections. + +In this example, as well as in many other examples in this documentation, +``${XML}`` refers to the following example XML document. In practice +``${XML}`` could either be a path to an XML file or it could contain the XML +itself. + +| <example> +| <first id="1">text</first> +| <second id="2"> +| <child/> +| </second> +| <third> +| <child>more text</child> +| <second id="child"/> +| <child><grandchild/></child> +| </third> +| <html> +| <p> +| Text with <b>bold</b> and <i>italics</i>. +| </p> +| </html> +| </example> + +| ${root} = | `Parse XML` | ${XML} | | | +| `Should Be Equal` | ${root.tag} | example | | | +| ${first} = | `Get Element` | ${root} | first | | +| `Should Be Equal` | ${first.text} | text | | | +| `Dictionary Should Contain Key` | ${first.attrib} | id | | +| `Element Text Should Be` | ${first} | text | | | +| `Element Attribute Should Be` | ${first} | id | 1 | | +| `Element Attribute Should Be` | ${root} | id | 1 | xpath=first | +| `Element Attribute Should Be` | ${XML} | id | 1 | xpath=first | + +Notice that in the example three last lines are equivalent. Which one to +use in practice depends on which other elements you need to get or verify. +If you only need to do one verification, using the last line alone would +suffice. If more verifications are needed, parsing the XML with `Parse XML` +only once would be more efficient. + += Finding elements with xpath = + +ElementTree, and thus also this library, supports finding elements using +xpath expressions. ElementTree does not, however, support the full xpath +standard. The supported xpath syntax is explained below and +[https://docs.python.org/library/xml.etree.elementtree.html#xpath-support| +ElementTree documentation] provides more details. In the examples +``${XML}`` refers to the same XML structure as in the earlier example. + +If lxml support is enabled when `importing` the library, the whole +[http://www.w3.org/TR/xpath/|xpath 1.0 standard] is supported. +That includes everything listed below but also lot of other useful +constructs. + +== Tag names == + +When just a single tag name is used, xpath matches all direct child +elements that have that tag name. + +| ${elem} = | `Get Element` | ${XML} | third | +| `Should Be Equal` | ${elem.tag} | third | | +| @{children} = | `Get Elements` | ${elem} | child | +| `Length Should Be` | ${children} | 2 | | + +== Paths == + +Paths are created by combining tag names with a forward slash (``/``). For +example, ``parent/child`` matches all ``child`` elements under ``parent`` +element. Notice that if there are multiple ``parent`` elements that all +have ``child`` elements, ``parent/child`` xpath will match all these +``child`` elements. + +| ${elem} = | `Get Element` | ${XML} | second/child | +| `Should Be Equal` | ${elem.tag} | child | | +| ${elem} = | `Get Element` | ${XML} | third/child/grandchild | +| `Should Be Equal` | ${elem.tag} | grandchild | | + +== Wildcards == + +An asterisk (``*``) can be used in paths instead of a tag name to denote +any element. + +| @{children} = | `Get Elements` | ${XML} | */child | +| `Length Should Be` | ${children} | 3 | | + +== Current element == + +The current element is denoted with a dot (``.``). Normally the current +element is implicit and does not need to be included in the xpath. + +== Parent element == + +The parent element of another element is denoted with two dots (``..``). +Notice that it is not possible to refer to the parent of the current +element. + +| ${elem} = | `Get Element` | ${XML} | */second/.. | +| `Should Be Equal` | ${elem.tag} | third | | + +== Search all sub elements == + +Two forward slashes (``//``) mean that all sub elements, not only the +direct children, are searched. If the search is started from the current +element, an explicit dot is required. + +| @{elements} = | `Get Elements` | ${XML} | .//second | +| `Length Should Be` | ${elements} | 2 | | +| ${b} = | `Get Element` | ${XML} | html//b | +| `Should Be Equal` | ${b.text} | bold | | + +== Predicates == + +Predicates allow selecting elements using also other criteria than tag +names, for example, attributes or position. They are specified after the +normal tag name or path using syntax ``path[predicate]``. The path can have +wildcards and other special syntax explained earlier. What predicates +the standard ElementTree supports is explained in the table below. + +| = Predicate = | = Matches = | = Example = | +| @attrib | Elements with attribute ``attrib``. | second[@id] | +| @attrib="value" | Elements with attribute ``attrib`` having value ``value``. | *[@id="2"] | +| position | Elements at the specified position. Position can be an integer (starting from 1), expression ``last()``, or relative expression like ``last() - 1``. | third/child[1] | +| tag | Elements with a child element named ``tag``. | third/child[grandchild] | + +Predicates can also be stacked like ``path[predicate1][predicate2]``. +A limitation is that possible position predicate must always be first. + += Element attributes = + +All keywords returning elements, such as `Parse XML`, and `Get Element`, +return ElementTree's +[http://docs.python.org/library/xml.etree.elementtree.html#element-objects|Element objects]. +These elements can be used as inputs for other keywords, but they also +contain several useful attributes that can be accessed directly using +the extended variable syntax. + +The attributes that are both useful and convenient to use in the test +data are explained below. Also other attributes, including methods, can +be accessed, but that is typically better to do in custom libraries than +directly in the test data. + +The examples use the same ``${XML}`` structure as the earlier examples. + +== tag == + +The tag of the element. + +| ${root} = | `Parse XML` | ${XML} | +| `Should Be Equal` | ${root.tag} | example | + +== text == + +The text that the element contains or Python ``None`` if the element has no +text. Notice that the text _does not_ contain texts of possible child +elements nor text after or between children. Notice also that in XML +whitespace is significant, so the text contains also possible indentation +and newlines. To get also text of the possible children, optionally +whitespace normalized, use `Get Element Text` keyword. + +| ${1st} = | `Get Element` | ${XML} | first | +| `Should Be Equal` | ${1st.text} | text | | +| ${2nd} = | `Get Element` | ${XML} | second/child | +| `Should Be Equal` | ${2nd.text} | ${NONE} | | +| ${p} = | `Get Element` | ${XML} | html/p | +| `Should Be Equal` | ${p.text} | \n${SPACE*6}Text with${SPACE} | + +== tail == + +The text after the element before the next opening or closing tag. Python +``None`` if the element has no tail. Similarly as with ``text``, also +``tail`` contains possible indentation and newlines. + +| ${b} = | `Get Element` | ${XML} | html/p/b | +| `Should Be Equal` | ${b.tail} | ${SPACE}and${SPACE} | + +== attrib == + +A Python dictionary containing attributes of the element. + +| ${2nd} = | `Get Element` | ${XML} | second | +| `Should Be Equal` | ${2nd.attrib['id']} | 2 | | +| ${3rd} = | `Get Element` | ${XML} | third | +| `Should Be Empty` | ${3rd.attrib} | | | + += Handling XML namespaces = + +ElementTree and lxml handle possible namespaces in XML documents by adding +the namespace URI to tag names in so called Clark Notation. That is +inconvenient especially with xpaths, and by default this library strips +those namespaces away and moves them to ``xmlns`` attribute instead. That +can be avoided by passing ``keep_clark_notation`` argument to `Parse XML` +keyword. Alternatively `Parse XML` supports stripping namespace information +altogether by using ``strip_namespaces`` argument. The pros and cons of +different approaches are discussed in more detail below. + +== How ElementTree handles namespaces == + +If an XML document has namespaces, ElementTree adds namespace information +to tag names in [http://www.jclark.com/xml/xmlns.htm|Clark Notation] +(e.g. ``{http://ns.uri}tag``) and removes original ``xmlns`` attributes. +This is done both with default namespaces and with namespaces with a prefix. +How it works in practice is illustrated by the following example, where +``${NS}`` variable contains this XML document: + +| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +| xmlns="http://www.w3.org/1999/xhtml"> +| <xsl:template match="/"> +| <html></html> +| </xsl:template> +| </xsl:stylesheet> + +| ${root} = | `Parse XML` | ${NS} | keep_clark_notation=yes | +| `Should Be Equal` | ${root.tag} | {http://www.w3.org/1999/XSL/Transform}stylesheet | +| `Element Should Exist` | ${root} | {http://www.w3.org/1999/XSL/Transform}template/{http://www.w3.org/1999/xhtml}html | +| `Should Be Empty` | ${root.attrib} | + +As you can see, including the namespace URI in tag names makes xpaths +really long and complex. + +If you save the XML, ElementTree moves namespace information back to +``xmlns`` attributes. Unfortunately it does not restore the original +prefixes: + +| <ns0:stylesheet xmlns:ns0="http://www.w3.org/1999/XSL/Transform"> +| <ns0:template match="/"> +| <ns1:html xmlns:ns1="http://www.w3.org/1999/xhtml"></ns1:html> +| </ns0:template> +| </ns0:stylesheet> + +The resulting output is semantically same as the original, but mangling +prefixes like this may still not be desirable. Notice also that the actual +output depends slightly on ElementTree version. + +== Default namespace handling == + +Because the way ElementTree handles namespaces makes xpaths so complicated, +this library, by default, strips namespaces from tag names and moves that +information back to ``xmlns`` attributes. How this works in practice is +shown by the example below, where ``${NS}`` variable contains the same XML +document as in the previous example. + +| ${root} = | `Parse XML` | ${NS} | +| `Should Be Equal` | ${root.tag} | stylesheet | +| `Element Should Exist` | ${root} | template/html | +| `Element Attribute Should Be` | ${root} | xmlns | http://www.w3.org/1999/XSL/Transform | +| `Element Attribute Should Be` | ${root} | xmlns | http://www.w3.org/1999/xhtml | xpath=template/html | + +Now that tags do not contain namespace information, xpaths are simple again. + +A minor limitation of this approach is that namespace prefixes are lost. +As a result the saved output is not exactly same as the original one in +this case either: + +| <stylesheet xmlns="http://www.w3.org/1999/XSL/Transform"> +| <template match="/"> +| <html xmlns="http://www.w3.org/1999/xhtml"></html> +| </template> +| </stylesheet> + +Also this output is semantically same as the original. If the original XML +had only default namespaces, the output would also look identical. + +== Namespaces when using lxml == + +This library handles namespaces same way both when `using lxml` and when +not using it. There are, however, differences how lxml internally handles +namespaces compared to the standard ElementTree. The main difference is +that lxml stores information about namespace prefixes and they are thus +preserved if XML is saved. Another visible difference is that lxml includes +namespace information in child elements got with `Get Element` if the +parent element has namespaces. + +== Stripping namespaces altogether == + +Because namespaces often add unnecessary complexity, `Parse XML` supports +stripping them altogether by using ``strip_namespaces=True``. When this +option is enabled, namespaces are not shown anywhere nor are they included +if XML is saved. + +== Attribute namespaces == + +Attributes in XML documents are, by default, in the same namespaces as +the element they belong to. It is possible to use different namespaces +by using prefixes, but this is pretty rare. + +If an attribute has a namespace prefix, ElementTree will replace it with +Clark Notation the same way it handles elements. Because stripping +namespaces from attributes could cause attribute conflicts, this library +does not handle attribute namespaces at all. Thus the following example +works the same way regardless how namespaces are handled. + +| ${root} = | `Parse XML` | <root id="1" ns:id="2" xmlns:ns="http://my.ns"/> | +| `Element Attribute Should Be` | ${root} | id | 1 | +| `Element Attribute Should Be` | ${root} | {http://my.ns}id | 2 | + += Boolean arguments = + +Some keywords accept arguments that are handled as Boolean values true or +false. If such an argument is given as a string, it is considered false if +it is an empty string or equal to ``FALSE``, ``NONE``, ``NO``, ``OFF`` or +``0``, case-insensitively. Other strings are considered true regardless +their value, and other argument types are tested using the same +[http://docs.python.org/library/stdtypes.html#truth|rules as in Python]. + +True examples: +| `Parse XML` | ${XML} | keep_clark_notation=True | # Strings are generally true. | +| `Parse XML` | ${XML} | keep_clark_notation=yes | # Same as the above. | +| `Parse XML` | ${XML} | keep_clark_notation=${TRUE} | # Python ``True`` is true. | +| `Parse XML` | ${XML} | keep_clark_notation=${42} | # Numbers other than 0 are true. | + +False examples: +| `Parse XML` | ${XML} | keep_clark_notation=False | # String ``false`` is false. | +| `Parse XML` | ${XML} | keep_clark_notation=no | # Also string ``no`` is false. | +| `Parse XML` | ${XML} | keep_clark_notation=${EMPTY} | # Empty string is false. | +| `Parse XML` | ${XML} | keep_clark_notation=${FALSE} | # Python ``False`` is false. | + +Considering string ``NONE`` false is new in Robot Framework 3.0.3 and +considering also ``OFF`` and ``0`` false is new in Robot Framework 3.1. + +== Pattern matching == + +Some keywords, for example `Elements Should Match`, support so called +[http://en.wikipedia.org/wiki/Glob_(programming)|glob patterns] where: + +| ``*`` | matches any string, even an empty string | +| ``?`` | matches any single character | +| ``[chars]`` | matches one character in the bracket | +| ``[!chars]`` | matches one character not in the bracket | +| ``[a-z]`` | matches one character from the range in the bracket | +| ``[!a-z]`` | matches one character not from the range in the bracket | + +Unlike with glob patterns normally, path separator characters ``/`` and +``\`` and the newline character ``\n`` are matches by the above +wildcards. + +Support for brackets like ``[abc]`` and ``[!a-z]`` is new in +Robot Framework 3.1 + + +use_lxml=False + +Import library with optionally lxml mode enabled. + +By default this library uses Python's standard +[http://docs.python.org/library/xml.etree.elementtree.html|ElementTree] +module for parsing XML. If ``use_lxml`` argument is given a true value +(see `Boolean arguments`), the library will use [http://lxml.de|lxml] +module instead. See `Using lxml` section for benefits provided by lxml. + +Using lxml requires that the lxml module is installed on the system. +If lxml mode is enabled but the module is not installed, this library +will emit a warning and revert back to using the standard ElementTree. + + + + + +source +element +index=None +xpath=. + +Adds a child element to the specified element. + +The element to whom to add the new element is specified using ``source`` +and ``xpath``. They have exactly the same semantics as with `Get Element` +keyword. The resulting XML structure is returned, and if the ``source`` +is an already parsed XML structure, it is also modified in place. + +The ``element`` to add can be specified as a path to an XML file or +as a string containing XML, or it can be an already parsed XML element. +The element is copied before adding so modifying either the original +or the added element has no effect on the other +. +The element is added as the last child by default, but a custom index +can be used to alter the position. Indices start from zero (0 = first +position, 1 = second position, etc.), and negative numbers refer to +positions at the end (-1 = second last position, -2 = third last, etc.). + +Examples using ``${XML}`` structure from `Example`: +| Add Element | ${XML} | <new id="x"><c1/></new> | +| Add Element | ${XML} | <c2/> | xpath=new | +| Add Element | ${XML} | <c3/> | index=1 | xpath=new | +| ${new} = | Get Element | ${XML} | new | +| Elements Should Be Equal | ${new} | <new id="x"><c1/><c3/><c2/></new> | + +Use `Remove Element` or `Remove Elements` to remove elements. + + + + + +source +xpath=. +clear_tail=False + +Clears the contents of the specified element. + +The element to clear is specified using ``source`` and ``xpath``. They +have exactly the same semantics as with `Get Element` keyword. +The resulting XML structure is returned, and if the ``source`` is +an already parsed XML structure, it is also modified in place. + +Clearing the element means removing its text, attributes, and children. +Element's tail text is not removed by default, but that can be changed +by giving ``clear_tail`` a true value (see `Boolean arguments`). See +`Element attributes` section for more information about tail in +general. + +Examples using ``${XML}`` structure from `Example`: +| Clear Element | ${XML} | xpath=first | +| ${first} = | Get Element | ${XML} | xpath=first | +| Elements Should Be Equal | ${first} | <first/> | +| Clear Element | ${XML} | xpath=html/p/b | clear_tail=yes | +| Element Text Should Be | ${XML} | Text with italics. | xpath=html/p | normalize_whitespace=yes | +| Clear Element | ${XML} | +| Elements Should Be Equal | ${XML} | <example/> | + +Use `Remove Element` to remove the whole element. + + + + + +source +xpath=. + +Returns a copy of the specified element. + +The element to copy is specified using ``source`` and ``xpath``. They +have exactly the same semantics as with `Get Element` keyword. + +If the copy or the original element is modified afterwards, the changes +have no effect on the other. + +Examples using ``${XML}`` structure from `Example`: +| ${elem} = | Get Element | ${XML} | xpath=first | +| ${copy1} = | Copy Element | ${elem} | +| ${copy2} = | Copy Element | ${XML} | xpath=first | +| Set Element Text | ${XML} | new text | xpath=first | +| Set Element Attribute | ${copy1} | id | new | +| Elements Should Be Equal | ${elem} | <first id="1">new text</first> | +| Elements Should Be Equal | ${copy1} | <first id="new">text</first> | +| Elements Should Be Equal | ${copy2} | <first id="1">text</first> | + + + + + +source +name +expected +xpath=. +message=None + +Verifies that the specified attribute is ``expected``. + +The element whose attribute is verified is specified using ``source`` +and ``xpath``. They have exactly the same semantics as with +`Get Element` keyword. + +The keyword passes if the attribute ``name`` of the element is equal to +the ``expected`` value, and otherwise it fails. The default error +message can be overridden with the ``message`` argument. + +To test that the element does not have a certain attribute, Python +``None`` (i.e. variable ``${NONE}``) can be used as the expected value. +A cleaner alternative is using `Element Should Not Have Attribute`. + +Examples using ``${XML}`` structure from `Example`: +| Element Attribute Should Be | ${XML} | id | 1 | xpath=first | +| Element Attribute Should Be | ${XML} | id | ${NONE} | | + +See also `Element Attribute Should Match` and `Get Element Attribute`. + + + + + +source +name +pattern +xpath=. +message=None + +Verifies that the specified attribute matches ``expected``. + +This keyword works exactly like `Element Attribute Should Be` except +that the expected value can be given as a pattern that the attribute of +the element must match. + +Pattern matching is similar as matching files in a shell with +``*``, ``?`` and ``[chars]`` acting as wildcards. See the +`Pattern matching` section for more information. + +Examples using ``${XML}`` structure from `Example`: +| Element Attribute Should Match | ${XML} | id | ? | xpath=first | +| Element Attribute Should Match | ${XML} | id | c*d | xpath=third/second | + + + + + +source +xpath=. +message=None + +Verifies that one or more element match the given ``xpath``. + +Arguments ``source`` and ``xpath`` have exactly the same semantics as +with `Get Elements` keyword. Keyword passes if the ``xpath`` matches +one or more elements in the ``source``. The default error message can +be overridden with the ``message`` argument. + +See also `Element Should Not Exist` as well as `Get Element Count` +that this keyword uses internally. + + + + + +source +xpath=. +message=None + +Verifies that no element match the given ``xpath``. + +Arguments ``source`` and ``xpath`` have exactly the same semantics as +with `Get Elements` keyword. Keyword fails if the ``xpath`` matches any +element in the ``source``. The default error message can be overridden +with the ``message`` argument. + +See also `Element Should Exist` as well as `Get Element Count` +that this keyword uses internally. + + + + + +source +name +xpath=. +message=None + +Verifies that the specified element does not have attribute ``name``. + +The element whose attribute is verified is specified using ``source`` +and ``xpath``. They have exactly the same semantics as with +`Get Element` keyword. + +The keyword fails if the specified element has attribute ``name``. The +default error message can be overridden with the ``message`` argument. + +Examples using ``${XML}`` structure from `Example`: +| Element Should Not Have Attribute | ${XML} | id | +| Element Should Not Have Attribute | ${XML} | xxx | xpath=first | + +See also `Get Element Attribute`, `Get Element Attributes`, +`Element Text Should Be` and `Element Text Should Match`. + + + + + +source +expected +xpath=. +normalize_whitespace=False +message=None + +Verifies that the text of the specified element is ``expected``. + +The element whose text is verified is specified using ``source`` and +``xpath``. They have exactly the same semantics as with `Get Element` +keyword. + +The text to verify is got from the specified element using the same +logic as with `Get Element Text`. This includes optional whitespace +normalization using the ``normalize_whitespace`` option. + +The keyword passes if the text of the element is equal to the +``expected`` value, and otherwise it fails. The default error message +can be overridden with the ``message`` argument. Use `Element Text +Should Match` to verify the text against a pattern instead of an exact +value. + +Examples using ``${XML}`` structure from `Example`: +| Element Text Should Be | ${XML} | text | xpath=first | +| Element Text Should Be | ${XML} | ${EMPTY} | xpath=second/child | +| ${paragraph} = | Get Element | ${XML} | xpath=html/p | +| Element Text Should Be | ${paragraph} | Text with bold and italics. | normalize_whitespace=yes | + + + + + +source +pattern +xpath=. +normalize_whitespace=False +message=None + +Verifies that the text of the specified element matches ``expected``. + +This keyword works exactly like `Element Text Should Be` except that +the expected value can be given as a pattern that the text of the +element must match. + +Pattern matching is similar as matching files in a shell with +``*``, ``?`` and ``[chars]`` acting as wildcards. See the +`Pattern matching` section for more information. + +Examples using ``${XML}`` structure from `Example`: +| Element Text Should Match | ${XML} | t??? | xpath=first | +| ${paragraph} = | Get Element | ${XML} | xpath=html/p | +| Element Text Should Match | ${paragraph} | Text with * and *. | normalize_whitespace=yes | + + + + + +source +xpath=. +encoding=None + +Returns the string representation of the specified element. + +The element to convert to a string is specified using ``source`` and +``xpath``. They have exactly the same semantics as with `Get Element` +keyword. + +By default the string is returned as Unicode. If ``encoding`` argument +is given any value, the string is returned as bytes in the specified +encoding. The resulting string never contains the XML declaration. + +See also `Log Element` and `Save XML`. + + + + + +source +expected +exclude_children=False +normalize_whitespace=False + +Verifies that the given ``source`` element is equal to ``expected``. + +Both ``source`` and ``expected`` can be given as a path to an XML file, +as a string containing XML, or as an already parsed XML element +structure. See `introduction` for more information about parsing XML in +general. + +The keyword passes if the ``source`` element and ``expected`` element +are equal. This includes testing the tag names, texts, and attributes +of the elements. By default also child elements are verified the same +way, but this can be disabled by setting ``exclude_children`` to a +true value (see `Boolean arguments`). + +All texts inside the given elements are verified, but possible text +outside them is not. By default texts must match exactly, but setting +``normalize_whitespace`` to a true value makes text verification +independent on newlines, tabs, and the amount of spaces. For more +details about handling text see `Get Element Text` keyword and +discussion about elements' `text` and `tail` attributes in the +`introduction`. + +Examples using ``${XML}`` structure from `Example`: +| ${first} = | Get Element | ${XML} | first | +| Elements Should Be Equal | ${first} | <first id="1">text</first> | +| ${p} = | Get Element | ${XML} | html/p | +| Elements Should Be Equal | ${p} | <p>Text with <b>bold</b> and <i>italics</i>.</p> | normalize_whitespace=yes | +| Elements Should Be Equal | ${p} | <p>Text with</p> | exclude | normalize | + +The last example may look a bit strange because the ``<p>`` element +only has text ``Text with``. The reason is that rest of the text +inside ``<p>`` actually belongs to the child elements. This includes +the ``.`` at the end that is the `tail` text of the ``<i>`` element. + +See also `Elements Should Match`. + + + + + +source +expected +exclude_children=False +normalize_whitespace=False + +Verifies that the given ``source`` element matches ``expected``. + +This keyword works exactly like `Elements Should Be Equal` except that +texts and attribute values in the expected value can be given as +patterns. + +Pattern matching is similar as matching files in a shell with +``*``, ``?`` and ``[chars]`` acting as wildcards. See the +`Pattern matching` section for more information. + +Examples using ``${XML}`` structure from `Example`: +| ${first} = | Get Element | ${XML} | first | +| Elements Should Match | ${first} | <first id="?">*</first> | + +See `Elements Should Be Equal` for more examples. + + + + + +source +expression +context=. + +Evaluates the given xpath expression and returns results. + +The element in which context the expression is executed is specified +using ``source`` and ``context`` arguments. They have exactly the same +semantics as ``source`` and ``xpath`` arguments have with `Get Element` +keyword. + +The xpath expression to evaluate is given as ``expression`` argument. +The result of the evaluation is returned as-is. + +Examples using ``${XML}`` structure from `Example`: +| ${count} = | Evaluate Xpath | ${XML} | count(third/*) | +| Should Be Equal | ${count} | ${3} | +| ${text} = | Evaluate Xpath | ${XML} | string(descendant::second[last()]/@id) | +| Should Be Equal | ${text} | child | +| ${bold} = | Evaluate Xpath | ${XML} | boolean(preceding-sibling::*[1] = 'bold') | context=html/p/i | +| Should Be Equal | ${bold} | ${True} | + +This keyword works only if lxml mode is taken into use when `importing` +the library. + + + + + +source +xpath=. + +Returns the child elements of the specified element as a list. + +The element whose children to return is specified using ``source`` and +``xpath``. They have exactly the same semantics as with `Get Element` +keyword. + +All the direct child elements of the specified element are returned. +If the element has no children, an empty list is returned. + +Examples using ``${XML}`` structure from `Example`: +| ${children} = | Get Child Elements | ${XML} | | +| Length Should Be | ${children} | 4 | | +| ${children} = | Get Child Elements | ${XML} | xpath=first | +| Should Be Empty | ${children} | | | + + + + + +source +xpath=. + +Returns an element in the ``source`` matching the ``xpath``. + +The ``source`` can be a path to an XML file, a string containing XML, or +an already parsed XML element. The ``xpath`` specifies which element to +find. See the `introduction` for more details about both the possible +sources and the supported xpath syntax. + +The keyword fails if more, or less, than one element matches the +``xpath``. Use `Get Elements` if you want all matching elements to be +returned. + +Examples using ``${XML}`` structure from `Example`: +| ${element} = | Get Element | ${XML} | second | +| ${child} = | Get Element | ${element} | child | + +`Parse XML` is recommended for parsing XML when the whole structure +is needed. It must be used if there is a need to configure how XML +namespaces are handled. + +Many other keywords use this keyword internally, and keywords modifying +XML are typically documented to both to modify the given source and +to return it. Modifying the source does not apply if the source is +given as a string. The XML structure parsed based on the string and +then modified is nevertheless returned. + + + + + +source +name +xpath=. +default=None + +Returns the named attribute of the specified element. + +The element whose attribute to return is specified using ``source`` and +``xpath``. They have exactly the same semantics as with `Get Element` +keyword. + +The value of the attribute ``name`` of the specified element is returned. +If the element does not have such element, the ``default`` value is +returned instead. + +Examples using ``${XML}`` structure from `Example`: +| ${attribute} = | Get Element Attribute | ${XML} | id | xpath=first | +| Should Be Equal | ${attribute} | 1 | | | +| ${attribute} = | Get Element Attribute | ${XML} | xx | xpath=first | default=value | +| Should Be Equal | ${attribute} | value | | | + +See also `Get Element Attributes`, `Element Attribute Should Be`, +`Element Attribute Should Match` and `Element Should Not Have Attribute`. + + + + + +source +xpath=. + +Returns all attributes of the specified element. + +The element whose attributes to return is specified using ``source`` and +``xpath``. They have exactly the same semantics as with `Get Element` +keyword. + +Attributes are returned as a Python dictionary. It is a copy of the +original attributes so modifying it has no effect on the XML structure. + +Examples using ``${XML}`` structure from `Example`: +| ${attributes} = | Get Element Attributes | ${XML} | first | +| Dictionary Should Contain Key | ${attributes} | id | | +| ${attributes} = | Get Element Attributes | ${XML} | third | +| Should Be Empty | ${attributes} | | | + +Use `Get Element Attribute` to get the value of a single attribute. + + + + + +source +xpath=. + +Returns and logs how many elements the given ``xpath`` matches. + +Arguments ``source`` and ``xpath`` have exactly the same semantics as +with `Get Elements` keyword that this keyword uses internally. + +See also `Element Should Exist` and `Element Should Not Exist`. + + + + + +source +xpath=. +normalize_whitespace=False + +Returns all text of the element, possibly whitespace normalized. + +The element whose text to return is specified using ``source`` and +``xpath``. They have exactly the same semantics as with `Get Element` +keyword. + +This keyword returns all the text of the specified element, including +all the text its children and grandchildren contain. If the element +has no text, an empty string is returned. The returned text is thus not +always the same as the `text` attribute of the element. + +By default all whitespace, including newlines and indentation, inside +the element is returned as-is. If ``normalize_whitespace`` is given +a true value (see `Boolean arguments`), then leading and trailing +whitespace is stripped, newlines and tabs converted to spaces, and +multiple spaces collapsed into one. This is especially useful when +dealing with HTML data. + +Examples using ``${XML}`` structure from `Example`: +| ${text} = | Get Element Text | ${XML} | first | +| Should Be Equal | ${text} | text | | +| ${text} = | Get Element Text | ${XML} | second/child | +| Should Be Empty | ${text} | | | +| ${paragraph} = | Get Element | ${XML} | html/p | +| ${text} = | Get Element Text | ${paragraph} | normalize_whitespace=yes | +| Should Be Equal | ${text} | Text with bold and italics. | + +See also `Get Elements Texts`, `Element Text Should Be` and +`Element Text Should Match`. + + + + + +source +xpath + +Returns a list of elements in the ``source`` matching the ``xpath``. + +The ``source`` can be a path to an XML file, a string containing XML, or +an already parsed XML element. The ``xpath`` specifies which element to +find. See the `introduction` for more details. + +Elements matching the ``xpath`` are returned as a list. If no elements +match, an empty list is returned. Use `Get Element` if you want to get +exactly one match. + +Examples using ``${XML}`` structure from `Example`: +| ${children} = | Get Elements | ${XML} | third/child | +| Length Should Be | ${children} | 2 | | +| ${children} = | Get Elements | ${XML} | first/child | +| Should Be Empty | ${children} | | | + + + + + +source +xpath +normalize_whitespace=False + +Returns text of all elements matching ``xpath`` as a list. + +The elements whose text to return is specified using ``source`` and +``xpath``. They have exactly the same semantics as with `Get Elements` +keyword. + +The text of the matched elements is returned using the same logic +as with `Get Element Text`. This includes optional whitespace +normalization using the ``normalize_whitespace`` option. + +Examples using ``${XML}`` structure from `Example`: +| @{texts} = | Get Elements Texts | ${XML} | third/child | +| Length Should Be | ${texts} | 2 | | +| Should Be Equal | @{texts}[0] | more text | | +| Should Be Equal | @{texts}[1] | ${EMPTY} | | + + + + + +source +level=INFO +xpath=. + +Logs the string representation of the specified element. + +The element specified with ``source`` and ``xpath`` is first converted +into a string using `Element To String` keyword internally. The +resulting string is then logged using the given ``level``. + +The logged string is also returned. + + + + + +source +keep_clark_notation=False +strip_namespaces=False + +Parses the given XML file or string into an element structure. + +The ``source`` can either be a path to an XML file or a string +containing XML. In both cases the XML is parsed into ElementTree +[http://docs.python.org/library/xml.etree.elementtree.html#element-objects|element structure] +and the root element is returned. Possible comments and processing +instructions in the source XML are removed. + +As discussed in `Handling XML namespaces` section, this keyword, by +default, removes namespace information ElementTree has added to tag +names and moves it into ``xmlns`` attributes. This typically eases +handling XML documents with namespaces considerably. If you do not +want that to happen, or want to avoid the small overhead of going +through the element structure when your XML does not have namespaces, +you can disable this feature by giving ``keep_clark_notation`` argument +a true value (see `Boolean arguments`). + +If you want to strip namespace information altogether so that it is +not included even if XML is saved, you can give a true value to +``strip_namespaces`` argument. This functionality is new in Robot +Framework 3.0.2. + +Examples: +| ${root} = | Parse XML | <root><child/></root> | +| ${xml} = | Parse XML | ${CURDIR}/test.xml | keep_clark_notation=True | +| ${xml} = | Parse XML | ${CURDIR}/test.xml | strip_namespaces=True | + +Use `Get Element` keyword if you want to get a certain element and not +the whole structure. See `Parsing XML` section for more details and +examples. + + + + + +source +xpath= +remove_tail=False + +Removes the element matching ``xpath`` from the ``source`` structure. + +The element to remove from the ``source`` is specified with ``xpath`` +using the same semantics as with `Get Element` keyword. The resulting +XML structure is returned, and if the ``source`` is an already parsed +XML structure, it is also modified in place. + +The keyword fails if ``xpath`` does not match exactly one element. +Use `Remove Elements` to remove all matched elements. + +Element's tail text is not removed by default, but that can be changed +by giving ``remove_tail`` a true value (see `Boolean arguments`). See +`Element attributes` section for more information about `tail` in +general. + +Examples using ``${XML}`` structure from `Example`: +| Remove Element | ${XML} | xpath=second | +| Element Should Not Exist | ${XML} | xpath=second | +| Remove Element | ${XML} | xpath=html/p/b | remove_tail=yes | +| Element Text Should Be | ${XML} | Text with italics. | xpath=html/p | normalize_whitespace=yes | + + + + + +source +name +xpath=. + +Removes attribute ``name`` from the specified element. + +The element whose attribute to remove is specified using ``source`` and +``xpath``. They have exactly the same semantics as with `Get Element` +keyword. The resulting XML structure is returned, and if the ``source`` +is an already parsed XML structure, it is also modified in place. + +It is not a failure to remove a non-existing attribute. Use `Remove +Element Attributes` to remove all attributes and `Set Element Attribute` +to set them. + +Examples using ``${XML}`` structure from `Example`: +| Remove Element Attribute | ${XML} | id | xpath=first | +| Element Should Not Have Attribute | ${XML} | id | xpath=first | + +Can only remove an attribute from a single element. Use `Remove Elements +Attribute` to remove an attribute of multiple elements in one call. + + + + + +source +xpath=. + +Removes all attributes from the specified element. + +The element whose attributes to remove is specified using ``source`` and +``xpath``. They have exactly the same semantics as with `Get Element` +keyword. The resulting XML structure is returned, and if the ``source`` +is an already parsed XML structure, it is also modified in place. + +Use `Remove Element Attribute` to remove a single attribute and +`Set Element Attribute` to set them. + +Examples using ``${XML}`` structure from `Example`: +| Remove Element Attributes | ${XML} | xpath=first | +| Element Should Not Have Attribute | ${XML} | id | xpath=first | + +Can only remove attributes from a single element. Use `Remove Elements +Attributes` to remove all attributes of multiple elements in one call. + + + + + +source +xpath= +remove_tail=False + +Removes all elements matching ``xpath`` from the ``source`` structure. + +The elements to remove from the ``source`` are specified with ``xpath`` +using the same semantics as with `Get Elements` keyword. The resulting +XML structure is returned, and if the ``source`` is an already parsed +XML structure, it is also modified in place. + +It is not a failure if ``xpath`` matches no elements. Use `Remove +Element` to remove exactly one element. + +Element's tail text is not removed by default, but that can be changed +by using ``remove_tail`` argument similarly as with `Remove Element`. + +Examples using ``${XML}`` structure from `Example`: +| Remove Elements | ${XML} | xpath=*/child | +| Element Should Not Exist | ${XML} | xpath=second/child | +| Element Should Not Exist | ${XML} | xpath=third/child | + + + + + +source +name +xpath=. + +Removes attribute ``name`` from the specified elements. + +Like `Remove Element Attribute` but removes the attribute of all +elements matching the given ``xpath``. + + + + + +source +xpath=. + +Removes all attributes from the specified elements. + +Like `Remove Element Attributes` but removes all attributes of all +elements matching the given ``xpath``. + + + + + +source +path +encoding=UTF-8 + +Saves the given element to the specified file. + +The element to save is specified with ``source`` using the same +semantics as with `Get Element` keyword. + +The file where the element is saved is denoted with ``path`` and the +encoding to use with ``encoding``. The resulting file always contains +the XML declaration. + +The resulting XML file may not be exactly the same as the original: +- Comments and processing instructions are always stripped. +- Possible doctype and namespace prefixes are only preserved when + `using lxml`. +- Other small differences are possible depending on the ElementTree + or lxml version. + +Use `Element To String` if you just need a string representation of +the element. + + + + + +source +name +value +xpath=. + +Sets attribute ``name`` of the specified element to ``value``. + +The element whose attribute to set is specified using ``source`` and +``xpath``. They have exactly the same semantics as with `Get Element` +keyword. The resulting XML structure is returned, and if the ``source`` +is an already parsed XML structure, it is also modified in place. + +It is possible to both set new attributes and to overwrite existing. +Use `Remove Element Attribute` or `Remove Element Attributes` for +removing them. + +Examples using ``${XML}`` structure from `Example`: +| Set Element Attribute | ${XML} | attr | value | +| Element Attribute Should Be | ${XML} | attr | value | +| Set Element Attribute | ${XML} | id | new | xpath=first | +| Element Attribute Should Be | ${XML} | id | new | xpath=first | + +Can only set an attribute of a single element. Use `Set Elements +Attribute` to set an attribute of multiple elements in one call. + + + + + +source +tag +xpath=. + +Sets the tag of the specified element. + +The element whose tag to set is specified using ``source`` and +``xpath``. They have exactly the same semantics as with `Get Element` +keyword. The resulting XML structure is returned, and if the ``source`` +is an already parsed XML structure, it is also modified in place. + +Examples using ``${XML}`` structure from `Example`: +| Set Element Tag | ${XML} | newTag | +| Should Be Equal | ${XML.tag} | newTag | +| Set Element Tag | ${XML} | xxx | xpath=second/child | +| Element Should Exist | ${XML} | second/xxx | +| Element Should Not Exist | ${XML} | second/child | + +Can only set the tag of a single element. Use `Set Elements Tag` to set +the tag of multiple elements in one call. + + + + + +source +text=None +tail=None +xpath=. + +Sets text and/or tail text of the specified element. + +The element whose text to set is specified using ``source`` and +``xpath``. They have exactly the same semantics as with `Get Element` +keyword. The resulting XML structure is returned, and if the ``source`` +is an already parsed XML structure, it is also modified in place. + +Element's text and tail text are changed only if new ``text`` and/or +``tail`` values are given. See `Element attributes` section for more +information about `text` and `tail` in general. + +Examples using ``${XML}`` structure from `Example`: +| Set Element Text | ${XML} | new text | xpath=first | +| Element Text Should Be | ${XML} | new text | xpath=first | +| Set Element Text | ${XML} | tail=& | xpath=html/p/b | +| Element Text Should Be | ${XML} | Text with bold&italics. | xpath=html/p | normalize_whitespace=yes | +| Set Element Text | ${XML} | slanted | !! | xpath=html/p/i | +| Element Text Should Be | ${XML} | Text with bold&slanted!! | xpath=html/p | normalize_whitespace=yes | + +Can only set the text/tail of a single element. Use `Set Elements Text` +to set the text/tail of multiple elements in one call. + + + + + +source +name +value +xpath=. + +Sets attribute ``name`` of the specified elements to ``value``. + +Like `Set Element Attribute` but sets the attribute of all elements +matching the given ``xpath``. + + + + + +source +tag +xpath=. + +Sets the tag of the specified elements. + +Like `Set Element Tag` but sets the tag of all elements matching +the given ``xpath``. + + + + + +source +text=None +tail=None +xpath=. + +Sets text and/or tail text of the specified elements. + +Like `Set Element Text` but sets the text or tail of all elements +matching the given ``xpath``. + + + +