From 7e4e7939f698f593bf4019f3a4a1813206b77463 Mon Sep 17 00:00:00 2001 From: "Mantena, Ravi (rx908f)" Date: Wed, 1 Jul 2020 14:18:48 -0400 Subject: Switch between ContainerizedPlatformComponent to ContainerizedServiceComponent, Remove name, dns_name and add service_component_type for onap, Add location_id from dmaap in bp_gen Issue-ID: DCAEGEN2-2144> Change-Id: Ice8529336c21b2a6e27555509215e911f80279b8 Signed-off-by: Ravi Mantena --- .../ves/blueprints/ves-no-change_yaml.yaml | 187 ------------ .../ves/blueprints/ves-with-dmaap_yaml.yaml | 314 -------------------- .../TestCases/ves/blueprints/vesK8sWithDmaap.yaml | 319 +++++++++++++++++++++ .../ves/blueprints/vesK8sWithoutDmaap.yaml | 185 ++++++++++++ mod/bpgenerator/pom.xml | 2 +- .../models/blueprint/Properties.java | 20 +- .../blueprintgenerator/models/onapbp/OnapNode.java | 2 +- .../core/BlueprintGeneratorTest.java | 2 +- mod/bpgenerator/version.properties | 2 +- 9 files changed, 526 insertions(+), 507 deletions(-) delete mode 100644 mod/bpgenerator/TestCases/ves/blueprints/ves-no-change_yaml.yaml delete mode 100644 mod/bpgenerator/TestCases/ves/blueprints/ves-with-dmaap_yaml.yaml create mode 100644 mod/bpgenerator/TestCases/ves/blueprints/vesK8sWithDmaap.yaml create mode 100644 mod/bpgenerator/TestCases/ves/blueprints/vesK8sWithoutDmaap.yaml diff --git a/mod/bpgenerator/TestCases/ves/blueprints/ves-no-change_yaml.yaml b/mod/bpgenerator/TestCases/ves/blueprints/ves-no-change_yaml.yaml deleted file mode 100644 index b93f9c1..0000000 --- a/mod/bpgenerator/TestCases/ves/blueprints/ves-no-change_yaml.yaml +++ /dev/null @@ -1,187 +0,0 @@ -# ============LICENSE_START======================================================= -# org.onap.dcae -# ================================================================================ -# Copyright (c) 2019-2020 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========================================================= -# -# -#description: Collector for receiving VES events through restful interface -#blueprint_version: 1.5.0 ---- -tosca_definitions_version: cloudify_dsl_1_3 -imports: -- https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml -- https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.1/k8splugin_types.yaml -inputs: - always_pull_image: - type: boolean - description: Set to true if the image should always be pulled - default: true - collector.dmaap.streamid: - type: string - default: "fault=ves-fault,ves-fault-secondary|syslog=ves-syslog,ves-syslog-secondary|heartbeat=ves-heartbeat,ves-heartbeat-secondary|measurementsForVfScaling=ves-measurement,ves-measurement-secondary|mobileFlow=ves-mobileflow,ves-mobileflow-secondary|other=ves-other,ves-other-secondary|stateChange=ves-statechange,ves-statechange-secondary|thresholdCrossingAlert=ves-thresholdCrossingAlert,ves-thresholdCrossingAlert-secondary|voiceQuality=ves-voicequality,ves-voicequality-secondary|sipSignaling=ves-sipsignaling,ves-sipsignaling-secondary|notification=ves-notification,ves-notification-secondary|pnfRegistration=ves-pnfRegistration,ves-pnfRegistration-secondary" - dcae-ves-collector_cpu_limit: - type: string - default: "250m" - dcae-ves-collector_cpu_request: - type: string - default: "250m" - dcae-ves-collector_memory_limit: - type: string - default: "128Mi" - dcae-ves-collector_memory_request: - type: string - default: "128Mi" - envs: - default: {} - external_port_0: - type: string - default: "8080" - external_port_1: - type: string - default: "8443" - header.authlist: - type: string - default: "sample1,$2a$10$pgjaxDzSuc6XVFEeqvxQ5u90DKJnM/u7TJTcinAlFJVaavXMWf/Zi|userid1,$2a$10$61gNubgJJl9lh3nvQvY9X.x4e5ETWJJ7ao7ZhJEvmfJigov26Z6uq|userid2,$2a$10$G52y/3uhuhWAMy.bx9Se8uzWinmbJa.dlm1LW6bYPdPkkywLDPLiy" - image: - type: string - default: "nexus.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:latest" - location_id: - type: string - default: "" - replicas: - type: integer - description: number of instances - default: 1 - service_component_name_override: - type: string - default: "" - ves_fault_publish_url: - type: string - ves_heartbeat_secondary_publish_url: - type: string - ves_measurement_publish_url: - type: string - ves_notification_publish_url: - type: string - ves_other_publish_url: - type: string - ves_pnfRegistration_publish_url: - type: string -node_templates: - dcae-ves-collector: - type: dcae.nodes.ContainerizedPlatformComponent - interfaces: - cloudify.interfaces.lifecycle: - start: - inputs: - ports: - - concat: ["8080:", {get_input: external_port_0}] - - concat: ["8443:", {get_input: external_port_1}] - envs: - get_input: envs - properties: - application_config: - service_calls: [] - streams_publishes: - ves-fault: - dmaap_info: - topic_url: - get_input: ves_fault_publish_url - type: message router - ves-heartbeat-secondary: - dmaap_info: - topic_url: - get_input: ves_heartbeat_secondary_publish_url - type: message router - ves-measurement: - dmaap_info: - topic_url: - get_input: ves_measurement_publish_url - type: message router - ves-notification: - dmaap_info: - topic_url: - get_input: ves_notification_publish_url - type: message router - ves-other: - dmaap_info: - topic_url: - get_input: ves_other_publish_url - type: message router - ves-pnfRegistration: - dmaap_info: - topic_url: - get_input: ves_pnfRegistration_publish_url - type: message router - streams_subscribes: {} - auth.method: noAuth - collector.dmaap.streamid: - get_input: collector.dmaap.streamid - collector.keystore.file.location: /opt/app/dcae-certificate/keystore.jks - collector.keystore.passwordfile: /opt/app/dcae-certificate/.password - collector.schema.checkflag: 1 - collector.schema.file: {"v1":"./etc/CommonEventFormat_27.2.json","v2":"./etc/CommonEventFormat_27.2.json","v3":"./etc/CommonEventFormat_27.2.json","v4":"./etc/CommonEventFormat_27.2.json","v5":"./etc/CommonEventFormat_28.4.1.json","v7":"./etc/CommonEventFormat_30.json"} - collector.service.port: 8080 - collector.service.secure.port: 8443 - collector.truststore.file.location: /opt/app/dcae-certificate/truststore.jks - collector.truststore.passwordfile: /opt/app/dcae-certificate/.trustpassword - event.transform.flag: 1 - header.authlist: - get_input: header.authlist - service_component_name_override: - get_input: service_component_name_override - tomcat.maxthreads: 200 - docker_config: - healthcheck: - interval: 15s - timeout: 1s - type: https - endpoint: /healthcheck - volumes: - - container: - bind: /opt/app/dcae-certificate - host: - path: /opt/app/dcae-certificate - - container: - bind: /opt/app/VESCollector/logs - host: - path: /opt/logs/DCAE/VESCollector/logs - - container: - bind: /opt/app/VESCollector/etc - host: - path: /opt/logs/DCAE/VESCollector/etc - image: - get_input: image - location_id: - get_input: location_id - dns_name: dcae-ves-collector - replicas: - get_input: replicas - name: dcae-ves-collector - resource_config: - limits: - cpu: - get_input: dcae-ves-collector_cpu_limit - memory: - get_input: dcae-ves-collector_memory_limit - requests: - cpu: - get_input: dcae-ves-collector_cpu_request - memory: - get_input: dcae-ves-collector_memory_request - always_pull_image: - get_input: always_pull_image - relationships: [] \ No newline at end of file diff --git a/mod/bpgenerator/TestCases/ves/blueprints/ves-with-dmaap_yaml.yaml b/mod/bpgenerator/TestCases/ves/blueprints/ves-with-dmaap_yaml.yaml deleted file mode 100644 index 915411e..0000000 --- a/mod/bpgenerator/TestCases/ves/blueprints/ves-with-dmaap_yaml.yaml +++ /dev/null @@ -1,314 +0,0 @@ -# ============LICENSE_START======================================================= -# org.onap.dcae -# ================================================================================ -# Copyright (c) 2019-2020 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========================================================= -#description: Collector for receiving VES events through restful interface -#blueprint_version: 1.5.0 ---- -tosca_definitions_version: cloudify_dsl_1_3 -description: Collector for receiving VES events through restful interface -imports: -- https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml -- https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.1/k8splugin_types.yaml -- https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/dmaap/dmaap.yaml -inputs: - collector.dmaap.streamid: - type: string - default: "fault=ves-fault,ves-fault-secondary|syslog=ves-syslog,ves-syslog-secondary|heartbeat=ves-heartbeat,ves-heartbeat-secondary|measurementsForVfScaling=ves-measurement,ves-measurement-secondary|mobileFlow=ves-mobileflow,ves-mobileflow-secondary|other=ves-other,ves-other-secondary|stateChange=ves-statechange,ves-statechange-secondary|thresholdCrossingAlert=ves-thresholdCrossingAlert,ves-thresholdCrossingAlert-secondary|voiceQuality=ves-voicequality,ves-voicequality-secondary|sipSignaling=ves-sipsignaling,ves-sipsignaling-secondary|notification=ves-notification,ves-notification-secondary|pnfRegistration=ves-pnfRegistration,ves-pnfRegistration-secondary" - dcae-ves-collector_cpu_limit: - type: string - default: "250m" - dcae-ves-collector_cpu_request: - type: string - default: "250m" - dcae-ves-collector_memory_limit: - type: string - default: "128Mi" - dcae-ves-collector_memory_request: - type: string - default: "128Mi" - envs: - default: {} - external_port_0: - type: string - default: "8080" - external_port_1: - type: string - default: "8443" - header.authlist: - type: string - default: "sample1,$2a$10$pgjaxDzSuc6XVFEeqvxQ5u90DKJnM/u7TJTcinAlFJVaavXMWf/Zi|userid1,$2a$10$61gNubgJJl9lh3nvQvY9X.x4e5ETWJJ7ao7ZhJEvmfJigov26Z6uq|userid2,$2a$10$G52y/3uhuhWAMy.bx9Se8uzWinmbJa.dlm1LW6bYPdPkkywLDPLiy" - replicas: - type: integer - description: number of instances - default: 1 - service_component_name_override: - type: string - default: "" - tag_version: - type: string - default: "nexus.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:latest" - topic0_name: - type: string - topic1_name: - type: string - topic2_name: - type: string - topic3_name: - type: string - topic4_name: - type: string - topic5_name: - type: string - ves-fault_topic0_aaf_password: - type: string - ves-fault_topic0_aaf_username: - type: string - ves-fault_topic0_client_role: - type: string - ves-fault_topic0_location: - type: string - ves-heartbeat-secondary_topic3_aaf_password: - type: string - ves-heartbeat-secondary_topic3_aaf_username: - type: string - ves-heartbeat-secondary_topic3_client_role: - type: string - ves-heartbeat-secondary_topic3_location: - type: string - ves-measurement_topic1_aaf_password: - type: string - ves-measurement_topic1_aaf_username: - type: string - ves-measurement_topic1_client_role: - type: string - ves-measurement_topic1_location: - type: string - ves-notification_topic5_aaf_password: - type: string - ves-notification_topic5_aaf_username: - type: string - ves-notification_topic5_client_role: - type: string - ves-notification_topic5_location: - type: string - ves-other_topic2_aaf_password: - type: string - ves-other_topic2_aaf_username: - type: string - ves-other_topic2_client_role: - type: string - ves-other_topic2_location: - type: string - ves-pnfRegistration_topic4_aaf_password: - type: string - ves-pnfRegistration_topic4_aaf_username: - type: string - ves-pnfRegistration_topic4_client_role: - type: string - ves-pnfRegistration_topic4_location: - type: string -node_templates: - dcae-ves-collector: - type: dcae.nodes.ContainerizedServiceComponentUsingDmaap - interfaces: - cloudify.interfaces.lifecycle: - start: - inputs: - ports: - - concat: ["8080:", {get_input: external_port_0}] - - concat: ["8443:", {get_input: external_port_1}] - envs: - get_input: envs - properties: - application_config: - service_calls: [] - streams_publishes: - ves-fault: - dmaap_info: <> - type: message router - pass: - get_input: ves-fault_topic0_aaf_password - user: - get_input: ves-fault_topic0_aaf_username - ves-heartbeat-secondary: - dmaap_info: <> - type: message router - pass: - get_input: ves-heartbeat-secondary_topic3_aaf_password - user: - get_input: ves-heartbeat-secondary_topic3_aaf_username - ves-measurement: - dmaap_info: <> - type: message router - pass: - get_input: ves-measurement_topic1_aaf_password - user: - get_input: ves-measurement_topic1_aaf_username - ves-notification: - dmaap_info: <> - type: message router - pass: - get_input: ves-notification_topic5_aaf_password - user: - get_input: ves-notification_topic5_aaf_username - ves-other: - dmaap_info: <> - type: message router - pass: - get_input: ves-other_topic2_aaf_password - user: - get_input: ves-other_topic2_aaf_username - ves-pnfRegistration: - dmaap_info: <> - type: message router - pass: - get_input: ves-pnfRegistration_topic4_aaf_password - user: - get_input: ves-pnfRegistration_topic4_aaf_username - streams_subscribes: {} - auth.method: noAuth - collector.dmaap.streamid: - get_input: collector.dmaap.streamid - collector.keystore.file.location: /opt/app/dcae-certificate/keystore.jks - collector.keystore.passwordfile: /opt/app/dcae-certificate/.password - collector.schema.checkflag: 1 - collector.schema.file: {"v1":"./etc/CommonEventFormat_27.2.json","v2":"./etc/CommonEventFormat_27.2.json","v3":"./etc/CommonEventFormat_27.2.json","v4":"./etc/CommonEventFormat_27.2.json","v5":"./etc/CommonEventFormat_28.4.1.json","v7":"./etc/CommonEventFormat_30.json"} - collector.service.port: 8080 - collector.service.secure.port: 8443 - collector.truststore.file.location: /opt/app/dcae-certificate/truststore.jks - collector.truststore.passwordfile: /opt/app/dcae-certificate/.trustpassword - event.transform.flag: 1 - header.authlist: - get_input: header.authlist - service_component_name_override: - get_input: service_component_name_override - tomcat.maxthreads: 200 - docker_config: - healthcheck: - interval: 15s - timeout: 1s - type: http - endpoint: /healthcheck - volumes: - - container: - bind: /opt/app/dcae-certificate - host: - path: /opt/app/dcae-certificate - - container: - bind: /opt/app/VESCollector/logs - host: - path: /opt/logs/DCAE/VESCollector/logs - - container: - bind: /opt/app/VESCollector/etc - host: - path: /opt/logs/DCAE/VESCollector/etc - image: - get_input: tag_version - service_component_type: dcae-ves-collector - replicas: - get_input: replicas - streams_publishes: - - name: topic0 - location: - get_input: ves-fault_topic0_location - client_role: - get_input: ves-fault_topic0_client_role - type: message router - - name: topic1 - location: - get_input: ves-measurement_topic1_location - client_role: - get_input: ves-measurement_topic1_client_role - type: message router - - name: topic2 - location: - get_input: ves-other_topic2_location - client_role: - get_input: ves-other_topic2_client_role - type: message router - - name: topic3 - location: - get_input: ves-heartbeat-secondary_topic3_location - client_role: - get_input: ves-heartbeat-secondary_topic3_client_role - type: message router - - name: topic4 - location: - get_input: ves-pnfRegistration_topic4_location - client_role: - get_input: ves-pnfRegistration_topic4_client_role - type: message router - - name: topic5 - location: - get_input: ves-notification_topic5_location - client_role: - get_input: ves-notification_topic5_client_role - type: message router - resource_config: - limits: - cpu: - get_input: dcae-ves-collector_cpu_limit - memory: - get_input: dcae-ves-collector_memory_limit - requests: - cpu: - get_input: dcae-ves-collector_cpu_request - memory: - get_input: dcae-ves-collector_memory_request - relationships: - - type: ccsdk.relationships.publish_events - target: topic0 - - type: ccsdk.relationships.publish_events - target: topic1 - - type: ccsdk.relationships.publish_events - target: topic2 - - type: ccsdk.relationships.publish_events - target: topic3 - - type: ccsdk.relationships.publish_events - target: topic4 - - type: ccsdk.relationships.publish_events - target: topic5 - topic0: - type: ccsdk.nodes.Topic - properties: - topic_name: - get_input: topic0_name - topic1: - type: ccsdk.nodes.Topic - properties: - topic_name: - get_input: topic1_name - topic2: - type: ccsdk.nodes.Topic - properties: - topic_name: - get_input: topic2_name - topic3: - type: ccsdk.nodes.Topic - properties: - topic_name: - get_input: topic3_name - topic4: - type: ccsdk.nodes.Topic - properties: - topic_name: - get_input: topic4_name - topic5: - type: ccsdk.nodes.Topic - properties: - topic_name: - get_input: topic5_name \ No newline at end of file diff --git a/mod/bpgenerator/TestCases/ves/blueprints/vesK8sWithDmaap.yaml b/mod/bpgenerator/TestCases/ves/blueprints/vesK8sWithDmaap.yaml new file mode 100644 index 0000000..601690e --- /dev/null +++ b/mod/bpgenerator/TestCases/ves/blueprints/vesK8sWithDmaap.yaml @@ -0,0 +1,319 @@ +# ============LICENSE_START======================================================= +# org.onap.dcae +# ================================================================================ +# Copyright (c) 2019-2020 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========================================================= +# +#description: Collector for receiving VES events through restful interface +#blueprint_version: 1.5.0 +--- +tosca_definitions_version: cloudify_dsl_1_3 +description: Collector for receiving VES events through restful interface +imports: +- http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml +- https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml +inputs: + collector.dmaap.streamid: + type: string + default: "fault=ves-fault,ves-fault-secondary|syslog=ves-syslog,ves-syslog-secondary|heartbeat=ves-heartbeat,ves-heartbeat-secondary|measurementsForVfScaling=ves-measurement,ves-measurement-secondary|mobileFlow=ves-mobileflow,ves-mobileflow-secondary|other=ves-other,ves-other-secondary|stateChange=ves-statechange,ves-statechange-secondary|thresholdCrossingAlert=ves-thresholdCrossingAlert,ves-thresholdCrossingAlert-secondary|voiceQuality=ves-voicequality,ves-voicequality-secondary|sipSignaling=ves-sipsignaling,ves-sipsignaling-secondary|notification=ves-notification,ves-notification-secondary|pnfRegistration=ves-pnfRegistration,ves-pnfRegistration-secondary" + dcae-ves-collector_cpu_limit: + type: string + default: "250m" + dcae-ves-collector_cpu_request: + type: string + default: "250m" + dcae-ves-collector_memory_limit: + type: string + default: "128Mi" + dcae-ves-collector_memory_request: + type: string + default: "128Mi" + envs: + default: {} + external_port_0: + type: string + default: "8080" + external_port_1: + type: string + default: "8443" + header.authlist: + type: string + default: "sample1,$2a$10$pgjaxDzSuc6XVFEeqvxQ5u90DKJnM/u7TJTcinAlFJVaavXMWf/Zi|userid1,$2a$10$61gNubgJJl9lh3nvQvY9X.x4e5ETWJJ7ao7ZhJEvmfJigov26Z6uq|userid2,$2a$10$G52y/3uhuhWAMy.bx9Se8uzWinmbJa.dlm1LW6bYPdPkkywLDPLiy" + location_id: + type: string + default: "" + replicas: + type: integer + description: number of instances + default: 1 + service_component_name_override: + type: string + default: "" + tag_version: + type: string + default: "nexus.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:latest" + ves-fault_topic_name: + type: string + ves-fault_ves-fault_topic_aaf_password: + type: string + ves-fault_ves-fault_topic_aaf_username: + type: string + ves-fault_ves-fault_topic_client_role: + type: string + ves-fault_ves-fault_topic_location: + type: string + ves-heartbeat-secondary_topic_name: + type: string + ves-heartbeat-secondary_ves-heartbeat-secondary_topic_aaf_password: + type: string + ves-heartbeat-secondary_ves-heartbeat-secondary_topic_aaf_username: + type: string + ves-heartbeat-secondary_ves-heartbeat-secondary_topic_client_role: + type: string + ves-heartbeat-secondary_ves-heartbeat-secondary_topic_location: + type: string + ves-measurement_topic_name: + type: string + ves-measurement_ves-measurement_topic_aaf_password: + type: string + ves-measurement_ves-measurement_topic_aaf_username: + type: string + ves-measurement_ves-measurement_topic_client_role: + type: string + ves-measurement_ves-measurement_topic_location: + type: string + ves-notification_topic_name: + type: string + ves-notification_ves-notification_topic_aaf_password: + type: string + ves-notification_ves-notification_topic_aaf_username: + type: string + ves-notification_ves-notification_topic_client_role: + type: string + ves-notification_ves-notification_topic_location: + type: string + ves-other_topic_name: + type: string + ves-other_ves-other_topic_aaf_password: + type: string + ves-other_ves-other_topic_aaf_username: + type: string + ves-other_ves-other_topic_client_role: + type: string + ves-other_ves-other_topic_location: + type: string + ves-pnfRegistration_topic_name: + type: string + ves-pnfRegistration_ves-pnfRegistration_topic_aaf_password: + type: string + ves-pnfRegistration_ves-pnfRegistration_topic_aaf_username: + type: string + ves-pnfRegistration_ves-pnfRegistration_topic_client_role: + type: string + ves-pnfRegistration_ves-pnfRegistration_topic_location: + type: string +node_templates: + dcae-ves-collector: + type: dcae.nodes.ContainerizedServiceComponentUsingDmaap + interfaces: + cloudify.interfaces.lifecycle: + start: + inputs: + ports: + - concat: ["8080:", {get_input: external_port_0}] + - concat: ["8443:", {get_input: external_port_1}] + envs: + get_input: envs + properties: + application_config: + service_calls: [] + streams_publishes: + ves-fault: + dmaap_info: <> + type: message router + pass: + get_input: ves-fault_ves-fault_topic_aaf_password + user: + get_input: ves-fault_ves-fault_topic_aaf_username + ves-heartbeat-secondary: + dmaap_info: <> + type: message router + pass: + get_input: ves-heartbeat-secondary_ves-heartbeat-secondary_topic_aaf_password + user: + get_input: ves-heartbeat-secondary_ves-heartbeat-secondary_topic_aaf_username + ves-measurement: + dmaap_info: <> + type: message router + pass: + get_input: ves-measurement_ves-measurement_topic_aaf_password + user: + get_input: ves-measurement_ves-measurement_topic_aaf_username + ves-notification: + dmaap_info: <> + type: message router + pass: + get_input: ves-notification_ves-notification_topic_aaf_password + user: + get_input: ves-notification_ves-notification_topic_aaf_username + ves-other: + dmaap_info: <> + type: message router + pass: + get_input: ves-other_ves-other_topic_aaf_password + user: + get_input: ves-other_ves-other_topic_aaf_username + ves-pnfRegistration: + dmaap_info: <> + type: message router + pass: + get_input: ves-pnfRegistration_ves-pnfRegistration_topic_aaf_password + user: + get_input: ves-pnfRegistration_ves-pnfRegistration_topic_aaf_username + streams_subscribes: {} + auth.method: noAuth + collector.dmaap.streamid: + get_input: collector.dmaap.streamid + collector.keystore.file.location: /opt/app/dcae-certificate/keystore.jks + collector.keystore.passwordfile: /opt/app/dcae-certificate/.password + collector.schema.checkflag: 1 + collector.schema.file: {"v1":"./etc/CommonEventFormat_27.2.json","v2":"./etc/CommonEventFormat_27.2.json","v3":"./etc/CommonEventFormat_27.2.json","v4":"./etc/CommonEventFormat_27.2.json","v5":"./etc/CommonEventFormat_28.4.1.json","v7":"./etc/CommonEventFormat_30.json"} + collector.service.port: 8080 + collector.service.secure.port: 8443 + collector.truststore.file.location: /opt/app/dcae-certificate/truststore.jks + collector.truststore.passwordfile: /opt/app/dcae-certificate/.trustpassword + event.transform.flag: 1 + header.authlist: + get_input: header.authlist + service_component_name_override: + get_input: service_component_name_override + tomcat.maxthreads: 200 + docker_config: + healthcheck: + interval: 15s + timeout: 1s + type: http + endpoint: /healthcheck + volumes: + - container: + bind: /opt/app/dcae-certificate + host: + path: /opt/app/dcae-certificate + - container: + bind: /opt/app/VESCollector/logs + host: + path: /opt/logs/DCAE/VESCollector/logs + - container: + bind: /opt/app/VESCollector/etc + host: + path: /opt/logs/DCAE/VESCollector/etc + image: + get_input: tag_version + location_id: + get_input: location_id + service_component_type: dcae-ves-collector + replicas: + get_input: replicas + streams_publishes: + - name: ves-fault_topic + location: + get_input: ves-fault_ves-fault_topic_location + client_role: + get_input: ves-fault_ves-fault_topic_client_role + type: message router + - name: ves-measurement_topic + location: + get_input: ves-measurement_ves-measurement_topic_location + client_role: + get_input: ves-measurement_ves-measurement_topic_client_role + type: message router + - name: ves-other_topic + location: + get_input: ves-other_ves-other_topic_location + client_role: + get_input: ves-other_ves-other_topic_client_role + type: message router + - name: ves-heartbeat-secondary_topic + location: + get_input: ves-heartbeat-secondary_ves-heartbeat-secondary_topic_location + client_role: + get_input: ves-heartbeat-secondary_ves-heartbeat-secondary_topic_client_role + type: message router + - name: ves-pnfRegistration_topic + location: + get_input: ves-pnfRegistration_ves-pnfRegistration_topic_location + client_role: + get_input: ves-pnfRegistration_ves-pnfRegistration_topic_client_role + type: message router + - name: ves-notification_topic + location: + get_input: ves-notification_ves-notification_topic_location + client_role: + get_input: ves-notification_ves-notification_topic_client_role + type: message router + resource_config: + limits: + cpu: + get_input: dcae-ves-collector_cpu_limit + memory: + get_input: dcae-ves-collector_memory_limit + requests: + cpu: + get_input: dcae-ves-collector_cpu_request + memory: + get_input: dcae-ves-collector_memory_request + relationships: + - type: ccsdk.relationships.publish_events + target: ves-fault_topic + - type: ccsdk.relationships.publish_events + target: ves-measurement_topic + - type: ccsdk.relationships.publish_events + target: ves-other_topic + - type: ccsdk.relationships.publish_events + target: ves-heartbeat-secondary_topic + - type: ccsdk.relationships.publish_events + target: ves-pnfRegistration_topic + - type: ccsdk.relationships.publish_events + target: ves-notification_topic + ves-fault_topic: + type: ccsdk.nodes.Topic + properties: + topic_name: + get_input: ves-fault_topic_name + ves-heartbeat-secondary_topic: + type: ccsdk.nodes.Topic + properties: + topic_name: + get_input: ves-heartbeat-secondary_topic_name + ves-measurement_topic: + type: ccsdk.nodes.Topic + properties: + topic_name: + get_input: ves-measurement_topic_name + ves-notification_topic: + type: ccsdk.nodes.Topic + properties: + topic_name: + get_input: ves-notification_topic_name + ves-other_topic: + type: ccsdk.nodes.Topic + properties: + topic_name: + get_input: ves-other_topic_name + ves-pnfRegistration_topic: + type: ccsdk.nodes.Topic + properties: + topic_name: + get_input: ves-pnfRegistration_topic_name \ No newline at end of file diff --git a/mod/bpgenerator/TestCases/ves/blueprints/vesK8sWithoutDmaap.yaml b/mod/bpgenerator/TestCases/ves/blueprints/vesK8sWithoutDmaap.yaml new file mode 100644 index 0000000..9786fff --- /dev/null +++ b/mod/bpgenerator/TestCases/ves/blueprints/vesK8sWithoutDmaap.yaml @@ -0,0 +1,185 @@ +# ============LICENSE_START======================================================= +# org.onap.dcae +# ================================================================================ +# Copyright (c) 2019-2020 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========================================================= +# +#description: Collector for receiving VES events through restful interface +#blueprint_version: 1.5.0 +--- +tosca_definitions_version: cloudify_dsl_1_3 +imports: +- http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml +- https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml +inputs: + always_pull_image: + type: boolean + description: Set to true if the image should always be pulled + default: true + collector.dmaap.streamid: + type: string + default: "fault=ves-fault,ves-fault-secondary|syslog=ves-syslog,ves-syslog-secondary|heartbeat=ves-heartbeat,ves-heartbeat-secondary|measurementsForVfScaling=ves-measurement,ves-measurement-secondary|mobileFlow=ves-mobileflow,ves-mobileflow-secondary|other=ves-other,ves-other-secondary|stateChange=ves-statechange,ves-statechange-secondary|thresholdCrossingAlert=ves-thresholdCrossingAlert,ves-thresholdCrossingAlert-secondary|voiceQuality=ves-voicequality,ves-voicequality-secondary|sipSignaling=ves-sipsignaling,ves-sipsignaling-secondary|notification=ves-notification,ves-notification-secondary|pnfRegistration=ves-pnfRegistration,ves-pnfRegistration-secondary" + dcae-ves-collector_cpu_limit: + type: string + default: "250m" + dcae-ves-collector_cpu_request: + type: string + default: "250m" + dcae-ves-collector_memory_limit: + type: string + default: "128Mi" + dcae-ves-collector_memory_request: + type: string + default: "128Mi" + envs: + default: {} + external_port_0: + type: string + default: "8080" + external_port_1: + type: string + default: "8443" + header.authlist: + type: string + default: "sample1,$2a$10$pgjaxDzSuc6XVFEeqvxQ5u90DKJnM/u7TJTcinAlFJVaavXMWf/Zi|userid1,$2a$10$61gNubgJJl9lh3nvQvY9X.x4e5ETWJJ7ao7ZhJEvmfJigov26Z6uq|userid2,$2a$10$G52y/3uhuhWAMy.bx9Se8uzWinmbJa.dlm1LW6bYPdPkkywLDPLiy" + image: + type: string + default: "nexus.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:latest" + location_id: + type: string + default: "" + replicas: + type: integer + description: number of instances + default: 1 + service_component_name_override: + type: string + default: "" + ves_fault_publish_url: + type: string + ves_heartbeat_secondary_publish_url: + type: string + ves_measurement_publish_url: + type: string + ves_notification_publish_url: + type: string + ves_other_publish_url: + type: string + ves_pnfRegistration_publish_url: + type: string +node_templates: + dcae-ves-collector: + type: dcae.nodes.ContainerizedServiceComponent + interfaces: + cloudify.interfaces.lifecycle: + start: + inputs: + ports: + - concat: ["8080:", {get_input: external_port_0}] + - concat: ["8443:", {get_input: external_port_1}] + envs: + get_input: envs + properties: + application_config: + service_calls: [] + streams_publishes: + ves-fault: + dmaap_info: + topic_url: + get_input: ves_fault_publish_url + type: message router + ves-heartbeat-secondary: + dmaap_info: + topic_url: + get_input: ves_heartbeat_secondary_publish_url + type: message router + ves-measurement: + dmaap_info: + topic_url: + get_input: ves_measurement_publish_url + type: message router + ves-notification: + dmaap_info: + topic_url: + get_input: ves_notification_publish_url + type: message router + ves-other: + dmaap_info: + topic_url: + get_input: ves_other_publish_url + type: message router + ves-pnfRegistration: + dmaap_info: + topic_url: + get_input: ves_pnfRegistration_publish_url + type: message router + streams_subscribes: {} + auth.method: noAuth + collector.dmaap.streamid: + get_input: collector.dmaap.streamid + collector.keystore.file.location: /opt/app/dcae-certificate/keystore.jks + collector.keystore.passwordfile: /opt/app/dcae-certificate/.password + collector.schema.checkflag: 1 + collector.schema.file: {"v1":"./etc/CommonEventFormat_27.2.json","v2":"./etc/CommonEventFormat_27.2.json","v3":"./etc/CommonEventFormat_27.2.json","v4":"./etc/CommonEventFormat_27.2.json","v5":"./etc/CommonEventFormat_28.4.1.json","v7":"./etc/CommonEventFormat_30.json"} + collector.service.port: 8080 + collector.service.secure.port: 8443 + collector.truststore.file.location: /opt/app/dcae-certificate/truststore.jks + collector.truststore.passwordfile: /opt/app/dcae-certificate/.trustpassword + event.transform.flag: 1 + header.authlist: + get_input: header.authlist + service_component_name_override: + get_input: service_component_name_override + tomcat.maxthreads: 200 + docker_config: + healthcheck: + interval: 15s + timeout: 1s + type: http + endpoint: /healthcheck + volumes: + - container: + bind: /opt/app/dcae-certificate + host: + path: /opt/app/dcae-certificate + - container: + bind: /opt/app/VESCollector/logs + host: + path: /opt/logs/DCAE/VESCollector/logs + - container: + bind: /opt/app/VESCollector/etc + host: + path: /opt/logs/DCAE/VESCollector/etc + image: + get_input: image + location_id: + get_input: location_id + service_component_type: dcae-ves-collector + replicas: + get_input: replicas + resource_config: + limits: + cpu: + get_input: dcae-ves-collector_cpu_limit + memory: + get_input: dcae-ves-collector_memory_limit + requests: + cpu: + get_input: dcae-ves-collector_cpu_request + memory: + get_input: dcae-ves-collector_memory_request + always_pull_image: + get_input: always_pull_image + relationships: [] \ No newline at end of file diff --git a/mod/bpgenerator/pom.xml b/mod/bpgenerator/pom.xml index f097457..b6a45d0 100644 --- a/mod/bpgenerator/pom.xml +++ b/mod/bpgenerator/pom.xml @@ -29,7 +29,7 @@ org.onap.dcaegen2.platform.mod blueprint-generator - 1.3.2-SNAPSHOT + 1.3.3-SNAPSHOT 1.6 1.6 diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java index 31df9c3..382964b 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java @@ -92,10 +92,10 @@ public class Properties { retInputs.put("replicas", rep); //set the dns name - this.setDns_name(cs.getSelf().getName()); + //this.setDns_name(cs.getSelf().getName()); //set the name - this.setName(cs.getSelf().getName()); + //this.setName(cs.getSelf().getName()); //set the docker config Auxilary aux = cs.getAuxilary(); @@ -118,6 +118,12 @@ public class Properties { inputAlwaysPullImage.put("default", true); retInputs.put("always_pull_image", inputAlwaysPullImage); + + //set service component type + String sType = cs.getSelf().getName(); + sType = sType.replace('.', '-'); + this.setService_component_type(sType); + //set the tls info if(cs.getAuxilary().getTls_info() != null){ addTlsInfo(cs,retInputs); @@ -144,6 +150,16 @@ public class Properties { img.put("default", cs.getArtifacts()[0].getUri()); retInputs.put("tag_version", img); + + //set the location id + GetInput location = new GetInput(); + location.setGet_input("location_id"); + this.setLocation_id(location); + LinkedHashMap locMap = new LinkedHashMap(); + locMap.put("type", "string"); + locMap.put("default", ""); + retInputs.put("location_id", locMap); + //set the log info this.setLog_info(cs.getAuxilary().getLog_info()); diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapNode.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapNode.java index a3d8e3e..dbff78c 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapNode.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapNode.java @@ -64,7 +64,7 @@ public class OnapNode extends Node{ this.setInterfaces(interfaces); //set the type - this.setType("dcae.nodes.ContainerizedPlatformComponent"); + this.setType("dcae.nodes.ContainerizedServiceComponent"); //create and set the relationships ArrayList> rets = new ArrayList(); diff --git a/mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/core/BlueprintGeneratorTest.java b/mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/core/BlueprintGeneratorTest.java index 1827349..9c581cf 100644 --- a/mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/core/BlueprintGeneratorTest.java +++ b/mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/core/BlueprintGeneratorTest.java @@ -352,7 +352,7 @@ public class BlueprintGeneratorTest { OnapNode testNode = new OnapNode(); //set the type - testNode.setType("dcae.nodes.ContainerizedPlatformComponent"); + testNode.setType("dcae.nodes.ContainerizedServiceComponent"); ArrayList ports = new ArrayList(); ports.add("concat: [\"80:\", {get_input: external_port }]"); diff --git a/mod/bpgenerator/version.properties b/mod/bpgenerator/version.properties index ef20baa..fd60497 100644 --- a/mod/bpgenerator/version.properties +++ b/mod/bpgenerator/version.properties @@ -1,6 +1,6 @@ major=1 minor=3 -patch=2 +patch=3 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg