diff options
Diffstat (limited to 'test/csit/tests')
29 files changed, 667 insertions, 199 deletions
diff --git a/test/csit/tests/aaf/aaf-sms-suite/aaf-sms-test.robot b/test/csit/tests/aaf/aaf-sms-suite/aaf-sms-test.robot index 93084a009..78e352229 100644 --- a/test/csit/tests/aaf/aaf-sms-suite/aaf-sms-test.robot +++ b/test/csit/tests/aaf/aaf-sms-suite/aaf-sms-test.robot @@ -7,7 +7,7 @@ Library json ${MESSAGE} {"ping": "ok"} #global variables -${generatedDomId} + *** Test Cases *** SMS Check SMS API Docker Container @@ -38,9 +38,6 @@ SMS CreateDomain Log To Console ********************* Log To Console response = ${resp} Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedDomId}= Convert To String ${response_json['uuid']} - Set Global Variable ${generatedDomId} Should Be Equal As Integers ${resp.status_code} 201 SMS CreateSecret @@ -48,7 +45,7 @@ SMS CreateSecret Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} ${data} Get Binary File ${CURDIR}${/}data${/}create_secret.json &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Post Request SMS /v1/sms/domain/${generatedDomId}/secret data=${data} headers=${headers} + ${resp}= Post Request SMS /v1/sms/domain/curltestdomain/secret data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} Log To Console body = ${resp.text} @@ -58,7 +55,7 @@ SMS ListSecret [Documentation] Lists all Secret Names within Domain Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Get Request SMS /v1/sms/domain/${generatedDomId}/secret headers=${headers} + ${resp}= Get Request SMS /v1/sms/domain/curltestdomain/secret headers=${headers} Log To Console ********************* Log To Console response = ${resp} Log To Console body = ${resp.text} @@ -68,7 +65,7 @@ SMS GetSecret [Documentation] Gets a single Secret with Values from Domain Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Get Request SMS /v1/sms/domain/${generatedDomId}/secret/curltestsecret1 headers=${headers} + ${resp}= Get Request SMS /v1/sms/domain/curltestdomain/secret/curltestsecret1 headers=${headers} Log To Console ********************* Log To Console response = ${resp} Log To Console body = ${resp.text} @@ -78,7 +75,7 @@ SMS DeleteSecret [Documentation] Deletes a Secret referenced by Name from Domain Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Delete Request SMS /v1/sms/domain/${generatedDomId}/secret/curltestsecret1 headers=${headers} + ${resp}= Delete Request SMS /v1/sms/domain/curltestdomain/secret/curltestsecret1 headers=${headers} Log To Console ********************* Log To Console response = ${resp} Log To Console body = ${resp.text} @@ -88,7 +85,7 @@ SMS DeleteDomain [Documentation] Deletes a Domain referenced by Name Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Delete Request SMS /v1/sms/domain/${generatedDomId} headers=${headers} + ${resp}= Delete Request SMS /v1/sms/domain/curltestdomain headers=${headers} Log To Console ********************* Log To Console response = ${resp} Log To Console body = ${resp.text} diff --git a/test/csit/tests/appc/cdt/cdt.robot b/test/csit/tests/appc/cdt/cdt.robot index 03ba3a4f9..b33bfe778 100644 --- a/test/csit/tests/appc/cdt/cdt.robot +++ b/test/csit/tests/appc/cdt/cdt.robot @@ -43,11 +43,14 @@ | | Click Link | MY VNFs # Verify button element is ready before clicking it. | | Wait Until Page Contains Element | xpath=(//*[@class='mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary']) | ${LONGTIME} -| | Click Button | Create New VNF Type or VNFC Type -| | Page Should Contain | Enter VNF type and VNFC to proceed +#| | Click Button | Create New VNF Type or VNFC Type +| | Click Button | Create New VNF Type +#| | Page Should Contain | Enter VNF type and VNFC to proceed +| | Page Should Contain | Enter VNF Type | | Page Should Contain Element | id=vnfType # Proceed without entering any new information -| | Click Button | Proceed anyway +#| | Click Button | Proceed anyway +| | Click Button | Proceed To Upload | | Page Should Contain Element | id=cmbAction | | Click Button | Upload Reference File | | Choose File | id=inputFile | ${CURDIR}/data/reference_AllAction_HealthCheckAnsible_0.0.1V.json @@ -66,8 +69,10 @@ | | Click Link | MY VNFs # Verify button element is ready before clicking it. | | Wait Until Page Contains Element | xpath=(//*[@class='mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary']) | ${LONGTIME} -| | Click Button | Create New VNF Type or VNFC Type -| | Page Should Contain | Enter VNF type and VNFC to proceed +#| | Click Button | Create New VNF Type or VNFC Type +| | Click Button | Create New VNF Type +#| | Page Should Contain | Enter VNF type and VNFC to proceed +| | Page Should Contain | Enter VNF Type | | Page Should Contain Element | id=vnfType # Create a date to use in VNF Type to make it unique | | ${THEDATE} | Get Current Date | result_format=%m%d%H%M%S | exclude_millis=True @@ -93,7 +98,8 @@ | | Click Link | MY VNFs # Verify button element is ready before clicking it. | | Wait Until Page Contains Element | xpath=(//*[@class='mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary']) | ${LONGTIME} -| | Click Button | Create New VNF Type or VNFC Type +#| | Click Button | Create New VNF Type or VNFC Type +| | Click Button | Create New VNF Type | | Wait Until Page Contains Element | id=vnfType | ${LONGTIME} # Create a date to use in VNF Type to make it unique | | ${THEDATE} | Get Current Date | result_format=%m%d%H%M%S | exclude_millis=True @@ -142,14 +148,15 @@ | | Click Link | MY VNFs # Verify button element is ready before clicking it. | | Wait Until Page Contains Element | xpath=(//*[@class='mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary']) | ${LONGTIME} -| | Click Button | Create New VNF Type or VNFC Type +#| | Click Button | Create New VNF Type or VNFC Type +| | Click Button | Create New VNF Type | | Wait Until Page Contains Element | id=vnfType | ${LONGTIME} # Create a date to use in VNF Type to make it unique | | ${THEDATE} | Get Current Date | result_format=%m%d%H%M%S | exclude_millis=True | | Input Text | id=vnfType | csit${THEDATE} # Check the box indicating VNFC templates | | Select Checkbox | id=vnfcRequired -| | Input Text | id=vnfcType | csitVNFC +#| | Input Text | id=vnfcType | csitVNFC | | Click Button | Next | | Wait Until Page Contains Element | id=cmbAction | ${LONGTIME} # Populate the action and protocol diff --git a/test/csit/tests/appc/cdt/data/pd_Configure_vUSP - Revenue Assurance_0.0.1V.yaml b/test/csit/tests/appc/cdt/data/pd_Configure_vUSP - Revenue Assurance_0.0.1V.yaml index cea00f0f9..ced4a7c58 100755 --- a/test/csit/tests/appc/cdt/data/pd_Configure_vUSP - Revenue Assurance_0.0.1V.yaml +++ b/test/csit/tests/appc/cdt/data/pd_Configure_vUSP - Revenue Assurance_0.0.1V.yaml @@ -4,7 +4,7 @@ version: V1 vnf-parameter-list: - name: vnf_name type: null - description: dawnDescript + description: CSIT required: null default: null source: Manual diff --git a/test/csit/tests/appc/cdt/data/reference_AllAction_HealthCheckAnsible_0.0.1V.json b/test/csit/tests/appc/cdt/data/reference_AllAction_HealthCheckAnsible_0.0.1V.json index 90fd0acd5..416780615 100755 --- a/test/csit/tests/appc/cdt/data/reference_AllAction_HealthCheckAnsible_0.0.1V.json +++ b/test/csit/tests/appc/cdt/data/reference_AllAction_HealthCheckAnsible_0.0.1V.json @@ -5,7 +5,7 @@ "action-level": "vnf", "scope": { "vnf-type": "csit", - "vnfc-type-list": [], + "vnfc-type-list": ["testvnftype"], "vnfc-type": "" }, "template": "Y", @@ -15,15 +15,15 @@ "port-number": "", "artifact-list": [ { - "artifact-name": "template_HealthCheck_dawnMay17_0.0.1V.json", + "artifact-name": "template_HealthCheck_csit_0.0.1V.json", "artifact-type": "config_template" }, { - "artifact-name": "pd_HealthCheck_dawnMay17_0.0.1V.yaml", + "artifact-name": "pd_HealthCheck_csit_0.0.1V.yaml", "artifact-type": "parameter_definitions" }, { - "artifact-name": "param_HealthCheck_dawnMay17_0.0.1V.json", + "artifact-name": "param_HealthCheck_csit_0.0.1V.json", "artifact-type": "param_values" } ], @@ -34,12 +34,12 @@ "action-level": "vnf", "scope": { "vnf-type": "csit", - "vnfc-type-list": [], + "vnfc-type-list": ["testvnftype"], "vnfc-type": "" }, "artifact-list": [ { - "artifact-name": "reference_AllAction_dawnMay17_0.0.1V.json", + "artifact-name": "reference_AllAction_csit_0.0.1V.json", "artifact-type": "reference_template" } ] diff --git a/test/csit/tests/appc/cdt/data/reference_AllAction_vUSP - Revenue Assurance_0.0.1V.json b/test/csit/tests/appc/cdt/data/reference_AllAction_vUSP - Revenue Assurance_0.0.1V.json index f78debef4..a575129f0 100755 --- a/test/csit/tests/appc/cdt/data/reference_AllAction_vUSP - Revenue Assurance_0.0.1V.json +++ b/test/csit/tests/appc/cdt/data/reference_AllAction_vUSP - Revenue Assurance_0.0.1V.json @@ -5,6 +5,7 @@ "action-level": "vnf", "scope": { "vnf-type": "vUSP - Revenue Assurance", + "vnf-type-list": "testvnftype", "vnfc-type": "" }, "template": "Y", @@ -61,7 +62,7 @@ "scope": { "vnf-type": "vUSP - Revenue Assurance", "vnfc-type": "", - "vnfc-type-list": [] + "vnfc-type-list": ["testvnftype"] }, "template": "Y", "vm": [], @@ -86,7 +87,7 @@ "scope": { "vnf-type": "vUSP - Revenue Assurance", "vnfc-type": "", - "vnfc-type-list": [] + "vnfc-type-list": ["testvnftype"] }, "template": "Y", "vm": [], @@ -111,7 +112,7 @@ "scope": { "vnf-type": "vUSP - Revenue Assurance", "vnfc-type": "", - "vnfc-type-list": [] + "vnfc-type-list": ["testvnftype"] }, "artifact-list": [ { @@ -121,4 +122,4 @@ ] } ] -}
\ No newline at end of file +} diff --git a/test/csit/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot b/test/csit/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot index cfba50b8d..1cea75e90 100644 --- a/test/csit/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot +++ b/test/csit/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot @@ -14,8 +14,8 @@ ${var} APPC LCM API HEALTHCHECK [Documentation] APPC LCM API HEALTHCHECK Start Virtual Display 1920 1080 - Open Browser http://admin:admin@localhost:8282/apidoc/explorer/index.html chrome - Maximize Browser Window + Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome +# Maximize Browser Window # Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img Reload Page diff --git a/test/csit/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot b/test/csit/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot index 98a8e584c..7968d5526 100644 --- a/test/csit/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot +++ b/test/csit/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot @@ -13,8 +13,8 @@ ${var} APPC LCM API VM RESTART [Documentation] APPC LCM API VM RESTART Start Virtual Display 1920 1080 - Open Browser http://admin:admin@localhost:8282/apidoc/explorer/index.html chrome - Maximize Browser Window + Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome +# Maximize Browser Window # Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img Reload Page diff --git a/test/csit/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot b/test/csit/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot index 0f550d343..93c72d725 100644 --- a/test/csit/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot +++ b/test/csit/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot @@ -16,8 +16,8 @@ ${var} APPC LCM API VNF RESTART [Documentation] APPC LCM API VNF RESTART Start Virtual Display 1920 1080 - Open Browser http://admin:admin@localhost:8282/apidoc/explorer/index.html chrome - Maximize Browser Window + Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome +# Maximize Browser Window # Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img Reload Page diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json index 75d938766..9aca4015c 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -15,7 +15,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "VALID", "messagesAmount": 5000 diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json index fb53f50ec..642c7d564 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -15,7 +15,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "FIXED_PAYLOAD", "messagesAmount": 25000 diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json index fb53f50ec..642c7d564 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -15,7 +15,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "FIXED_PAYLOAD", "messagesAmount": 25000 diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json index 772b03bef..f38e9aa07 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -15,7 +15,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "VALID", "messagesAmount": 50000 diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json index d9cb4c2ec..22d48c5f5 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -15,7 +15,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "VALID", "messagesAmount": 25000 @@ -23,7 +24,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -36,7 +37,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "INVALID_GPB_DATA", "messagesAmount": 100 @@ -44,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -57,7 +59,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "VALID", "messagesAmount": 25000 diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json index 772b03bef..f38e9aa07 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -15,7 +15,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "VALID", "messagesAmount": 50000 diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json index 88d4e325d..a7d221905 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -15,7 +15,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "VALID", "messagesAmount": 25000 @@ -23,7 +24,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -36,7 +37,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "INVALID_WIRE_FRAME", "messagesAmount": 100 @@ -44,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -57,7 +59,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "VALID", "messagesAmount": 25000 diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json index 9d34a7e24..89f3e0672 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -15,7 +15,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "FIXED_PAYLOAD", "messagesAmount": 15000 diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json index 625737e56..60c81a898 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -15,7 +15,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "FIXED_PAYLOAD", "messagesAmount": 5000 diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json index b1c727a0c..54836bf38 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -15,7 +15,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "VALID", "messagesAmount": 25000 @@ -23,7 +24,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -36,7 +37,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "TOO_BIG_PAYLOAD", "messagesAmount": 100 @@ -44,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -57,7 +59,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "VALID", "messagesAmount": 25000 diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json index 772b03bef..f38e9aa07 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -15,7 +15,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "VALID", "messagesAmount": 50000 diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json index e37e20d19..b3aada5bd 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -15,7 +15,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "VALID", "messagesAmount": 25000 @@ -36,7 +37,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "VALID", "messagesAmount": 100 @@ -44,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVRANMEAS", + "domain": "HVMEAS", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -57,7 +59,8 @@ "reportingEntityId": "sample-reporting-entity-id", "reportingEntityName": "sample-reporting-entity-name", "sourceId": "sample-source-id", - "sourceName": "sample-source-name" + "sourceName": "sample-source-name", + "vesEventListenerVersion": "another-version" }, "messageType": "VALID", "messagesAmount": 25000 diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json index 88a70b0db..b9e1a4b59 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json @@ -2,7 +2,7 @@ "dmaap.kafkaBootstrapServers": "kafka:9092", "collector.routing": [ { - "fromDomain": 11, + "fromDomain": "HVMEAS", "toTopic": "test-hv-ran-meas" } ] diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py b/test/csit/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py index 7c52f5430..6a95c71e5 100644 --- a/test/csit/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py +++ b/test/csit/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py @@ -23,16 +23,16 @@ class PrhLibrary(object): json_to_python = json.loads(json_file) ipv4 = json_to_python["event"]["pnfRegistrationFields"]["oamV4IpAddress"] ipv6 = json_to_python["event"]["pnfRegistrationFields"]["oamV6IpAddress"] - header = json_to_python["event"]["commonEventHeader"]["sourceName"] - str_json = '{"sourceName":"' + header + '","ipaddress-v4-oam":"' + ipv4 + '","ipaddress-v6-oam":"' + ipv6 + '"}' + correlationId = json_to_python["event"]["commonEventHeader"]["sourceName"] + str_json = '{"correlationId":"' + correlationId + '","ipaddress-v4-oam":"' + ipv4 + '","ipaddress-v6-oam":"' + ipv6 + '"}' python_to_json = json.dumps(str_json) return python_to_json.replace("\\", "")[1:-1] @staticmethod def create_pnf_name(json_file): json_to_python = json.loads(json_file) - header = json_to_python["event"]["commonEventHeader"]["sourceName"] - return header + correlationId = json_to_python["event"]["commonEventHeader"]["sourceName"] + return correlationId @staticmethod def stop_aai(): diff --git a/test/csit/tests/optf-has/has/data/plan_with_hpa.json b/test/csit/tests/optf-has/has/data/plan_with_hpa.json index bf314a9cb..21985776b 100644 --- a/test/csit/tests/optf-has/has/data/plan_with_hpa.json +++ b/test/csit/tests/optf-has/has/data/plan_with_hpa.json @@ -1,8 +1,8 @@ -{ +{ "name":"vCPE-with-HPA", - "template":{ + "template":{ "homing_template_version":"2017-10-10", - "parameters":{ + "parameters":{ "service_name":"Residential vCPE", "service_id":"vcpe_service_id", "customer_lat":45.395968, @@ -11,58 +11,71 @@ "REQUIRED_DISK":100, "pnf_id":"some_pnf_id" }, - "locations":{ - "customer_loc":{ - "latitude":{ + "locations":{ + "customer_loc":{ + "latitude":{ "get_param":"customer_lat" }, - "longitude":{ + "longitude":{ "get_param":"customer_long" } } }, "demands":{ - "vG":[ - { + "vG":[ + { "inventory_provider":"aai", "inventory_type":"cloud" } ] }, "constraints":{ - "constraint_vg_customer":{ + "constraint_vg_customer":{ "type":"distance_to_location", - "demands":[ + "demands":[ "vG" ], - "properties":{ + "properties":{ "distance":"< 100 km", "location":"customer_loc" } }, - "hpa_constraint":{ + "hpa_constraint":{ "type":"hpa", - "demands":[ + "demands":[ "vG" ], - "properties":{ - "evaluate":[ - { - "flavorLabel":"flavor_label_1", - "flavorProperties":[ - { + "properties":{ + "evaluate":[ + { + "id":"vg_1", + "type":"vnfc", + "directives":[ + { + "type": "flavor_directives", + "attributes":[ + { + "attribute_name":"flavor_label_1", + "attribute_value":"" + } + ] + } + ], + "flavorProperties":[ + { "hpa-feature":"basicCapabilities", "hpa-version":"v1", "architecture":"generic", "mandatory": "False", "score": "5", - "hpa-feature-attributes":[ - { + "directives": [], + "hpa-feature-attributes":[ + { "hpa-attribute-key":"numVirtualCpu", "hpa-attribute-value":"4", "operator":">=" }, - { + { "hpa-attribute-key":"virtualMemSize", "hpa-attribute-value":"4", "operator":">=", @@ -70,35 +83,36 @@ } ] }, - { + { "hpa-feature":"numa", "hpa-version":"v1", "architecture":"generic", "mandatory": "False", "score": "5", - "hpa-feature-attributes":[ - { + "directives": [], + "hpa-feature-attributes":[ + { "hpa-attribute-key":"numaNodes", "hpa-attribute-value":"2", "operator":"=" }, - { + { "hpa-attribute-key":"numaCpu-0", "hpa-attribute-value":"2", "operator":"=" }, - { + { "hpa-attribute-key":"numaCpu-1", "hpa-attribute-value":"4", "operator":"=" }, - { + { "hpa-attribute-key":"numaMem-0", "hpa-attribute-value":"2", "operator":"=", "unit":"GB" }, - { + { "hpa-attribute-key":"numaMem-1", "hpa-attribute-value":"4", "operator":"=", @@ -106,19 +120,20 @@ } ] }, - { + { "hpa-feature":"cpuPinning", "hpa-version":"v1", "architecture":"generic", "mandatory": "False", "score": "5", - "hpa-feature-attributes":[ - { + "directives": [], + "hpa-feature-attributes":[ + { "hpa-attribute-key":"logicalCpuThreadPinningPolicy", "hpa-attribute-value":"prefer", "operator":"=" }, - { + { "hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value":"dedicated", "operator":"=" @@ -127,22 +142,35 @@ } ] }, - { - "flavorLabel":"flavor_label_2", - "flavorProperties":[ - { + { + "id":"vg_2", + "type":"vnfc", + "directives":[ + { + "type":"flavor_directives", + "attributes":[ + { + "attribute_name":"flavor_label_2", + "attribute_value":"" + } + ] + } + ], + "flavorProperties":[ + { "hpa-feature":"basicCapabilities", "hpa-version":"v1", "architecture":"generic", "mandatory": "False", "score": "5", - "hpa-feature-attributes":[ - { + "directives":[], + "hpa-feature-attributes":[ + { "hpa-attribute-key":"numVirtualCpu", "hpa-attribute-value":"8", "operator":">=" }, - { + { "hpa-attribute-key":"virtualMemSize", "hpa-attribute-value":"16", "operator":">=", @@ -150,35 +178,36 @@ } ] }, - { + { "hpa-feature":"numa", "hpa-version":"v1", "architecture":"generic", "mandatory": "False", "score": "5", - "hpa-feature-attributes":[ - { + "directives":[], + "hpa-feature-attributes":[ + { "hpa-attribute-key":"numaNodes", "hpa-attribute-value":"2", "operator":"=" }, - { + { "hpa-attribute-key":"numaCpu-0", "hpa-attribute-value":"2", "operator":"=" }, - { + { "hpa-attribute-key":"numaCpu-1", "hpa-attribute-value":"4", "operator":"=" }, - { + { "hpa-attribute-key":"numaMem-0", "hpa-attribute-value":"2", "operator":"=", "unit":"GB" }, - { + { "hpa-attribute-key":"numaMem-1", "hpa-attribute-value":"4", "operator":"=", @@ -186,14 +215,15 @@ } ] }, - { + { "hpa-feature":"ovsDpdk", "hpa-version":"v1", "architecture":"generic", "mandatory": "False", "score": "5", - "hpa-feature-attributes":[ - { + "directives":[], + "hpa-feature-attributes":[ + { "hpa-attribute-key":"dataProcessingAccelerationLibrary", "hpa-attribute-value":"v18.02", "operator":"=" @@ -206,17 +236,17 @@ } } }, - "optimization":{ - "minimize":{ - "sum":[ - { - "distance_between":[ + "optimization":{ + "minimize":{ + "sum":[ + { + "distance_between":[ "customer_loc", "vG" ] }, - { - "distance_between":[ + { + "distance_between":[ "customer_loc", "vG" ] diff --git a/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json b/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json index 80685ae8e..bb613abd8 100644 --- a/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json +++ b/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json @@ -48,13 +48,26 @@ "properties":{ "evaluate":[ { - "flavorLabel":"flavor_label_1", + "id":"vg_1", + "type":"vnfc", + "directives":[ + { + "type":"flavor_directives", + "attributes":[ + { + "attribute_name":"flavor_label_1", + "attribute_value":"" + } + ] + } + ], "flavorProperties":[ { "hpa-feature":"basicCapabilities", "hpa-version":"v1", "architecture":"generic", "mandatory": "True", + "directives":[], "hpa-feature-attributes":[ { "hpa-attribute-key":"numVirtualCpu", @@ -74,6 +87,7 @@ "hpa-version":"v1", "architecture":"generic", "mandatory":"True", + "directives":[], "hpa-feature-attributes":[ { "hpa-attribute-key":"numaNodes", @@ -107,13 +121,26 @@ ] }, { - "flavorLabel":"flavor_label_2", + "id":"vg_2", + "type":"vnfc", + "directives":[ + { + "type":"flavor_directives", + "attributes":[ + { + "attribute_name":"flavor_label_2", + "attribute_value":"" + } + ] + } + ], "flavorProperties":[ { "hpa-feature":"basicCapabilities", "hpa-version":"v1", "architecture":"generic", "mandatory": "True", + "directives":[], "hpa-feature-attributes":[ { "hpa-attribute-key":"numVirtualCpu", @@ -133,6 +160,7 @@ "hpa-version":"v1", "architecture":"generic", "mandatory": "True", + "directives":[], "hpa-feature-attributes":[ { "hpa-attribute-key":"dataProcessingAccelerationLibrary", diff --git a/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json b/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json index 4672349d2..50c23ee8a 100644 --- a/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json +++ b/test/csit/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json @@ -1,8 +1,8 @@ -{ +{ "name":"vCPE-HPA-Requirement-Optional", - "template":{ + "template":{ "homing_template_version":"2017-10-10", - "parameters":{ + "parameters":{ "service_name":"Residential vCPE", "service_id":"vcpe_service_id", "customer_lat":45.395968, @@ -11,57 +11,70 @@ "REQUIRED_DISK":100, "pnf_id":"some_pnf_id" }, - "locations":{ - "customer_loc":{ - "latitude":{ + "locations":{ + "customer_loc":{ + "latitude":{ "get_param":"customer_lat" }, - "longitude":{ + "longitude":{ "get_param":"customer_long" } } }, - "demands":{ - "vG":[ - { + "demands":{ + "vG":[ + { "inventory_provider":"aai", "inventory_type":"cloud" } ] }, - "constraints":{ - "constraint_vg_customer":{ + "constraints":{ + "constraint_vg_customer":{ "type":"distance_to_location", - "demands":[ + "demands":[ "vG" ], - "properties":{ + "properties":{ "distance":"< 100 km", "location":"customer_loc" } }, - "hpa_constraint":{ + "hpa_constraint":{ "type":"hpa", - "demands":[ + "demands":[ "vG" ], - "properties":{ - "evaluate":[ - { - "flavorLabel":"flavor_label_1", - "flavorProperties":[ - { + "properties":{ + "evaluate":[ + { + "id":"vg_1", + "type":"vnfc", + "directives":[ + { + "type":"flavor_directives", + "attributes":[ + { + "attribute_name":"flavor_label_1", + "attribute_value":"" + } + ] + } + ], + "flavorProperties":[ + { "hpa-feature":"basicCapabilities", "hpa-version":"v1", "architecture":"generic", "mandatory": "True", - "hpa-feature-attributes":[ - { + "directives":[], + "hpa-feature-attributes":[ + { "hpa-attribute-key":"numVirtualCpu", "hpa-attribute-value":"4", "operator":">=" }, - { + { "hpa-attribute-key":"virtualMemSize", "hpa-attribute-value":"8", "operator":">=", @@ -69,13 +82,14 @@ } ] }, - { + { "hpa-feature":"instructionSetExtensions", "hpa-version":"v1", "architecture":"Intel64", "mandatory": "True", - "hpa-feature-attributes":[ - { + "directives":[], + "hpa-feature-attributes":[ + { "hpa-attribute-key":"instructionSetExtensions", "hpa-attribute-value":["aes", "sse", "avx", "smt"], "operator":"ALL", @@ -83,35 +97,36 @@ } ] }, - { + { "hpa-feature":"numa", "hpa-version":"v1", "architecture":"generic", "mandatory":"False", "score":"3", - "hpa-feature-attributes":[ - { + "directives":[], + "hpa-feature-attributes":[ + { "hpa-attribute-key":"numaNodes", "hpa-attribute-value":"2", "operator":"=" }, - { + { "hpa-attribute-key":"numaCpu-0", "hpa-attribute-value":"2", "operator":"=" }, - { + { "hpa-attribute-key":"numaCpu-1", "hpa-attribute-value":"4", "operator":"=" }, - { + { "hpa-attribute-key":"numaMem-0", "hpa-attribute-value":"2", "operator":"=", "unit":"GB" }, - { + { "hpa-attribute-key":"numaMem-1", "hpa-attribute-value":"4", "operator":"=", @@ -121,21 +136,34 @@ } ] }, - { - "flavorLabel":"flavor_label_2", - "flavorProperties":[ - { + { + "id":"vg_2", + "type":"vnfc", + "directives":[ + { + "type":"flavor_directives", + "attributes":[ + { + "attribute_name":"flavor_label_2", + "attribute_value":"" + } + ] + } + ], + "flavorProperties":[ + { "hpa-feature":"basicCapabilities", "hpa-version":"v1", "architecture":"generic", "mandatory": "True", - "hpa-feature-attributes":[ - { + "directives":[], + "hpa-feature-attributes":[ + { "hpa-attribute-key":"numVirtualCpu", "hpa-attribute-value":"4", "operator":">=" }, - { + { "hpa-attribute-key":"virtualMemSize", "hpa-attribute-value":"8", "operator":">=", @@ -143,49 +171,51 @@ } ] }, - { + { "hpa-feature":"ovsDpdk", "hpa-version":"v1", "architecture":"generic", "mandatory": "False", "score":"5", - "hpa-feature-attributes":[ - { + "directives":[], + "hpa-feature-attributes":[ + { "hpa-attribute-key":"dataProcessingAccelerationLibrary", "hpa-attribute-value":"v18.02", "operator":"=" } ] }, - { + { "hpa-feature":"numa", "hpa-version":"v1", "architecture":"generic", "mandatory":"False", "score":"3", - "hpa-feature-attributes":[ - { + "directives":[], + "hpa-feature-attributes":[ + { "hpa-attribute-key":"numaNodes", "hpa-attribute-value":"2", "operator":"=" }, - { + { "hpa-attribute-key":"numaCpu-0", "hpa-attribute-value":"2", "operator":"=" }, - { + { "hpa-attribute-key":"numaCpu-1", "hpa-attribute-value":"4", "operator":"=" }, - { + { "hpa-attribute-key":"numaMem-0", "hpa-attribute-value":"2", "operator":"=", "unit":"GB" }, - { + { "hpa-attribute-key":"numaMem-1", "hpa-attribute-value":"4", "operator":"=", @@ -199,11 +229,11 @@ } } }, - "optimization":{ - "minimize":{ - "sum":[ - { - "distance_between":[ + "optimization":{ + "minimize":{ + "sum":[ + { + "distance_between":[ "customer_loc", "vG" ] diff --git a/test/csit/tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json b/test/csit/tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json new file mode 100644 index 000000000..4a6d3bc8d --- /dev/null +++ b/test/csit/tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json @@ -0,0 +1,267 @@ +{ + "name": "vCPE-HPA-Requirement-Optional", + "template": { + "homing_template_version": "2017-10-10", + "parameters": { + "service_name": "Residential vCPE", + "service_id": "vcpe_service_id", + "customer_lat": 45.395968, + "customer_long": -71.135344, + "REQUIRED_MEM": 4, + "REQUIRED_DISK": 100, + "pnf_id": "some_pnf_id" + }, + "locations": { + "customer_loc": { + "latitude": { + "get_param": "customer_lat" + }, + "longitude": { + "get_param": "customer_long" + } + } + }, + "demands": { + "vG": [ + { + "inventory_provider": "aai", + "inventory_type": "cloud" + } + ] + }, + "constraints": { + "constraint_vg_customer": { + "type": "distance_to_location", + "demands": [ + "vG" + ], + "properties": { + "distance": "< 100 km", + "location": "customer_loc" + } + }, + "hpa_constraint": { + "type": "hpa", + "demands": [ + "vG" + ], + "properties": { + "evaluate": [ + { + "id":"vg_1", + "type":"vnfc", + "directives":[ + { + "type":"flavor_directives", + "attributes":[ + { + "attribute_name":"flavor_label_1", + "attribute_value":"" + } + ] + } + ], + "flavorProperties": [ + { + "hpa-feature": "basicCapabilities", + "hpa-version": "v1", + "architecture": "generic", + "mandatory": "True", + "directives":[], + "hpa-feature-attributes": [ + { + "hpa-attribute-key": "numVirtualCpu", + "hpa-attribute-value": "4", + "operator": ">=" + }, + { + "hpa-attribute-key": "virtualMemSize", + "hpa-attribute-value": "8", + "operator": ">=", + "unit": "GB" + } + ] + }, + { + "hpa-feature": "instructionSetExtensions", + "hpa-version": "v1", + "architecture": "Intel64", + "mandatory": "True", + "directives":[], + "hpa-feature-attributes": [ + { + "hpa-attribute-key": "instructionSetExtensions", + "hpa-attribute-value": [ + "aes", + "sse", + "avx", + "smt" + ], + "operator": "ALL", + "unit": "" + } + ] + }, + { + "hpa-feature": "numa", + "hpa-version": "v1", + "architecture": "generic", + "mandatory": "False", + "score": "3", + "directives":[], + "hpa-feature-attributes": [ + { + "hpa-attribute-key": "numaNodes", + "hpa-attribute-value": "2", + "operator": "=" + }, + { + "hpa-attribute-key": "numaCpu-0", + "hpa-attribute-value": "2", + "operator": "=" + }, + { + "hpa-attribute-key": "numaCpu-1", + "hpa-attribute-value": "4", + "operator": "=" + }, + { + "hpa-attribute-key": "numaMem-0", + "hpa-attribute-value": "2", + "operator": "=", + "unit": "GB" + }, + { + "hpa-attribute-key": "numaMem-1", + "hpa-attribute-value": "4", + "operator": "=", + "unit": "GB" + } + ] + } + ] + }, + { + "id":"vg_2", + "type":"vnfc", + "directives":[ + { + "type":"flavor_directives", + "attributes":[ + { + "attribute_name":"flavor_label_2", + "attribute_value":"" + } + ] + } + ], + "flavorProperties": [ + { + "hpa-feature": "basicCapabilities", + "hpa-version": "v1", + "architecture": "generic", + "mandatory": "True", + "directives":[], + "hpa-feature-attributes": [ + { + "hpa-attribute-key": "numVirtualCpu", + "hpa-attribute-value": "4", + "operator": ">=" + }, + { + "hpa-attribute-key": "virtualMemSize", + "hpa-attribute-value": "8", + "operator": ">=", + "unit": "GB" + } + ] + }, + { + "hpa-feature": "ovsDpdk", + "hpa-version": "v1", + "architecture": "generic", + "mandatory": "False", + "score": "5", + "directives":[], + "hpa-feature-attributes": [ + { + "hpa-attribute-key": "dataProcessingAccelerationLibrary", + "hpa-attribute-value": "v18.02", + "operator": "=" + } + ] + }, + { + "hpa-feature": "numa", + "hpa-version": "v1", + "architecture": "generic", + "mandatory": "False", + "score": "3", + "directives":[], + "hpa-feature-attributes": [ + { + "hpa-attribute-key": "numaNodes", + "hpa-attribute-value": "2", + "operator": "=" + }, + { + "hpa-attribute-key": "numaCpu-0", + "hpa-attribute-value": "2", + "operator": "=" + }, + { + "hpa-attribute-key": "numaCpu-1", + "hpa-attribute-value": "4", + "operator": "=" + }, + { + "hpa-attribute-key": "numaMem-0", + "hpa-attribute-value": "2", + "operator": "=", + "unit": "GB" + }, + { + "hpa-attribute-key": "numaMem-1", + "hpa-attribute-value": "4", + "operator": "=", + "unit": "GB" + } + ] + } + ] + } + ] + } + } + }, + "optimization": { + "minimize": { + "sum": [ + { + "product": [ + 100, + { + "distance_between": [ + "customer_loc", + "vG" + ] + } + ] + }, + { + "product": [ + 200, + { + "hpa_score": [ + "vG" + ] + } + ] + } + ] + } + } + }, + "timeout": 5, + "limit": 3 +} diff --git a/test/csit/tests/optf-has/has/data/plan_with_hpa_simple.json b/test/csit/tests/optf-has/has/data/plan_with_hpa_simple.json index 25b226280..d343dc805 100644 --- a/test/csit/tests/optf-has/has/data/plan_with_hpa_simple.json +++ b/test/csit/tests/optf-has/has/data/plan_with_hpa_simple.json @@ -38,13 +38,26 @@ "properties":{ "evaluate":[ { - "flavorLabel":"flavor_label_1", + "id":"vg_1", + "type":"vnfc", + "directives":[ + { + "type":"flavor_directives", + "attributes":[ + { + "attribute_name":"flavor_label_1", + "attribute_value":"" + } + ] + } + ], "flavorProperties":[ { "hpa-feature":"basicCapabilities", "hpa-version":"v1", "architecture":"generic", "mandatory": "False", + "directives":[], "score": "5", "hpa-feature-attributes":[ { @@ -65,6 +78,7 @@ "hpa-version":"v1", "architecture":"generic", "mandatory": "False", + "directives":[], "score": "5", "hpa-feature-attributes":[ { @@ -77,13 +91,26 @@ ] }, { - "flavorLabel":"flavor_label_2", + "id":"vg_2", + "type":"vnfc", + "directives":[ + { + "type":"flavor_directives", + "attributes":[ + { + "attribute_name":"flavor_label_2", + "attribute_value":"" + } + ] + } + ], "flavorProperties":[ { "hpa-feature":"basicCapabilities", "hpa-version":"v1", "architecture":"generic", "mandatory": "False", + "directives":[], "score": "5", "hpa-feature-attributes":[ { diff --git a/test/csit/tests/optf-has/has/data/plan_with_hpa_unmatched.json b/test/csit/tests/optf-has/has/data/plan_with_hpa_unmatched.json index 8a3198566..e95ecedde 100644 --- a/test/csit/tests/optf-has/has/data/plan_with_hpa_unmatched.json +++ b/test/csit/tests/optf-has/has/data/plan_with_hpa_unmatched.json @@ -48,13 +48,26 @@ "properties":{ "evaluate":[ { - "flavorLabel":"flavor_label_1", + "id":"vg_1", + "type":"vnfc", + "directives":[ + { + "type":"flavor_directives", + "attributes":[ + { + "attribute_name":"flavor_label_1", + "attribute_value":"" + } + ] + } + ], "flavorProperties":[ { "hpa-feature":"basicCapabilities", "hpa-version":"v1", "architecture":"generic", "mandatory": "True", + "directives":[], "hpa-feature-attributes":[ { "hpa-attribute-key":"numVirtualCpu", @@ -72,13 +85,26 @@ ] }, { - "flavorLabel":"flavor_label_2", + "id":"vg_2", + "type":"vnfc", + "directives":[ + { + "type":"flavor_directives", + "attributes":[ + { + "attribute_name":"flavor_label_2", + "attribute_value":"" + } + ] + } + ], "flavorProperties":[ { "hpa-feature":"basicCapabilities", "hpa-version":"v1", "architecture":"generic", "mandatory":"True", + "directives":[], "hpa-feature-attributes":[ { "hpa-attribute-key":"numVirtualCpu", diff --git a/test/csit/tests/optf-has/has/optf_has_test.robot b/test/csit/tests/optf-has/has/optf_has_test.robot index deba6470e..3b3ee7a0e 100644 --- a/test/csit/tests/optf-has/has/optf_has_test.robot +++ b/test/csit/tests/optf-has/has/optf_has_test.robot @@ -482,6 +482,41 @@ GetPlanWithHpaUnmatched Should Be Equal As Integers ${resp.status_code} 200 Should Be Equal not found ${resultStatus} +# HPA Score Multi objective Optimization +SendPlanWithHpaScoreMultiObj + [Documentation] It sends a POST request to conductor + Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_score_multi_objective.json + &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + ${response_json} json.loads ${resp.content} + ${generatedPlanId}= Convert To String ${response_json['id']} + Set Global Variable ${generatedPlanId} + Log To Console generatedPlanId = ${generatedPlanId} + Should Be Equal As Integers ${resp.status_code} 201 + Sleep 60s Wait Plan Resolution + +GetPlanWithHpaScoreMultiObj + [Documentation] It sends a REST GET request to capture recommendations + Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} + &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + ${response_json} json.loads ${resp.content} + ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} + ${vim-id}= Convert To String ${response_json['plans'][0]['recommendations'][0]['vG']['candidate']['vim-id']} + # ${hpa_score}= Convert To String ${response_json['plans'][0]['recommendations']['vG']['hpa_score']} + Set Global Variable ${resultStatus} + Log To Console resultStatus = ${resultStatus} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + Should Be Equal done ${resultStatus} + Should Be Equal HPA-cloud_cloud-region-1 ${vim-id} + *** Keywords *** |