From: Morgan Richomme Date: Thu, 23 Apr 2020 14:26:43 +0000 (+0000) Subject: Merge "[PMSH] Updating csits for CBS module" X-Git-Tag: 6.0.0-ONAP~13 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=d0cb4ba1ee79050aef906ec3a14f839caf865ede;hp=e207b42c4806d949ec9125116cbafc23698b77b3;p=integration%2Fcsit.git Merge "[PMSH] Updating csits for CBS module" --- diff --git a/plans/policy/xacml-pdp/setup.sh b/plans/policy/xacml-pdp/setup.sh index 72d1115e..faf256fa 100644 --- a/plans/policy/xacml-pdp/setup.sh +++ b/plans/policy/xacml-pdp/setup.sh @@ -72,11 +72,16 @@ POLICY_PDPX_IP=`get-instance-ip.sh policy-xacml-pdp` DMAAP_IP=`get-instance-ip.sh dmaap-simulator` POLICY_PAP_IP=`get-instance-ip.sh policy-pap` - echo PDP IP IS ${POLICY_PDPX_IP} echo API IP IS ${POLICY_API_IP} echo PAP IP IS ${POLICY_PAP_IP} echo MARIADB IP IS ${MARIADB_IP} echo DMAAP_IP IS ${DMAAP_IP} -ROBOT_VARIABLES="-v POLICY_PDPX_IP:${POLICY_PDPX_IP} -v POLICY_API_IP:${POLICY_API_IP} -v POLICY_PAP_IP:${POLICY_PAP_IP}" +DATA2=${WORKSPACE}/dmaap-sim/models/models-examples/src/main/resources/policies + +ROBOT_VARIABLES="" +ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA2:${DATA2}" +ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PDPX_IP:${POLICY_PDPX_IP}" +ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}" +ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_IP:${POLICY_PAP_IP}" diff --git a/plans/so/integration-etsi-testing/config/env b/plans/so/integration-etsi-testing/config/env index 957bdbcf..647f53a6 100644 --- a/plans/so/integration-etsi-testing/config/env +++ b/plans/so/integration-etsi-testing/config/env @@ -1,6 +1,6 @@ NEXUS_DOCKER_REPO_MSO=nexus3.onap.org:10001 DOCKER_ENVIRONMENT=remote -TAG=1.5.2 +TAG=1.6.0 TIME_OUT_DEFAULT_VALUE_SEC=1200 PROJECT_NAME=etsiintegrationtesting DEFAULT_NETWORK_NAME=etsiintegrationtesting_default diff --git a/plans/so/integration-etsi-testing/config/override-files/api-handler-infra/onapheat/override.yaml b/plans/so/integration-etsi-testing/config/override-files/api-handler-infra/onapheat/override.yaml index b5479a9a..bdf5c4de 100644 --- a/plans/so/integration-etsi-testing/config/override-files/api-handler-infra/onapheat/override.yaml +++ b/plans/so/integration-etsi-testing/config/override-files/api-handler-infra/onapheat/override.yaml @@ -48,8 +48,8 @@ mso: retry: count: 3 aai: - endpoint: https://aai.api.simpledemo.onap.org:8443 - auth: 2630606608347B7124C244AB0FE34F6F + endpoint: https://aai-simulator:9993 + auth: 221187EFA3AD4E33600DE0488F287099934CE65C3D0697BCECC00BB58E784E07CD74A24581DC31DBC086FF63DF116378776E9BE3D1325885 extApi: endpoint: http://nbi.onap:8080/nbi/api/v3 so: diff --git a/plans/so/integration-etsi-testing/config/override-files/bpmn-infra/onapheat/override.yaml b/plans/so/integration-etsi-testing/config/override-files/bpmn-infra/onapheat/override.yaml index f2494fbb..426d4fd7 100644 --- a/plans/so/integration-etsi-testing/config/override-files/bpmn-infra/onapheat/override.yaml +++ b/plans/so/integration-etsi-testing/config/override-files/bpmn-infra/onapheat/override.yaml @@ -5,6 +5,11 @@ aai: endpoint: https://aai-simulator:9993 workflowAaiDistributionDelay: PT30S pnfEntryNotificationTimeout: P14D +cds: + endpoint: blueprints-processor + port: 9111 + auth: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw== + timeout: 60 camunda: bpm: admin-user: @@ -14,11 +19,6 @@ camunda: job-execution: max-pool-size: 30 core-pool-size: 3 -cds: - endpoint: blueprints-processor - port: 9111 - auth: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw== - timeout: 60 entitymanager: packagesToScan: com pnf: @@ -27,10 +27,13 @@ pnf: port: 3904 protocol: http uriPathPrefix: events - topicName: pnfReady + topicName: unauthenticated.PNF_READY consumerGroup: consumerGroup consumerId: consumerId topicListenerDelayInSeconds: 5 +bpelURL: http://bpmn-infra:8081 +msb-ip: msb-iag +msb-port: 80 mso: msoKey: 07a7159d3bf51a0e53be7a8f89699be7 config: @@ -82,6 +85,12 @@ mso: endpoint: http://c1.vm1.mso.simpledemo.onap.org:8087/services/rest/v1/volume-groups vnf-async: endpoint: http://c1.vm1.mso.simpledemo.onap.org:8087/services/VnfAdapterAsync + vfc: + rest: + endpoint: http://c1.vm1.mso.simpledemo.onap.org:8084/services/v1/vfcadapter + workflow: + message: + endpoint: http://c1.vm1.mso.simpledemo.onap.org:8081/mso/WorkflowMessage bpmn: process: historyTimeToLive: '30' @@ -225,6 +234,9 @@ mso: endpoint: http://bpmn-infra:8081/mso/WorkflowMessage notification: name: GenericNotificationServiceATT + sdnc: + replication: + delay: PT60S sdncadapter: callback: http://bpmn-infra:8081/mso/SDNCAdapterCallbackService vnfadapter: @@ -236,16 +248,23 @@ mso: callback: http://c1.vm1.mso.simpledemo.onap.org:8087/mso/vnfAdapterNotify rollback: callback: http://c1.vm1.mso.simpledemo.onap.org:8087/mso/vnfAdapterNotify + use: + qualified: + host: false global: dmaap: username: testuser password: alRyMzJ3NUNeakxl host: http://10.42.111.36:904 - auth: A4DE725B8B0D1A745049409B16762C16BC9B48555DC157272741D616323104442B3AAC052ED17E74EECA136B89C8C6615C8CC269ED5834EC47C6BE6A75DF39C6C07B07DF064CE268BE6510F472 publisher: topic: replaceme + naming: + endpoint: http://naming.demo.onap.com:8081/web/service/v1/genNetworkElementName + auth: Basic bTA0NzY4QG5vbi1wcm9kLm1zby5lY29tcC5hdHQuY29tOkF0dG0wNDc2OExpZmUhQA== policy: auth: Basic dGVzdHBkcDphbHBoYTEyMw== + default: + disposition: Skip client: auth: Basic bTAzNzQzOnBvbGljeVIwY2sk endpoint: https://localhost:8081/pdp/api/ @@ -257,13 +276,15 @@ sdnc: si: svc: types: PORT-MIRROR,PPROBE - -so: - vnfm: - adapter: - url: https://so-vnfm-adapter:9092/so/vnfm-adapter/v1/ - auth: Basic dm5mbTpwYXNzd29yZDEk - + dmaap: + host: ueb1.simpledemo.onap.org:3904 + timeout: 30000 + lcm: + path: '/restconf/operations/LCM:' + actionTimeout: 300000 + dmapp: + readTopic: SDNC-LCM-WRITE + writeTopic: SDNC-LCM-READ appc: client: topic: @@ -272,8 +293,7 @@ appc: timeout: 360000 write: APPC-LCM-READ sdnc: - read: - name: SDNC-LCM-WRITE + read: SDNC-LCM-WRITE write: SDNC-LCM-READ response: timeout: 360000 @@ -281,21 +301,34 @@ appc: secret: 64AG2hF4pYeG2pq7CT6XwUOT service: ueb poolMembers: ueb1.simpledemo.onap.org:3904,ueb2.simpledemo.onap.org:3904 +sniro: + conductor: + enabled: true + host: http://sniro-emulator:80 + uri: /v1/release-orders + headers.auth: Basic dGVzdDp0ZXN0cHdk + manager: + timeout: PT30M + host: http://sniro-emulator:80 + uri.v1: /sniro/api/v2/placement + uri.v2: /sniro/api/placement/v2 + headers.auth: Basic dGVzdDp0ZXN0cHdk + headers.patchVersion: 1 + headers.minorVersion: 1 + headers.latestVersion: 2 server: port: 8081 tomcat: max-threads: 50 spring: datasource: - driver-class-name: org.mariadb.jdbc.Driver - url: jdbc:mariadb://mariadb:3306/camundabpmn - username: camundauser - password: camunda123 - dbcp2: - initial-size: 5 - max-total: 20 - validation-query: select 1 - test-on-borrow: true + hikari: + jdbcUrl: jdbc:mariadb://mariadb:3306/camundabpmn + username: camundauser + password: camunda123 + driver-class-name: org.mariadb.jdbc.Driver + pool-name: bpmn-pool + registerMbeans: true security: usercredentials: - @@ -322,6 +355,11 @@ spring: username: mso_admin password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' role: ACTUATOR +so: + vnfm: + adapter: + url: https://so-vnfm-adapter:9092/so/vnfm-adapter/v1/ + auth: Basic dm5mbTpwYXNzd29yZDEk org: onap: so: @@ -335,3 +373,4 @@ rest: keyStorePassword: 'RLe5ExMWW;Kd6GTSt0WQz;.Y' trustStore: classpath:org.onap.so.trust.jks trustStorePassword: '6V%8oSU$,%WbYp3IUe;^mWt4' + diff --git a/plans/so/integration-etsi-testing/config/override-files/catalog-db-adapter/onapheat/override.yaml b/plans/so/integration-etsi-testing/config/override-files/catalog-db-adapter/onapheat/override.yaml new file mode 100644 index 00000000..934e8fbd --- /dev/null +++ b/plans/so/integration-etsi-testing/config/override-files/catalog-db-adapter/onapheat/override.yaml @@ -0,0 +1,103 @@ +server: + port: 8082 + tomcat: + max-threads: 50 +ssl-enable: false +mso: + logPath: logs + site-name: onapheat + catalog: + db: + spring: + endpoint: http://catalog-db-adapter:8082 + db: + auth: Basic YnBlbDpwYXNzd29yZDEk +spring: + datasource: + hikari: + jdbcUrl: jdbc:mariadb://mariadb:3306/catalogdb + username: cataloguser + password: catalog123 + driver-class-name: org.mariadb.jdbc.Driver + pool-name: catdb-pool + registerMbeans: true + flyway: + baseline-on-migrate: false + url: jdbc:mariadb://mariadb:3306/catalogdb + user: cataloguser + password: catalog123 + outOfOrder: true + validateOnMigrate: false + jpa: + generate-ddl: false + show-sql: false + hibernate: + ddl-auto: validate + naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy + enable-lazy-load-no-trans: true + database-platform: org.hibernate.dialect.MySQL5InnoDBDialect + security: + usercredentials: + - + username: bpel + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: BPEL-Client + - + username: mso_admin + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: ACTUATOR +#Actuator +management: + context-path: /manage +cloud_config: + identity_services: + RAX_KEYSTONE: + identity_url: "https://identity.api.rackspacecloud.com/v2.0" + mso_id: "RACKSPACE_ACCOUNT_ID" + mso_pass: "RACKSPACE_ACCOUNT_APIKEY" + admin_tenant: "dummy" + member_role: "admin" + tenant_metadata: true + identity_server_type: "KEYSTONE" + identity_authentication_type: "RACKSPACE_APIKEY" + project_domain_name: "PROJECT_DOMAIN_NAME" + user_domain_name: "USER_DOMAIN_NAME" + DEFAULT_KEYSTONE: + identity_url: "dummy" + mso_id: "dummy" + mso_pass: "dummy" + admin_tenant: "dummy" + member_role: "admin" + tenant_metadata: true + identity_server_type: "KEYSTONE" + identity_authentication_type: "USERNAME_PASSWORD" + project_domain_name: "dummy" + user_domain_name: "dummy" + cloud_sites: + Dallas: + region_id: "DFW" + clli: "DFW" + aic_version: "2.5" + identity_service_id: "RAX_KEYSTONE" + Northern Virginia: + region_id: "IAD" + clli: "IAD" + aic_version: "2.5" + identity_service_id: "RAX_KEYSTONE" + Chicago: + region_id: "ORD" + clli: "ORD" + aic_version: "2.5" + identity_service_id: "RAX_KEYSTONE" + RegionOne: + region_id: "RegionOne" + clli: "RegionOne" + aic_version: "2.5" + identity_service_id: "DEFAULT_KEYSTONE" + DEFAULT: + region_id: "dummyRegionId" + clli: "dummyClli" + aic_version: "2.5" + identity_service_id: "DEFAULT_KEYSTONE" + + diff --git a/plans/so/integration-etsi-testing/config/override-files/so-vnfm-adapter/onapheat/override.yaml b/plans/so/integration-etsi-testing/config/override-files/so-vnfm-adapter/onapheat/override.yaml index bb715126..ee87e25f 100644 --- a/plans/so/integration-etsi-testing/config/override-files/so-vnfm-adapter/onapheat/override.yaml +++ b/plans/so/integration-etsi-testing/config/override-files/so-vnfm-adapter/onapheat/override.yaml @@ -18,8 +18,19 @@ aai: auth: 221187EFA3AD4E33600DE0488F287099934CE65C3D0697BCECC00BB58E784E07CD74A24581DC31DBC086FF63DF116378776E9BE3D1325885 version: v15 endpoint: https://aai-simulator:9993 +spring: + security: + usercredentials: + - username: vnfm + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: BPEL-Client + - username: mso_admin + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: ACTUATOR mso: key: 07a7159d3bf51a0e53be7a8f89699be7 + site-name: localSite + logPath: ./logs/vnfm-adapter sdc: username: mso password: 76966BDD3C7414A03F7037264FF2E6C8EEC6C28F2B67F2840A1ED857C0260FEE731D73F47F828E5527125D29FD25D3E0DE39EE44C058906BF1657DE77BF897EECA93BDC07FA64F @@ -28,3 +39,7 @@ sdc: toscametapath: Artifacts/Deployment/OTHER/TOSCA.meta vnfmadapter: endpoint: https://so-vnfm-adapter:9092 +etsi-catalog-manager: + vnfpkgm: + endpoint: http://modeling-etsicatalog:8806/api/vnfpkgm/v1 + diff --git a/plans/so/integration-etsi-testing/docker-compose.yml b/plans/so/integration-etsi-testing/docker-compose.yml index 96eea965..ae8d7746 100644 --- a/plans/so/integration-etsi-testing/docker-compose.yml +++ b/plans/so/integration-etsi-testing/docker-compose.yml @@ -24,7 +24,7 @@ services: - "8082:8082" volumes: - ${TEST_LAB_DIR}/volumes/so/ca-certificates/onapheat:/app/ca-certificates - - ${TEST_LAB_DIR}/volumes/so/config/catalog-db-adapter/onapheat:/app/config + - ${CONFIG_DIR_PATH}/override-files/catalog-db-adapter/onapheat:/app/config environment: - APP=catalog-db-adapter - JVM_ARGS=-Xms64m -Xmx512m @@ -43,14 +43,8 @@ services: options: max-size: "30m" max-file: "5" - command: - - /app/wait-for.sh - - -q - - -t - - "300" - - mariadb:3306 - - -- - - "/app/start-app.sh" + user: root + entrypoint: /bin/sh -c '/app/wait-for.sh -q -t "300" mariadb:3306 -- "/app/start-app.sh"' ################################################################################ request-db-adapter: image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/request-db-adapter:${TAG} @@ -78,14 +72,8 @@ services: options: max-size: "30m" max-file: "5" - command: - - /app/wait-for.sh - - -q - - -t - - "300" - - catalog-db-adapter:8082 - - -- - - "/app/start-app.sh" + user: root + entrypoint: /bin/sh -c '/app/wait-for.sh -q -t "300" catalog-db-adapter:8082 -- "/app/start-app.sh"' ################################################################################ sdnc-adapter: image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/sdnc-adapter:${TAG} @@ -114,14 +102,8 @@ services: options: max-size: "30m" max-file: "5" - command: - - /app/wait-for.sh - - -q - - -t - - "300" - - request-db-adapter:8083 - - -- - - "/app/start-app.sh" + user: root + entrypoint: /bin/sh -c '/app/wait-for.sh -q -t "300" request-db-adapter:8083 -- "/app/start-app.sh"' ################################################################################ sdc-controller: image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/sdc-controller:${TAG} @@ -151,10 +133,8 @@ services: options: max-size: "30m" max-file: "5" - command: - - /bin/sh - - -c - - 'mkdir -p /distribution-test-zip/unzipped && tar -xvzf /distribution-test-zip/zipped_sdc_csar.tar.gz -C /distribution-test-zip/unzipped && /app/wait-for.sh -q -t "300" request-db-adapter:8083 -- "/app/start-app.sh"' + user: root + entrypoint: /bin/sh -c 'mkdir -p /distribution-test-zip/unzipped && tar -xvzf /distribution-test-zip/zipped_sdc_csar.tar.gz -C /distribution-test-zip/unzipped && chmod 777 -R /distribution-test-zip/ && /app/wait-for.sh -q -t "300" request-db-adapter:8083 -- "/app/start-app.sh"' ################################################################################ bpmn-infra: image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/bpmn-infra:${TAG} @@ -184,14 +164,8 @@ services: options: max-size: "30m" max-file: "5" - command: - - /app/wait-for.sh - - -q - - -t - - "300" - - request-db-adapter:8083 - - -- - - "/app/start-app.sh" + user: root + entrypoint: /bin/sh -c '/app/wait-for.sh -q -t "300" request-db-adapter:8083 -- "/app/start-app.sh"' ################################################################################ api-handler-infra: image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/api-handler-infra:${TAG} @@ -220,14 +194,8 @@ services: options: max-size: "30m" max-file: "5" - command: - - /app/wait-for.sh - - -q - - -t - - "300" - - request-db-adapter:8083 - - -- - - "/app/start-app.sh" + user: root + entrypoint: /bin/sh -c '/app/wait-for.sh -q -t "300" request-db-adapter:8083 -- "/app/start-app.sh"' ############################################################################# so-monitoring: image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/so-monitoring:${TAG} @@ -264,14 +232,8 @@ services: options: max-size: "30m" max-file: "5" - command: - - /app/wait-for.sh - - -q - - -t - - "300" - - request-db-adapter:8083 - - -- - - "/app/start-app.sh" + user: root + entrypoint: /bin/sh -c '/app/wait-for.sh -q -t "300" request-db-adapter:8083 -- "/app/start-app.sh"' ################################################################################ sdc-simulator: image: simulators/sdc-simulator:latest diff --git a/tests/policy/xacml-pdp/data/onap.policies.monitoring.cdap.tca.hi.lo.app.json b/tests/policy/xacml-pdp/data/onap.policies.monitoring.cdap.tca.hi.lo.app.json deleted file mode 100644 index 06574735..00000000 --- a/tests/policy/xacml-pdp/data/onap.policies.monitoring.cdap.tca.hi.lo.app.json +++ /dev/null @@ -1,210 +0,0 @@ -{ - "tosca_definitions_version": "tosca_simple_yaml_1_1_0", - "policy_types": { - "onap.policies.Monitoring": { - "derived_from": "tosca.policies.Root", - "description": "a base policy type for all policies that governs monitoring provisioning" - }, - "onap.policies.monitoring.cdap.tca.hi.lo.app": { - "derived_from": "onap.policies.Monitoring", - "version": "1.0.0", - "properties": { - "tca_policy": { - "type": "onap.datatypes.monitoring.tca_policy", - "description": "TCA Policy JSON" - } - } - } - }, - "data_types": { - "onap.datatypes.monitoring.metricsPerEventName": { - "derived_from": "tosca.datatypes.Root", - "properties": { - "controlLoopSchemaType": { - "type": "string", - "required": true, - "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM", - "constraints": [ - { - "valid_values": [ - "VM", - "VNF" - ] - } - ] - }, - "eventName": { - "type": "string", - "required": true, - "description": "Event name to which thresholds need to be applied" - }, - "policyName": { - "type": "string", - "required": true, - "description": "TCA Policy Scope Name" - }, - "policyScope": { - "type": "string", - "required": true, - "description": "TCA Policy Scope" - }, - "policyVersion": { - "type": "string", - "required": true, - "description": "TCA Policy Scope Version" - }, - "thresholds": { - "type": "list", - "required": true, - "description": "Thresholds associated with eventName", - "entry_schema": { - "type": "onap.datatypes.monitoring.thresholds" - } - } - } - }, - "onap.datatypes.monitoring.tca_policy": { - "derived_from": "tosca.datatypes.Root", - "properties": { - "domain": { - "type": "string", - "required": true, - "description": "Domain name to which TCA needs to be applied", - "default": "measurementsForVfScaling", - "constraints": [ - { - "equal": "measurementsForVfScaling" - } - ] - }, - "metricsPerEventName": { - "type": "list", - "required": true, - "description": "Contains eventName and threshold details that need to be applied to given eventName", - "entry_schema": { - "type": "onap.datatypes.monitoring.metricsPerEventName" - } - } - } - }, - "onap.datatypes.monitoring.thresholds": { - "derived_from": "tosca.datatypes.Root", - "properties": { - "closedLoopControlName": { - "type": "string", - "required": true, - "description": "Closed Loop Control Name associated with the threshold" - }, - "closedLoopEventStatus": { - "type": "string", - "required": true, - "description": "Closed Loop Event Status of the threshold", - "constraints": [ - { - "valid_values": [ - "ONSET", - "ABATED" - ] - } - ] - }, - "direction": { - "type": "string", - "required": true, - "description": "Direction of the threshold", - "constraints": [ - { - "valid_values": [ - "LESS", - "LESS_OR_EQUAL", - "GREATER", - "GREATER_OR_EQUAL", - "EQUAL" - ] - } - ] - }, - "fieldPath": { - "type": "string", - "required": true, - "description": "Json field Path as per CEF message which needs to be analyzed for TCA", - "constraints": [ - { - "valid_values": [ - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage", - "$.event.measurementsForVfScalingFields.meanRequestLatency", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed", - "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value" - ] - } - ] - }, - "severity": { - "type": "string", - "required": true, - "description": "Threshold Event Severity", - "constraints": [ - { - "valid_values": [ - "CRITICAL", - "MAJOR", - "MINOR", - "WARNING", - "NORMAL" - ] - } - ] - }, - "thresholdValue": { - "type": "integer", - "required": true, - "description": "Threshold value for the field Path inside CEF message" - }, - "version": { - "type": "string", - "required": true, - "description": "Version number associated with the threshold" - } - } - } - } -} diff --git a/tests/policy/xacml-pdp/data/onap.policy.guard.decision.request.json b/tests/policy/xacml-pdp/data/onap.policy.guard.decision.request.json new file mode 100644 index 00000000..ee90feaa --- /dev/null +++ b/tests/policy/xacml-pdp/data/onap.policy.guard.decision.request.json @@ -0,0 +1,16 @@ +{ + "ONAPName": "Guard", + "ONAPComponent": "Guard-component", + "ONAPInstance": "Guard-component-instance", + "requestId": "unique-request-guard-1", + "action": "guard", + "resource": { + "guard": { + "actor": "APPC", + "operation": "ModifyConfig", + "target": "f17face5-69cb-4c88-9e0b-7426db7edddd", + "requestId": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65", + "clname": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a" + } + } +} diff --git a/tests/policy/xacml-pdp/data/onap.policy.optimization.decision.request.json b/tests/policy/xacml-pdp/data/onap.policy.optimization.decision.request.json new file mode 100644 index 00000000..d997099c --- /dev/null +++ b/tests/policy/xacml-pdp/data/onap.policy.optimization.decision.request.json @@ -0,0 +1,15 @@ +{ + "ONAPName": "OOF", + "ONAPComponent": "OOF-component", + "ONAPInstance": "OOF-component-instance", + "context" : { + "subscriberName": [] + }, + "action": "optimize", + "resource": { + "scope": [], + "services": [], + "resources": [], + "geography": [] + } +} diff --git a/tests/policy/xacml-pdp/data/vCPE.policy.input.tosca.deploy.json b/tests/policy/xacml-pdp/data/vCPE.policy.input.tosca.deploy.json new file mode 100644 index 00000000..7ace047b --- /dev/null +++ b/tests/policy/xacml-pdp/data/vCPE.policy.input.tosca.deploy.json @@ -0,0 +1,5 @@ +{"policies":[ + {"policy-id":"onap.restart.tca"}, + {"policy-id":"OSDF_CASABLANCA.Affinity_Default"} + ] +} diff --git a/tests/policy/xacml-pdp/data/vCPE.policy.monitoring.input.tosca.deploy.json b/tests/policy/xacml-pdp/data/vCPE.policy.monitoring.input.tosca.deploy.json deleted file mode 100644 index c0d157cf..00000000 --- a/tests/policy/xacml-pdp/data/vCPE.policy.monitoring.input.tosca.deploy.json +++ /dev/null @@ -1 +0,0 @@ -{"policies":[{"policy-id":"onap.restart.tca"}]} \ No newline at end of file diff --git a/tests/policy/xacml-pdp/xacml-pdp-test.robot b/tests/policy/xacml-pdp/xacml-pdp-test.robot index 5144f966..931c77b5 100644 --- a/tests/policy/xacml-pdp/xacml-pdp-test.robot +++ b/tests/policy/xacml-pdp/xacml-pdp-test.robot @@ -28,18 +28,21 @@ Statistics Should Be Equal As Strings ${resp.json()['code']} 200 ExecuteXacmlPolicy - Wait Until Keyword Succeeds 0 min 15 sec CreateNewMonitorPolicy - Wait Until Keyword Succeeds 0 min 15 sec DeployMonitorPolicy + Wait Until Keyword Succeeds 0 min 15 sec CreateMonitorPolicy + Wait Until Keyword Succeeds 0 min 15 sec CreateOptimizationPolicy + Wait Until Keyword Succeeds 0 min 15 sec GetDefaultDecision + Wait Until Keyword Succeeds 0 min 15 sec DeployPolicies Wait Until Keyword Succeeds 0 min 15 sec GetAbbreviatedDecisionResult Wait Until Keyword Succeeds 0 min 15 sec GetMonitoringDecision Wait Until Keyword Succeeds 0 min 15 sec GetNamingDecision + Wait Until Keyword Succeeds 0 min 15 sec GetOptimizationDecision *** Keywords *** -CreateNewMonitorPolicy - [Documentation] Create a new Monitoring policy +CreateMonitorPolicy + [Documentation] Create a Monitoring policy ${auth}= Create List healthcheck zb!XztG34 - ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.json + ${postjson}= Get file ${DATA2}/vCPE.policy.monitoring.input.tosca.json Log Creating session https://${POLICY_API_IP}:6969 ${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json @@ -50,10 +53,24 @@ CreateNewMonitorPolicy Dictionary Should Contain Key ${resp.json()} tosca_definitions_version Dictionary Should Contain Key ${postjsonobject} tosca_definitions_version -DeployMonitorPolicy +CreateOptimizationPolicy + [Documentation] Create an Optimization policy + ${auth}= Create List healthcheck zb!XztG34 + ${postjson}= Get file ${DATA2}/vCPE.policies.optimization.input.tosca.json + Log Creating session https://${POLICY_API_IP}:6969 + ${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Post Request policy /policy/api/v1/policytypes/onap.policies.optimization.resource.AffinityPolicy/versions/1.0.0/policies data=${postjson} headers=${headers} + Log Received response from policy4 ${resp.text} + ${postjsonobject} To Json ${postjson} + Should Be Equal As Strings ${resp.status_code} 200 + Dictionary Should Contain Key ${resp.json()} tosca_definitions_version + Dictionary Should Contain Key ${postjsonobject} tosca_definitions_version + +DeployPolicies [Documentation] Runs Policy PAP to deploy a policy ${auth}= Create List healthcheck zb!XztG34 - ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.deploy.json + ${postjson}= Get file ${CURDIR}/data/vCPE.policy.input.tosca.deploy.json Log Creating session https://${POLICY_PAP_IP}:6969 ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json @@ -74,6 +91,20 @@ GetStatisticsAfterDeployed Should Be Equal As Strings ${resp.json()['code']} 200 Should Be Equal As Strings ${resp.json()['totalPoliciesCount'] 1 +GetDefaultDecision + [Documentation] Get Default Decision with no policies in Xacml PDP + ${auth}= Create List healthcheck zb!XztG34 + ${postjson}= Get file ${CURDIR}/data/onap.policy.guard.decision.request.json + Log Creating session https://${POLICY_PDPX_IP}:6969 + ${session}= Create Session policy https://${POLICY_PDPX_IP}:6969 auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${params}= Create Dictionary abbrev=true + ${resp}= Post Request policy /policy/pdpx/v1/decision params=${params} data=${postjson} headers=${headers} + Log Received response from policy ${resp.text} + ${status}= Get From Dictionary ${resp.json()} status + Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal As Strings ${status} Permit + GetAbbreviatedDecisionResult [Documentation] Get Decision with abbreviated results from Policy Xacml PDP ${auth}= Create List healthcheck zb!XztG34 @@ -127,6 +158,22 @@ GetNamingDecision Dictionary Should Contain Key ${policy} properties Dictionary Should Contain Key ${policy} name +GetOptimizationDecision + [Documentation] Get Decision from Optimization Policy Xacml PDP + ${auth}= Create List healthcheck zb!XztG34 + ${postjson}= Get file ${CURDIR}/data/onap.policy.optimization.decision.request.json + Log Creating session https://${POLICY_PDPX_IP}:6969 + ${session}= Create Session policy https://${POLICY_PDPX_IP}:6969 auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Post Request policy /policy/pdpx/v1/decision data=${postjson} headers=${headers} + Log Received response from policy ${resp.text} + ${policy}= Get From Dictionary ${resp.json()['policies']} OSDF_CASABLANCA.Affinity_Default + Should Be Equal As Strings ${resp.status_code} 200 + Dictionary Should Contain Key ${policy} type + Dictionary Should Contain Key ${policy} type_version + Dictionary Should Contain Key ${policy} properties + Dictionary Should Contain Key ${policy} name + GetStatisticsAfterDecision [Documentation] Runs Policy Xacml PDP Statistics after Decision request ${auth}= Create List healthcheck zb!XztG34