From c0cf6a4765212cc66e364fa0eb43a2447366ce5b Mon Sep 17 00:00:00 2001 From: DR695H Date: Fri, 26 Jul 2019 16:42:36 -0400 Subject: renaming openecomp to onap Issue-ID: TEST-27 Change-Id: I8449025f1032719f04d0e283e12d9f9bc75542b7 Signed-off-by: DR695H --- dnstraffic.sh | 2 +- docker/Dockerfile | 2 +- html/index.html | 6 +- robot/assets/asdc/.gitignore | 1 - .../blueprints/k8s-tca-clamp-policy-05082019.yaml | 175 ---- .../assets/asdc/blueprints/tca_docker_k8s_v4.yaml | 172 ---- robot/assets/sdc/.gitignore | 1 + .../blueprints/k8s-tca-clamp-policy-05082019.yaml | 175 ++++ robot/assets/sdc/blueprints/tca_docker_k8s_v4.yaml | 172 ++++ robot/assets/templates/sdnc/preload.jinja | 4 +- robot/assets/templates/web/index.html.jinja | 16 +- robot/resources/asdc_interface.robot | 994 --------------------- robot/resources/demo_preload.robot | 18 +- robot/resources/global_properties.robot | 20 +- robot/resources/sdc_interface.robot | 994 +++++++++++++++++++++ .../test_templates/model_test_template.robot | 24 +- .../model_test_template_vcperescust.robot | 16 +- .../vnf_orchestration_test_template.robot | 4 +- .../vnf_orchestration_with_cds_test_template.robot | 10 +- robot/resources/vid/create_service_instance.robot | 4 +- robot/resources/vid/create_vid_vnf.robot | 4 +- robot/resources/vid/teardown_vid.robot | 2 +- robot/resources/vid/vid_interface.robot | 8 +- robot/testsuites/create-cloud-config.robot | 13 +- robot/testsuites/demo.robot | 3 +- robot/testsuites/health-check.robot | 6 +- robot/testsuites/model-distribution-vcpe.robot | 2 +- robot/testsuites/model-distribution.robot | 2 +- robot/testsuites/update_onap_page.robot | 2 +- 29 files changed, 1425 insertions(+), 1427 deletions(-) delete mode 100644 robot/assets/asdc/.gitignore delete mode 100644 robot/assets/asdc/blueprints/k8s-tca-clamp-policy-05082019.yaml delete mode 100644 robot/assets/asdc/blueprints/tca_docker_k8s_v4.yaml create mode 100644 robot/assets/sdc/.gitignore create mode 100644 robot/assets/sdc/blueprints/k8s-tca-clamp-policy-05082019.yaml create mode 100644 robot/assets/sdc/blueprints/tca_docker_k8s_v4.yaml delete mode 100644 robot/resources/asdc_interface.robot create mode 100644 robot/resources/sdc_interface.robot diff --git a/dnstraffic.sh b/dnstraffic.sh index 808a7b53..f4bf97be 100755 --- a/dnstraffic.sh +++ b/dnstraffic.sh @@ -28,7 +28,7 @@ for iter in `seq 1 $ITERATIONS`; do for i in `seq 1 $RATE_PER_SEC`; do - nslookup -timeout=1 host2.dnsdemo.openecomp.org $DNSIP >/dev/null 2>&1 & + nslookup -timeout=1 host2.dnsdemo.onap.org $DNSIP >/dev/null 2>&1 & done sleep 1 done diff --git a/docker/Dockerfile b/docker/Dockerfile index 32eb5fce..786538a8 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -4,7 +4,7 @@ FROM ubuntu MAINTAINER "ONAP" LABEL name="Docker image for the ONAP Robot Testing Framework" -LABEL usage="docker run -e ROBOT_TEST= -ti openecompete" +LABEL usage="docker run -e ROBOT_TEST= -ti onapete" ENV BUILDTIME=true diff --git a/html/index.html b/html/index.html index fc01d0b6..f3571dac 100644 --- a/html/index.html +++ b/html/index.html @@ -119,7 +119,7 @@ GLOBAL_INJECTED_PUBLIC_NET_ID = "971040b2-7059-49dc-b220-4fab50cb2ad4" Not working. : Healthcheck

-

MSO

+

SO

JBOSS GUI with admin/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U

@@ -173,7 +173,7 @@ GLOBAL_INJECTED_PUBLIC_NET_ID = "971040b2-7059-49dc-b220-4fab50cb2ad4" Portal

DCAE

APP-C

- MSO

+ SO

SDN-C

VID

Message Router

@@ -183,7 +183,7 @@ GLOBAL_INJECTED_PUBLIC_NET_ID = "971040b2-7059-49dc-b220-4fab50cb2ad4" Inside the VM you can list the docker containers by typing:

docker ps

and can get a shell prompt by executing the bash command. - For example:

docker exec -it openecompete_container bash

+ For example:

docker exec -it onapete_container bash

diff --git a/robot/assets/asdc/.gitignore b/robot/assets/asdc/.gitignore deleted file mode 100644 index abe251a7..00000000 --- a/robot/assets/asdc/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/temp \ No newline at end of file diff --git a/robot/assets/asdc/blueprints/k8s-tca-clamp-policy-05082019.yaml b/robot/assets/asdc/blueprints/k8s-tca-clamp-policy-05082019.yaml deleted file mode 100644 index b4e54539..00000000 --- a/robot/assets/asdc/blueprints/k8s-tca-clamp-policy-05082019.yaml +++ /dev/null @@ -1,175 +0,0 @@ -# -# ============LICENSE_START==================================================== -# ============================================================================= -# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved. -# ============================================================================= -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END====================================================== - -tosca_definitions_version: cloudify_dsl_1_3 - -description: > - This blueprint deploys/manages the TCA module as a Docker container - -imports: - - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml - - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.13/k8splugin_types.yaml -# - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml - - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/clamppolicyplugin/1.0.0/clamppolicyplugin_types.yaml -inputs: - aaiEnrichmentHost: - type: string - default: "aai.onap.svc.cluster.local" - aaiEnrichmentPort: - type: string - default: "8443" - enableAAIEnrichment: - type: string - default: true - dmaap_host: - type: string - default: message-router.onap - dmaap_port: - type: string - default: "3904" - enableRedisCaching: - type: string - default: false - redisHosts: - type: string - default: dcae-redis.onap.svc.cluster.local:6379 - tag_version: - type: string - default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.1" - consul_host: - type: string - default: consul-server.onap - consul_port: - type: string - default: "8500" - cbs_host: - type: string - default: "config-binding-service" - cbs_port: - type: string - default: "10000" - policy_id: - type: string - default: "onap.restart.tca" - external_port: - type: string - description: Kubernetes node port on which CDAPgui is exposed - default: "32012" - policy_model_id: - type: string - default: "onap.policies.monitoring.cdap.tca.hi.lo.app" -node_templates: - tca_k8s: - type: dcae.nodes.ContainerizedServiceComponent - relationships: - - target: tca_policy - type: cloudify.relationships.depends_on - properties: - service_component_type: 'dcaegen2-analytics-tca' - application_config: {} - docker_config: {} - image: - get_input: tag_version - log_info: - log_directory: "/opt/app/TCAnalytics/logs" - application_config: - app_config: - appDescription: DCAE Analytics Threshold Crossing Alert Application - appName: dcae-tca - tcaAlertsAbatementTableName: TCAAlertsAbatementTable - tcaAlertsAbatementTableTTLSeconds: '1728000' - tcaSubscriberOutputStreamName: TCASubscriberOutputStream - tcaVESAlertsTableName: TCAVESAlertsTable - tcaVESAlertsTableTTLSeconds: '1728000' - tcaVESMessageStatusTableName: TCAVESMessageStatusTable - tcaVESMessageStatusTableTTLSeconds: '86400' - thresholdCalculatorFlowletInstances: '2' - app_preferences: - aaiEnrichmentHost: - get_input: aaiEnrichmentHost - aaiEnrichmentIgnoreSSLCertificateErrors: 'true' - aaiEnrichmentPortNumber: '8443' - aaiEnrichmentProtocol: https - aaiEnrichmentUserName: dcae@dcae.onap.org - aaiEnrichmentUserPassword: demo123456! - aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query - aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf - enableAAIEnrichment: - get_input: enableAAIEnrichment - enableRedisCaching: - get_input: enableRedisCaching - redisHosts: - get_input: redisHosts - enableAlertCEFFormat: 'false' - publisherContentType: application/json - publisherHostName: - get_input: dmaap_host - publisherHostPort: - get_input: dmaap_port - publisherMaxBatchSize: '1' - publisherMaxRecoveryQueueSize: '100000' - publisherPollingInterval: '20000' - publisherProtocol: http - publisherTopicName: unauthenticated.DCAE_CL_OUTPUT - subscriberConsumerGroup: OpenDCAE-clamp - subscriberConsumerId: c12 - subscriberContentType: application/json - subscriberHostName: - get_input: dmaap_host - subscriberHostPort: - get_input: dmaap_port - subscriberMessageLimit: '-1' - subscriberPollingInterval: '30000' - subscriberProtocol: http - subscriberTimeoutMS: '-1' - subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT - tca_policy: '' - service_component_type: dcaegen2-analytics_tca - interfaces: - cloudify.interfaces.lifecycle: - start: - inputs: - envs: - DMAAPHOST: - { get_input: dmaap_host } - DMAAPPORT: - { get_input: dmaap_port } - DMAAPPUBTOPIC: "unauthenticated.DCAE_CL_OUTPUT" - DMAAPSUBTOPIC: "unauthenticated.VES_MEASUREMENT_OUTPUT" - AAIHOST: - { get_input: aaiEnrichmentHost } - AAIPORT: - { get_input: aaiEnrichmentPort } - CONSUL_HOST: - { get_input: consul_host } - CONSUL_PORT: - { get_input: consul_port } - CBS_HOST: - { get_input: cbs_host } - CBS_PORT: - { get_input: cbs_port } - CONFIG_BINDING_SERVICE: "config_binding_service" - ports: - - concat: ["11011:", { get_input: external_port }] - tca_policy: - type: clamp.nodes.policy - properties: - policy_id: - get_input: policy_id - policy_model_id: - get_input: policy_model_id \ No newline at end of file diff --git a/robot/assets/asdc/blueprints/tca_docker_k8s_v4.yaml b/robot/assets/asdc/blueprints/tca_docker_k8s_v4.yaml deleted file mode 100644 index 9c12dd53..00000000 --- a/robot/assets/asdc/blueprints/tca_docker_k8s_v4.yaml +++ /dev/null @@ -1,172 +0,0 @@ -# -# ============LICENSE_START==================================================== -# ============================================================================= -# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. -# ============================================================================= -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END====================================================== - -tosca_definitions_version: cloudify_dsl_1_3 - -description: > - This blueprint deploys/manages the TCA module as a Docker container - -imports: - - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml - - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R3/k8splugin/1.4.4/k8splugin_types.yaml - - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R2/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml - -inputs: - aaiEnrichmentHost: - type: string - default: "aai.onap.svc.cluster.local" - aaiEnrichmentPort: - type: string - default: "8443" - enableAAIEnrichment: - type: string - default: true - dmaap_host: - type: string - default: message-router.onap.svc.cluster.local - dmaap_port: - type: string - default: "3904" - enableRedisCaching: - type: string - default: false - redisHosts: - type: string - default: dcae-redis.onap.svc.cluster.local:6379 - tag_version: - type: string - default: "10.12.5.2:5000/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.0" - consul_host: - type: string - default: consul-server.onap.svc.cluster.local - consul_port: - type: string - default: "8500" - cbs_host: - type: string - default: "config-binding-service.dcae.svc.cluster.local" - cbs_port: - type: string - default: "10000" - policy_id: - type: string - default: "none" - external_port: - type: string - description: Kubernetes node port on which CDAPgui is exposed - default: "32022" - -node_templates: - tca_k8s: - type: dcae.nodes.ContainerizedServiceComponent - relationships: - - target: tca_policy - type: cloudify.relationships.depends_on - properties: - service_component_type: 'dcaegen2-analytics-tca' - application_config: {} - docker_config: {} - image: - get_input: tag_version - log_info: - log_directory: "/opt/app/TCAnalytics/logs" - application_config: - app_config: - appDescription: DCAE Analytics Threshold Crossing Alert Application - appName: dcae-tca - tcaAlertsAbatementTableName: TCAAlertsAbatementTable - tcaAlertsAbatementTableTTLSeconds: '1728000' - tcaSubscriberOutputStreamName: TCASubscriberOutputStream - tcaVESAlertsTableName: TCAVESAlertsTable - tcaVESAlertsTableTTLSeconds: '1728000' - tcaVESMessageStatusTableName: TCAVESMessageStatusTable - tcaVESMessageStatusTableTTLSeconds: '86400' - thresholdCalculatorFlowletInstances: '2' - app_preferences: - aaiEnrichmentHost: - get_input: aaiEnrichmentHost - aaiEnrichmentIgnoreSSLCertificateErrors: 'true' - aaiEnrichmentPortNumber: '8443' - aaiEnrichmentProtocol: https - aaiEnrichmentUserName: dcae@dcae.onap.org - aaiEnrichmentUserPassword: demo123456! - aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query - aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf - enableAAIEnrichment: - get_input: enableAAIEnrichment - enableRedisCaching: - get_input: enableRedisCaching - redisHosts: - get_input: redisHosts - enableAlertCEFFormat: 'false' - publisherContentType: application/json - publisherHostName: - get_input: dmaap_host - publisherHostPort: - get_input: dmaap_port - publisherMaxBatchSize: '1' - publisherMaxRecoveryQueueSize: '100000' - publisherPollingInterval: '20000' - publisherProtocol: http - publisherTopicName: unauthenticated.DCAE_CL_OUTPUT - subscriberConsumerGroup: OpenDCAE-c12 - subscriberConsumerId: c12 - subscriberContentType: application/json - subscriberHostName: - get_input: dmaap_host - subscriberHostPort: - get_input: dmaap_port - subscriberMessageLimit: '-1' - subscriberPollingInterval: '30000' - subscriberProtocol: http - subscriberTimeoutMS: '-1' - subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT - tca_policy: '{"domain":"measurementsForVfScaling","metricsPerEventName":[{"eventName":"vFirewallBroadcastPackets","controlLoopSchemaType":"VNF","policyScope":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta","thresholdValue":300,"direction":"LESS_OR_EQUAL","severity":"MAJOR","closedLoopEventStatus":"ONSET"},{"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta","thresholdValue":700,"direction":"GREATER_OR_EQUAL","severity":"CRITICAL","closedLoopEventStatus":"ONSET"}]},{"eventName":"vLB","controlLoopSchemaType":"VM","policyScope":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta","thresholdValue":300,"direction":"GREATER_OR_EQUAL","severity":"CRITICAL","closedLoopEventStatus":"ONSET"}]},{"eventName":"Measurement_vGMUX","controlLoopSchemaType":"VNF","policyScope":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value","thresholdValue":0,"direction":"EQUAL","severity":"MAJOR","closedLoopEventStatus":"ABATED"},{"closedLoopControlName":"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value","thresholdValue":0,"direction":"GREATER","severity":"CRITICAL","closedLoopEventStatus":"ONSET"}]}]}' - service_component_type: dcaegen2-analytics_tca - interfaces: - cloudify.interfaces.lifecycle: - start: - inputs: - max_wait: 3600 - envs: - DMAAPHOST: - { get_input: dmaap_host } - DMAAPPORT: - { get_input: dmaap_port } - DMAAPPUBTOPIC: "unauthenticated.DCAE_CL_OUTPUT" - DMAAPSUBTOPIC: "unauthenticated.SEC_MEASUREMENT_OUTPUT" - AAIHOST: - { get_input: aaiEnrichmentHost } - AAIPORT: - { get_input: aaiEnrichmentPort } - CONSUL_HOST: - { get_input: consul_host } - CONSUL_PORT: - { get_input: consul_port } - CBS_HOST: - { get_input: cbs_host } - CBS_PORT: - { get_input: cbs_port } - CONFIG_BINDING_SERVICE: "config_binding_service" - ports: - - concat: ["11011:", { get_input: external_port }] - tca_policy: - type: dcae.nodes.policy - properties: - policy_id: - get_input: policy_id diff --git a/robot/assets/sdc/.gitignore b/robot/assets/sdc/.gitignore new file mode 100644 index 00000000..abe251a7 --- /dev/null +++ b/robot/assets/sdc/.gitignore @@ -0,0 +1 @@ +/temp \ No newline at end of file diff --git a/robot/assets/sdc/blueprints/k8s-tca-clamp-policy-05082019.yaml b/robot/assets/sdc/blueprints/k8s-tca-clamp-policy-05082019.yaml new file mode 100644 index 00000000..b4e54539 --- /dev/null +++ b/robot/assets/sdc/blueprints/k8s-tca-clamp-policy-05082019.yaml @@ -0,0 +1,175 @@ +# +# ============LICENSE_START==================================================== +# ============================================================================= +# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved. +# ============================================================================= +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END====================================================== + +tosca_definitions_version: cloudify_dsl_1_3 + +description: > + This blueprint deploys/manages the TCA module as a Docker container + +imports: + - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml + - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.13/k8splugin_types.yaml +# - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml + - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/clamppolicyplugin/1.0.0/clamppolicyplugin_types.yaml +inputs: + aaiEnrichmentHost: + type: string + default: "aai.onap.svc.cluster.local" + aaiEnrichmentPort: + type: string + default: "8443" + enableAAIEnrichment: + type: string + default: true + dmaap_host: + type: string + default: message-router.onap + dmaap_port: + type: string + default: "3904" + enableRedisCaching: + type: string + default: false + redisHosts: + type: string + default: dcae-redis.onap.svc.cluster.local:6379 + tag_version: + type: string + default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.1" + consul_host: + type: string + default: consul-server.onap + consul_port: + type: string + default: "8500" + cbs_host: + type: string + default: "config-binding-service" + cbs_port: + type: string + default: "10000" + policy_id: + type: string + default: "onap.restart.tca" + external_port: + type: string + description: Kubernetes node port on which CDAPgui is exposed + default: "32012" + policy_model_id: + type: string + default: "onap.policies.monitoring.cdap.tca.hi.lo.app" +node_templates: + tca_k8s: + type: dcae.nodes.ContainerizedServiceComponent + relationships: + - target: tca_policy + type: cloudify.relationships.depends_on + properties: + service_component_type: 'dcaegen2-analytics-tca' + application_config: {} + docker_config: {} + image: + get_input: tag_version + log_info: + log_directory: "/opt/app/TCAnalytics/logs" + application_config: + app_config: + appDescription: DCAE Analytics Threshold Crossing Alert Application + appName: dcae-tca + tcaAlertsAbatementTableName: TCAAlertsAbatementTable + tcaAlertsAbatementTableTTLSeconds: '1728000' + tcaSubscriberOutputStreamName: TCASubscriberOutputStream + tcaVESAlertsTableName: TCAVESAlertsTable + tcaVESAlertsTableTTLSeconds: '1728000' + tcaVESMessageStatusTableName: TCAVESMessageStatusTable + tcaVESMessageStatusTableTTLSeconds: '86400' + thresholdCalculatorFlowletInstances: '2' + app_preferences: + aaiEnrichmentHost: + get_input: aaiEnrichmentHost + aaiEnrichmentIgnoreSSLCertificateErrors: 'true' + aaiEnrichmentPortNumber: '8443' + aaiEnrichmentProtocol: https + aaiEnrichmentUserName: dcae@dcae.onap.org + aaiEnrichmentUserPassword: demo123456! + aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query + aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf + enableAAIEnrichment: + get_input: enableAAIEnrichment + enableRedisCaching: + get_input: enableRedisCaching + redisHosts: + get_input: redisHosts + enableAlertCEFFormat: 'false' + publisherContentType: application/json + publisherHostName: + get_input: dmaap_host + publisherHostPort: + get_input: dmaap_port + publisherMaxBatchSize: '1' + publisherMaxRecoveryQueueSize: '100000' + publisherPollingInterval: '20000' + publisherProtocol: http + publisherTopicName: unauthenticated.DCAE_CL_OUTPUT + subscriberConsumerGroup: OpenDCAE-clamp + subscriberConsumerId: c12 + subscriberContentType: application/json + subscriberHostName: + get_input: dmaap_host + subscriberHostPort: + get_input: dmaap_port + subscriberMessageLimit: '-1' + subscriberPollingInterval: '30000' + subscriberProtocol: http + subscriberTimeoutMS: '-1' + subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT + tca_policy: '' + service_component_type: dcaegen2-analytics_tca + interfaces: + cloudify.interfaces.lifecycle: + start: + inputs: + envs: + DMAAPHOST: + { get_input: dmaap_host } + DMAAPPORT: + { get_input: dmaap_port } + DMAAPPUBTOPIC: "unauthenticated.DCAE_CL_OUTPUT" + DMAAPSUBTOPIC: "unauthenticated.VES_MEASUREMENT_OUTPUT" + AAIHOST: + { get_input: aaiEnrichmentHost } + AAIPORT: + { get_input: aaiEnrichmentPort } + CONSUL_HOST: + { get_input: consul_host } + CONSUL_PORT: + { get_input: consul_port } + CBS_HOST: + { get_input: cbs_host } + CBS_PORT: + { get_input: cbs_port } + CONFIG_BINDING_SERVICE: "config_binding_service" + ports: + - concat: ["11011:", { get_input: external_port }] + tca_policy: + type: clamp.nodes.policy + properties: + policy_id: + get_input: policy_id + policy_model_id: + get_input: policy_model_id \ No newline at end of file diff --git a/robot/assets/sdc/blueprints/tca_docker_k8s_v4.yaml b/robot/assets/sdc/blueprints/tca_docker_k8s_v4.yaml new file mode 100644 index 00000000..9c12dd53 --- /dev/null +++ b/robot/assets/sdc/blueprints/tca_docker_k8s_v4.yaml @@ -0,0 +1,172 @@ +# +# ============LICENSE_START==================================================== +# ============================================================================= +# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. +# ============================================================================= +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END====================================================== + +tosca_definitions_version: cloudify_dsl_1_3 + +description: > + This blueprint deploys/manages the TCA module as a Docker container + +imports: + - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml + - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R3/k8splugin/1.4.4/k8splugin_types.yaml + - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R2/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml + +inputs: + aaiEnrichmentHost: + type: string + default: "aai.onap.svc.cluster.local" + aaiEnrichmentPort: + type: string + default: "8443" + enableAAIEnrichment: + type: string + default: true + dmaap_host: + type: string + default: message-router.onap.svc.cluster.local + dmaap_port: + type: string + default: "3904" + enableRedisCaching: + type: string + default: false + redisHosts: + type: string + default: dcae-redis.onap.svc.cluster.local:6379 + tag_version: + type: string + default: "10.12.5.2:5000/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.0" + consul_host: + type: string + default: consul-server.onap.svc.cluster.local + consul_port: + type: string + default: "8500" + cbs_host: + type: string + default: "config-binding-service.dcae.svc.cluster.local" + cbs_port: + type: string + default: "10000" + policy_id: + type: string + default: "none" + external_port: + type: string + description: Kubernetes node port on which CDAPgui is exposed + default: "32022" + +node_templates: + tca_k8s: + type: dcae.nodes.ContainerizedServiceComponent + relationships: + - target: tca_policy + type: cloudify.relationships.depends_on + properties: + service_component_type: 'dcaegen2-analytics-tca' + application_config: {} + docker_config: {} + image: + get_input: tag_version + log_info: + log_directory: "/opt/app/TCAnalytics/logs" + application_config: + app_config: + appDescription: DCAE Analytics Threshold Crossing Alert Application + appName: dcae-tca + tcaAlertsAbatementTableName: TCAAlertsAbatementTable + tcaAlertsAbatementTableTTLSeconds: '1728000' + tcaSubscriberOutputStreamName: TCASubscriberOutputStream + tcaVESAlertsTableName: TCAVESAlertsTable + tcaVESAlertsTableTTLSeconds: '1728000' + tcaVESMessageStatusTableName: TCAVESMessageStatusTable + tcaVESMessageStatusTableTTLSeconds: '86400' + thresholdCalculatorFlowletInstances: '2' + app_preferences: + aaiEnrichmentHost: + get_input: aaiEnrichmentHost + aaiEnrichmentIgnoreSSLCertificateErrors: 'true' + aaiEnrichmentPortNumber: '8443' + aaiEnrichmentProtocol: https + aaiEnrichmentUserName: dcae@dcae.onap.org + aaiEnrichmentUserPassword: demo123456! + aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query + aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf + enableAAIEnrichment: + get_input: enableAAIEnrichment + enableRedisCaching: + get_input: enableRedisCaching + redisHosts: + get_input: redisHosts + enableAlertCEFFormat: 'false' + publisherContentType: application/json + publisherHostName: + get_input: dmaap_host + publisherHostPort: + get_input: dmaap_port + publisherMaxBatchSize: '1' + publisherMaxRecoveryQueueSize: '100000' + publisherPollingInterval: '20000' + publisherProtocol: http + publisherTopicName: unauthenticated.DCAE_CL_OUTPUT + subscriberConsumerGroup: OpenDCAE-c12 + subscriberConsumerId: c12 + subscriberContentType: application/json + subscriberHostName: + get_input: dmaap_host + subscriberHostPort: + get_input: dmaap_port + subscriberMessageLimit: '-1' + subscriberPollingInterval: '30000' + subscriberProtocol: http + subscriberTimeoutMS: '-1' + subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT + tca_policy: '{"domain":"measurementsForVfScaling","metricsPerEventName":[{"eventName":"vFirewallBroadcastPackets","controlLoopSchemaType":"VNF","policyScope":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta","thresholdValue":300,"direction":"LESS_OR_EQUAL","severity":"MAJOR","closedLoopEventStatus":"ONSET"},{"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta","thresholdValue":700,"direction":"GREATER_OR_EQUAL","severity":"CRITICAL","closedLoopEventStatus":"ONSET"}]},{"eventName":"vLB","controlLoopSchemaType":"VM","policyScope":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta","thresholdValue":300,"direction":"GREATER_OR_EQUAL","severity":"CRITICAL","closedLoopEventStatus":"ONSET"}]},{"eventName":"Measurement_vGMUX","controlLoopSchemaType":"VNF","policyScope":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value","thresholdValue":0,"direction":"EQUAL","severity":"MAJOR","closedLoopEventStatus":"ABATED"},{"closedLoopControlName":"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value","thresholdValue":0,"direction":"GREATER","severity":"CRITICAL","closedLoopEventStatus":"ONSET"}]}]}' + service_component_type: dcaegen2-analytics_tca + interfaces: + cloudify.interfaces.lifecycle: + start: + inputs: + max_wait: 3600 + envs: + DMAAPHOST: + { get_input: dmaap_host } + DMAAPPORT: + { get_input: dmaap_port } + DMAAPPUBTOPIC: "unauthenticated.DCAE_CL_OUTPUT" + DMAAPSUBTOPIC: "unauthenticated.SEC_MEASUREMENT_OUTPUT" + AAIHOST: + { get_input: aaiEnrichmentHost } + AAIPORT: + { get_input: aaiEnrichmentPort } + CONSUL_HOST: + { get_input: consul_host } + CONSUL_PORT: + { get_input: consul_port } + CBS_HOST: + { get_input: cbs_host } + CBS_PORT: + { get_input: cbs_port } + CONFIG_BINDING_SERVICE: "config_binding_service" + ports: + - concat: ["11011:", { get_input: external_port }] + tca_policy: + type: dcae.nodes.policy + properties: + policy_id: + get_input: policy_id diff --git a/robot/assets/templates/sdnc/preload.jinja b/robot/assets/templates/sdnc/preload.jinja index 4f22d60e..9b5e82b6 100644 --- a/robot/assets/templates/sdnc/preload.jinja +++ b/robot/assets/templates/sdnc/preload.jinja @@ -1,7 +1,7 @@ { "input": { "request-information": { - "notification-url": "openecomp.org", + "notification-url": "onap.org", "order-number": "1", "order-version": "1", "request-action": "PreloadVNFRequest", @@ -9,7 +9,7 @@ }, "sdnc-request-header": { "svc-action": "reserve", - "svc-notification-url": "http:\/\/openecomp.org:8080\/adapters\/rest\/SDNCNotify", + "svc-notification-url": "http:\/\/onap.org:8080\/adapters\/rest\/SDNCNotify", "svc-request-id": "robot12" }, "vnf-topology-information": { diff --git a/robot/assets/templates/web/index.html.jinja b/robot/assets/templates/web/index.html.jinja index fb0acbc2..a48181a0 100644 --- a/robot/assets/templates/web/index.html.jinja +++ b/robot/assets/templates/web/index.html.jinja @@ -36,7 +36,7 @@ {{robot}} robot {{appc}} appc -{{mso}} so +{{so}} so {{sdnc}} sdnc {{openo}} multi-service {{dcae_controller}} dcae @@ -51,7 +51,7 @@ {{aai1}} {{prefix}}-aai1 {{robot}} {{prefix}}-robot {{appc}} {{prefix}}-appc -{{mso}} {{prefix}}-so +{{so}} {{prefix}}-so {{sdnc}} {{prefix}}-sdnc {{openo}} {{prefix}}-multi-service {{dcae_controller}} {{prefix}}-dcae @@ -88,7 +88,7 @@ GLOBAL_INJECTED_KEYSTONE = "{{GLOBAL_INJECTED_KEYSTONE}}" GLOBAL_INJECTED_AAI1_IP_ADDR = "{{aai1}}" GLOBAL_INJECTED_APPC_IP_ADDR = "{{appc}}" GLOBAL_INJECTED_DCAE_IP_ADDR = "{{dcae_controller}}" -GLOBAL_INJECTED_SO_IP_ADDR = "{{mso}}" +GLOBAL_INJECTED_SO_IP_ADDR = "{{so}}" GLOBAL_INJECTED_MR_IP_ADDR = "{{message_router}}" GLOBAL_INJECTED_BC_IP_ADDR = "{{bus_controller}}" GLOBAL_INJECTED_POLICY_IP_ADDR = "{{policy}}" @@ -120,11 +120,11 @@ GLOBAL_INJECTED_PUBLIC_NET_ID = "{{GLOBAL_INJECTED_PUBLIC_NET_ID}}" Not working. : Healthcheck

-

MSO

+

SO

- JBOSS GUI with admin/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U

+ JBOSS GUI with admin/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U

- Camunda GUI with admin/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U

+ Camunda GUI with admin/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U

DCAE

@@ -174,7 +174,7 @@ GLOBAL_INJECTED_PUBLIC_NET_ID = "{{GLOBAL_INJECTED_PUBLIC_NET_ID}}" Portal

DCAE

APP-C

- MSO

+ SO

SDN-C

VID

Message Router

@@ -184,7 +184,7 @@ GLOBAL_INJECTED_PUBLIC_NET_ID = "{{GLOBAL_INJECTED_PUBLIC_NET_ID}}" Inside the VM you can list the docker containers by typing:

docker ps

and can get a shell prompt by executing the bash command. - For example:

docker exec -it openecompete_container bash

+ For example:

docker exec -it onapete_container bash

diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot deleted file mode 100644 index 217ba5dd..00000000 --- a/robot/resources/asdc_interface.robot +++ /dev/null @@ -1,994 +0,0 @@ -*** Settings *** -Documentation The main interface for interacting with ASDC. It handles low level stuff like managing the http request library and DCAE required fields -Library RequestsLibrary -Library ONAPLibrary.Utilities -Library ONAPLibrary.JSON -Library OperatingSystem -Library Collections -Library SeleniumLibrary -Library String -Library ArchiveLibrary -Library ONAPLibrary.Openstack -Library DateTime -Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping -Library ONAPLibrary.Templating WITH NAME Templating -Library ONAPLibrary.SDC WITH NAME SDC -Resource global_properties.robot -Resource browser_setup.robot - -*** Variables *** -${ASDC_DESIGNER_USER_ID} cs0008 -${ASDC_TESTER_USER_ID} jm0007 -${ASDC_GOVERNOR_USER_ID} gv0001 -${ASDC_OPS_USER_ID} op0001 -${ASDC_HEALTH_CHECK_PATH} /sdc1/rest/healthCheck -${ASDC_VENDOR_LICENSE_MODEL_PATH} /onboarding-api/v1.0/vendor-license-models -${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} /onboarding-api/v1.0/vendor-software-products -${ASDC_VENDOR_KEY_GROUP_PATH} /license-key-groups -${ASDC_VENDOR_ENTITLEMENT_POOL_PATH} /entitlement-pools -${ASDC_VENDOR_FEATURE_GROUP_PATH} /feature-groups -${ASDC_VENDOR_LICENSE_AGREEMENT_PATH} /license-agreements -${ASDC_VENDOR_ACTIONS_PATH} /actions -${ASDC_VENDOR_SOFTWARE_UPLOAD_PATH} /orchestration-template-candidate -${ASDC_FE_CATALOG_RESOURCES_PATH} /sdc1/feProxy/rest/v1/catalog/resources -${ASDC_FE_CATALOG_SERVICES_PATH} /sdc1/feProxy/rest/v1/catalog/services -${ASDC_CATALOG_RESOURCES_PATH} /sdc2/rest/v1/catalog/resources -${ASDC_CATALOG_SERVICES_PATH} /sdc2/rest/v1/catalog/services -${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} /sdc2/rest/v1/inactiveComponents/resource -${ASDC_CATALOG_RESOURCES_QUERY_PATH} /sdc2/rest/v1/catalog/resources/resourceName -${ASDC_CATALOG_INACTIVE_SERVICES_PATH} /sdc2/rest/v1/inactiveComponents/service -${ASDC_CATALOG_LIFECYCLE_PATH} /lifecycleState -${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} /resourceInstance -${ASDC_CATALOG_SERVICE_RESOURCE_ARTIFACT_PATH} /artifacts -${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH} /distribution-state -${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH} /distribution -${ASDC_DISTRIBUTION_STATE_APPROVE_PATH} /approve -${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} /distribution/PROD/activate -${ASDC_LICENSE_MODEL_TEMPLATE} asdc/license_model.jinja -${ASDC_KEY_GROUP_TEMPLATE} asdc/key_group.jinja -${ASDC_ENTITLEMENT_POOL_TEMPLATE} asdc/entitlement_pool.jinja -${ASDC_FEATURE_GROUP_TEMPLATE} asdc/feature_group.jinja -${ASDC_LICENSE_AGREEMENT_TEMPLATE} asdc/license_agreement.jinja -${ASDC_ACTION_TEMPLATE} asdc/action.jinja -${ASDC_SOFTWARE_PRODUCT_TEMPLATE} asdc/software_product.jinja -${ASDC_ARTIFACT_UPLOAD_TEMPLATE} asdc/artifact_upload.jinja -${ASDC_CATALOG_RESOURCE_TEMPLATE} asdc/catalog_resource.jinja -${ASDC_USER_REMARKS_TEMPLATE} asdc/user_remarks.jinja -${ASDC_CATALOG_SERVICE_TEMPLATE} asdc/catalog_service.jinja -${ASDC_RESOURCE_INSTANCE_TEMPLATE} asdc/resource_instance.jinja -${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} asdc/catalog_vnf_properties.jinja -${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} asdc/catalog_vnf_inputs.jinja -${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} asdc/catalog_net_input_properties.jinja -${ASDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE} asdc/catalog_resource_alloted_resource.jinja -${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE} asdc/catalog_allotted_properties.jinja -${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE} asdc/catalog_allotted_inputs.jinja -${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH} robot/assets/asdc/blueprints/ -${ASDC_FE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_FE_IP_ADDR}:${GLOBAL_ASDC_FE_PORT} -${ASDC_BE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_IP_ADDR}:${GLOBAL_ASDC_BE_PORT} -${ASDC_BE_ONBOARD_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_ONBOARD_IP_ADDR}:${GLOBAL_ASDC_BE_ONBOARD_PORT} - -*** Keywords *** -Distribute Model From ASDC - [Documentation] Goes end to end creating all the ASDC objects based ONAP model and distributing it to the systems. It then returns the service name, VF name and VF module name - [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}=False ${service}= - # For Testing use random service names - #${random}= Get Current Date - #${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name}_${random} - ${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name} - ${catalog_resource_ids}= Create List - ${catalog_resources}= Create Dictionary - ##### TODO: Support for Multiple resources of one type in a service ###### - # The zip list is the resources - no mechanism to indicate more than 1 of the items in the zip list - # Get Service Vnf Mapping has the logical mapping but it is not the same key as model_zip_path - # ${vnflist}= Get Service Vnf Mapping alias ${service} - # Save the resource_id in a dictionary keyed by the resource name in the zipfile name (vFWDT_vFWSNK.zip or vFWDT_vPKG.zip) - # Create the resources but do not immediately add resource - # Add Resource to Service in a separate FOR loop - ${resource_types}= Create Dictionary - - :FOR ${zip} IN @{model_zip_path} - \ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip} ${cds} - # zip can be vFW.zip or vFWDT_VFWSNK.zip - \ ${resource_type_match}= Get Regexp Matches ${zip} ${service}_(.*)\.zip 1 - # Need to be able to distribute preload for vFWCL vFWSNK and vFWDT vFWSNK to prepend service to vnf_type - \ ${resource_type_string}= Set Variable If len(${resource_type_match})==0 ${service} ${service}${resource_type_match[0]} - \ Set To Dictionary ${resource_types} ${resource_type_string} ${loop_catalog_resource_id} - \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} - - ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY} - ${vnflist}= ServiceMapping.Get Service Vnf Mapping default ${service} - - # Spread the icons on the pallette starting on the left - ${xoffset}= Set Variable ${0} - - :FOR ${vnf} IN @{vnflist} - \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${resource_types['${vnf}']} - \ Set To Dictionary ${catalog_resources} ${resource_types['${vnf}']}=${loop_catalog_resource_resp} - \ ${catalog_resource_unique_name}= Add ASDC Resource Instance ${catalog_service_id} ${resource_types['${vnf}']} ${loop_catalog_resource_resp['name']} ${xoffset} - \ ${xoffset}= Set Variable ${xoffset+100} - # - # do this here because the loop_catalog_resource_resp is different format after adding networks - ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule - # - # do network - ${networklist}= ServiceMapping.Get Service Neutron Mapping default ${service} - ${generic_neutron_net_uuid}= Get Generic NeutronNet UUID - :FOR ${network} IN @{networklist} - \ ${loop_catalog_resource_id}= Set Variable ${generic_neutron_net_uuid} - \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} - \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id} - \ ${loop_catalog_resource_id}= Add ASDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${network} ${xoffset} ${0} VL - \ ${nf_role}= Convert To Lowercase ${network} - \ Setup SDC Catalog Resource GenericNeutronNet Properties ${catalog_service_id} ${nf_role} ${loop_catalog_resource_id} - \ ${xoffset}= Set Variable ${xoffset+100} - \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp} - ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} - # - # do deployment artifacts - # - ${deploymentlist}= ServiceMapping.Get Service Deployment Artifact Mapping default ${service} - :FOR ${deployment} IN @{deploymentlist} - \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id} - \ Setup SDC Catalog Resource Deployment Artifact Properties ${catalog_service_id} ${loop_catalog_resource_resp} ${catalog_resource_unique_name} ${deployment} - Run Keyword If ${cds} == True Add CDS Parameters ${catalog_service_name} - Checkin ASDC Catalog Service ${catalog_service_id} - Wait Until Keyword Succeeds 600s 15s Request Certify ASDC Catalog Service ${catalog_service_id} - Start Certify ASDC Catalog Service ${catalog_service_id} - # on certify it gets a new id - ${catalog_service_id}= Certify ASDC Catalog Service ${catalog_service_id} - Approve ASDC Catalog Service ${catalog_service_id} - :FOR ${DIST_INDEX} IN RANGE 1 - \ Log Distribution Attempt ${DIST_INDEX} - \ Distribute ASDC Catalog Service ${catalog_service_id} - \ ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} - \ ${status} ${_} = Run Keyword And Ignore Error Loop Over Check Catalog Service Distributed ${catalog_service_resp['uuid']} - \ Exit For Loop If '${status}'=='PASS' - Should Be Equal As Strings ${status} PASS - [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} - -Distribute vCPEResCust Model From ASDC - [Documentation] Goes end to end creating all the ASDC objects for the vCPE ResCust Service model and distributing it to the systems. It then returns the service name, VF name and VF module name - [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}= ${service}= - # For testing use random service name - #${random}= Get Current Date - ${uuid}= Generate UUID4 - ${random}= Evaluate str("${uuid}")[:4] - ${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name}_${random} - # catalog_service_name already - #${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name} - Log ${\n}ServiceName: ${catalog_service_name}_${random} - #${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name} - ${catalog_resource_ids}= Create List - ${catalog_resources}= Create Dictionary - :FOR ${zip} IN @{model_zip_path} - \ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip} ${cds} - \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} - \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id} - \ Add ASDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']} - \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp} - # - # do this here because the loop_catalog_resource_resp is different format after adding networks - ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule - # - # do allottedresource - ${allottedresource_list}= Create List TunnelXConn BRG - # Example data - #${tunnelxconn_dict}= Create Dictionary invariantUUID=8ac029e7-77aa-40d4-b28a-d17c02d5fd82 UUID=2ddc1b37-d7da-4aab-b645-ed7db34a5d03 node_type=org.openecomp.service.Demovcpevgmux - #${brg_dict}= Create Dictionary invariantUUID=ff0337b9-dbe2-4d88-bb74-18bf027ae586 UUID=1b6974f1-4aed-47f4-b962-816aa1261927 node_type=org.openecomp.service.Demovcpevbrgemu - # Create /tmp/vcpe_allotted_resource_data.json with demo vgmux and brgemu CSARs - Create Allotted Resource Data File - ${vcpe_ar_data_file} OperatingSystem.Get File /tmp/vcpe_allotted_resource_data.json - ${tunnelxconn_invariant_uuid}= Catenate ${vcpe_ar_data_file.json()['tunnelxconn']['invariantUUID']} - ${tunnelxconn_uuid}= Catenate ${vcpe_ar_data_file.json()['tunnelxconn']['UUID']} - ${tunnelxconn_node_type}= Catenate ${vcpe_ar_data_file.json()['tunnelxconn']['node_type']} - ${brg_invariant_uuid}= Catenate ${vcpe_ar_data_file.json()['brg']['invariantUUID']} - ${brg_uuid}= Catenate ${vcpe_ar_data_file.json()['brg']['UUID']} - ${brg_node_type}= Catenate ${vcpe_ar_data_file.json()['brg']['node_type']} - ${tunnelxconn_dict}= Create Dictionary invariantUUID=${tunnelxconn_invariant_uuid} UUID=${tunnelxconn_uuid} node_type=${tunnelxconn_node_type} - ${brg_dict}= Create Dictionary invariantUUID=${brg_invariant_uuid} UUID=${brg_uuid} node_type=${brg_node_type} - ${xoffset}= Set Variable ${100} - ${allottedresource_uuid}= Get AllottedResource UUID - ${random}= Get Current Date - :FOR ${allottedresource} IN @{allottedresource_list} - \ ${loop_catalog_resource_id}= Set Variable ${allottedresource_uuid} - \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} - \ ${loop_catalog_resource_id}= Add ASDC Allotted Resource Catalog Resource 00000 ${allottedresource}_${random} ONAP ${loop_catalog_resource_id} ${allottedresource} - \ ${loop_catalog_resource_id2}= Add ASDC Resource Instance To Resource ${loop_catalog_resource_id} ${allottedresource_uuid} ${allottedresource} ${xoffset} ${0} - \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id} - # - # Set the properties to relate to the brg and gmux - # - \ Run Keyword If '${allottedresource}'=='TunnelXConn' Setup SDC Catalog Resource AllottedResource Properties ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id} ${tunnelxconn_dict['invariantUUID']} ${tunnelxconn_dict['UUID']} ${tunnelxconn_dict['node_type']} - \ Run Keyword If '${allottedresource}'=='BRG' Setup SDC Catalog Resource AllottedResource Properties ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id} ${brg_dict['invariantUUID']} ${brg_dict['UUID']} ${brg_dict['node_type']} - # - # Set the nf_role nf_type - # - \ Run Keyword If '${allottedresource}'=='TunnelXConn' Setup SDC Catalog Resource AllottedResource Inputs ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id} - \ Run Keyword If '${allottedresource}'=='BRG' Setup SDC Catalog Resource AllottedResource Inputs ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id} - \ ${loop_catalog_resource_id}= Certify ASDC Catalog Resource ${loop_catalog_resource_id} ${ASDC_DESIGNER_USER_ID} - \ Add ASDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']} - \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp} - ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} - Checkin ASDC Catalog Service ${catalog_service_id} - Request Certify ASDC Catalog Service ${catalog_service_id} - Start Certify ASDC Catalog Service ${catalog_service_id} - # on certify it gets a new id - ${catalog_service_id}= Certify ASDC Catalog Service ${catalog_service_id} - Approve ASDC Catalog Service ${catalog_service_id} - :FOR ${DIST_INDEX} IN RANGE 1 - \ Log Distribution Attempt ${DIST_INDEX} - \ Distribute ASDC Catalog Service ${catalog_service_id} - \ ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} - \ ${status} ${_} = Run Keyword And Ignore Error Loop Over Check Catalog Service Distributed ${catalog_service_resp['uuid']} - \ Exit For Loop If '${status}'=='PASS' - Should Be Equal As Strings ${status} PASS - [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} - - -Create Allotted Resource Data File - [Documentation] Create Allotted Resource json data file - ${allotted_resource}= Create Dictionary - ${allotted_csar_map}= Create Dictionary - Set To Dictionary ${allotted_csar_map} tunnelxconn=service-Demovcpevgmux-csar.csar - Set To Dictionary ${allotted_csar_map} brg=service-Demovcpevbrgemu-csar.csar - ${keys}= Get Dictionary Keys ${allotted_csar_map} - :FOR ${key} IN @{keys} - \ ${csar}= Get From Dictionary ${allotted_csar_map} ${key} - \ ${dir} ${ext}= Split String From Right ${csar} - 1 - \ Extract Zip File /tmp/csar/${csar} /tmp/csar/${dir} - \ ${template}= Catenate /tmp/csar/${dir}/Definitions/${dir}-template.yml - \ ${json_str}= Template Yaml To Json ${template} - \ ${json_obj}= To Json ${json_str} - \ ${attrs}= Create Dictionary - \ Set To Dictionary ${attrs} invariantUUID=${json_obj['metadata']['invariantUUID']} - \ Set To Dictionary ${attrs} UUID=${json_obj['metadata']['UUID']} - \ Set To Dictionary ${attrs} node_type=${json_obj['topology_template']['substitution_mappings']['node_type']} - \ Set To Dictionary ${allotted_resource} ${key}=${attrs} - ${result_str}= Evaluate json.dumps(${allotted_resource}, indent=2) json - Log ${result_str} - Create File /tmp/vcpe_allotted_resource_data.json ${result_str} - -Download CSAR - [Documentation] Download CSAR - [Arguments] ${catalog_service_id} ${save_directory}=/tmp/csar - # get meta data - ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/filteredDataByParams?include=toscaArtifacts ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - ${csar_resource_id}= Set Variable ${resp.json()['toscaArtifacts']['assettoscacsar']['uniqueId']} - ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/artifacts/${csar_resource_id} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - ${csar_file_name}= Set Variable ${resp.json()['artifactName']} - ${base64Obj}= Set Variable ${resp.json()['base64Contents']} - ${binObj}= Base64 Decode ${base64Obj} - Create Binary File ${save_directory}/${csar_file_name} ${binObj} - Log ${\n}Downloaded:${csar_file_name} - - -Get Generic NeutronNet UUID - [Documentation] Look up the UUID of the Generic NeutronNetwork Resource - ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_QUERY_PATH}/Generic%20NeutronNet/resourceVersion/1.0 ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()['allVersions']['1.0']} - -Get AllottedResource UUID - [Documentation] Look up the UUID of the Allotted Resource - # if this fails then the AllottedResource template got deleted from SDC by mistake - ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_QUERY_PATH}/AllottedResource/resourceVersion/1.0 ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()['allVersions']['1.0']} - -Loop Over Check Catalog Service Distributed - [Arguments] ${catalog_service_id} - # SO watchdog timeout is 300 seconds need buffer - ${dist_status}= Set Variable CONTINUE - :FOR ${CHECK_INDEX} IN RANGE 20 - \ ${status} ${_} = Run Keyword And Ignore Error Check Catalog Service Distributed ${catalog_service_id} ${dist_status} - \ Sleep 20s - \ Return From Keyword If '${status}'=='PASS' - # need a way to exit the loop early on DISTRIBUTION_COMPLETE_ERROR ${dist_status} doesnt work - #\ Exit For Loop If '${dist_status}'=='EXIT' - Should Be Equal As Strings ${status} PASS - -Setup ASDC Catalog Resource - [Documentation] Creates all the steps a VF needs for an ASDC Catalog Resource and returns the id - [Arguments] ${model_zip_path} ${cds}=None - ${license_model_id} ${license_model_version_id}= Add ASDC License Model - - - ${license_temp_date}= Get Current Date - ${license_start_date}= Get Current Date result_format=%m/%d/%Y - ${license_end_date}= Add Time To Date ${license_temp_date} 365 days result_format=%m/%d/%Y - ${key_group_id}= Add ASDC License Group ${license_model_id} ${license_model_version_id} ${license_start_date} ${license_end_date} - ${pool_id}= Add ASDC Entitlement Pool ${license_model_id} ${license_model_version_id} ${license_start_date} ${license_end_date} - - ${feature_group_id}= Add ASDC Feature Group ${license_model_id} ${key_group_id} ${pool_id} ${license_model_version_id} - ${license_agreement_id}= Add ASDC License Agreement ${license_model_id} ${feature_group_id} ${license_model_version_id} - Submit ASDC License Model ${license_model_id} ${license_model_version_id} - ${license_model_resp}= Get ASDC License Model ${license_model_id} ${license_model_version_id} - ${matches}= Get Regexp Matches ${model_zip_path} temp/(.*)\.zip 1 - ${software_product_name_prefix}= Set Variable ${matches[0]} - ${software_product_id} ${software_product_version_id}= Add ASDC Software Product ${license_agreement_id} ${feature_group_id} ${license_model_resp['vendorName']} ${license_model_id} ${license_model_version_id} ${software_product_name_prefix} - Upload ASDC Heat Package ${software_product_id} ${model_zip_path} ${software_product_version_id} - Validate ASDC Software Product ${software_product_id} ${software_product_version_id} - Submit ASDC Software Product ${software_product_id} ${software_product_version_id} - Package ASDC Software Product ${software_product_id} ${software_product_version_id} - ${software_product_resp}= Get ASDC Software Product ${software_product_id} ${software_product_version_id} - ${catalog_resource_id}= Add ASDC Catalog Resource ${license_agreement_id} ${software_product_resp['name']} ${license_model_resp['vendorName']} ${software_product_id} - # Check if need to set up CDS properties - Run Keyword If '${cds}' == 'vfwng' Setup ASDC Catalog Resource CDS Properties ${catalog_resource_id} - - ${catalog_resource_id}= Certify ASDC Catalog Resource ${catalog_resource_id} ${ASDC_DESIGNER_USER_ID} - [Return] ${catalog_resource_id} - - -Setup SDC Catalog Resource Deployment Artifact Properties - [Documentation] Set up Deployment Artiface properties - [Arguments] ${catalog_service_id} ${catalog_parent_service_id} ${catalog_resource_unique_id} ${blueprint_file} - ${resp}= Get ASDC Catalog Resource Component Instances Properties ${catalog_service_id} - ${blueprint_data} OperatingSystem.Get File ${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH}${blueprint_file} - ${payloadData}= Base64 Encode ${blueprint_data} - ${dict}= Create Dictionary artifactLabel=blueprint artifactName=${blueprint_file} artifactType=DCAE_INVENTORY_BLUEPRINT artifactGroupType=DEPLOYMENT description=${blueprint_file} payloadData=${payloadData} - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_ARTIFACT_UPLOAD_TEMPLATE} ${dict} - # POST artifactUpload to resource - ${artifact_upload_path}= Catenate ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/resourceInstance/${catalog_resource_unique_id}${ASDC_CATALOG_SERVICE_RESOURCE_ARTIFACT_PATH} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${artifact_upload_path} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp} - - -Setup SDC Catalog Resource GenericNeutronNet Properties - [Documentation] Set up GenericNeutronNet properties and inputs - [Arguments] ${catalog_service_id} ${nf_role} ${catalog_parent_service_id} - ${resp}= Get ASDC Catalog Resource Component Instances Properties ${catalog_service_id} - ${componentInstances} Set Variable @{resp['componentInstancesProperties']} - # componentInstances can have 1 or more than 1 entry - ${passed}= Run Keyword And Return Status Evaluate type(${componentInstances}) - ${type}= Run Keyword If ${passed} Evaluate type(${componentInstances}) - ${componentInstancesList}= Run Keyword If "${type}"!="" Create List ${componentInstances} - ... ELSE Set Variable ${componentInstances} - :FOR ${item} IN @{componentInstancesList} - \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${item} ${nf_role} - \ Run Keyword If '${test}' == 'FAIL' Continue For Loop - \ ${componentInstance1}= Set Variable ${item} - :FOR ${comp} IN @{resp['componentInstancesProperties']["${componentInstance1}"]} - \ ${name} Set Variable ${comp['name']} - \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${name} network_role - \ Run Keyword If '${test}' == 'FAIL' Continue For Loop - \ ${description} Set Variable ${comp['description']} - \ ${description}= Replace String ${description} ${\n} \ - \ ${uniqueId} Set Variable ${comp['uniqueId']} - \ ${parentUniqueId} Set Variable ${comp['parentUniqueId']} - \ ${ownerId} Set Variable ${comp['ownerId']} - \ ${dict}= Create Dictionary parentUniqueId=${parentUniqueId} ownerId=${ownerId} uniqueId=${uniqueId} description=${description} - \ Run Keyword If '${name}'=='network_role' Set To Dictionary ${dict} name=${name} value=${nf_role} - \ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - \ ${data}= Templating.Apply Template sdc ${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} ${dict} - \ ${response}= Set ASDC Catalog Resource Component Instance Properties ${catalog_parent_service_id} ${catalog_service_id} ${data} - - -Setup SDC Catalog Resource AllottedResource Properties - [Documentation] Set up Allotted Resource properties and inputs - [Arguments] ${catalog_service_id} ${nf_role} ${catalog_resource_id} ${invariantUUID} ${UUID} ${node_type} - # Set component instances properties - ${nf_role_lc}= Convert To Lowercase ${nf_role} - ${resp}= Get ASDC Catalog Resource Component Instances Properties For Resource ${catalog_resource_id} - ${componentInstances} Set Variable @{resp['componentInstancesProperties']} - # componentInstances can have 1 or more than 1 entry - ${passed}= Run Keyword And Return Status Evaluate type(${componentInstances}) - ${type}= Run Keyword If ${passed} Evaluate type(${componentInstances}) - ${componentInstancesList}= Run Keyword If "${type}"!="" Create List ${componentInstances} - ... ELSE Set Variable ${componentInstances} - :FOR ${item} IN @{componentInstancesList} - \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${item} ${nf_role_lc} - \ Run Keyword If '${test}' == 'FAIL' Continue For Loop - \ ${componentInstance1}= Set Variable ${item} - ${dict}= Create Dictionary - :FOR ${comp} IN @{resp['componentInstancesProperties']["${componentInstance1}"]} - \ ${name} Set Variable ${comp['name']} - \ ${test} ${v}= Run Keyword and Ignore Error Should Contain Any ${name} network_role providing_service_invariant_uuid providing_service_uuid providing_service_name uniqueId - \ Run Keyword If '${test}' == 'FAIL' Continue For Loop - \ ${parentUniqueId} Set Variable ${comp['parentUniqueId']} - \ ${ownerId} Set Variable ${comp['ownerId']} - \ Set To Dictionary ${dict} parentUniqueId=${parentUniqueId} ownerId=${ownerId} - \ Run Keyword If '${name}'=='providing_service_invariant_uuid' Set To Dictionary ${dict} providing_service_invariant_uuid=${invariantUUID} - \ Run Keyword If '${name}'=='providing_service_uuid' Set To Dictionary ${dict} providing_service_uuid=${UUID} - \ Run Keyword If '${name}'=='providing_service_name' Set To Dictionary ${dict} providing_service_name=${node_type} - # Sets it for each loop but should be one - \ ${uniqueId} Set Variable ${comp['uniqueId']} - \ ${uniqueId} Fetch From Left ${uniqueId} . - \ Set To Dictionary ${dict} uniqueId=${uniqueId} - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE} ${dict} - ${response}= Set ASDC Catalog Resource Component Instance Properties For Resource ${catalog_resource_id} ${componentInstance1} ${data} - Log resp=${response} - - -Setup SDC Catalog Resource AllottedResource Inputs - [Documentation] Set up Allotted Resource inputs - [Arguments] ${catalog_service_id} ${nf_role} ${catalog_resource_id} - # Set vnf inputs - ${resp}= Get ASDC Catalog Resource Inputs ${catalog_resource_id} - ${dict}= Create Dictionary - :FOR ${comp} IN @{resp['inputs']} - \ ${name} Set Variable ${comp['name']} - \ ${uid} Set Variable ${comp['uniqueId']} - \ Run Keyword If '${name}'=='nf_type' Set To Dictionary ${dict} nf_type=${nf_role} nf_type_uid=${uid} - \ Run Keyword If '${name}'=='nf_role' Set To Dictionary ${dict} nf_role=${nf_role} nf_role_uid=${uid} - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE} ${dict} - ${response}= Set ASDC Catalog Resource VNF Inputs ${catalog_resource_id} ${data} - [Return] ${response} - -Setup ASDC Catalog Resource CDS Properties - [Documentation] Set up vfwng VNF properties and inputs for CDS - [Arguments] ${catalog_resource_id} - # Set vnf module properties - ${resp}= Get ASDC Catalog Resource Component Instances ${catalog_resource_id} - :FOR ${comp} IN @{resp['componentInstances']} - \ ${name} Set Variable ${comp['name']} - \ ${uniqueId} Set Variable ${comp['uniqueId']} - \ ${actualComponentUid} Set Variable ${comp['actualComponentUid']} - \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${name} abstract_ - \ Run Keyword If '${test}' == 'FAIL' Continue For Loop - \ ${response}= Get ASDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${actualComponentUid} - \ ${dict}= Create Dictionary parent_id=${response[6]['parentUniqueId']} - \ Run Keyword If '${name}'=='abstract_vfw' Set To Dictionary ${dict} nfc_function=vfw nfc_naming_policy=SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP - \ Run Keyword If '${name}'=='abstract_vpg' Set To Dictionary ${dict} nfc_function=vpg nfc_naming_policy=SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP - \ Run Keyword If '${name}'=='abstract_vsn' Set To Dictionary ${dict} nfc_function=vsn nfc_naming_policy=SDNC_Policy.ONAP_VSN_NAMING_TIMESTAMP - \ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - \ ${data}= Templating.Apply Template sdc ${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} ${dict} - \ ${response}= Set ASDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${data} - \ Log resp=${response} - - # Set vnf inputs - ${resp}= Get ASDC Catalog Resource Inputs ${catalog_resource_id} - ${dict}= Create Dictionary - :FOR ${comp} IN @{resp['inputs']} - \ ${name} Set Variable ${comp['name']} - \ ${uid} Set Variable ${comp['uniqueId']} - \ Run Keyword If '${name}'=='nf_function' Set To Dictionary ${dict} nf_function=ONAP-FIREWALL nf_function_uid=${uid} - \ Run Keyword If '${name}'=='nf_type' Set To Dictionary ${dict} nf_type=FIREWALL nf_type_uid=${uid} - \ Run Keyword If '${name}'=='nf_naming_code' Set To Dictionary ${dict} nf_naming_code=vfw nf_naming_code_uid=${uid} - \ Run Keyword If '${name}'=='nf_role' Set To Dictionary ${dict} nf_role=vFW nf_role_uid=${uid} - \ Run Keyword If '${name}'=='cloud_env' Set To Dictionary ${dict} cloud_env=openstack cloud_env_uid=${uid} - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} ${dict} - ${response}= Set ASDC Catalog Resource VNF Inputs ${catalog_resource_id} ${data} - -Add ASDC License Model - [Documentation] Creates an ASDC License Model and returns its id - ${uuid}= Generate UUID4 - ${shortened_uuid}= Evaluate str("${uuid}")[:23] - ${map}= Create Dictionary vendor_name=${shortened_uuid} - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_LICENSE_MODEL_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']} - -Get ASDC License Model - [Documentation] gets an asdc license model by its id - [Arguments] ${id} ${version_id}=0.1 - ${resp}= SDC.Run Get Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Get ASDC License Models - [Documentation] Gets all ASDC License Models - ${resp}= SDC.Run Get Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Checkin ASDC License Model - [Documentation] Checks in an ASDC License Model by its id - [Arguments] ${id} ${version_id}=0.1 - ${map}= Create Dictionary action=Checkin - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map} - ${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Submit ASDC License Model - [Documentation] Submits an ASDC License Model by its id - [Arguments] ${id} ${version_id}=0.1 - ${map}= Create Dictionary action=Submit - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map} - ${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Checkin ASDC Software Product - [Documentation] Checks in an ASDC Software Product by its id - [Arguments] ${id} ${version_id}=0.1 - ${map}= Create Dictionary action=Checkin - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map} - ${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Validate ASDC Software Product - [Documentation] Validates an ASDC Software Product by its id - [Arguments] ${id} ${version_id}=0.1 - ${data}= Catenate - ${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}/orchestration-template-candidate/process ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Submit ASDC Software Product - [Documentation] Submits an ASDC Software Product by its id - [Arguments] ${id} ${version_id}=0.1 - ${map}= Create Dictionary action=Submit - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map} - ${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Package ASDC Software Product - [Documentation] Creates a package of an ASDC Software Product by its id - [Arguments] ${id} ${version_id}=0.1 - ${map}= Create Dictionary action=Create_Package - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_ACTION_TEMPLATE} ${map} - ${resp}= SDC.Run Put Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${ASDC_VENDOR_ACTIONS_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Add ASDC Entitlement Pool - [Documentation] Creates an ASDC Entitlement Pool and returns its id - [Arguments] ${license_model_id} ${version_id}=0.1 ${license_start_date}="01/01/1960" ${license_end_date}="01/01/1961" - ${uuid}= Generate UUID4 - ${shortened_uuid}= Evaluate str("${uuid}")[:23] - ${map}= Create Dictionary entitlement_pool_name=${shortened_uuid} license_start_date=${license_start_date} license_end_date=${license_end_date} - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_ENTITLEMENT_POOL_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_ENTITLEMENT_POOL_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()['value']} - -Get ASDC Entitlement Pool - [Documentation] Gets an ASDC Entitlement Pool by its id - [Arguments] ${license_model_id} ${pool_id} - ${resp}= SDC.Run Get Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_ENTITLEMENT_POOL_PATH}/${pool_id} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Add ASDC License Group - [Documentation] Creates an ASDC License Group and returns its id - [Arguments] ${license_model_id} ${version_id}=1.0 ${license_start_date}="01/01/1960" ${license_end_date}="01/01/1961" - ${uuid}= Generate UUID4 - ${shortened_uuid}= Evaluate str("${uuid}")[:23] - ${map}= Create Dictionary key_group_name=${shortened_uuid} license_start_date=${license_start_date} license_end_date=${license_end_date} - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_KEY_GROUP_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_KEY_GROUP_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()['value']} - -Get ASDC License Group - [Documentation] Gets an ASDC License Group by its id - [Arguments] ${license_model_id} ${group_id} ${version_id} - ${resp}= SDC.Run Get Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_KEY_GROUP_PATH}/${group_id} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Add ASDC Feature Group - [Documentation] Creates an ASDC Feature Group and returns its id - [Arguments] ${license_model_id} ${key_group_id} ${entitlement_pool_id} ${version_id}=0.1 - ${uuid}= Generate UUID4 - ${shortened_uuid}= Evaluate str("${uuid}")[:23] - ${map}= Create Dictionary feature_group_name=${shortened_uuid} key_group_id=${key_group_id} entitlement_pool_id=${entitlement_pool_id} manufacturer_reference_number=mrn${shortened_uuid} - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_FEATURE_GROUP_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_FEATURE_GROUP_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()['value']} - -Get ASDC Feature Group - [Documentation] Gets an ASDC Feature Group by its id - [Arguments] ${license_model_id} ${group_id} - ${resp}= SDC.Run Get Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_FEATURE_GROUP_PATH}/${group_id} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Add ASDC License Agreement - [Documentation] Creates an ASDC License Agreement and returns its id - [Arguments] ${license_model_id} ${feature_group_id} ${version_id}=0.1 - ${uuid}= Generate UUID4 - ${shortened_uuid}= Evaluate str("${uuid}")[:23] - ${map}= Create Dictionary license_agreement_name=${shortened_uuid} feature_group_id=${feature_group_id} - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_LICENSE_AGREEMENT_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${ASDC_VENDOR_LICENSE_AGREEMENT_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()['value']} - -Get ASDC License Agreement - [Documentation] Gets an ASDC License Agreement by its id - [Arguments] ${license_model_id} ${agreement_id} - ${resp}= SDC.Run Get Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${ASDC_VENDOR_LICENSE_AGREEMENT_PATH}/${agreement_id} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Add ASDC Software Product - [Documentation] Creates an ASDC Software Product and returns its id - [Arguments] ${license_agreement_id} ${feature_group_id} ${license_model_name} ${license_model_id} ${license_model_version_id} ${name_prefix} - ${uuid}= Generate UUID4 - ${shortened_uuid}= Evaluate str("${uuid}")[:13] - ${software_product_name}= Catenate ${name_prefix} ${shortened_uuid} - ${map}= Create Dictionary software_product_name=${software_product_name} feature_group_id=${feature_group_id} license_agreement_id=${license_agreement_id} vendor_name=${license_model_name} vendor_id=${license_model_id} version_id=${license_model_version_id} - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_SOFTWARE_PRODUCT_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']} - -Get ASDC Software Product - [Documentation] Gets an ASDC Software Product by its id - [Arguments] ${software_product_id} ${version_id}=0.1 - ${resp}= SDC.Run Get Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Add ASDC Catalog Resource - [Documentation] Creates an ASDC Catalog Resource and returns its id - [Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id} - ${map}= Create Dictionary software_product_id=${software_product_id} software_product_name=${software_product_name} license_agreement_id=${license_agreement_id} vendor_name=${license_model_name} - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_CATALOG_RESOURCE_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 201 - [Return] ${resp.json()['uniqueId']} - -Add ASDC Allotted Resource Catalog Resource - [Documentation] Creates an ASDC Allotted Resource Catalog Resource and returns its id - [Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id} ${subcategory} - ${map}= Create Dictionary software_product_id=${software_product_id} software_product_name=${software_product_name} license_agreement_id=${license_agreement_id} vendor_name=${license_model_name} subcategory=${subcategory} - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 201 - [Return] ${resp.json()['uniqueId']} - -Mark ASDC Catalog Resource Inactive - [Documentation] Marks ASDC Catalog Resource as inactive - [Arguments] ${catalog_resource_id} - ${resp}= SDC.Run Delete Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${None} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 204 - [Return] ${resp} - -Delete Inactive ASDC Catalog Resources - [Documentation] Delete all ASDC Catalog Resources that are inactive - ${resp}= SDC.Run Delete Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} ${None} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Get ASDC Catalog Resource - [Documentation] Gets an ASDC Catalog Resource by its id - [Arguments] ${catalog_resource_id} - ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Get ASDC Catalog Resource Component Instances - [Documentation] Gets component instances of an ASDC Catalog Resource by its id - [Arguments] ${catalog_resource_id} - ${resp}= SDC.Run Get Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstances ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Get ASDC Catalog Resource Deployment Artifact Properties - [Documentation] Gets deployment artifact properties of an ASDC Catalog Resource by its id - [Arguments] ${catalog_resource_id} - ${resp}= SDC.Run Get Request ${ASDC_FE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_resource_id}/filteredDataByParams?include=deploymentArtifacts ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - - -Get ASDC Catalog Resource Component Instances Properties - [Documentation] Gets ASDC Catalog Resource component instances properties by its id - [Arguments] ${catalog_resource_id} - ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstancesProperties ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Get ASDC Catalog Resource Component Instances Properties For Resource - [Documentation] Gets ASDC Catalog Resource component instances properties for a Resource (VF) by its id - [Arguments] ${catalog_resource_id} - ${resp}= SDC.Run Get Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstancesProperties ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Get ASDC Catalog Resource Inputs - [Documentation] Gets ASDC Catalog Resource inputs by its id - [Arguments] ${catalog_resource_id} - ${resp}= SDC.Run Get Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=inputs ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Get ASDC Catalog Resource Component Instance Properties - [Documentation] Gets component instance properties of an ASDC Catalog Resource by their ids - [Arguments] ${catalog_resource_id} ${component_instance_id} ${component_id} - ${resp}= SDC.Run Get Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/componentInstances/${component_instance_id}/${component_id}/inputs ${ASDC_DESIGNER_USER_ID}auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Set ASDC Catalog Resource Component Instance Properties - [Documentation] Sets ASDC Catalog Resource component instance properties by ids - [Arguments] ${catalog_resource_id} ${component_parent_service_id} ${data} - ${resp}= SDC.Run Post Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_SERVICES_PATH}/${component_parent_service_id}/resourceInstance/${catalog_resource_id}/properties ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Set ASDC Catalog Resource Component Instance Properties For Resource - [Documentation] Sets ASDC Resource component instance properties by ids - [Arguments] ${catalog_parent_resource_id} ${catalog_resource_id} ${data} - ${resp}= SDC.Run Post Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_parent_resource_id}/resourceInstance/${catalog_resource_id}/properties ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Set CDS Catalog Resource Component Instance Properties - [Documentation] Sets CDS Catalog Resource component instance properties by ids - [Arguments] ${catalog_resource_id} ${component_instance_id} ${data} - ${resp}= SDC.Run Post Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/resourceInstance/${component_instance_id}/inputs ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Set ASDC Catalog Resource VNF Inputs - [Documentation] Sets VNF Inputs for an ASDC Catalog Resource by its id - [Arguments] ${catalog_resource_id} ${data} - ${resp}= SDC.Run Post Request ${ASDC_FE_ENDPOINT} ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/update/inputs ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Get SDC Demo Vnf Catalog Resource - [Documentation] Gets Resource ids of demonstration VNFs for instantiation - [Arguments] ${service_name} - ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/serviceName/${service_name}/serviceVersion/1.0 ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - @{ITEMS}= Copy List ${resp.json()['componentInstances']} - ${demo_catalog_resource}= Create Dictionary - :FOR ${ELEMENT} IN @{ITEMS} - \ Log ${ELEMENT['name']} - \ Log ${ELEMENT['groupInstances'][0]['groupName']} - \ ${vnf}= Get VNF From Group Name ${ELEMENT['groupInstances'][0]['groupName']} ${service_name} - \ ${vnf_data}= Create Dictionary vnf_type=${ELEMENT['name']} vf_module=${ELEMENT['groupInstances'][0]['groupName']} - \ LOG ${vnf_data} - \ Set To Dictionary ${demo_catalog_resource} ${vnf}=${vnf_data} - \ LOG ${demo_catalog_resource} - [Return] ${demo_catalog_resource} - -Get VNF From Group Name - [Documentation] Looks up VNF key from service mapping for a regex on group_name and service_name - [Arguments] ${group_name} ${service_name} - ${vnf}= Set Variable If - ... ('${service_name}'=='demoVFWCL') and ('base_vfw' in '${group_name}') vFWCLvFWSNK - ... ('${service_name}'=='demoVFWCL') and ('base_vpkg' in '${group_name}') vFWCLvPKG - ... ('${service_name}'=='demoVLB') and ('base_vlb' in '${group_name}') vLB - [Return] ${vnf} - -Checkin ASDC Catalog Resource - [Documentation] Checks in an ASDC Catalog Resource by its id - [Arguments] ${catalog_resource_id} - ${map}= Create Dictionary user_remarks=Robot remarks - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_DESIGNER_USER_ID} ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Request Certify ASDC Catalog Resource - [Documentation] Requests certification of an ASDC Catalog Resource by its id - [Arguments] ${catalog_resource_id} - ${map}= Create Dictionary user_remarks=Robot remarks - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Start Certify ASDC Catalog Resource - [Documentation] Start certification of an ASDC Catalog Resource by its id - [Arguments] ${catalog_resource_id} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${ASDC_TESTER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Certify ASDC Catalog Resource - [Documentation] Certifies an ASDC Catalog Resource by its id and returns the new id - [Arguments] ${catalog_resource_id} ${user_id}=${ASDC_TESTER_USER_ID} - ${map}= Create Dictionary user_remarks=Robot remarks - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${user_id} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()['uniqueId']} - -Upload ASDC Heat Package - [Documentation] Creates an ASDC Software Product and returns its id - [Arguments] ${software_product_id} ${file_path} ${version_id}=0.1 - ${files}= Create Dictionary - Create Multi Part ${files} upload ${file_path} contentType=application/zip - ${resp}= SDC.Run Post Files Request ${ASDC_BE_ONBOARD_ENDPOINT} ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id}${ASDC_VENDOR_SOFTWARE_UPLOAD_PATH} ${files} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - -Add ASDC Catalog Service - [Documentation] Creates an ASDC Catalog Service and returns its id - [Arguments] ${catalog_service_name} - ${uuid}= Generate UUID4 - ${shortened_uuid}= Evaluate str("${uuid}")[:23] - ${catalog_service_name}= Set Variable If '${catalog_service_name}' =='' ${shortened_uuid} ${catalog_service_name} - ${map}= Create Dictionary service_name=${catalog_service_name} - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_CATALOG_SERVICE_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 201 - [Return] ${resp.json()['uniqueId']} - -Mark ASDC Catalog Service Inactive - [Documentation] Deletes an ASDC Catalog Service - [Arguments] ${catalog_service_id} - ${resp}= SDC.Run Delete Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${None} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 204 - [Return] ${resp} - -Delete Inactive ASDC Catalog Services - [Documentation] Delete all ASDC Catalog Services that are inactive - ${resp}= SDC.Run Delete Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_INACTIVE_SERVICES_PATH} ${None} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Get ASDC Catalog Service - [Documentation] Gets an ASDC Catalog Service by its id - [Arguments] ${catalog_service_id} - ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - [Return] ${resp.json()} - -Checkin ASDC Catalog Service - [Documentation] Checks in an ASDC Catalog Service by its id - [Arguments] ${catalog_service_id} - ${map}= Create Dictionary user_remarks=Robot remarks - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Request Certify ASDC Catalog Service - [Documentation] Requests certification of an ASDC Catalog Service by its id - [Arguments] ${catalog_service_id} - ${map}= Create Dictionary user_remarks=Robot remarks - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Start Certify ASDC Catalog Service - [Documentation] Start certification of an ASDC Catalog Service by its id - [Arguments] ${catalog_service_id} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${ASDC_TESTER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Certify ASDC Catalog Service - [Documentation] Certifies an ASDC Catalog Service by its id and returns the new id - [Arguments] ${catalog_service_id} - ${map}= Create Dictionary user_remarks=Robot remarks - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${ASDC_TESTER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()['uniqueId']} - -Approve ASDC Catalog Service - [Documentation] Approves an ASDC Catalog Service by its id - [Arguments] ${catalog_service_id} - ${map}= Create Dictionary user_remarks=Robot remarks - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_USER_REMARKS_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH}${ASDC_DISTRIBUTION_STATE_APPROVE_PATH} ${data} ${ASDC_GOVERNOR_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Distribute ASDC Catalog Service - [Documentation] distribute an asdc Catalog Service by its id - [Arguments] ${catalog_service_id} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} ${None} ${ASDC_OPS_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Add ASDC Resource Instance - [Documentation] Creates an ASDC Resource Instance and returns its id - [Arguments] ${catalog_service_id} ${catalog_resource_id} ${catalog_resource_name} ${xoffset}=${0} ${yoffset}=${0} ${resourceType}=VF - ${milli_timestamp}= Generate Timestamp - ${xoffset}= Set Variable ${xoffset+306} - ${yoffset}= Set Variable ${yoffset+248} - ${map}= Create Dictionary catalog_resource_id=${catalog_resource_id} catalog_resource_name=${catalog_resource_name} milli_timestamp=${milli_timestamp} posX=${xoffset} posY=${yoffset} originType=${resourceType} - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 201 - [Return] ${resp.json()['uniqueId']} - -Add ASDC Resource Instance To Resource - [Documentation] Creates an ASDC Resource Instance in a Resource (VF) and returns its id - [Arguments] ${parent_catalog_resource_id} ${catalog_resource_id} ${catalog_resource_name} ${xoffset}=${0} ${yoffset}=${0} ${resourceType}=VF - ${milli_timestamp}= Generate Timestamp - ${xoffset}= Set Variable ${xoffset+306} - ${yoffset}= Set Variable ${yoffset+248} - ${map}= Create Dictionary catalog_resource_id=${catalog_resource_id} catalog_resource_name=${catalog_resource_name} milli_timestamp=${milli_timestamp} posX=${xoffset} posY=${yoffset} originType=${resourceType} - Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template sdc ${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${map} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_RESOURCES_PATH}/${parent_catalog_resource_id}${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 201 - [Return] ${resp.json()['uniqueId']} - -Get Catalog Service Distribution - [Documentation] Gets an ASDC Catalog Service distribution - [Arguments] ${catalog_service_uuid} - ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_uuid}${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH} ${ASDC_OPS_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Check Catalog Service Distributed - [Documentation] Checks if an ASDC Catalog Service is distributed - [Arguments] ${catalog_service_uuid} ${dist_status} - ${dist_resp}= Get Catalog Service Distribution ${catalog_service_uuid} - Should Be Equal As Strings ${dist_resp['distributionStatusOfServiceList'][0]['deployementStatus']} Distributed - ${det_resp}= Get Catalog Service Distribution Details ${dist_resp['distributionStatusOfServiceList'][0]['distributionID']} - @{ITEMS}= Copy List ${det_resp['distributionStatusList']} - Should Not Be Empty ${ITEMS} - ${SO_COMPLETE} Set Variable FALSE - ${dist_status} Set Variable CONTINUE - Should Not Be Empty ${ITEMS} - :FOR ${ELEMENT} IN @{ITEMS} - \ Log ${ELEMENT['omfComponentID']} - \ Log ${ELEMENT['status']} - \ ${SO_COMPLETE} Set Variable If (('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_OK')) or ('${SO_COMPLETE}'=='TRUE') TRUE - \ Exit For Loop If ('${SO_COMPLETE}'=='TRUE') - \ Exit For Loop If ('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_ERROR') - \ ${dist_status}= Set Variable If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml')) EXIT - \ Exit For Loop If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml')) - Should Be True ( '${SO_COMPLETE}'=='TRUE') SO Test - -Get Catalog Service Distribution Details - [Documentation] Gets ASDC Catalog Service distribution details - [Arguments] ${catalog_service_distribution_id} - ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH}/${catalog_service_distribution_id} ${ASDC_OPS_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp.json()} - -Run ASDC Health Check - [Documentation] Runs a ASDC health check - ${resp}= SDC.Run Get Request ${ASDC_FE_ENDPOINT} ${ASDC_HEALTH_CHECK_PATH} user=${None} - # only test for HTTP 200 to determine SDC Health. SDC_DE_HEALTH is informational - Should Be Equal As Strings ${resp.status_code} 200 SDC DOWN - ${SDC_DE_HEALTH}= Catenate DOWN - @{ITEMS}= Copy List ${resp.json()['componentsInfo']} - :FOR ${ELEMENT} IN @{ITEMS} - \ Log ${ELEMENT['healthCheckStatus']} - \ ${SDC_DE_HEALTH} Set Variable If (('DE' in '${ELEMENT['healthCheckComponent']}') and ('${ELEMENT['healthCheckStatus']}' == 'UP')) or ('${SDC_DE_HEALTH}'=='UP') UP - Log (DMaaP:${SDC_DE_HEALTH}) - -Open ASDC GUI - [Documentation] Logs in to ASDC GUI - [Arguments] ${PATH} - ## Setup Browever now being managed by the test case - ##Setup Browser - Go To ${ASDC_FE_ENDPOINT}${PATH} - Maximize Browser Window - - Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} - Log Logging in to ${ASDC_FE_ENDPOINT}${PATH} - Title Should Be ASDC - Wait Until Page Contains Element xpath=//div/a[text()='SDC'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} - Log Logged in to ${ASDC_FE_ENDPOINT}${PATH} - - -Create Multi Part - [Arguments] ${addTo} ${partName} ${filePath} ${contentType}=${None} - ${fileData}= Get Binary File ${filePath} - ${fileDir} ${fileName}= Split Path ${filePath} - ${partData}= Create List ${fileName} ${fileData} ${contentType} - Set To Dictionary ${addTo} ${partName}=${partData} - - -Add CDS Parameters - [Arguments] ${catalog_service_name} - ${resp}= SDC.Run Get Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/serviceName/${catalog_service_name}/serviceVersion/0.1 ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - #${resp_json}= To Json ${resp} - ${service_uuid}= Set Variable ${resp.json()['uniqueId']} - ${component_uuid}= Set Variable ${resp.json()['componentInstances'][0]['uniqueId']} - @{inputs}= Copy List ${resp.json()['componentInstances'][0]['inputs']} - :FOR ${input} IN @{inputs} - \ Run Keyword If '${input['name']}' == "sdnc_artifact_name" Set Input Parameter ${service_uuid} ${component_uuid} ${input} string vdns-vnf - ... ELSE IF '${input['name']}' == "sdnc_model_name" Set Input Parameter ${service_uuid} ${component_uuid} ${input} string test - ... ELSE IF '${input['name']}' == "sdnc_model_version" Set Input Parameter ${service_uuid} ${component_uuid} ${input} string 1.0.0 - ... ELSE IF '${input['name']}' == "skip_post_instantiation_configuration" Set Input Parameter ${service_uuid} ${component_uuid} ${input} boolean false - - -Set Input Parameter - [Arguments] ${service_uuid} ${component_uuid} ${input} ${input_type} ${input_value} - ${resp}= SDC.Run Post Request ${ASDC_BE_ENDPOINT} ${ASDC_CATALOG_SERVICES_PATH}/${service_uuid}/resourceInstance/${component_uuid}/inputs {"constraints":[],"name":"${input['name']}","parentUniqueId":"${input['parentUniqueId']}","password":false,"required":false,"schema":{"property":{}},"type":"${input_type}","uniqueId":"${input['uniqueId']}","value":"${input_value}","definition":false,"toscaPresentation":{"ownerId":"${input['ownerId']}"}} ${ASDC_DESIGNER_USER_ID} auth=${GLOBAL_ASDC_AUTHENTICATION} - Should Be Equal As Strings ${resp.status_code} 200 diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot index abf272db..903df142 100644 --- a/robot/resources/demo_preload.robot +++ b/robot/resources/demo_preload.robot @@ -4,7 +4,7 @@ Documentation This test template encapsulates the VNF Orchestration use case. Resource test_templates/model_test_template.robot Resource test_templates/model_test_template_vcperescust.robot Resource test_templates/vnf_orchestration_test_template.robot -Resource asdc_interface.robot +Resource sdc_interface.robot Resource vid/vid_interface.robot Resource consul_interface.robot Resource policy_interface.robot @@ -30,7 +30,7 @@ ${VPKG_MODULE_LABEL} base_vpkg *** Keywords *** Load Customer And Models - [Documentation] Use openECOMP to Orchestrate a service. + [Documentation] Use ONAP to Orchestrate a service. [Arguments] ${customer_name} Load OwningEntity lineOfBusiness LOB-${customer_name} Load OwningEntity platform Platform-${customer_name} @@ -40,7 +40,7 @@ Load Customer And Models Load Models ${customer_name} Load OwningEntity - [Documentation] Use openECOMP to Orchestrate a service. + [Documentation] Use ONAP to Orchestrate a service. [Arguments] ${parameter} ${name} ${data_path}= Set Variable /maintenance/category_parameter/${parameter} ${vid_data}= Set Variable {"options":["${name}"]} @@ -52,7 +52,7 @@ Load OwningEntity ${resp}= Post Request vid ${data_path} data=${vid_data} headers=${headers} Load Customer - [Documentation] Use openECOMP to Orchestrate a service. + [Documentation] Use ONAP to Orchestrate a service. [Arguments] ${customer_name} ${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone ${region}= Get Openstack Region @@ -61,7 +61,7 @@ Load Customer Create Availability Zone If Not Exists ${GLOBAL_AAI_CLOUD_OWNER} ${region} ${GLOBAL_AAI_AVAILABILITY_ZONE_NAME} Load Models - [Documentation] Use openECOMP to Orchestrate a service. + [Documentation] Use ONAP to Orchestrate a service. [Arguments] ${customer_name} Log ${\n}Distributing vFWCL ${status} ${value}= Run Keyword And Ignore Error Distribute Model vFWCL ${DEMO_PREFIX}VFWCL @@ -180,8 +180,8 @@ Instantiate VNF Save For Delete ${tenant_id} ${tenant_name} ${server_id} DemoCust_${uuid} ${service_instance_id} ${stack_name} ${catalog_service_id} ${catalog_resource_ids} :FOR ${vf_module_name} IN @{vf_module_name_list} \ Log VNF Module Name=${vf_module_name} - # Don't get from MSO for now due to SO-1186 - # ${model_invariant_id}= Run MSO Get ModelInvariantId ${suite_service_model_name} ${vf_module_label} + # Don't get from SO for now due to SO-1186 + # ${model_invariant_id}= Run SO Get ModelInvariantId ${suite_service_model_name} ${vf_module_label} ${model_invariant_id}= Set Variable ${EMPTY} :FOR ${vf_module} IN @{generic_vnfs} \ ${generic_vnf}= Get From Dictionary ${generic_vnfs} ${vf_module} @@ -199,8 +199,8 @@ Instantiate Demo VNF ${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone ${vf_module_name} ${service} ${generic_vnfs}= Orchestrate Demo VNF Demonstration ${service} ${service} ${tenant_id} ${tenant_name} Log VNF Module Name=${vf_module_name} - # Don't get from MSO for now due to SO-1186 - # ${model_invariant_id}= Run MSO Get ModelInvariantId ${suite_service_model_name} ${vf_module_label} + # Don't get from SO for now due to SO-1186 + # ${model_invariant_id}= Run SO Get ModelInvariantId ${suite_service_model_name} ${vf_module_label} ${model_invariant_id}= Set Variable ${EMPTY} :FOR ${vf_module} IN @{generic_vnfs} \ ${generic_vnf}= Get From Dictionary ${generic_vnfs} ${vf_module} diff --git a/robot/resources/global_properties.robot b/robot/resources/global_properties.robot index 488e02ef..ff56b031 100644 --- a/robot/resources/global_properties.robot +++ b/robot/resources/global_properties.robot @@ -35,16 +35,16 @@ ${GLOBAL_AAI_DESIGN_TYPE} integration ${GLOBAL_AAI_ZONE_CONTEXT} labs ${GLOBAL_TEMPLATE_FOLDER} robot/assets/templates ${GLOBAL_SERVICE_MAPPING_DIRECTORY} ./demo/service_mapping -${GLOBAL_SO_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_IP_ADDR}:${GLOBAL_MSO_SERVER_PORT} -${GLOBAL_SO_APIHAND_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_APIHAND_IP_ADDR}:${GLOBAL_MSO_APIHAND_SERVER_PORT} -${GLOBAL_SO_ASDCHAND_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_ASDCHAND_IP_ADDR}:${GLOBAL_MSO__ASDCHAND_SERVER_PORT} -${GLOBAL_SO_BPMN_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_BPMN_IP_ADDR}:${GLOBAL_MSO_BPMN_SERVER_PORT} -${GLOBAL_SO_CATDB_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_CATDB_IP_ADDR}:${GLOBAL_MSO__CATDB_SERVER_PORT} -${GLOBAL_SO_OPENSTACK_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_OPENSTACK_IP_ADDR}:${GLOBAL_MSO_OPENSTACK_SERVER_PORT} -${GLOBAL_SO_REQDB_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_REQDB_IP_ADDR}:${GLOBAL_MSO_REQDB_SERVER_PORT} -${GLOBAL_SO_SDNC_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_SDNC_IP_ADDR}:${GLOBAL_MSO_SDNC_SERVER_PORT} -${GLOBAL_SO_VFC_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_VFC_IP_ADDR}:${GLOBAL_MSO_VFC_SERVER_PORT} -${GLOBAL_SO_VNFM_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_VNFM_IP_ADDR}:${GLOBAL_MSO_VNFM_SERVER_PORT} +${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_IP_ADDR}:${GLOBAL_SO_SERVER_PORT} +${GLOBAL_SO_APIHAND_ENDPOINT} ${GLOBAL_SO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_APIHAND_IP_ADDR}:${GLOBAL_SO_APIHAND_SERVER_PORT} +${GLOBAL_SO_SDCHAND_ENDPOINT} ${GLOBAL_SO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_SDCHAND_IP_ADDR}:${GLOBAL_SO_SDCHAND_SERVER_PORT} +${GLOBAL_SO_BPMN_ENDPOINT} ${GLOBAL_SO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_BPMN_IP_ADDR}:${GLOBAL_SO_BPMN_SERVER_PORT} +${GLOBAL_SO_CATDB_ENDPOINT} ${GLOBAL_SO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_CATDB_IP_ADDR}:${GLOBAL_SO_CATDB_SERVER_PORT} +${GLOBAL_SO_OPENSTACK_ENDPOINT} ${GLOBAL_SO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_OPENSTACK_IP_ADDR}:${GLOBAL_SO_OPENSTACK_SERVER_PORT} +${GLOBAL_SO_REQDB_ENDPOINT} ${GLOBAL_SO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_REQDB_IP_ADDR}:${GLOBAL_SO_REQDB_SERVER_PORT} +${GLOBAL_SO_SDNC_ENDPOINT} ${GLOBAL_SO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_SDNC_IP_ADDR}:${GLOBAL_SO_SDNC_SERVER_PORT} +${GLOBAL_SO_VFC_ENDPOINT} ${GLOBAL_SO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_VFC_IP_ADDR}:${GLOBAL_SO_VFC_SERVER_PORT} +${GLOBAL_SO_VNFM_ENDPOINT} ${GLOBAL_SO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_VNFM_IP_ADDR}:${GLOBAL_SO_VNFM_SERVER_PORT} ${GLOBAL_SO_HEALTH_CHECK_PATH} /manage/health ${GLOBAL_SO_CLOUD_CONFIG_PATH} /cloudSite ${GLOBAL_SO_CLOUD_CONFIG_TEMPLATE} robot/assets/templates/so/create_cloud_config.jinja \ No newline at end of file diff --git a/robot/resources/sdc_interface.robot b/robot/resources/sdc_interface.robot new file mode 100644 index 00000000..9d1daacb --- /dev/null +++ b/robot/resources/sdc_interface.robot @@ -0,0 +1,994 @@ +*** Settings *** +Documentation The main interface for interacting with SDC. It handles low level stuff like managing the http request library and DCAE required fields +Library RequestsLibrary +Library ONAPLibrary.Utilities +Library ONAPLibrary.JSON +Library OperatingSystem +Library Collections +Library SeleniumLibrary +Library String +Library ArchiveLibrary +Library ONAPLibrary.Openstack +Library DateTime +Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping +Library ONAPLibrary.Templating WITH NAME Templating +Library ONAPLibrary.SDC WITH NAME SDC +Resource global_properties.robot +Resource browser_setup.robot + +*** Variables *** +${SDC_DESIGNER_USER_ID} cs0008 +${SDC_TESTER_USER_ID} jm0007 +${SDC_GOVERNOR_USER_ID} gv0001 +${SDC_OPS_USER_ID} op0001 +${SDC_HEALTH_CHECK_PATH} /sdc1/rest/healthCheck +${SDC_VENDOR_LICENSE_MODEL_PATH} /onboarding-api/v1.0/vendor-license-models +${SDC_VENDOR_SOFTWARE_PRODUCT_PATH} /onboarding-api/v1.0/vendor-software-products +${SDC_VENDOR_KEY_GROUP_PATH} /license-key-groups +${SDC_VENDOR_ENTITLEMENT_POOL_PATH} /entitlement-pools +${SDC_VENDOR_FEATURE_GROUP_PATH} /feature-groups +${SDC_VENDOR_LICENSE_AGREEMENT_PATH} /license-agreements +${SDC_VENDOR_ACTIONS_PATH} /actions +${SDC_VENDOR_SOFTWARE_UPLOAD_PATH} /orchestration-template-candidate +${SDC_FE_CATALOG_RESOURCES_PATH} /sdc1/feProxy/rest/v1/catalog/resources +${SDC_FE_CATALOG_SERVICES_PATH} /sdc1/feProxy/rest/v1/catalog/services +${SDC_CATALOG_RESOURCES_PATH} /sdc2/rest/v1/catalog/resources +${SDC_CATALOG_SERVICES_PATH} /sdc2/rest/v1/catalog/services +${SDC_CATALOG_INACTIVE_RESOURCES_PATH} /sdc2/rest/v1/inactiveComponents/resource +${SDC_CATALOG_RESOURCES_QUERY_PATH} /sdc2/rest/v1/catalog/resources/resourceName +${SDC_CATALOG_INACTIVE_SERVICES_PATH} /sdc2/rest/v1/inactiveComponents/service +${SDC_CATALOG_LIFECYCLE_PATH} /lifecycleState +${SDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} /resourceInstance +${SDC_CATALOG_SERVICE_RESOURCE_ARTIFACT_PATH} /artifacts +${SDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH} /distribution-state +${SDC_CATALOG_SERVICE_DISTRIBUTION_PATH} /distribution +${SDC_DISTRIBUTION_STATE_APPROVE_PATH} /approve +${SDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} /distribution/PROD/activate +${SDC_LICENSE_MODEL_TEMPLATE} sdc/license_model.jinja +${SDC_KEY_GROUP_TEMPLATE} sdc/key_group.jinja +${SDC_ENTITLEMENT_POOL_TEMPLATE} sdc/entitlement_pool.jinja +${SDC_FEATURE_GROUP_TEMPLATE} sdc/feature_group.jinja +${SDC_LICENSE_AGREEMENT_TEMPLATE} sdc/license_agreement.jinja +${SDC_ACTION_TEMPLATE} sdc/action.jinja +${SDC_SOFTWARE_PRODUCT_TEMPLATE} sdc/software_product.jinja +${SDC_ARTIFACT_UPLOAD_TEMPLATE} sdc/artifact_upload.jinja +${SDC_CATALOG_RESOURCE_TEMPLATE} sdc/catalog_resource.jinja +${SDC_USER_REMARKS_TEMPLATE} sdc/user_remarks.jinja +${SDC_CATALOG_SERVICE_TEMPLATE} sdc/catalog_service.jinja +${SDC_RESOURCE_INSTANCE_TEMPLATE} sdc/resource_instance.jinja +${SDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} sdc/catalog_vnf_properties.jinja +${SDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} sdc/catalog_vnf_inputs.jinja +${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} sdc/catalog_net_input_properties.jinja +${SDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE} sdc/catalog_resource_alloted_resource.jinja +${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE} sdc/catalog_allotted_properties.jinja +${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE} sdc/catalog_allotted_inputs.jinja +${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH} robot/assets/sdc/blueprints/ +${SDC_FE_ENDPOINT} ${GLOBAL_SDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_FE_IP_ADDR}:${GLOBAL_SDC_FE_PORT} +${SDC_BE_ENDPOINT} ${GLOBAL_SDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_IP_ADDR}:${GLOBAL_SDC_BE_PORT} +${SDC_BE_ONBOARD_ENDPOINT} ${GLOBAL_SDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_ONBOARD_IP_ADDR}:${GLOBAL_SDC_BE_ONBOARD_PORT} + +*** Keywords *** +Distribute Model From SDC + [Documentation] Goes end to end creating all the SDC objects based ONAP model and distributing it to the systems. It then returns the service name, VF name and VF module name + [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}=False ${service}= + # For Testing use random service names + #${random}= Get Current Date + #${catalog_service_id}= Add SDC Catalog Service ${catalog_service_name}_${random} + ${catalog_service_id}= Add SDC Catalog Service ${catalog_service_name} + ${catalog_resource_ids}= Create List + ${catalog_resources}= Create Dictionary + ##### TODO: Support for Multiple resources of one type in a service ###### + # The zip list is the resources - no mechanism to indicate more than 1 of the items in the zip list + # Get Service Vnf Mapping has the logical mapping but it is not the same key as model_zip_path + # ${vnflist}= Get Service Vnf Mapping alias ${service} + # Save the resource_id in a dictionary keyed by the resource name in the zipfile name (vFWDT_vFWSNK.zip or vFWDT_vPKG.zip) + # Create the resources but do not immediately add resource + # Add Resource to Service in a separate FOR loop + ${resource_types}= Create Dictionary + + :FOR ${zip} IN @{model_zip_path} + \ ${loop_catalog_resource_id}= Setup SDC Catalog Resource ${zip} ${cds} + # zip can be vFW.zip or vFWDT_VFWSNK.zip + \ ${resource_type_match}= Get Regexp Matches ${zip} ${service}_(.*)\.zip 1 + # Need to be able to distribute preload for vFWCL vFWSNK and vFWDT vFWSNK to prepend service to vnf_type + \ ${resource_type_string}= Set Variable If len(${resource_type_match})==0 ${service} ${service}${resource_type_match[0]} + \ Set To Dictionary ${resource_types} ${resource_type_string} ${loop_catalog_resource_id} + \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} + + ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY} + ${vnflist}= ServiceMapping.Get Service Vnf Mapping default ${service} + + # Spread the icons on the pallette starting on the left + ${xoffset}= Set Variable ${0} + + :FOR ${vnf} IN @{vnflist} + \ ${loop_catalog_resource_resp}= Get SDC Catalog Resource ${resource_types['${vnf}']} + \ Set To Dictionary ${catalog_resources} ${resource_types['${vnf}']}=${loop_catalog_resource_resp} + \ ${catalog_resource_unique_name}= Add SDC Resource Instance ${catalog_service_id} ${resource_types['${vnf}']} ${loop_catalog_resource_resp['name']} ${xoffset} + \ ${xoffset}= Set Variable ${xoffset+100} + # + # do this here because the loop_catalog_resource_resp is different format after adding networks + ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule + # + # do network + ${networklist}= ServiceMapping.Get Service Neutron Mapping default ${service} + ${generic_neutron_net_uuid}= Get Generic NeutronNet UUID + :FOR ${network} IN @{networklist} + \ ${loop_catalog_resource_id}= Set Variable ${generic_neutron_net_uuid} + \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} + \ ${loop_catalog_resource_resp}= Get SDC Catalog Resource ${loop_catalog_resource_id} + \ ${loop_catalog_resource_id}= Add SDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${network} ${xoffset} ${0} VL + \ ${nf_role}= Convert To Lowercase ${network} + \ Setup SDC Catalog Resource GenericNeutronNet Properties ${catalog_service_id} ${nf_role} ${loop_catalog_resource_id} + \ ${xoffset}= Set Variable ${xoffset+100} + \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp} + ${catalog_service_resp}= Get SDC Catalog Service ${catalog_service_id} + # + # do deployment artifacts + # + ${deploymentlist}= ServiceMapping.Get Service Deployment Artifact Mapping default ${service} + :FOR ${deployment} IN @{deploymentlist} + \ ${loop_catalog_resource_resp}= Get SDC Catalog Resource ${loop_catalog_resource_id} + \ Setup SDC Catalog Resource Deployment Artifact Properties ${catalog_service_id} ${loop_catalog_resource_resp} ${catalog_resource_unique_name} ${deployment} + Run Keyword If ${cds} == True Add CDS Parameters ${catalog_service_name} + Checkin SDC Catalog Service ${catalog_service_id} + Wait Until Keyword Succeeds 600s 15s Request Certify SDC Catalog Service ${catalog_service_id} + Start Certify SDC Catalog Service ${catalog_service_id} + # on certify it gets a new id + ${catalog_service_id}= Certify SDC Catalog Service ${catalog_service_id} + Approve SDC Catalog Service ${catalog_service_id} + :FOR ${DIST_INDEX} IN RANGE 1 + \ Log Distribution Attempt ${DIST_INDEX} + \ Distribute SDC Catalog Service ${catalog_service_id} + \ ${catalog_service_resp}= Get SDC Catalog Service ${catalog_service_id} + \ ${status} ${_} = Run Keyword And Ignore Error Loop Over Check Catalog Service Distributed ${catalog_service_resp['uuid']} + \ Exit For Loop If '${status}'=='PASS' + Should Be Equal As Strings ${status} PASS + [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} + +Distribute vCPEResCust Model From SDC + [Documentation] Goes end to end creating all the SDC objects for the vCPE ResCust Service model and distributing it to the systems. It then returns the service name, VF name and VF module name + [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}= ${service}= + # For testing use random service name + #${random}= Get Current Date + ${uuid}= Generate UUID4 + ${random}= Evaluate str("${uuid}")[:4] + ${catalog_service_id}= Add SDC Catalog Service ${catalog_service_name}_${random} + # catalog_service_name already + #${catalog_service_id}= Add SDC Catalog Service ${catalog_service_name} + Log ${\n}ServiceName: ${catalog_service_name}_${random} + #${catalog_service_id}= Add SDC Catalog Service ${catalog_service_name} + ${catalog_resource_ids}= Create List + ${catalog_resources}= Create Dictionary + :FOR ${zip} IN @{model_zip_path} + \ ${loop_catalog_resource_id}= Setup SDC Catalog Resource ${zip} ${cds} + \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} + \ ${loop_catalog_resource_resp}= Get SDC Catalog Resource ${loop_catalog_resource_id} + \ Add SDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']} + \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp} + # + # do this here because the loop_catalog_resource_resp is different format after adding networks + ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule + # + # do allottedresource + ${allottedresource_list}= Create List TunnelXConn BRG + # Example data + #${tunnelxconn_dict}= Create Dictionary invariantUUID=8ac029e7-77aa-40d4-b28a-d17c02d5fd82 UUID=2ddc1b37-d7da-4aab-b645-ed7db34a5d03 node_type=org.openecomp.service.Demovcpevgmux + #${brg_dict}= Create Dictionary invariantUUID=ff0337b9-dbe2-4d88-bb74-18bf027ae586 UUID=1b6974f1-4aed-47f4-b962-816aa1261927 node_type=org.openecomp.service.Demovcpevbrgemu + # Create /tmp/vcpe_allotted_resource_data.json with demo vgmux and brgemu CSARs + Create Allotted Resource Data File + ${vcpe_ar_data_file} OperatingSystem.Get File /tmp/vcpe_allotted_resource_data.json + ${tunnelxconn_invariant_uuid}= Catenate ${vcpe_ar_data_file.json()['tunnelxconn']['invariantUUID']} + ${tunnelxconn_uuid}= Catenate ${vcpe_ar_data_file.json()['tunnelxconn']['UUID']} + ${tunnelxconn_node_type}= Catenate ${vcpe_ar_data_file.json()['tunnelxconn']['node_type']} + ${brg_invariant_uuid}= Catenate ${vcpe_ar_data_file.json()['brg']['invariantUUID']} + ${brg_uuid}= Catenate ${vcpe_ar_data_file.json()['brg']['UUID']} + ${brg_node_type}= Catenate ${vcpe_ar_data_file.json()['brg']['node_type']} + ${tunnelxconn_dict}= Create Dictionary invariantUUID=${tunnelxconn_invariant_uuid} UUID=${tunnelxconn_uuid} node_type=${tunnelxconn_node_type} + ${brg_dict}= Create Dictionary invariantUUID=${brg_invariant_uuid} UUID=${brg_uuid} node_type=${brg_node_type} + ${xoffset}= Set Variable ${100} + ${allottedresource_uuid}= Get AllottedResource UUID + ${random}= Get Current Date + :FOR ${allottedresource} IN @{allottedresource_list} + \ ${loop_catalog_resource_id}= Set Variable ${allottedresource_uuid} + \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} + \ ${loop_catalog_resource_id}= Add SDC Allotted Resource Catalog Resource 00000 ${allottedresource}_${random} ONAP ${loop_catalog_resource_id} ${allottedresource} + \ ${loop_catalog_resource_id2}= Add SDC Resource Instance To Resource ${loop_catalog_resource_id} ${allottedresource_uuid} ${allottedresource} ${xoffset} ${0} + \ ${loop_catalog_resource_resp}= Get SDC Catalog Resource ${loop_catalog_resource_id} + # + # Set the properties to relate to the brg and gmux + # + \ Run Keyword If '${allottedresource}'=='TunnelXConn' Setup SDC Catalog Resource AllottedResource Properties ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id} ${tunnelxconn_dict['invariantUUID']} ${tunnelxconn_dict['UUID']} ${tunnelxconn_dict['node_type']} + \ Run Keyword If '${allottedresource}'=='BRG' Setup SDC Catalog Resource AllottedResource Properties ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id} ${brg_dict['invariantUUID']} ${brg_dict['UUID']} ${brg_dict['node_type']} + # + # Set the nf_role nf_type + # + \ Run Keyword If '${allottedresource}'=='TunnelXConn' Setup SDC Catalog Resource AllottedResource Inputs ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id} + \ Run Keyword If '${allottedresource}'=='BRG' Setup SDC Catalog Resource AllottedResource Inputs ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id} + \ ${loop_catalog_resource_id}= Certify SDC Catalog Resource ${loop_catalog_resource_id} ${SDC_DESIGNER_USER_ID} + \ Add SDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']} + \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp} + ${catalog_service_resp}= Get SDC Catalog Service ${catalog_service_id} + Checkin SDC Catalog Service ${catalog_service_id} + Request Certify SDC Catalog Service ${catalog_service_id} + Start Certify SDC Catalog Service ${catalog_service_id} + # on certify it gets a new id + ${catalog_service_id}= Certify SDC Catalog Service ${catalog_service_id} + Approve SDC Catalog Service ${catalog_service_id} + :FOR ${DIST_INDEX} IN RANGE 1 + \ Log Distribution Attempt ${DIST_INDEX} + \ Distribute SDC Catalog Service ${catalog_service_id} + \ ${catalog_service_resp}= Get SDC Catalog Service ${catalog_service_id} + \ ${status} ${_} = Run Keyword And Ignore Error Loop Over Check Catalog Service Distributed ${catalog_service_resp['uuid']} + \ Exit For Loop If '${status}'=='PASS' + Should Be Equal As Strings ${status} PASS + [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} + + +Create Allotted Resource Data File + [Documentation] Create Allotted Resource json data file + ${allotted_resource}= Create Dictionary + ${allotted_csar_map}= Create Dictionary + Set To Dictionary ${allotted_csar_map} tunnelxconn=service-Demovcpevgmux-csar.csar + Set To Dictionary ${allotted_csar_map} brg=service-Demovcpevbrgemu-csar.csar + ${keys}= Get Dictionary Keys ${allotted_csar_map} + :FOR ${key} IN @{keys} + \ ${csar}= Get From Dictionary ${allotted_csar_map} ${key} + \ ${dir} ${ext}= Split String From Right ${csar} - 1 + \ Extract Zip File /tmp/csar/${csar} /tmp/csar/${dir} + \ ${template}= Catenate /tmp/csar/${dir}/Definitions/${dir}-template.yml + \ ${json_str}= Template Yaml To Json ${template} + \ ${json_obj}= To Json ${json_str} + \ ${attrs}= Create Dictionary + \ Set To Dictionary ${attrs} invariantUUID=${json_obj['metadata']['invariantUUID']} + \ Set To Dictionary ${attrs} UUID=${json_obj['metadata']['UUID']} + \ Set To Dictionary ${attrs} node_type=${json_obj['topology_template']['substitution_mappings']['node_type']} + \ Set To Dictionary ${allotted_resource} ${key}=${attrs} + ${result_str}= Evaluate json.dumps(${allotted_resource}, indent=2) json + Log ${result_str} + Create File /tmp/vcpe_allotted_resource_data.json ${result_str} + +Download CSAR + [Documentation] Download CSAR + [Arguments] ${catalog_service_id} ${save_directory}=/tmp/csar + # get meta data + ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/filteredDataByParams?include=toscaArtifacts ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + ${csar_resource_id}= Set Variable ${resp.json()['toscaArtifacts']['assettoscacsar']['uniqueId']} + ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/artifacts/${csar_resource_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + ${csar_file_name}= Set Variable ${resp.json()['artifactName']} + ${base64Obj}= Set Variable ${resp.json()['base64Contents']} + ${binObj}= Base64 Decode ${base64Obj} + Create Binary File ${save_directory}/${csar_file_name} ${binObj} + Log ${\n}Downloaded:${csar_file_name} + + +Get Generic NeutronNet UUID + [Documentation] Look up the UUID of the Generic NeutronNetwork Resource + ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_QUERY_PATH}/Generic%20NeutronNet/resourceVersion/1.0 ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()['allVersions']['1.0']} + +Get AllottedResource UUID + [Documentation] Look up the UUID of the Allotted Resource + # if this fails then the AllottedResource template got deleted from SDC by mistake + ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_QUERY_PATH}/AllottedResource/resourceVersion/1.0 ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()['allVersions']['1.0']} + +Loop Over Check Catalog Service Distributed + [Arguments] ${catalog_service_id} + # SO watchdog timeout is 300 seconds need buffer + ${dist_status}= Set Variable CONTINUE + :FOR ${CHECK_INDEX} IN RANGE 20 + \ ${status} ${_} = Run Keyword And Ignore Error Check Catalog Service Distributed ${catalog_service_id} ${dist_status} + \ Sleep 20s + \ Return From Keyword If '${status}'=='PASS' + # need a way to exit the loop early on DISTRIBUTION_COMPLETE_ERROR ${dist_status} doesnt work + #\ Exit For Loop If '${dist_status}'=='EXIT' + Should Be Equal As Strings ${status} PASS + +Setup SDC Catalog Resource + [Documentation] Creates all the steps a VF needs for an SDC Catalog Resource and returns the id + [Arguments] ${model_zip_path} ${cds}=None + ${license_model_id} ${license_model_version_id}= Add SDC License Model + + + ${license_temp_date}= Get Current Date + ${license_start_date}= Get Current Date result_format=%m/%d/%Y + ${license_end_date}= Add Time To Date ${license_temp_date} 365 days result_format=%m/%d/%Y + ${key_group_id}= Add SDC License Group ${license_model_id} ${license_model_version_id} ${license_start_date} ${license_end_date} + ${pool_id}= Add SDC Entitlement Pool ${license_model_id} ${license_model_version_id} ${license_start_date} ${license_end_date} + + ${feature_group_id}= Add SDC Feature Group ${license_model_id} ${key_group_id} ${pool_id} ${license_model_version_id} + ${license_agreement_id}= Add SDC License Agreement ${license_model_id} ${feature_group_id} ${license_model_version_id} + Submit SDC License Model ${license_model_id} ${license_model_version_id} + ${license_model_resp}= Get SDC License Model ${license_model_id} ${license_model_version_id} + ${matches}= Get Regexp Matches ${model_zip_path} temp/(.*)\.zip 1 + ${software_product_name_prefix}= Set Variable ${matches[0]} + ${software_product_id} ${software_product_version_id}= Add SDC Software Product ${license_agreement_id} ${feature_group_id} ${license_model_resp['vendorName']} ${license_model_id} ${license_model_version_id} ${software_product_name_prefix} + Upload SDC Heat Package ${software_product_id} ${model_zip_path} ${software_product_version_id} + Validate SDC Software Product ${software_product_id} ${software_product_version_id} + Submit SDC Software Product ${software_product_id} ${software_product_version_id} + Package SDC Software Product ${software_product_id} ${software_product_version_id} + ${software_product_resp}= Get SDC Software Product ${software_product_id} ${software_product_version_id} + ${catalog_resource_id}= Add SDC Catalog Resource ${license_agreement_id} ${software_product_resp['name']} ${license_model_resp['vendorName']} ${software_product_id} + # Check if need to set up CDS properties + Run Keyword If '${cds}' == 'vfwng' Setup SDC Catalog Resource CDS Properties ${catalog_resource_id} + + ${catalog_resource_id}= Certify SDC Catalog Resource ${catalog_resource_id} ${SDC_DESIGNER_USER_ID} + [Return] ${catalog_resource_id} + + +Setup SDC Catalog Resource Deployment Artifact Properties + [Documentation] Set up Deployment Artiface properties + [Arguments] ${catalog_service_id} ${catalog_parent_service_id} ${catalog_resource_unique_id} ${blueprint_file} + ${resp}= Get SDC Catalog Resource Component Instances Properties ${catalog_service_id} + ${blueprint_data} OperatingSystem.Get File ${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH}${blueprint_file} + ${payloadData}= Base64 Encode ${blueprint_data} + ${dict}= Create Dictionary artifactLabel=blueprint artifactName=${blueprint_file} artifactType=DCAE_INVENTORY_BLUEPRINT artifactGroupType=DEPLOYMENT description=${blueprint_file} payloadData=${payloadData} + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_ARTIFACT_UPLOAD_TEMPLATE} ${dict} + # POST artifactUpload to resource + ${artifact_upload_path}= Catenate ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/resourceInstance/${catalog_resource_unique_id}${SDC_CATALOG_SERVICE_RESOURCE_ARTIFACT_PATH} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${artifact_upload_path} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp} + + +Setup SDC Catalog Resource GenericNeutronNet Properties + [Documentation] Set up GenericNeutronNet properties and inputs + [Arguments] ${catalog_service_id} ${nf_role} ${catalog_parent_service_id} + ${resp}= Get SDC Catalog Resource Component Instances Properties ${catalog_service_id} + ${componentInstances} Set Variable @{resp['componentInstancesProperties']} + # componentInstances can have 1 or more than 1 entry + ${passed}= Run Keyword And Return Status Evaluate type(${componentInstances}) + ${type}= Run Keyword If ${passed} Evaluate type(${componentInstances}) + ${componentInstancesList}= Run Keyword If "${type}"!="" Create List ${componentInstances} + ... ELSE Set Variable ${componentInstances} + :FOR ${item} IN @{componentInstancesList} + \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${item} ${nf_role} + \ Run Keyword If '${test}' == 'FAIL' Continue For Loop + \ ${componentInstance1}= Set Variable ${item} + :FOR ${comp} IN @{resp['componentInstancesProperties']["${componentInstance1}"]} + \ ${name} Set Variable ${comp['name']} + \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${name} network_role + \ Run Keyword If '${test}' == 'FAIL' Continue For Loop + \ ${description} Set Variable ${comp['description']} + \ ${description}= Replace String ${description} ${\n} \ + \ ${uniqueId} Set Variable ${comp['uniqueId']} + \ ${parentUniqueId} Set Variable ${comp['parentUniqueId']} + \ ${ownerId} Set Variable ${comp['ownerId']} + \ ${dict}= Create Dictionary parentUniqueId=${parentUniqueId} ownerId=${ownerId} uniqueId=${uniqueId} description=${description} + \ Run Keyword If '${name}'=='network_role' Set To Dictionary ${dict} name=${name} value=${nf_role} + \ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + \ ${data}= Templating.Apply Template sdc ${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} ${dict} + \ ${response}= Set SDC Catalog Resource Component Instance Properties ${catalog_parent_service_id} ${catalog_service_id} ${data} + + +Setup SDC Catalog Resource AllottedResource Properties + [Documentation] Set up Allotted Resource properties and inputs + [Arguments] ${catalog_service_id} ${nf_role} ${catalog_resource_id} ${invariantUUID} ${UUID} ${node_type} + # Set component instances properties + ${nf_role_lc}= Convert To Lowercase ${nf_role} + ${resp}= Get SDC Catalog Resource Component Instances Properties For Resource ${catalog_resource_id} + ${componentInstances} Set Variable @{resp['componentInstancesProperties']} + # componentInstances can have 1 or more than 1 entry + ${passed}= Run Keyword And Return Status Evaluate type(${componentInstances}) + ${type}= Run Keyword If ${passed} Evaluate type(${componentInstances}) + ${componentInstancesList}= Run Keyword If "${type}"!="" Create List ${componentInstances} + ... ELSE Set Variable ${componentInstances} + :FOR ${item} IN @{componentInstancesList} + \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${item} ${nf_role_lc} + \ Run Keyword If '${test}' == 'FAIL' Continue For Loop + \ ${componentInstance1}= Set Variable ${item} + ${dict}= Create Dictionary + :FOR ${comp} IN @{resp['componentInstancesProperties']["${componentInstance1}"]} + \ ${name} Set Variable ${comp['name']} + \ ${test} ${v}= Run Keyword and Ignore Error Should Contain Any ${name} network_role providing_service_invariant_uuid providing_service_uuid providing_service_name uniqueId + \ Run Keyword If '${test}' == 'FAIL' Continue For Loop + \ ${parentUniqueId} Set Variable ${comp['parentUniqueId']} + \ ${ownerId} Set Variable ${comp['ownerId']} + \ Set To Dictionary ${dict} parentUniqueId=${parentUniqueId} ownerId=${ownerId} + \ Run Keyword If '${name}'=='providing_service_invariant_uuid' Set To Dictionary ${dict} providing_service_invariant_uuid=${invariantUUID} + \ Run Keyword If '${name}'=='providing_service_uuid' Set To Dictionary ${dict} providing_service_uuid=${UUID} + \ Run Keyword If '${name}'=='providing_service_name' Set To Dictionary ${dict} providing_service_name=${node_type} + # Sets it for each loop but should be one + \ ${uniqueId} Set Variable ${comp['uniqueId']} + \ ${uniqueId} Fetch From Left ${uniqueId} . + \ Set To Dictionary ${dict} uniqueId=${uniqueId} + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE} ${dict} + ${response}= Set SDC Catalog Resource Component Instance Properties For Resource ${catalog_resource_id} ${componentInstance1} ${data} + Log resp=${response} + + +Setup SDC Catalog Resource AllottedResource Inputs + [Documentation] Set up Allotted Resource inputs + [Arguments] ${catalog_service_id} ${nf_role} ${catalog_resource_id} + # Set vnf inputs + ${resp}= Get SDC Catalog Resource Inputs ${catalog_resource_id} + ${dict}= Create Dictionary + :FOR ${comp} IN @{resp['inputs']} + \ ${name} Set Variable ${comp['name']} + \ ${uid} Set Variable ${comp['uniqueId']} + \ Run Keyword If '${name}'=='nf_type' Set To Dictionary ${dict} nf_type=${nf_role} nf_type_uid=${uid} + \ Run Keyword If '${name}'=='nf_role' Set To Dictionary ${dict} nf_role=${nf_role} nf_role_uid=${uid} + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE} ${dict} + ${response}= Set SDC Catalog Resource VNF Inputs ${catalog_resource_id} ${data} + [Return] ${response} + +Setup SDC Catalog Resource CDS Properties + [Documentation] Set up vfwng VNF properties and inputs for CDS + [Arguments] ${catalog_resource_id} + # Set vnf module properties + ${resp}= Get SDC Catalog Resource Component Instances ${catalog_resource_id} + :FOR ${comp} IN @{resp['componentInstances']} + \ ${name} Set Variable ${comp['name']} + \ ${uniqueId} Set Variable ${comp['uniqueId']} + \ ${actualComponentUid} Set Variable ${comp['actualComponentUid']} + \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${name} abstract_ + \ Run Keyword If '${test}' == 'FAIL' Continue For Loop + \ ${response}= Get SDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${actualComponentUid} + \ ${dict}= Create Dictionary parent_id=${response[6]['parentUniqueId']} + \ Run Keyword If '${name}'=='abstract_vfw' Set To Dictionary ${dict} nfc_function=vfw nfc_naming_policy=SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP + \ Run Keyword If '${name}'=='abstract_vpg' Set To Dictionary ${dict} nfc_function=vpg nfc_naming_policy=SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP + \ Run Keyword If '${name}'=='abstract_vsn' Set To Dictionary ${dict} nfc_function=vsn nfc_naming_policy=SDNC_Policy.ONAP_VSN_NAMING_TIMESTAMP + \ Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + \ ${data}= Templating.Apply Template sdc ${SDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} ${dict} + \ ${response}= Set SDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${data} + \ Log resp=${response} + + # Set vnf inputs + ${resp}= Get SDC Catalog Resource Inputs ${catalog_resource_id} + ${dict}= Create Dictionary + :FOR ${comp} IN @{resp['inputs']} + \ ${name} Set Variable ${comp['name']} + \ ${uid} Set Variable ${comp['uniqueId']} + \ Run Keyword If '${name}'=='nf_function' Set To Dictionary ${dict} nf_function=ONAP-FIREWALL nf_function_uid=${uid} + \ Run Keyword If '${name}'=='nf_type' Set To Dictionary ${dict} nf_type=FIREWALL nf_type_uid=${uid} + \ Run Keyword If '${name}'=='nf_naming_code' Set To Dictionary ${dict} nf_naming_code=vfw nf_naming_code_uid=${uid} + \ Run Keyword If '${name}'=='nf_role' Set To Dictionary ${dict} nf_role=vFW nf_role_uid=${uid} + \ Run Keyword If '${name}'=='cloud_env' Set To Dictionary ${dict} cloud_env=openstack cloud_env_uid=${uid} + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} ${dict} + ${response}= Set SDC Catalog Resource VNF Inputs ${catalog_resource_id} ${data} + +Add SDC License Model + [Documentation] Creates an SDC License Model and returns its id + ${uuid}= Generate UUID4 + ${shortened_uuid}= Evaluate str("${uuid}")[:23] + ${map}= Create Dictionary vendor_name=${shortened_uuid} + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_LICENSE_MODEL_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']} + +Get SDC License Model + [Documentation] gets an SDC license model by its id + [Arguments] ${id} ${version_id}=0.1 + ${resp}= SDC.Run Get Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Get SDC License Models + [Documentation] Gets all SDC License Models + ${resp}= SDC.Run Get Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Checkin SDC License Model + [Documentation] Checks in an SDC License Model by its id + [Arguments] ${id} ${version_id}=0.1 + ${map}= Create Dictionary action=Checkin + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_ACTION_TEMPLATE} ${map} + ${resp}= SDC.Run Put Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${SDC_VENDOR_ACTIONS_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Submit SDC License Model + [Documentation] Submits an SDC License Model by its id + [Arguments] ${id} ${version_id}=0.1 + ${map}= Create Dictionary action=Submit + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_ACTION_TEMPLATE} ${map} + ${resp}= SDC.Run Put Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${id}/versions/${version_id}${SDC_VENDOR_ACTIONS_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Checkin SDC Software Product + [Documentation] Checks in an SDC Software Product by its id + [Arguments] ${id} ${version_id}=0.1 + ${map}= Create Dictionary action=Checkin + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_ACTION_TEMPLATE} ${map} + ${resp}= SDC.Run Put Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${SDC_VENDOR_ACTIONS_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Validate SDC Software Product + [Documentation] Validates an SDC Software Product by its id + [Arguments] ${id} ${version_id}=0.1 + ${data}= Catenate + ${resp}= SDC.Run Put Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}/orchestration-template-candidate/process ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Submit SDC Software Product + [Documentation] Submits an SDC Software Product by its id + [Arguments] ${id} ${version_id}=0.1 + ${map}= Create Dictionary action=Submit + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_ACTION_TEMPLATE} ${map} + ${resp}= SDC.Run Put Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${SDC_VENDOR_ACTIONS_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Package SDC Software Product + [Documentation] Creates a package of an SDC Software Product by its id + [Arguments] ${id} ${version_id}=0.1 + ${map}= Create Dictionary action=Create_Package + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_ACTION_TEMPLATE} ${map} + ${resp}= SDC.Run Put Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${id}/versions/${version_id}${SDC_VENDOR_ACTIONS_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Add SDC Entitlement Pool + [Documentation] Creates an SDC Entitlement Pool and returns its id + [Arguments] ${license_model_id} ${version_id}=0.1 ${license_start_date}="01/01/1960" ${license_end_date}="01/01/1961" + ${uuid}= Generate UUID4 + ${shortened_uuid}= Evaluate str("${uuid}")[:23] + ${map}= Create Dictionary entitlement_pool_name=${shortened_uuid} license_start_date=${license_start_date} license_end_date=${license_end_date} + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_ENTITLEMENT_POOL_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${SDC_VENDOR_ENTITLEMENT_POOL_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()['value']} + +Get SDC Entitlement Pool + [Documentation] Gets an SDC Entitlement Pool by its id + [Arguments] ${license_model_id} ${pool_id} + ${resp}= SDC.Run Get Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${SDC_VENDOR_ENTITLEMENT_POOL_PATH}/${pool_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Add SDC License Group + [Documentation] Creates an SDC License Group and returns its id + [Arguments] ${license_model_id} ${version_id}=1.0 ${license_start_date}="01/01/1960" ${license_end_date}="01/01/1961" + ${uuid}= Generate UUID4 + ${shortened_uuid}= Evaluate str("${uuid}")[:23] + ${map}= Create Dictionary key_group_name=${shortened_uuid} license_start_date=${license_start_date} license_end_date=${license_end_date} + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_KEY_GROUP_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${SDC_VENDOR_KEY_GROUP_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()['value']} + +Get SDC License Group + [Documentation] Gets an SDC License Group by its id + [Arguments] ${license_model_id} ${group_id} ${version_id} + ${resp}= SDC.Run Get Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${SDC_VENDOR_KEY_GROUP_PATH}/${group_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Add SDC Feature Group + [Documentation] Creates an SDC Feature Group and returns its id + [Arguments] ${license_model_id} ${key_group_id} ${entitlement_pool_id} ${version_id}=0.1 + ${uuid}= Generate UUID4 + ${shortened_uuid}= Evaluate str("${uuid}")[:23] + ${map}= Create Dictionary feature_group_name=${shortened_uuid} key_group_id=${key_group_id} entitlement_pool_id=${entitlement_pool_id} manufacturer_reference_number=mrn${shortened_uuid} + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_FEATURE_GROUP_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${SDC_VENDOR_FEATURE_GROUP_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()['value']} + +Get SDC Feature Group + [Documentation] Gets an SDC Feature Group by its id + [Arguments] ${license_model_id} ${group_id} + ${resp}= SDC.Run Get Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${SDC_VENDOR_FEATURE_GROUP_PATH}/${group_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Add SDC License Agreement + [Documentation] Creates an SDC License Agreement and returns its id + [Arguments] ${license_model_id} ${feature_group_id} ${version_id}=0.1 + ${uuid}= Generate UUID4 + ${shortened_uuid}= Evaluate str("${uuid}")[:23] + ${map}= Create Dictionary license_agreement_name=${shortened_uuid} feature_group_id=${feature_group_id} + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_LICENSE_AGREEMENT_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}/versions/${version_id}${SDC_VENDOR_LICENSE_AGREEMENT_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()['value']} + +Get SDC License Agreement + [Documentation] Gets an SDC License Agreement by its id + [Arguments] ${license_model_id} ${agreement_id} + ${resp}= SDC.Run Get Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_LICENSE_MODEL_PATH}/${license_model_id}${SDC_VENDOR_LICENSE_AGREEMENT_PATH}/${agreement_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Add SDC Software Product + [Documentation] Creates an SDC Software Product and returns its id + [Arguments] ${license_agreement_id} ${feature_group_id} ${license_model_name} ${license_model_id} ${license_model_version_id} ${name_prefix} + ${uuid}= Generate UUID4 + ${shortened_uuid}= Evaluate str("${uuid}")[:13] + ${software_product_name}= Catenate ${name_prefix} ${shortened_uuid} + ${map}= Create Dictionary software_product_name=${software_product_name} feature_group_id=${feature_group_id} license_agreement_id=${license_agreement_id} vendor_name=${license_model_name} vendor_id=${license_model_id} version_id=${license_model_version_id} + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_SOFTWARE_PRODUCT_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_SOFTWARE_PRODUCT_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()['itemId']} ${resp.json()['version']['id']} + +Get SDC Software Product + [Documentation] Gets an SDC Software Product by its id + [Arguments] ${software_product_id} ${version_id}=0.1 + ${resp}= SDC.Run Get Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Add SDC Catalog Resource + [Documentation] Creates an SDC Catalog Resource and returns its id + [Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id} + ${map}= Create Dictionary software_product_id=${software_product_id} software_product_name=${software_product_name} license_agreement_id=${license_agreement_id} vendor_name=${license_model_name} + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_CATALOG_RESOURCE_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 201 + [Return] ${resp.json()['uniqueId']} + +Add SDC Allotted Resource Catalog Resource + [Documentation] Creates an SDC Allotted Resource Catalog Resource and returns its id + [Arguments] ${license_agreement_id} ${software_product_name} ${license_model_name} ${software_product_id} ${subcategory} + ${map}= Create Dictionary software_product_id=${software_product_id} software_product_name=${software_product_name} license_agreement_id=${license_agreement_id} vendor_name=${license_model_name} subcategory=${subcategory} + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 201 + [Return] ${resp.json()['uniqueId']} + +Mark SDC Catalog Resource Inactive + [Documentation] Marks SDC Catalog Resource as inactive + [Arguments] ${catalog_resource_id} + ${resp}= SDC.Run Delete Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${None} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 204 + [Return] ${resp} + +Delete Inactive SDC Catalog Resources + [Documentation] Delete all SDC Catalog Resources that are inactive + ${resp}= SDC.Run Delete Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_INACTIVE_RESOURCES_PATH} ${None} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Get SDC Catalog Resource + [Documentation] Gets an SDC Catalog Resource by its id + [Arguments] ${catalog_resource_id} + ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Get SDC Catalog Resource Component Instances + [Documentation] Gets component instances of an SDC Catalog Resource by its id + [Arguments] ${catalog_resource_id} + ${resp}= SDC.Run Get Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstances ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Get SDC Catalog Resource Deployment Artifact Properties + [Documentation] Gets deployment artifact properties of an SDC Catalog Resource by its id + [Arguments] ${catalog_resource_id} + ${resp}= SDC.Run Get Request ${SDC_FE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_resource_id}/filteredDataByParams?include=deploymentArtifacts ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + + +Get SDC Catalog Resource Component Instances Properties + [Documentation] Gets SDC Catalog Resource component instances properties by its id + [Arguments] ${catalog_resource_id} + ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstancesProperties ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Get SDC Catalog Resource Component Instances Properties For Resource + [Documentation] Gets SDC Catalog Resource component instances properties for a Resource (VF) by its id + [Arguments] ${catalog_resource_id} + ${resp}= SDC.Run Get Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstancesProperties ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Get SDC Catalog Resource Inputs + [Documentation] Gets SDC Catalog Resource inputs by its id + [Arguments] ${catalog_resource_id} + ${resp}= SDC.Run Get Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=inputs ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Get SDC Catalog Resource Component Instance Properties + [Documentation] Gets component instance properties of an SDC Catalog Resource by their ids + [Arguments] ${catalog_resource_id} ${component_instance_id} ${component_id} + ${resp}= SDC.Run Get Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/componentInstances/${component_instance_id}/${component_id}/inputs ${SDC_DESIGNER_USER_ID}auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Set SDC Catalog Resource Component Instance Properties + [Documentation] Sets SDC Catalog Resource component instance properties by ids + [Arguments] ${catalog_resource_id} ${component_parent_service_id} ${data} + ${resp}= SDC.Run Post Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_SERVICES_PATH}/${component_parent_service_id}/resourceInstance/${catalog_resource_id}/properties ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Set SDC Catalog Resource Component Instance Properties For Resource + [Documentation] Sets SDC Resource component instance properties by ids + [Arguments] ${catalog_parent_resource_id} ${catalog_resource_id} ${data} + ${resp}= SDC.Run Post Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_RESOURCES_PATH}/${catalog_parent_resource_id}/resourceInstance/${catalog_resource_id}/properties ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Set CDS Catalog Resource Component Instance Properties + [Documentation] Sets CDS Catalog Resource component instance properties by ids + [Arguments] ${catalog_resource_id} ${component_instance_id} ${data} + ${resp}= SDC.Run Post Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/resourceInstance/${component_instance_id}/inputs ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Set SDC Catalog Resource VNF Inputs + [Documentation] Sets VNF Inputs for an SDC Catalog Resource by its id + [Arguments] ${catalog_resource_id} ${data} + ${resp}= SDC.Run Post Request ${SDC_FE_ENDPOINT} ${SDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/update/inputs ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Get SDC Demo Vnf Catalog Resource + [Documentation] Gets Resource ids of demonstration VNFs for instantiation + [Arguments] ${service_name} + ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/serviceName/${service_name}/serviceVersion/1.0 ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + @{ITEMS}= Copy List ${resp.json()['componentInstances']} + ${demo_catalog_resource}= Create Dictionary + :FOR ${ELEMENT} IN @{ITEMS} + \ Log ${ELEMENT['name']} + \ Log ${ELEMENT['groupInstances'][0]['groupName']} + \ ${vnf}= Get VNF From Group Name ${ELEMENT['groupInstances'][0]['groupName']} ${service_name} + \ ${vnf_data}= Create Dictionary vnf_type=${ELEMENT['name']} vf_module=${ELEMENT['groupInstances'][0]['groupName']} + \ LOG ${vnf_data} + \ Set To Dictionary ${demo_catalog_resource} ${vnf}=${vnf_data} + \ LOG ${demo_catalog_resource} + [Return] ${demo_catalog_resource} + +Get VNF From Group Name + [Documentation] Looks up VNF key from service mapping for a regex on group_name and service_name + [Arguments] ${group_name} ${service_name} + ${vnf}= Set Variable If + ... ('${service_name}'=='demoVFWCL') and ('base_vfw' in '${group_name}') vFWCLvFWSNK + ... ('${service_name}'=='demoVFWCL') and ('base_vpkg' in '${group_name}') vFWCLvPKG + ... ('${service_name}'=='demoVLB') and ('base_vlb' in '${group_name}') vLB + [Return] ${vnf} + +Checkin SDC Catalog Resource + [Documentation] Checks in an SDC Catalog Resource by its id + [Arguments] ${catalog_resource_id} + ${map}= Create Dictionary user_remarks=Robot remarks + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_USER_REMARKS_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_DESIGNER_USER_ID} ${SDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${SDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Request Certify SDC Catalog Resource + [Documentation] Requests certification of an SDC Catalog Resource by its id + [Arguments] ${catalog_resource_id} + ${map}= Create Dictionary user_remarks=Robot remarks + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_USER_REMARKS_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${SDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Start Certify SDC Catalog Resource + [Documentation] Start certification of an SDC Catalog Resource by its id + [Arguments] ${catalog_resource_id} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${SDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${SDC_TESTER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Certify SDC Catalog Resource + [Documentation] Certifies an SDC Catalog Resource by its id and returns the new id + [Arguments] ${catalog_resource_id} ${user_id}=${SDC_TESTER_USER_ID} + ${map}= Create Dictionary user_remarks=Robot remarks + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_USER_REMARKS_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${SDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${user_id} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()['uniqueId']} + +Upload SDC Heat Package + [Documentation] Creates an SDC Software Product and returns its id + [Arguments] ${software_product_id} ${file_path} ${version_id}=0.1 + ${files}= Create Dictionary + Create Multi Part ${files} upload ${file_path} contentType=application/zip + ${resp}= SDC.Run Post Files Request ${SDC_BE_ONBOARD_ENDPOINT} ${SDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id}${SDC_VENDOR_SOFTWARE_UPLOAD_PATH} ${files} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + +Add SDC Catalog Service + [Documentation] Creates an SDC Catalog Service and returns its id + [Arguments] ${catalog_service_name} + ${uuid}= Generate UUID4 + ${shortened_uuid}= Evaluate str("${uuid}")[:23] + ${catalog_service_name}= Set Variable If '${catalog_service_name}' =='' ${shortened_uuid} ${catalog_service_name} + ${map}= Create Dictionary service_name=${catalog_service_name} + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_CATALOG_SERVICE_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 201 + [Return] ${resp.json()['uniqueId']} + +Mark SDC Catalog Service Inactive + [Documentation] Deletes an SDC Catalog Service + [Arguments] ${catalog_service_id} + ${resp}= SDC.Run Delete Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${None} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 204 + [Return] ${resp} + +Delete Inactive SDC Catalog Services + [Documentation] Delete all SDC Catalog Services that are inactive + ${resp}= SDC.Run Delete Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_INACTIVE_SERVICES_PATH} ${None} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Get SDC Catalog Service + [Documentation] Gets an SDC Catalog Service by its id + [Arguments] ${catalog_service_id} + ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + [Return] ${resp.json()} + +Checkin SDC Catalog Service + [Documentation] Checks in an SDC Catalog Service by its id + [Arguments] ${catalog_service_id} + ${map}= Create Dictionary user_remarks=Robot remarks + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_USER_REMARKS_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Request Certify SDC Catalog Service + [Documentation] Requests certification of an SDC Catalog Service by its id + [Arguments] ${catalog_service_id} + ${map}= Create Dictionary user_remarks=Robot remarks + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_USER_REMARKS_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Start Certify SDC Catalog Service + [Documentation] Start certification of an SDC Catalog Service by its id + [Arguments] ${catalog_service_id} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${SDC_TESTER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Certify SDC Catalog Service + [Documentation] Certifies an SDC Catalog Service by its id and returns the new id + [Arguments] ${catalog_service_id} + ${map}= Create Dictionary user_remarks=Robot remarks + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_USER_REMARKS_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${SDC_TESTER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()['uniqueId']} + +Approve SDC Catalog Service + [Documentation] Approves an SDC Catalog Service by its id + [Arguments] ${catalog_service_id} + ${map}= Create Dictionary user_remarks=Robot remarks + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_USER_REMARKS_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH}${SDC_DISTRIBUTION_STATE_APPROVE_PATH} ${data} ${SDC_GOVERNOR_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Distribute SDC Catalog Service + [Documentation] distribute an SDC Catalog Service by its id + [Arguments] ${catalog_service_id} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} ${None} ${SDC_OPS_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Add SDC Resource Instance + [Documentation] Creates an SDC Resource Instance and returns its id + [Arguments] ${catalog_service_id} ${catalog_resource_id} ${catalog_resource_name} ${xoffset}=${0} ${yoffset}=${0} ${resourceType}=VF + ${milli_timestamp}= Generate Timestamp + ${xoffset}= Set Variable ${xoffset+306} + ${yoffset}= Set Variable ${yoffset+248} + ${map}= Create Dictionary catalog_resource_id=${catalog_resource_id} catalog_resource_name=${catalog_resource_name} milli_timestamp=${milli_timestamp} posX=${xoffset} posY=${yoffset} originType=${resourceType} + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_RESOURCE_INSTANCE_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 201 + [Return] ${resp.json()['uniqueId']} + +Add SDC Resource Instance To Resource + [Documentation] Creates an SDC Resource Instance in a Resource (VF) and returns its id + [Arguments] ${parent_catalog_resource_id} ${catalog_resource_id} ${catalog_resource_name} ${xoffset}=${0} ${yoffset}=${0} ${resourceType}=VF + ${milli_timestamp}= Generate Timestamp + ${xoffset}= Set Variable ${xoffset+306} + ${yoffset}= Set Variable ${yoffset+248} + ${map}= Create Dictionary catalog_resource_id=${catalog_resource_id} catalog_resource_name=${catalog_resource_name} milli_timestamp=${milli_timestamp} posX=${xoffset} posY=${yoffset} originType=${resourceType} + Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdc ${SDC_RESOURCE_INSTANCE_TEMPLATE} ${map} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH}/${parent_catalog_resource_id}${SDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 201 + [Return] ${resp.json()['uniqueId']} + +Get Catalog Service Distribution + [Documentation] Gets an SDC Catalog Service distribution + [Arguments] ${catalog_service_uuid} + ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_uuid}${SDC_CATALOG_SERVICE_DISTRIBUTION_PATH} ${SDC_OPS_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Check Catalog Service Distributed + [Documentation] Checks if an SDC Catalog Service is distributed + [Arguments] ${catalog_service_uuid} ${dist_status} + ${dist_resp}= Get Catalog Service Distribution ${catalog_service_uuid} + Should Be Equal As Strings ${dist_resp['distributionStatusOfServiceList'][0]['deployementStatus']} Distributed + ${det_resp}= Get Catalog Service Distribution Details ${dist_resp['distributionStatusOfServiceList'][0]['distributionID']} + @{ITEMS}= Copy List ${det_resp['distributionStatusList']} + Should Not Be Empty ${ITEMS} + ${SO_COMPLETE} Set Variable FALSE + ${dist_status} Set Variable CONTINUE + Should Not Be Empty ${ITEMS} + :FOR ${ELEMENT} IN @{ITEMS} + \ Log ${ELEMENT['omfComponentID']} + \ Log ${ELEMENT['status']} + \ ${SO_COMPLETE} Set Variable If (('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_OK')) or ('${SO_COMPLETE}'=='TRUE') TRUE + \ Exit For Loop If ('${SO_COMPLETE}'=='TRUE') + \ Exit For Loop If ('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_ERROR') + \ ${dist_status}= Set Variable If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml')) EXIT + \ Exit For Loop If (('${ELEMENT['status']}' == 'COMPONENT_DONE_ERROR') and ('${ELEMENT['omfComponentID']}' == 'aai-ml')) + Should Be True ( '${SO_COMPLETE}'=='TRUE') SO Test + +Get Catalog Service Distribution Details + [Documentation] Gets SDC Catalog Service distribution details + [Arguments] ${catalog_service_distribution_id} + ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}${SDC_CATALOG_SERVICE_DISTRIBUTION_PATH}/${catalog_service_distribution_id} ${SDC_OPS_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Run SDC Health Check + [Documentation] Runs a SDC health check + ${resp}= SDC.Run Get Request ${SDC_FE_ENDPOINT} ${SDC_HEALTH_CHECK_PATH} user=${None} + # only test for HTTP 200 to determine SDC Health. SDC_DE_HEALTH is informational + Should Be Equal As Strings ${resp.status_code} 200 SDC DOWN + ${SDC_DE_HEALTH}= Catenate DOWN + @{ITEMS}= Copy List ${resp.json()['componentsInfo']} + :FOR ${ELEMENT} IN @{ITEMS} + \ Log ${ELEMENT['healthCheckStatus']} + \ ${SDC_DE_HEALTH} Set Variable If (('DE' in '${ELEMENT['healthCheckComponent']}') and ('${ELEMENT['healthCheckStatus']}' == 'UP')) or ('${SDC_DE_HEALTH}'=='UP') UP + Log (DMaaP:${SDC_DE_HEALTH}) + +Open SDC GUI + [Documentation] Logs in to SDC GUI + [Arguments] ${PATH} + ## Setup Browever now being managed by the test case + ##Setup Browser + Go To ${SDC_FE_ENDPOINT}${PATH} + Maximize Browser Window + + Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} + Log Logging in to ${SDC_FE_ENDPOINT}${PATH} + Title Should Be SDC + Wait Until Page Contains Element xpath=//div/a[text()='SDC'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Log Logged in to ${SDC_FE_ENDPOINT}${PATH} + + +Create Multi Part + [Arguments] ${addTo} ${partName} ${filePath} ${contentType}=${None} + ${fileData}= Get Binary File ${filePath} + ${fileDir} ${fileName}= Split Path ${filePath} + ${partData}= Create List ${fileName} ${fileData} ${contentType} + Set To Dictionary ${addTo} ${partName}=${partData} + + +Add CDS Parameters + [Arguments] ${catalog_service_name} + ${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/serviceName/${catalog_service_name}/serviceVersion/0.1 ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + #${resp_json}= To Json ${resp} + ${service_uuid}= Set Variable ${resp.json()['uniqueId']} + ${component_uuid}= Set Variable ${resp.json()['componentInstances'][0]['uniqueId']} + @{inputs}= Copy List ${resp.json()['componentInstances'][0]['inputs']} + :FOR ${input} IN @{inputs} + \ Run Keyword If '${input['name']}' == "sdnc_artifact_name" Set Input Parameter ${service_uuid} ${component_uuid} ${input} string vdns-vnf + ... ELSE IF '${input['name']}' == "sdnc_model_name" Set Input Parameter ${service_uuid} ${component_uuid} ${input} string test + ... ELSE IF '${input['name']}' == "sdnc_model_version" Set Input Parameter ${service_uuid} ${component_uuid} ${input} string 1.0.0 + ... ELSE IF '${input['name']}' == "skip_post_instantiation_configuration" Set Input Parameter ${service_uuid} ${component_uuid} ${input} boolean false + + +Set Input Parameter + [Arguments] ${service_uuid} ${component_uuid} ${input} ${input_type} ${input_value} + ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${service_uuid}/resourceInstance/${component_uuid}/inputs {"constraints":[],"name":"${input['name']}","parentUniqueId":"${input['parentUniqueId']}","password":false,"required":false,"schema":{"property":{}},"type":"${input_type}","uniqueId":"${input['uniqueId']}","value":"${input_value}","definition":false,"toscaPresentation":{"ownerId":"${input['ownerId']}"}} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION} + Should Be Equal As Strings ${resp.status_code} 200 diff --git a/robot/resources/test_templates/model_test_template.robot b/robot/resources/test_templates/model_test_template.robot index b327295b..8ba9349e 100644 --- a/robot/resources/test_templates/model_test_template.robot +++ b/robot/resources/test_templates/model_test_template.robot @@ -1,16 +1,16 @@ *** Settings *** -Documentation The main interface for interacting with ASDC. It handles low level stuff like managing the http request library and DCAE required fields +Documentation Model distribution Library OperatingSystem Library ArchiveLibrary Library Collections Library String Library DateTime Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping -Resource ../asdc_interface.robot +Resource ../sdc_interface.robot *** Variables *** -${ASDC_ASSETS_DIRECTORY} ${GLOBAL_HEAT_TEMPLATES_FOLDER} -${ASDC_ZIP_DIRECTORY} ${ASDC_ASSETS_DIRECTORY}/temp +${SDC_ASSETS_DIRECTORY} ${GLOBAL_HEAT_TEMPLATES_FOLDER} +${SDC_ZIP_DIRECTORY} ${SDC_ASSETS_DIRECTORY}/temp *** Keywords *** Model Distribution For Directory With Teardown @@ -29,12 +29,12 @@ Model Distribution For Directory ${catalog_service_name}= Set Variable If '${catalog_service_name}' =='' ${shortened_uuid} ${catalog_service_name} :FOR ${directory} IN @{directory_list} \ ${zipname}= Replace String ${directory} / _ - \ ${zip}= Catenate ${ASDC_ZIP_DIRECTORY}/${zipname}.zip - \ ${folder}= Catenate ${ASDC_ASSETS_DIRECTORY}/${directory} - \ OperatingSystem.Create Directory ${ASDC_ASSETS_DIRECTORY}/temp + \ ${zip}= Catenate ${SDC_ZIP_DIRECTORY}/${zipname}.zip + \ ${folder}= Catenate ${SDC_ASSETS_DIRECTORY}/${directory} + \ OperatingSystem.Create Directory ${SDC_ASSETS_DIRECTORY}/temp \ Create Zip From Files In Directory ${folder} ${zip} \ Append To List ${ziplist} ${zip} - ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} Distribute Model From ASDC ${ziplist} ${catalog_service_name} ${cds} ${service} + ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} Distribute Model From SDC ${ziplist} ${catalog_service_name} ${cds} ${service} Download CSAR ${catalog_service_id} [Return] ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resources} ${catalog_resource_ids} ${catalog_service_id} @@ -43,7 +43,7 @@ Teardown Models [Arguments] ${catalog_service_id} ${catalog_resource_ids} Return From Keyword If '${catalog_service_id}' == '' :FOR ${catalog_resource_id} IN @{catalog_resource_ids} - \ ${resourece_json}= Mark ASDC Catalog Resource Inactive ${catalog_resource_id} - ${service_json}= Mark ASDC Catalog Service Inactive ${catalog_service_id} - ${services_json}= Delete Inactive ASDC Catalog Services - ${resources_json}= Delete Inactive ASDC Catalog Resources \ No newline at end of file + \ ${resourece_json}= Mark SDC Catalog Resource Inactive ${catalog_resource_id} + ${service_json}= Mark SDC Catalog Service Inactive ${catalog_service_id} + ${services_json}= Delete Inactive SDC Catalog Services + ${resources_json}= Delete Inactive SDC Catalog Resources \ No newline at end of file diff --git a/robot/resources/test_templates/model_test_template_vcperescust.robot b/robot/resources/test_templates/model_test_template_vcperescust.robot index bcce51e2..8baca3f4 100644 --- a/robot/resources/test_templates/model_test_template_vcperescust.robot +++ b/robot/resources/test_templates/model_test_template_vcperescust.robot @@ -1,16 +1,16 @@ *** Settings *** -Documentation The main interface for interacting with ASDC. It handles low level stuff like managing the http request library and DCAE required fields +Documentation Distribute models for vcpe Library OperatingSystem Library ArchiveLibrary Library Collections Library String Library DateTime Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping -Resource ../asdc_interface.robot +Resource ../sdc_interface.robot *** Variables *** -${ASDC_ASSETS_DIRECTORY} ${GLOBAL_HEAT_TEMPLATES_FOLDER} -${ASDC_ZIP_DIRECTORY} ${ASDC_ASSETS_DIRECTORY}/temp +${SDC_ASSETS_DIRECTORY} ${GLOBAL_HEAT_TEMPLATES_FOLDER} +${SDC_ZIP_DIRECTORY} ${SDC_ASSETS_DIRECTORY}/temp *** Keywords *** Model Distribution For vCPEResCust Directory @@ -24,11 +24,11 @@ Model Distribution For vCPEResCust Directory ${catalog_service_name}= Set Variable If '${catalog_service_name}' =='' ${shortened_uuid} ${catalog_service_name} :FOR ${directory} IN @{directory_list} \ ${zipname}= Replace String ${directory} / _ - \ ${zip}= Catenate ${ASDC_ZIP_DIRECTORY}/${zipname}.zip - \ ${folder}= Catenate ${ASDC_ASSETS_DIRECTORY}/${directory} - \ OperatingSystem.Create Directory ${ASDC_ASSETS_DIRECTORY}/temp + \ ${zip}= Catenate ${SDC_ZIP_DIRECTORY}/${zipname}.zip + \ ${folder}= Catenate ${SDC_ASSETS_DIRECTORY}/${directory} + \ OperatingSystem.Create Directory ${SDC_ASSETS_DIRECTORY}/temp \ Create Zip From Files In Directory ${folder} ${zip} \ Append To List ${ziplist} ${zip} - ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} Distribute vCPEResCust Model From ASDC ${ziplist} ${catalog_service_name} ${cds} ${service} + ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} Distribute vCPEResCust Model From SDC ${ziplist} ${catalog_service_name} ${cds} ${service} Download CSAR ${catalog_service_id} [Return] ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resources} \ No newline at end of file diff --git a/robot/resources/test_templates/vnf_orchestration_test_template.robot b/robot/resources/test_templates/vnf_orchestration_test_template.robot index a9e7345b..190f64ac 100644 --- a/robot/resources/test_templates/vnf_orchestration_test_template.robot +++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot @@ -28,7 +28,7 @@ Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping *** Keywords *** Orchestrate VNF Template - [Documentation] Use openECOMP to Orchestrate a service. + [Documentation] Use ONAP to Orchestrate a service. [Arguments] ${customer_name} ${service} ${product_family} ${delete_flag}=DELETE ${uuid}= Generate UUID4 ${catalog_service_id}= Set Variable ${None} # default to empty @@ -39,7 +39,7 @@ Orchestrate VNF Template [Teardown] Teardown VNF ${customer_name}_${uuid} ${catalog_service_id} ${catalog_resource_ids} Orchestrate VNF - [Documentation] Use openECOMP to Orchestrate a service. + [Documentation] Use ONAP to Orchestrate a service. [Arguments] ${customer_name} ${service} ${product_family} ${tenant_id} ${tenant_name} ${project_name}=Project-Demonstration ${owning_entity}=OE-Demonstration ${lcp_region}= Get Openstack Region ${uuid}= Generate UUID4 diff --git a/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot b/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot index f203b167..50f1bcfb 100644 --- a/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot +++ b/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot @@ -40,13 +40,13 @@ ${so_uri_path} /onap/so/infra/serviceInstantiation/v7/serviceInstances *** Keywords *** Orchestrate VNF With CDS Template - [Documentation] Use openECOMP to Orchestrate a service. + [Documentation] Use ONAP to Orchestrate a service. [Arguments] ${customer_name} ${service_instance_name} ${product_family} ${uuid}= Generate UUID4 Orchestrate VNF With CDS ${customer_name}_${uuid} ${service_instance_name}${uuid} ${product_family} Orchestrate VNF With CDS - [Documentation] Use openECOMP to Orchestrate a service. + [Documentation] Use ONAP to Orchestrate a service. [Arguments] ${customer_name} ${service_instance_name} ${product_family} ${project_name}=Project-Demonstration ${owning_entity}=OE-Demonstration ${lcp_region}= Get Openstack Region ${dict}= Create Dictionary @@ -85,7 +85,7 @@ Orchestrate VNF With CDS Log --------request-------- Log ${request} Log --------end request-------- - ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD} + ${auth}= Create List ${GLOBAL_SO_USERNAME} ${GLOBAL_SO_PASSWORD} ${resp}= SO.Run Post Request ${GLOBAL_SO_ENDPOINT} ${so_uri_path} ${data} auth=${auth} Log --------response------- ${json_string}= Evaluate json.dumps(${resp.json()}) json @@ -94,8 +94,8 @@ Orchestrate VNF With CDS ${requestId}= Catenate ${resp.json()['requestReferences']['requestId']} Log requestId=${requestId} Log -------end response------- - # ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD} - # Run Polling Get Request ${MSO_ENDPOINT} ${GLOBAL_MSO_STATUS_PATH}${request_id} auth=${auth} + # ${auth}= Create List ${GLOBAL_SO_USERNAME} ${GLOBAL_SO_PASSWORD} + # Run Polling Get Request ${SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth} Get VNF Info [Documentation] Get VNF Info diff --git a/robot/resources/vid/create_service_instance.robot b/robot/resources/vid/create_service_instance.robot index fb03451e..e617d8fc 100644 --- a/robot/resources/vid/create_service_instance.robot +++ b/robot/resources/vid/create_service_instance.robot @@ -36,7 +36,7 @@ Create VID Service Instance Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Close'] ${request_id}= Parse Request Id ${response text} ${service_instance_id}= Parse Instance Id ${response text} - ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD} + ${auth}= Create List ${GLOBAL_SO_USERNAME} ${GLOBAL_SO_PASSWORD} SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth} [return] ${service_instance_id} @@ -58,7 +58,7 @@ Delete Service Instance By GUI Wait Until Element Contains xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} ${response text}= Get Text xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] ${request_id}= Parse Request Id ${response text} - ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD} + ${auth}= Create List ${GLOBAL_SO_USERNAME} ${GLOBAL_SO_PASSWORD} SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth} Search Service Instance diff --git a/robot/resources/vid/create_vid_vnf.robot b/robot/resources/vid/create_vid_vnf.robot index 4bc1dbd8..5ca55e48 100644 --- a/robot/resources/vid/create_vid_vnf.robot +++ b/robot/resources/vid/create_vid_vnf.robot @@ -83,7 +83,7 @@ Delete VID VNF ${response text}= Get Text xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] ${request_id}= Parse Request Id ${response text} - ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD} + ${auth}= Create List ${GLOBAL_SO_USERNAME} ${GLOBAL_SO_PASSWORD} ${resp}= SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth} Create VID VNF module @@ -124,7 +124,7 @@ Create VID VNF module ${instance_id}= Parse Instance Id ${response text} ${request_id}= Parse Request Id ${response text} - ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD} + ${auth}= Create List ${GLOBAL_SO_USERNAME} ${GLOBAL_SO_PASSWORD} ${resp}= SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth} [Return] ${instance_id} diff --git a/robot/resources/vid/teardown_vid.robot b/robot/resources/vid/teardown_vid.robot index ddffa575..46f5a33a 100644 --- a/robot/resources/vid/teardown_vid.robot +++ b/robot/resources/vid/teardown_vid.robot @@ -82,7 +82,7 @@ Delete Next VID Entity ${response text}= Get Text xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] ${request_id}= Parse Request Id ${response text} Click Element xpath=//div[@class='ng-scope']/div[@class = 'buttonRow']/button[text() = 'Close'] - ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD} + ${auth}= Create List ${GLOBAL_SO_USERNAME} ${GLOBAL_SO_PASSWORD} ${resp}= SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_SO_STATUS_PATH}${request_id} auth=${auth} [Return] ${teardown_status} ${vfmodule} diff --git a/robot/resources/vid/vid_interface.robot b/robot/resources/vid/vid_interface.robot index 29af9148..0e74a486 100644 --- a/robot/resources/vid/vid_interface.robot +++ b/robot/resources/vid/vid_interface.robot @@ -88,16 +88,16 @@ Input Text When Enabled Input Text xpath=${xpath} ${value} Parse Request Id - [Arguments] ${mso_response_text} - ${request_list}= Split String ${mso_response_text} 202)\n 1 + [Arguments] ${so_response_text} + ${request_list}= Split String ${so_response_text} 202)\n 1 ${clean_string}= Replace String ${request_list[1]} \n ${empty} ${json}= To Json ${clean_string} ${request_id}= Catenate ${json['requestReferences']['requestId']} [Return] ${request_id} Parse Instance Id - [Arguments] ${mso_response_text} - ${request_list}= Split String ${mso_response_text} 202)\n 1 + [Arguments] ${so_response_text} + ${request_list}= Split String ${so_response_text} 202)\n 1 ${json}= To Json ${request_list[1]} ${request_id}= Catenate ${json['requestReferences']['instanceId']} [Return] ${request_id} diff --git a/robot/testsuites/create-cloud-config.robot b/robot/testsuites/create-cloud-config.robot index 636609c4..cda8a5e6 100644 --- a/robot/testsuites/create-cloud-config.robot +++ b/robot/testsuites/create-cloud-config.robot @@ -8,14 +8,14 @@ Resource ../resources/aai/create_tenant.robot *** Test Cases *** Create Cloud Config Test - [TAGS] mso cloudconfig + [TAGS] so cloudconfig # Run Create Cloud Configuration RegionOne RegionOne RegionOne DEFAULT_KEYSTONE identify_url:http://10.12.25.2:5000/v2.0 mso_id:demo mso_pass:encrypted_password admin_tenant:1e097c6713e74fd7ac8e4295e605ee1e member_role:admin identity_server_type:KEYSTONE identity_authentication_type:USERNAME_PASSWORD ${arguments}= Create Dictionary site_name=${GLOBAL_INJECTED_REGION} region_id=${GLOBAL_INJECTED_REGION} clli=${GLOBAL_INJECTED_REGION} identity_id=DEFAULT_KEYSTONE identity_url=${GLOBAL_INJECTED_KEYSTONE}/${GLOBAL_INJECTED_OPENSTACK_KEYSTONE_API_VERSION} mso_id=${GLOBAL_INJECTED_OPENSTACK_USERNAME} mso_pass=${GLOBAL_INJECTED_OPENSTACK_API_KEY} admin_tenant=${GLOBAL_INJECTED_OPENSTACK_TENANT_ID} member_role=admin identity_server_type=KEYSTONE_V3 authentication_type=USERNAME_PASSWORD - ${auth}= Create List ${GLOBAL_MSO_CATDB_USERNAME} ${GLOBAL_MSO_PASSWORD} + ${auth}= Create List ${GLOBAL_SO_CATDB_USERNAME} ${GLOBAL_SO_PASSWORD} SO.Upsert Cloud Configuration ${GLOBAL_SO_CATDB_ENDPOINT} ${GLOBAL_SO_CLOUD_CONFIG_PATH} ${GLOBAL_TEMPLATE_FOLDER} ${GLOBAL_SO_CLOUD_CONFIG_TEMPLATE} ${arguments} auth=${auth} Create Cloud Config RegionThree V3 Test - [TAGS] mso cloudconfig cloudconfigv3 + [TAGS] so cloudconfig cloudconfigv3 [Documentation] Create Keystone V3 in Region 3 ... [Arguments] ${site_name} ${region_id} ${clli} ${identity_id} ${identity_url} ${mso_id} ${mso_pass} ... ${admin_tenant} ${member_role} ${identity_server_type} ${authentication_type} ${project_domain_name} ${user_domain_Name} @@ -23,14 +23,13 @@ Create Cloud Config RegionThree V3 Test ... In Windriver/Intel test labs the os_region_id's are all set to "RegionOne" ... clli by testing team convention is same as onap site_name ... KEYSTONE URL should end in /v3 SO will put /auth when KEYSTONE_V3 is the identity_server_type - ${arguments}= Create Dictionary site_name=${GLOBAL_INJECTED_REGION_THREE} region_id=${GLOBAL_INJECTED_REGION} clli=${GLOBAL_INJECTED_REGION_THREE} identity_id=REGION_THREE_KEYSTONE identity_url=${GLOBAL_INJECTED_KEYSTONE_REGION_THREE}/${GLOBAL_INJECTED_OPENSTACK_KEYSTONE_API_VERSION_REGION_THREE} mso_id=${GLOBAL_INJECTED_OPENSTACK_USERNAME_REGION_THREE} mso_pass=${GLOBAL_INJECTED_OPENSTACK_MSO_ENCRYPTED_PASSWORD_REGION_THREE} admin_tenant=${GLOBAL_INJECTED_OPENSTACK_TENANT_ID_REGION_THREE} member_role=admin identity_server_type=KEYSTONE_V3 authentication_type=USERNAME_PASSWORD project_domain_name=${GLOBAL_INJECTED_OPENSTACK_PROJECT_DOMAIN_REGION_THREE} user_domain_name=${GLOBAL_INJECTED_OPENSTACK_USER_DOMAIN_REGION_THREE} - ${auth}= Create List ${GLOBAL_MSO_CATDB_USERNAME} ${GLOBAL_MSO_PASSWORD} + ${arguments}= Create Dictionary site_name=${GLOBAL_INJECTED_REGION_THREE} region_id=${GLOBAL_INJECTED_REGION} clli=${GLOBAL_INJECTED_REGION_THREE} identity_id=REGION_THREE_KEYSTONE identity_url=${GLOBAL_INJECTED_KEYSTONE_REGION_THREE}/${GLOBAL_INJECTED_OPENSTACK_KEYSTONE_API_VERSION_REGION_THREE} mso_id=${GLOBAL_INJECTED_OPENSTACK_USERNAME_REGION_THREE} mso_pass=${GLOBAL_INJECTED_OPENSTACK_SO_ENCRYPTED_PASSWORD_REGION_THREE} admin_tenant=${GLOBAL_INJECTED_OPENSTACK_TENANT_ID_REGION_THREE} member_role=admin identity_server_type=KEYSTONE_V3 authentication_type=USERNAME_PASSWORD project_domain_name=${GLOBAL_INJECTED_OPENSTACK_PROJECT_DOMAIN_REGION_THREE} user_domain_name=${GLOBAL_INJECTED_OPENSTACK_USER_DOMAIN_REGION_THREE} + ${auth}= Create List ${GLOBAL_SO_CATDB_USERNAME} ${GLOBAL_SO_PASSWORD} SO.Upsert Cloud Configuration ${GLOBAL_SO_CATDB_ENDPOINT} ${GLOBAL_SO_CLOUD_CONFIG_PATH} ${GLOBAL_TEMPLATE_FOLDER} ${GLOBAL_SO_CLOUD_CONFIG_TEMPLATE} ${arguments} auth=${auth} Inventory Tenant If Not Exists CloudOwner ${GLOBAL_INJECTED_REGION_THREE} SharedNode OwnerType v1 CloudZone ${GLOBAL_INJECTED_OPENSTACK_TENANT_ID_REGION_THREE} ${GLOBAL_INJECTED_OPENSTACK_PROJECT_DOMAIN_REGION_THREE} - Get Cloud Config Test [TAGS] mso cloudconfig - ${auth}= Create List ${GLOBAL_MSO_CATDB_USERNAME} ${GLOBAL_MSO_PASSWORD} + ${auth}= Create List ${GLOBAL_SO_CATDB_USERNAME} ${GLOBAL_SO_PASSWORD} ${get_resp}= SO.Get Cloud Configuration ${GLOBAL_SO_CATDB_ENDPOINT} ${GLOBAL_SO_CLOUD_CONFIG_PATH} ${GLOBAL_INJECTED_REGION} auth=${auth} Should Be Equal As Strings ${get_resp.status_code} 200 \ No newline at end of file diff --git a/robot/testsuites/demo.robot b/robot/testsuites/demo.robot index 75a9f161..b60921d3 100644 --- a/robot/testsuites/demo.robot +++ b/robot/testsuites/demo.robot @@ -4,7 +4,6 @@ Documentation Executes the VNF Orchestration Test cases including setup and te Library ONAPLibrary.SO WITH NAME SO Library Collections Resource ../resources/demo_preload.robot -Resource ../resources/asdc_interface.robot *** Variables *** @@ -32,7 +31,7 @@ Initialize Customer And Models Initialize SO Openstack Identity For V3 [Tags] InitDemo ${arguments}= Create Dictionary site_name=${GLOBAL_INJECTED_REGION} region_id=${GLOBAL_INJECTED_REGION} clli=${GLOBAL_INJECTED_REGION} identity_id=DEFAULT_KEYSTONE identity_url=${GLOBAL_INJECTED_KEYSTONE}/${GLOBAL_INJECTED_OPENSTACK_KEYSTONE_API_VERSION} mso_id=${GLOBAL_INJECTED_OPENSTACK_USERNAME} mso_pass=${GLOBAL_INJECTED_OPENSTACK_SO_ENCRYPTED_PASSWORD} admin_tenant=${GLOBAL_INJECTED_OPENSTACK_TENANT_ID} member_role=admin identity_server_type=KEYSTONE_V3 authentication_type=USERNAME_PASSWORD project_domain_name=${GLOBAL_INJECTED_OPENSTACK_DOMAIN_ID} user_domain_name=${GLOBAL_INJECTED_OPENSTACK_USER_DOMAIN} - ${auth}= Create List ${GLOBAL_MSO_CATDB_USERNAME} ${GLOBAL_MSO_PASSWORD} + ${auth}= Create List ${GLOBAL_SO_CATDB_USERNAME} ${GLOBAL_SO_PASSWORD} Run Keyword If '${GLOBAL_INJECTED_OPENSTACK_KEYSTONE_API_VERSION}'=='v3' SO.Upsert Cloud Configuration ${GLOBAL_SO_CATDB_ENDPOINT} ${GLOBAL_SO_CLOUD_CONFIG_PATH} ${GLOBAL_TEMPLATE_FOLDER} ${GLOBAL_SO_CLOUD_CONFIG_TEMPLATE} ${arguments} auth=${auth} Initialize Customer diff --git a/robot/testsuites/health-check.robot b/robot/testsuites/health-check.robot index 13b049cf..b1a48892 100644 --- a/robot/testsuites/health-check.robot +++ b/robot/testsuites/health-check.robot @@ -9,7 +9,7 @@ Resource ../resources/aai/aai_interface.robot Resource ../resources/vid/vid_interface.robot Resource ../resources/policy_interface.robot Library ONAPLibrary.SO WITH NAME SO -Resource ../resources/asdc_interface.robot +Resource ../resources/sdc_interface.robot Resource ../resources/appc_interface.robot Resource ../resources/portal_interface.robot Resource ../resources/mr_interface.robot @@ -186,7 +186,7 @@ Basic Portal Health Check Basic SDC Health Check [Tags] health core health-sdc - Run ASDC Health Check + Run SDC Health Check Basic SDNC Health Check [Tags] health core health-sdnc @@ -195,7 +195,7 @@ Basic SDNC Health Check Basic SO Health Check [Tags] health core health-so SO.Run Get Request ${GLOBAL_SO_APIHAND_ENDPOINT} ${GLOBAL_SO_HEALTH_CHECK_PATH} - SO.Run Get Request ${GLOBAL_SO_ASDCHAND_ENDPOINT} ${GLOBAL_SO_HEALTH_CHECK_PATH} + SO.Run Get Request ${GLOBAL_SO_SDCHAND_ENDPOINT} ${GLOBAL_SO_HEALTH_CHECK_PATH} SO.Run Get Request ${GLOBAL_SO_BPMN_ENDPOINT} ${GLOBAL_SO_HEALTH_CHECK_PATH} SO.Run Get Request ${GLOBAL_SO_CATDB_ENDPOINT} ${GLOBAL_SO_HEALTH_CHECK_PATH} SO.Run Get Request ${GLOBAL_SO_OPENSTACK_ENDPOINT} ${GLOBAL_SO_HEALTH_CHECK_PATH} diff --git a/robot/testsuites/model-distribution-vcpe.robot b/robot/testsuites/model-distribution-vcpe.robot index eee3af91..6bbde68c 100644 --- a/robot/testsuites/model-distribution-vcpe.robot +++ b/robot/testsuites/model-distribution-vcpe.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Testing asdc. +Documentation Testing sdc. Library OperatingSystem Library RequestsLibrary Library Collections diff --git a/robot/testsuites/model-distribution.robot b/robot/testsuites/model-distribution.robot index 0bdb997c..b2f0ff3f 100644 --- a/robot/testsuites/model-distribution.robot +++ b/robot/testsuites/model-distribution.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Testing asdc. +Documentation Testing sdc. Library OperatingSystem Library RequestsLibrary Library Collections diff --git a/robot/testsuites/update_onap_page.robot b/robot/testsuites/update_onap_page.robot index 08c958fb..b197d16c 100644 --- a/robot/testsuites/update_onap_page.robot +++ b/robot/testsuites/update_onap_page.robot @@ -33,7 +33,7 @@ Update ONAP Page Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_AAI2_IP_ADDR}=aai2 Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_APPC_IP_ADDR}=appc Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_DCAE_IP_ADDR}=dcae_controller - Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_SO_IP_ADDR}=mso + Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_SO_IP_ADDR}=so Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_MR_IP_ADDR}=message_router Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_BC_IP_ADDR}=bus_controller Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_POLICY_IP_ADDR}=policy -- cgit 1.2.3-korg