Results

By type

          + trap keep_running ERR
+ set -e
+ cfy profiles use -u admin -t default_tenant -p UmH7vbj6 --rest-certificate /certs/cacert.pem --ssl dcae-cloudify-manager
Initializing local profile ...
Initialization completed successfully
Attempting to connect to dcae-cloudify-manager through port 443, using https (SSL mode: True)...
Initializing profile dcae-cloudify-manager...
Initialization completed successfully
Using manager dcae-cloudify-manager with port 443
+ cfy status
Retrieving manager services status... [ip=dcae-cloudify-manager]

Services:
+--------------------------------+--------+
|            service             | status |
+--------------------------------+--------+
| Webserver                      | Active |
| Cloudify Console               | Active |
| AMQP-Postgres                  | Active |
| Management Worker              | Active |
| Manager Rest-Service           | Active |
| PostgreSQL                     | Active |
| RabbitMQ                       | Active |
| Monitoring Service             | Active |
+--------------------------------+--------+

+ cfy secret create -s UmH7vbj6 cmpass
Secret `cmpass` created
+ trap - ERR
+ set +e
+ deploy pgaas_initdb k8s-pgaas-initdb.yaml k8s-pgaas-initdb-inputs.yaml
+ set +e
+ cm_hasany 'blueprints?id=pgaas_initdb'
++ curl -Ss -H 'Tenant: default_tenant' --user admin:UmH7vbj6 --cacert /certs/cacert.pem 'https://dcae-cloudify-manager:443/api/v3.1/blueprints?id=pgaas_initdb&_include=id'
++ /bin/jq .metadata.pagination.total
+ COUNT=0
+ ((  0 > 0  ))
+ return 1
+ cfy blueprints upload -b pgaas_initdb /blueprints/k8s-pgaas-initdb.yaml
Uploading blueprint /blueprints/k8s-pgaas-initdb.yaml...

 k8s-pgaas-initdb.... |###################-----------------------------| 38.88%
 k8s-pgaas-initdb.... |#####################################-----------| 77.76%
 k8s-pgaas-initdb.... |################################################| 100.0%
Blueprint uploaded. The blueprint's id is pgaas_initdb
+ cm_hasany 'deployments?id=pgaas_initdb'
++ curl -Ss -H 'Tenant: default_tenant' --user admin:UmH7vbj6 --cacert /certs/cacert.pem 'https://dcae-cloudify-manager:443/api/v3.1/deployments?id=pgaas_initdb&_include=id'
++ /bin/jq .metadata.pagination.total
+ COUNT=0
+ ((  0 > 0  ))
+ return 1
+ INPUTS=
+ '[' -n k8s-pgaas-initdb-inputs.yaml ']'
+ INPUTS=-i/inputs/k8s-pgaas-initdb-inputs.yaml
+ cfy deployments create -b pgaas_initdb -i/inputs/k8s-pgaas-initdb-inputs.yaml pgaas_initdb
Creating new deployment from blueprint pgaas_initdb...
Deployment created. The deployment's id is pgaas_initdb
+ cm_hasany 'node-instances?deployment_id=pgaas_initdb&state=uninitialized&state=deleted'
++ curl ++ -Ss -H /bin/jq 'Tenant: default_tenant' --user .metadata.pagination.total
admin:UmH7vbj6 --cacert /certs/cacert.pem 'https://dcae-cloudify-manager:443/api/v3.1/node-instances?deployment_id=pgaas_initdb&state=uninitialized&state=deleted&_include=id'
+ COUNT=2
+ ((  2 > 0  ))
+ return 0
+ cfy executions start -d pgaas_initdb install
Executing workflow `install` on deployment `pgaas_initdb` [timeout=900 seconds]
Deployment environment creation is pending...
2021-05-30 00:09:31.702  CFY  Starting 'create_deployment_environment' workflow execution
2021-05-30 00:09:31.710  LOG  INFO: Creating deployment work directory
2021-05-30 00:09:31.789  CFY  'create_deployment_environment' workflow execution succeeded
2021-05-30 00:09:36.598  CFY  Starting 'install' workflow execution
2021-05-30 00:09:37.161  CFY  [sharedsshkey_pgrs_s2inbu] Validating node instance before creation: nothing to do
2021-05-30 00:09:37.164  CFY  [sharedsshkey_pgrs_s2inbu] Precreating node instance: nothing to do
2021-05-30 00:09:37.168  CFY  [sharedsshkey_pgrs_s2inbu] Creating node instance
2021-05-30 00:09:37.539  CFY  [sharedsshkey_pgrs_s2inbu.create] Sending task 'sshkeyshare.keyshare_plugin.generate'
2021-05-30 00:09:37.928  LOG  [sharedsshkey_pgrs_s2inbu.create] INFO: Installing managed plugin: fc444cfb-11e8-431a-b15d-029e9d71fe67 [package_name: sshkeyshare, package_version: 1.2.0, supported_platform: linux_x86_64, distribution: centos, distribution_release: core]
2021-05-30 00:09:43.367  CFY  [sharedsshkey_pgrs_s2inbu.create] Task succeeded 'sshkeyshare.keyshare_plugin.generate'
2021-05-30 00:09:43.372  CFY  [sharedsshkey_pgrs_s2inbu] Node instance created
2021-05-30 00:09:43.520  CFY  [sharedsshkey_pgrs_s2inbu] Configuring node instance: nothing to do
2021-05-30 00:09:43.524  CFY  [sharedsshkey_pgrs_s2inbu] Starting node instance: nothing to do
2021-05-30 00:09:43.531  CFY  [sharedsshkey_pgrs_s2inbu] Poststarting node instance: nothing to do
2021-05-30 00:09:43.536  CFY  [sharedsshkey_pgrs_s2inbu] Node instance started
2021-05-30 00:09:44.117  CFY  [pgaas_cluster_vkscum] Validating node instance before creation: nothing to do
2021-05-30 00:09:44.161  CFY  [pgaas_cluster_vkscum] Precreating node instance: nothing to do
2021-05-30 00:09:44.163  CFY  [pgaas_cluster_vkscum] Creating node instance
2021-05-30 00:09:44.653  CFY  [pgaas_cluster_vkscum.create] Sending task 'pgaas.pgaas_plugin.add_pgaas_cluster'
2021-05-30 00:09:44.984  LOG  [pgaas_cluster_vkscum.create] INFO: Installing managed plugin: be06ff88-212d-4c9b-9613-bb496e8c2d9f [package_name: pgaas, package_version: 1.3.0, supported_platform: linux_x86_64, distribution: centos, distribution_release: core]
2021-05-30 00:09:50.330  LOG  [pgaas_cluster_vkscum.create] WARNING: add_pgaas_cluster() invoked
2021-05-30 00:09:50.509  LOG  [pgaas_cluster_vkscum.create] WARNING: All done
2021-05-30 00:09:50.876  CFY  [pgaas_cluster_vkscum.create] Task succeeded 'pgaas.pgaas_plugin.add_pgaas_cluster'
2021-05-30 00:09:50.879  CFY  [pgaas_cluster_vkscum] Node instance created
2021-05-30 00:09:50.982  CFY  [pgaas_cluster_vkscum] Configuring node instance: nothing to do
2021-05-30 00:09:50.987  CFY  [pgaas_cluster_vkscum] Starting node instance: nothing to do
2021-05-30 00:09:50.993  CFY  [pgaas_cluster_vkscum] Poststarting node instance: nothing to do
2021-05-30 00:09:50.998  CFY  [pgaas_cluster_vkscum] Node instance started
2021-05-30 00:09:51.364  CFY  'install' workflow execution succeeded
Finished executing workflow install on deployment pgaas_initdb
* Run 'cfy events list a0db8eb4-6ffd-4283-b684-764cf204ffbf' to retrieve the execution's events/logs
+ deploy tcagen2 k8s-tcagen2.yaml k8s-tcagen2-inputs.yaml
+ deploy ves-tls k8s-ves.yaml k8s-ves-inputs-tls.yaml
+ set +e
+ cm_hasany 'blueprints?id=tcagen2'
+ set +e
+ + cm_hasany 'blueprints?id=ves-tls'
deploy prh k8s-prh.yaml k8s-prh-inputs.yaml
+ set +e
+ cfy deployments list
+ + cm_hasany 'blueprints?id=prh'deploy 
hv-ves k8s-hv-ves.yaml k8s-hv_ves-inputs.yaml
+ set +e
+ cm_hasany 'blueprints?id=hv-ves'
++ curl -Ss -H 'Tenant: default_tenant' --user admin:UmH7vbj6 --cacert /certs/cacert.pem 'https://dcae-cloudify-manager:443/api/v3.1/blueprints?id=ves-tls&_include=id'
++ /bin/jq .metadata.pagination.total
++ curl -Ss -H 'Tenant: default_tenant' --user admin:UmH7vbj6 --cacert /certs/cacert.pem 'https://dcae-cloudify-manager:443/api/v3.1/blueprints?id=tcagen2&_include=id'
++ /bin/jq .metadata.pagination.total
++ curl -Ss -H 'Tenant: default_tenant' --user admin:UmH7vbj6 --cacert /certs/cacert.pem 'https://dcae-cloudify-manager:443/api/v3.1/blueprints?id=prh&_include=id'
++ ++ /bin/jq .metadata.pagination.total/bin/jq 
.metadata.pagination.total
++ curl -Ss -H 'Tenant: default_tenant' --user admin:UmH7vbj6 --cacert /certs/cacert.pem 'https://dcae-cloudify-manager:443/api/v3.1/blueprints?id=hv-ves&_include=id'
+ COUNT=0
+ ((  0 > 0  ))
+ return 1
+ cfy blueprints upload -b ves-tls /blueprints/k8s-ves.yaml
+ COUNT=0
+ ((  0 > 0  ))
+ return 1
+ cfy blueprints upload -b prh /blueprints/k8s-prh.yaml
+ COUNT=0
+ ((  0 > 0  ))
+ return 1
+ cfy blueprints upload -b tcagen2 /blueprints/k8s-tcagen2.yaml
+ COUNT=0
+ ((  0 > 0  ))
+ return 1
+ cfy blueprints upload -b hv-ves /blueprints/k8s-hv-ves.yaml
Listing all deployments...

Deployments:
+--------------+--------------+--------------------------+--------------------------+------------+----------------+------------+-----------+
|      id      | blueprint_id |        created_at        |        updated_at        | visibility |  tenant_name   | created_by | site_name |
+--------------+--------------+--------------------------+--------------------------+------------+----------------+------------+-----------+
| pgaas_initdb | pgaas_initdb | 2021-05-30 00:09:29.227  | 2021-05-30 00:09:29.227  |   tenant   | default_tenant |   admin    |           |
+--------------+--------------+--------------------------+--------------------------+------------+----------------+------------+-----------+

Showing 1 of 1 deployments
Uploading blueprint /blueprints/k8s-ves.yaml...
Uploading blueprint /blueprints/k8s-hv-ves.yaml...
Uploading blueprint /blueprints/k8s-tcagen2.yaml...
Uploading blueprint /blueprints/k8s-prh.yaml...
+ . /scripts/inventory.sh
++ INVENTORY=https://inventory:8080/dcae-service-types
++ OWNER=dcaeorch
++ COMPONENT=dcae
++ APPLICATION=DCAE
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-bbs-event-processor.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-bbs-event-processor.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-bbs-event-processor.yaml .yaml
++ flatten /blueprints/k8s-bbs-event-processor.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='# ============LICENSE_START====================================================
\n# =============================================================================
\n# Copyright (c) 2019-2020 AT&T, NOKIA
\n# =============================================================================
\n# Licensed under the Apache License, Version 2.0 (the \"License\");
\n# you may not use this file except in compliance with the License.
\n# You may obtain a copy of the License at
\n#
\n#      http://www.apache.org/licenses/LICENSE-2.0
\n#
\n# Unless required by applicable law or agreed to in writing, software
\n# distributed under the License is distributed on an \"AS IS\" BASIS,
\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\n# See the License for the specific language governing permissions and
\n# limitations under the License.
\n# ============LICENSE_END======================================================
\n
\ntosca_definitions_version: cloudify_dsl_1_3
\n
\nimports:
\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0
\n
\ninputs:
\n  aai_enrichment_host:
\n    type: string
\n    default: \"aai.onap\"
\n  aai_enrichment_port:
\n    type: integer
\n    default: 8443
\n  aai_enrichment_protocol:
\n    type: string
\n    default: \"https\"
\n  aai_secure_enable_cert:
\n    type: boolean
\n    description: enable certificates-based connection with AAI
\n    default: true
\n  tag_version:
\n    type: string
\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.bbs-event-processor:2.1.0\"
\n  replicas:
\n    type: integer
\n    description: number of instances
\n    default: 1
\n  pnf_reregistration_url:
\n    type: string
\n    default: \"https:message-router:3905/events/unauthenticated.PNF_UPDATE\"
\n  cpe_authentication_url:
\n    type: string
\n    default: \"https:message-router:3905/events/unauthenticated.CPE_AUTHENTICATION\"
\n  close_loop_url:
\n    type: string
\n    default: \"https:message-router:3905/events/unauthenticated.DCAE_CL_OUTPUT\"
\n  application_policy_version:
\n    description: Policy version value for building CL events
\n    type: string
\n    default: \"1.0.0.5\"
\n  application_cl_target_type:
\n    description: Close Loop target type value for building CL events
\n    type: string
\n    default: \"VM\"
\n  application_cl_event_status:
\n    description: Close Loop event status value for building CL events
\n    type: string
\n    default: \"ONSET\"
\n  application_cl_version:
\n    description: Close Loop version value for building CL events
\n    type: string
\n    default: \"1.0.2\"
\n  application_cl_target:
\n    description: Close Loop target value for building CL events
\n    type: string
\n    default: \"vserver.vserver-name\"
\n  application_cl_originator:
\n    description: Close Loop originator value for building CL events
\n    type: string
\n    default: \"DCAE-BBS-ep\"
\n  application_rereg_policy_scope:
\n    description: Policy Scope value for building PNF relocation CL event
\n    type: string
\n    default: \"policyScopeReReg\"
\n  application_rereg_cl_control_name:
\n    description: Close Loop control name value for building PNF relocation CL event
\n    type: string
\n    default: \"clControlNameReReg\"
\n  application_cpeAuth_policy_scope:
\n    description: Policy Scope value for building CPE Authentication CL event
\n    type: string
\n    default: \"policyScopeCpeAuth\"
\n  application_cpeAuth_cl_control_name:
\n    description: Close Loop control name value for building CPE Authentication CL event
\n    type: string
\n    default: \"clControlNameCpeAuth\"
\n  application_cbs_polling_interval_sec:
\n    type: integer
\n    default: 120
\n  application_logging_level:
\n    type: string
\n    default: \"INFO\"
\n  dmaap_username:
\n    type: string
\n    default: \"admin\"
\n  dmaap_password:
\n    type: string
\n    default: \"admin\"
\n  dmaap_consumer_id:
\n    type: string
\n    default: \"c12\"
\n  dmaap_consumer_group:
\n    type: string
\n    default: \"OpenDcae-c12\"
\n  dmaap_secure_enable_cert:
\n    type: boolean
\n    description: enable certificates-based connection with DMaaP
\n    default: true
\n  internal_port:
\n    type: string
\n    description: Internal port on which BBS-ep is exposed
\n    default: \"8100\"
\n  external_port:
\n    type: string
\n    description: External port on which BBS-ep is exposed
\n    default: \"30413\"
\nnode_templates:
\n  bbs-event-processor:
\n    type: dcae.nodes.ContainerizedServiceComponent
\n    properties:
\n      application_config:
\n        streams_subscribes:
\n          pnf_reregistration:
\n            type: message_router
\n            aaf_username: { get_input: dmaap_username }
\n            aaf_password: { get_input: dmaap_password }
\n            dmaap_info:
\n              topic_url: { get_input: pnf_reregistration_url }
\n          cpe_authentication:
\n            type: message_router
\n            aaf_username: { get_input: dmaap_username }
\n            aaf_password: { get_input: dmaap_password }
\n            dmaap_info:
\n              topic_url: { get_input: cpe_authentication_url }
\n        streams_publishes:
\n          close_loop:
\n            type: message_router
\n            aaf_username: { get_input: dmaap_username }
\n            aaf_password: { get_input: dmaap_password }
\n            dmaap_info:
\n              topic_url: { get_input: close_loop_url }
\n        dmaap.protocol: \"https\"
\n        dmaap.contentType: \"application/json\"
\n        dmaap.consumer.consumerId: { get_input: dmaap_consumer_id }
\n        dmaap.consumer.consumerGroup: { get_input: dmaap_consumer_group }
\n        dmaap.messageLimit: -1
\n        dmaap.timeoutMs: -1
\n        aai.host: { get_input: aai_enrichment_host }
\n        aai.port: { get_input: aai_enrichment_port }
\n        aai.protocol: { get_input: aai_enrichment_protocol }
\n        aai.username: \"AAI\"
\n        aai.password: \"AAI\"
\n        aai.aaiIgnoreSslCertificateErrors: true
\n        application.pipelinesPollingIntervalSec: 25
\n        application.pipelinesTimeoutSec: 15
\n        application.cbsPollingIntervalSec: { get_input: application_cbs_polling_interval_sec }
\n        application.policyVersion: { get_input: application_policy_version }
\n        application.clTargetType: { get_input: application_cl_target_type }
\n        application.clEventStatus: { get_input: application_cl_event_status }
\n        application.clVersion: { get_input: application_cl_version }
\n        application.clTarget: { get_input: application_cl_target }
\n        application.clOriginator: { get_input: application_cl_originator }
\n        application.reregistration.policyScope: { get_input: application_rereg_policy_scope }
\n        application.reregistration.clControlName: { get_input: application_rereg_cl_control_name }
\n        application.cpe.authentication.policyScope: { get_input: application_cpeAuth_policy_scope }
\n        application.cpe.authentication.clControlName: { get_input: application_cpeAuth_cl_control_name }
\n        application.reregistration.configKey: \"pnf_reregistration\"
\n        application.cpeAuth.configKey: \"cpe_authentication\"
\n        application.closeLoop.configKey: \"close_loop\"
\n        application.loggingLevel: { get_input: application_logging_level }
\n        application.ssl.keyStorePath: \"/opt/app/bbs-event-processor/etc/cert/cert.jks\"
\n        application.ssl.keyStorePasswordPath: \"/opt/app/bbs-event-processor/etc/cert/jks.pass\"
\n        application.ssl.trustStorePath: \"/opt/app/bbs-event-processor/etc/cert/trust.jks\"
\n        application.ssl.trustStorePasswordPath: \"/opt/app/bbs-event-processor/etc/cert/trust.pass\"
\n        application.ssl.enableAaiCertAuth: { get_input: aai_secure_enable_cert }
\n        application.ssl.enableDmaapCertAuth: { get_input: dmaap_secure_enable_cert }
\n      docker_config:
\n        healthcheck:
\n          endpoint: /heartbeat
\n          interval: 180s
\n          timeout: 5s
\n          type: http
\n      image:
\n        { get_input: tag_version }
\n      replicas: {get_input: replicas}
\n      service_component_type: '\''bbs-event-processor'\''
\n      log_info:
\n        log_directory: \"/opt/app/bbs-event-processor/logs\"
\n      tls_info:
\n        cert_directory: '\''/opt/app/bbs-event-processor/etc/cert'\''
\n        use_tls: true
\n    interfaces:
\n      cloudify.interfaces.lifecycle:
\n        start:
\n          inputs:
\n            ports:
\n              - concat: [{get_input: internal_port},\":\",{get_input: external_port}]
\n'
++ echo '# ============LICENSE_START====================================================
\n# =============================================================================
\n# Copyright (c) 2019-2020 AT&T, NOKIA
\n# =============================================================================
\n# Licensed under the Apache License, Version 2.0 (the \"License\");
\n# you may not use this file except in compliance with the License.
\n# You may obtain a copy of the License at
\n#
\n#      http://www.apache.org/licenses/LICENSE-2.0
\n#
\n# Unless required by applicable law or agreed to in writing, software
\n# distributed under the License is distributed on an \"AS IS\" BASIS,
\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\n# See the License for the specific language governing permissions and
\n# limitations under the License.
\n# ============LICENSE_END======================================================
\n
\ntosca_definitions_version: cloudify_dsl_1_3
\n
\nimports:
\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0
\n
\ninputs:
\n  aai_enrichment_host:
\n    type: string
\n    default: \"aai.onap\"
\n  aai_enrichment_port:
\n    type: integer
\n    default: 8443
\n  aai_enrichment_protocol:
\n    type: string
\n    default: \"https\"
\n  aai_secure_enable_cert:
\n    type: boolean
\n    description: enable certificates-based connection with AAI
\n    default: true
\n  tag_version:
\n    type: string
\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.bbs-event-processor:2.1.0\"
\n  replicas:
\n    type: integer
\n    description: number of instances
\n    default: 1
\n  pnf_reregistration_url:
\n    type: string
\n    default: \"https:message-router:3905/events/unauthenticated.PNF_UPDATE\"
\n  cpe_authentication_url:
\n    type: string
\n    default: \"https:message-router:3905/events/unauthenticated.CPE_AUTHENTICATION\"
\n  close_loop_url:
\n    type: string
\n    default: \"https:message-router:3905/events/unauthenticated.DCAE_CL_OUTPUT\"
\n  application_policy_version:
\n    description: Policy version value for building CL events
\n    type: string
\n    default: \"1.0.0.5\"
\n  application_cl_target_type:
\n    description: Close Loop target type value for building CL events
\n    type: string
\n    default: \"VM\"
\n  application_cl_event_status:
\n    description: Close Loop event status value for building CL events
\n    type: string
\n    default: \"ONSET\"
\n  application_cl_version:
\n    description: Close Loop version value for building CL events
\n    type: string
\n    default: \"1.0.2\"
\n  application_cl_target:
\n    description: Close Loop target value for building CL events
\n    type: string
\n    default: \"vserver.vserver-name\"
\n  application_cl_originator:
\n    description: Close Loop originator value for building CL events
\n    type: string
\n    default: \"DCAE-BBS-ep\"
\n  application_rereg_policy_scope:
\n    description: Policy Scope value for building PNF relocation CL event
\n    type: string
\n    default: \"policyScopeReReg\"
\n  application_rereg_cl_control_name:
\n    description: Close Loop control name value for building PNF relocation CL event
\n    type: string
\n    default: \"clControlNameReReg\"
\n  application_cpeAuth_policy_scope:
\n    description: Policy Scope value for building CPE Authentication CL event
\n    type: string
\n    default: \"policyScopeCpeAuth\"
\n  application_cpeAuth_cl_control_name:
\n    description: Close Loop control name value for building CPE Authentication CL event
\n    type: string
\n    default: \"clControlNameCpeAuth\"
\n  application_cbs_polling_interval_sec:
\n    type: integer
\n    default: 120
\n  application_logging_level:
\n    type: string
\n    default: \"INFO\"
\n  dmaap_username:
\n    type: string
\n    default: \"admin\"
\n  dmaap_password:
\n    type: string
\n    default: \"admin\"
\n  dmaap_consumer_id:
\n    type: string
\n    default: \"c12\"
\n  dmaap_consumer_group:
\n    type: string
\n    default: \"OpenDcae-c12\"
\n  dmaap_secure_enable_cert:
\n    type: boolean
\n    description: enable certificates-based connection with DMaaP
\n    default: true
\n  internal_port:
\n    type: string
\n    description: Internal port on which BBS-ep is exposed
\n    default: \"8100\"
\n  external_port:
\n    type: string
\n    description: External port on which BBS-ep is exposed
\n    default: \"30413\"
\nnode_templates:
\n  bbs-event-processor:
\n    type: dcae.nodes.ContainerizedServiceComponent
\n    properties:
\n      application_config:
\n        streams_subscribes:
\n          pnf_reregistration:
\n            type: message_router
\n            aaf_username: { get_input: dmaap_username }
\n            aaf_password: { get_input: dmaap_password }
\n            dmaap_info:
\n              topic_url: { get_input: pnf_reregistration_url }
\n          cpe_authentication:
\n            type: message_router
\n            aaf_username: { get_input: dmaap_username }
\n            aaf_password: { get_input: dmaap_password }
\n            dmaap_info:
\n              topic_url: { get_input: cpe_authentication_url }
\n        streams_publishes:
\n          close_loop:
\n            type: message_router
\n            aaf_username: { get_input: dmaap_username }
\n            aaf_password: { get_input: dmaap_password }
\n            dmaap_info:
\n              topic_url: { get_input: close_loop_url }
\n        dmaap.protocol: \"https\"
\n        dmaap.contentType: \"application/json\"
\n        dmaap.consumer.consumerId: { get_input: dmaap_consumer_id }
\n        dmaap.consumer.consumerGroup: { get_input: dmaap_consumer_group }
\n        dmaap.messageLimit: -1
\n        dmaap.timeoutMs: -1
\n        aai.host: { get_input: aai_enrichment_host }
\n        aai.port: { get_input: aai_enrichment_port }
\n        aai.protocol: { get_input: aai_enrichment_protocol }
\n        aai.username: \"AAI\"
\n        aai.password: \"AAI\"
\n        aai.aaiIgnoreSslCertificateErrors: true
\n        application.pipelinesPollingIntervalSec: 25
\n        application.pipelinesTimeoutSec: 15
\n        application.cbsPollingIntervalSec: { get_input: application_cbs_polling_interval_sec }
\n        application.policyVersion: { get_input: application_policy_version }
\n        application.clTargetType: { get_input: application_cl_target_type }
\n        application.clEventStatus: { get_input: application_cl_event_status }
\n        application.clVersion: { get_input: application_cl_version }
\n        application.clTarget: { get_input: application_cl_target }
\n        application.clOriginator: { get_input: application_cl_originator }
\n        application.reregistration.policyScope: { get_input: application_rereg_policy_scope }
\n        application.reregistration.clControlName: { get_input: application_rereg_cl_control_name }
\n        application.cpe.authentication.policyScope: { get_input: application_cpeAuth_policy_scope }
\n        application.cpe.authentication.clControlName: { get_input: application_cpeAuth_cl_control_name }
\n        application.reregistration.configKey: \"pnf_reregistration\"
\n        application.cpeAuth.configKey: \"cpe_authentication\"
\n        application.closeLoop.configKey: \"close_loop\"
\n        application.loggingLevel: { get_input: application_logging_level }
\n        application.ssl.keyStorePath: \"/opt/app/bbs-event-processor/etc/cert/cert.jks\"
\n        application.ssl.keyStorePasswordPath: \"/opt/app/bbs-event-processor/etc/cert/jks.pass\"
\n        application.ssl.trustStorePath: \"/opt/app/bbs-event-processor/etc/cert/trust.jks\"
\n        application.ssl.trustStorePasswordPath: \"/opt/app/bbs-event-processor/etc/cert/trust.pass\"
\n        application.ssl.enableAaiCertAuth: { get_input: aai_secure_enable_cert }
\n        application.ssl.enableDmaapCertAuth: { get_input: dmaap_secure_enable_cert }
\n      docker_config:
\n        healthcheck:
\n          endpoint: /heartbeat
\n          interval: 180s
\n          timeout: 5s
\n          type: http
\n      image:
\n        { get_input: tag_version }
\n      replicas: {get_input: replicas}
\n      service_component_type: '\''bbs-event-processor'\''
\n      log_info:
\n        log_directory: \"/opt/app/bbs-event-processor/logs\"
\n      tls_info:
\n        cert_directory: '\''/opt/app/bbs-event-processor/etc/cert'\''
\n        use_tls: true
\n    interfaces:
\n      cloudify.interfaces.lifecycle:
\n        start:
\n          inputs:
\n            ports:
\n              - concat: [{get_input: internal_port},\":\",{get_input: external_port}]
\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-bbs-event-processor",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# ============LICENSE_START====================================================
\n# =============================================================================
\n# Copyright (c) 2019-2020 AT&T, NOKIA
\n# =============================================================================
\n# Licensed under the Apache License, Version 2.0 (the \"License\");
\n# you may not use this file except in compliance with the License.
\n# You may obtain a copy of the License at
\n#
\n#      http://www.apache.org/licenses/LICENSE-2.0
\n#
\n# Unless required by applicable law or agreed to in writing, software
\n# distributed under the License is distributed on an \"AS IS\" BASIS,
\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\n# See the License for the specific language governing permissions and
\n# limitations under the License.
\n# ============LICENSE_END======================================================
\n
\ntosca_definitions_version: cloudify_dsl_1_3
\n
\nimports:
\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0
\n
\ninputs:
\n  aai_enrichment_host:
\n    type: string
\n    default: \"aai.onap\"
\n  aai_enrichment_port:
\n    type: integer
\n    default: 8443
\n  aai_enrichment_protocol:
\n    type: string
\n    default: \"https\"
\n  aai_secure_enable_cert:
\n    type: boolean
\n    description: enable certificates-based connection with AAI
\n    default: true
\n  tag_version:
\n    type: string
\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.bbs-event-processor:2.1.0\"
\n  replicas:
\n    type: integer
\n    description: number of instances
\n    default: 1
\n  pnf_reregistration_url:
\n    type: string
\n    default: \"https:message-router:3905/events/unauthenticated.PNF_UPDATE\"
\n  cpe_authentication_url:
\n    type: string
\n    default: \"https:message-router:3905/events/unauthenticated.CPE_AUTHENTICATION\"
\n  close_loop_url:
\n    type: string
\n    default: \"https:message-router:3905/events/unauthenticated.DCAE_CL_OUTPUT\"
\n  application_policy_version:
\n    description: Policy version value for building CL events
\n    type: string
\n    default: \"1.0.0.5\"
\n  application_cl_target_type:
\n    description: Close Loop target type value for building CL events
\n    type: string
\n    default: \"VM\"
\n  application_cl_event_status:
\n    description: Close Loop event status value for building CL events
\n    type: string
\n    default: \"ONSET\"
\n  application_cl_version:
\n    description: Close Loop version value for building CL events
\n    type: string
\n    default: \"1.0.2\"
\n  application_cl_target:
\n    description: Close Loop target value for building CL events
\n    type: string
\n    default: \"vserver.vserver-name\"
\n  application_cl_originator:
\n    description: Close Loop originator value for building CL events
\n    type: string
\n    default: \"DCAE-BBS-ep\"
\n  application_rereg_policy_scope:
\n    description: Policy Scope value for building PNF relocation CL event
\n    type: string
\n    default: \"policyScopeReReg\"
\n  application_rereg_cl_control_name:
\n    description: Close Loop control name value for building PNF relocation CL event
\n    type: string
\n    default: \"clControlNameReReg\"
\n  application_cpeAuth_policy_scope:
\n    description: Policy Scope value for building CPE Authentication CL event
\n    type: string
\n    default: \"policyScopeCpeAuth\"
\n  application_cpeAuth_cl_control_name:
\n    description: Close Loop control name value for building CPE Authentication CL event
\n    type: string
\n    default: \"clControlNameCpeAuth\"
\n  application_cbs_polling_interval_sec:
\n    type: integer
\n    default: 120
\n  application_logging_level:
\n    type: string
\n    default: \"INFO\"
\n  dmaap_username:
\n    type: string
\n    default: \"admin\"
\n  dmaap_password:
\n    type: string
\n    default: \"admin\"
\n  dmaap_consumer_id:
\n    type: string
\n    default: \"c12\"
\n  dmaap_consumer_group:
\n    type: string
\n    default: \"OpenDcae-c12\"
\n  dmaap_secure_enable_cert:
\n    type: boolean
\n    description: enable certificates-based connection with DMaaP
\n    default: true
\n  internal_port:
\n    type: string
\n    description: Internal port on which BBS-ep is exposed
\n    default: \"8100\"
\n  external_port:
\n    type: string
\n    description: External port on which BBS-ep is exposed
\n    default: \"30413\"
\nnode_templates:
\n  bbs-event-processor:
\n    type: dcae.nodes.ContainerizedServiceComponent
\n    properties:
\n      application_config:
\n        streams_subscribes:
\n          pnf_reregistration:
\n            type: message_router
\n            aaf_username: { get_input: dmaap_username }
\n            aaf_password: { get_input: dmaap_password }
\n            dmaap_info:
\n              topic_url: { get_input: pnf_reregistration_url }
\n          cpe_authentication:
\n            type: message_router
\n            aaf_username: { get_input: dmaap_username }
\n            aaf_password: { get_input: dmaap_password }
\n            dmaap_info:
\n              topic_url: { get_input: cpe_authentication_url }
\n        streams_publishes:
\n          close_loop:
\n            type: message_router
\n            aaf_username: { get_input: dmaap_username }
\n            aaf_password: { get_input: dmaap_password }
\n            dmaap_info:
\n              topic_url: { get_input: close_loop_url }
\n        dmaap.protocol: \"https\"
\n        dmaap.contentType: \"application/json\"
\n        dmaap.consumer.consumerId: { get_input: dmaap_consumer_id }
\n        dmaap.consumer.consumerGroup: { get_input: dmaap_consumer_group }
\n        dmaap.messageLimit: -1
\n        dmaap.timeoutMs: -1
\n        aai.host: { get_input: aai_enrichment_host }
\n        aai.port: { get_input: aai_enrichment_port }
\n        aai.protocol: { get_input: aai_enrichment_protocol }
\n        aai.username: \"AAI\"
\n        aai.password: \"AAI\"
\n        aai.aaiIgnoreSslCertificateErrors: true
\n        application.pipelinesPollingIntervalSec: 25
\n        application.pipelinesTimeoutSec: 15
\n        application.cbsPollingIntervalSec: { get_input: application_cbs_polling_interval_sec }
\n        application.policyVersion: { get_input: application_policy_version }
\n        application.clTargetType: { get_input: application_cl_target_type }
\n        application.clEventStatus: { get_input: application_cl_event_status }
\n        application.clVersion: { get_input: application_cl_version }
\n        application.clTarget: { get_input: application_cl_target }
\n        application.clOriginator: { get_input: application_cl_originator }
\n        application.reregistration.policyScope: { get_input: application_rereg_policy_scope }
\n        application.reregistration.clControlName: { get_input: application_rereg_cl_control_name }
\n        application.cpe.authentication.policyScope: { get_input: application_cpeAuth_policy_scope }
\n        application.cpe.authentication.clControlName: { get_input: application_cpeAuth_cl_control_name }
\n        application.reregistration.configKey: \"pnf_reregistration\"
\n        application.cpeAuth.configKey: \"cpe_authentication\"
\n        application.closeLoop.configKey: \"close_loop\"
\n        application.loggingLevel: { get_input: application_logging_level }
\n        application.ssl.keyStorePath: \"/opt/app/bbs-event-processor/etc/cert/cert.jks\"
\n        application.ssl.keyStorePasswordPath: \"/opt/app/bbs-event-processor/etc/cert/jks.pass\"
\n        application.ssl.trustStorePath: \"/opt/app/bbs-event-processor/etc/cert/trust.jks\"
\n        application.ssl.trustStorePasswordPath: \"/opt/app/bbs-event-processor/etc/cert/trust.pass\"
\n        application.ssl.enableAaiCertAuth: { get_input: aai_secure_enable_cert }
\n        application.ssl.enableDmaapCertAuth: { get_input: dmaap_secure_enable_cert }
\n      docker_config:
\n        healthcheck:
\n          endpoint: /heartbeat
\n          interval: 180s
\n          timeout: 5s
\n          type: http
\n      image:
\n        { get_input: tag_version }
\n      replicas: {get_input: replicas}
\n      service_component_type: '\''bbs-event-processor'\''
\n      log_info:
\n        log_directory: \"/opt/app/bbs-event-processor/logs\"
\n      tls_info:
\n        cert_directory: '\''/opt/app/bbs-event-processor/etc/cert'\''
\n        use_tls: true
\n    interfaces:
\n      cloudify.interfaces.lifecycle:
\n        start:
\n          inputs:
\n            ports:
\n              - concat: [{get_input: internal_port},\":\",{get_input: external_port}]
\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  3301  100  1786  100  1515  13633  11564 --:--:-- --:--:-- --:--:-- 25198
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-datafile.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-datafile.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-datafile.yaml .yaml
++ flatten /blueprints/k8s-datafile.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='\n#description: Docker application to collect log file from PNF\n#blueprint_version: 1.0.0\n---\ntosca_definitions_version: cloudify_dsl_1_3\ndescription: Docker application to collect log file from PNF\nimports:\n- http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n- plugin:k8splugin?version=>=3.4.3,<4.0.0\n- plugin:dmaap?version=1.5.0\ninputs:\n  PM_MEAS_FILES_feed0_location:\n    type: string\n    default: \"loc00\"\n  cert_directory:\n    type: string\n    default: \"/opt/app/datafile/etc/cert/\"\n  datafile-collector_cpu_limit:\n    type: string\n    default: \"500m\"\n  datafile-collector_cpu_request:\n    type: string\n    default: \"500m\"\n  datafile-collector_memory_limit:\n    type: string\n    default: \"768Mi\"\n  datafile-collector_memory_request:\n    type: string\n    default: \"768Mi\"\n  envs:\n    default: {}\n  external_port:\n    type: string\n    default: \":0\"\n  feed0_name:\n    type: string\n    default: \"bulk_pm_feed\"\n  topic_name:\n    type: string\n    default: \"unauthenticated.VES_NOTIFICATION_OUTPUT\"\n  consumer_group:\n    type: string\n    default: \"OpenDcae-c12\"\n  consumer_id:\n    type: string\n    default: \"C12\"\n  log_directory:\n    type: string\n    default: \"/var/log/ONAP\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:1.5.5\"\n  use_tls:\n    type: boolean\n    default: true\n  external_cert_ca_name:\n    type: string\n    description: Name of Certificate Authority configured on CertService side.\n    default: \"RA\"\n  external_cert_cert_type:\n    type: string\n    description: Format of provided certificates\n    default: \"P12\"\n  external_cert_common_name:\n    type: string\n    description: Common name which should be present in certificate.\n    default: \"dcae-datafile-collector\"\n  external_cert_sans:\n    type: string\n    description: '\''\"List of Subject Alternative Names (SANs) which should be present\n      in certificate. Delimiter - , Should contain common_name value and other FQDNs\n      under which given component is accessible.\"'\''\n    default: \"dcae-datafile-collector,datafile-collector,datafile\"\n  external_cert_use_external_tls:\n    type: boolean\n    description: Flag to indicate external tls enable/disable.\n    default: false\nnode_templates:\n  datafile-collector:\n    type: dcae.nodes.ContainerizedServiceComponentUsingDmaap\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              get_input: envs\n    properties:\n      application_config:\n        service_calls: []\n        streams_publishes:\n          PM_MEAS_FILES:\n            dmaap_info: <>\n            type: data_router\n        dmaap.certificateConfig.keyCert: /opt/app/datafile/etc/cert/cert.p12\n        dmaap.certificateConfig.keyPasswordPath: /opt/app/datafile/etc/cert/p12.pass\n        dmaap.certificateConfig.trustedCa: /opt/app/datafile/etc/cert/trust.jks\n        dmaap.certificateConfig.trustedCaPasswordPath: /opt/app/datafile/etc/cert/trust.pass\n        dmaap.security.enableDmaapCertAuth: true\n        dmaap.security.keyStorePasswordPath: /opt/app/datafile/etc/cert/jks.pass\n        dmaap.security.keyStorePath: /opt/app/datafile/etc/cert/cert.jks\n        dmaap.security.trustStorePasswordPath: /opt/app/datafile/etc/cert/trust.pass\n        dmaap.security.trustStorePath: /opt/app/datafile/etc/cert/trust.jks\n        dmaap.dmaapConsumerConfiguration.consumerGroup:\n          get_input: consumer_group\n        dmaap.dmaapConsumerConfiguration.consumerId:\n          get_input: consumer_id\n        dmaap.dmaapConsumerConfiguration.timeoutMs: -1\n        sftp.security.strictHostKeyChecking: true\n        streams_subscribes:\n          dmaap_subscriber:\n            type: message_router\n            dmaap_info:\n              topic_url: { concat: ['\''https://message-router:3905/events/'\'',{ get_input: topic_name }] }\n      docker_config:\n        healthcheck:\n          interval: 15s\n          timeout: 1s\n          type: http\n          endpoint: /heartbeat\n        ports:\n        - concat: [\"8100\", {get_input: external_port}]\n        - concat: [\"8433\", {get_input: external_port}]\n      image:\n        get_input: tag_version\n      service_component_type: datafile-collector\n      log_info:\n        log_directory:\n          get_input: log_directory\n      replicas:\n        get_input: replicas\n      streams_publishes:\n      - name: feed0\n        location:\n          get_input: PM_MEAS_FILES_feed0_location\n        type: data_router\n      tls_info:\n        cert_directory:\n          get_input: cert_directory\n        use_tls:\n          get_input: use_tls\n      external_cert:\n        external_cert_directory:\n          get_input: cert_directory\n        use_external_tls:\n          get_input: external_cert_use_external_tls\n        ca_name:\n          get_input: external_cert_ca_name\n        cert_type:\n          get_input: external_cert_cert_type\n        external_certificate_parameters:\n          common_name:\n            get_input: external_cert_common_name\n          sans:\n            get_input: external_cert_sans\n      resource_config:\n        limits:\n          cpu:\n            get_input: datafile-collector_cpu_limit\n          memory:\n            get_input: datafile-collector_memory_limit\n        requests:\n          cpu:\n            get_input: datafile-collector_cpu_request\n          memory:\n            get_input: datafile-collector_memory_request\n    relationships:\n    - type: dcaegen2.relationships.publish_files\n      target: feed0\n  feed0:\n    type: dcaegen2.nodes.Feed\n    properties:\n      feed_name:\n        get_input: feed0_name\n      useExisting: true\n'
++ echo '\n#description: Docker application to collect log file from PNF\n#blueprint_version: 1.0.0\n---\ntosca_definitions_version: cloudify_dsl_1_3\ndescription: Docker application to collect log file from PNF\nimports:\n- http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n- plugin:k8splugin?version=>=3.4.3,<4.0.0\n- plugin:dmaap?version=1.5.0\ninputs:\n  PM_MEAS_FILES_feed0_location:\n    type: string\n    default: \"loc00\"\n  cert_directory:\n    type: string\n    default: \"/opt/app/datafile/etc/cert/\"\n  datafile-collector_cpu_limit:\n    type: string\n    default: \"500m\"\n  datafile-collector_cpu_request:\n    type: string\n    default: \"500m\"\n  datafile-collector_memory_limit:\n    type: string\n    default: \"768Mi\"\n  datafile-collector_memory_request:\n    type: string\n    default: \"768Mi\"\n  envs:\n    default: {}\n  external_port:\n    type: string\n    default: \":0\"\n  feed0_name:\n    type: string\n    default: \"bulk_pm_feed\"\n  topic_name:\n    type: string\n    default: \"unauthenticated.VES_NOTIFICATION_OUTPUT\"\n  consumer_group:\n    type: string\n    default: \"OpenDcae-c12\"\n  consumer_id:\n    type: string\n    default: \"C12\"\n  log_directory:\n    type: string\n    default: \"/var/log/ONAP\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:1.5.5\"\n  use_tls:\n    type: boolean\n    default: true\n  external_cert_ca_name:\n    type: string\n    description: Name of Certificate Authority configured on CertService side.\n    default: \"RA\"\n  external_cert_cert_type:\n    type: string\n    description: Format of provided certificates\n    default: \"P12\"\n  external_cert_common_name:\n    type: string\n    description: Common name which should be present in certificate.\n    default: \"dcae-datafile-collector\"\n  external_cert_sans:\n    type: string\n    description: '\''\"List of Subject Alternative Names (SANs) which should be present\n      in certificate. Delimiter - , Should contain common_name value and other FQDNs\n      under which given component is accessible.\"'\''\n    default: \"dcae-datafile-collector,datafile-collector,datafile\"\n  external_cert_use_external_tls:\n    type: boolean\n    description: Flag to indicate external tls enable/disable.\n    default: false\nnode_templates:\n  datafile-collector:\n    type: dcae.nodes.ContainerizedServiceComponentUsingDmaap\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              get_input: envs\n    properties:\n      application_config:\n        service_calls: []\n        streams_publishes:\n          PM_MEAS_FILES:\n            dmaap_info: <>\n            type: data_router\n        dmaap.certificateConfig.keyCert: /opt/app/datafile/etc/cert/cert.p12\n        dmaap.certificateConfig.keyPasswordPath: /opt/app/datafile/etc/cert/p12.pass\n        dmaap.certificateConfig.trustedCa: /opt/app/datafile/etc/cert/trust.jks\n        dmaap.certificateConfig.trustedCaPasswordPath: /opt/app/datafile/etc/cert/trust.pass\n        dmaap.security.enableDmaapCertAuth: true\n        dmaap.security.keyStorePasswordPath: /opt/app/datafile/etc/cert/jks.pass\n        dmaap.security.keyStorePath: /opt/app/datafile/etc/cert/cert.jks\n        dmaap.security.trustStorePasswordPath: /opt/app/datafile/etc/cert/trust.pass\n        dmaap.security.trustStorePath: /opt/app/datafile/etc/cert/trust.jks\n        dmaap.dmaapConsumerConfiguration.consumerGroup:\n          get_input: consumer_group\n        dmaap.dmaapConsumerConfiguration.consumerId:\n          get_input: consumer_id\n        dmaap.dmaapConsumerConfiguration.timeoutMs: -1\n        sftp.security.strictHostKeyChecking: true\n        streams_subscribes:\n          dmaap_subscriber:\n            type: message_router\n            dmaap_info:\n              topic_url: { concat: ['\''https://message-router:3905/events/'\'',{ get_input: topic_name }] }\n      docker_config:\n        healthcheck:\n          interval: 15s\n          timeout: 1s\n          type: http\n          endpoint: /heartbeat\n        ports:\n        - concat: [\"8100\", {get_input: external_port}]\n        - concat: [\"8433\", {get_input: external_port}]\n      image:\n        get_input: tag_version\n      service_component_type: datafile-collector\n      log_info:\n        log_directory:\n          get_input: log_directory\n      replicas:\n        get_input: replicas\n      streams_publishes:\n      - name: feed0\n        location:\n          get_input: PM_MEAS_FILES_feed0_location\n        type: data_router\n      tls_info:\n        cert_directory:\n          get_input: cert_directory\n        use_tls:\n          get_input: use_tls\n      external_cert:\n        external_cert_directory:\n          get_input: cert_directory\n        use_external_tls:\n          get_input: external_cert_use_external_tls\n        ca_name:\n          get_input: external_cert_ca_name\n        cert_type:\n          get_input: external_cert_cert_type\n        external_certificate_parameters:\n          common_name:\n            get_input: external_cert_common_name\n          sans:\n            get_input: external_cert_sans\n      resource_config:\n        limits:\n          cpu:\n            get_input: datafile-collector_cpu_limit\n          memory:\n            get_input: datafile-collector_memory_limit\n        requests:\n          cpu:\n            get_input: datafile-collector_cpu_request\n          memory:\n            get_input: datafile-collector_memory_request\n    relationships:\n    - type: dcaegen2.relationships.publish_files\n      target: feed0\n  feed0:\n    type: dcaegen2.nodes.Feed\n    properties:\n      feed_name:\n        get_input: feed0_name\n      useExisting: true\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-datafile",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "\n#description: Docker application to collect log file from PNF\n#blueprint_version: 1.0.0\n---\ntosca_definitions_version: cloudify_dsl_1_3\ndescription: Docker application to collect log file from PNF\nimports:\n- http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n- plugin:k8splugin?version=>=3.4.3,<4.0.0\n- plugin:dmaap?version=1.5.0\ninputs:\n  PM_MEAS_FILES_feed0_location:\n    type: string\n    default: \"loc00\"\n  cert_directory:\n    type: string\n    default: \"/opt/app/datafile/etc/cert/\"\n  datafile-collector_cpu_limit:\n    type: string\n    default: \"500m\"\n  datafile-collector_cpu_request:\n    type: string\n    default: \"500m\"\n  datafile-collector_memory_limit:\n    type: string\n    default: \"768Mi\"\n  datafile-collector_memory_request:\n    type: string\n    default: \"768Mi\"\n  envs:\n    default: {}\n  external_port:\n    type: string\n    default: \":0\"\n  feed0_name:\n    type: string\n    default: \"bulk_pm_feed\"\n  topic_name:\n    type: string\n    default: \"unauthenticated.VES_NOTIFICATION_OUTPUT\"\n  consumer_group:\n    type: string\n    default: \"OpenDcae-c12\"\n  consumer_id:\n    type: string\n    default: \"C12\"\n  log_directory:\n    type: string\n    default: \"/var/log/ONAP\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:1.5.5\"\n  use_tls:\n    type: boolean\n    default: true\n  external_cert_ca_name:\n    type: string\n    description: Name of Certificate Authority configured on CertService side.\n    default: \"RA\"\n  external_cert_cert_type:\n    type: string\n    description: Format of provided certificates\n    default: \"P12\"\n  external_cert_common_name:\n    type: string\n    description: Common name which should be present in certificate.\n    default: \"dcae-datafile-collector\"\n  external_cert_sans:\n    type: string\n    description: '\''\"List of Subject Alternative Names (SANs) which should be present\n      in certificate. Delimiter - , Should contain common_name value and other FQDNs\n      under which given component is accessible.\"'\''\n    default: \"dcae-datafile-collector,datafile-collector,datafile\"\n  external_cert_use_external_tls:\n    type: boolean\n    description: Flag to indicate external tls enable/disable.\n    default: false\nnode_templates:\n  datafile-collector:\n    type: dcae.nodes.ContainerizedServiceComponentUsingDmaap\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              get_input: envs\n    properties:\n      application_config:\n        service_calls: []\n        streams_publishes:\n          PM_MEAS_FILES:\n            dmaap_info: <>\n            type: data_router\n        dmaap.certificateConfig.keyCert: /opt/app/datafile/etc/cert/cert.p12\n        dmaap.certificateConfig.keyPasswordPath: /opt/app/datafile/etc/cert/p12.pass\n        dmaap.certificateConfig.trustedCa: /opt/app/datafile/etc/cert/trust.jks\n        dmaap.certificateConfig.trustedCaPasswordPath: /opt/app/datafile/etc/cert/trust.pass\n        dmaap.security.enableDmaapCertAuth: true\n        dmaap.security.keyStorePasswordPath: /opt/app/datafile/etc/cert/jks.pass\n        dmaap.security.keyStorePath: /opt/app/datafile/etc/cert/cert.jks\n        dmaap.security.trustStorePasswordPath: /opt/app/datafile/etc/cert/trust.pass\n        dmaap.security.trustStorePath: /opt/app/datafile/etc/cert/trust.jks\n        dmaap.dmaapConsumerConfiguration.consumerGroup:\n          get_input: consumer_group\n        dmaap.dmaapConsumerConfiguration.consumerId:\n          get_input: consumer_id\n        dmaap.dmaapConsumerConfiguration.timeoutMs: -1\n        sftp.security.strictHostKeyChecking: true\n        streams_subscribes:\n          dmaap_subscriber:\n            type: message_router\n            dmaap_info:\n              topic_url: { concat: ['\''https://message-router:3905/events/'\'',{ get_input: topic_name }] }\n      docker_config:\n        healthcheck:\n          interval: 15s\n          timeout: 1s\n          type: http\n          endpoint: /heartbeat\n        ports:\n        - concat: [\"8100\", {get_input: external_port}]\n        - concat: [\"8433\", {get_input: external_port}]\n      image:\n        get_input: tag_version\n      service_component_type: datafile-collector\n      log_info:\n        log_directory:\n          get_input: log_directory\n      replicas:\n        get_input: replicas\n      streams_publishes:\n      - name: feed0\n        location:\n          get_input: PM_MEAS_FILES_feed0_location\n        type: data_router\n      tls_info:\n        cert_directory:\n          get_input: cert_directory\n        use_tls:\n          get_input: use_tls\n      external_cert:\n        external_cert_directory:\n          get_input: cert_directory\n        use_external_tls:\n          get_input: external_cert_use_external_tls\n        ca_name:\n          get_input: external_cert_ca_name\n        cert_type:\n          get_input: external_cert_cert_type\n        external_certificate_parameters:\n          common_name:\n            get_input: external_cert_common_name\n          sans:\n            get_input: external_cert_sans\n      resource_config:\n        limits:\n          cpu:\n            get_input: datafile-collector_cpu_limit\n          memory:\n            get_input: datafile-collector_memory_limit\n        requests:\n          cpu:\n            get_input: datafile-collector_cpu_request\n          memory:\n            get_input: datafile-collector_memory_request\n    relationships:\n    - type: dcaegen2.relationships.publish_files\n      target: feed0\n  feed0:\n    type: dcaegen2.nodes.Feed\n    properties:\n      feed_name:\n        get_input: feed0_name\n      useExisting: true\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 12449  100  6360  100  6089   172k   165k --:--:-- --:--:-- --:--:--  337k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-datalake-admin-ui.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-datalake-admin-ui.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-datalake-admin-ui.yaml .yaml
++ flatten /blueprints/k8s-datalake-admin-ui.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2020 QCT. All rights reserved.\n# Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\n#author: Kate Hsuan (kate.hsuan@qct.io)\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  image_name:\n    description: datalake feeder image URL.\n    type: string\n    default: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.datalakeadminui:1.1.0\n  container_port:\n    type: string\n    description: exposed container port\n    default: \"8088\"\n  host_port:\n    type: string\n    description: external port\n    default: \"30479\"\n  service_component_type:\n    type: string\n    default: \"dcae-dl-admin\"\n  service_id:\n    type: string\n    default: \"dcae-dl-admin\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-dl-admin\"\n\nnode_templates:\n  datalake:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - '\''8088:0'\''\n              - concat: [{get_input: container_port},\":\",{get_input: host_port}]\n    properties:\n      application_config:\n        FEEDER_ADDR: dl-feeder\n      docker_config:\n        healthcheck:\n          interval: 30s\n          timeout: 10s\n          type: http\n          endpoint: /\n      image:\n        get_input: image_name\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n\n'
++ echo '# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2020 QCT. All rights reserved.\n# Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\n#author: Kate Hsuan (kate.hsuan@qct.io)\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  image_name:\n    description: datalake feeder image URL.\n    type: string\n    default: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.datalakeadminui:1.1.0\n  container_port:\n    type: string\n    description: exposed container port\n    default: \"8088\"\n  host_port:\n    type: string\n    description: external port\n    default: \"30479\"\n  service_component_type:\n    type: string\n    default: \"dcae-dl-admin\"\n  service_id:\n    type: string\n    default: \"dcae-dl-admin\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-dl-admin\"\n\nnode_templates:\n  datalake:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - '\''8088:0'\''\n              - concat: [{get_input: container_port},\":\",{get_input: host_port}]\n    properties:\n      application_config:\n        FEEDER_ADDR: dl-feeder\n      docker_config:\n        healthcheck:\n          interval: 30s\n          timeout: 10s\n          type: http\n          endpoint: /\n      image:\n        get_input: image_name\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-datalake-admin-ui",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2020 QCT. All rights reserved.\n# Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\n#author: Kate Hsuan (kate.hsuan@qct.io)\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  image_name:\n    description: datalake feeder image URL.\n    type: string\n    default: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.datalakeadminui:1.1.0\n  container_port:\n    type: string\n    description: exposed container port\n    default: \"8088\"\n  host_port:\n    type: string\n    description: external port\n    default: \"30479\"\n  service_component_type:\n    type: string\n    default: \"dcae-dl-admin\"\n  service_id:\n    type: string\n    default: \"dcae-dl-admin\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-dl-admin\"\n\nnode_templates:\n  datalake:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - '\''8088:0'\''\n              - concat: [{get_input: container_port},\":\",{get_input: host_port}]\n    properties:\n      application_config:\n        FEEDER_ADDR: dl-feeder\n      docker_config:\n        healthcheck:\n          interval: 30s\n          timeout: 10s\n          type: http\n          endpoint: /\n      image:\n        get_input: image_name\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  5815  100  3043  100  2772   102k  95586 --:--:-- --:--:-- --:--:--  195k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-datalake-des.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-datalake-des.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-datalake-des.yaml .yaml
++ flatten /blueprints/k8s-datalake-des.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2020 China Mobile\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n#author: Kai Lu (lukai@chinamobile.com)\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - \"https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\"\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  service_name:\n    type: string\n    default: '\''dcae-des'\''\n  mariadb_address:\n    type: string\n    description: MariaDB URL\n    default: \"mariadb-galera\"\n  mariadb_port:\n    type: string\n    description: MariaDB port\n    default: \"3306\"\n  db_username:\n    type: string\n    description: MariaDB Username\n    default: \"root\"\n  db_password:\n    description: MariaDB password\n    type: string\n    default: \"secretpassword\"\n  presto_address:\n    type: string\n    description: Presto URL\n    default: \"dl-presto\"\n  presto_port:\n    type: string\n    description: Presto port\n    default: \"9000\"\n  presto_username:\n    type: string\n    description: Presto Username\n    default: \"user\"\n  presto_password:\n    description: Presto password\n    type: string\n    default: \"test\"\n  image_name:\n    description: des image URL.\n    type: string\n    default: nexus3.onap.org:10003/onap/org.onap.dcaegen2.services.datalake.exposure.service:1.1.0\n  dl_hostname:\n    type: string\n    description: dl default des_hostname\n    default: k8s-des\n  container_port:\n    type: string\n    description: exposed container port\n    default: \"1681\"\n  host_port:\n    type: string\n    description: external port\n    default: \"30409\"\nnode_templates:\n  datalake:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - '\''1681:0'\''\n              - concat: [{get_input: container_port},\":\",{get_input: host_port}]\n            envs:\n              MYSQL_HOST:\n                get_input: mariadb_address\n              MYSQL_PORT:\n                get_input: mariadb_port\n              MYSQL_ROOT_PASSWORD:\n                get_input: db_password\n              PRESTO_HOST:\n                get_input: presto_address\n              PRESTO_PORT:\n                get_input: presto_port\n              PRESTO_USER:\n                get_input: presto_username\n              PRESTO_PASSWORD:\n                get_input: presto_password\n    properties:\n      application_config:\n        MYSQL_HOST:\n          get_input: mariadb_address\n        MYSQL_PORT:\n          get_input: mariadb_port\n        MYSQL_ROOT_PASSWORD:\n          get_input: db_password\n        PRESTO_HOST:\n          get_input: presto_address\n        PRESTO_PORT:\n          get_input: presto_port\n        PRESTO_USER:\n          get_input: presto_username\n        PRESTO_PASSWORD:\n          get_input: presto_password\n        HOSTNAME:\n          get_input: dl_hostname\n      image:\n          get_input: image_name\n      docker_config:\n        healthcheck:\n          interval: 90s\n          timeout: 10s\n          type: http\n          endpoint: /datalake/v1/exposure\n      service_component_type: '\''dcae-des'\''\n      service_id: '\''dcae-des'\''\n      service_component_name_override: '\''dcae-des'\''\n'
++ echo '# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2020 China Mobile\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n#author: Kai Lu (lukai@chinamobile.com)\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - \"https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\"\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  service_name:\n    type: string\n    default: '\''dcae-des'\''\n  mariadb_address:\n    type: string\n    description: MariaDB URL\n    default: \"mariadb-galera\"\n  mariadb_port:\n    type: string\n    description: MariaDB port\n    default: \"3306\"\n  db_username:\n    type: string\n    description: MariaDB Username\n    default: \"root\"\n  db_password:\n    description: MariaDB password\n    type: string\n    default: \"secretpassword\"\n  presto_address:\n    type: string\n    description: Presto URL\n    default: \"dl-presto\"\n  presto_port:\n    type: string\n    description: Presto port\n    default: \"9000\"\n  presto_username:\n    type: string\n    description: Presto Username\n    default: \"user\"\n  presto_password:\n    description: Presto password\n    type: string\n    default: \"test\"\n  image_name:\n    description: des image URL.\n    type: string\n    default: nexus3.onap.org:10003/onap/org.onap.dcaegen2.services.datalake.exposure.service:1.1.0\n  dl_hostname:\n    type: string\n    description: dl default des_hostname\n    default: k8s-des\n  container_port:\n    type: string\n    description: exposed container port\n    default: \"1681\"\n  host_port:\n    type: string\n    description: external port\n    default: \"30409\"\nnode_templates:\n  datalake:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - '\''1681:0'\''\n              - concat: [{get_input: container_port},\":\",{get_input: host_port}]\n            envs:\n              MYSQL_HOST:\n                get_input: mariadb_address\n              MYSQL_PORT:\n                get_input: mariadb_port\n              MYSQL_ROOT_PASSWORD:\n                get_input: db_password\n              PRESTO_HOST:\n                get_input: presto_address\n              PRESTO_PORT:\n                get_input: presto_port\n              PRESTO_USER:\n                get_input: presto_username\n              PRESTO_PASSWORD:\n                get_input: presto_password\n    properties:\n      application_config:\n        MYSQL_HOST:\n          get_input: mariadb_address\n        MYSQL_PORT:\n          get_input: mariadb_port\n        MYSQL_ROOT_PASSWORD:\n          get_input: db_password\n        PRESTO_HOST:\n          get_input: presto_address\n        PRESTO_PORT:\n          get_input: presto_port\n        PRESTO_USER:\n          get_input: presto_username\n        PRESTO_PASSWORD:\n          get_input: presto_password\n        HOSTNAME:\n          get_input: dl_hostname\n      image:\n          get_input: image_name\n      docker_config:\n        healthcheck:\n          interval: 90s\n          timeout: 10s\n          type: http\n          endpoint: /datalake/v1/exposure\n      service_component_type: '\''dcae-des'\''\n      service_id: '\''dcae-des'\''\n      service_component_name_override: '\''dcae-des'\''\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-datalake-des",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2020 China Mobile\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n#author: Kai Lu (lukai@chinamobile.com)\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - \"https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\"\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  service_name:\n    type: string\n    default: '\''dcae-des'\''\n  mariadb_address:\n    type: string\n    description: MariaDB URL\n    default: \"mariadb-galera\"\n  mariadb_port:\n    type: string\n    description: MariaDB port\n    default: \"3306\"\n  db_username:\n    type: string\n    description: MariaDB Username\n    default: \"root\"\n  db_password:\n    description: MariaDB password\n    type: string\n    default: \"secretpassword\"\n  presto_address:\n    type: string\n    description: Presto URL\n    default: \"dl-presto\"\n  presto_port:\n    type: string\n    description: Presto port\n    default: \"9000\"\n  presto_username:\n    type: string\n    description: Presto Username\n    default: \"user\"\n  presto_password:\n    description: Presto password\n    type: string\n    default: \"test\"\n  image_name:\n    description: des image URL.\n    type: string\n    default: nexus3.onap.org:10003/onap/org.onap.dcaegen2.services.datalake.exposure.service:1.1.0\n  dl_hostname:\n    type: string\n    description: dl default des_hostname\n    default: k8s-des\n  container_port:\n    type: string\n    description: exposed container port\n    default: \"1681\"\n  host_port:\n    type: string\n    description: external port\n    default: \"30409\"\nnode_templates:\n  datalake:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - '\''1681:0'\''\n              - concat: [{get_input: container_port},\":\",{get_input: host_port}]\n            envs:\n              MYSQL_HOST:\n                get_input: mariadb_address\n              MYSQL_PORT:\n                get_input: mariadb_port\n              MYSQL_ROOT_PASSWORD:\n                get_input: db_password\n              PRESTO_HOST:\n                get_input: presto_address\n              PRESTO_PORT:\n                get_input: presto_port\n              PRESTO_USER:\n                get_input: presto_username\n              PRESTO_PASSWORD:\n                get_input: presto_password\n    properties:\n      application_config:\n        MYSQL_HOST:\n          get_input: mariadb_address\n        MYSQL_PORT:\n          get_input: mariadb_port\n        MYSQL_ROOT_PASSWORD:\n          get_input: db_password\n        PRESTO_HOST:\n          get_input: presto_address\n        PRESTO_PORT:\n          get_input: presto_port\n        PRESTO_USER:\n          get_input: presto_username\n        PRESTO_PASSWORD:\n          get_input: presto_password\n        HOSTNAME:\n          get_input: dl_hostname\n      image:\n          get_input: image_name\n      docker_config:\n        healthcheck:\n          interval: 90s\n          timeout: 10s\n          type: http\n          endpoint: /datalake/v1/exposure\n      service_component_type: '\''dcae-des'\''\n      service_id: '\''dcae-des'\''\n      service_component_name_override: '\''dcae-des'\''\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  8799  100  4535  100  4264   158k   148k --:--:-- --:--:-- --:--:--  306k

 k8s-ves.yaml |######################----------------------------------| 38.89%
 k8s-ves.yaml |############################################------------| 77.79%
 k8s-ves.yaml |########################################################| 100.0%
 k8s-hv-ves.yaml |#####################--------------------------------| 38.88%
 k8s-hv-ves.yaml |#########################################------------| 77.77%
 k8s-hv-ves.yaml |#####################################################| 100.0%
 k8s-tcagen2.yaml |####################--------------------------------| 38.89%
 k8s-tcagen2.yaml |########################################------------| 77.78%
 k8s-tcagen2.yaml |####################################################| 100.0%
 k8s-prh.yaml |######################----------------------------------| 38.9%
 k8s-prh.yaml |############################################------------| 77.79%
 k8s-prh.yaml |########################################################| 100.0%{"owner":"dcaeorch","typeName":"k8s-bbs-event-processor","typeVersion":2105301209,"blueprintTemplate":"# ============LICENSE_START==========================================================================================================://www.apache.org/licenses/LICENSE-2.0implied.orts:fault: 8443n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.bbs-event-processor:2.1.0\"ault: \"https:message-router:3905/events/unauthenticated.PNF_UPDATE\"t: \"https:message-router:3905/events/unauthenticated.DCAE_CL_OUTPUT\"iption: Close Loop target type value for building CL eventspplication_cl_version:ault: \"vserver.vserver-name\" for building PNF relocation CL eventlControlNameReReg\"lose Loop control name value for building CPE Authentication CL eventringype: stringwhich BBS-ep is exposedceComponentmaap_password }ord: { get_input: dmaap_password }dmaap_username }maap.consumer.consumerId: { get_input: dmaap_consumer_id }        aai.port: { get_input: aai_enrichment_port }elinesPollingIntervalSec: 25      application.clTargetType: { get_input: application_cl_target_type }: { get_input: application_cl_target }rolName: { get_input: application_rereg_cl_control_name }trol_name }pplication_logging_level }th: \"/opt/app/bbs-event-processor/etc/cert/trust.jks\"lication.ssl.enableDmaapCertAuth: { get_input: dmaap_secure_enable_cert }et_input: tag_version }s-event-processor/etc/cert'\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"b75381a0-449f-4e3e-a4cb-9f7604189353","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/b75381a0-449f-4e3e-a4cb-9f7604189353"},"created":1622333395510,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-datafile","typeVersion":2105301209,"blueprintTemplate":"\n#description: Docker application to collect log file from PNF\n#blueprint_version: 1.0.0\n---\ntosca_definitions_version: cloudify_dsl_1_3\ndescription: Docker application to collect log file from PNF\nimports:\n- http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n- plugin:k8splugin?version=>=3.4.3,<4.0.0\n- plugin:dmaap?version=1.5.0\ninputs:\n  PM_MEAS_FILES_feed0_location:\n    type: string\n    default: \"loc00\"\n  cert_directory:\n    type: string\n    default: \"/opt/app/datafile/etc/cert/\"\n  datafile-collector_cpu_limit:\n    type: string\n    default: \"500m\"\n  datafile-collector_cpu_request:\n    type: string\n    default: \"500m\"\n  datafile-collector_memory_limit:\n    type: string\n    default: \"768Mi\"\n  datafile-collector_memory_request:\n    type: string\n    default: \"768Mi\"\n  envs:\n    default: {}\n  external_port:\n    type: string\n    default: \":0\"\n  feed0_name:\n    type: string\n    default: \"bulk_pm_feed\"\n  topic_name:\n    type: string\n    default: \"unauthenticated.VES_NOTIFICATION_OUTPUT\"\n  consumer_group:\n    type: string\n    default: \"OpenDcae-c12\"\n  consumer_id:\n    type: string\n    default: \"C12\"\n  log_directory:\n    type: string\n    default: \"/var/log/ONAP\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:1.5.5\"\n  use_tls:\n    type: boolean\n    default: true\n  external_cert_ca_name:\n    type: string\n    description: Name of Certificate Authority configured on CertService side.\n    default: \"RA\"\n  external_cert_cert_type:\n    type: string\n    description: Format of provided certificates\n    default: \"P12\"\n  external_cert_common_name:\n    type: string\n    description: Common name which should be present in certificate.\n    default: \"dcae-datafile-collector\"\n  external_cert_sans:\n    type: string\n    description: '\"List of Subject Alternative Names (SANs) which should be present\n      in certificate. Delimiter - , Should contain common_name value and other FQDNs\n      under which given component is accessible.\"'\n    default: \"dcae-datafile-collector,datafile-collector,datafile\"\n  external_cert_use_external_tls:\n    type: boolean\n    description: Flag to indicate external tls enable/disable.\n    default: false\nnode_templates:\n  datafile-collector:\n    type: dcae.nodes.ContainerizedServiceComponentUsingDmaap\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              get_input: envs\n    properties:\n      application_config:\n        service_calls: []\n        streams_publishes:\n          PM_MEAS_FILES:\n            dmaap_info: <>\n            type: data_router\n        dmaap.certificateConfig.keyCert: /opt/app/datafile/etc/cert/cert.p12\n        dmaap.certificateConfig.keyPasswordPath: /opt/app/datafile/etc/cert/p12.pass\n        dmaap.certificateConfig.trustedCa: /opt/app/datafile/etc/cert/trust.jks\n        dmaap.certificateConfig.trustedCaPasswordPath: /opt/app/datafile/etc/cert/trust.pass\n        dmaap.security.enableDmaapCertAuth: true\n        dmaap.security.keyStorePasswordPath: /opt/app/datafile/etc/cert/jks.pass\n        dmaap.security.keyStorePath: /opt/app/datafile/etc/cert/cert.jks\n        dmaap.security.trustStorePasswordPath: /opt/app/datafile/etc/cert/trust.pass\n        dmaap.security.trustStorePath: /opt/app/datafile/etc/cert/trust.jks\n        dmaap.dmaapConsumerConfiguration.consumerGroup:\n          get_input: consumer_group\n        dmaap.dmaapConsumerConfiguration.consumerId:\n          get_input: consumer_id\n        dmaap.dmaapConsumerConfiguration.timeoutMs: -1\n        sftp.security.strictHostKeyChecking: true\n        streams_subscribes:\n          dmaap_subscriber:\n            type: message_router\n            dmaap_info:\n              topic_url: { concat: ['https://message-router:3905/events/',{ get_input: topic_name }] }\n      docker_config:\n        healthcheck:\n          interval: 15s\n          timeout: 1s\n          type: http\n          endpoint: /heartbeat\n        ports:\n        - concat: [\"8100\", {get_input: external_port}]\n        - concat: [\"8433\", {get_input: external_port}]\n      image:\n        get_input: tag_version\n      service_component_type: datafile-collector\n      log_info:\n        log_directory:\n          get_input: log_directory\n      replicas:\n        get_input: replicas\n      streams_publishes:\n      - name: feed0\n        location:\n          get_input: PM_MEAS_FILES_feed0_location\n        type: data_router\n      tls_info:\n        cert_directory:\n          get_input: cert_directory\n        use_tls:\n          get_input: use_tls\n      external_cert:\n        external_cert_directory:\n          get_input: cert_directory\n        use_external_tls:\n          get_input: external_cert_use_external_tls\n        ca_name:\n          get_input: external_cert_ca_name\n        cert_type:\n          get_input: external_cert_cert_type\n        external_certificate_parameters:\n          common_name:\n            get_input: external_cert_common_name\n          sans:\n            get_input: external_cert_sans\n      resource_config:\n        limits:\n          cpu:\n            get_input: datafile-collector_cpu_limit\n          memory:\n            get_input: datafile-collector_memory_limit\n        requests:\n          cpu:\n            get_input: datafile-collector_cpu_request\n          memory:\n            get_input: datafile-collector_memory_request\n    relationships:\n    - type: dcaegen2.relationships.publish_files\n      target: feed0\n  feed0:\n    type: dcaegen2.nodes.Feed\n    properties:\n      feed_name:\n        get_input: feed0_name\n      useExisting: true\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"f289fcd6-df34-4013-b5c6-7c2fa921783a","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/f289fcd6-df34-4013-b5c6-7c2fa921783a"},"created":1622333395619,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-datalake-admin-ui","typeVersion":2105301209,"blueprintTemplate":"# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2020 QCT. All rights reserved.\n# Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\n#author: Kate Hsuan (kate.hsuan@qct.io)\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  image_name:\n    description: datalake feeder image URL.\n    type: string\n    default: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.datalakeadminui:1.1.0\n  container_port:\n    type: string\n    description: exposed container port\n    default: \"8088\"\n  host_port:\n    type: string\n    description: external port\n    default: \"30479\"\n  service_component_type:\n    type: string\n    default: \"dcae-dl-admin\"\n  service_id:\n    type: string\n    default: \"dcae-dl-admin\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-dl-admin\"\n\nnode_templates:\n  datalake:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - '8088:0'\n              - concat: [{get_input: container_port},\":\",{get_input: host_port}]\n    properties:\n      application_config:\n        FEEDER_ADDR: dl-feeder\n      docker_config:\n        healthcheck:\n          interval: 30s\n          timeout: 10s\n          type: http\n          endpoint: /\n      image:\n        get_input: image_name\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"9be54e2d-89e7-4b50-8c4e-bd00f2bf3941","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/9be54e2d-89e7-4b50-8c4e-bd00f2bf3941"},"created":1622333395709,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-datalake-des","typeVersion":2105301209,"blueprintTemplate":"# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2020 China Mobile\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n#author: Kai Lu (lukai@chinamobile.com)\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - \"https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\"\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  service_name:\n    type: string\n    default: 'dcae-des'\n  mariadb_address:\n    type: string\n    description: MariaDB URL\n    default: \"mariadb-galera\"\n  mariadb_port:\n    type: string\n    description: MariaDB port\n    default: \"3306\"\n  db_username:\n    type: string\n    description: MariaDB Username\n    default: \"root\"\n  db_password:\n    description: MariaDB password\n    type: string\n    default: \"secretpassword\"\n  presto_address:\n    type: string\n    description: Presto URL\n    default: \"dl-presto\"\n  presto_port:\n    type: string\n    description: Presto port\n    default: \"9000\"\n  presto_username:\n    type: string\n    description: Presto Username\n    default: \"user\"\n  presto_password:\n    description: Presto password\n    type: string\n    default: \"test\"\n  image_name:\n    description: des image URL.\n    type: string\n    default: nexus3.onap.org:10003/onap/org.onap.dcaegen2.services.datalake.exposure.service:1.1.0\n  dl_hostname:\n    type: string\n    description: dl default des_hostname\n    default: k8s-des\n  container_port:\n    type: string\n    description: exposed container port\n    default: \"1681\"\n  host_port:\n    type: string\n    description: external port\n    default: \"30409\"\nnode_templates:\n  datalake:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - '1681:0'\n              - concat: [{get_input: container_port},\":\",{get_input: host_port}]\n            envs:\n              MYSQL_HOST:\n                get_input: mariadb_address\n              MYSQL_PORT:\n                get_input: mariadb_port\n              MYSQL_ROOT_PASSWORD:\n                get_input: db_password\n              PRESTO_HOST:\n                get_input: presto_address\n              PRESTO_PORT:\n                get_input: presto_port\n              PRESTO_USER:\n                get_input: presto_username\n              PRESTO_PASSWORD:\n                get_input: presto_password\n    properties:\n      application_config:\n        MYSQL_HOST:\n          get_input: mariadb_address\n        MYSQL_PORT:\n          get_input: mariadb_port\n        MYSQL_ROOT_PASSWORD:\n          get_input: db_password\n        PRESTO_HOST:\n          get_input: presto_address\n        PRESTO_PORT:\n          get_input: presto_port\n        PRESTO_USER:\n          get_input: presto_username\n        PRESTO_PASSWORD:\n          get_input: presto_password\n        HOSTNAME:\n          get_input: dl_hostname\n      image:\n          get_input: image_name\n      docker_config:\n        healthcheck:\n          interval: 90s\n          timeout: 10s\n          type: http\n          endpoint: /datalake/v1/exposure\n      service_component_type: 'dcae-des'\n      service_id: 'dcae-des'\n      service_component_name_override: 'dcae-des'\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServic+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-datalake-feeder.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-datalake-feeder.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-datalake-feeder.yaml .yaml
++ flatten /blueprints/k8s-datalake-feeder.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2020 QCT. All rights reserved.\n# Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\n#author: Kate Hsuan (kate.hsuan@qct.io)\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  mariadb_address:\n    type: string\n    description: MariaDB URL\n    default: \"mariadb-galera\"\n  mariadb_port:\n    type: string\n    description: MariaDB port\n    default: \"3306\"\n  db_username:\n    type: string\n    description: MariaDB Username\n    default: \"root\"\n  db_password:\n    description: MariaDB password\n    type: string\n    default: \"vlz8CJL1\"\n  image_name:\n    description: datalake feeder image URL.\n    type: string\n    default: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.datalakefeeder:1.1.0\n  dl_hostname:\n    type: string\n    description: dl default dl_hostname\n    default: k8s-datalake\n  consul_host:\n    type: string\n    description: consul address\n    default: consul\n  cbs_address:\n    type: string\n    description: CBS address\n    default: config-binding-service\n  container_port:\n    type: string\n    description: exposed container port\n    default: \"1680\"\n  host_port:\n    type: string\n    description: external port\n    default: \"30408\"\n  service_component_type:\n    type: string\n    default: \"dcae-dl-feeder\"\n  service_id:\n    type: string\n    default: \"dcae-dl-feeder\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-dl-feeder\"\n\nnode_templates:\n  datalake:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - '\''1680:0'\''\n              - concat: [{get_input: container_port},\":\",{get_input: host_port}]\n            envs:\n              MYSQL_HOST:\n                get_input: mariadb_address\n              MYSQL_PORT:\n                get_input: mariadb_port\n              MYSQL_ROOT_PASSWORD:\n                get_input: db_password\n    properties:\n      application_config:\n        MYSQL_HOST:\n          get_input: mariadb_address\n        MYSQL_PORT:\n          get_input: mariadb_port\n        MYSQL_ROOT_PASSWORD:\n          get_input: db_password\n        HOSTNAME:\n          get_input: dl_hostname\n        CONSUL_HOST:\n          get_input: consul_host\n        CONFIG_BINDING_SERVICE:\n          get_input: cbs_address\n      image:\n          get_input: image_name\n      docker_config:\n        healthcheck:\n          interval: 90s\n          timeout: 10s\n          type: http\n          endpoint: /datalake/v1/topics\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n\n'
++ echo '# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2020 QCT. All rights reserved.\n# Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\n#author: Kate Hsuan (kate.hsuan@qct.io)\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  mariadb_address:\n    type: string\n    description: MariaDB URL\n    default: \"mariadb-galera\"\n  mariadb_port:\n    type: string\n    description: MariaDB port\n    default: \"3306\"\n  db_username:\n    type: string\n    description: MariaDB Username\n    default: \"root\"\n  db_password:\n    description: MariaDB password\n    type: string\n    default: \"vlz8CJL1\"\n  image_name:\n    description: datalake feeder image URL.\n    type: string\n    default: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.datalakefeeder:1.1.0\n  dl_hostname:\n    type: string\n    description: dl default dl_hostname\n    default: k8s-datalake\n  consul_host:\n    type: string\n    description: consul address\n    default: consul\n  cbs_address:\n    type: string\n    description: CBS address\n    default: config-binding-service\n  container_port:\n    type: string\n    description: exposed container port\n    default: \"1680\"\n  host_port:\n    type: string\n    description: external port\n    default: \"30408\"\n  service_component_type:\n    type: string\n    default: \"dcae-dl-feeder\"\n  service_id:\n    type: string\n    default: \"dcae-dl-feeder\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-dl-feeder\"\n\nnode_templates:\n  datalake:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - '\''1680:0'\''\n              - concat: [{get_input: container_port},\":\",{get_input: host_port}]\n            envs:\n              MYSQL_HOST:\n                get_input: mariadb_address\n              MYSQL_PORT:\n                get_input: mariadb_port\n              MYSQL_ROOT_PASSWORD:\n                get_input: db_password\n    properties:\n      application_config:\n        MYSQL_HOST:\n          get_input: mariadb_address\n        MYSQL_PORT:\n          get_input: mariadb_port\n        MYSQL_ROOT_PASSWORD:\n          get_input: db_password\n        HOSTNAME:\n          get_input: dl_hostname\n        CONSUL_HOST:\n          get_input: consul_host\n        CONFIG_BINDING_SERVICE:\n          get_input: cbs_address\n      image:\n          get_input: image_name\n      docker_config:\n        healthcheck:\n          interval: 90s\n          timeout: 10s\n          type: http\n          endpoint: /datalake/v1/topics\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-datalake-feeder",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2020 QCT. All rights reserved.\n# Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\n#author: Kate Hsuan (kate.hsuan@qct.io)\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  mariadb_address:\n    type: string\n    description: MariaDB URL\n    default: \"mariadb-galera\"\n  mariadb_port:\n    type: string\n    description: MariaDB port\n    default: \"3306\"\n  db_username:\n    type: string\n    description: MariaDB Username\n    default: \"root\"\n  db_password:\n    description: MariaDB password\n    type: string\n    default: \"vlz8CJL1\"\n  image_name:\n    description: datalake feeder image URL.\n    type: string\n    default: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.datalakefeeder:1.1.0\n  dl_hostname:\n    type: string\n    description: dl default dl_hostname\n    default: k8s-datalake\n  consul_host:\n    type: string\n    description: consul address\n    default: consul\n  cbs_address:\n    type: string\n    description: CBS address\n    default: config-binding-service\n  container_port:\n    type: string\n    description: exposed container port\n    default: \"1680\"\n  host_port:\n    type: string\n    description: external port\n    default: \"30408\"\n  service_component_type:\n    type: string\n    default: \"dcae-dl-feeder\"\n  service_id:\n    type: string\n    default: \"dcae-dl-feeder\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-dl-feeder\"\n\nnode_templates:\n  datalake:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - '\''1680:0'\''\n              - concat: [{get_input: container_port},\":\",{get_input: host_port}]\n            envs:\n              MYSQL_HOST:\n                get_input: mariadb_address\n              MYSQL_PORT:\n                get_input: mariadb_port\n              MYSQL_ROOT_PASSWORD:\n                get_input: db_password\n    properties:\n      application_config:\n        MYSQL_HOST:\n          get_input: mariadb_address\n        MYSQL_PORT:\n          get_input: mariadb_port\n        MYSQL_ROOT_PASSWORD:\n          get_input: db_password\n        HOSTNAME:\n          get_input: dl_hostname\n        CONSUL_HOST:\n          get_input: consul_host\n        CONFIG_BINDING_SERVICE:\n          get_input: cbs_address\n      image:\n          get_input: image_name\n      docker_config:\n        healthcheck:\n          interval: 90s\n          timeout: 10s\n          type: http\n          endpoint: /datalake/v1/topics\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  8307  100  4289  100  4018   144k   135k --:--:-- --:--:-- --:--:--  289k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-heartbeat.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-heartbeat.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-heartbeat.yaml .yaml
++ flatten /blueprints/k8s-heartbeat.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2019-2020 AT&T\n# Copyright (C) 2020 Wipro Limited\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\n\n\ninputs:\n  tag_version:\n    type: string\n    default: '\''nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.heartbeat:2.1.1'\''\n  heartbeat_name:\n    type: string\n    default: '\''dcae-heartbeat-service'\''\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  host_port:\n    type: integer\n    description: Network port that the platform service is expecting to expose on the host\n    default: 30223\n  container_port:\n    type: integer\n    description: Network port that the platform service exposes in the container\n    default: 10002\n  consul_host:\n    type: string\n    description: Consul endpoint address\n    default: '\''consul-server.onap'\''\n  consul_port:\n    type: integer\n    description: Consul endpoint port\n    default: 8500\n  CBS_polling_allowed:\n    type: string\n    default: '\''True'\''\n  CBS_polling_interval:\n    type: string\n    default: '\''300'\''\n  consumerID:\n    type: string\n    default: '\''1'\''\n  groupID:\n    type: string\n    default: '\''hbgrpID'\''\n  namespace:\n    type: string\n    default: '\''onap'\''\n  pgaas_cluster_name:\n    type: string\n    description: pg cluster\n    default: \"dcae-pg-primary.onap\"\n  pg_dbName:\n    type: string\n    default: '\''heartbeat'\''\n  ves_heartbeat_publish_url:\n    type: string\n    default: '\''http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT'\''\n  dcae_CL_publish_url:\n    type: string\n    default: '\''http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT'\''\nnode_templates:\n  hbpgaas:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: pg_dbName}\n      use_existing: false\n\n  heartbeat:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              CBS_polling_allowed:\n                get_input: CBS_polling_allowed\n              CBS_polling_interval: \"300\"\n              consumerID: \"1\"\n              groupID:\n                get_input: groupID\n              pg_ipAddress:\n                { get_attribute: [ hbpgaas, admin, host ] }\n              pg_passwd:\n                { get_attribute: [ hbpgaas, admin, password ] }\n              pg_portNum:\n                { get_attribute: [ hbpgaas, admin, port ] }\n              pg_userName:\n                { get_attribute: [ hbpgaas, admin, user ] }\n              pg_dbName:\n                get_input: pg_dbName\n            ports:\n              - \"10002:0\"\n\n    properties:\n      application_config:\n        CBS_polling_allowed:\n          get_input: CBS_polling_allowed\n        CBS_polling_interval:\n          get_input: CBS_polling_interval\n        consumerID:\n          get_input: consumerID\n        groupID:\n          get_input: groupID\n        pg_ipAddress:\n          { get_attribute: [ hbpgaas, admin, host ] }\n        pg_passwd:\n           { get_attribute: [ hbpgaas, admin, password ] }\n        pg_portNum:\n           { get_attribute: [ hbpgaas, admin, port ] }\n        pg_userName:\n           { get_attribute: [ hbpgaas, admin, user ] }\n        pg_dbName:\n          get_input: pg_dbName\n        heartbeat_config: '\''{\"vnfs\": [{\"eventName\": \"Heartbeat_vDNS\",\"heartbeatcountmissed\": 3,\"heartbeatinterval\": 60,\"closedLoopControlName\": \"ControlLoopEvent1\",     \"policyVersion\": \"1.0.0.5\",     \"policyName\":\"vFireWall\",\"policyScope\": \"resource=sampleResource,type=sampletype,CLName=sampleCLName\",\"target_type\": \"VNF\",        \"target\": \"genVnfName\", \"version\": \"1.0\"}, {\"eventName\": \"Heartbeat_vFW\",\"heartbeatcountmissed\": 3,     \"heartbeatinterval\": 60,\"closedLoopControlName\": \"ControlLoopEvent1\",\"policyVersion\": \"1.0.0.5\",\"policyName\": \"vFireWall\",\"policyScope\": \"resource=sampleResource,type=sampletype,CLName=sampleCLName\",    \"target_type\":\"VNF\",    \"target\": \"genVnfName\",    \"version\": \"1.0\"}, {\"eventName\": \"Heartbeat_xx\",\"heartbeatcountmissed\": 3,      \"heartbeatinterval\": 60,\"closedLoopControlName\": \"ControlLoopEvent1\",\"policyVersion\": \"1.0.0.5\",\"policyName\": \"vFireWall\",      \"policyScope\": \"resource=sampleResource,type=sampletype,CLName=sampleCLName\",\"target_type\": \"VNF\",\"target\": \"genVnfName\",\"version\": \"1.0\"}]}'\''\n        streams_publishes:\n          dcae_cl_out:\n            dmaap_info:\n             topic_url:\n                  get_input: dcae_CL_publish_url\n            type: message_router\n        streams_subscribes:\n            ves-heartbeat:\n              dmaap_info:\n                topic_url:\n                  get_input: ves_heartbeat_publish_url\n              type: message_router\n      docker_config:\n        healthcheck:\n          type: http\n          endpoint: /\n          interval: 15s\n          timeout: 1s\n      service_component_type:\n          get_input: heartbeat_name\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      log_info:\n          log_directory: '\''/var/log/ONAP/dcae-heartbeat-services'\''\n    type: dcae.nodes.ContainerizedServiceComponent\n    relationships:\n    - type: cloudify.relationships.depends_on\n      target: hbpgaas\n\n'
++ echo '# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2019-2020 AT&T\n# Copyright (C) 2020 Wipro Limited\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\n\n\ninputs:\n  tag_version:\n    type: string\n    default: '\''nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.heartbeat:2.1.1'\''\n  heartbeat_name:\n    type: string\n    default: '\''dcae-heartbeat-service'\''\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  host_port:\n    type: integer\n    description: Network port that the platform service is expecting to expose on the host\n    default: 30223\n  container_port:\n    type: integer\n    description: Network port that the platform service exposes in the container\n    default: 10002\n  consul_host:\n    type: string\n    description: Consul endpoint address\n    default: '\''consul-server.onap'\''\n  consul_port:\n    type: integer\n    description: Consul endpoint port\n    default: 8500\n  CBS_polling_allowed:\n    type: string\n    default: '\''True'\''\n  CBS_polling_interval:\n    type: string\n    default: '\''300'\''\n  consumerID:\n    type: string\n    default: '\''1'\''\n  groupID:\n    type: string\n    default: '\''hbgrpID'\''\n  namespace:\n    type: string\n    default: '\''onap'\''\n  pgaas_cluster_name:\n    type: string\n    description: pg cluster\n    default: \"dcae-pg-primary.onap\"\n  pg_dbName:\n    type: string\n    default: '\''heartbeat'\''\n  ves_heartbeat_publish_url:\n    type: string\n    default: '\''http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT'\''\n  dcae_CL_publish_url:\n    type: string\n    default: '\''http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT'\''\nnode_templates:\n  hbpgaas:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: pg_dbName}\n      use_existing: false\n\n  heartbeat:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              CBS_polling_allowed:\n                get_input: CBS_polling_allowed\n              CBS_polling_interval: \"300\"\n              consumerID: \"1\"\n              groupID:\n                get_input: groupID\n              pg_ipAddress:\n                { get_attribute: [ hbpgaas, admin, host ] }\n              pg_passwd:\n                { get_attribute: [ hbpgaas, admin, password ] }\n              pg_portNum:\n                { get_attribute: [ hbpgaas, admin, port ] }\n              pg_userName:\n                { get_attribute: [ hbpgaas, admin, user ] }\n              pg_dbName:\n                get_input: pg_dbName\n            ports:\n              - \"10002:0\"\n\n    properties:\n      application_config:\n        CBS_polling_allowed:\n          get_input: CBS_polling_allowed\n        CBS_polling_interval:\n          get_input: CBS_polling_interval\n        consumerID:\n          get_input: consumerID\n        groupID:\n          get_input: groupID\n        pg_ipAddress:\n          { get_attribute: [ hbpgaas, admin, host ] }\n        pg_passwd:\n           { get_attribute: [ hbpgaas, admin, password ] }\n        pg_portNum:\n           { get_attribute: [ hbpgaas, admin, port ] }\n        pg_userName:\n           { get_attribute: [ hbpgaas, admin, user ] }\n        pg_dbName:\n          get_input: pg_dbName\n        heartbeat_config: '\''{\"vnfs\": [{\"eventName\": \"Heartbeat_vDNS\",\"heartbeatcountmissed\": 3,\"heartbeatinterval\": 60,\"closedLoopControlName\": \"ControlLoopEvent1\",     \"policyVersion\": \"1.0.0.5\",     \"policyName\":\"vFireWall\",\"policyScope\": \"resource=sampleResource,type=sampletype,CLName=sampleCLName\",\"target_type\": \"VNF\",        \"target\": \"genVnfName\", \"version\": \"1.0\"}, {\"eventName\": \"Heartbeat_vFW\",\"heartbeatcountmissed\": 3,     \"heartbeatinterval\": 60,\"closedLoopControlName\": \"ControlLoopEvent1\",\"policyVersion\": \"1.0.0.5\",\"policyName\": \"vFireWall\",\"policyScope\": \"resource=sampleResource,type=sampletype,CLName=sampleCLName\",    \"target_type\":\"VNF\",    \"target\": \"genVnfName\",    \"version\": \"1.0\"}, {\"eventName\": \"Heartbeat_xx\",\"heartbeatcountmissed\": 3,      \"heartbeatinterval\": 60,\"closedLoopControlName\": \"ControlLoopEvent1\",\"policyVersion\": \"1.0.0.5\",\"policyName\": \"vFireWall\",      \"policyScope\": \"resource=sampleResource,type=sampletype,CLName=sampleCLName\",\"target_type\": \"VNF\",\"target\": \"genVnfName\",\"version\": \"1.0\"}]}'\''\n        streams_publishes:\n          dcae_cl_out:\n            dmaap_info:\n             topic_url:\n                  get_input: dcae_CL_publish_url\n            type: message_router\n        streams_subscribes:\n            ves-heartbeat:\n              dmaap_info:\n                topic_url:\n                  get_input: ves_heartbeat_publish_url\n              type: message_router\n      docker_config:\n        healthcheck:\n          type: http\n          endpoint: /\n          interval: 15s\n          timeout: 1s\n      service_component_type:\n          get_input: heartbeat_name\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      log_info:\n          log_directory: '\''/var/log/ONAP/dcae-heartbeat-services'\''\n    type: dcae.nodes.ContainerizedServiceComponent\n    relationships:\n    - type: cloudify.relationships.depends_on\n      target: hbpgaas\n\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-heartbeat",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2019-2020 AT&T\n# Copyright (C) 2020 Wipro Limited\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\n\n\ninputs:\n  tag_version:\n    type: string\n    default: '\''nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.heartbeat:2.1.1'\''\n  heartbeat_name:\n    type: string\n    default: '\''dcae-heartbeat-service'\''\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  host_port:\n    type: integer\n    description: Network port that the platform service is expecting to expose on the host\n    default: 30223\n  container_port:\n    type: integer\n    description: Network port that the platform service exposes in the container\n    default: 10002\n  consul_host:\n    type: string\n    description: Consul endpoint address\n    default: '\''consul-server.onap'\''\n  consul_port:\n    type: integer\n    description: Consul endpoint port\n    default: 8500\n  CBS_polling_allowed:\n    type: string\n    default: '\''True'\''\n  CBS_polling_interval:\n    type: string\n    default: '\''300'\''\n  consumerID:\n    type: string\n    default: '\''1'\''\n  groupID:\n    type: string\n    default: '\''hbgrpID'\''\n  namespace:\n    type: string\n    default: '\''onap'\''\n  pgaas_cluster_name:\n    type: string\n    description: pg cluster\n    default: \"dcae-pg-primary.onap\"\n  pg_dbName:\n    type: string\n    default: '\''heartbeat'\''\n  ves_heartbeat_publish_url:\n    type: string\n    default: '\''http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT'\''\n  dcae_CL_publish_url:\n    type: string\n    default: '\''http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT'\''\nnode_templates:\n  hbpgaas:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: pg_dbName}\n      use_existing: false\n\n  heartbeat:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              CBS_polling_allowed:\n                get_input: CBS_polling_allowed\n              CBS_polling_interval: \"300\"\n              consumerID: \"1\"\n              groupID:\n                get_input: groupID\n              pg_ipAddress:\n                { get_attribute: [ hbpgaas, admin, host ] }\n              pg_passwd:\n                { get_attribute: [ hbpgaas, admin, password ] }\n              pg_portNum:\n                { get_attribute: [ hbpgaas, admin, port ] }\n              pg_userName:\n                { get_attribute: [ hbpgaas, admin, user ] }\n              pg_dbName:\n                get_input: pg_dbName\n            ports:\n              - \"10002:0\"\n\n    properties:\n      application_config:\n        CBS_polling_allowed:\n          get_input: CBS_polling_allowed\n        CBS_polling_interval:\n          get_input: CBS_polling_interval\n        consumerID:\n          get_input: consumerID\n        groupID:\n          get_input: groupID\n        pg_ipAddress:\n          { get_attribute: [ hbpgaas, admin, host ] }\n        pg_passwd:\n           { get_attribute: [ hbpgaas, admin, password ] }\n        pg_portNum:\n           { get_attribute: [ hbpgaas, admin, port ] }\n        pg_userName:\n           { get_attribute: [ hbpgaas, admin, user ] }\n        pg_dbName:\n          get_input: pg_dbName\n        heartbeat_config: '\''{\"vnfs\": [{\"eventName\": \"Heartbeat_vDNS\",\"heartbeatcountmissed\": 3,\"heartbeatinterval\": 60,\"closedLoopControlName\": \"ControlLoopEvent1\",     \"policyVersion\": \"1.0.0.5\",     \"policyName\":\"vFireWall\",\"policyScope\": \"resource=sampleResource,type=sampletype,CLName=sampleCLName\",\"target_type\": \"VNF\",        \"target\": \"genVnfName\", \"version\": \"1.0\"}, {\"eventName\": \"Heartbeat_vFW\",\"heartbeatcountmissed\": 3,     \"heartbeatinterval\": 60,\"closedLoopControlName\": \"ControlLoopEvent1\",\"policyVersion\": \"1.0.0.5\",\"policyName\": \"vFireWall\",\"policyScope\": \"resource=sampleResource,type=sampletype,CLName=sampleCLName\",    \"target_type\":\"VNF\",    \"target\": \"genVnfName\",    \"version\": \"1.0\"}, {\"eventName\": \"Heartbeat_xx\",\"heartbeatcountmissed\": 3,      \"heartbeatinterval\": 60,\"closedLoopControlName\": \"ControlLoopEvent1\",\"policyVersion\": \"1.0.0.5\",\"policyName\": \"vFireWall\",      \"policyScope\": \"resource=sampleResource,type=sampletype,CLName=sampleCLName\",\"target_type\": \"VNF\",\"target\": \"genVnfName\",\"version\": \"1.0\"}]}'\''\n        streams_publishes:\n          dcae_cl_out:\n            dmaap_info:\n             topic_url:\n                  get_input: dcae_CL_publish_url\n            type: message_router\n        streams_subscribes:\n            ves-heartbeat:\n              dmaap_info:\n                topic_url:\n                  get_input: ves_heartbeat_publish_url\n              type: message_router\n      docker_config:\n        healthcheck:\n          type: http\n          endpoint: /\n          interval: 15s\n          timeout: 1s\n      service_component_type:\n          get_input: heartbeat_name\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      log_info:\n          log_directory: '\''/var/log/ONAP/dcae-heartbeat-services'\''\n    type: dcae.nodes.ContainerizedServiceComponent\n    relationships:\n    - type: cloudify.relationships.depends_on\n      target: hbpgaas\n\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 13495  100  6883  100  6612   224k   215k --:--:-- --:--:-- --:--:--  439k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-helm.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-helm.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-helm.yaml .yaml
++ flatten /blueprints/k8s-helm.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='# ============LICENSE_START==========================================\n# ===================================================================\n# Copyright (c) 2019-2020 AT&T\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#         http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#============LICENSE_END============================================\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:helm?version=4.2.0\n\ninputs:\n  tiller-server-ip:\n    description: IP address of Kubernetes master node\n  tiller-server-port:\n    description: Nodeport of tiller server\n  namespace:\n    description: Target namespace to be installed under (requires to be new)\n  chart-repo-url:\n     default: '\''https://nexus.onap.org/content/sites/oom-helm-staging'\''\n  chart-version :\n    description: Chart version for identified component-name\n  stable-repo-url:\n    description: URL for stable repository\n    type: string\n    default: '\''https://kubernetes-charts.storage.googleapis.com'\''\n  config-url:\n    default: '\'''\''\n  config-format:\n    default: '\''yaml'\''\n  component-name:\n    description: onap component name\nnode_templates:\n  dcaecomponent:\n    type: onap.nodes.component\n    properties:\n      tiller_ip: { get_input: tiller-server-ip }\n      tiller_port: { get_input: tiller-server-port }\n      component_name: { get_input: component-name }\n      chart_repo_url: { get_input: chart-repo-url }\n      chart_version: { get_input: chart-version }\n      namespace: { get_input: namespace }\n      stable_repo_url: { get_input: stable-repo-url}\n      config_url:  { get_input: config-url}\n      config_format: { get_input: config-format}\noutputs:\n  dcaecomponent_install_status:\n    value: { get_attribute: [ dcaecomponent, install-status ] }\n\n'
++ echo '# ============LICENSE_START==========================================\n# ===================================================================\n# Copyright (c) 2019-2020 AT&T\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#         http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#============LICENSE_END============================================\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:helm?version=4.2.0\n\ninputs:\n  tiller-server-ip:\n    description: IP address of Kubernetes master node\n  tiller-server-port:\n    description: Nodeport of tiller server\n  namespace:\n    description: Target namespace to be installed under (requires to be new)\n  chart-repo-url:\n     default: '\''https://nexus.onap.org/content/sites/oom-helm-staging'\''\n  chart-version :\n    description: Chart version for identified component-name\n  stable-repo-url:\n    description: URL for stable repository\n    type: string\n    default: '\''https://kubernetes-charts.storage.googleapis.com'\''\n  config-url:\n    default: '\'''\''\n  config-format:\n    default: '\''yaml'\''\n  component-name:\n    description: onap component name\nnode_templates:\n  dcaecomponent:\n    type: onap.nodes.component\n    properties:\n      tiller_ip: { get_input: tiller-server-ip }\n      tiller_port: { get_input: tiller-server-port }\n      component_name: { get_input: component-name }\n      chart_repo_url: { get_input: chart-repo-url }\n      chart_version: { get_input: chart-version }\n      namespace: { get_input: namespace }\n      stable_repo_url: { get_input: stable-repo-url}\n      config_url:  { get_input: config-url}\n      config_format: { get_input: config-format}\noutputs:\n  dcaecomponent_install_status:\n    value: { get_attribute: [ dcaecomponent, install-status ] }\n\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-helm",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# ============LICENSE_START==========================================\n# ===================================================================\n# Copyright (c) 2019-2020 AT&T\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#         http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#============LICENSE_END============================================\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:helm?version=4.2.0\n\ninputs:\n  tiller-server-ip:\n    description: IP address of Kubernetes master node\n  tiller-server-port:\n    description: Nodeport of tiller server\n  namespace:\n    description: Target namespace to be installed under (requires to be new)\n  chart-repo-url:\n     default: '\''https://nexus.onap.org/content/sites/oom-helm-staging'\''\n  chart-version :\n    description: Chart version for identified component-name\n  stable-repo-url:\n    description: URL for stable repository\n    type: string\n    default: '\''https://kubernetes-charts.storage.googleapis.com'\''\n  config-url:\n    default: '\'''\''\n  config-format:\n    default: '\''yaml'\''\n  component-name:\n    description: onap component name\nnode_templates:\n  dcaecomponent:\n    type: onap.nodes.component\n    properties:\n      tiller_ip: { get_input: tiller-server-ip }\n      tiller_port: { get_input: tiller-server-port }\n      component_name: { get_input: component-name }\n      chart_repo_url: { get_input: chart-repo-url }\n      chart_version: { get_input: chart-version }\n      namespace: { get_input: namespace }\n      stable_repo_url: { get_input: stable-repo-url}\n      config_url:  { get_input: config-url}\n      config_format: { get_input: config-format}\noutputs:\n  dcaecomponent_install_status:\n    value: { get_attribute: [ dcaecomponent, install-status ] }\n\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  5243  100  2757  100  2486  95068  85724 --:--:-- --:--:-- --:--:--  176k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-holmes-engine.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-holmes-engine.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-holmes-engine.yaml .yaml
++ flatten /blueprints/k8s-holmes-engine.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved.\n# Copyright (c) 2020 Nokia Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END=====================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n- https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n- plugin:k8splugin?version=>=3.4.3,<4.0.0\n- plugin:dcaepolicyplugin?version=2.4.0\n- plugin:pgaas?version=1.3.0\ninputs:\n  dcae_CL_publish_url:\n    type: string\n    default: \"http://message-router.onap:3904/events/unauthenticated.DCAE_CL_OUTPUT\"\n  ves_fault_publish_url:\n    type: string\n    default: \"http://message-router.onap:3904/events/unauthenticated.SEC_FAULT_OUTPUT\"\n  msb_hostname:\n    type: string\n    default: \"msb-iag.onap\"\n  pgaas_cluster_name:\n    type: string\n    default: \"dcae-pg-primary.onap\"\n    # use the single-VM PG instance\n    #default: pgvm\n  database_name:\n    type: string\n    default: \"holmes\"\n  he_image:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/holmes/engine-management:1.3.2\"\n  service_component_type:\n    type: string\n    default: \"holmes-engine-mgmt\"\n  service_id:\n    type: string\n    default: \"holmes-engine-mgmt\"\n  service_component_name_override:\n    type: string\n    default: \"holmes-engine-mgmt\"\n  dcae-analytics-holmes-engine-mgt_cpu_limit:\n    type: string\n    default: \"500m\"\n  dcae-analytics-holmes-engine-mgt_cpu_request:\n    type: string\n    default: \"500m\"\n  dcae-analytics-holmes-engine-mgt_memory_limit:\n    type: string\n    default: \"1024Mi\"\n  dcae-analytics-holmes-engine-mgt_memory_request:\n    type: string\n    default: \"256Mi\"\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      #writerfqdn: { concat: [ { get_input: pgaas_cluster_name }, '\''-write.'\'' ] }\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n      use_existing: true\n\n  holmesengine:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n           envs:\n            URL_JDBC:\n                { get_attribute: [ pgaasvm, admin, host ] }\n            JDBC_PASSWORD:\n                { get_attribute: [ pgaasvm, admin, password ] }\n            JDBC_USERNAME:\n                { get_attribute: [ pgaasvm, admin, user ] }\n            MSB_ADDR:\n                get_input: msb_hostname\n           ports:\n             - '\''9102:0'\''\n    properties:\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      application_config:\n        msb.hostname:\n         get_input: msb_hostname\n        msb.uri: /api/microservices/v1/services\n        services_calls: {}\n        streams_publishes:\n          dcae_cl_out:\n            dmaap_info:\n             topic_url:\n                  get_input: dcae_CL_publish_url\n            type: message_router\n        streams_subscribes:\n          ves_fault:\n            dmaap_info:\n             topic_url:\n                  get_input: ves_fault_publish_url\n            type: message_router\n      image: { get_input: he_image }\n      # need to use truncated name!!\n      #service_component_type: dcae-analytics-holmes-engin-management\n      resource_config:\n        limits:\n          cpu:\n            get_input: dcae-analytics-holmes-engine-mgt_cpu_limit\n          memory:\n            get_input: dcae-analytics-holmes-engine-mgt_memory_limit\n        requests:\n          cpu:\n            get_input: dcae-analytics-holmes-engine-mgt_cpu_request\n          memory:\n            get_input: dcae-analytics-holmes-engine-mgt_memory_request\n    relationships:\n    - type: cloudify.relationships.depends_on\n      target: pgaasvm\n\n'
++ echo '# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved.\n# Copyright (c) 2020 Nokia Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END=====================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n- https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n- plugin:k8splugin?version=>=3.4.3,<4.0.0\n- plugin:dcaepolicyplugin?version=2.4.0\n- plugin:pgaas?version=1.3.0\ninputs:\n  dcae_CL_publish_url:\n    type: string\n    default: \"http://message-router.onap:3904/events/unauthenticated.DCAE_CL_OUTPUT\"\n  ves_fault_publish_url:\n    type: string\n    default: \"http://message-router.onap:3904/events/unauthenticated.SEC_FAULT_OUTPUT\"\n  msb_hostname:\n    type: string\n    default: \"msb-iag.onap\"\n  pgaas_cluster_name:\n    type: string\n    default: \"dcae-pg-primary.onap\"\n    # use the single-VM PG instance\n    #default: pgvm\n  database_name:\n    type: string\n    default: \"holmes\"\n  he_image:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/holmes/engine-management:1.3.2\"\n  service_component_type:\n    type: string\n    default: \"holmes-engine-mgmt\"\n  service_id:\n    type: string\n    default: \"holmes-engine-mgmt\"\n  service_component_name_override:\n    type: string\n    default: \"holmes-engine-mgmt\"\n  dcae-analytics-holmes-engine-mgt_cpu_limit:\n    type: string\n    default: \"500m\"\n  dcae-analytics-holmes-engine-mgt_cpu_request:\n    type: string\n    default: \"500m\"\n  dcae-analytics-holmes-engine-mgt_memory_limit:\n    type: string\n    default: \"1024Mi\"\n  dcae-analytics-holmes-engine-mgt_memory_request:\n    type: string\n    default: \"256Mi\"\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      #writerfqdn: { concat: [ { get_input: pgaas_cluster_name }, '\''-write.'\'' ] }\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n      use_existing: true\n\n  holmesengine:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n           envs:\n            URL_JDBC:\n                { get_attribute: [ pgaasvm, admin, host ] }\n            JDBC_PASSWORD:\n                { get_attribute: [ pgaasvm, admin, password ] }\n            JDBC_USERNAME:\n                { get_attribute: [ pgaasvm, admin, user ] }\n            MSB_ADDR:\n                get_input: msb_hostname\n           ports:\n             - '\''9102:0'\''\n    properties:\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      application_config:\n        msb.hostname:\n         get_input: msb_hostname\n        msb.uri: /api/microservices/v1/services\n        services_calls: {}\n        streams_publishes:\n          dcae_cl_out:\n            dmaap_info:\n             topic_url:\n                  get_input: dcae_CL_publish_url\n            type: message_router\n        streams_subscribes:\n          ves_fault:\n            dmaap_info:\n             topic_url:\n                  get_input: ves_fault_publish_url\n            type: message_router\n      image: { get_input: he_image }\n      # need to use truncated name!!\n      #service_component_type: dcae-analytics-holmes-engin-management\n      resource_config:\n        limits:\n          cpu:\n            get_input: dcae-analytics-holmes-engine-mgt_cpu_limit\n          memory:\n            get_input: dcae-analytics-holmes-engine-mgt_memory_limit\n        requests:\n          cpu:\n            get_input: dcae-analytics-holmes-engine-mgt_cpu_request\n          memory:\n            get_input: dcae-analytics-holmes-engine-mgt_memory_request\n    relationships:\n    - type: cloudify.relationships.depends_on\n      target: pgaasvm\n\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-holmes-engine",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved.\n# Copyright (c) 2020 Nokia Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END=====================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n- https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n- plugin:k8splugin?version=>=3.4.3,<4.0.0\n- plugin:dcaepolicyplugin?version=2.4.0\n- plugin:pgaas?version=1.3.0\ninputs:\n  dcae_CL_publish_url:\n    type: string\n    default: \"http://message-router.onap:3904/events/unauthenticated.DCAE_CL_OUTPUT\"\n  ves_fault_publish_url:\n    type: string\n    default: \"http://message-router.onap:3904/events/unauthenticated.SEC_FAULT_OUTPUT\"\n  msb_hostname:\n    type: string\n    default: \"msb-iag.onap\"\n  pgaas_cluster_name:\n    type: string\n    default: \"dcae-pg-primary.onap\"\n    # use the single-VM PG instance\n    #default: pgvm\n  database_name:\n    type: string\n    default: \"holmes\"\n  he_image:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/holmes/engine-management:1.3.2\"\n  service_component_type:\n    type: string\n    default: \"holmes-engine-mgmt\"\n  service_id:\n    type: string\n    default: \"holmes-engine-mgmt\"\n  service_component_name_override:\n    type: string\n    default: \"holmes-engine-mgmt\"\n  dcae-analytics-holmes-engine-mgt_cpu_limit:\n    type: string\n    default: \"500m\"\n  dcae-analytics-holmes-engine-mgt_cpu_request:\n    type: string\n    default: \"500m\"\n  dcae-analytics-holmes-engine-mgt_memory_limit:\n    type: string\n    default: \"1024Mi\"\n  dcae-analytics-holmes-engine-mgt_memory_request:\n    type: string\n    default: \"256Mi\"\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      #writerfqdn: { concat: [ { get_input: pgaas_cluster_name }, '\''-write.'\'' ] }\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n      use_existing: true\n\n  holmesengine:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n           envs:\n            URL_JDBC:\n                { get_attribute: [ pgaasvm, admin, host ] }\n            JDBC_PASSWORD:\n                { get_attribute: [ pgaasvm, admin, password ] }\n            JDBC_USERNAME:\n                { get_attribute: [ pgaasvm, admin, user ] }\n            MSB_ADDR:\n                get_input: msb_hostname\n           ports:\n             - '\''9102:0'\''\n    properties:\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      application_config:\n        msb.hostname:\n         get_input: msb_hostname\n        msb.uri: /api/microservices/v1/services\n        services_calls: {}\n        streams_publishes:\n          dcae_cl_out:\n            dmaap_info:\n             topic_url:\n                  get_input: dcae_CL_publish_url\n            type: message_router\n        streams_subscribes:\n          ves_fault:\n            dmaap_info:\n             topic_url:\n                  get_input: ves_fault_publish_url\n            type: message_router\n      image: { get_input: he_image }\n      # need to use truncated name!!\n      #service_component_type: dcae-analytics-holmes-engin-management\n      resource_config:\n        limits:\n          cpu:\n            get_input: dcae-analytics-holmes-engine-mgt_cpu_limit\n          memory:\n            get_input: dcae-analytics-holmes-engine-mgt_memory_limit\n        requests:\n          cpu:\n            get_input: dcae-analytics-holmes-engine-mgt_cpu_request\n          memory:\n            get_input: dcae-analytics-holmes-engine-mgt_memory_request\n    relationships:\n    - type: cloudify.relationships.depends_on\n      target: pgaasvm\n\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 10279  100  5275  100  5004   156k   148k --:--:-- --:--:-- --:--:--  304k
eId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"94a39a39-8b52-45da-bd6f-371ea38c432d","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/94a39a39-8b52-45da-bd6f-371ea38c432d"},"created":1622333395796,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-datalake-feeder","typeVersion":2105301209,"blueprintTemplate":"# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2020 QCT. All rights reserved.\n# Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\n#author: Kate Hsuan (kate.hsuan@qct.io)\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  mariadb_address:\n    type: string\n    description: MariaDB URL\n    default: \"mariadb-galera\"\n  mariadb_port:\n    type: string\n    description: MariaDB port\n    default: \"3306\"\n  db_username:\n    type: string\n    description: MariaDB Username\n    default: \"root\"\n  db_password:\n    description: MariaDB password\n    type: string\n    default: \"vlz8CJL1\"\n  image_name:\n    description: datalake feeder image URL.\n    type: string\n    default: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.datalakefeeder:1.1.0\n  dl_hostname:\n    type: string\n    description: dl default dl_hostname\n    default: k8s-datalake\n  consul_host:\n    type: string\n    description: consul address\n    default: consul\n  cbs_address:\n    type: string\n    description: CBS address\n    default: config-binding-service\n  container_port:\n    type: string\n    description: exposed container port\n    default: \"1680\"\n  host_port:\n    type: string\n    description: external port\n    default: \"30408\"\n  service_component_type:\n    type: string\n    default: \"dcae-dl-feeder\"\n  service_id:\n    type: string\n    default: \"dcae-dl-feeder\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-dl-feeder\"\n\nnode_templates:\n  datalake:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - '1680:0'\n              - concat: [{get_input: container_port},\":\",{get_input: host_port}]\n            envs:\n              MYSQL_HOST:\n                get_input: mariadb_address\n              MYSQL_PORT:\n                get_input: mariadb_port\n              MYSQL_ROOT_PASSWORD:\n                get_input: db_password\n    properties:\n      application_config:\n        MYSQL_HOST:\n          get_input: mariadb_address\n        MYSQL_PORT:\n          get_input: mariadb_port\n        MYSQL_ROOT_PASSWORD:\n          get_input: db_password\n        HOSTNAME:\n          get_input: dl_hostname\n        CONSUL_HOST:\n          get_input: consul_host\n        CONFIG_BINDING_SERVICE:\n          get_input: cbs_address\n      image:\n          get_input: image_name\n      docker_config:\n        healthcheck:\n          interval: 90s\n          timeout: 10s\n          type: http\n          endpoint: /datalake/v1/topics\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"d159d48a-ac7f-4749-9c1f-62a477ee90a6","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/d159d48a-ac7f-4749-9c1f-62a477ee90a6"},"created":1622333395882,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-heartbeat","typeVersion":2105301209,"blueprintTemplate":"# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2019-2020 AT&T\n# Copyright (C) 2020 Wipro Limited\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\n\n\ninputs:\n  tag_version:\n    type: string\n    default: 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.heartbeat:2.1.1'\n  heartbeat_name:\n    type: string\n    default: 'dcae-heartbeat-service'\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  host_port:\n    type: integer\n    description: Network port that the platform service is expecting to expose on the host\n    default: 30223\n  container_port:\n    type: integer\n    description: Network port that the platform service exposes in the container\n    default: 10002\n  consul_host:\n    type: string\n    description: Consul endpoint address\n    default: 'consul-server.onap'\n  consul_port:\n    type: integer\n    description: Consul endpoint port\n    default: 8500\n  CBS_polling_allowed:\n    type: string\n    default: 'True'\n  CBS_polling_interval:\n    type: string\n    default: '300'\n  consumerID:\n    type: string\n    default: '1'\n  groupID:\n    type: string\n    default: 'hbgrpID'\n  namespace:\n    type: string\n    default: 'onap'\n  pgaas_cluster_name:\n    type: string\n    description: pg cluster\n    default: \"dcae-pg-primary.onap\"\n  pg_dbName:\n    type: string\n    default: 'heartbeat'\n  ves_heartbeat_publish_url:\n    type: string\n    default: 'http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT'\n  dcae_CL_publish_url:\n    type: string\n    default: 'http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT'\nnode_templates:\n  hbpgaas:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: pg_dbName}\n      use_existing: false\n\n  heartbeat:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              CBS_polling_allowed:\n                get_input: CBS_polling_allowed\n              CBS_polling_interval: \"300\"\n              consumerID: \"1\"\n              groupID:\n                get_input: groupID\n              pg_ipAddress:\n                { get_attribute: [ hbpgaas, admin, host ] }\n              pg_passwd:\n                { get_attribute: [ hbpgaas, admin, password ] }\n              pg_portNum:\n                { get_attribute: [ hbpgaas, admin, port ] }\n              pg_userName:\n                { get_attribute: [ hbpgaas, admin, user ] }\n              pg_dbName:\n                get_input: pg_dbName\n            ports:\n              - \"10002:0\"\n\n    properties:\n      application_config:\n        CBS_polling_allowed:\n          get_input: CBS_polling_allowed\n        CBS_polling_interval:\n          get_input: CBS_polling_interval\n        consumerID:\n          get_input: consumerID\n        groupID:\n          get_input: groupID\n        pg_ipAddress:\n          { get_attribute: [ hbpgaas, admin, host ] }\n        pg_passwd:\n           { get_attribute: [ hbpgaas, admin, password ] }\n        pg_portNum:\n           { get_attribute: [ hbpgaas, admin, port ] }\n        pg_userName:\n           { get_attribute: [ hbpgaas, admin, user ] }\n        pg_dbName:\n          get_input: pg_dbName\n        heartbeat_config: '{\"vnfs\": [{\"eventName\": \"Heartbeat_vDNS\",\"heartbeatcountmissed\": 3,\"heartbeatinterval\": 60,\"closedLoopControlName\": \"ControlLoopEvent1\",     \"policyVersion\": \"1.0.0.5\",     \"policyName\":\"vFireWall\",\"policyScope\": \"resource=sampleResource,type=sampletype,CLName=sampleCLName\",\"target_type\": \"VNF\",        \"target\": \"genVnfName\", \"version\": \"1.0\"}, {\"eventName\": \"Heartbeat_vFW\",\"heartbeatcountmissed\": 3,     \"heartbeatinterval\": 60,\"closedLoopControlName\": \"ControlLoopEvent1\",\"policyVersion\": \"1.0.0.5\",\"policyName\": \"vFireWall\",\"policyScope\": \"resource=sampleResource,type=sampletype,CLName=sampleCLName\",    \"target_type\":\"VNF\",    \"target\": \"genVnfName\",    \"version\": \"1.0\"}, {\"eventName\": \"Heartbeat_xx\",\"heartbeatcountmissed\": 3,      \"heartbeatinterval\": 60,\"closedLoopControlName\": \"ControlLoopEvent1\",\"policyVersion\": \"1.0.0.5\",\"policyName\": \"vFireWall\",      \"policyScope\": \"resource=sampleResource,type=sampletype,CLName=sampleCLName\",\"target_type\": \"VNF\",\"target\": \"genVnfName\",\"version\": \"1.0\"}]}'\n        streams_publishes:\n          dcae_cl_out:\n            dmaap_info:\n             topic_url:\n                  get_input: dcae_CL_publish_url\n            type: message_router\n        streams_subscribes:\n            ves-heartbeat:\n              dmaap_info:\n                topic_url:\n                  get_input: ves_heartbeat_publish_url\n              type: message_router\n      docker_config:\n        healthcheck:\n          type: http\n          endpoint: /\n          interval: 15s\n          timeout: 1s\n      service_component_type:\n          get_input: heartbeat_name\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      log_info:\n          log_directory: '/var/log/ONAP/dcae-heartbeat-services'\n    type: dcae.nodes.ContainerizedServiceComponent\n    relationships:\n    - type: cloudify.relationships.depends_on\n      target: hbpgaas\n\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"354021cf-d5f3-43a4-8c70-3c740f5a1a6b","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/354021cf-d5f3-43a4-8c70-3c740f5a1a6b"},"created":1622333395966,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-helm","typeVersion":2105301209,"blueprintTemplate":"# ============LICENSE_START==========================================\n# ===================================================================\n# Copyright (c) 2019-2020 AT&T\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#         http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#============LICENSE_END============================================\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:helm?version=4.2.0\n\ninputs:\n  tiller-server-ip:\n    description: IP address of Kubernetes master node\n  tiller-server-port:\n    description: Nodeport of tiller server\n  namespace:\n    description: Target namespace to be installed under (requires to be new)\n  chart-repo-url:\n     default: 'https://nexus.onap.org/content/sites/oom-helm-staging'\n  chart-version :\n    description: Chart version for identified component-name\n  stable-repo-url:\n    description: URL for stable repository\n    type: string\n    default: 'https://kubernetes-charts.storage.googleapis.com'\n  config-url:\n    default: ''\n  config-format:\n    default: 'yaml'\n  component-name:\n    description: onap component name\nnode_templates:\n  dcaecomponent:\n    type: onap.nodes.component\n    properties:\n      tiller_ip: { get_input: tiller-server-ip }\n      tiller_port: { get_input: tiller-server-port }\n      component_name: { get_input: component-name }\n      chart_repo_url: { get_input: chart-repo-url }\n      chart_version: { get_input: chart-version }\n      namespace: { get_input: namespace }\n      stable_repo_url: { get_input: stable-repo-url}\n      config_url:  { get_input: config-url}\n      config_format: { get_input: config-format}\noutputs:\n  dcaecomponent_install_status:\n    value: { get_attribute: [ dcaecomponent, install-status ] }\n\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"a31aa941-e5d7-4a51-a9a8-bb82c8ca0469","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/a31aa941-e5d7-4a51-a9a8-bb82c8ca0469"},"created":1622333396050,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-holmes-engine","typeVersion":2105301209,"blueprintTemplate":"# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved.\n# Copyright (c) 2020 Nokia Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END=====================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n- https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n- plugin:k8splugin?version=>=3.4.3,<4.0.0\n- plugin:dcaepolicyplugin?version=2.4.0\n- plugin:pgaas?version=1.3.0\ninputs:\n  dcae_CL_publish_url:\n    type: string\n    default: \"http://message-router.onap:3904/events/unauthenticated.DCAE_CL_OUTPUT\"\n  ves_fault_publish_url:\n    type: string\n    default: \"http://message-router.onap:3904/events/unauthenticated.SEC_FAULT_OUTPUT\"\n  msb_hostname:\n    type: string\n    default: \"msb-iag.onap\"\n  pgaas_cluster_name:\n    type: string\n    default: \"dcae-pg-primary.onap\"\n    # use the single-VM PG instance\n    #default: pgvm\n  database_name:\n    type: string\n    default: \"holmes\"\n  he_image:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/holmes/engine-management:1.3.2\"\n  service_component_type:\n    type: string\n    default: \"holmes-engine-mgmt\"\n  service_id+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-holmes-rules.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-holmes-rules.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-holmes-rules.yaml .yaml
++ flatten /blueprints/k8s-holmes-rules.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END=====================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n- https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n- plugin:k8splugin?version=>=3.4.3,<4.0.0\n- plugin:dcaepolicyplugin?version=2.4.0\n- plugin:pgaas?version=1.3.0\ninputs:\n  msb_hostname:\n    type: string\n    default: \"msb-iag.onap\"\n  pgaas_cluster_name:\n    type: string\n    default: \"dcae-pg-primary.onap\"\n    # use the single-VM PG instance\n    #default: pgvm\n  database_name:\n    type: string\n    default: \"holmes\"\n  hr_image:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/holmes/rule-management:1.3.2\"\n  service_component_type:\n    type: string\n    default: \"holmes-rule-mgmt\"\n  service_id:\n    type: string\n    default: \"holmes-rule-mgmt\"\n  service_component_name_override:\n    type: string\n    default: \"holmes-rule-mgmt\"\n  dcae-analytics-holmes-rule-mgt_cpu_limit:\n    type: string\n    default: \"250m\"\n  dcae-analytics-holmes-rule-mgt_cpu_request:\n    type: string\n    default: \"250m\"\n  dcae-analytics-holmes-rule-mgt_memory_limit:\n    type: string\n    default: \"1024Mi\"\n  dcae-analytics-holmes-rule-mgt_memory_request:\n    type: string\n    default: \"256Mi\"\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      #writerfqdn: { concat: [ { get_input: pgaas_cluster_name }, '\''-write.'\'' ] }\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n  holmesrules:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n           envs:\n            URL_JDBC:\n                { get_attribute: [ pgaasvm, admin, host ] }\n            JDBC_PASSWORD:\n                { get_attribute: [ pgaasvm, admin, password ] }\n            JDBC_USERNAME:\n                { get_attribute: [ pgaasvm, admin, user ] }\n            MSB_ADDR:\n                get_input: msb_hostname\n           ports:\n             - '\''9101:0'\''\n             - '\''9104:0'\''\n    properties:\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      application_config:\n        holmes.default.rule.volte.scenario1: \"ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b$$$package org.onap.holmes.droolsRule;\\n\\nimport org.onap.holmes.common.dmaap.DmaapService;\\nimport org.onap.holmes.common.api.stat.VesAlarm;\\nimport org.onap.holmes.common.aai.CorrelationUtil;\\nimport org.onap.holmes.common.dmaap.entity.PolicyMsg;\\nimport org.onap.holmes.common.dropwizard.ioc.utils.ServiceLocatorHolder;\\nimport org.onap.holmes.common.utils.DroolsLog;\\n \\n\\nrule \\\"Relation_analysis_Rule\\\"\\nsalience 200\\nno-loop true\\n    when\\n        $root : VesAlarm(alarmIsCleared == 0,\\n            $sourceId: sourceId, sourceId != null && !sourceId.equals(\\\"\\\"),\\n\\t\\t\\t$sourceName: sourceName, sourceName != null && !sourceName.equals(\\\"\\\"),\\n\\t\\t\\t$startEpochMicrosec: startEpochMicrosec,\\n            eventName in (\\\"Fault_MultiCloud_VMFailure\\\"),\\n            $eventId: eventId)\\n        $child : VesAlarm( eventId != $eventId, parentId == null,\\n            CorrelationUtil.getInstance().isTopologicallyRelated(sourceId, $sourceId, $sourceName),\\n            eventName in (\\\"Fault_MME_eNodeB out of service alarm\\\"),\\n            startEpochMicrosec < $startEpochMicrosec + 60000 && startEpochMicrosec > $startEpochMicrosec - 60000 )\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"Relation_analysis_Rule: rootId=\\\" + $root.getEventId() + \\\", childId=\\\" + $child.getEventId());\\n\\t\\t$child.setParentId($root.getEventId());\\n\\t\\tupdate($child);\\n\\t\\t\\nend\\n\\nrule \\\"root_has_child_handle_Rule\\\"\\nsalience 150\\nno-loop true\\n\\twhen\\n\\t\\t$root : VesAlarm(alarmIsCleared == 0, rootFlag == 0, $eventId: eventId)\\n\\t\\t$child : VesAlarm(eventId != $eventId, parentId == $eventId)\\n\\tthen\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"root_has_child_handle_Rule: rootId=\\\" + $root.getEventId() + \\\", childId=\\\" + $child.getEventId());\\n\\t\\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\\n\\t\\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, $child, \\\"org.onap.holmes.droolsRule\\\");\\n        dmaapService.publishPolicyMsg(policyMsg, \\\"dcae_cl_out\\\");\\n\\t\\t$root.setRootFlag(1);\\n\\t\\tupdate($root);\\nend\\n\\nrule \\\"root_no_child_handle_Rule\\\"\\nsalience 100\\nno-loop true\\n    when\\n        $root : VesAlarm(alarmIsCleared == 0, rootFlag == 0,\\n            sourceId != null && !sourceId.equals(\\\"\\\"),\\n\\t\\t\\tsourceName != null && !sourceName.equals(\\\"\\\"),\\n            eventName in (\\\"Fault_MultiCloud_VMFailure\\\"))\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"root_no_child_handle_Rule: rootId=\\\" + $root.getEventId());\\n\\t\\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\\n\\t\\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, null, \\\"org.onap.holmes.droolsRule\\\");\\n        dmaapService.publishPolicyMsg(policyMsg, \\\"dcae_cl_out\\\");\\n\\t\\t$root.setRootFlag(1);\\n\\t\\tupdate($root);\\nend\\n\\nrule \\\"root_cleared_handle_Rule\\\"\\nsalience 100\\nno-loop true\\n    when\\n        $root : VesAlarm(alarmIsCleared == 1, rootFlag == 1)\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"root_cleared_handle_Rule: rootId=\\\" + $root.getEventId());\\n\\t\\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\\n\\t\\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, null, \\\"org.onap.holmes.droolsRule\\\");\\n        dmaapService.publishPolicyMsg(policyMsg, \\\"dcae_cl_out\\\");\\n\\t\\tretract($root);\\nend\\n\\nrule \\\"child_handle_Rule\\\"\\nsalience 100\\nno-loop true\\n    when\\n        $child : VesAlarm(alarmIsCleared == 1, rootFlag == 0)\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"child_handle_Rule: childId=\\\" + $child.getEventId());\\n\\t\\tretract($child);\\nend\"\n        msb.hostname:\n         get_input: msb_hostname\n        msb.uri: /api/microservices/v1/services\n        services_calls: {}\n        streams_publishes: {}\n        streams_subscribes: {}\n      image: { get_input: hr_image }\n      #service_component_type: dcae-analytics-holmes-rule-management\n      resource_config:\n        limits:\n          cpu:\n            get_input: dcae-analytics-holmes-rule-mgt_cpu_limit\n          memory:\n            get_input: dcae-analytics-holmes-rule-mgt_memory_limit\n        requests:\n          cpu:\n            get_input: dcae-analytics-holmes-rule-mgt_cpu_request\n          memory:\n            get_input: dcae-analytics-holmes-rule-mgt_memory_request\n    relationships:\n    - type: cloudify.relationships.depends_on\n      target: pgaasvm\n'
++ echo '# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END=====================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n- https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n- plugin:k8splugin?version=>=3.4.3,<4.0.0\n- plugin:dcaepolicyplugin?version=2.4.0\n- plugin:pgaas?version=1.3.0\ninputs:\n  msb_hostname:\n    type: string\n    default: \"msb-iag.onap\"\n  pgaas_cluster_name:\n    type: string\n    default: \"dcae-pg-primary.onap\"\n    # use the single-VM PG instance\n    #default: pgvm\n  database_name:\n    type: string\n    default: \"holmes\"\n  hr_image:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/holmes/rule-management:1.3.2\"\n  service_component_type:\n    type: string\n    default: \"holmes-rule-mgmt\"\n  service_id:\n    type: string\n    default: \"holmes-rule-mgmt\"\n  service_component_name_override:\n    type: string\n    default: \"holmes-rule-mgmt\"\n  dcae-analytics-holmes-rule-mgt_cpu_limit:\n    type: string\n    default: \"250m\"\n  dcae-analytics-holmes-rule-mgt_cpu_request:\n    type: string\n    default: \"250m\"\n  dcae-analytics-holmes-rule-mgt_memory_limit:\n    type: string\n    default: \"1024Mi\"\n  dcae-analytics-holmes-rule-mgt_memory_request:\n    type: string\n    default: \"256Mi\"\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      #writerfqdn: { concat: [ { get_input: pgaas_cluster_name }, '\''-write.'\'' ] }\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n  holmesrules:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n           envs:\n            URL_JDBC:\n                { get_attribute: [ pgaasvm, admin, host ] }\n            JDBC_PASSWORD:\n                { get_attribute: [ pgaasvm, admin, password ] }\n            JDBC_USERNAME:\n                { get_attribute: [ pgaasvm, admin, user ] }\n            MSB_ADDR:\n                get_input: msb_hostname\n           ports:\n             - '\''9101:0'\''\n             - '\''9104:0'\''\n    properties:\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      application_config:\n        holmes.default.rule.volte.scenario1: \"ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b$$$package org.onap.holmes.droolsRule;\\n\\nimport org.onap.holmes.common.dmaap.DmaapService;\\nimport org.onap.holmes.common.api.stat.VesAlarm;\\nimport org.onap.holmes.common.aai.CorrelationUtil;\\nimport org.onap.holmes.common.dmaap.entity.PolicyMsg;\\nimport org.onap.holmes.common.dropwizard.ioc.utils.ServiceLocatorHolder;\\nimport org.onap.holmes.common.utils.DroolsLog;\\n \\n\\nrule \\\"Relation_analysis_Rule\\\"\\nsalience 200\\nno-loop true\\n    when\\n        $root : VesAlarm(alarmIsCleared == 0,\\n            $sourceId: sourceId, sourceId != null && !sourceId.equals(\\\"\\\"),\\n\\t\\t\\t$sourceName: sourceName, sourceName != null && !sourceName.equals(\\\"\\\"),\\n\\t\\t\\t$startEpochMicrosec: startEpochMicrosec,\\n            eventName in (\\\"Fault_MultiCloud_VMFailure\\\"),\\n            $eventId: eventId)\\n        $child : VesAlarm( eventId != $eventId, parentId == null,\\n            CorrelationUtil.getInstance().isTopologicallyRelated(sourceId, $sourceId, $sourceName),\\n            eventName in (\\\"Fault_MME_eNodeB out of service alarm\\\"),\\n            startEpochMicrosec < $startEpochMicrosec + 60000 && startEpochMicrosec > $startEpochMicrosec - 60000 )\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"Relation_analysis_Rule: rootId=\\\" + $root.getEventId() + \\\", childId=\\\" + $child.getEventId());\\n\\t\\t$child.setParentId($root.getEventId());\\n\\t\\tupdate($child);\\n\\t\\t\\nend\\n\\nrule \\\"root_has_child_handle_Rule\\\"\\nsalience 150\\nno-loop true\\n\\twhen\\n\\t\\t$root : VesAlarm(alarmIsCleared == 0, rootFlag == 0, $eventId: eventId)\\n\\t\\t$child : VesAlarm(eventId != $eventId, parentId == $eventId)\\n\\tthen\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"root_has_child_handle_Rule: rootId=\\\" + $root.getEventId() + \\\", childId=\\\" + $child.getEventId());\\n\\t\\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\\n\\t\\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, $child, \\\"org.onap.holmes.droolsRule\\\");\\n        dmaapService.publishPolicyMsg(policyMsg, \\\"dcae_cl_out\\\");\\n\\t\\t$root.setRootFlag(1);\\n\\t\\tupdate($root);\\nend\\n\\nrule \\\"root_no_child_handle_Rule\\\"\\nsalience 100\\nno-loop true\\n    when\\n        $root : VesAlarm(alarmIsCleared == 0, rootFlag == 0,\\n            sourceId != null && !sourceId.equals(\\\"\\\"),\\n\\t\\t\\tsourceName != null && !sourceName.equals(\\\"\\\"),\\n            eventName in (\\\"Fault_MultiCloud_VMFailure\\\"))\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"root_no_child_handle_Rule: rootId=\\\" + $root.getEventId());\\n\\t\\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\\n\\t\\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, null, \\\"org.onap.holmes.droolsRule\\\");\\n        dmaapService.publishPolicyMsg(policyMsg, \\\"dcae_cl_out\\\");\\n\\t\\t$root.setRootFlag(1);\\n\\t\\tupdate($root);\\nend\\n\\nrule \\\"root_cleared_handle_Rule\\\"\\nsalience 100\\nno-loop true\\n    when\\n        $root : VesAlarm(alarmIsCleared == 1, rootFlag == 1)\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"root_cleared_handle_Rule: rootId=\\\" + $root.getEventId());\\n\\t\\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\\n\\t\\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, null, \\\"org.onap.holmes.droolsRule\\\");\\n        dmaapService.publishPolicyMsg(policyMsg, \\\"dcae_cl_out\\\");\\n\\t\\tretract($root);\\nend\\n\\nrule \\\"child_handle_Rule\\\"\\nsalience 100\\nno-loop true\\n    when\\n        $child : VesAlarm(alarmIsCleared == 1, rootFlag == 0)\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"child_handle_Rule: childId=\\\" + $child.getEventId());\\n\\t\\tretract($child);\\nend\"\n        msb.hostname:\n         get_input: msb_hostname\n        msb.uri: /api/microservices/v1/services\n        services_calls: {}\n        streams_publishes: {}\n        streams_subscribes: {}\n      image: { get_input: hr_image }\n      #service_component_type: dcae-analytics-holmes-rule-management\n      resource_config:\n        limits:\n          cpu:\n            get_input: dcae-analytics-holmes-rule-mgt_cpu_limit\n          memory:\n            get_input: dcae-analytics-holmes-rule-mgt_memory_limit\n        requests:\n          cpu:\n            get_input: dcae-analytics-holmes-rule-mgt_cpu_request\n          memory:\n            get_input: dcae-analytics-holmes-rule-mgt_memory_request\n    relationships:\n    - type: cloudify.relationships.depends_on\n      target: pgaasvm\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-holmes-rules",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END=====================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n- https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n- plugin:k8splugin?version=>=3.4.3,<4.0.0\n- plugin:dcaepolicyplugin?version=2.4.0\n- plugin:pgaas?version=1.3.0\ninputs:\n  msb_hostname:\n    type: string\n    default: \"msb-iag.onap\"\n  pgaas_cluster_name:\n    type: string\n    default: \"dcae-pg-primary.onap\"\n    # use the single-VM PG instance\n    #default: pgvm\n  database_name:\n    type: string\n    default: \"holmes\"\n  hr_image:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/holmes/rule-management:1.3.2\"\n  service_component_type:\n    type: string\n    default: \"holmes-rule-mgmt\"\n  service_id:\n    type: string\n    default: \"holmes-rule-mgmt\"\n  service_component_name_override:\n    type: string\n    default: \"holmes-rule-mgmt\"\n  dcae-analytics-holmes-rule-mgt_cpu_limit:\n    type: string\n    default: \"250m\"\n  dcae-analytics-holmes-rule-mgt_cpu_request:\n    type: string\n    default: \"250m\"\n  dcae-analytics-holmes-rule-mgt_memory_limit:\n    type: string\n    default: \"1024Mi\"\n  dcae-analytics-holmes-rule-mgt_memory_request:\n    type: string\n    default: \"256Mi\"\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      #writerfqdn: { concat: [ { get_input: pgaas_cluster_name }, '\''-write.'\'' ] }\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n  holmesrules:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n           envs:\n            URL_JDBC:\n                { get_attribute: [ pgaasvm, admin, host ] }\n            JDBC_PASSWORD:\n                { get_attribute: [ pgaasvm, admin, password ] }\n            JDBC_USERNAME:\n                { get_attribute: [ pgaasvm, admin, user ] }\n            MSB_ADDR:\n                get_input: msb_hostname\n           ports:\n             - '\''9101:0'\''\n             - '\''9104:0'\''\n    properties:\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      application_config:\n        holmes.default.rule.volte.scenario1: \"ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b$$$package org.onap.holmes.droolsRule;\\n\\nimport org.onap.holmes.common.dmaap.DmaapService;\\nimport org.onap.holmes.common.api.stat.VesAlarm;\\nimport org.onap.holmes.common.aai.CorrelationUtil;\\nimport org.onap.holmes.common.dmaap.entity.PolicyMsg;\\nimport org.onap.holmes.common.dropwizard.ioc.utils.ServiceLocatorHolder;\\nimport org.onap.holmes.common.utils.DroolsLog;\\n \\n\\nrule \\\"Relation_analysis_Rule\\\"\\nsalience 200\\nno-loop true\\n    when\\n        $root : VesAlarm(alarmIsCleared == 0,\\n            $sourceId: sourceId, sourceId != null && !sourceId.equals(\\\"\\\"),\\n\\t\\t\\t$sourceName: sourceName, sourceName != null && !sourceName.equals(\\\"\\\"),\\n\\t\\t\\t$startEpochMicrosec: startEpochMicrosec,\\n            eventName in (\\\"Fault_MultiCloud_VMFailure\\\"),\\n            $eventId: eventId)\\n        $child : VesAlarm( eventId != $eventId, parentId == null,\\n            CorrelationUtil.getInstance().isTopologicallyRelated(sourceId, $sourceId, $sourceName),\\n            eventName in (\\\"Fault_MME_eNodeB out of service alarm\\\"),\\n            startEpochMicrosec < $startEpochMicrosec + 60000 && startEpochMicrosec > $startEpochMicrosec - 60000 )\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"Relation_analysis_Rule: rootId=\\\" + $root.getEventId() + \\\", childId=\\\" + $child.getEventId());\\n\\t\\t$child.setParentId($root.getEventId());\\n\\t\\tupdate($child);\\n\\t\\t\\nend\\n\\nrule \\\"root_has_child_handle_Rule\\\"\\nsalience 150\\nno-loop true\\n\\twhen\\n\\t\\t$root : VesAlarm(alarmIsCleared == 0, rootFlag == 0, $eventId: eventId)\\n\\t\\t$child : VesAlarm(eventId != $eventId, parentId == $eventId)\\n\\tthen\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"root_has_child_handle_Rule: rootId=\\\" + $root.getEventId() + \\\", childId=\\\" + $child.getEventId());\\n\\t\\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\\n\\t\\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, $child, \\\"org.onap.holmes.droolsRule\\\");\\n        dmaapService.publishPolicyMsg(policyMsg, \\\"dcae_cl_out\\\");\\n\\t\\t$root.setRootFlag(1);\\n\\t\\tupdate($root);\\nend\\n\\nrule \\\"root_no_child_handle_Rule\\\"\\nsalience 100\\nno-loop true\\n    when\\n        $root : VesAlarm(alarmIsCleared == 0, rootFlag == 0,\\n            sourceId != null && !sourceId.equals(\\\"\\\"),\\n\\t\\t\\tsourceName != null && !sourceName.equals(\\\"\\\"),\\n            eventName in (\\\"Fault_MultiCloud_VMFailure\\\"))\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"root_no_child_handle_Rule: rootId=\\\" + $root.getEventId());\\n\\t\\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\\n\\t\\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, null, \\\"org.onap.holmes.droolsRule\\\");\\n        dmaapService.publishPolicyMsg(policyMsg, \\\"dcae_cl_out\\\");\\n\\t\\t$root.setRootFlag(1);\\n\\t\\tupdate($root);\\nend\\n\\nrule \\\"root_cleared_handle_Rule\\\"\\nsalience 100\\nno-loop true\\n    when\\n        $root : VesAlarm(alarmIsCleared == 1, rootFlag == 1)\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"root_cleared_handle_Rule: rootId=\\\" + $root.getEventId());\\n\\t\\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\\n\\t\\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, null, \\\"org.onap.holmes.droolsRule\\\");\\n        dmaapService.publishPolicyMsg(policyMsg, \\\"dcae_cl_out\\\");\\n\\t\\tretract($root);\\nend\\n\\nrule \\\"child_handle_Rule\\\"\\nsalience 100\\nno-loop true\\n    when\\n        $child : VesAlarm(alarmIsCleared == 1, rootFlag == 0)\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"child_handle_Rule: childId=\\\" + $child.getEventId());\\n\\t\\tretract($child);\\nend\"\n        msb.hostname:\n         get_input: msb_hostname\n        msb.uri: /api/microservices/v1/services\n        services_calls: {}\n        streams_publishes: {}\n        streams_subscribes: {}\n      image: { get_input: hr_image }\n      #service_component_type: dcae-analytics-holmes-rule-management\n      resource_config:\n        limits:\n          cpu:\n            get_input: dcae-analytics-holmes-rule-mgt_cpu_limit\n          memory:\n            get_input: dcae-analytics-holmes-rule-mgt_memory_limit\n        requests:\n          cpu:\n            get_input: dcae-analytics-holmes-rule-mgt_cpu_request\n          memory:\n            get_input: dcae-analytics-holmes-rule-mgt_memory_request\n    relationships:\n    - type: cloudify.relationships.depends_on\n      target: pgaasvm\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 17571    0  8921  100  8650   248k   241k --:--:-- --:--:-- --:--:--  490k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-hv-ves.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-hv-ves.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-hv-ves.yaml .yaml
++ flatten /blueprints/k8s-hv-ves.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START========================================================\n# =================================================================================\n# Copyright (C) 2018-2019 NOKIA\n# Modifications copyright (c) 2020 AT&T Intellectual Property.  All Rights Reserved\n# =================================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END==========================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  tag_version:\n    type: string\n    default: '\''nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.6.0'\''\n  service_component_type:\n    type: string\n    default: '\''dcae-hv-ves-collector'\''\n  service_id:\n    type: string\n    default: \"dcae-hv-ves-collector\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  host_port:\n    type: integer\n    description: Network port that the platform service is expecting to expose on the host\n    default: 30222\n  container_port:\n    type: integer\n    description: Network port that the platform service exposes in the container\n    default: 6061\n  kafka_bootstrap_servers:\n    type: string\n    default: '\''message-router-kafka:9092'\''\n  kafka_username:\n    type: string\n    default: '\''admin'\''\n  kafka_password:\n    type: string\n    default: '\''admin_secret'\''\n  perf3gpp_kafka_topic:\n    type: string\n    default: '\''HV_VES_PERF3GPP'\''\n  log_level:\n    type: string\n    default: '\''INFO'\''\n  server_idle_timeout_sec:\n    type: integer\n    default: 300\n  cbs_request_interval_sec:\n    type: integer\n    default: 5\n  security_ssl_disable:\n    type: boolean\n    default: false\n  security_keys_key_store_file:\n    type: string\n    default: '\''/etc/ves-hv/ssl/cert.jks'\''\n  security_keys_key_store_password_file:\n    type: string\n    default: '\''/etc/ves-hv/ssl/jks.pass'\''\n  security_keys_trust_store_file:\n    type: string\n    default: '\''/etc/ves-hv/ssl/trust.jks'\''\n  security_keys_trust_store_password_file:\n    type: string\n    default: '\''/etc/ves-hv/ssl/trust.pass'\''\n  use_tls:\n    type: boolean\n    default: true\n  service_component_name_override:\n    type: string\n    default: \"dcae-hv-ves-collector\"\n  external_cert_cert_type:\n    type: string\n    description: Output type\n    default: \"JKS\"\n  external_cert_ca_name:\n    type: string\n    description: Name of Certificate Authority configured on CertService side.\n    default: \"RA\"\n  external_cert_common_name:\n    type: string\n    description: Common name which should be present in certificate.\n    default: \"dcae-hv-ves-collector\"\n  external_cert_sans:\n    type: string\n    description: \"List of Subject Alternative Names (SANs) which should be present\n      in certificate. Delimiter - , Should contain common_name value and other FQDNs\n      under which given component is accessible.\"\n    default: \"dcae-hv-ves-collector,hv-ves-collector,hv-ves\"\n  external_cert_use_external_tls:\n    type: boolean\n    description: Flag to indicate external tls enable/disable.\n    default: false\nnode_templates:\n  hv-ves:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              JAVA_OPTS: { concat: [ '\''-Dlogback.configurationFile=/etc/ONAP/'\'', { get_input: service_component_type }, '\''/logback.xml'\'' ] }\n    properties:\n      application_config:\n        logLevel: { get_input: log_level }\n        server.idleTimeoutSec: { get_input: server_idle_timeout_sec }\n        server.listenPort: { get_input: container_port }\n        cbs.requestIntervalSec: { get_input: cbs_request_interval_sec}\n        security.sslDisable: { get_input: security_ssl_disable }\n        security.keys.keyStoreFile: { get_input: security_keys_key_store_file }\n        security.keys.keyStorePasswordFile: { get_input: security_keys_key_store_password_file }\n        security.keys.trustStoreFile: { get_input: security_keys_trust_store_file }\n        security.keys.trustStorePasswordFile: { get_input: security_keys_trust_store_password_file }\n        streams_publishes:\n          perf3gpp:\n            type: kafka\n            aaf_credentials:\n              username: { get_input: kafka_username }\n              password: { get_input: kafka_password }\n            kafka_info:\n              bootstrap_servers: { get_input: kafka_bootstrap_servers }\n              topic_name: { get_input: perf3gpp_kafka_topic }\n      docker_config:\n        healthcheck:\n          type: script\n          script: \"/opt/ves-hv-collector/healthcheck.sh\"\n          interval: 15s\n          timeout: 2s\n        ports:\n          - { concat: [ { get_input: container_port }, '\'':'\'', { get_input: host_port } ] }\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      log_info:\n        log_directory: { concat: [ '\''/var/log/ONAP/'\'', { get_input: service_component_type } ] }\n      tls_info:\n        cert_directory: '\''/etc/ves-hv/ssl'\''\n        use_tls: { get_input: use_tls }\n      external_cert:\n        external_cert_directory: '\''/etc/ves-hv/ssl'\''\n        use_external_tls:\n          get_input: external_cert_use_external_tls\n        cert_type:\n          get_input: external_cert_cert_type\n        ca_name:\n          get_input: external_cert_ca_name\n        external_certificate_parameters:\n          common_name:\n            get_input: external_cert_common_name\n          sans:\n            get_input: external_cert_sans\n    type: dcae.nodes.ContainerizedServiceComponent\n'
++ echo '# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START========================================================\n# =================================================================================\n# Copyright (C) 2018-2019 NOKIA\n# Modifications copyright (c) 2020 AT&T Intellectual Property.  All Rights Reserved\n# =================================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END==========================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  tag_version:\n    type: string\n    default: '\''nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.6.0'\''\n  service_component_type:\n    type: string\n    default: '\''dcae-hv-ves-collector'\''\n  service_id:\n    type: string\n    default: \"dcae-hv-ves-collector\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  host_port:\n    type: integer\n    description: Network port that the platform service is expecting to expose on the host\n    default: 30222\n  container_port:\n    type: integer\n    description: Network port that the platform service exposes in the container\n    default: 6061\n  kafka_bootstrap_servers:\n    type: string\n    default: '\''message-router-kafka:9092'\''\n  kafka_username:\n    type: string\n    default: '\''admin'\''\n  kafka_password:\n    type: string\n    default: '\''admin_secret'\''\n  perf3gpp_kafka_topic:\n    type: string\n    default: '\''HV_VES_PERF3GPP'\''\n  log_level:\n    type: string\n    default: '\''INFO'\''\n  server_idle_timeout_sec:\n    type: integer\n    default: 300\n  cbs_request_interval_sec:\n    type: integer\n    default: 5\n  security_ssl_disable:\n    type: boolean\n    default: false\n  security_keys_key_store_file:\n    type: string\n    default: '\''/etc/ves-hv/ssl/cert.jks'\''\n  security_keys_key_store_password_file:\n    type: string\n    default: '\''/etc/ves-hv/ssl/jks.pass'\''\n  security_keys_trust_store_file:\n    type: string\n    default: '\''/etc/ves-hv/ssl/trust.jks'\''\n  security_keys_trust_store_password_file:\n    type: string\n    default: '\''/etc/ves-hv/ssl/trust.pass'\''\n  use_tls:\n    type: boolean\n    default: true\n  service_component_name_override:\n    type: string\n    default: \"dcae-hv-ves-collector\"\n  external_cert_cert_type:\n    type: string\n    description: Output type\n    default: \"JKS\"\n  external_cert_ca_name:\n    type: string\n    description: Name of Certificate Authority configured on CertService side.\n    default: \"RA\"\n  external_cert_common_name:\n    type: string\n    description: Common name which should be present in certificate.\n    default: \"dcae-hv-ves-collector\"\n  external_cert_sans:\n    type: string\n    description: \"List of Subject Alternative Names (SANs) which should be present\n      in certificate. Delimiter - , Should contain common_name value and other FQDNs\n      under which given component is accessible.\"\n    default: \"dcae-hv-ves-collector,hv-ves-collector,hv-ves\"\n  external_cert_use_external_tls:\n    type: boolean\n    description: Flag to indicate external tls enable/disable.\n    default: false\nnode_templates:\n  hv-ves:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              JAVA_OPTS: { concat: [ '\''-Dlogback.configurationFile=/etc/ONAP/'\'', { get_input: service_component_type }, '\''/logback.xml'\'' ] }\n    properties:\n      application_config:\n        logLevel: { get_input: log_level }\n        server.idleTimeoutSec: { get_input: server_idle_timeout_sec }\n        server.listenPort: { get_input: container_port }\n        cbs.requestIntervalSec: { get_input: cbs_request_interval_sec}\n        security.sslDisable: { get_input: security_ssl_disable }\n        security.keys.keyStoreFile: { get_input: security_keys_key_store_file }\n        security.keys.keyStorePasswordFile: { get_input: security_keys_key_store_password_file }\n        security.keys.trustStoreFile: { get_input: security_keys_trust_store_file }\n        security.keys.trustStorePasswordFile: { get_input: security_keys_trust_store_password_file }\n        streams_publishes:\n          perf3gpp:\n            type: kafka\n            aaf_credentials:\n              username: { get_input: kafka_username }\n              password: { get_input: kafka_password }\n            kafka_info:\n              bootstrap_servers: { get_input: kafka_bootstrap_servers }\n              topic_name: { get_input: perf3gpp_kafka_topic }\n      docker_config:\n        healthcheck:\n          type: script\n          script: \"/opt/ves-hv-collector/healthcheck.sh\"\n          interval: 15s\n          timeout: 2s\n        ports:\n          - { concat: [ { get_input: container_port }, '\'':'\'', { get_input: host_port } ] }\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      log_info:\n        log_directory: { concat: [ '\''/var/log/ONAP/'\'', { get_input: service_component_type } ] }\n      tls_info:\n        cert_directory: '\''/etc/ves-hv/ssl'\''\n        use_tls: { get_input: use_tls }\n      external_cert:\n        external_cert_directory: '\''/etc/ves-hv/ssl'\''\n        use_external_tls:\n          get_input: external_cert_use_external_tls\n        cert_type:\n          get_input: external_cert_cert_type\n        ca_name:\n          get_input: external_cert_ca_name\n        external_certificate_parameters:\n          common_name:\n            get_input: external_cert_common_name\n          sans:\n            get_input: external_cert_sans\n    type: dcae.nodes.ContainerizedServiceComponent\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-hv-ves",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START========================================================\n# =================================================================================\n# Copyright (C) 2018-2019 NOKIA\n# Modifications copyright (c) 2020 AT&T Intellectual Property.  All Rights Reserved\n# =================================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END==========================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  tag_version:\n    type: string\n    default: '\''nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.6.0'\''\n  service_component_type:\n    type: string\n    default: '\''dcae-hv-ves-collector'\''\n  service_id:\n    type: string\n    default: \"dcae-hv-ves-collector\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  host_port:\n    type: integer\n    description: Network port that the platform service is expecting to expose on the host\n    default: 30222\n  container_port:\n    type: integer\n    description: Network port that the platform service exposes in the container\n    default: 6061\n  kafka_bootstrap_servers:\n    type: string\n    default: '\''message-router-kafka:9092'\''\n  kafka_username:\n    type: string\n    default: '\''admin'\''\n  kafka_password:\n    type: string\n    default: '\''admin_secret'\''\n  perf3gpp_kafka_topic:\n    type: string\n    default: '\''HV_VES_PERF3GPP'\''\n  log_level:\n    type: string\n    default: '\''INFO'\''\n  server_idle_timeout_sec:\n    type: integer\n    default: 300\n  cbs_request_interval_sec:\n    type: integer\n    default: 5\n  security_ssl_disable:\n    type: boolean\n    default: false\n  security_keys_key_store_file:\n    type: string\n    default: '\''/etc/ves-hv/ssl/cert.jks'\''\n  security_keys_key_store_password_file:\n    type: string\n    default: '\''/etc/ves-hv/ssl/jks.pass'\''\n  security_keys_trust_store_file:\n    type: string\n    default: '\''/etc/ves-hv/ssl/trust.jks'\''\n  security_keys_trust_store_password_file:\n    type: string\n    default: '\''/etc/ves-hv/ssl/trust.pass'\''\n  use_tls:\n    type: boolean\n    default: true\n  service_component_name_override:\n    type: string\n    default: \"dcae-hv-ves-collector\"\n  external_cert_cert_type:\n    type: string\n    description: Output type\n    default: \"JKS\"\n  external_cert_ca_name:\n    type: string\n    description: Name of Certificate Authority configured on CertService side.\n    default: \"RA\"\n  external_cert_common_name:\n    type: string\n    description: Common name which should be present in certificate.\n    default: \"dcae-hv-ves-collector\"\n  external_cert_sans:\n    type: string\n    description: \"List of Subject Alternative Names (SANs) which should be present\n      in certificate. Delimiter - , Should contain common_name value and other FQDNs\n      under which given component is accessible.\"\n    default: \"dcae-hv-ves-collector,hv-ves-collector,hv-ves\"\n  external_cert_use_external_tls:\n    type: boolean\n    description: Flag to indicate external tls enable/disable.\n    default: false\nnode_templates:\n  hv-ves:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              JAVA_OPTS: { concat: [ '\''-Dlogback.configurationFile=/etc/ONAP/'\'', { get_input: service_component_type }, '\''/logback.xml'\'' ] }\n    properties:\n      application_config:\n        logLevel: { get_input: log_level }\n        server.idleTimeoutSec: { get_input: server_idle_timeout_sec }\n        server.listenPort: { get_input: container_port }\n        cbs.requestIntervalSec: { get_input: cbs_request_interval_sec}\n        security.sslDisable: { get_input: security_ssl_disable }\n        security.keys.keyStoreFile: { get_input: security_keys_key_store_file }\n        security.keys.keyStorePasswordFile: { get_input: security_keys_key_store_password_file }\n        security.keys.trustStoreFile: { get_input: security_keys_trust_store_file }\n        security.keys.trustStorePasswordFile: { get_input: security_keys_trust_store_password_file }\n        streams_publishes:\n          perf3gpp:\n            type: kafka\n            aaf_credentials:\n              username: { get_input: kafka_username }\n              password: { get_input: kafka_password }\n            kafka_info:\n              bootstrap_servers: { get_input: kafka_bootstrap_servers }\n              topic_name: { get_input: perf3gpp_kafka_topic }\n      docker_config:\n        healthcheck:\n          type: script\n          script: \"/opt/ves-hv-collector/healthcheck.sh\"\n          interval: 15s\n          timeout: 2s\n        ports:\n          - { concat: [ { get_input: container_port }, '\'':'\'', { get_input: host_port } ] }\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      log_info:\n        log_directory: { concat: [ '\''/var/log/ONAP/'\'', { get_input: service_component_type } ] }\n      tls_info:\n        cert_directory: '\''/etc/ves-hv/ssl'\''\n        use_tls: { get_input: use_tls }\n      external_cert:\n        external_cert_directory: '\''/etc/ves-hv/ssl'\''\n        use_external_tls:\n          get_input: external_cert_use_external_tls\n        cert_type:\n          get_input: external_cert_cert_type\n        ca_name:\n          get_input: external_cert_ca_name\n        external_certificate_parameters:\n          common_name:\n            get_input: external_cert_common_name\n          sans:\n            get_input: external_cert_sans\n    type: dcae.nodes.ContainerizedServiceComponent\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
:\n    type: string\n    default: \"holmes-engine-mgmt\"\n  service_component_name_override:\n    type: string\n    default: \"holmes-engine-mgmt\"\n  dcae-analytics-holmes-engine-mgt_cpu_limit:\n    type: string\n    default: \"500m\"\n  dcae-analytics-holmes-engine-mgt_cpu_request:\n    type: string\n    default: \"500m\"\n  dcae-analytics-holmes-engine-mgt_memory_limit:\n    type: string\n    default: \"1024Mi\"\n  dcae-analytics-holmes-engine-mgt_memory_request:\n    type: string\n    default: \"256Mi\"\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      #writerfqdn: { concat: [ { get_input: pgaas_cluster_name }, '-write.' ] }\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n      use_existing: true\n\n  holmesengine:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n           envs:\n            URL_JDBC:\n                { get_attribute: [ pgaasvm, admin, host ] }\n            JDBC_PASSWORD:\n                { get_attribute: [ pgaasvm, admin, password ] }\n            JDBC_USERNAME:\n                { get_attribute: [ pgaasvm, admin, user ] }\n            MSB_ADDR:\n                get_input: msb_hostname\n           ports:\n             - '9102:0'\n    properties:\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      application_config:\n        msb.hostname:\n         get_input: msb_hostname\n        msb.uri: /api/microservices/v1/services\n        services_calls: {}\n        streams_publishes:\n          dcae_cl_out:\n            dmaap_info:\n             topic_url:\n                  get_input: dcae_CL_publish_url\n            type: message_router\n        streams_subscribes:\n          ves_fault:\n            dmaap_info:\n             topic_url:\n                  get_input: ves_fault_publish_url\n            type: message_router\n      image: { get_input: he_image }\n      # need to use truncated name!!\n      #service_component_type: dcae-analytics-holmes-engin-management\n      resource_config:\n        limits:\n          cpu:\n            get_input: dcae-analytics-holmes-engine-mgt_cpu_limit\n          memory:\n            get_input: dcae-analytics-holmes-engine-mgt_memory_limit\n        requests:\n          cpu:\n            get_input: dcae-analytics-holmes-engine-mgt_cpu_request\n          memory:\n            get_input: dcae-analytics-holmes-engine-mgt_memory_request\n    relationships:\n    - type: cloudify.relationships.depends_on\n      target: pgaasvm\n\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"7d216f64-9906-4370-b56b-532bb6f4cd5f","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/7d216f64-9906-4370-b56b-532bb6f4cd5f"},"created":1622333396134,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-holmes-rules","typeVersion":2105301209,"blueprintTemplate":"# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END=====================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n- https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n- plugin:k8splugin?version=>=3.4.3,<4.0.0\n- plugin:dcaepolicyplugin?version=2.4.0\n- plugin:pgaas?version=1.3.0\ninputs:\n  msb_hostname:\n    type: string\n    default: \"msb-iag.onap\"\n  pgaas_cluster_name:\n    type: string\n    default: \"dcae-pg-primary.onap\"\n    # use the single-VM PG instance\n    #default: pgvm\n  database_name:\n    type: string\n    default: \"holmes\"\n  hr_image:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/holmes/rule-management:1.3.2\"\n  service_component_type:\n    type: string\n    default: \"holmes-rule-mgmt\"\n  service_id:\n    type: string\n    default: \"holmes-rule-mgmt\"\n  service_component_name_override:\n    type: string\n    default: \"holmes-rule-mgmt\"\n  dcae-analytics-holmes-rule-mgt_cpu_limit:\n    type: string\n    default: \"250m\"\n  dcae-analytics-holmes-rule-mgt_cpu_request:\n    type: string\n    default: \"250m\"\n  dcae-analytics-holmes-rule-mgt_memory_limit:\n    type: string\n    default: \"1024Mi\"\n  dcae-analytics-holmes-rule-mgt_memory_request:\n    type: string\n    default: \"256Mi\"\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      #writerfqdn: { concat: [ { get_input: pgaas_cluster_name }, '-write.' ] }\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n  holmesrules:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n           envs:\n            URL_JDBC:\n                { get_attribute: [ pgaasvm, admin, host ] }\n            JDBC_PASSWORD:\n                { get_attribute: [ pgaasvm, admin, password ] }\n            JDBC_USERNAME:\n                { get_attribute: [ pgaasvm, admin, user ] }\n            MSB_ADDR:\n                get_input: msb_hostname\n           ports:\n             - '9101:0'\n             - '9104:0'\n    properties:\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      application_config:\n        holmes.default.rule.volte.scenario1: \"ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b$$$package org.onap.holmes.droolsRule;\\n\\nimport org.onap.holmes.common.dmaap.DmaapService;\\nimport org.onap.holmes.common.api.stat.VesAlarm;\\nimport org.onap.holmes.common.aai.CorrelationUtil;\\nimport org.onap.holmes.common.dmaap.entity.PolicyMsg;\\nimport org.onap.holmes.common.dropwizard.ioc.utils.ServiceLocatorHolder;\\nimport org.onap.holmes.common.utils.DroolsLog;\\n \\n\\nrule \\\"Relation_analysis_Rule\\\"\\nsalience 200\\nno-loop true\\n    when\\n        $root : VesAlarm(alarmIsCleared == 0,\\n            $sourceId: sourceId, sourceId != null && !sourceId.equals(\\\"\\\"),\\n\\t\\t\\t$sourceName: sourceName, sourceName != null && !sourceName.equals(\\\"\\\"),\\n\\t\\t\\t$startEpochMicrosec: startEpochMicrosec,\\n            eventName in (\\\"Fault_MultiCloud_VMFailure\\\"),\\n            $eventId: eventId)\\n        $child : VesAlarm( eventId != $eventId, parentId == null,\\n            CorrelationUtil.getInstance().isTopologicallyRelated(sourceId, $sourceId, $sourceName),\\n            eventName in (\\\"Fault_MME_eNodeB out of service alarm\\\"),\\n            startEpochMicrosec < $startEpochMicrosec + 60000 && startEpochMicrosec > $startEpochMicrosec - 60000 )\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"Relation_analysis_Rule: rootId=\\\" + $root.getEventId() + \\\", childId=\\\" + $child.getEventId());\\n\\t\\t$child.setParentId($root.getEventId());\\n\\t\\tupdate($child);\\n\\t\\t\\nend\\n\\nrule \\\"root_has_child_handle_Rule\\\"\\nsalience 150\\nno-loop true\\n\\twhen\\n\\t\\t$root : VesAlarm(alarmIsCleared == 0, rootFlag == 0, $eventId: eventId)\\n\\t\\t$child : VesAlarm(eventId != $eventId, parentId == $eventId)\\n\\tthen\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"root_has_child_handle_Rule: rootId=\\\" + $root.getEventId() + \\\", childId=\\\" + $child.getEventId());\\n\\t\\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\\n\\t\\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, $child, \\\"org.onap.holmes.droolsRule\\\");\\n        dmaapService.publishPolicyMsg(policyMsg, \\\"dcae_cl_out\\\");\\n\\t\\t$root.setRootFlag(1);\\n\\t\\tupdate($root);\\nend\\n\\nrule \\\"root_no_child_handle_Rule\\\"\\nsalience 100\\nno-loop true\\n    when\\n        $root : VesAlarm(alarmIsCleared == 0, rootFlag == 0,\\n            sourceId != null && !sourceId.equals(\\\"\\\"),\\n\\t\\t\\tsourceName != null && !sourceName.equals(\\\"\\\"),\\n            eventName in (\\\"Fault_MultiCloud_VMFailure\\\"))\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"root_no_child_handle_Rule: rootId=\\\" + $root.getEventId());\\n\\t\\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\\n\\t\\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, null, \\\"org.onap.holmes.droolsRule\\\");\\n        dmaapService.publishPolicyMsg(policyMsg, \\\"dcae_cl_out\\\");\\n\\t\\t$root.setRootFlag(1);\\n\\t\\tupdate($root);\\nend\\n\\nrule \\\"root_cleared_handle_Rule\\\"\\nsalience 100\\nno-loop true\\n    when\\n        $root : VesAlarm(alarmIsCleared == 1, rootFlag == 1)\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"root_cleared_handle_Rule: rootId=\\\" + $root.getEventId());\\n\\t\\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\\n\\t\\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, null, \\\"org.onap.holmes.droolsRule\\\");\\n        dmaapService.publishPolicyMsg(policyMsg, \\\"dcae_cl_out\\\");\\n\\t\\tretract($root);\\nend\\n\\nrule \\\"child_handle_Rule\\\"\\nsalience 100\\nno-loop true\\n    when\\n        $child : VesAlarm(alarmIsCleared == 1, rootFlag == 0)\\n    then\\n\\t\\tDroolsLog.printInfo(\\\"===========================================================\\\");\\n\\t\\tDroolsLog.printInfo(\\\"child_handle_Rule: childId=\\\" + $child.getEventId());\\n\\t\\tretract($child);\\nend\"\n        msb.hostname:\n         get_input: msb_hostname\n        msb.uri: /api/microservices/v1/services\n        services_calls: {}\n        streams_publishes: {}\n        streams_subscribes: {}\n      image: { get_input: hr_image }\n      #service_component_type: dcae-analytics-holmes-rule-management\n      resource_config:\n        limits:\n          cpu:\n            get_input: dcae-analytics-holmes-rule-mgt_cpu_limit\n          memory:\n            get_input: dcae-analytics-holmes-rule-mgt_memory_limit\n        requests:\n          cpu:\n            get_input: dcae-analytics-holmes-rule-mgt_cpu_request\n          memory:\n            get_input: dcae-analytics-holmes-rule-mgt_memory_request\n    relationships:\n    - type: cloudify.relationships.depends_on\n      target: pgaasvm\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"bde3635b-cbcf-4d21-b505-7f1e4d8a9b59","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/bde3635b-cbcf-4d21-b505-7f1e4d8a9b59"},"created":1622333396232,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-hv-ves","typeVersion":2105301209,"blueprintTemplate":"# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START========================================================\n# =================================================================================\n# Copyright (C) 2018-2019 NOKIA\n# Modifications copyright (c) 2020 AT&T Intellectual Property.  All Rights Reserved\n# =================================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END==========================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  tag_version:\n    type: string\n    default: 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.6.0'\n  service_component_type:\n    type: string\n    default: 'dcae-hv-ves-collector'\n  service_id:\n    type: string\n    default: \"dcae-hv-ves-collector\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  host_port:\n    type: integer\n    description: Network port that the platform service is expecting to expose on the host\n    default: 30222\n  container_port:\n    type: integer\n    description: Network port that the platform service exposes in the container\n    default: 6061\n  kafka_bootstrap_servers:\n    type: string\n    default: 'message-router-kafka:9092'\n  kafka_username:\n    type: string\n    default: 'admin'\n  kafka_password:\n    type: string\n    default: 'admin_secret'\n  perf3gpp_kafka_topic:\n    type: string\n    default: 'HV_VES_PERF3GPP'\n  log_level:\n    type: string\n    default: 'INFO'\n  server_idle_timeout_sec:\n    type: integer\n    default: 300\n  cbs_request_interval_sec:\n    type: integer\n    default: 5\n  security_ssl_disable:\n    type: boolean\n    default: false\n  security_keys_key_store_file:\n    type: string\n    default: '/etc/ves-hv/ssl/cert.jks'\n  security_keys_key_store_password_file:\n    type: string\n    default: '/etc/ves-hv/ssl/jks.pass'\n  security_keys_trust_store_file:\n    type: string\n    default: '/etc/ves-hv/ssl/trust.jks'\n  security_keys_trust_store_password_file:\n    type: string\n    default: '/etc/ves-hv/ssl/trust.pass'\n  use_tls:\n    type: boolean\n    default: true\n  service_component_name_override:\n    type: string\n    default: \"dcae-hv-ves-collector\"\n  external_cert_cert_type:\n    type: string\n    description: Output type\n    default: \"JKS\"\n  external_cert_ca_name:\n    type: string\n    description: Name of Certificate Authority configured on CertService side.\n    default: \"RA\"\n  external_cert_common_name:\n    type: string\n    description: Common name which should be present in certificate.\n    default: \"dcae-hv-ves-collector\"\n  external_cert_sans:\n    type: string\n    description: \"List of Subject Alternative Names (SANs) which should be present\n      in certificate. Delimiter - , Should contain common_name value and other FQDNs\n      under which given component is accessible.\"\n    default: \"dcae-hv-ves-collector,hv-ves-collector,hv-ves\"\n  external_cert_use_external_tls:\n    type: boolean\n    description: Flag to indicate external tls enable/disable.\n    default: false\nnode_templates:\n  hv-ves:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              JAVA_OPTS: { concat: [ '-Dlogback.configurationFile=/etc/ONAP/', { get_input: service_component_type }, '/logback.xml' ] }\n    properties:\n      application_config:\n        logLevel: { get_input: log_level }\n        server.idleTimeoutSec: { get
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 13675  100  6973  100  6702   252k   242k --:--:-- --:--:-- --:--:--  494k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-kpi-ms.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-kpi-ms.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-kpi-ms.yaml .yaml
++ flatten /blueprints/k8s-kpi-ms.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='\n #\n #============LICENSE_START=======================================================\n #Copyright (C) 2021 China Mobile.\n #==============================================================================\n #Licensed under the Apache License, Version 2.0 (the \"License\");\n #you may not use this file except in compliance with the License.\n #You may obtain a copy of the License at\n #\n #    http://www.apache.org/licenses/LICENSE-2.0\n #\n #Unless required by applicable law or agreed to in writing, software\n #distributed under the License is distributed on an \"AS IS\" BASIS,\n #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n #See the License for the specific language governing permissions and\n #limitations under the License.\n #============LICENSE_END=========================================================\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - '\''http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'\''\n  - plugin:dmaap?version=1.5.0\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  replicas:\n    type: integer\n    description: replica count for deployment\n    default: 1\n  tag_version:\n    type: string\n    description: docker image name and version\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.kpi-ms:1.0.0\"\n  aaf_username:\n    type: string\n    description: aaf username\n    default: \"dcae@dcae.onap.org\"\n  aaf_password:\n    type: string\n    description: aaf password\n    default: \"demo123456!\"\n  dmaap_polling_interval:\n    type: integer\n    description: dmaap polling interval\n    default: 20\n  cbs_polling_interval:\n    type: integer\n    description: cbs polling interval\n    default: 60\n  dmaap_polling_timeout:\n    type: integer\n    description: dmaap polling timeout\n    default: 60\n  dmaap:\n    type: string\n    description: dmaap server\n    default: \"message-router\"\n  cg:\n    type: string\n    description: consumer group\n    default: \"kpi-cg\"\n  cid:\n    type: string\n    description: consumer id\n    default: \"kpi-cid\"\n  log_path:\n    type: string\n    description: log location in host\n    default: \"/dockerdata-nfs/kpi-ms\"\n  performance_management_topic_url:\n    type: string\n    description: performance measurement topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS\"\n  dcae_kpi_topic_url:\n    type: string\n    description: dcae control loop topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_KPI_OUTPUT\"\nnode_templates:\n  kpims:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              STANDALONE: \"false\"\n            ports:\n              - \"8080:0\"\n            volumes:\n              - host:\n                  path: { get_input: log_path }\n                container:\n                  bind: /home/kpims/logs\n                  mode: rw\n    properties:\n      image:\n        get_input: tag_version\n      service_component_type: '\''dcae-kpi-ms'\''\n      service_id: '\''kpims'\''\n      service_component_name_override: '\''dcae-kpi-ms'\''\n      always_pull_image: true\n      replicas: {get_input: replicas}\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      tls_info:\n        cert_directory: '\''/opt/app/kpims/etc/cert/'\''\n        use_tls: true\n      application_config:\n        aafUsername: { get_input: aaf_username }\n        aafPassword: { get_input: aaf_password }\n        trust_store_path: '\''/opt/app/kpims/etc/cert/trust.jks'\''\n        trust_store_pass_path: '\''/opt/app/kpims/etc/cert/trust.pass'\''\n        streams_subscribes:\n          performance_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: performance_management_topic_url }\n            type: message-router\n        streams_publishes:\n          kpi_topic:\n            dmaap_info:\n              topic_url: { get_input: dcae_kpi_topic_url }\n            type: message-router\n        pollingInterval: { get_input: dmaap_polling_interval}\n        pollingTimeout: { get_input: dmaap_polling_timeout }\n        cbsPollingInterval: { get_input: cbs_polling_interval }\n        dmaap.server:\n          - { get_input: dmaap }\n        cg: { get_input: cg }\n        cid: { get_input: cid }\n        kpi.policy:\n          '\''{\"domain\":\"measurementsForKpi\",\"methodForKpi\":[{\"eventName\":\"perf3gpp_CORE-AMF_pmMeasResult\",\"controlLoopSchemaType\":\"SLICE\",\"policyScope\":\"resource=networkSlice;type=configuration\",\"policyName\":\"configuration.dcae.microservice.kpi-computation\",\"policyVersion\":\"v0.0.1\",\"kpis\":[{\"measType\":\"AMFRegNbr\",\"operation\":\"SUM\",\"operands\":\"RM.RegisteredSubNbrMean\"}]},{\"eventName\":\"perf3gpp_CORE-UPF_pmMeasResult\",\"controlLoopSchemaType\":\"SLICE\",\"policyScope\":\"resource=networkSlice;type=configuration\",\"policyName\":\"configuration.dcae.microservice.kpi-computation\",\"policyVersion\":\"v0.0.1\",\"kpis\":[{\"measType\":\"UpstreamThr\",\"operation\":\"SUM\",\"operands\":\"GTP.InDataOctN3UPF\"},{\"measType\":\"DownstreamThr\",\"operation\":\"SUM\",\"operands\":\"GTP.OutDataOctN3UPF\"}]}]}'\''\n\n'
++ echo '\n #\n #============LICENSE_START=======================================================\n #Copyright (C) 2021 China Mobile.\n #==============================================================================\n #Licensed under the Apache License, Version 2.0 (the \"License\");\n #you may not use this file except in compliance with the License.\n #You may obtain a copy of the License at\n #\n #    http://www.apache.org/licenses/LICENSE-2.0\n #\n #Unless required by applicable law or agreed to in writing, software\n #distributed under the License is distributed on an \"AS IS\" BASIS,\n #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n #See the License for the specific language governing permissions and\n #limitations under the License.\n #============LICENSE_END=========================================================\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - '\''http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'\''\n  - plugin:dmaap?version=1.5.0\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  replicas:\n    type: integer\n    description: replica count for deployment\n    default: 1\n  tag_version:\n    type: string\n    description: docker image name and version\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.kpi-ms:1.0.0\"\n  aaf_username:\n    type: string\n    description: aaf username\n    default: \"dcae@dcae.onap.org\"\n  aaf_password:\n    type: string\n    description: aaf password\n    default: \"demo123456!\"\n  dmaap_polling_interval:\n    type: integer\n    description: dmaap polling interval\n    default: 20\n  cbs_polling_interval:\n    type: integer\n    description: cbs polling interval\n    default: 60\n  dmaap_polling_timeout:\n    type: integer\n    description: dmaap polling timeout\n    default: 60\n  dmaap:\n    type: string\n    description: dmaap server\n    default: \"message-router\"\n  cg:\n    type: string\n    description: consumer group\n    default: \"kpi-cg\"\n  cid:\n    type: string\n    description: consumer id\n    default: \"kpi-cid\"\n  log_path:\n    type: string\n    description: log location in host\n    default: \"/dockerdata-nfs/kpi-ms\"\n  performance_management_topic_url:\n    type: string\n    description: performance measurement topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS\"\n  dcae_kpi_topic_url:\n    type: string\n    description: dcae control loop topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_KPI_OUTPUT\"\nnode_templates:\n  kpims:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              STANDALONE: \"false\"\n            ports:\n              - \"8080:0\"\n            volumes:\n              - host:\n                  path: { get_input: log_path }\n                container:\n                  bind: /home/kpims/logs\n                  mode: rw\n    properties:\n      image:\n        get_input: tag_version\n      service_component_type: '\''dcae-kpi-ms'\''\n      service_id: '\''kpims'\''\n      service_component_name_override: '\''dcae-kpi-ms'\''\n      always_pull_image: true\n      replicas: {get_input: replicas}\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      tls_info:\n        cert_directory: '\''/opt/app/kpims/etc/cert/'\''\n        use_tls: true\n      application_config:\n        aafUsername: { get_input: aaf_username }\n        aafPassword: { get_input: aaf_password }\n        trust_store_path: '\''/opt/app/kpims/etc/cert/trust.jks'\''\n        trust_store_pass_path: '\''/opt/app/kpims/etc/cert/trust.pass'\''\n        streams_subscribes:\n          performance_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: performance_management_topic_url }\n            type: message-router\n        streams_publishes:\n          kpi_topic:\n            dmaap_info:\n              topic_url: { get_input: dcae_kpi_topic_url }\n            type: message-router\n        pollingInterval: { get_input: dmaap_polling_interval}\n        pollingTimeout: { get_input: dmaap_polling_timeout }\n        cbsPollingInterval: { get_input: cbs_polling_interval }\n        dmaap.server:\n          - { get_input: dmaap }\n        cg: { get_input: cg }\n        cid: { get_input: cid }\n        kpi.policy:\n          '\''{\"domain\":\"measurementsForKpi\",\"methodForKpi\":[{\"eventName\":\"perf3gpp_CORE-AMF_pmMeasResult\",\"controlLoopSchemaType\":\"SLICE\",\"policyScope\":\"resource=networkSlice;type=configuration\",\"policyName\":\"configuration.dcae.microservice.kpi-computation\",\"policyVersion\":\"v0.0.1\",\"kpis\":[{\"measType\":\"AMFRegNbr\",\"operation\":\"SUM\",\"operands\":\"RM.RegisteredSubNbrMean\"}]},{\"eventName\":\"perf3gpp_CORE-UPF_pmMeasResult\",\"controlLoopSchemaType\":\"SLICE\",\"policyScope\":\"resource=networkSlice;type=configuration\",\"policyName\":\"configuration.dcae.microservice.kpi-computation\",\"policyVersion\":\"v0.0.1\",\"kpis\":[{\"measType\":\"UpstreamThr\",\"operation\":\"SUM\",\"operands\":\"GTP.InDataOctN3UPF\"},{\"measType\":\"DownstreamThr\",\"operation\":\"SUM\",\"operands\":\"GTP.OutDataOctN3UPF\"}]}]}'\''\n\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-kpi-ms",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "\n #\n #============LICENSE_START=======================================================\n #Copyright (C) 2021 China Mobile.\n #==============================================================================\n #Licensed under the Apache License, Version 2.0 (the \"License\");\n #you may not use this file except in compliance with the License.\n #You may obtain a copy of the License at\n #\n #    http://www.apache.org/licenses/LICENSE-2.0\n #\n #Unless required by applicable law or agreed to in writing, software\n #distributed under the License is distributed on an \"AS IS\" BASIS,\n #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n #See the License for the specific language governing permissions and\n #limitations under the License.\n #============LICENSE_END=========================================================\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - '\''http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'\''\n  - plugin:dmaap?version=1.5.0\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  replicas:\n    type: integer\n    description: replica count for deployment\n    default: 1\n  tag_version:\n    type: string\n    description: docker image name and version\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.kpi-ms:1.0.0\"\n  aaf_username:\n    type: string\n    description: aaf username\n    default: \"dcae@dcae.onap.org\"\n  aaf_password:\n    type: string\n    description: aaf password\n    default: \"demo123456!\"\n  dmaap_polling_interval:\n    type: integer\n    description: dmaap polling interval\n    default: 20\n  cbs_polling_interval:\n    type: integer\n    description: cbs polling interval\n    default: 60\n  dmaap_polling_timeout:\n    type: integer\n    description: dmaap polling timeout\n    default: 60\n  dmaap:\n    type: string\n    description: dmaap server\n    default: \"message-router\"\n  cg:\n    type: string\n    description: consumer group\n    default: \"kpi-cg\"\n  cid:\n    type: string\n    description: consumer id\n    default: \"kpi-cid\"\n  log_path:\n    type: string\n    description: log location in host\n    default: \"/dockerdata-nfs/kpi-ms\"\n  performance_management_topic_url:\n    type: string\n    description: performance measurement topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS\"\n  dcae_kpi_topic_url:\n    type: string\n    description: dcae control loop topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_KPI_OUTPUT\"\nnode_templates:\n  kpims:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              STANDALONE: \"false\"\n            ports:\n              - \"8080:0\"\n            volumes:\n              - host:\n                  path: { get_input: log_path }\n                container:\n                  bind: /home/kpims/logs\n                  mode: rw\n    properties:\n      image:\n        get_input: tag_version\n      service_component_type: '\''dcae-kpi-ms'\''\n      service_id: '\''kpims'\''\n      service_component_name_override: '\''dcae-kpi-ms'\''\n      always_pull_image: true\n      replicas: {get_input: replicas}\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      tls_info:\n        cert_directory: '\''/opt/app/kpims/etc/cert/'\''\n        use_tls: true\n      application_config:\n        aafUsername: { get_input: aaf_username }\n        aafPassword: { get_input: aaf_password }\n        trust_store_path: '\''/opt/app/kpims/etc/cert/trust.jks'\''\n        trust_store_pass_path: '\''/opt/app/kpims/etc/cert/trust.pass'\''\n        streams_subscribes:\n          performance_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: performance_management_topic_url }\n            type: message-router\n        streams_publishes:\n          kpi_topic:\n            dmaap_info:\n              topic_url: { get_input: dcae_kpi_topic_url }\n            type: message-router\n        pollingInterval: { get_input: dmaap_polling_interval}\n        pollingTimeout: { get_input: dmaap_polling_timeout }\n        cbsPollingInterval: { get_input: cbs_polling_interval }\n        dmaap.server:\n          - { get_input: dmaap }\n        cg: { get_input: cg }\n        cid: { get_input: cid }\n        kpi.policy:\n          '\''{\"domain\":\"measurementsForKpi\",\"methodForKpi\":[{\"eventName\":\"perf3gpp_CORE-AMF_pmMeasResult\",\"controlLoopSchemaType\":\"SLICE\",\"policyScope\":\"resource=networkSlice;type=configuration\",\"policyName\":\"configuration.dcae.microservice.kpi-computation\",\"policyVersion\":\"v0.0.1\",\"kpis\":[{\"measType\":\"AMFRegNbr\",\"operation\":\"SUM\",\"operands\":\"RM.RegisteredSubNbrMean\"}]},{\"eventName\":\"perf3gpp_CORE-UPF_pmMeasResult\",\"controlLoopSchemaType\":\"SLICE\",\"policyScope\":\"resource=networkSlice;type=configuration\",\"policyName\":\"configuration.dcae.microservice.kpi-computation\",\"policyVersion\":\"v0.0.1\",\"kpis\":[{\"measType\":\"UpstreamThr\",\"operation\":\"SUM\",\"operands\":\"GTP.InDataOctN3UPF\"},{\"measType\":\"DownstreamThr\",\"operation\":\"SUM\",\"operands\":\"GTP.OutDataOctN3UPF\"}]}]}'\''\n\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 11677  100  5974  100  5703   208k   198k --:--:-- --:--:-- --:--:--  407k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-pgaas-initdb.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-pgaas-initdb.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-pgaas-initdb.yaml .yaml
++ flatten /blueprints/k8s-pgaas-initdb.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# org.onap.dcae\n# =============================================================================\n# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\ndescription: |-\n  This blueprint is used to take control of a postgres server instance for use by cloudify-managed applications.\n  This blueprint depends upon the deployment of the pgaas_plugin and an existing postgres server instance.\n  This blueprint is part of a suite of three blueprints:\n  k8s-pgaas-initdb takes control of the postgres server instance.\n  k8s-pgaas-database creates a database, roles and credentials associated with the database.\n  k8s-pgaas-getdbinfo shows how an application can access a database (including its roles and credentials) that was already created with k8s-pgaas-database.\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:relationshipplugin?version=1.1.0\n  - plugin:sshkeyshare?version=1.2.0\n  - plugin:pgaas?version=1.3.0\n\ninputs:\n  blueprint_version:\n    type: string\n    default: '\''2018-04-27T00:31:38+0000'\''\n\n  pgaas_cluster_name:\n    type: string\n    default: pghelm\n\n  k8s_pgaas_instance_fqdn:\n    type: string\n\n  k8s_initial_password:\n    type: string\n    default: '\'''\''\n\nnode_templates:\n\n  # tie to pgaas_plugin database\n  pgaas_cluster:\n    type: dcae.nodes.pgaas.cluster\n    properties:\n      writerfqdn: { get_input: k8s_pgaas_instance_fqdn }\n      readerfqdn: { get_input: k8s_pgaas_instance_fqdn }\n      initialpassword: { get_input: k8s_initial_password }\n    relationships:\n      - type: dcae.relationships.pgaas_cluster_uses_sshkeypair\n        target: sharedsshkey_pgrs\n\n  sharedsshkey_pgrs:\n    type: dcaegen2.nodes.ssh.keypair\n\n\noutputs:\n  blueprint_version:\n    value: { get_input: blueprint_version }\n'
++ echo '# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# org.onap.dcae\n# =============================================================================\n# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\ndescription: |-\n  This blueprint is used to take control of a postgres server instance for use by cloudify-managed applications.\n  This blueprint depends upon the deployment of the pgaas_plugin and an existing postgres server instance.\n  This blueprint is part of a suite of three blueprints:\n  k8s-pgaas-initdb takes control of the postgres server instance.\n  k8s-pgaas-database creates a database, roles and credentials associated with the database.\n  k8s-pgaas-getdbinfo shows how an application can access a database (including its roles and credentials) that was already created with k8s-pgaas-database.\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:relationshipplugin?version=1.1.0\n  - plugin:sshkeyshare?version=1.2.0\n  - plugin:pgaas?version=1.3.0\n\ninputs:\n  blueprint_version:\n    type: string\n    default: '\''2018-04-27T00:31:38+0000'\''\n\n  pgaas_cluster_name:\n    type: string\n    default: pghelm\n\n  k8s_pgaas_instance_fqdn:\n    type: string\n\n  k8s_initial_password:\n    type: string\n    default: '\'''\''\n\nnode_templates:\n\n  # tie to pgaas_plugin database\n  pgaas_cluster:\n    type: dcae.nodes.pgaas.cluster\n    properties:\n      writerfqdn: { get_input: k8s_pgaas_instance_fqdn }\n      readerfqdn: { get_input: k8s_pgaas_instance_fqdn }\n      initialpassword: { get_input: k8s_initial_password }\n    relationships:\n      - type: dcae.relationships.pgaas_cluster_uses_sshkeypair\n        target: sharedsshkey_pgrs\n\n  sharedsshkey_pgrs:\n    type: dcaegen2.nodes.ssh.keypair\n\n\noutputs:\n  blueprint_version:\n    value: { get_input: blueprint_version }\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-pgaas-initdb",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# org.onap.dcae\n# =============================================================================\n# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\ndescription: |-\n  This blueprint is used to take control of a postgres server instance for use by cloudify-managed applications.\n  This blueprint depends upon the deployment of the pgaas_plugin and an existing postgres server instance.\n  This blueprint is part of a suite of three blueprints:\n  k8s-pgaas-initdb takes control of the postgres server instance.\n  k8s-pgaas-database creates a database, roles and credentials associated with the database.\n  k8s-pgaas-getdbinfo shows how an application can access a database (including its roles and credentials) that was already created with k8s-pgaas-database.\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:relationshipplugin?version=1.1.0\n  - plugin:sshkeyshare?version=1.2.0\n  - plugin:pgaas?version=1.3.0\n\ninputs:\n  blueprint_version:\n    type: string\n    default: '\''2018-04-27T00:31:38+0000'\''\n\n  pgaas_cluster_name:\n    type: string\n    default: pghelm\n\n  k8s_pgaas_instance_fqdn:\n    type: string\n\n  k8s_initial_password:\n    type: string\n    default: '\'''\''\n\nnode_templates:\n\n  # tie to pgaas_plugin database\n  pgaas_cluster:\n    type: dcae.nodes.pgaas.cluster\n    properties:\n      writerfqdn: { get_input: k8s_pgaas_instance_fqdn }\n      readerfqdn: { get_input: k8s_pgaas_instance_fqdn }\n      initialpassword: { get_input: k8s_initial_password }\n    relationships:\n      - type: dcae.relationships.pgaas_cluster_uses_sshkeypair\n        target: sharedsshkey_pgrs\n\n  sharedsshkey_pgrs:\n    type: dcaegen2.nodes.ssh.keypair\n\n\noutputs:\n  blueprint_version:\n    value: { get_input: blueprint_version }\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  6097  100  3184  100  2913   124k   113k --:--:-- --:--:-- --:--:--  238k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-pm-mapper.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-pm-mapper.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-pm-mapper.yaml .yaml
++ flatten /blueprints/k8s-pm-mapper.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='#\n# ============LICENSE_START=======================================================\n#  Copyright (C) 2019-2020 Nordix Foundation.\n#  Copyright (C) 2020 Nokia\n# ================================================================================\n# Licensed under the Apache License, Version 2.0 (the '\''License'\'');\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an '\''AS IS'\'' BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n# ============LICENSE_END=========================================================\n#\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - '\''http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'\''\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:dmaap?version=1.5.0\n\ninputs:\n  filter:\n    type: string\n    description: PM Mapper filter on measInfo, measInfoId, measType, instanceId\n    default: \"{ \\\"filters\\\":[] }\"\n  enable_http:\n    type: boolean\n    description: Option to turn on HTTP connections\n    default: false\n  tag_version:\n    type: string\n    description: Docker image to be used\n    default: '\''nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:1.5.2'\''\n  replicas:\n    type: integer\n    description: Number of instances\n    default: 1\n  feed_name:\n    type: string\n    default: '\''bulk_pm_feed'\''\n  topic_name:\n    type: string\n    default: '\''PERFORMANCE_MEASUREMENTS'\''\n  client_role:\n    type: string\n    description: Client role to request secure access to topic\n    default: '\''org.onap.dcae.pmPublisher'\''\n  client_id:\n    type: string\n    description: Client id for given AAF client\n    default: '\''dcae@dcae.onap.org'\''\n  client_password:\n    type: string\n    description: Password for AAF client provided as client_id\n    default: '\''demo123456!'\''\n  dmaap_dr_username:\n    type: string\n    description: DMAAP Data Router user name\n    default: '\''username'\''\n  dmaap_dr_password:\n    type: string\n    description: DMAAP Data Router password\n    default: '\''password'\''\n  dcae_location:\n    type: string\n    description: DCAE location for the subscriber, used to set up routing\n    default: '\''san-francisco'\''\n  pm_mapper_service_protocol:\n    type: string\n    description: PM Mapper protocol\n    default: '\''https'\''\n  pm_mapper_service_port:\n    type: string\n    description: PM Mapper host port\n    default: '\''8443'\''\n  dmaap_dr_service_host:\n    type: string\n    description: DMAAP Data Router host address\n    default: '\''dmaap-dr-node'\''\n  dmaap_dr_service_port:\n    type: string\n    description: DMAAP Data Router host port\n    default: '\''8443'\''\n  dmaap_mr_service_protocol:\n    type: string\n    description: DMAAP Message Router protocol\n    default: '\''https'\''\n  dmaap_mr_service_host:\n    type: string\n    description: DMAAP Message Router host address\n    default: '\''message-router'\''\n  dmaap_mr_service_port:\n    type: string\n    description: DMAAP Message Router host port\n    default: '\''3905'\''\n  cpu_limit:\n    type: string\n    default: '\''1000m'\''\n  cpu_request:\n    type: string\n    default: '\''1000m'\''\n  memory_limit:\n    type: string\n    default: '\''1024Mi'\''\n  memory_request:\n    type: string\n    default: '\''1024Mi'\''\n\nnode_templates:\n  pm-feed:\n    type: dcaegen2.nodes.Feed\n    properties:\n      feed_name: { get_input: feed_name }\n      useExisting: true\n\n  pm-topic:\n    type: dcaegen2.nodes.Topic\n    properties:\n      topic_name: { get_input: topic_name }\n\n  pm-mapper:\n    type: dcae.nodes.ContainerizedServiceComponentUsingDmaap\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        create:\n          inputs:\n            ports:\n              - '\''8443:0'\''\n              - '\''8081:0'\''\n\n    relationships:\n      - type: dcaegen2.relationships.subscribe_to_files\n        target: pm-feed\n      - type: dcaegen2.relationships.publish_events\n        target: pm-topic\n\n    properties:\n      service_component_type: '\''dcae-pm-mapper'\''\n      service_component_name_override: '\''dcae-pm-mapper'\''\n      application_config:\n        trust_store_path: '\''/opt/app/pm-mapper/etc/cert/trust.jks'\''\n        trust_store_pass_path: '\''/opt/app/pm-mapper/etc/cert/trust.pass'\''\n        key_store_path: '\''/opt/app/pm-mapper/etc/cert/cert.jks'\''\n        key_store_pass_path: '\''/opt/app/pm-mapper/etc/cert/jks.pass'\''\n        pm-mapper-filter: { get_input: filter }\n        enable_http: { get_input: enable_http }\n        dmaap_dr_delete_endpoint: { concat: ['\''https://'\'',{ get_input: dmaap_dr_service_host },'\'':'\'',{ get_input: dmaap_dr_service_port },'\''/delete'\''] }\n        aaf_identity: { get_input: client_id }\n        aaf_password: { get_input: client_password }\n        streams_subscribes:\n          dmaap_subscriber:\n            type: data_router\n            dmaap_info: <>\n        streams_publishes:\n          dmaap_publisher:\n            type: message_router\n            dmaap_info: <>\n      resource_config:\n        limits:\n          cpu: { get_input: cpu_limit }\n          memory: { get_input: memory_limit }\n        requests:\n          cpu: { get_input: cpu_request }\n          memory: { get_input: memory_request }\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: https\n      streams_publishes:\n        - name: pm-topic\n          location: { get_input: dcae_location }\n          client_role: { get_input: client_role }\n          type: message-router\n      streams_subscribes:\n        - name: pm-feed\n          location: { get_input: dcae_location }\n          client_role: { get_input: client_role }\n          username: { get_input: dmaap_dr_username }\n          password: { get_input: dmaap_dr_password }\n          scheme: { get_input: pm_mapper_service_protocol }\n          route: delivery\n          delivery_url: '\'''\''\n          privileged: true\n          decompress: true\n          type: data_router\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      log_info:\n        log_directory: '\''/var/log/ONAP/dcaegen2/services/pm-mapper'\''\n      tls_info:\n        cert_directory: '\''/opt/app/pm-mapper/etc/cert/'\''\n        use_tls: true\n'
++ echo '#\n# ============LICENSE_START=======================================================\n#  Copyright (C) 2019-2020 Nordix Foundation.\n#  Copyright (C) 2020 Nokia\n# ================================================================================\n# Licensed under the Apache License, Version 2.0 (the '\''License'\'');\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an '\''AS IS'\'' BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n# ============LICENSE_END=========================================================\n#\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - '\''http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'\''\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:dmaap?version=1.5.0\n\ninputs:\n  filter:\n    type: string\n    description: PM Mapper filter on measInfo, measInfoId, measType, instanceId\n    default: \"{ \\\"filters\\\":[] }\"\n  enable_http:\n    type: boolean\n    description: Option to turn on HTTP connections\n    default: false\n  tag_version:\n    type: string\n    description: Docker image to be used\n    default: '\''nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:1.5.2'\''\n  replicas:\n    type: integer\n    description: Number of instances\n    default: 1\n  feed_name:\n    type: string\n    default: '\''bulk_pm_feed'\''\n  topic_name:\n    type: string\n    default: '\''PERFORMANCE_MEASUREMENTS'\''\n  client_role:\n    type: string\n    description: Client role to request secure access to topic\n    default: '\''org.onap.dcae.pmPublisher'\''\n  client_id:\n    type: string\n    description: Client id for given AAF client\n    default: '\''dcae@dcae.onap.org'\''\n  client_password:\n    type: string\n    description: Password for AAF client provided as client_id\n    default: '\''demo123456!'\''\n  dmaap_dr_username:\n    type: string\n    description: DMAAP Data Router user name\n    default: '\''username'\''\n  dmaap_dr_password:\n    type: string\n    description: DMAAP Data Router password\n    default: '\''password'\''\n  dcae_location:\n    type: string\n    description: DCAE location for the subscriber, used to set up routing\n    default: '\''san-francisco'\''\n  pm_mapper_service_protocol:\n    type: string\n    description: PM Mapper protocol\n    default: '\''https'\''\n  pm_mapper_service_port:\n    type: string\n    description: PM Mapper host port\n    default: '\''8443'\''\n  dmaap_dr_service_host:\n    type: string\n    description: DMAAP Data Router host address\n    default: '\''dmaap-dr-node'\''\n  dmaap_dr_service_port:\n    type: string\n    description: DMAAP Data Router host port\n    default: '\''8443'\''\n  dmaap_mr_service_protocol:\n    type: string\n    description: DMAAP Message Router protocol\n    default: '\''https'\''\n  dmaap_mr_service_host:\n    type: string\n    description: DMAAP Message Router host address\n    default: '\''message-router'\''\n  dmaap_mr_service_port:\n    type: string\n    description: DMAAP Message Router host port\n    default: '\''3905'\''\n  cpu_limit:\n    type: string\n    default: '\''1000m'\''\n  cpu_request:\n    type: string\n    default: '\''1000m'\''\n  memory_limit:\n    type: string\n    default: '\''1024Mi'\''\n  memory_request:\n    type: string\n    default: '\''1024Mi'\''\n\nnode_templates:\n  pm-feed:\n    type: dcaegen2.nodes.Feed\n    properties:\n      feed_name: { get_input: feed_name }\n      useExisting: true\n\n  pm-topic:\n    type: dcaegen2.nodes.Topic\n    properties:\n      topic_name: { get_input: topic_name }\n\n  pm-mapper:\n    type: dcae.nodes.ContainerizedServiceComponentUsingDmaap\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        create:\n          inputs:\n            ports:\n              - '\''8443:0'\''\n              - '\''8081:0'\''\n\n    relationships:\n      - type: dcaegen2.relationships.subscribe_to_files\n        target: pm-feed\n      - type: dcaegen2.relationships.publish_events\n        target: pm-topic\n\n    properties:\n      service_component_type: '\''dcae-pm-mapper'\''\n      service_component_name_override: '\''dcae-pm-mapper'\''\n      application_config:\n        trust_store_path: '\''/opt/app/pm-mapper/etc/cert/trust.jks'\''\n        trust_store_pass_path: '\''/opt/app/pm-mapper/etc/cert/trust.pass'\''\n        key_store_path: '\''/opt/app/pm-mapper/etc/cert/cert.jks'\''\n        key_store_pass_path: '\''/opt/app/pm-mapper/etc/cert/jks.pass'\''\n        pm-mapper-filter: { get_input: filter }\n        enable_http: { get_input: enable_http }\n        dmaap_dr_delete_endpoint: { concat: ['\''https://'\'',{ get_input: dmaap_dr_service_host },'\'':'\'',{ get_input: dmaap_dr_service_port },'\''/delete'\''] }\n        aaf_identity: { get_input: client_id }\n        aaf_password: { get_input: client_password }\n        streams_subscribes:\n          dmaap_subscriber:\n            type: data_router\n            dmaap_info: <>\n        streams_publishes:\n          dmaap_publisher:\n            type: message_router\n            dmaap_info: <>\n      resource_config:\n        limits:\n          cpu: { get_input: cpu_limit }\n          memory: { get_input: memory_limit }\n        requests:\n          cpu: { get_input: cpu_request }\n          memory: { get_input: memory_request }\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: https\n      streams_publishes:\n        - name: pm-topic\n          location: { get_input: dcae_location }\n          client_role: { get_input: client_role }\n          type: message-router\n      streams_subscribes:\n        - name: pm-feed\n          location: { get_input: dcae_location }\n          client_role: { get_input: client_role }\n          username: { get_input: dmaap_dr_username }\n          password: { get_input: dmaap_dr_password }\n          scheme: { get_input: pm_mapper_service_protocol }\n          route: delivery\n          delivery_url: '\'''\''\n          privileged: true\n          decompress: true\n          type: data_router\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      log_info:\n        log_directory: '\''/var/log/ONAP/dcaegen2/services/pm-mapper'\''\n      tls_info:\n        cert_directory: '\''/opt/app/pm-mapper/etc/cert/'\''\n        use_tls: true\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-pm-mapper",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "#\n# ============LICENSE_START=======================================================\n#  Copyright (C) 2019-2020 Nordix Foundation.\n#  Copyright (C) 2020 Nokia\n# ================================================================================\n# Licensed under the Apache License, Version 2.0 (the '\''License'\'');\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an '\''AS IS'\'' BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n# ============LICENSE_END=========================================================\n#\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - '\''http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'\''\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:dmaap?version=1.5.0\n\ninputs:\n  filter:\n    type: string\n    description: PM Mapper filter on measInfo, measInfoId, measType, instanceId\n    default: \"{ \\\"filters\\\":[] }\"\n  enable_http:\n    type: boolean\n    description: Option to turn on HTTP connections\n    default: false\n  tag_version:\n    type: string\n    description: Docker image to be used\n    default: '\''nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:1.5.2'\''\n  replicas:\n    type: integer\n    description: Number of instances\n    default: 1\n  feed_name:\n    type: string\n    default: '\''bulk_pm_feed'\''\n  topic_name:\n    type: string\n    default: '\''PERFORMANCE_MEASUREMENTS'\''\n  client_role:\n    type: string\n    description: Client role to request secure access to topic\n    default: '\''org.onap.dcae.pmPublisher'\''\n  client_id:\n    type: string\n    description: Client id for given AAF client\n    default: '\''dcae@dcae.onap.org'\''\n  client_password:\n    type: string\n    description: Password for AAF client provided as client_id\n    default: '\''demo123456!'\''\n  dmaap_dr_username:\n    type: string\n    description: DMAAP Data Router user name\n    default: '\''username'\''\n  dmaap_dr_password:\n    type: string\n    description: DMAAP Data Router password\n    default: '\''password'\''\n  dcae_location:\n    type: string\n    description: DCAE location for the subscriber, used to set up routing\n    default: '\''san-francisco'\''\n  pm_mapper_service_protocol:\n    type: string\n    description: PM Mapper protocol\n    default: '\''https'\''\n  pm_mapper_service_port:\n    type: string\n    description: PM Mapper host port\n    default: '\''8443'\''\n  dmaap_dr_service_host:\n    type: string\n    description: DMAAP Data Router host address\n    default: '\''dmaap-dr-node'\''\n  dmaap_dr_service_port:\n    type: string\n    description: DMAAP Data Router host port\n    default: '\''8443'\''\n  dmaap_mr_service_protocol:\n    type: string\n    description: DMAAP Message Router protocol\n    default: '\''https'\''\n  dmaap_mr_service_host:\n    type: string\n    description: DMAAP Message Router host address\n    default: '\''message-router'\''\n  dmaap_mr_service_port:\n    type: string\n    description: DMAAP Message Router host port\n    default: '\''3905'\''\n  cpu_limit:\n    type: string\n    default: '\''1000m'\''\n  cpu_request:\n    type: string\n    default: '\''1000m'\''\n  memory_limit:\n    type: string\n    default: '\''1024Mi'\''\n  memory_request:\n    type: string\n    default: '\''1024Mi'\''\n\nnode_templates:\n  pm-feed:\n    type: dcaegen2.nodes.Feed\n    properties:\n      feed_name: { get_input: feed_name }\n      useExisting: true\n\n  pm-topic:\n    type: dcaegen2.nodes.Topic\n    properties:\n      topic_name: { get_input: topic_name }\n\n  pm-mapper:\n    type: dcae.nodes.ContainerizedServiceComponentUsingDmaap\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        create:\n          inputs:\n            ports:\n              - '\''8443:0'\''\n              - '\''8081:0'\''\n\n    relationships:\n      - type: dcaegen2.relationships.subscribe_to_files\n        target: pm-feed\n      - type: dcaegen2.relationships.publish_events\n        target: pm-topic\n\n    properties:\n      service_component_type: '\''dcae-pm-mapper'\''\n      service_component_name_override: '\''dcae-pm-mapper'\''\n      application_config:\n        trust_store_path: '\''/opt/app/pm-mapper/etc/cert/trust.jks'\''\n        trust_store_pass_path: '\''/opt/app/pm-mapper/etc/cert/trust.pass'\''\n        key_store_path: '\''/opt/app/pm-mapper/etc/cert/cert.jks'\''\n        key_store_pass_path: '\''/opt/app/pm-mapper/etc/cert/jks.pass'\''\n        pm-mapper-filter: { get_input: filter }\n        enable_http: { get_input: enable_http }\n        dmaap_dr_delete_endpoint: { concat: ['\''https://'\'',{ get_input: dmaap_dr_service_host },'\'':'\'',{ get_input: dmaap_dr_service_port },'\''/delete'\''] }\n        aaf_identity: { get_input: client_id }\n        aaf_password: { get_input: client_password }\n        streams_subscribes:\n          dmaap_subscriber:\n            type: data_router\n            dmaap_info: <>\n        streams_publishes:\n          dmaap_publisher:\n            type: message_router\n            dmaap_info: <>\n      resource_config:\n        limits:\n          cpu: { get_input: cpu_limit }\n          memory: { get_input: memory_limit }\n        requests:\n          cpu: { get_input: cpu_request }\n          memory: { get_input: memory_request }\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: https\n      streams_publishes:\n        - name: pm-topic\n          location: { get_input: dcae_location }\n          client_role: { get_input: client_role }\n          type: message-router\n      streams_subscribes:\n        - name: pm-feed\n          location: { get_input: dcae_location }\n          client_role: { get_input: client_role }\n          username: { get_input: dmaap_dr_username }\n          password: { get_input: dmaap_dr_password }\n          scheme: { get_input: pm_mapper_service_protocol }\n          route: delivery\n          delivery_url: '\'''\''\n          privileged: true\n          decompress: true\n          type: data_router\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      log_info:\n        log_directory: '\''/var/log/ONAP/dcaegen2/services/pm-mapper'\''\n      tls_info:\n        cert_directory: '\''/opt/app/pm-mapper/etc/cert/'\''\n        use_tls: true\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 13795  100  7033  100  6762   236k   227k --:--:-- --:--:-- --:--:--  449k
_input: server_idle_timeout_sec }\n        server.listenPort: { get_input: container_port }\n        cbs.requestIntervalSec: { get_input: cbs_request_interval_sec}\n        security.sslDisable: { get_input: security_ssl_disable }\n        security.keys.keyStoreFile: { get_input: security_keys_key_store_file }\n        security.keys.keyStorePasswordFile: { get_input: security_keys_key_store_password_file }\n        security.keys.trustStoreFile: { get_input: security_keys_trust_store_file }\n        security.keys.trustStorePasswordFile: { get_input: security_keys_trust_store_password_file }\n        streams_publishes:\n          perf3gpp:\n            type: kafka\n            aaf_credentials:\n              username: { get_input: kafka_username }\n              password: { get_input: kafka_password }\n            kafka_info:\n              bootstrap_servers: { get_input: kafka_bootstrap_servers }\n              topic_name: { get_input: perf3gpp_kafka_topic }\n      docker_config:\n        healthcheck:\n          type: script\n          script: \"/opt/ves-hv-collector/healthcheck.sh\"\n          interval: 15s\n          timeout: 2s\n        ports:\n          - { concat: [ { get_input: container_port }, ':', { get_input: host_port } ] }\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      log_info:\n        log_directory: { concat: [ '/var/log/ONAP/', { get_input: service_component_type } ] }\n      tls_info:\n        cert_directory: '/etc/ves-hv/ssl'\n        use_tls: { get_input: use_tls }\n      external_cert:\n        external_cert_directory: '/etc/ves-hv/ssl'\n        use_external_tls:\n          get_input: external_cert_use_external_tls\n        cert_type:\n          get_input: external_cert_cert_type\n        ca_name:\n          get_input: external_cert_ca_name\n        external_certificate_parameters:\n          common_name:\n            get_input: external_cert_common_name\n          sans:\n            get_input: external_cert_sans\n    type: dcae.nodes.ContainerizedServiceComponent\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"3d3fe740-7e21-4001-bae3-bd3af54e77cf","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/3d3fe740-7e21-4001-bae3-bd3af54e77cf"},"created":1622333396321,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-kpi-ms","typeVersion":2105301209,"blueprintTemplate":"\n #\n #============LICENSE_START=======================================================\n #Copyright (C) 2021 China Mobile.\n #==============================================================================\n #Licensed under the Apache License, Version 2.0 (the \"License\");\n #you may not use this file except in compliance with the License.\n #You may obtain a copy of the License at\n #\n #    http://www.apache.org/licenses/LICENSE-2.0\n #\n #Unless required by applicable law or agreed to in writing, software\n #distributed under the License is distributed on an \"AS IS\" BASIS,\n #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n #See the License for the specific language governing permissions and\n #limitations under the License.\n #============LICENSE_END=========================================================\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - 'http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'\n  - plugin:dmaap?version=1.5.0\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  replicas:\n    type: integer\n    description: replica count for deployment\n    default: 1\n  tag_version:\n    type: string\n    description: docker image name and version\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.kpi-ms:1.0.0\"\n  aaf_username:\n    type: string\n    description: aaf username\n    default: \"dcae@dcae.onap.org\"\n  aaf_password:\n    type: string\n    description: aaf password\n    default: \"demo123456!\"\n  dmaap_polling_interval:\n    type: integer\n    description: dmaap polling interval\n    default: 20\n  cbs_polling_interval:\n    type: integer\n    description: cbs polling interval\n    default: 60\n  dmaap_polling_timeout:\n    type: integer\n    description: dmaap polling timeout\n    default: 60\n  dmaap:\n    type: string\n    description: dmaap server\n    default: \"message-router\"\n  cg:\n    type: string\n    description: consumer group\n    default: \"kpi-cg\"\n  cid:\n    type: string\n    description: consumer id\n    default: \"kpi-cid\"\n  log_path:\n    type: string\n    description: log location in host\n    default: \"/dockerdata-nfs/kpi-ms\"\n  performance_management_topic_url:\n    type: string\n    description: performance measurement topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS\"\n  dcae_kpi_topic_url:\n    type: string\n    description: dcae control loop topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_KPI_OUTPUT\"\nnode_templates:\n  kpims:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              STANDALONE: \"false\"\n            ports:\n              - \"8080:0\"\n            volumes:\n              - host:\n                  path: { get_input: log_path }\n                container:\n                  bind: /home/kpims/logs\n                  mode: rw\n    properties:\n      image:\n        get_input: tag_version\n      service_component_type: 'dcae-kpi-ms'\n      service_id: 'kpims'\n      service_component_name_override: 'dcae-kpi-ms'\n      always_pull_image: true\n      replicas: {get_input: replicas}\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      tls_info:\n        cert_directory: '/opt/app/kpims/etc/cert/'\n        use_tls: true\n      application_config:\n        aafUsername: { get_input: aaf_username }\n        aafPassword: { get_input: aaf_password }\n        trust_store_path: '/opt/app/kpims/etc/cert/trust.jks'\n        trust_store_pass_path: '/opt/app/kpims/etc/cert/trust.pass'\n        streams_subscribes:\n          performance_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: performance_management_topic_url }\n            type: message-router\n        streams_publishes:\n          kpi_topic:\n            dmaap_info:\n              topic_url: { get_input: dcae_kpi_topic_url }\n            type: message-router\n        pollingInterval: { get_input: dmaap_polling_interval}\n        pollingTimeout: { get_input: dmaap_polling_timeout }\n        cbsPollingInterval: { get_input: cbs_polling_interval }\n        dmaap.server:\n          - { get_input: dmaap }\n        cg: { get_input: cg }\n        cid: { get_input: cid }\n        kpi.policy:\n          '{\"domain\":\"measurementsForKpi\",\"methodForKpi\":[{\"eventName\":\"perf3gpp_CORE-AMF_pmMeasResult\",\"controlLoopSchemaType\":\"SLICE\",\"policyScope\":\"resource=networkSlice;type=configuration\",\"policyName\":\"configuration.dcae.microservice.kpi-computation\",\"policyVersion\":\"v0.0.1\",\"kpis\":[{\"measType\":\"AMFRegNbr\",\"operation\":\"SUM\",\"operands\":\"RM.RegisteredSubNbrMean\"}]},{\"eventName\":\"perf3gpp_CORE-UPF_pmMeasResult\",\"controlLoopSchemaType\":\"SLICE\",\"policyScope\":\"resource=networkSlice;type=configuration\",\"policyName\":\"configuration.dcae.microservice.kpi-computation\",\"policyVersion\":\"v0.0.1\",\"kpis\":[{\"measType\":\"UpstreamThr\",\"operation\":\"SUM\",\"operands\":\"GTP.InDataOctN3UPF\"},{\"measType\":\"DownstreamThr\",\"operation\":\"SUM\",\"operands\":\"GTP.OutDataOctN3UPF\"}]}]}'\n\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"304650cf-f012-4b50-b83a-7ed9adc3b2bb","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/304650cf-f012-4b50-b83a-7ed9adc3b2bb"},"created":1622333396403,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-pgaas-initdb","typeVersion":2105301209,"blueprintTemplate":"# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# org.onap.dcae\n# =============================================================================\n# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\ndescription: |-\n  This blueprint is used to take control of a postgres server instance for use by cloudify-managed applications.\n  This blueprint depends upon the deployment of the pgaas_plugin and an existing postgres server instance.\n  This blueprint is part of a suite of three blueprints:\n  k8s-pgaas-initdb takes control of the postgres server instance.\n  k8s-pgaas-database creates a database, roles and credentials associated with the database.\n  k8s-pgaas-getdbinfo shows how an application can access a database (including its roles and credentials) that was already created with k8s-pgaas-database.\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:relationshipplugin?version=1.1.0\n  - plugin:sshkeyshare?version=1.2.0\n  - plugin:pgaas?version=1.3.0\n\ninputs:\n  blueprint_version:\n    type: string\n    default: '2018-04-27T00:31:38+0000'\n\n  pgaas_cluster_name:\n    type: string\n    default: pghelm\n\n  k8s_pgaas_instance_fqdn:\n    type: string\n\n  k8s_initial_password:\n    type: string\n    default: ''\n\nnode_templates:\n\n  # tie to pgaas_plugin database\n  pgaas_cluster:\n    type: dcae.nodes.pgaas.cluster\n    properties:\n      writerfqdn: { get_input: k8s_pgaas_instance_fqdn }\n      readerfqdn: { get_input: k8s_pgaas_instance_fqdn }\n      initialpassword: { get_input: k8s_initial_password }\n    relationships:\n      - type: dcae.relationships.pgaas_cluster_uses_sshkeypair\n        target: sharedsshkey_pgrs\n\n  sharedsshkey_pgrs:\n    type: dcaegen2.nodes.ssh.keypair\n\n\noutputs:\n  blueprint_version:\n    value: { get_input: blueprint_version }\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"56c1907f-679a-485d-99b2-99d35617d4ed","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/56c1907f-679a-485d-99b2-99d35617d4ed"},"created":1622333396490,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-pm-mapper","typeVersion":2105301209,"blueprintTemplate":"#\n# ============LICENSE_START=======================================================\n#  Copyright (C) 2019-2020 Nordix Foundation.\n#  Copyright (C) 2020 Nokia\n# ================================================================================\n# Licensed under the Apache License, Version 2.0 (the 'License');\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an 'AS IS' BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n# ============LICENSE_END=========================================================\n#\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - 'http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:dmaap?version=1.5.0\n\ninputs:\n  filter:\n    type: string\n    description: PM Mapper filter on measInfo, measInfoId, measType, instanceId\n    default: \"{ \\\"filters\\\":[] }\"\n  enable_http:\n    type: boolean\n    description: Option to turn on HTTP connections\n    default: false\n  tag_version:\n    type: string\n    description: Docker image to be used\n    default: 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:1.5.2'\n  replicas:\n    type: integer\n    description: Number of instances\n    default: 1\n  feed_name:\n    type: string\n    default: 'bulk_pm_feed'\n  topic_name:\n    type: string\n    default: 'PERFORMANCE_MEASUREMENTS'\n  client_role:\n    type: string\n    description: Client role to request secure access to topic\n    default: 'org.onap.dcae.pmPublisher'\n  client_id:\n    type: string\n    description: Client id for given AAF client\n    default: 'dcae@dcae.onap.org'\n  client_password:\n    type: string\n    description: Password for AAF client provided as client_id\n    default: 'demo123456!'\n  dmaap_dr_username:\n    type: string\n    description: DMAAP Data Router user name\n    default: 'username'\n  dmaap_dr_password:\n    type: string\n    description: DMAAP Data Router password\n    default: 'password'\n  dcae_location:\n    type: string\n    description: DCAE location for the subscriber, used to set up routing\n    default: 'san-francisco'\n  pm_mapper_service_protocol:\n    type: string\n    description: PM Mapper protocol\n    default: 'https'\n  pm_mapper_service_port:\n    type: string\n    description: PM Mapper host port\n    default: '8443'\n  dmaap_dr_service_host:\n    type: string\n    description: DMAAP Data Router host address\n    default: 'dmaap-dr-node'\n  dmaap_dr_service_port:\n    type: string\n    description: DMAAP Data Router host port\n    default: '8443'\n  dmaap_mr_service_protocol:\n    type: string\n    description: DMAAP Message Router protocol\n    default: 'https'\n  dmaap_mr_service_host:\n    type: string\n    description: DMAAP Message Router host address\n    default: 'message-router'\n  dmaap_mr_service_port:\n    type: string\n    description: DMAAP Message Router host port\n    default: '3905'\n  cpu_limit:\n    type: string\n    default: '1000m'\n  cpu_request:\n    type: string\n    default: '1000m'\n  memory_limit:\n    type: string\n    default: '1024Mi'\n  memory_request:\n    type: string\n    default: '1024Mi'\n\nnode_templates:\n  pm-feed:\n    type: dcaegen2.nodes.Feed\n    properties:\n      feed_name: { get_input: feed_name }\n      useExisting: true\n\n  pm-topic:\n    type: dcaegen2.nodes.Topic\n    properties:\n      topic_name: { get_input: topic_name }\n\n  pm-mapper:\n    type: dcae.nodes.ContainerizedServiceComponentUsingDmaap\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        create:\n          inputs:\n            ports:\n              - '8443:0'\n              - '8081:0'\n\n    relationships:\n      - type: dcaegen2.relationships.subscribe_to_files\n        target: pm-feed\n      - type: dcaegen2.relationships.publish_events\n        target: pm-topic\n\n    properties:\n      service_component_type: 'dcae-pm-mapper'\n      service_component_name_override: 'dcae-pm-mapper'\n      application_config:\n        trust_store_path: '/opt/app/pm-mapper/etc/cert/trust.jks'\n        trust_store_pass_path: '/opt/ap+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-pmsh.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-pmsh.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-pmsh.yaml .yaml
++ flatten /blueprints/k8s-pmsh.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='#\n# ============LICENSE_START=======================================================\n#  Copyright (C) 2020 Nordix Foundation.\n# ================================================================================\n# Licensed under the Apache License, Version 2.0 (the '\''License'\'');\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an '\''AS IS'\'' BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n# ============LICENSE_END=========================================================\n#\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - '\''http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'\''\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\ninputs:\n  tag_version:\n    type: string\n    description: Docker image to be used\n    default: '\''nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pmsh:1.1.2'\''\n  replicas:\n    type: integer\n    description: Number of instances\n    default: 1\n  operational_policy_name:\n    type: string\n    default: '\''pmsh-operational-policy'\''\n  control_loop_name:\n    type: string\n    default: '\''pmsh-control-loop'\''\n  pmsh_publish_topic_name:\n    type: string\n    default: '\''unauthenticated.DCAE_CL_OUTPUT'\''\n  policy_feedback_topic_name:\n    type: string\n    default: '\''unauthenticated.PMSH_CL_INPUT'\''\n  aai_notification_topic_name:\n    type: string\n    default: '\''AAI-EVENT'\''\n  publisher_client_role:\n    type: string\n    description: Client role to request secure access to topic\n    default: '\''org.onap.dcae.pmPublisher'\''\n  subscriber_client_role:\n    type: string\n    description: Client role to request secure access to topic\n    default: '\''org.onap.dcae.pmSubscriber'\''\n  dcae_location:\n    type: string\n    description: DCAE location for the subscriber, used to set up routing\n    default: '\''san-francisco'\''\n  cpu_limit:\n    type: string\n    default: '\''1000m'\''\n  cpu_request:\n    type: string\n    default: '\''1000m'\''\n  memory_limit:\n    type: string\n    default: '\''1024Mi'\''\n  memory_request:\n    type: string\n    default: '\''1024Mi'\''\n  pgaas_cluster_name:\n    type: string\n    default: '\''dcae-pg-primary.onap'\''\n  enable_tls:\n    type: boolean\n    default: true\n  protocol:\n    type: string\n    description: PMSH protocol. If enable_tls is false, set to http\n    default: '\''https'\''\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: '\''pmsh'\''\n  pmsh:\n    type: dcae.nodes.ContainerizedServiceComponentUsingDmaap\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        create:\n          inputs:\n            ports:\n              - '\''8443:0'\''\n            envs:\n              PMSH_PG_URL:\n                { get_attribute: [ pgaasvm, admin, host ] }\n              PMSH_PG_PASSWORD:\n                { get_attribute: [ pgaasvm, admin, password ] }\n              PMSH_PG_USERNAME:\n                { get_attribute: [ pgaasvm, admin, user ] }\n              PMSH_DB_NAME:\n                { get_attribute: [ pgaasvm, admin, database ] }\n\n    relationships:\n      - type: cloudify.relationships.depends_on\n        target: pgaasvm\n\n    properties:\n      service_component_type: '\''dcae-pmsh'\''\n      service_component_name_override: '\''dcae-pmsh'\''\n      application_config:\n        enable_tls: { get_input: enable_tls }\n        aaf_identity: '\''dcae@dcae.onap.org'\''\n        aaf_password: '\''demo123456!'\''\n        operational_policy_name: { get_input: operational_policy_name }\n        control_loop_name: { get_input: control_loop_name }\n        cert_path: '\''/opt/app/pmsh/etc/certs/cert.pem'\''\n        key_path: '\''/opt/app/pmsh/etc/certs/key.pem'\''\n        ca_cert_path: '\''/opt/app/pmsh/etc/certs/cacert.pem'\''\n        streams_publishes:\n          policy_pm_publisher:\n            type: message_router\n            dmaap_info:\n              topic_url: {concat: [\"https://message-router:3905/events/\", { get_input: pmsh_publish_topic_name }]}\n        streams_subscribes:\n          policy_pm_subscriber:\n            type: message_router\n            dmaap_info:\n              topic_url: {concat: [\"https://message-router:3905/events/\", { get_input: policy_feedback_topic_name }]}\n          aai_subscriber:\n            type: message_router\n            dmaap_info:\n              topic_url: {concat: [\"https://message-router:3905/events/\", { get_input: aai_notification_topic_name }]}\n      resource_config:\n        limits:\n          cpu: { get_input: cpu_limit }\n          memory: { get_input: memory_limit }\n        requests:\n          cpu: { get_input: cpu_request }\n          memory: { get_input: memory_request }\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: { get_input: protocol }\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      log_info:\n        log_directory: '\''/var/log/ONAP/dcaegen2/services/pmsh'\''\n      tls_info:\n        cert_directory: '\''/opt/app/pmsh/etc/certs'\''\n        use_tls: { get_input: enable_tls }\n'
++ echo '#\n# ============LICENSE_START=======================================================\n#  Copyright (C) 2020 Nordix Foundation.\n# ================================================================================\n# Licensed under the Apache License, Version 2.0 (the '\''License'\'');\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an '\''AS IS'\'' BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n# ============LICENSE_END=========================================================\n#\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - '\''http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'\''\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\ninputs:\n  tag_version:\n    type: string\n    description: Docker image to be used\n    default: '\''nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pmsh:1.1.2'\''\n  replicas:\n    type: integer\n    description: Number of instances\n    default: 1\n  operational_policy_name:\n    type: string\n    default: '\''pmsh-operational-policy'\''\n  control_loop_name:\n    type: string\n    default: '\''pmsh-control-loop'\''\n  pmsh_publish_topic_name:\n    type: string\n    default: '\''unauthenticated.DCAE_CL_OUTPUT'\''\n  policy_feedback_topic_name:\n    type: string\n    default: '\''unauthenticated.PMSH_CL_INPUT'\''\n  aai_notification_topic_name:\n    type: string\n    default: '\''AAI-EVENT'\''\n  publisher_client_role:\n    type: string\n    description: Client role to request secure access to topic\n    default: '\''org.onap.dcae.pmPublisher'\''\n  subscriber_client_role:\n    type: string\n    description: Client role to request secure access to topic\n    default: '\''org.onap.dcae.pmSubscriber'\''\n  dcae_location:\n    type: string\n    description: DCAE location for the subscriber, used to set up routing\n    default: '\''san-francisco'\''\n  cpu_limit:\n    type: string\n    default: '\''1000m'\''\n  cpu_request:\n    type: string\n    default: '\''1000m'\''\n  memory_limit:\n    type: string\n    default: '\''1024Mi'\''\n  memory_request:\n    type: string\n    default: '\''1024Mi'\''\n  pgaas_cluster_name:\n    type: string\n    default: '\''dcae-pg-primary.onap'\''\n  enable_tls:\n    type: boolean\n    default: true\n  protocol:\n    type: string\n    description: PMSH protocol. If enable_tls is false, set to http\n    default: '\''https'\''\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: '\''pmsh'\''\n  pmsh:\n    type: dcae.nodes.ContainerizedServiceComponentUsingDmaap\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        create:\n          inputs:\n            ports:\n              - '\''8443:0'\''\n            envs:\n              PMSH_PG_URL:\n                { get_attribute: [ pgaasvm, admin, host ] }\n              PMSH_PG_PASSWORD:\n                { get_attribute: [ pgaasvm, admin, password ] }\n              PMSH_PG_USERNAME:\n                { get_attribute: [ pgaasvm, admin, user ] }\n              PMSH_DB_NAME:\n                { get_attribute: [ pgaasvm, admin, database ] }\n\n    relationships:\n      - type: cloudify.relationships.depends_on\n        target: pgaasvm\n\n    properties:\n      service_component_type: '\''dcae-pmsh'\''\n      service_component_name_override: '\''dcae-pmsh'\''\n      application_config:\n        enable_tls: { get_input: enable_tls }\n        aaf_identity: '\''dcae@dcae.onap.org'\''\n        aaf_password: '\''demo123456!'\''\n        operational_policy_name: { get_input: operational_policy_name }\n        control_loop_name: { get_input: control_loop_name }\n        cert_path: '\''/opt/app/pmsh/etc/certs/cert.pem'\''\n        key_path: '\''/opt/app/pmsh/etc/certs/key.pem'\''\n        ca_cert_path: '\''/opt/app/pmsh/etc/certs/cacert.pem'\''\n        streams_publishes:\n          policy_pm_publisher:\n            type: message_router\n            dmaap_info:\n              topic_url: {concat: [\"https://message-router:3905/events/\", { get_input: pmsh_publish_topic_name }]}\n        streams_subscribes:\n          policy_pm_subscriber:\n            type: message_router\n            dmaap_info:\n              topic_url: {concat: [\"https://message-router:3905/events/\", { get_input: policy_feedback_topic_name }]}\n          aai_subscriber:\n            type: message_router\n            dmaap_info:\n              topic_url: {concat: [\"https://message-router:3905/events/\", { get_input: aai_notification_topic_name }]}\n      resource_config:\n        limits:\n          cpu: { get_input: cpu_limit }\n          memory: { get_input: memory_limit }\n        requests:\n          cpu: { get_input: cpu_request }\n          memory: { get_input: memory_request }\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: { get_input: protocol }\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      log_info:\n        log_directory: '\''/var/log/ONAP/dcaegen2/services/pmsh'\''\n      tls_info:\n        cert_directory: '\''/opt/app/pmsh/etc/certs'\''\n        use_tls: { get_input: enable_tls }\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-pmsh",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "#\n# ============LICENSE_START=======================================================\n#  Copyright (C) 2020 Nordix Foundation.\n# ================================================================================\n# Licensed under the Apache License, Version 2.0 (the '\''License'\'');\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an '\''AS IS'\'' BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n# ============LICENSE_END=========================================================\n#\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - '\''http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'\''\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\ninputs:\n  tag_version:\n    type: string\n    description: Docker image to be used\n    default: '\''nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pmsh:1.1.2'\''\n  replicas:\n    type: integer\n    description: Number of instances\n    default: 1\n  operational_policy_name:\n    type: string\n    default: '\''pmsh-operational-policy'\''\n  control_loop_name:\n    type: string\n    default: '\''pmsh-control-loop'\''\n  pmsh_publish_topic_name:\n    type: string\n    default: '\''unauthenticated.DCAE_CL_OUTPUT'\''\n  policy_feedback_topic_name:\n    type: string\n    default: '\''unauthenticated.PMSH_CL_INPUT'\''\n  aai_notification_topic_name:\n    type: string\n    default: '\''AAI-EVENT'\''\n  publisher_client_role:\n    type: string\n    description: Client role to request secure access to topic\n    default: '\''org.onap.dcae.pmPublisher'\''\n  subscriber_client_role:\n    type: string\n    description: Client role to request secure access to topic\n    default: '\''org.onap.dcae.pmSubscriber'\''\n  dcae_location:\n    type: string\n    description: DCAE location for the subscriber, used to set up routing\n    default: '\''san-francisco'\''\n  cpu_limit:\n    type: string\n    default: '\''1000m'\''\n  cpu_request:\n    type: string\n    default: '\''1000m'\''\n  memory_limit:\n    type: string\n    default: '\''1024Mi'\''\n  memory_request:\n    type: string\n    default: '\''1024Mi'\''\n  pgaas_cluster_name:\n    type: string\n    default: '\''dcae-pg-primary.onap'\''\n  enable_tls:\n    type: boolean\n    default: true\n  protocol:\n    type: string\n    description: PMSH protocol. If enable_tls is false, set to http\n    default: '\''https'\''\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: '\''pmsh'\''\n  pmsh:\n    type: dcae.nodes.ContainerizedServiceComponentUsingDmaap\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        create:\n          inputs:\n            ports:\n              - '\''8443:0'\''\n            envs:\n              PMSH_PG_URL:\n                { get_attribute: [ pgaasvm, admin, host ] }\n              PMSH_PG_PASSWORD:\n                { get_attribute: [ pgaasvm, admin, password ] }\n              PMSH_PG_USERNAME:\n                { get_attribute: [ pgaasvm, admin, user ] }\n              PMSH_DB_NAME:\n                { get_attribute: [ pgaasvm, admin, database ] }\n\n    relationships:\n      - type: cloudify.relationships.depends_on\n        target: pgaasvm\n\n    properties:\n      service_component_type: '\''dcae-pmsh'\''\n      service_component_name_override: '\''dcae-pmsh'\''\n      application_config:\n        enable_tls: { get_input: enable_tls }\n        aaf_identity: '\''dcae@dcae.onap.org'\''\n        aaf_password: '\''demo123456!'\''\n        operational_policy_name: { get_input: operational_policy_name }\n        control_loop_name: { get_input: control_loop_name }\n        cert_path: '\''/opt/app/pmsh/etc/certs/cert.pem'\''\n        key_path: '\''/opt/app/pmsh/etc/certs/key.pem'\''\n        ca_cert_path: '\''/opt/app/pmsh/etc/certs/cacert.pem'\''\n        streams_publishes:\n          policy_pm_publisher:\n            type: message_router\n            dmaap_info:\n              topic_url: {concat: [\"https://message-router:3905/events/\", { get_input: pmsh_publish_topic_name }]}\n        streams_subscribes:\n          policy_pm_subscriber:\n            type: message_router\n            dmaap_info:\n              topic_url: {concat: [\"https://message-router:3905/events/\", { get_input: policy_feedback_topic_name }]}\n          aai_subscriber:\n            type: message_router\n            dmaap_info:\n              topic_url: {concat: [\"https://message-router:3905/events/\", { get_input: aai_notification_topic_name }]}\n      resource_config:\n        limits:\n          cpu: { get_input: cpu_limit }\n          memory: { get_input: memory_limit }\n        requests:\n          cpu: { get_input: cpu_request }\n          memory: { get_input: memory_request }\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: { get_input: protocol }\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      log_info:\n        log_directory: '\''/var/log/ONAP/dcaegen2/services/pmsh'\''\n      tls_info:\n        cert_directory: '\''/opt/app/pmsh/etc/certs'\''\n        use_tls: { get_input: enable_tls }\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 11625  100  5948  100  5677   187k   178k --:--:-- --:--:-- --:--:--  366k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-prh.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-prh.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-prh.yaml .yaml
++ flatten /blueprints/k8s-prh.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'+++ 
tr -d '\n'
++ FLAT='# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2018-2020 AT&T\n# Copyright (c) 2018-2020 NOKIA\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  pnfUrl:\n    type: string\n    default: \"https://aai.onap.svc.cluster.local:8443/aai/v12/network/pnfs/pnf\"\n  baseUrl:\n    type: string\n    default: \"https://aai.onap.svc.cluster.local:8443/aai/v12\"\n  aaiEnrichmentHost:\n    type: string\n    default: \"aai.onap.svc.cluster.local\"\n  aaiEnrichmentPort:\n    type: integer\n    default: 8443\n  aaiEnrichmentUser:\n    type: string\n    description: aai user name\n    default: \"AAI\"\n  aaiEnrichmentPasswd:\n    type: string\n    description: aai password\n    default: \"AAI\"\n  dmaap_pnfReady_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.PNF_READY\"\n  dmaap_vesPnfRegOutput_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT\"\n  dmaap_pnfUpdate_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.PNF_UPDATE\"\n  dmaap_user:\n    type: string\n    description: dmap user name\n    default: \"admin\"\n  dmaap_passwd:\n    type: string\n    description: dmap password\n    default: \"admin\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:1.5.5\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  host_port:\n    description: port on Kubernetes host where PRH API will be exposed\n    default: 0\n  container_port:\n    type: integer\n    description: Network port that the platform service exposes in the container\n    default: 8100\n  service_component_type:\n    type: string\n    default: \"dcae-prh\"\n  service_id:\n    type: string\n    default: \"dcae-prh\"\n  secureEnableCert:\n    type: boolean\n    description: enable certificate base connection with AAI and DMaap\n    default: false\n  service_component_name_override:\n    type: string\n    default: \"dcae-prh\"\nnode_templates:\n  prh:\n    properties:\n      application_config:\n        dmaap.dmaapConsumerConfiguration.dmaapUserName: { get_input: dmaap_user }\n        dmaap.dmaapConsumerConfiguration.dmaapUserPassword: { get_input: dmaap_passwd }\n        dmaap.dmaapConsumerConfiguration.dmaapContentType: \"application/json\"\n        dmaap.dmaapConsumerConfiguration.consumerId: \"c12\"\n        dmaap.dmaapConsumerConfiguration.consumerGroup: \"OpenDCAE-c12\"\n        dmaap.dmaapConsumerConfiguration.timeoutMs: -1\n        dmaap.dmaapProducerConfiguration.dmaapUserName: { get_input: dmaap_user }\n        dmaap.dmaapProducerConfiguration.dmaapUserPassword: { get_input: dmaap_passwd }\n        dmaap.dmaapProducerConfiguration.dmaapContentType: \"application/json\"\n        dmaap.dmaapUpdateProducerConfiguration.dmaapUserName: { get_input: dmaap_user }\n        dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword: { get_input: dmaap_passwd }\n        dmaap.dmaapUpdateProducerConfiguration.dmaapContentType: \"application/json\"\n        aai.aaiClientConfiguration.pnfUrl: { get_input: pnfUrl }\n        aai.aaiClientConfiguration.baseUrl: { get_input: baseUrl }\n        aai.aaiClientConfiguration.aaiHost: { get_input: aaiEnrichmentHost }\n        aai.aaiClientConfiguration.aaiHostPortNumber: { get_input: aaiEnrichmentPort }\n        aai.aaiClientConfiguration.aaiProtocol: \"https\"\n        aai.aaiClientConfiguration.aaiUserName: { get_input: aaiEnrichmentUser }\n        aai.aaiClientConfiguration.aaiUserPassword: { get_input: aaiEnrichmentPasswd }\n        aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors: true\n        aai.aaiClientConfiguration.aaiBasePath: \"/aai/v12\"\n        aai.aaiClientConfiguration.aaiPnfPath: \"/network/pnfs/pnf\"\n        aai.aaiClientConfiguration.aaiServiceInstancePath: \"/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}\"\n        aai.aaiClientConfiguration.aaiHeaders:\n            X-FromAppId: \"prh\"\n            X-TransactionId: \"9999\"\n            Accept: \"application/json\"\n            Real-Time: \"true\"\n            Authorization: \"Basic QUFJOkFBSQ==\"\n        security.trustStorePath: \"/opt/app/prh/etc/cert/trust.jks\"\n        security.trustStorePasswordPath: \"/opt/app/prh/etc/cert/trust.pass\"\n        security.keyStorePath: \"/opt/app/prh/etc/cert/cert.jks\"\n        security.keyStorePasswordPath: \"/opt/app/prh/etc/cert/jks.pass\"\n        security.enableAaiCertAuth: { get_input: secureEnableCert }\n        security.enableDmaapCertAuth: { get_input: secureEnableCert }\n        streams_publishes:\n            pnf-update:\n              type: \"message_router\"\n              dmaap_info:\n                topic_url: {get_input: dmaap_pnfUpdate_url }\n            pnf-ready:\n              type: \"message_router\"\n              dmaap_info:\n                topic_url: { get_input: dmaap_pnfReady_url }\n        streams_subscribes:\n            ves-reg-output:\n              type: \"message_router\"\n              dmaap_info:\n                topic_url: { get_input: dmaap_vesPnfRegOutput_url }\n      docker_config:\n        healthcheck:\n          endpoint: /heartbeat\n          interval: 15s\n          timeout: 1s\n          type: http\n        ports:\n          - { concat: [ { get_input: container_port }, '\'':'\'', { get_input: host_port } ] }\n      image:\n        { get_input: tag_version }\n      replicas: {get_input: replicas}\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      log_info:\n        log_directory: \"/opt/app/prh/logs\"\n      tls_info:\n        cert_directory: '\''/opt/app/prh/etc/cert'\''\n        use_tls: true\n    type: dcae.nodes.ContainerizedServiceComponent\n\n'
++ echo '# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2018-2020 AT&T\n# Copyright (c) 2018-2020 NOKIA\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  pnfUrl:\n    type: string\n    default: \"https://aai.onap.svc.cluster.local:8443/aai/v12/network/pnfs/pnf\"\n  baseUrl:\n    type: string\n    default: \"https://aai.onap.svc.cluster.local:8443/aai/v12\"\n  aaiEnrichmentHost:\n    type: string\n    default: \"aai.onap.svc.cluster.local\"\n  aaiEnrichmentPort:\n    type: integer\n    default: 8443\n  aaiEnrichmentUser:\n    type: string\n    description: aai user name\n    default: \"AAI\"\n  aaiEnrichmentPasswd:\n    type: string\n    description: aai password\n    default: \"AAI\"\n  dmaap_pnfReady_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.PNF_READY\"\n  dmaap_vesPnfRegOutput_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT\"\n  dmaap_pnfUpdate_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.PNF_UPDATE\"\n  dmaap_user:\n    type: string\n    description: dmap user name\n    default: \"admin\"\n  dmaap_passwd:\n    type: string\n    description: dmap password\n    default: \"admin\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:1.5.5\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  host_port:\n    description: port on Kubernetes host where PRH API will be exposed\n    default: 0\n  container_port:\n    type: integer\n    description: Network port that the platform service exposes in the container\n    default: 8100\n  service_component_type:\n    type: string\n    default: \"dcae-prh\"\n  service_id:\n    type: string\n    default: \"dcae-prh\"\n  secureEnableCert:\n    type: boolean\n    description: enable certificate base connection with AAI and DMaap\n    default: false\n  service_component_name_override:\n    type: string\n    default: \"dcae-prh\"\nnode_templates:\n  prh:\n    properties:\n      application_config:\n        dmaap.dmaapConsumerConfiguration.dmaapUserName: { get_input: dmaap_user }\n        dmaap.dmaapConsumerConfiguration.dmaapUserPassword: { get_input: dmaap_passwd }\n        dmaap.dmaapConsumerConfiguration.dmaapContentType: \"application/json\"\n        dmaap.dmaapConsumerConfiguration.consumerId: \"c12\"\n        dmaap.dmaapConsumerConfiguration.consumerGroup: \"OpenDCAE-c12\"\n        dmaap.dmaapConsumerConfiguration.timeoutMs: -1\n        dmaap.dmaapProducerConfiguration.dmaapUserName: { get_input: dmaap_user }\n        dmaap.dmaapProducerConfiguration.dmaapUserPassword: { get_input: dmaap_passwd }\n        dmaap.dmaapProducerConfiguration.dmaapContentType: \"application/json\"\n        dmaap.dmaapUpdateProducerConfiguration.dmaapUserName: { get_input: dmaap_user }\n        dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword: { get_input: dmaap_passwd }\n        dmaap.dmaapUpdateProducerConfiguration.dmaapContentType: \"application/json\"\n        aai.aaiClientConfiguration.pnfUrl: { get_input: pnfUrl }\n        aai.aaiClientConfiguration.baseUrl: { get_input: baseUrl }\n        aai.aaiClientConfiguration.aaiHost: { get_input: aaiEnrichmentHost }\n        aai.aaiClientConfiguration.aaiHostPortNumber: { get_input: aaiEnrichmentPort }\n        aai.aaiClientConfiguration.aaiProtocol: \"https\"\n        aai.aaiClientConfiguration.aaiUserName: { get_input: aaiEnrichmentUser }\n        aai.aaiClientConfiguration.aaiUserPassword: { get_input: aaiEnrichmentPasswd }\n        aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors: true\n        aai.aaiClientConfiguration.aaiBasePath: \"/aai/v12\"\n        aai.aaiClientConfiguration.aaiPnfPath: \"/network/pnfs/pnf\"\n        aai.aaiClientConfiguration.aaiServiceInstancePath: \"/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}\"\n        aai.aaiClientConfiguration.aaiHeaders:\n            X-FromAppId: \"prh\"\n            X-TransactionId: \"9999\"\n            Accept: \"application/json\"\n            Real-Time: \"true\"\n            Authorization: \"Basic QUFJOkFBSQ==\"\n        security.trustStorePath: \"/opt/app/prh/etc/cert/trust.jks\"\n        security.trustStorePasswordPath: \"/opt/app/prh/etc/cert/trust.pass\"\n        security.keyStorePath: \"/opt/app/prh/etc/cert/cert.jks\"\n        security.keyStorePasswordPath: \"/opt/app/prh/etc/cert/jks.pass\"\n        security.enableAaiCertAuth: { get_input: secureEnableCert }\n        security.enableDmaapCertAuth: { get_input: secureEnableCert }\n        streams_publishes:\n            pnf-update:\n              type: \"message_router\"\n              dmaap_info:\n                topic_url: {get_input: dmaap_pnfUpdate_url }\n            pnf-ready:\n              type: \"message_router\"\n              dmaap_info:\n                topic_url: { get_input: dmaap_pnfReady_url }\n        streams_subscribes:\n            ves-reg-output:\n              type: \"message_router\"\n              dmaap_info:\n                topic_url: { get_input: dmaap_vesPnfRegOutput_url }\n      docker_config:\n        healthcheck:\n          endpoint: /heartbeat\n          interval: 15s\n          timeout: 1s\n          type: http\n        ports:\n          - { concat: [ { get_input: container_port }, '\'':'\'', { get_input: host_port } ] }\n      image:\n        { get_input: tag_version }\n      replicas: {get_input: replicas}\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      log_info:\n        log_directory: \"/opt/app/prh/logs\"\n      tls_info:\n        cert_directory: '\''/opt/app/prh/etc/cert'\''\n        use_tls: true\n    type: dcae.nodes.ContainerizedServiceComponent\n\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-prh",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2018-2020 AT&T\n# Copyright (c) 2018-2020 NOKIA\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  pnfUrl:\n    type: string\n    default: \"https://aai.onap.svc.cluster.local:8443/aai/v12/network/pnfs/pnf\"\n  baseUrl:\n    type: string\n    default: \"https://aai.onap.svc.cluster.local:8443/aai/v12\"\n  aaiEnrichmentHost:\n    type: string\n    default: \"aai.onap.svc.cluster.local\"\n  aaiEnrichmentPort:\n    type: integer\n    default: 8443\n  aaiEnrichmentUser:\n    type: string\n    description: aai user name\n    default: \"AAI\"\n  aaiEnrichmentPasswd:\n    type: string\n    description: aai password\n    default: \"AAI\"\n  dmaap_pnfReady_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.PNF_READY\"\n  dmaap_vesPnfRegOutput_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT\"\n  dmaap_pnfUpdate_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.PNF_UPDATE\"\n  dmaap_user:\n    type: string\n    description: dmap user name\n    default: \"admin\"\n  dmaap_passwd:\n    type: string\n    description: dmap password\n    default: \"admin\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:1.5.5\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  host_port:\n    description: port on Kubernetes host where PRH API will be exposed\n    default: 0\n  container_port:\n    type: integer\n    description: Network port that the platform service exposes in the container\n    default: 8100\n  service_component_type:\n    type: string\n    default: \"dcae-prh\"\n  service_id:\n    type: string\n    default: \"dcae-prh\"\n  secureEnableCert:\n    type: boolean\n    description: enable certificate base connection with AAI and DMaap\n    default: false\n  service_component_name_override:\n    type: string\n    default: \"dcae-prh\"\nnode_templates:\n  prh:\n    properties:\n      application_config:\n        dmaap.dmaapConsumerConfiguration.dmaapUserName: { get_input: dmaap_user }\n        dmaap.dmaapConsumerConfiguration.dmaapUserPassword: { get_input: dmaap_passwd }\n        dmaap.dmaapConsumerConfiguration.dmaapContentType: \"application/json\"\n        dmaap.dmaapConsumerConfiguration.consumerId: \"c12\"\n        dmaap.dmaapConsumerConfiguration.consumerGroup: \"OpenDCAE-c12\"\n        dmaap.dmaapConsumerConfiguration.timeoutMs: -1\n        dmaap.dmaapProducerConfiguration.dmaapUserName: { get_input: dmaap_user }\n        dmaap.dmaapProducerConfiguration.dmaapUserPassword: { get_input: dmaap_passwd }\n        dmaap.dmaapProducerConfiguration.dmaapContentType: \"application/json\"\n        dmaap.dmaapUpdateProducerConfiguration.dmaapUserName: { get_input: dmaap_user }\n        dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword: { get_input: dmaap_passwd }\n        dmaap.dmaapUpdateProducerConfiguration.dmaapContentType: \"application/json\"\n        aai.aaiClientConfiguration.pnfUrl: { get_input: pnfUrl }\n        aai.aaiClientConfiguration.baseUrl: { get_input: baseUrl }\n        aai.aaiClientConfiguration.aaiHost: { get_input: aaiEnrichmentHost }\n        aai.aaiClientConfiguration.aaiHostPortNumber: { get_input: aaiEnrichmentPort }\n        aai.aaiClientConfiguration.aaiProtocol: \"https\"\n        aai.aaiClientConfiguration.aaiUserName: { get_input: aaiEnrichmentUser }\n        aai.aaiClientConfiguration.aaiUserPassword: { get_input: aaiEnrichmentPasswd }\n        aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors: true\n        aai.aaiClientConfiguration.aaiBasePath: \"/aai/v12\"\n        aai.aaiClientConfiguration.aaiPnfPath: \"/network/pnfs/pnf\"\n        aai.aaiClientConfiguration.aaiServiceInstancePath: \"/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}\"\n        aai.aaiClientConfiguration.aaiHeaders:\n            X-FromAppId: \"prh\"\n            X-TransactionId: \"9999\"\n            Accept: \"application/json\"\n            Real-Time: \"true\"\n            Authorization: \"Basic QUFJOkFBSQ==\"\n        security.trustStorePath: \"/opt/app/prh/etc/cert/trust.jks\"\n        security.trustStorePasswordPath: \"/opt/app/prh/etc/cert/trust.pass\"\n        security.keyStorePath: \"/opt/app/prh/etc/cert/cert.jks\"\n        security.keyStorePasswordPath: \"/opt/app/prh/etc/cert/jks.pass\"\n        security.enableAaiCertAuth: { get_input: secureEnableCert }\n        security.enableDmaapCertAuth: { get_input: secureEnableCert }\n        streams_publishes:\n            pnf-update:\n              type: \"message_router\"\n              dmaap_info:\n                topic_url: {get_input: dmaap_pnfUpdate_url }\n            pnf-ready:\n              type: \"message_router\"\n              dmaap_info:\n                topic_url: { get_input: dmaap_pnfReady_url }\n        streams_subscribes:\n            ves-reg-output:\n              type: \"message_router\"\n              dmaap_info:\n                topic_url: { get_input: dmaap_vesPnfRegOutput_url }\n      docker_config:\n        healthcheck:\n          endpoint: /heartbeat\n          interval: 15s\n          timeout: 1s\n          type: http\n        ports:\n          - { concat: [ { get_input: container_port }, '\'':'\'', { get_input: host_port } ] }\n      image:\n        { get_input: tag_version }\n      replicas: {get_input: replicas}\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      log_info:\n        log_directory: \"/opt/app/prh/logs\"\n      tls_info:\n        cert_directory: '\''/opt/app/prh/etc/cert'\''\n        use_tls: true\n    type: dcae.nodes.ContainerizedServiceComponent\n\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 14833  100  7552  100  7281   254k   245k --:--:-- --:--:-- --:--:--  499k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-restconf.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-restconf.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-restconf.yaml .yaml
++ flatten /blueprints/k8s-restconf.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved.\n# Copyright (c) 2019 Huawei. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\ndescription: >\n  This blueprint deploys/manages the RestConf Collector module as a Docker container\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  dmaap_host:\n    type: string\n    default: \"message-router.onap.svc.cluster.local\"\n  dmaap_port:\n    type: string\n    default: \"3904\"\n  tag_version:\n    type: string\n    default:  \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.restconfcollector:1.2.4\"\n  consul_host:\n    type: string\n    default: \"consul-server.onap.svc.cluster.local\"\n  consul_port:\n    type: string\n    default: \"8500\"\n  cbs_host:\n    type: string\n    default: \"config-binding-service.dcae.svc.cluster.local\"\n  cbs_port:\n    type: string\n    default: \"10000\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30416\"\n  notification_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_RCC_OUTPUT\"\n  service_component_type:\n    type: string\n    default: \"dcae-restconf-collector\"\n  service_id:\n    type: string\n    default: \"dcae-restconf-collector\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-restconf-collector\"\n\nnode_templates:\n  rcc_k8s:\n    type: dcae.nodes.ContainerizedServiceComponent\n    properties:\n        docker_config:\n            healthcheck:\n              endpoint: /healthcheck\n              interval: 15s\n              timeout: 1s\n              type: http\n        image:\n          get_input: tag_version\n        log_info:\n          log_directory: \"/opt/app/RCCollector/logs\"\n        application_config:\n            collector.rcc.appDescription: DCAE RestConf Collector Application\n            collector.rcc.appName: \"dcae-rcc\"\n            collector.rcc.dmaap.streamid: \"notification=device-registration\"\n            collector.rcc.inputQueue.maxPending: \"8096\"\n            tomcat.maxthreads: \"200\"\n            collector.rcc.service.port: \"8080\"\n            collector.rcc.service.secure.port: \"8687\"\n            collector.rcc.keystore.file.location: \"/opt/app/restconfcollector/etc/keystore\"\n            collector.rcc.keystore.passwordfile: \"/opt/app/restconfcollector/etc/rcc_passwordfile\"\n            collector.rcc.keystore.alias: \"dynamically generated\"\n            collector.rcc.truststore.file.location: \"/opt/app/restconfcollector/etc/truststore.onap.client.jks\"\n            collector.rcc.truststore.passwordfile: \"/opt/app/restconfcollector/etc/trustpasswordfile\"\n            collector.keystore.file.location: \"/opt/app/restconfcollector/etc/sdnc.p12\"\n            collector.keystore.passwordfile: \"/opt/app/restconfcollector/etc/passwordfile\"\n            collector.header.authflag: \"0\"\n            collector.header.authlist: \"sample1,c2FtcGxlMQ==\"\n            collector.rcc.service.secure.clientauth: \"0\"\n            streams_publishes:\n                        device-registration:\n                          dmaap_info:\n                            topic_url:\n                              get_input: notification_publish_url\n                          type: message_router\n            rcc_policy: '\''[{\"controller_name\":\"AccessM&C\",\"controller_restapiUrl\":\"172.30.0.55:26335\",\"controller_restapiUser\":\"access\",\"controller_restapiPassword\":\"Huawei@123\",\"controller_accessTokenUrl\":\"/rest/plat/smapp/v1/oauth/token\",\"controller_accessTokenFile\":\"./etc/access-token.json\",\"controller_accessTokenMethod\":\"put\",\"controller_subsMethod\":\"post\",\"controller_subscriptionUrl\":\"/restconf/v1/operations/huawei-nce-notification-action:establish-subscription\",\"controller_disableSsl\":\"true\",\"event_details\":[{\"event_name\":\"ONT_registration\",\"event_description\":\"ONTregistartionevent\",\"event_sseventUrlEmbed\":\"true\",\"event_sseventsField\":\"output.url\",\"event_sseventsUrl\":\"null\",\"event_subscriptionTemplate\":\"./etc/ont_registartion_subscription_template.json\",\"event_unSubscriptionTemplate\":\"./etc/ont_registartion_unsubscription_template.json\",\"event_ruleId\":\"12345678\",\"modifyData\": \"true\",\"modifyMethod\": \"modifyOntEvent\",\"userData\": \"remote_id=AC9.0234.0337;svlan=100;cvlan=10;\"}]}]'\''\n        service_component_type: { get_input: service_component_type }\n        service_id: { get_input: service_id }\n        service_component_name_override: { get_input: service_component_name_override }\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n                DMAAPHOST:\n                    { get_input: dmaap_host }\n                DMAAPPORT: \"3904\"\n                DMAAPPUBTOPIC: \"unauthenticated.DCAE_RCC_OUTPUT\"\n                CONSUL_HOST:\n                    { get_input: consul_host }\n                CONSUL_PORT: \"8500\"\n                CBS_HOST:\n                    { get_input: cbs_host }\n                CBS_PORT: \"10000\"\n                CONFIG_BINDING_SERVICE: \"config_binding_service\"\n            ports:\n              - concat: [\"8080:\", { get_input: external_port }]\n\n'
++ echo '# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved.\n# Copyright (c) 2019 Huawei. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\ndescription: >\n  This blueprint deploys/manages the RestConf Collector module as a Docker container\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  dmaap_host:\n    type: string\n    default: \"message-router.onap.svc.cluster.local\"\n  dmaap_port:\n    type: string\n    default: \"3904\"\n  tag_version:\n    type: string\n    default:  \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.restconfcollector:1.2.4\"\n  consul_host:\n    type: string\n    default: \"consul-server.onap.svc.cluster.local\"\n  consul_port:\n    type: string\n    default: \"8500\"\n  cbs_host:\n    type: string\n    default: \"config-binding-service.dcae.svc.cluster.local\"\n  cbs_port:\n    type: string\n    default: \"10000\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30416\"\n  notification_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_RCC_OUTPUT\"\n  service_component_type:\n    type: string\n    default: \"dcae-restconf-collector\"\n  service_id:\n    type: string\n    default: \"dcae-restconf-collector\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-restconf-collector\"\n\nnode_templates:\n  rcc_k8s:\n    type: dcae.nodes.ContainerizedServiceComponent\n    properties:\n        docker_config:\n            healthcheck:\n              endpoint: /healthcheck\n              interval: 15s\n              timeout: 1s\n              type: http\n        image:\n          get_input: tag_version\n        log_info:\n          log_directory: \"/opt/app/RCCollector/logs\"\n        application_config:\n            collector.rcc.appDescription: DCAE RestConf Collector Application\n            collector.rcc.appName: \"dcae-rcc\"\n            collector.rcc.dmaap.streamid: \"notification=device-registration\"\n            collector.rcc.inputQueue.maxPending: \"8096\"\n            tomcat.maxthreads: \"200\"\n            collector.rcc.service.port: \"8080\"\n            collector.rcc.service.secure.port: \"8687\"\n            collector.rcc.keystore.file.location: \"/opt/app/restconfcollector/etc/keystore\"\n            collector.rcc.keystore.passwordfile: \"/opt/app/restconfcollector/etc/rcc_passwordfile\"\n            collector.rcc.keystore.alias: \"dynamically generated\"\n            collector.rcc.truststore.file.location: \"/opt/app/restconfcollector/etc/truststore.onap.client.jks\"\n            collector.rcc.truststore.passwordfile: \"/opt/app/restconfcollector/etc/trustpasswordfile\"\n            collector.keystore.file.location: \"/opt/app/restconfcollector/etc/sdnc.p12\"\n            collector.keystore.passwordfile: \"/opt/app/restconfcollector/etc/passwordfile\"\n            collector.header.authflag: \"0\"\n            collector.header.authlist: \"sample1,c2FtcGxlMQ==\"\n            collector.rcc.service.secure.clientauth: \"0\"\n            streams_publishes:\n                        device-registration:\n                          dmaap_info:\n                            topic_url:\n                              get_input: notification_publish_url\n                          type: message_router\n            rcc_policy: '\''[{\"controller_name\":\"AccessM&C\",\"controller_restapiUrl\":\"172.30.0.55:26335\",\"controller_restapiUser\":\"access\",\"controller_restapiPassword\":\"Huawei@123\",\"controller_accessTokenUrl\":\"/rest/plat/smapp/v1/oauth/token\",\"controller_accessTokenFile\":\"./etc/access-token.json\",\"controller_accessTokenMethod\":\"put\",\"controller_subsMethod\":\"post\",\"controller_subscriptionUrl\":\"/restconf/v1/operations/huawei-nce-notification-action:establish-subscription\",\"controller_disableSsl\":\"true\",\"event_details\":[{\"event_name\":\"ONT_registration\",\"event_description\":\"ONTregistartionevent\",\"event_sseventUrlEmbed\":\"true\",\"event_sseventsField\":\"output.url\",\"event_sseventsUrl\":\"null\",\"event_subscriptionTemplate\":\"./etc/ont_registartion_subscription_template.json\",\"event_unSubscriptionTemplate\":\"./etc/ont_registartion_unsubscription_template.json\",\"event_ruleId\":\"12345678\",\"modifyData\": \"true\",\"modifyMethod\": \"modifyOntEvent\",\"userData\": \"remote_id=AC9.0234.0337;svlan=100;cvlan=10;\"}]}]'\''\n        service_component_type: { get_input: service_component_type }\n        service_id: { get_input: service_id }\n        service_component_name_override: { get_input: service_component_name_override }\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n                DMAAPHOST:\n                    { get_input: dmaap_host }\n                DMAAPPORT: \"3904\"\n                DMAAPPUBTOPIC: \"unauthenticated.DCAE_RCC_OUTPUT\"\n                CONSUL_HOST:\n                    { get_input: consul_host }\n                CONSUL_PORT: \"8500\"\n                CBS_HOST:\n                    { get_input: cbs_host }\n                CBS_PORT: \"10000\"\n                CONFIG_BINDING_SERVICE: \"config_binding_service\"\n            ports:\n              - concat: [\"8080:\", { get_input: external_port }]\n\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-restconf",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved.\n# Copyright (c) 2019 Huawei. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\ndescription: >\n  This blueprint deploys/manages the RestConf Collector module as a Docker container\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  dmaap_host:\n    type: string\n    default: \"message-router.onap.svc.cluster.local\"\n  dmaap_port:\n    type: string\n    default: \"3904\"\n  tag_version:\n    type: string\n    default:  \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.restconfcollector:1.2.4\"\n  consul_host:\n    type: string\n    default: \"consul-server.onap.svc.cluster.local\"\n  consul_port:\n    type: string\n    default: \"8500\"\n  cbs_host:\n    type: string\n    default: \"config-binding-service.dcae.svc.cluster.local\"\n  cbs_port:\n    type: string\n    default: \"10000\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30416\"\n  notification_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_RCC_OUTPUT\"\n  service_component_type:\n    type: string\n    default: \"dcae-restconf-collector\"\n  service_id:\n    type: string\n    default: \"dcae-restconf-collector\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-restconf-collector\"\n\nnode_templates:\n  rcc_k8s:\n    type: dcae.nodes.ContainerizedServiceComponent\n    properties:\n        docker_config:\n            healthcheck:\n              endpoint: /healthcheck\n              interval: 15s\n              timeout: 1s\n              type: http\n        image:\n          get_input: tag_version\n        log_info:\n          log_directory: \"/opt/app/RCCollector/logs\"\n        application_config:\n            collector.rcc.appDescription: DCAE RestConf Collector Application\n            collector.rcc.appName: \"dcae-rcc\"\n            collector.rcc.dmaap.streamid: \"notification=device-registration\"\n            collector.rcc.inputQueue.maxPending: \"8096\"\n            tomcat.maxthreads: \"200\"\n            collector.rcc.service.port: \"8080\"\n            collector.rcc.service.secure.port: \"8687\"\n            collector.rcc.keystore.file.location: \"/opt/app/restconfcollector/etc/keystore\"\n            collector.rcc.keystore.passwordfile: \"/opt/app/restconfcollector/etc/rcc_passwordfile\"\n            collector.rcc.keystore.alias: \"dynamically generated\"\n            collector.rcc.truststore.file.location: \"/opt/app/restconfcollector/etc/truststore.onap.client.jks\"\n            collector.rcc.truststore.passwordfile: \"/opt/app/restconfcollector/etc/trustpasswordfile\"\n            collector.keystore.file.location: \"/opt/app/restconfcollector/etc/sdnc.p12\"\n            collector.keystore.passwordfile: \"/opt/app/restconfcollector/etc/passwordfile\"\n            collector.header.authflag: \"0\"\n            collector.header.authlist: \"sample1,c2FtcGxlMQ==\"\n            collector.rcc.service.secure.clientauth: \"0\"\n            streams_publishes:\n                        device-registration:\n                          dmaap_info:\n                            topic_url:\n                              get_input: notification_publish_url\n                          type: message_router\n            rcc_policy: '\''[{\"controller_name\":\"AccessM&C\",\"controller_restapiUrl\":\"172.30.0.55:26335\",\"controller_restapiUser\":\"access\",\"controller_restapiPassword\":\"Huawei@123\",\"controller_accessTokenUrl\":\"/rest/plat/smapp/v1/oauth/token\",\"controller_accessTokenFile\":\"./etc/access-token.json\",\"controller_accessTokenMethod\":\"put\",\"controller_subsMethod\":\"post\",\"controller_subscriptionUrl\":\"/restconf/v1/operations/huawei-nce-notification-action:establish-subscription\",\"controller_disableSsl\":\"true\",\"event_details\":[{\"event_name\":\"ONT_registration\",\"event_description\":\"ONTregistartionevent\",\"event_sseventUrlEmbed\":\"true\",\"event_sseventsField\":\"output.url\",\"event_sseventsUrl\":\"null\",\"event_subscriptionTemplate\":\"./etc/ont_registartion_subscription_template.json\",\"event_unSubscriptionTemplate\":\"./etc/ont_registartion_unsubscription_template.json\",\"event_ruleId\":\"12345678\",\"modifyData\": \"true\",\"modifyMethod\": \"modifyOntEvent\",\"userData\": \"remote_id=AC9.0234.0337;svlan=100;cvlan=10;\"}]}]'\''\n        service_component_type: { get_input: service_component_type }\n        service_id: { get_input: service_id }\n        service_component_name_override: { get_input: service_component_name_override }\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n                DMAAPHOST:\n                    { get_input: dmaap_host }\n                DMAAPPORT: \"3904\"\n                DMAAPPUBTOPIC: \"unauthenticated.DCAE_RCC_OUTPUT\"\n                CONSUL_HOST:\n                    { get_input: consul_host }\n                CONSUL_PORT: \"8500\"\n                CBS_HOST:\n                    { get_input: cbs_host }\n                CBS_PORT: \"10000\"\n                CONFIG_BINDING_SERVICE: \"config_binding_service\"\n            ports:\n              - concat: [\"8080:\", { get_input: external_port }]\n\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
p/pm-mapper/etc/cert/trust.pass'\n        key_store_path: '/opt/app/pm-mapper/etc/cert/cert.jks'\n        key_store_pass_path: '/opt/app/pm-mapper/etc/cert/jks.pass'\n        pm-mapper-filter: { get_input: filter }\n        enable_http: { get_input: enable_http }\n        dmaap_dr_delete_endpoint: { concat: ['https://',{ get_input: dmaap_dr_service_host },':',{ get_input: dmaap_dr_service_port },'/delete'] }\n        aaf_identity: { get_input: client_id }\n        aaf_password: { get_input: client_password }\n        streams_subscribes:\n          dmaap_subscriber:\n            type: data_router\n            dmaap_info: <>\n        streams_publishes:\n          dmaap_publisher:\n            type: message_router\n            dmaap_info: <>\n      resource_config:\n        limits:\n          cpu: { get_input: cpu_limit }\n          memory: { get_input: memory_limit }\n        requests:\n          cpu: { get_input: cpu_request }\n          memory: { get_input: memory_request }\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: https\n      streams_publishes:\n        - name: pm-topic\n          location: { get_input: dcae_location }\n          client_role: { get_input: client_role }\n          type: message-router\n      streams_subscribes:\n        - name: pm-feed\n          location: { get_input: dcae_location }\n          client_role: { get_input: client_role }\n          username: { get_input: dmaap_dr_username }\n          password: { get_input: dmaap_dr_password }\n          scheme: { get_input: pm_mapper_service_protocol }\n          route: delivery\n          delivery_url: ''\n          privileged: true\n          decompress: true\n          type: data_router\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      log_info:\n        log_directory: '/var/log/ONAP/dcaegen2/services/pm-mapper'\n      tls_info:\n        cert_directory: '/opt/app/pm-mapper/etc/cert/'\n        use_tls: true\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"228fb058-a4ac-46dc-9697-8839abadfefb","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/228fb058-a4ac-46dc-9697-8839abadfefb"},"created":1622333396574,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-pmsh","typeVersion":2105301209,"blueprintTemplate":"#\n# ============LICENSE_START=======================================================\n#  Copyright (C) 2020 Nordix Foundation.\n# ================================================================================\n# Licensed under the Apache License, Version 2.0 (the 'License');\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an 'AS IS' BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n# ============LICENSE_END=========================================================\n#\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - 'http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\ninputs:\n  tag_version:\n    type: string\n    description: Docker image to be used\n    default: 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pmsh:1.1.2'\n  replicas:\n    type: integer\n    description: Number of instances\n    default: 1\n  operational_policy_name:\n    type: string\n    default: 'pmsh-operational-policy'\n  control_loop_name:\n    type: string\n    default: 'pmsh-control-loop'\n  pmsh_publish_topic_name:\n    type: string\n    default: 'unauthenticated.DCAE_CL_OUTPUT'\n  policy_feedback_topic_name:\n    type: string\n    default: 'unauthenticated.PMSH_CL_INPUT'\n  aai_notification_topic_name:\n    type: string\n    default: 'AAI-EVENT'\n  publisher_client_role:\n    type: string\n    description: Client role to request secure access to topic\n    default: 'org.onap.dcae.pmPublisher'\n  subscriber_client_role:\n    type: string\n    description: Client role to request secure access to topic\n    default: 'org.onap.dcae.pmSubscriber'\n  dcae_location:\n    type: string\n    description: DCAE location for the subscriber, used to set up routing\n    default: 'san-francisco'\n  cpu_limit:\n    type: string\n    default: '1000m'\n  cpu_request:\n    type: string\n    default: '1000m'\n  memory_limit:\n    type: string\n    default: '1024Mi'\n  memory_request:\n    type: string\n    default: '1024Mi'\n  pgaas_cluster_name:\n    type: string\n    default: 'dcae-pg-primary.onap'\n  enable_tls:\n    type: boolean\n    default: true\n  protocol:\n    type: string\n    description: PMSH protocol. If enable_tls is false, set to http\n    default: 'https'\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: 'pmsh'\n  pmsh:\n    type: dcae.nodes.ContainerizedServiceComponentUsingDmaap\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        create:\n          inputs:\n            ports:\n              - '8443:0'\n            envs:\n              PMSH_PG_URL:\n                { get_attribute: [ pgaasvm, admin, host ] }\n              PMSH_PG_PASSWORD:\n                { get_attribute: [ pgaasvm, admin, password ] }\n              PMSH_PG_USERNAME:\n                { get_attribute: [ pgaasvm, admin, user ] }\n              PMSH_DB_NAME:\n                { get_attribute: [ pgaasvm, admin, database ] }\n\n    relationships:\n      - type: cloudify.relationships.depends_on\n        target: pgaasvm\n\n    properties:\n      service_component_type: 'dcae-pmsh'\n      service_component_name_override: 'dcae-pmsh'\n      application_config:\n        enable_tls: { get_input: enable_tls }\n        aaf_identity: 'dcae@dcae.onap.org'\n        aaf_password: 'demo123456!'\n        operational_policy_name: { get_input: operational_policy_name }\n        control_loop_name: { get_input: control_loop_name }\n        cert_path: '/opt/app/pmsh/etc/certs/cert.pem'\n        key_path: '/opt/app/pmsh/etc/certs/key.pem'\n        ca_cert_path: '/opt/app/pmsh/etc/certs/cacert.pem'\n        streams_publishes:\n          policy_pm_publisher:\n            type: message_router\n            dmaap_info:\n              topic_url: {concat: [\"https://message-router:3905/events/\", { get_input: pmsh_publish_topic_name }]}\n        streams_subscribes:\n          policy_pm_subscriber:\n            type: message_router\n            dmaap_info:\n              topic_url: {concat: [\"https://message-router:3905/events/\", { get_input: policy_feedback_topic_name }]}\n          aai_subscriber:\n            type: message_router\n            dmaap_info:\n              topic_url: {concat: [\"https://message-router:3905/events/\", { get_input: aai_notification_topic_name }]}\n      resource_config:\n        limits:\n          cpu: { get_input: cpu_limit }\n          memory: { get_input: memory_limit }\n        requests:\n          cpu: { get_input: cpu_request }\n          memory: { get_input: memory_request }\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: { get_input: protocol }\n      image: { get_input: tag_version }\n      replicas: { get_input: replicas }\n      log_info:\n        log_directory: '/var/log/ONAP/dcaegen2/services/pmsh'\n      tls_info:\n        cert_directory: '/opt/app/pmsh/etc/certs'\n        use_tls: { get_input: enable_tls }\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"626a6a17-91c1-4311-9fbd-a3e4288f6745","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/626a6a17-91c1-4311-9fbd-a3e4288f6745"},"created":1622333396665,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-prh","typeVersion":2105301209,"blueprintTemplate":"# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2018-2020 AT&T\n# Copyright (c) 2018-2020 NOKIA\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  pnfUrl:\n    type: string\n    default: \"https://aai.onap.svc.cluster.local:8443/aai/v12/network/pnfs/pnf\"\n  baseUrl:\n    type: string\n    default: \"https://aai.onap.svc.cluster.local:8443/aai/v12\"\n  aaiEnrichmentHost:\n    type: string\n    default: \"aai.onap.svc.cluster.local\"\n  aaiEnrichmentPort:\n    type: integer\n    default: 8443\n  aaiEnrichmentUser:\n    type: string\n    description: aai user name\n    default: \"AAI\"\n  aaiEnrichmentPasswd:\n    type: string\n    description: aai password\n    default: \"AAI\"\n  dmaap_pnfReady_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.PNF_READY\"\n  dmaap_vesPnfRegOutput_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT\"\n  dmaap_pnfUpdate_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.PNF_UPDATE\"\n  dmaap_user:\n    type: string\n    description: dmap user name\n    default: \"admin\"\n  dmaap_passwd:\n    type: string\n    description: dmap password\n    default: \"admin\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:1.5.5\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  host_port:\n    description: port on Kubernetes host where PRH API will be exposed\n    default: 0\n  container_port:\n    type: integer\n    description: Network port that the platform service exposes in the container\n    default: 8100\n  service_component_type:\n    type: string\n    default: \"dcae-prh\"\n  service_id:\n    type: string\n    default: \"dcae-prh\"\n  secureEnableCert:\n    type: boolean\n    description: enable certificate base connection with AAI and DMaap\n    default: false\n  service_component_name_override:\n    type: string\n    default: \"dcae-prh\"\nnode_templates:\n  prh:\n    properties:\n      application_config:\n        dmaap.dmaapConsumerConfiguration.dmaapUserName: { get_input: dmaap_user }\n        dmaap.dmaapConsumerConfiguration.dmaapUserPassword: { get_input: dmaap_passwd }\n        dmaap.dmaapConsumerConfiguration.dmaapContentType: \"application/json\"\n        dmaap.dmaapConsumerConfiguration.consumerId: \"c12\"\n        dmaap.dmaapConsumerConfiguration.consumerGroup: \"OpenDCAE-c12\"\n        dmaap.dmaapConsumerConfiguration.timeoutMs: -1\n        dmaap.dmaapProducerConfiguration.dmaapUserName: { get_input: dmaap_user }\n        dmaap.dmaapProducerConfiguration.dmaapUserPassword: { get_input: dmaap_passwd }\n        dmaap.dmaapProducerConfiguration.dmaapContentType: \"application/json\"\n        dmaap.dmaapUpdateProducerConfiguration.dmaapUserName: { get_input: dmaap_user }\n        dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword: { get_input: dmaap_passwd }\n        dmaap.dmaapUpdateProducerConfiguration.dmaapContentType: \"application/json\"\n        aai.aaiClientConfiguration.pnfUrl: { get_input: pnfUrl }\n        aai.aaiClientConfiguration.baseUrl: { get_input: baseUrl }\n        aai.aaiClientConfiguration.aaiHost: { get_input: aaiEnrichmentHost }\n        aai.aaiClientConfiguration.aaiHostPortNumber: { get_input: aaiEnrichmentPort }\n        aai.aaiClientConfiguration.aaiProtocol: \"https\"\n        aai.aaiClientConfiguration.aaiUserName: { get_input: aaiEnrichmentUser }\n        aai.aaiClientConfiguration.aaiUserPassword: { get_input: aaiEnrichmentPasswd }\n        aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors: true\n        aai.aaiClientConfiguration.aaiBasePath: \"/aai/v12\"\n        aai.aaiClientConfiguration.aaiPnfPath: \"/network/pnfs/pnf\"\n        aai.aaiClientConfiguration.aaiServiceInstancePath: \"/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}\"\n        aai.aaiClientConfiguration.aaiHeaders:\n            X-FromAppId: \"prh\"\n            X-TransactionId: \"9999\"\n            Accept: \"application/json\"\n            Real-Time: \"true\"\n            Authorization: \"Basic QUFJOkFBSQ==\"\n        security.trustStorePath: \"/opt/app/prh/etc/cert/trust.jks\"\n        security.trustStorePasswordPath: \"/opt/app/prh/etc/cert/trust.pass\"\n        security.keyStorePath: \"/opt/app/prh/etc/cert/cert.jks\"\n        security.keyStorePasswordPath: \"/opt/app/prh/etc/cert/jks.pass\"\n        security.enableAaiCertAuth: { get_input: secureEnableCert }\n        security.enableDmaapCertAuth: { get_input: secureEnableCert }\n        streams_publishes:\n            pnf-update:\n              type: \"message_router\"\n              dmaap_info:\n                topic_url: {get_input: dmaap_pnfUpdate_url }\n            pnf-ready:\n              type: \"message_router\"\n              dmaap_info:\n                topic_url: { get_input: dmaap_pnfReady_url }\n        streams_subscribes:\n            ves-reg-output:\n              type: \"message_router\"\n              dmaap_info:\n                topic_url: { get_input: dmaap_vesPnfRegOutput_url }\n      docker_config:\n        healthcheck:\n          endpoint: /heartbeat\n          interval: 15s\n          timeout: 1s\n          type: http\n        ports:\n          - { concat: [ { get_input: container_port }, ':', { get_input: host_port } ] }\n      image:\n        { get_input: tag_version }\n      replicas: {get_input: replicas}\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      log_info:\n        log_directory: \"/opt/app/prh/logs\"\n      tls_info:\n        cert_directory: '/opt/app/prh/etc/cert'\n        use_tls: true\n    type: dcae.nodes.ContainerizedServiceComponent\n\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"02dee8f6-ebde-4cc9-a34e-3dab46778add","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/02dee8f6-ebde-4cc9-a34e-3dab46778add"},"created":1622333396750,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-restconf","typeVersion":2105301209,"blueprintTemplate":"# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved.\n# Copyright (c) 2019 Huawei. All rights reserved.\n# =================================================================
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 13293  100  6782  100  6511   150k   144k --:--:-- --:--:-- --:--:--  295k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-slice-analysis-ms.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-slice-analysis-ms.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-slice-analysis-ms.yaml .yaml
++ flatten /blueprints/k8s-slice-analysis-ms.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT=' #\n #============LICENSE_START=======================================================\n #Copyright (C) 2020-2021 Wipro Limited.\n #==============================================================================\n #Licensed under the Apache License, Version 2.0 (the \"License\");\n #you may not use this file except in compliance with the License.\n #You may obtain a copy of the License at\n #\n #    http://www.apache.org/licenses/LICENSE-2.0\n #\n #Unless required by applicable law or agreed to in writing, software\n #distributed under the License is distributed on an \"AS IS\" BASIS,\n #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n #See the License for the specific language governing permissions and\n #limitations under the License.\n #============LICENSE_END=========================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\ninputs:\n  replicas:\n    type: integer\n    description: replica count for deployment\n    default: 1\n  tag_version:\n    type: string\n    description: docker image name and version\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.slice-analysis-ms:1.0.4\"\n  pgaas_cluster_name:\n    type: string\n    description: pg cluster\n    default: \"dcae-pg-primary.onap\"\n  database_name:\n    type: string\n    description: database name\n    default: \"sliceanalysisms\"\n  aaf_username:\n    type: string\n    description: aaf username\n    default: \"dcae@dcae.onap.org\"\n  aaf_password:\n    type: string\n    description: aaf password\n    default: \"demo123456!\"\n  dmaap_polling_interval:\n    type: integer\n    description: dmaap polling interval\n    default: 20\n  cbs_polling_interval:\n    type: integer\n    description: cbs polling interval\n    default: 60\n  dmaap_polling_timeout:\n    type: integer\n    description: dmaap polling timeout\n    default: 60\n  namespace:\n    type: string\n    description: namespace\n    default: \"onap\"\n  dmaap:\n    type: string\n    description: dmaap server\n    default: \"message-router\"\n  buffer_time:\n    type: integer\n    description: buffer time\n    default: 60\n  cg:\n    type: string\n    description: consumer group\n    default: \"sliceanalysisms-cg\"\n  cid:\n    type: string\n    description: consumer id\n    default: \"sliceanalysisms-cid\"\n  config_db:\n    type: string\n    description: config db location\n    default: \"http://config-db:8080\"\n  aai:\n    type: string\n    description: aai url\n    default: \"https://aai.onap.svc.cluster.local:8443/aai/v21\"\n  cps:\n    type: string\n    description: cps url\n    default: \"https://cps:8088\"\n  configDbEnabled:\n    type: string\n    description: configDb flag\n    default: \"true\"\n  log_path:\n    type: string\n    description: log location in host\n    default: \"/dockerdata-nfs/slice-analysis-ms\"\n  performance_management_topic_url:\n    type: string\n    description: performance measurement topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS\"\n  intelligent_slicing_topic_url:\n    type: string\n    description: aai event topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.ML_RESPONSE_TOPIC\"\n  dcae_cl_response_topic_url:\n    type: string\n    description: dcae control loop response topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/DCAE_CL_RSP\"\n  dcae_cl_topic_url:\n    type: string\n    description: dcae control loop topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_CL_OUTPUT\"\n  samples:\n    type: integer\n    description: number of samples to be considered for processing\n    default: 3\n  minimumPercentageChange:\n    type: integer\n    description: minimum change above which control loop should be triggered\n    default: 5\n  initialDelaySeconds:\n    type: integer\n    description: delay for the consumer thread\n    default: 120000\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n      use_existing: false\n\n  sliceanalysisms:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              STANDALONE: \"false\"\n            ports:\n              - \"8080:0\"\n            volumes:\n              - host:\n                  path: { get_input: log_path }\n                container:\n                  bind: /home/sliceanalysisms/logs\n                  mode: rw\n    properties:\n      image:\n        get_input: tag_version\n      service_component_type: '\''dcae-slice-analysis-ms'\''\n      service_id: '\''sliceanalysisms'\''\n      always_pull_image: true\n      replicas: {get_input: replicas}\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      tls_info:\n        cert_directory: '\''/opt/app/sliceanalysisms/etc/cert/'\''\n        use_tls: true\n      application_config:\n        aafUsername: { get_input: aaf_username }\n        aafPassword: { get_input: aaf_password }\n        trust_store_path: '\''/opt/app/sliceanalysisms/etc/cert/trust.jks'\''\n        trust_store_pass_path: '\''/opt/app/sliceanalysisms/etc/cert/trust.pass'\''\n        streams_subscribes:\n          performance_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: performance_management_topic_url }\n            type: message-router\n          intelligent_slicing_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: intelligent_slicing_topic_url }\n            type: message-router\n          dcae_cl_response_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_response_topic_url }\n            type: message-router\n        streams_publishes:\n          CL_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_topic_url }\n            type: message-router\n        postgres.host: { get_attribute: [ pgaasvm, admin, host ] }\n        postgres.port: { get_attribute: [ pgaasvm, admin, port ] }\n        postgres.username: { get_attribute: [ pgaasvm, admin, user ] }\n        postgres.password: { get_attribute: [ pgaasvm, admin, password ] }\n        sliceanalysisms.pollingInterval: { get_input: dmaap_polling_interval}\n        sliceanalysisms.pollingTimeout: { get_input: dmaap_polling_timeout }\n        cbsPollingInterval: { get_input: cbs_polling_interval }\n        sliceanalysisms.dmaap.server:\n          - { get_input: dmaap }\n        sliceanalysisms.cg: { get_input: cg }\n        sliceanalysisms.cid: { get_input: cid }\n        sliceanalysisms.configDb.service: { get_input: config_db }\n        sliceanalysisms.configDbEnabled: { get_input: configDbEnabled }\n        sliceanalysisms.aai.url: { get_input: aai }\n        sliceanalysisms.cps.url: { get_input: cps }\n        sliceanalysisms.samples: { get_input: samples }\n        sliceanalysisms.minPercentageChange: { get_input: minimumPercentageChange }\n        sliceanalysisms.initialDelaySeconds: { get_input: initialDelaySeconds }\n    relationships:\n      - type: cloudify.relationships.depends_on\n        target: pgaasvm\n'
++ echo ' #\n #============LICENSE_START=======================================================\n #Copyright (C) 2020-2021 Wipro Limited.\n #==============================================================================\n #Licensed under the Apache License, Version 2.0 (the \"License\");\n #you may not use this file except in compliance with the License.\n #You may obtain a copy of the License at\n #\n #    http://www.apache.org/licenses/LICENSE-2.0\n #\n #Unless required by applicable law or agreed to in writing, software\n #distributed under the License is distributed on an \"AS IS\" BASIS,\n #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n #See the License for the specific language governing permissions and\n #limitations under the License.\n #============LICENSE_END=========================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\ninputs:\n  replicas:\n    type: integer\n    description: replica count for deployment\n    default: 1\n  tag_version:\n    type: string\n    description: docker image name and version\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.slice-analysis-ms:1.0.4\"\n  pgaas_cluster_name:\n    type: string\n    description: pg cluster\n    default: \"dcae-pg-primary.onap\"\n  database_name:\n    type: string\n    description: database name\n    default: \"sliceanalysisms\"\n  aaf_username:\n    type: string\n    description: aaf username\n    default: \"dcae@dcae.onap.org\"\n  aaf_password:\n    type: string\n    description: aaf password\n    default: \"demo123456!\"\n  dmaap_polling_interval:\n    type: integer\n    description: dmaap polling interval\n    default: 20\n  cbs_polling_interval:\n    type: integer\n    description: cbs polling interval\n    default: 60\n  dmaap_polling_timeout:\n    type: integer\n    description: dmaap polling timeout\n    default: 60\n  namespace:\n    type: string\n    description: namespace\n    default: \"onap\"\n  dmaap:\n    type: string\n    description: dmaap server\n    default: \"message-router\"\n  buffer_time:\n    type: integer\n    description: buffer time\n    default: 60\n  cg:\n    type: string\n    description: consumer group\n    default: \"sliceanalysisms-cg\"\n  cid:\n    type: string\n    description: consumer id\n    default: \"sliceanalysisms-cid\"\n  config_db:\n    type: string\n    description: config db location\n    default: \"http://config-db:8080\"\n  aai:\n    type: string\n    description: aai url\n    default: \"https://aai.onap.svc.cluster.local:8443/aai/v21\"\n  cps:\n    type: string\n    description: cps url\n    default: \"https://cps:8088\"\n  configDbEnabled:\n    type: string\n    description: configDb flag\n    default: \"true\"\n  log_path:\n    type: string\n    description: log location in host\n    default: \"/dockerdata-nfs/slice-analysis-ms\"\n  performance_management_topic_url:\n    type: string\n    description: performance measurement topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS\"\n  intelligent_slicing_topic_url:\n    type: string\n    description: aai event topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.ML_RESPONSE_TOPIC\"\n  dcae_cl_response_topic_url:\n    type: string\n    description: dcae control loop response topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/DCAE_CL_RSP\"\n  dcae_cl_topic_url:\n    type: string\n    description: dcae control loop topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_CL_OUTPUT\"\n  samples:\n    type: integer\n    description: number of samples to be considered for processing\n    default: 3\n  minimumPercentageChange:\n    type: integer\n    description: minimum change above which control loop should be triggered\n    default: 5\n  initialDelaySeconds:\n    type: integer\n    description: delay for the consumer thread\n    default: 120000\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n      use_existing: false\n\n  sliceanalysisms:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              STANDALONE: \"false\"\n            ports:\n              - \"8080:0\"\n            volumes:\n              - host:\n                  path: { get_input: log_path }\n                container:\n                  bind: /home/sliceanalysisms/logs\n                  mode: rw\n    properties:\n      image:\n        get_input: tag_version\n      service_component_type: '\''dcae-slice-analysis-ms'\''\n      service_id: '\''sliceanalysisms'\''\n      always_pull_image: true\n      replicas: {get_input: replicas}\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      tls_info:\n        cert_directory: '\''/opt/app/sliceanalysisms/etc/cert/'\''\n        use_tls: true\n      application_config:\n        aafUsername: { get_input: aaf_username }\n        aafPassword: { get_input: aaf_password }\n        trust_store_path: '\''/opt/app/sliceanalysisms/etc/cert/trust.jks'\''\n        trust_store_pass_path: '\''/opt/app/sliceanalysisms/etc/cert/trust.pass'\''\n        streams_subscribes:\n          performance_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: performance_management_topic_url }\n            type: message-router\n          intelligent_slicing_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: intelligent_slicing_topic_url }\n            type: message-router\n          dcae_cl_response_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_response_topic_url }\n            type: message-router\n        streams_publishes:\n          CL_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_topic_url }\n            type: message-router\n        postgres.host: { get_attribute: [ pgaasvm, admin, host ] }\n        postgres.port: { get_attribute: [ pgaasvm, admin, port ] }\n        postgres.username: { get_attribute: [ pgaasvm, admin, user ] }\n        postgres.password: { get_attribute: [ pgaasvm, admin, password ] }\n        sliceanalysisms.pollingInterval: { get_input: dmaap_polling_interval}\n        sliceanalysisms.pollingTimeout: { get_input: dmaap_polling_timeout }\n        cbsPollingInterval: { get_input: cbs_polling_interval }\n        sliceanalysisms.dmaap.server:\n          - { get_input: dmaap }\n        sliceanalysisms.cg: { get_input: cg }\n        sliceanalysisms.cid: { get_input: cid }\n        sliceanalysisms.configDb.service: { get_input: config_db }\n        sliceanalysisms.configDbEnabled: { get_input: configDbEnabled }\n        sliceanalysisms.aai.url: { get_input: aai }\n        sliceanalysisms.cps.url: { get_input: cps }\n        sliceanalysisms.samples: { get_input: samples }\n        sliceanalysisms.minPercentageChange: { get_input: minimumPercentageChange }\n        sliceanalysisms.initialDelaySeconds: { get_input: initialDelaySeconds }\n    relationships:\n      - type: cloudify.relationships.depends_on\n        target: pgaasvm\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-slice-analysis-ms",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": " #\n #============LICENSE_START=======================================================\n #Copyright (C) 2020-2021 Wipro Limited.\n #==============================================================================\n #Licensed under the Apache License, Version 2.0 (the \"License\");\n #you may not use this file except in compliance with the License.\n #You may obtain a copy of the License at\n #\n #    http://www.apache.org/licenses/LICENSE-2.0\n #\n #Unless required by applicable law or agreed to in writing, software\n #distributed under the License is distributed on an \"AS IS\" BASIS,\n #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n #See the License for the specific language governing permissions and\n #limitations under the License.\n #============LICENSE_END=========================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\ninputs:\n  replicas:\n    type: integer\n    description: replica count for deployment\n    default: 1\n  tag_version:\n    type: string\n    description: docker image name and version\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.slice-analysis-ms:1.0.4\"\n  pgaas_cluster_name:\n    type: string\n    description: pg cluster\n    default: \"dcae-pg-primary.onap\"\n  database_name:\n    type: string\n    description: database name\n    default: \"sliceanalysisms\"\n  aaf_username:\n    type: string\n    description: aaf username\n    default: \"dcae@dcae.onap.org\"\n  aaf_password:\n    type: string\n    description: aaf password\n    default: \"demo123456!\"\n  dmaap_polling_interval:\n    type: integer\n    description: dmaap polling interval\n    default: 20\n  cbs_polling_interval:\n    type: integer\n    description: cbs polling interval\n    default: 60\n  dmaap_polling_timeout:\n    type: integer\n    description: dmaap polling timeout\n    default: 60\n  namespace:\n    type: string\n    description: namespace\n    default: \"onap\"\n  dmaap:\n    type: string\n    description: dmaap server\n    default: \"message-router\"\n  buffer_time:\n    type: integer\n    description: buffer time\n    default: 60\n  cg:\n    type: string\n    description: consumer group\n    default: \"sliceanalysisms-cg\"\n  cid:\n    type: string\n    description: consumer id\n    default: \"sliceanalysisms-cid\"\n  config_db:\n    type: string\n    description: config db location\n    default: \"http://config-db:8080\"\n  aai:\n    type: string\n    description: aai url\n    default: \"https://aai.onap.svc.cluster.local:8443/aai/v21\"\n  cps:\n    type: string\n    description: cps url\n    default: \"https://cps:8088\"\n  configDbEnabled:\n    type: string\n    description: configDb flag\n    default: \"true\"\n  log_path:\n    type: string\n    description: log location in host\n    default: \"/dockerdata-nfs/slice-analysis-ms\"\n  performance_management_topic_url:\n    type: string\n    description: performance measurement topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS\"\n  intelligent_slicing_topic_url:\n    type: string\n    description: aai event topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.ML_RESPONSE_TOPIC\"\n  dcae_cl_response_topic_url:\n    type: string\n    description: dcae control loop response topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/DCAE_CL_RSP\"\n  dcae_cl_topic_url:\n    type: string\n    description: dcae control loop topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_CL_OUTPUT\"\n  samples:\n    type: integer\n    description: number of samples to be considered for processing\n    default: 3\n  minimumPercentageChange:\n    type: integer\n    description: minimum change above which control loop should be triggered\n    default: 5\n  initialDelaySeconds:\n    type: integer\n    description: delay for the consumer thread\n    default: 120000\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n      use_existing: false\n\n  sliceanalysisms:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              STANDALONE: \"false\"\n            ports:\n              - \"8080:0\"\n            volumes:\n              - host:\n                  path: { get_input: log_path }\n                container:\n                  bind: /home/sliceanalysisms/logs\n                  mode: rw\n    properties:\n      image:\n        get_input: tag_version\n      service_component_type: '\''dcae-slice-analysis-ms'\''\n      service_id: '\''sliceanalysisms'\''\n      always_pull_image: true\n      replicas: {get_input: replicas}\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      tls_info:\n        cert_directory: '\''/opt/app/sliceanalysisms/etc/cert/'\''\n        use_tls: true\n      application_config:\n        aafUsername: { get_input: aaf_username }\n        aafPassword: { get_input: aaf_password }\n        trust_store_path: '\''/opt/app/sliceanalysisms/etc/cert/trust.jks'\''\n        trust_store_pass_path: '\''/opt/app/sliceanalysisms/etc/cert/trust.pass'\''\n        streams_subscribes:\n          performance_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: performance_management_topic_url }\n            type: message-router\n          intelligent_slicing_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: intelligent_slicing_topic_url }\n            type: message-router\n          dcae_cl_response_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_response_topic_url }\n            type: message-router\n        streams_publishes:\n          CL_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_topic_url }\n            type: message-router\n        postgres.host: { get_attribute: [ pgaasvm, admin, host ] }\n        postgres.port: { get_attribute: [ pgaasvm, admin, port ] }\n        postgres.username: { get_attribute: [ pgaasvm, admin, user ] }\n        postgres.password: { get_attribute: [ pgaasvm, admin, password ] }\n        sliceanalysisms.pollingInterval: { get_input: dmaap_polling_interval}\n        sliceanalysisms.pollingTimeout: { get_input: dmaap_polling_timeout }\n        cbsPollingInterval: { get_input: cbs_polling_interval }\n        sliceanalysisms.dmaap.server:\n          - { get_input: dmaap }\n        sliceanalysisms.cg: { get_input: cg }\n        sliceanalysisms.cid: { get_input: cid }\n        sliceanalysisms.configDb.service: { get_input: config_db }\n        sliceanalysisms.configDbEnabled: { get_input: configDbEnabled }\n        sliceanalysisms.aai.url: { get_input: aai }\n        sliceanalysisms.cps.url: { get_input: cps }\n        sliceanalysisms.samples: { get_input: samples }\n        sliceanalysisms.minPercentageChange: { get_input: minimumPercentageChange }\n        sliceanalysisms.initialDelaySeconds: { get_input: initialDelaySeconds }\n    relationships:\n      - type: cloudify.relationships.depends_on\n        target: pgaasvm\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 16721    0  8496  100  8225   230k   223k --:--:-- --:--:-- --:--:--  453k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-snmptrap.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-snmptrap.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-snmptrap.yaml .yaml
++ flatten /blueprints/k8s-snmptrap.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2018-2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.snmptrap:2.0.4\"\n  cache:\n    type: string\n    default:\n      \"dns_cache_ttl_seconds: 60\"\n  files:\n    type: string\n    default:\n      \"arriving_traps_log: snmptrapd_arriving_traps.log\n      data_dir: data\n      eelf_audit: audit.log\n      eelf_base_dir: /opt/app/snmptrap/logs\n      eelf_debug: debug.log\n      eelf_error: error.log\n      eelf_metrics: metrics.log\n      log_dir: logs\n      minimum_severity_to_log: 2\n      perm_status_file: snmptrapd_status.log\n      pid_dir: tmp\n      roll_frequency: day\n      runtime_base_dir: /opt/app/snmptrap\n      snmptrapd_diag: snmptrapd_prog_diag.log\n      traps_stats_log: snmptrapd_stats.csv\"\n  protocols:\n    type: string\n    default:\n      \"ipv4_interface: 0.0.0.0\n      ipv4_port: 6162\n      ipv6_interface: ::1\n      ipv6_port: 6162\"\n  publisher:\n    type: string\n    default:\n      \"http_milliseconds_between_retries: 750\n      http_milliseconds_timeout: 1500\n      http_peer_publisher: unavailable\n      http_primary_publisher: '\''true'\''\n      http_retries: 3\n      max_milliseconds_between_publishes: 10000\n      max_traps_between_publishes: 10\"\n  sec_fault_unsecure_topic:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.ONAP-COLLECTOR-SNMPTRAP\"\n  snmptrapd:\n    type: string\n    default:\n      \"title: Collector for receiving SNMP traps and publishing to DMAAP/MR\n      version: 2.0.3\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30470\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  service_component_type:\n    type: string\n    default: \"dcae-snmptrap-collector\"\n  service_id:\n    type: string\n    default: \"dcae-snmptrap-collector\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-snmptrap-collector\"\n\n\nnode_templates:\n  snmptrap:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n           ports:\n             - concat: [\"6162/udp:\", { get_input: external_port }]\n    properties:\n      application_config:\n        StormWatchPolicy: '\'''\''\n        cache:\n          get_input: cache\n        files:\n          get_input: files\n        protocols:\n          get_input: protocols\n        publisher:\n          get_input: publisher\n        services_calls: {}\n        snmptrapd:\n          get_input: snmptrapd\n        sw_interval_in_seconds: 60\n        streams_publishes:\n            sec_fault_unsecure:\n              dmaap_info:\n                topic_url:\n                  get_input: sec_fault_unsecure_topic\n              type: message_router\n\n      image:\n        get_input: tag_version\n      replicas: {get_input: replicas}\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n    type: dcae.nodes.ContainerizedServiceComponent\n\n'
++ echo '# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2018-2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.snmptrap:2.0.4\"\n  cache:\n    type: string\n    default:\n      \"dns_cache_ttl_seconds: 60\"\n  files:\n    type: string\n    default:\n      \"arriving_traps_log: snmptrapd_arriving_traps.log\n      data_dir: data\n      eelf_audit: audit.log\n      eelf_base_dir: /opt/app/snmptrap/logs\n      eelf_debug: debug.log\n      eelf_error: error.log\n      eelf_metrics: metrics.log\n      log_dir: logs\n      minimum_severity_to_log: 2\n      perm_status_file: snmptrapd_status.log\n      pid_dir: tmp\n      roll_frequency: day\n      runtime_base_dir: /opt/app/snmptrap\n      snmptrapd_diag: snmptrapd_prog_diag.log\n      traps_stats_log: snmptrapd_stats.csv\"\n  protocols:\n    type: string\n    default:\n      \"ipv4_interface: 0.0.0.0\n      ipv4_port: 6162\n      ipv6_interface: ::1\n      ipv6_port: 6162\"\n  publisher:\n    type: string\n    default:\n      \"http_milliseconds_between_retries: 750\n      http_milliseconds_timeout: 1500\n      http_peer_publisher: unavailable\n      http_primary_publisher: '\''true'\''\n      http_retries: 3\n      max_milliseconds_between_publishes: 10000\n      max_traps_between_publishes: 10\"\n  sec_fault_unsecure_topic:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.ONAP-COLLECTOR-SNMPTRAP\"\n  snmptrapd:\n    type: string\n    default:\n      \"title: Collector for receiving SNMP traps and publishing to DMAAP/MR\n      version: 2.0.3\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30470\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  service_component_type:\n    type: string\n    default: \"dcae-snmptrap-collector\"\n  service_id:\n    type: string\n    default: \"dcae-snmptrap-collector\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-snmptrap-collector\"\n\n\nnode_templates:\n  snmptrap:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n           ports:\n             - concat: [\"6162/udp:\", { get_input: external_port }]\n    properties:\n      application_config:\n        StormWatchPolicy: '\'''\''\n        cache:\n          get_input: cache\n        files:\n          get_input: files\n        protocols:\n          get_input: protocols\n        publisher:\n          get_input: publisher\n        services_calls: {}\n        snmptrapd:\n          get_input: snmptrapd\n        sw_interval_in_seconds: 60\n        streams_publishes:\n            sec_fault_unsecure:\n              dmaap_info:\n                topic_url:\n                  get_input: sec_fault_unsecure_topic\n              type: message_router\n\n      image:\n        get_input: tag_version\n      replicas: {get_input: replicas}\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n    type: dcae.nodes.ContainerizedServiceComponent\n\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-snmptrap",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2018-2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.snmptrap:2.0.4\"\n  cache:\n    type: string\n    default:\n      \"dns_cache_ttl_seconds: 60\"\n  files:\n    type: string\n    default:\n      \"arriving_traps_log: snmptrapd_arriving_traps.log\n      data_dir: data\n      eelf_audit: audit.log\n      eelf_base_dir: /opt/app/snmptrap/logs\n      eelf_debug: debug.log\n      eelf_error: error.log\n      eelf_metrics: metrics.log\n      log_dir: logs\n      minimum_severity_to_log: 2\n      perm_status_file: snmptrapd_status.log\n      pid_dir: tmp\n      roll_frequency: day\n      runtime_base_dir: /opt/app/snmptrap\n      snmptrapd_diag: snmptrapd_prog_diag.log\n      traps_stats_log: snmptrapd_stats.csv\"\n  protocols:\n    type: string\n    default:\n      \"ipv4_interface: 0.0.0.0\n      ipv4_port: 6162\n      ipv6_interface: ::1\n      ipv6_port: 6162\"\n  publisher:\n    type: string\n    default:\n      \"http_milliseconds_between_retries: 750\n      http_milliseconds_timeout: 1500\n      http_peer_publisher: unavailable\n      http_primary_publisher: '\''true'\''\n      http_retries: 3\n      max_milliseconds_between_publishes: 10000\n      max_traps_between_publishes: 10\"\n  sec_fault_unsecure_topic:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.ONAP-COLLECTOR-SNMPTRAP\"\n  snmptrapd:\n    type: string\n    default:\n      \"title: Collector for receiving SNMP traps and publishing to DMAAP/MR\n      version: 2.0.3\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30470\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  service_component_type:\n    type: string\n    default: \"dcae-snmptrap-collector\"\n  service_id:\n    type: string\n    default: \"dcae-snmptrap-collector\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-snmptrap-collector\"\n\n\nnode_templates:\n  snmptrap:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n           ports:\n             - concat: [\"6162/udp:\", { get_input: external_port }]\n    properties:\n      application_config:\n        StormWatchPolicy: '\'''\''\n        cache:\n          get_input: cache\n        files:\n          get_input: files\n        protocols:\n          get_input: protocols\n        publisher:\n          get_input: publisher\n        services_calls: {}\n        snmptrapd:\n          get_input: snmptrapd\n        sw_interval_in_seconds: 60\n        streams_publishes:\n            sec_fault_unsecure:\n              dmaap_info:\n                topic_url:\n                  get_input: sec_fault_unsecure_topic\n              type: message_router\n\n      image:\n        get_input: tag_version\n      replicas: {get_input: replicas}\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n    type: dcae.nodes.ContainerizedServiceComponent\n\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
============\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\ndescription: >\n  This blueprint deploys/manages the RestConf Collector module as a Docker container\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  dmaap_host:\n    type: string\n    default: \"message-router.onap.svc.cluster.local\"\n  dmaap_port:\n    type: string\n    default: \"3904\"\n  tag_version:\n    type: string\n    default:  \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.restconfcollector:1.2.4\"\n  consul_host:\n    type: string\n    default: \"consul-server.onap.svc.cluster.local\"\n  consul_port:\n    type: string\n    default: \"8500\"\n  cbs_host:\n    type: string\n    default: \"config-binding-service.dcae.svc.cluster.local\"\n  cbs_port:\n    type: string\n    default: \"10000\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30416\"\n  notification_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_RCC_OUTPUT\"\n  service_component_type:\n    type: string\n    default: \"dcae-restconf-collector\"\n  service_id:\n    type: string\n    default: \"dcae-restconf-collector\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-restconf-collector\"\n\nnode_templates:\n  rcc_k8s:\n    type: dcae.nodes.ContainerizedServiceComponent\n    properties:\n        docker_config:\n            healthcheck:\n              endpoint: /healthcheck\n              interval: 15s\n              timeout: 1s\n              type: http\n        image:\n          get_input: tag_version\n        log_info:\n          log_directory: \"/opt/app/RCCollector/logs\"\n        application_config:\n            collector.rcc.appDescription: DCAE RestConf Collector Application\n            collector.rcc.appName: \"dcae-rcc\"\n            collector.rcc.dmaap.streamid: \"notification=device-registration\"\n            collector.rcc.inputQueue.maxPending: \"8096\"\n            tomcat.maxthreads: \"200\"\n            collector.rcc.service.port: \"8080\"\n            collector.rcc.service.secure.port: \"8687\"\n            collector.rcc.keystore.file.location: \"/opt/app/restconfcollector/etc/keystore\"\n            collector.rcc.keystore.passwordfile: \"/opt/app/restconfcollector/etc/rcc_passwordfile\"\n            collector.rcc.keystore.alias: \"dynamically generated\"\n            collector.rcc.truststore.file.location: \"/opt/app/restconfcollector/etc/truststore.onap.client.jks\"\n            collector.rcc.truststore.passwordfile: \"/opt/app/restconfcollector/etc/trustpasswordfile\"\n            collector.keystore.file.location: \"/opt/app/restconfcollector/etc/sdnc.p12\"\n            collector.keystore.passwordfile: \"/opt/app/restconfcollector/etc/passwordfile\"\n            collector.header.authflag: \"0\"\n            collector.header.authlist: \"sample1,c2FtcGxlMQ==\"\n            collector.rcc.service.secure.clientauth: \"0\"\n            streams_publishes:\n                        device-registration:\n                          dmaap_info:\n                            topic_url:\n                              get_input: notification_publish_url\n                          type: message_router\n            rcc_policy: '[{\"controller_name\":\"AccessM&C\",\"controller_restapiUrl\":\"172.30.0.55:26335\",\"controller_restapiUser\":\"access\",\"controller_restapiPassword\":\"Huawei@123\",\"controller_accessTokenUrl\":\"/rest/plat/smapp/v1/oauth/token\",\"controller_accessTokenFile\":\"./etc/access-token.json\",\"controller_accessTokenMethod\":\"put\",\"controller_subsMethod\":\"post\",\"controller_subscriptionUrl\":\"/restconf/v1/operations/huawei-nce-notification-action:establish-subscription\",\"controller_disableSsl\":\"true\",\"event_details\":[{\"event_name\":\"ONT_registration\",\"event_description\":\"ONTregistartionevent\",\"event_sseventUrlEmbed\":\"true\",\"event_sseventsField\":\"output.url\",\"event_sseventsUrl\":\"null\",\"event_subscriptionTemplate\":\"./etc/ont_registartion_subscription_template.json\",\"event_unSubscriptionTemplate\":\"./etc/ont_registartion_unsubscription_template.json\",\"event_ruleId\":\"12345678\",\"modifyData\": \"true\",\"modifyMethod\": \"modifyOntEvent\",\"userData\": \"remote_id=AC9.0234.0337;svlan=100;cvlan=10;\"}]}]'\n        service_component_type: { get_input: service_component_type }\n        service_id: { get_input: service_id }\n        service_component_name_override: { get_input: service_component_name_override }\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n                DMAAPHOST:\n                    { get_input: dmaap_host }\n                DMAAPPORT: \"3904\"\n                DMAAPPUBTOPIC: \"unauthenticated.DCAE_RCC_OUTPUT\"\n                CONSUL_HOST:\n                    { get_input: consul_host }\n                CONSUL_PORT: \"8500\"\n                CBS_HOST:\n                    { get_input: cbs_host }\n                CBS_PORT: \"10000\"\n                CONFIG_BINDING_SERVICE: \"config_binding_service\"\n            ports:\n              - concat: [\"8080:\", { get_input: external_port }]\n\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"fa6f4978-1aa8-4c7e-9a38-6ede69f692c1","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/fa6f4978-1aa8-4c7e-9a38-6ede69f692c1"},"created":1622333396848,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-slice-analysis-ms","typeVersion":2105301209,"blueprintTemplate":" #\n #============LICENSE_START=======================================================\n #Copyright (C) 2020-2021 Wipro Limited.\n #==============================================================================\n #Licensed under the Apache License, Version 2.0 (the \"License\");\n #you may not use this file except in compliance with the License.\n #You may obtain a copy of the License at\n #\n #    http://www.apache.org/licenses/LICENSE-2.0\n #\n #Unless required by applicable law or agreed to in writing, software\n #distributed under the License is distributed on an \"AS IS\" BASIS,\n #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n #See the License for the specific language governing permissions and\n #limitations under the License.\n #============LICENSE_END=========================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\ninputs:\n  replicas:\n    type: integer\n    description: replica count for deployment\n    default: 1\n  tag_version:\n    type: string\n    description: docker image name and version\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.slice-analysis-ms:1.0.4\"\n  pgaas_cluster_name:\n    type: string\n    description: pg cluster\n    default: \"dcae-pg-primary.onap\"\n  database_name:\n    type: string\n    description: database name\n    default: \"sliceanalysisms\"\n  aaf_username:\n    type: string\n    description: aaf username\n    default: \"dcae@dcae.onap.org\"\n  aaf_password:\n    type: string\n    description: aaf password\n    default: \"demo123456!\"\n  dmaap_polling_interval:\n    type: integer\n    description: dmaap polling interval\n    default: 20\n  cbs_polling_interval:\n    type: integer\n    description: cbs polling interval\n    default: 60\n  dmaap_polling_timeout:\n    type: integer\n    description: dmaap polling timeout\n    default: 60\n  namespace:\n    type: string\n    description: namespace\n    default: \"onap\"\n  dmaap:\n    type: string\n    description: dmaap server\n    default: \"message-router\"\n  buffer_time:\n    type: integer\n    description: buffer time\n    default: 60\n  cg:\n    type: string\n    description: consumer group\n    default: \"sliceanalysisms-cg\"\n  cid:\n    type: string\n    description: consumer id\n    default: \"sliceanalysisms-cid\"\n  config_db:\n    type: string\n    description: config db location\n    default: \"http://config-db:8080\"\n  aai:\n    type: string\n    description: aai url\n    default: \"https://aai.onap.svc.cluster.local:8443/aai/v21\"\n  cps:\n    type: string\n    description: cps url\n    default: \"https://cps:8088\"\n  configDbEnabled:\n    type: string\n    description: configDb flag\n    default: \"true\"\n  log_path:\n    type: string\n    description: log location in host\n    default: \"/dockerdata-nfs/slice-analysis-ms\"\n  performance_management_topic_url:\n    type: string\n    description: performance measurement topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS\"\n  intelligent_slicing_topic_url:\n    type: string\n    description: aai event topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.ML_RESPONSE_TOPIC\"\n  dcae_cl_response_topic_url:\n    type: string\n    description: dcae control loop response topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/DCAE_CL_RSP\"\n  dcae_cl_topic_url:\n    type: string\n    description: dcae control loop topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_CL_OUTPUT\"\n  samples:\n    type: integer\n    description: number of samples to be considered for processing\n    default: 3\n  minimumPercentageChange:\n    type: integer\n    description: minimum change above which control loop should be triggered\n    default: 5\n  initialDelaySeconds:\n    type: integer\n    description: delay for the consumer thread\n    default: 120000\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n      use_existing: false\n\n  sliceanalysisms:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              STANDALONE: \"false\"\n            ports:\n              - \"8080:0\"\n            volumes:\n              - host:\n                  path: { get_input: log_path }\n                container:\n                  bind: /home/sliceanalysisms/logs\n                  mode: rw\n    properties:\n      image:\n        get_input: tag_version\n      service_component_type: 'dcae-slice-analysis-ms'\n      service_id: 'sliceanalysisms'\n      always_pull_image: true\n      replicas: {get_input: replicas}\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      tls_info:\n        cert_directory: '/opt/app/sliceanalysisms/etc/cert/'\n        use_tls: true\n      application_config:\n        aafUsername: { get_input: aaf_username }\n        aafPassword: { get_input: aaf_password }\n        trust_store_path: '/opt/app/sliceanalysisms/etc/cert/trust.jks'\n        trust_store_pass_path: '/opt/app/sliceanalysisms/etc/cert/trust.pass'\n        streams_subscribes:\n          performance_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: performance_management_topic_url }\n            type: message-router\n          intelligent_slicing_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: intelligent_slicing_topic_url }\n            type: message-router\n          dcae_cl_response_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_response_topic_url }\n            type: message-router\n        streams_publishes:\n          CL_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_topic_url }\n            type: message-router\n        postgres.host: { get_attribute: [ pgaasvm, admin, host ] }\n        postgres.port: { get_attribute: [ pgaasvm, admin, port ] }\n        postgres.username: { get_attribute: [ pgaasvm, admin, user ] }\n        postgres.password: { get_attribute: [ pgaasvm, admin, password ] }\n        sliceanalysisms.pollingInterval: { get_input: dmaap_polling_interval}\n        sliceanalysisms.pollingTimeout: { get_input: dmaap_polling_timeout }\n        cbsPollingInterval: { get_input: cbs_polling_interval }\n        sliceanalysisms.dmaap.server:\n          - { get_input: dmaap }\n        sliceanalysisms.cg: { get_input: cg }\n        sliceanalysisms.cid: { get_input: cid }\n        sliceanalysisms.configDb.service: { get_input: config_db }\n        sliceanalysisms.configDbEnabled: { get_input: configDbEnabled }\n        sliceanalysisms.aai.url: { get_input: aai }\n        sliceanalysisms.cps.url: { get_input: cps }\n        sliceanalysisms.samples: { get_input: samples }\n        sliceanalysisms.minPercentageChange: { get_input: minimumPercentageChange }\n        sliceanalysisms.initialDelaySeconds: { get_input: initialDelaySeconds }\n    relationships:\n      - type: cloudify.relationships.depends_on\n        target: pgaasvm\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"a1de1828-e4a8-40a6-b009-962791cfd312","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/a1de1828-e4a8-40a6-b009-962791cfd312"},"created":1622333396951,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-snmptrap","typeVersion":2105301209,"blueprintTemplate":"# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2018-2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.snmptrap:2.0.4\"\n  cache:\n    type: string\n    default:\n      \"dns_cache_ttl_seconds: 60\"\n  files:\n    type: string\n    default:\n      \"arriving_traps_l
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  9393  100  4832  100  4561   174k   164k --:--:-- --:--:-- --:--:--  339k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-sonhms.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-sonhms.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-sonhms.yaml .yaml
++ flatten /blueprints/k8s-sonhms.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT=' #============LICENSE_START=======================================================\n #    son-handler\n #   ================================================================================\n #     Copyright (C) 2019-2020 Wipro Limited.\n #     ==============================================================================\n #       Licensed under the Apache License, Version 2.0 (the \"License\");\n #       you may not use this file except in compliance with the License.\n #       You may obtain a copy of the License at\n #\n #            http://www.apache.org/licenses/LICENSE-2.0\n #\n #       Unless required by applicable law or agreed to in writing, software\n #       distributed under the License is distributed on an \"AS IS\" BASIS,\n #       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n #       See the License for the specific language governing permissions and\n #       limitations under the License.\n #       ============LICENSE_END=========================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - \"https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\"\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\n  - plugin:dcaepolicyplugin?version=2.4.0\ninputs:\n  replicas:\n    type: integer\n    description: replica count for deployment\n    default: 1\n  tag_version:\n    type: string\n    description: docker image name and version\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.son-handler:2.1.3\"\n  pgaas_cluster_name:\n    type: string\n    description: pg cluster\n    default: \"dcae-pg-primary.onap\"\n  database_name:\n    type: string\n    description: database name\n    default: \"sonhms\"\n  aaf_username:\n    type: string\n    description: aaf username\n    default:\n  aaf_password:\n    type: string\n    description: aaf password\n    default:\n  polling_interval:\n    type: integer\n    description: dmaap polling interval\n    default: 20\n  cbs_polling_interval:\n    type: integer\n    description: cbs polling interval\n    default: 60\n  polling_timeout:\n    type: integer\n    description: dmaap polling timeout\n    default: 60\n  num_solutions:\n    type: integer\n    description: num of solutions\n    default: 5\n  min_collision:\n    type: integer\n    description: minimum no. of collisions\n    default: 5\n  min_confusion:\n    type: integer\n    description: minimum no. of confusions\n    default: 5\n  max_clusters:\n    type: integer\n    description: maximum clusters\n    default: 5\n  bad_threshold:\n    type: integer\n    description: threshold for bad neighbors\n    default: 50\n  poor_threshold:\n    type: integer\n    description: threshold for poor neighbors\n    default: 70\n  namespace:\n    type: string\n    description: namespace\n    default: \"onap\"\n  dmaap:\n    type: string\n    description: dmaap server\n    default: \"message-router\"\n  buffer_time:\n    type: integer\n    description: buffer time\n    default: 60\n  cg:\n    type: string\n    description: consumer group\n    default: \"sonhms-cg\"\n  cid:\n    type: string\n    description: consumer id\n    default: \"sonhms-cid\"\n  config_db:\n    type: string\n    description: config db location\n    default: \"http://sdnc.onap:8181\"\n  oof:\n    type: string\n    description: oof location\n    default: \"https://oof-osdf.onap:8698\"\n  oof_endpoint:\n    type: string\n    description: oof endpoint\n    default: \"/api/oof/v1/pci\"\n  pci_optimizer:\n    type: string\n    description: pci optimizer name in oof\n    default: \"pci\"\n  pci_anr_optimizer:\n    type: string\n    description: pci and anr optimizer name in oof\n    default: \"pci_anr\"\n  log_path:\n    type: string\n    description: log location in host\n    default: \"/dockerdata-nfs/son-handler\"\n  poorCountThreshold:\n    type: integer\n    description: poor neighbor count threshold\n    default: 3\n  badCountThreshold:\n    type: integer\n    description: bad neighbor count threshold\n    default: 3\n  oofTriggerCountTimer:\n    type: integer\n    description: timer for oof triggered count in minutes\n    default: 30\n  oofTriggerCountThreshold:\n    type: integer\n    description: Threshold for oof trigger count\n    default: 5\n  policyRespTimer:\n    type: integer\n    description: policy response wait timer in seconds\n    default: 10\n  policy_id:\n    type: string\n    description: policy id for config policy\n    default: \"com.Config_PCIMS_CONFIG_POLICY\"\n  performance_management_topic_url:\n    type: string\n    description: ves measurement topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  fault_management_topic_url:\n    type: string\n    description: ves fault topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.SEC_FAULT_OUTPUT\"\n  nbr_list_change_topic_url:\n    type: string\n    description: neighbor list change notification topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/PCI-NOTIF-TOPIC-NGHBR-LIST-CHANGE-INFO\"\n  dcae_cl_response_topic_url:\n    type: string\n    description: dcae control loop response topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/DCAE_CL_RSP\"\n  dcae_cl_topic_url:\n    type: string\n    description: dcae control loop topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_CL_OUTPUT\"\n  policyNegativeAckThreshold:\n    type: integer\n    description: negative acknowledgement from policy threshold\n    default: 3\n  policyFixedPciTimeInterval:\n    type: integer\n    description: time interval for checking FixedPci table\n    default: 30000\n  nfNamingCode:\n    type: string\n    description: filter fm and pm notification using this parameter\n    default: \"RansimAgent\"\n\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n      use_existing: false\n\n  sonhms:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              STANDALONE: \"false\"\n            ports:\n              - \"8080:0\"\n            volumes:\n              - host:\n                  path: { get_input: log_path }\n                container:\n                  bind: /home/sonhms/logs\n                  mode: rw\n    properties:\n      image:\n        get_input: tag_version\n      service_component_type: '\''dcae-sonhms'\''\n      service_id: '\''sonhms'\''\n      always_pull_image: true\n      replicas: {get_input: replicas}\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      application_config:\n        streams_subscribes:\n          performance_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: performance_management_topic_url }\n            type: message-router\n          fault_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: fault_management_topic_url }\n            type: message-router\n          nbr_list_change_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: nbr_list_change_topic_url }\n            type: message-router\n          dcae_cl_response_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_response_topic_url }\n            type: message-router\n        streams_publishes:\n          CL_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_topic_url }\n            type: message-router\n        postgres.host: { get_attribute: [ pgaasvm, admin, host ] }\n        postgres.port: { get_attribute: [ pgaasvm, admin, port ] }\n        postgres.username: { get_attribute: [ pgaasvm, admin, user ] }\n        postgres.password: { get_attribute: [ pgaasvm, admin, password ] }\n        sonhandler.pollingInterval: { get_input: polling_interval}\n        sonhandler.pollingTimeout: { get_input: polling_timeout }\n        cbsPollingInterval: { get_input: cbs_polling_interval }\n        sonhandler.numSolutions: { get_input: num_solutions }\n        sonhandler.minCollision: { get_input: min_collision }\n        sonhandler.minConfusion: { get_input: min_confusion }\n        sonhandler.maximumClusters: { get_input: max_clusters }\n        sonhandler.badThreshold: { get_input: bad_threshold }\n        sonhandler.poorThreshold: { get_input: poor_threshold }\n        sonhandler.namespace: { get_input: namespace }\n        sonhandler.sourceId: SONHMS\n        sonhandler.dmaap.server:\n          - { get_input: dmaap }\n        sonhandler.bufferTime: { get_input: buffer_time }\n        sonhandler.cg: { get_input: cg }\n        sonhandler.cid: { get_input: cid }\n        sonhandler.configDb.service: { get_input: config_db }\n        sonhandler.oof.service: { get_input: oof }\n        sonhandler.oof.endpoint: { get_input: oof_endpoint }\n        sonhandler.pciOptimizer: { get_input: pci_optimizer }\n        sonhandler.pciAnrOptimizer: { get_input: pci_anr_optimizer }\n        sonhandler.poorCountThreshold: { get_input: poorCountThreshold}\n        sonhandler.badCountThreshold: { get_input: badCountThreshold}\n        sonhandler.oofTriggerCountTimer: { get_input: oofTriggerCountTimer}\n        sonhandler.oofTriggerCountThreshold: { get_input: oofTriggerCountThreshold}\n        sonhandler.policyRespTimer: { get_input: policyRespTimer}\n        sonhandler.policyNegativeAckThreshold: { get_input: policyNegativeAckThreshold}\n        sonhandler.policyFixedPciTimeInterval: { get_input: policyFixedPciTimeInterval}\n        sonhandler.nfNamingCode: { get_input: nfNamingCode}\n        service_calls:\n          sdnr-getpnfname: []\n          sdnr-getpci: []\n          sdnr-getnbrlist: []\n          sdnr-getcelllist: []\n          oof-req: []\n          policy-req: []\n    relationships:\n      - type: cloudify.relationships.depends_on\n        target: pgaasvm\n      - type: cloudify.relationships.depends_on\n        target: son_policy\n\n  son_policy:\n    type: dcae.nodes.policy\n    properties:\n      policy_id:\n           get_input: policy_id\n\n\n\n\n'
++ echo ' #============LICENSE_START=======================================================\n #    son-handler\n #   ================================================================================\n #     Copyright (C) 2019-2020 Wipro Limited.\n #     ==============================================================================\n #       Licensed under the Apache License, Version 2.0 (the \"License\");\n #       you may not use this file except in compliance with the License.\n #       You may obtain a copy of the License at\n #\n #            http://www.apache.org/licenses/LICENSE-2.0\n #\n #       Unless required by applicable law or agreed to in writing, software\n #       distributed under the License is distributed on an \"AS IS\" BASIS,\n #       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n #       See the License for the specific language governing permissions and\n #       limitations under the License.\n #       ============LICENSE_END=========================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - \"https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\"\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\n  - plugin:dcaepolicyplugin?version=2.4.0\ninputs:\n  replicas:\n    type: integer\n    description: replica count for deployment\n    default: 1\n  tag_version:\n    type: string\n    description: docker image name and version\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.son-handler:2.1.3\"\n  pgaas_cluster_name:\n    type: string\n    description: pg cluster\n    default: \"dcae-pg-primary.onap\"\n  database_name:\n    type: string\n    description: database name\n    default: \"sonhms\"\n  aaf_username:\n    type: string\n    description: aaf username\n    default:\n  aaf_password:\n    type: string\n    description: aaf password\n    default:\n  polling_interval:\n    type: integer\n    description: dmaap polling interval\n    default: 20\n  cbs_polling_interval:\n    type: integer\n    description: cbs polling interval\n    default: 60\n  polling_timeout:\n    type: integer\n    description: dmaap polling timeout\n    default: 60\n  num_solutions:\n    type: integer\n    description: num of solutions\n    default: 5\n  min_collision:\n    type: integer\n    description: minimum no. of collisions\n    default: 5\n  min_confusion:\n    type: integer\n    description: minimum no. of confusions\n    default: 5\n  max_clusters:\n    type: integer\n    description: maximum clusters\n    default: 5\n  bad_threshold:\n    type: integer\n    description: threshold for bad neighbors\n    default: 50\n  poor_threshold:\n    type: integer\n    description: threshold for poor neighbors\n    default: 70\n  namespace:\n    type: string\n    description: namespace\n    default: \"onap\"\n  dmaap:\n    type: string\n    description: dmaap server\n    default: \"message-router\"\n  buffer_time:\n    type: integer\n    description: buffer time\n    default: 60\n  cg:\n    type: string\n    description: consumer group\n    default: \"sonhms-cg\"\n  cid:\n    type: string\n    description: consumer id\n    default: \"sonhms-cid\"\n  config_db:\n    type: string\n    description: config db location\n    default: \"http://sdnc.onap:8181\"\n  oof:\n    type: string\n    description: oof location\n    default: \"https://oof-osdf.onap:8698\"\n  oof_endpoint:\n    type: string\n    description: oof endpoint\n    default: \"/api/oof/v1/pci\"\n  pci_optimizer:\n    type: string\n    description: pci optimizer name in oof\n    default: \"pci\"\n  pci_anr_optimizer:\n    type: string\n    description: pci and anr optimizer name in oof\n    default: \"pci_anr\"\n  log_path:\n    type: string\n    description: log location in host\n    default: \"/dockerdata-nfs/son-handler\"\n  poorCountThreshold:\n    type: integer\n    description: poor neighbor count threshold\n    default: 3\n  badCountThreshold:\n    type: integer\n    description: bad neighbor count threshold\n    default: 3\n  oofTriggerCountTimer:\n    type: integer\n    description: timer for oof triggered count in minutes\n    default: 30\n  oofTriggerCountThreshold:\n    type: integer\n    description: Threshold for oof trigger count\n    default: 5\n  policyRespTimer:\n    type: integer\n    description: policy response wait timer in seconds\n    default: 10\n  policy_id:\n    type: string\n    description: policy id for config policy\n    default: \"com.Config_PCIMS_CONFIG_POLICY\"\n  performance_management_topic_url:\n    type: string\n    description: ves measurement topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  fault_management_topic_url:\n    type: string\n    description: ves fault topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.SEC_FAULT_OUTPUT\"\n  nbr_list_change_topic_url:\n    type: string\n    description: neighbor list change notification topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/PCI-NOTIF-TOPIC-NGHBR-LIST-CHANGE-INFO\"\n  dcae_cl_response_topic_url:\n    type: string\n    description: dcae control loop response topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/DCAE_CL_RSP\"\n  dcae_cl_topic_url:\n    type: string\n    description: dcae control loop topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_CL_OUTPUT\"\n  policyNegativeAckThreshold:\n    type: integer\n    description: negative acknowledgement from policy threshold\n    default: 3\n  policyFixedPciTimeInterval:\n    type: integer\n    description: time interval for checking FixedPci table\n    default: 30000\n  nfNamingCode:\n    type: string\n    description: filter fm and pm notification using this parameter\n    default: \"RansimAgent\"\n\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n      use_existing: false\n\n  sonhms:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              STANDALONE: \"false\"\n            ports:\n              - \"8080:0\"\n            volumes:\n              - host:\n                  path: { get_input: log_path }\n                container:\n                  bind: /home/sonhms/logs\n                  mode: rw\n    properties:\n      image:\n        get_input: tag_version\n      service_component_type: '\''dcae-sonhms'\''\n      service_id: '\''sonhms'\''\n      always_pull_image: true\n      replicas: {get_input: replicas}\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      application_config:\n        streams_subscribes:\n          performance_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: performance_management_topic_url }\n            type: message-router\n          fault_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: fault_management_topic_url }\n            type: message-router\n          nbr_list_change_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: nbr_list_change_topic_url }\n            type: message-router\n          dcae_cl_response_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_response_topic_url }\n            type: message-router\n        streams_publishes:\n          CL_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_topic_url }\n            type: message-router\n        postgres.host: { get_attribute: [ pgaasvm, admin, host ] }\n        postgres.port: { get_attribute: [ pgaasvm, admin, port ] }\n        postgres.username: { get_attribute: [ pgaasvm, admin, user ] }\n        postgres.password: { get_attribute: [ pgaasvm, admin, password ] }\n        sonhandler.pollingInterval: { get_input: polling_interval}\n        sonhandler.pollingTimeout: { get_input: polling_timeout }\n        cbsPollingInterval: { get_input: cbs_polling_interval }\n        sonhandler.numSolutions: { get_input: num_solutions }\n        sonhandler.minCollision: { get_input: min_collision }\n        sonhandler.minConfusion: { get_input: min_confusion }\n        sonhandler.maximumClusters: { get_input: max_clusters }\n        sonhandler.badThreshold: { get_input: bad_threshold }\n        sonhandler.poorThreshold: { get_input: poor_threshold }\n        sonhandler.namespace: { get_input: namespace }\n        sonhandler.sourceId: SONHMS\n        sonhandler.dmaap.server:\n          - { get_input: dmaap }\n        sonhandler.bufferTime: { get_input: buffer_time }\n        sonhandler.cg: { get_input: cg }\n        sonhandler.cid: { get_input: cid }\n        sonhandler.configDb.service: { get_input: config_db }\n        sonhandler.oof.service: { get_input: oof }\n        sonhandler.oof.endpoint: { get_input: oof_endpoint }\n        sonhandler.pciOptimizer: { get_input: pci_optimizer }\n        sonhandler.pciAnrOptimizer: { get_input: pci_anr_optimizer }\n        sonhandler.poorCountThreshold: { get_input: poorCountThreshold}\n        sonhandler.badCountThreshold: { get_input: badCountThreshold}\n        sonhandler.oofTriggerCountTimer: { get_input: oofTriggerCountTimer}\n        sonhandler.oofTriggerCountThreshold: { get_input: oofTriggerCountThreshold}\n        sonhandler.policyRespTimer: { get_input: policyRespTimer}\n        sonhandler.policyNegativeAckThreshold: { get_input: policyNegativeAckThreshold}\n        sonhandler.policyFixedPciTimeInterval: { get_input: policyFixedPciTimeInterval}\n        sonhandler.nfNamingCode: { get_input: nfNamingCode}\n        service_calls:\n          sdnr-getpnfname: []\n          sdnr-getpci: []\n          sdnr-getnbrlist: []\n          sdnr-getcelllist: []\n          oof-req: []\n          policy-req: []\n    relationships:\n      - type: cloudify.relationships.depends_on\n        target: pgaasvm\n      - type: cloudify.relationships.depends_on\n        target: son_policy\n\n  son_policy:\n    type: dcae.nodes.policy\n    properties:\n      policy_id:\n           get_input: policy_id\n\n\n\n\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-sonhms",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": " #============LICENSE_START=======================================================\n #    son-handler\n #   ================================================================================\n #     Copyright (C) 2019-2020 Wipro Limited.\n #     ==============================================================================\n #       Licensed under the Apache License, Version 2.0 (the \"License\");\n #       you may not use this file except in compliance with the License.\n #       You may obtain a copy of the License at\n #\n #            http://www.apache.org/licenses/LICENSE-2.0\n #\n #       Unless required by applicable law or agreed to in writing, software\n #       distributed under the License is distributed on an \"AS IS\" BASIS,\n #       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n #       See the License for the specific language governing permissions and\n #       limitations under the License.\n #       ============LICENSE_END=========================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - \"https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\"\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\n  - plugin:dcaepolicyplugin?version=2.4.0\ninputs:\n  replicas:\n    type: integer\n    description: replica count for deployment\n    default: 1\n  tag_version:\n    type: string\n    description: docker image name and version\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.son-handler:2.1.3\"\n  pgaas_cluster_name:\n    type: string\n    description: pg cluster\n    default: \"dcae-pg-primary.onap\"\n  database_name:\n    type: string\n    description: database name\n    default: \"sonhms\"\n  aaf_username:\n    type: string\n    description: aaf username\n    default:\n  aaf_password:\n    type: string\n    description: aaf password\n    default:\n  polling_interval:\n    type: integer\n    description: dmaap polling interval\n    default: 20\n  cbs_polling_interval:\n    type: integer\n    description: cbs polling interval\n    default: 60\n  polling_timeout:\n    type: integer\n    description: dmaap polling timeout\n    default: 60\n  num_solutions:\n    type: integer\n    description: num of solutions\n    default: 5\n  min_collision:\n    type: integer\n    description: minimum no. of collisions\n    default: 5\n  min_confusion:\n    type: integer\n    description: minimum no. of confusions\n    default: 5\n  max_clusters:\n    type: integer\n    description: maximum clusters\n    default: 5\n  bad_threshold:\n    type: integer\n    description: threshold for bad neighbors\n    default: 50\n  poor_threshold:\n    type: integer\n    description: threshold for poor neighbors\n    default: 70\n  namespace:\n    type: string\n    description: namespace\n    default: \"onap\"\n  dmaap:\n    type: string\n    description: dmaap server\n    default: \"message-router\"\n  buffer_time:\n    type: integer\n    description: buffer time\n    default: 60\n  cg:\n    type: string\n    description: consumer group\n    default: \"sonhms-cg\"\n  cid:\n    type: string\n    description: consumer id\n    default: \"sonhms-cid\"\n  config_db:\n    type: string\n    description: config db location\n    default: \"http://sdnc.onap:8181\"\n  oof:\n    type: string\n    description: oof location\n    default: \"https://oof-osdf.onap:8698\"\n  oof_endpoint:\n    type: string\n    description: oof endpoint\n    default: \"/api/oof/v1/pci\"\n  pci_optimizer:\n    type: string\n    description: pci optimizer name in oof\n    default: \"pci\"\n  pci_anr_optimizer:\n    type: string\n    description: pci and anr optimizer name in oof\n    default: \"pci_anr\"\n  log_path:\n    type: string\n    description: log location in host\n    default: \"/dockerdata-nfs/son-handler\"\n  poorCountThreshold:\n    type: integer\n    description: poor neighbor count threshold\n    default: 3\n  badCountThreshold:\n    type: integer\n    description: bad neighbor count threshold\n    default: 3\n  oofTriggerCountTimer:\n    type: integer\n    description: timer for oof triggered count in minutes\n    default: 30\n  oofTriggerCountThreshold:\n    type: integer\n    description: Threshold for oof trigger count\n    default: 5\n  policyRespTimer:\n    type: integer\n    description: policy response wait timer in seconds\n    default: 10\n  policy_id:\n    type: string\n    description: policy id for config policy\n    default: \"com.Config_PCIMS_CONFIG_POLICY\"\n  performance_management_topic_url:\n    type: string\n    description: ves measurement topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  fault_management_topic_url:\n    type: string\n    description: ves fault topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.SEC_FAULT_OUTPUT\"\n  nbr_list_change_topic_url:\n    type: string\n    description: neighbor list change notification topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/PCI-NOTIF-TOPIC-NGHBR-LIST-CHANGE-INFO\"\n  dcae_cl_response_topic_url:\n    type: string\n    description: dcae control loop response topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/DCAE_CL_RSP\"\n  dcae_cl_topic_url:\n    type: string\n    description: dcae control loop topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_CL_OUTPUT\"\n  policyNegativeAckThreshold:\n    type: integer\n    description: negative acknowledgement from policy threshold\n    default: 3\n  policyFixedPciTimeInterval:\n    type: integer\n    description: time interval for checking FixedPci table\n    default: 30000\n  nfNamingCode:\n    type: string\n    description: filter fm and pm notification using this parameter\n    default: \"RansimAgent\"\n\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n      use_existing: false\n\n  sonhms:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              STANDALONE: \"false\"\n            ports:\n              - \"8080:0\"\n            volumes:\n              - host:\n                  path: { get_input: log_path }\n                container:\n                  bind: /home/sonhms/logs\n                  mode: rw\n    properties:\n      image:\n        get_input: tag_version\n      service_component_type: '\''dcae-sonhms'\''\n      service_id: '\''sonhms'\''\n      always_pull_image: true\n      replicas: {get_input: replicas}\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      application_config:\n        streams_subscribes:\n          performance_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: performance_management_topic_url }\n            type: message-router\n          fault_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: fault_management_topic_url }\n            type: message-router\n          nbr_list_change_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: nbr_list_change_topic_url }\n            type: message-router\n          dcae_cl_response_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_response_topic_url }\n            type: message-router\n        streams_publishes:\n          CL_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_topic_url }\n            type: message-router\n        postgres.host: { get_attribute: [ pgaasvm, admin, host ] }\n        postgres.port: { get_attribute: [ pgaasvm, admin, port ] }\n        postgres.username: { get_attribute: [ pgaasvm, admin, user ] }\n        postgres.password: { get_attribute: [ pgaasvm, admin, password ] }\n        sonhandler.pollingInterval: { get_input: polling_interval}\n        sonhandler.pollingTimeout: { get_input: polling_timeout }\n        cbsPollingInterval: { get_input: cbs_polling_interval }\n        sonhandler.numSolutions: { get_input: num_solutions }\n        sonhandler.minCollision: { get_input: min_collision }\n        sonhandler.minConfusion: { get_input: min_confusion }\n        sonhandler.maximumClusters: { get_input: max_clusters }\n        sonhandler.badThreshold: { get_input: bad_threshold }\n        sonhandler.poorThreshold: { get_input: poor_threshold }\n        sonhandler.namespace: { get_input: namespace }\n        sonhandler.sourceId: SONHMS\n        sonhandler.dmaap.server:\n          - { get_input: dmaap }\n        sonhandler.bufferTime: { get_input: buffer_time }\n        sonhandler.cg: { get_input: cg }\n        sonhandler.cid: { get_input: cid }\n        sonhandler.configDb.service: { get_input: config_db }\n        sonhandler.oof.service: { get_input: oof }\n        sonhandler.oof.endpoint: { get_input: oof_endpoint }\n        sonhandler.pciOptimizer: { get_input: pci_optimizer }\n        sonhandler.pciAnrOptimizer: { get_input: pci_anr_optimizer }\n        sonhandler.poorCountThreshold: { get_input: poorCountThreshold}\n        sonhandler.badCountThreshold: { get_input: badCountThreshold}\n        sonhandler.oofTriggerCountTimer: { get_input: oofTriggerCountTimer}\n        sonhandler.oofTriggerCountThreshold: { get_input: oofTriggerCountThreshold}\n        sonhandler.policyRespTimer: { get_input: policyRespTimer}\n        sonhandler.policyNegativeAckThreshold: { get_input: policyNegativeAckThreshold}\n        sonhandler.policyFixedPciTimeInterval: { get_input: policyFixedPciTimeInterval}\n        sonhandler.nfNamingCode: { get_input: nfNamingCode}\n        service_calls:\n          sdnr-getpnfname: []\n          sdnr-getpci: []\n          sdnr-getnbrlist: []\n          sdnr-getcelllist: []\n          oof-req: []\n          policy-req: []\n    relationships:\n      - type: cloudify.relationships.depends_on\n        target: pgaasvm\n      - type: cloudify.relationships.depends_on\n        target: son_policy\n\n  son_policy:\n    type: dcae.nodes.policy\n    properties:\n      policy_id:\n           get_input: policy_id\n\n\n\n\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 22617    0 11444  100 11173   447k   436k --:--:-- --:--:-- --:--:--  883k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-tcagen2-clampnode.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-tcagen2-clampnode.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-tcagen2-clampnode.yaml .yaml
++ flatten /blueprints/k8s-tcagen2-clampnode.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n#k8s-tca-gen2-v3.yaml\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:clamppolicyplugin?version=1.1.0\ninputs:\n  service_name:\n    type: string\n    default: '\''dcae-tcagen2'\''\n  log_directory:\n    type: string\n    default: \"/opt/logs/dcae-analytics-tca\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  spring.data.mongodb.uri:\n    type: string\n    default: \"mongodb://dcae-mongohost/dcae-tcagen2\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.2.1\"\n  tca.aai.password:\n    type: string\n    default: \"DCAE\"\n  tca.aai.url:\n    type: string\n    default: \"http://aai.onap.svc.cluster.local\"\n  tca.aai.username:\n    type: string\n    default: \"DCAE\"\n  tca_handle_in_subscribe_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  tca_handle_out_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT\"\n  tca_consumer_group:\n    type: string\n    default: \"cg1\"\n  policy_model_id:\n    type: string\n    default: \"onap.policies.monitoring.tcagen2\"\n  policy_id:\n    type: string\n    default: \"onap.restart.tca\"\nnode_templates:\n  docker.tca:\n    type: dcae.nodes.ContainerizedServiceComponent\n    relationships:\n      - target: tcagen2_policy\n        type: cloudify.relationships.depends_on\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - concat: [\"9091:\", \"0\"]\n    properties:\n      application_config:\n        service_calls: []\n        streams_publishes:\n          tca_handle_out:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_out_publish_url\n            type: message_router\n        streams_subscribes:\n          tca_handle_in:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_in_subscribe_url\n            type: message_router\n        spring.data.mongodb.uri:\n          get_input: spring.data.mongodb.uri\n        streams_subscribes.tca_handle_in.consumer_group:\n          get_input: tca_consumer_group\n        streams_subscribes.tca_handle_in.consumer_ids[0]: c0\n        streams_subscribes.tca_handle_in.consumer_ids[1]: c1\n        streams_subscribes.tca_handle_in.message_limit: 50000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.max: 60000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.min: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up: 10000\n        streams_subscribes.tca_handle_in.polling.fixed_rate: 0\n        streams_subscribes.tca_handle_in.timeout: -1\n        tca.aai.enable_enrichment: true\n        tca.aai.generic_vnf_path: aai/v11/network/generic-vnfs/generic-vnf\n        tca.aai.node_query_path: aai/v11/search/nodes-query\n        tca.aai.password:\n          get_input: tca.aai.password\n        tca.aai.url:\n          get_input: tca.aai.url\n        tca.aai.username:\n          get_input: tca.aai.username\n        tca.policy: '\''{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VM\",\"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\":\"vLoadBalancer\",\"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\"}]}]}'\''\n        tca.processing_batch_size: 10000\n        tca.enable_abatement: true\n        tca.enable_ecomp_logging: true\n      docker_config:\n        healthcheck:\n          endpoint: /actuator/health\n          interval: 30s\n          timeout: 10s\n          type: http\n      image:\n        get_input: tag_version\n      log_info:\n        log_directory:\n          get_input: log_directory\n      tls_info:\n        use_tls: true\n        cert_directory: '\''/etc/tca-gen2/ssl'\''\n      replicas:\n        get_input: replicas\n      service_component_type: { get_input: service_name }\n  tcagen2_policy:\n    type: clamp.nodes.policy\n    properties:\n      policy_id:\n        get_input: policy_id\n      policy_model_id:\n        get_input: policy_model_id\n'
++ echo '# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n#k8s-tca-gen2-v3.yaml\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:clamppolicyplugin?version=1.1.0\ninputs:\n  service_name:\n    type: string\n    default: '\''dcae-tcagen2'\''\n  log_directory:\n    type: string\n    default: \"/opt/logs/dcae-analytics-tca\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  spring.data.mongodb.uri:\n    type: string\n    default: \"mongodb://dcae-mongohost/dcae-tcagen2\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.2.1\"\n  tca.aai.password:\n    type: string\n    default: \"DCAE\"\n  tca.aai.url:\n    type: string\n    default: \"http://aai.onap.svc.cluster.local\"\n  tca.aai.username:\n    type: string\n    default: \"DCAE\"\n  tca_handle_in_subscribe_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  tca_handle_out_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT\"\n  tca_consumer_group:\n    type: string\n    default: \"cg1\"\n  policy_model_id:\n    type: string\n    default: \"onap.policies.monitoring.tcagen2\"\n  policy_id:\n    type: string\n    default: \"onap.restart.tca\"\nnode_templates:\n  docker.tca:\n    type: dcae.nodes.ContainerizedServiceComponent\n    relationships:\n      - target: tcagen2_policy\n        type: cloudify.relationships.depends_on\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - concat: [\"9091:\", \"0\"]\n    properties:\n      application_config:\n        service_calls: []\n        streams_publishes:\n          tca_handle_out:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_out_publish_url\n            type: message_router\n        streams_subscribes:\n          tca_handle_in:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_in_subscribe_url\n            type: message_router\n        spring.data.mongodb.uri:\n          get_input: spring.data.mongodb.uri\n        streams_subscribes.tca_handle_in.consumer_group:\n          get_input: tca_consumer_group\n        streams_subscribes.tca_handle_in.consumer_ids[0]: c0\n        streams_subscribes.tca_handle_in.consumer_ids[1]: c1\n        streams_subscribes.tca_handle_in.message_limit: 50000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.max: 60000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.min: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up: 10000\n        streams_subscribes.tca_handle_in.polling.fixed_rate: 0\n        streams_subscribes.tca_handle_in.timeout: -1\n        tca.aai.enable_enrichment: true\n        tca.aai.generic_vnf_path: aai/v11/network/generic-vnfs/generic-vnf\n        tca.aai.node_query_path: aai/v11/search/nodes-query\n        tca.aai.password:\n          get_input: tca.aai.password\n        tca.aai.url:\n          get_input: tca.aai.url\n        tca.aai.username:\n          get_input: tca.aai.username\n        tca.policy: '\''{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VM\",\"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\":\"vLoadBalancer\",\"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\"}]}]}'\''\n        tca.processing_batch_size: 10000\n        tca.enable_abatement: true\n        tca.enable_ecomp_logging: true\n      docker_config:\n        healthcheck:\n          endpoint: /actuator/health\n          interval: 30s\n          timeout: 10s\n          type: http\n      image:\n        get_input: tag_version\n      log_info:\n        log_directory:\n          get_input: log_directory\n      tls_info:\n        use_tls: true\n        cert_directory: '\''/etc/tca-gen2/ssl'\''\n      replicas:\n        get_input: replicas\n      service_component_type: { get_input: service_name }\n  tcagen2_policy:\n    type: clamp.nodes.policy\n    properties:\n      policy_id:\n        get_input: policy_id\n      policy_model_id:\n        get_input: policy_model_id\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-tcagen2-clampnode",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n#k8s-tca-gen2-v3.yaml\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:clamppolicyplugin?version=1.1.0\ninputs:\n  service_name:\n    type: string\n    default: '\''dcae-tcagen2'\''\n  log_directory:\n    type: string\n    default: \"/opt/logs/dcae-analytics-tca\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  spring.data.mongodb.uri:\n    type: string\n    default: \"mongodb://dcae-mongohost/dcae-tcagen2\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.2.1\"\n  tca.aai.password:\n    type: string\n    default: \"DCAE\"\n  tca.aai.url:\n    type: string\n    default: \"http://aai.onap.svc.cluster.local\"\n  tca.aai.username:\n    type: string\n    default: \"DCAE\"\n  tca_handle_in_subscribe_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  tca_handle_out_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT\"\n  tca_consumer_group:\n    type: string\n    default: \"cg1\"\n  policy_model_id:\n    type: string\n    default: \"onap.policies.monitoring.tcagen2\"\n  policy_id:\n    type: string\n    default: \"onap.restart.tca\"\nnode_templates:\n  docker.tca:\n    type: dcae.nodes.ContainerizedServiceComponent\n    relationships:\n      - target: tcagen2_policy\n        type: cloudify.relationships.depends_on\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - concat: [\"9091:\", \"0\"]\n    properties:\n      application_config:\n        service_calls: []\n        streams_publishes:\n          tca_handle_out:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_out_publish_url\n            type: message_router\n        streams_subscribes:\n          tca_handle_in:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_in_subscribe_url\n            type: message_router\n        spring.data.mongodb.uri:\n          get_input: spring.data.mongodb.uri\n        streams_subscribes.tca_handle_in.consumer_group:\n          get_input: tca_consumer_group\n        streams_subscribes.tca_handle_in.consumer_ids[0]: c0\n        streams_subscribes.tca_handle_in.consumer_ids[1]: c1\n        streams_subscribes.tca_handle_in.message_limit: 50000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.max: 60000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.min: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up: 10000\n        streams_subscribes.tca_handle_in.polling.fixed_rate: 0\n        streams_subscribes.tca_handle_in.timeout: -1\n        tca.aai.enable_enrichment: true\n        tca.aai.generic_vnf_path: aai/v11/network/generic-vnfs/generic-vnf\n        tca.aai.node_query_path: aai/v11/search/nodes-query\n        tca.aai.password:\n          get_input: tca.aai.password\n        tca.aai.url:\n          get_input: tca.aai.url\n        tca.aai.username:\n          get_input: tca.aai.username\n        tca.policy: '\''{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VM\",\"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\":\"vLoadBalancer\",\"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\"}]}]}'\''\n        tca.processing_batch_size: 10000\n        tca.enable_abatement: true\n        tca.enable_ecomp_logging: true\n      docker_config:\n        healthcheck:\n          endpoint: /actuator/health\n          interval: 30s\n          timeout: 10s\n          type: http\n      image:\n        get_input: tag_version\n      log_info:\n        log_directory:\n          get_input: log_directory\n      tls_info:\n        use_tls: true\n        cert_directory: '\''/etc/tca-gen2/ssl'\''\n      replicas:\n        get_input: replicas\n      service_component_type: { get_input: service_name }\n  tcagen2_policy:\n    type: clamp.nodes.policy\n    properties:\n      policy_id:\n        get_input: policy_id\n      policy_model_id:\n        get_input: policy_model_id\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
og: snmptrapd_arriving_traps.log\n      data_dir: data\n      eelf_audit: audit.log\n      eelf_base_dir: /opt/app/snmptrap/logs\n      eelf_debug: debug.log\n      eelf_error: error.log\n      eelf_metrics: metrics.log\n      log_dir: logs\n      minimum_severity_to_log: 2\n      perm_status_file: snmptrapd_status.log\n      pid_dir: tmp\n      roll_frequency: day\n      runtime_base_dir: /opt/app/snmptrap\n      snmptrapd_diag: snmptrapd_prog_diag.log\n      traps_stats_log: snmptrapd_stats.csv\"\n  protocols:\n    type: string\n    default:\n      \"ipv4_interface: 0.0.0.0\n      ipv4_port: 6162\n      ipv6_interface: ::1\n      ipv6_port: 6162\"\n  publisher:\n    type: string\n    default:\n      \"http_milliseconds_between_retries: 750\n      http_milliseconds_timeout: 1500\n      http_peer_publisher: unavailable\n      http_primary_publisher: 'true'\n      http_retries: 3\n      max_milliseconds_between_publishes: 10000\n      max_traps_between_publishes: 10\"\n  sec_fault_unsecure_topic:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.ONAP-COLLECTOR-SNMPTRAP\"\n  snmptrapd:\n    type: string\n    default:\n      \"title: Collector for receiving SNMP traps and publishing to DMAAP/MR\n      version: 2.0.3\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30470\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  service_component_type:\n    type: string\n    default: \"dcae-snmptrap-collector\"\n  service_id:\n    type: string\n    default: \"dcae-snmptrap-collector\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-snmptrap-collector\"\n\n\nnode_templates:\n  snmptrap:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n           ports:\n             - concat: [\"6162/udp:\", { get_input: external_port }]\n    properties:\n      application_config:\n        StormWatchPolicy: ''\n        cache:\n          get_input: cache\n        files:\n          get_input: files\n        protocols:\n          get_input: protocols\n        publisher:\n          get_input: publisher\n        services_calls: {}\n        snmptrapd:\n          get_input: snmptrapd\n        sw_interval_in_seconds: 60\n        streams_publishes:\n            sec_fault_unsecure:\n              dmaap_info:\n                topic_url:\n                  get_input: sec_fault_unsecure_topic\n              type: message_router\n\n      image:\n        get_input: tag_version\n      replicas: {get_input: replicas}\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n    type: dcae.nodes.ContainerizedServiceComponent\n\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"6bc8e227-df4f-4d66-9f75-ba89c9f62a62","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/6bc8e227-df4f-4d66-9f75-ba89c9f62a62"},"created":1622333397042,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-sonhms","typeVersion":2105301209,"blueprintTemplate":" #============LICENSE_START=======================================================\n #    son-handler\n #   ================================================================================\n #     Copyright (C) 2019-2020 Wipro Limited.\n #     ==============================================================================\n #       Licensed under the Apache License, Version 2.0 (the \"License\");\n #       you may not use this file except in compliance with the License.\n #       You may obtain a copy of the License at\n #\n #            http://www.apache.org/licenses/LICENSE-2.0\n #\n #       Unless required by applicable law or agreed to in writing, software\n #       distributed under the License is distributed on an \"AS IS\" BASIS,\n #       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n #       See the License for the specific language governing permissions and\n #       limitations under the License.\n #       ============LICENSE_END=========================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - \"https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\"\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:pgaas?version=1.3.0\n  - plugin:dcaepolicyplugin?version=2.4.0\ninputs:\n  replicas:\n    type: integer\n    description: replica count for deployment\n    default: 1\n  tag_version:\n    type: string\n    description: docker image name and version\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.son-handler:2.1.3\"\n  pgaas_cluster_name:\n    type: string\n    description: pg cluster\n    default: \"dcae-pg-primary.onap\"\n  database_name:\n    type: string\n    description: database name\n    default: \"sonhms\"\n  aaf_username:\n    type: string\n    description: aaf username\n    default:\n  aaf_password:\n    type: string\n    description: aaf password\n    default:\n  polling_interval:\n    type: integer\n    description: dmaap polling interval\n    default: 20\n  cbs_polling_interval:\n    type: integer\n    description: cbs polling interval\n    default: 60\n  polling_timeout:\n    type: integer\n    description: dmaap polling timeout\n    default: 60\n  num_solutions:\n    type: integer\n    description: num of solutions\n    default: 5\n  min_collision:\n    type: integer\n    description: minimum no. of collisions\n    default: 5\n  min_confusion:\n    type: integer\n    description: minimum no. of confusions\n    default: 5\n  max_clusters:\n    type: integer\n    description: maximum clusters\n    default: 5\n  bad_threshold:\n    type: integer\n    description: threshold for bad neighbors\n    default: 50\n  poor_threshold:\n    type: integer\n    description: threshold for poor neighbors\n    default: 70\n  namespace:\n    type: string\n    description: namespace\n    default: \"onap\"\n  dmaap:\n    type: string\n    description: dmaap server\n    default: \"message-router\"\n  buffer_time:\n    type: integer\n    description: buffer time\n    default: 60\n  cg:\n    type: string\n    description: consumer group\n    default: \"sonhms-cg\"\n  cid:\n    type: string\n    description: consumer id\n    default: \"sonhms-cid\"\n  config_db:\n    type: string\n    description: config db location\n    default: \"http://sdnc.onap:8181\"\n  oof:\n    type: string\n    description: oof location\n    default: \"https://oof-osdf.onap:8698\"\n  oof_endpoint:\n    type: string\n    description: oof endpoint\n    default: \"/api/oof/v1/pci\"\n  pci_optimizer:\n    type: string\n    description: pci optimizer name in oof\n    default: \"pci\"\n  pci_anr_optimizer:\n    type: string\n    description: pci and anr optimizer name in oof\n    default: \"pci_anr\"\n  log_path:\n    type: string\n    description: log location in host\n    default: \"/dockerdata-nfs/son-handler\"\n  poorCountThreshold:\n    type: integer\n    description: poor neighbor count threshold\n    default: 3\n  badCountThreshold:\n    type: integer\n    description: bad neighbor count threshold\n    default: 3\n  oofTriggerCountTimer:\n    type: integer\n    description: timer for oof triggered count in minutes\n    default: 30\n  oofTriggerCountThreshold:\n    type: integer\n    description: Threshold for oof trigger count\n    default: 5\n  policyRespTimer:\n    type: integer\n    description: policy response wait timer in seconds\n    default: 10\n  policy_id:\n    type: string\n    description: policy id for config policy\n    default: \"com.Config_PCIMS_CONFIG_POLICY\"\n  performance_management_topic_url:\n    type: string\n    description: ves measurement topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  fault_management_topic_url:\n    type: string\n    description: ves fault topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.SEC_FAULT_OUTPUT\"\n  nbr_list_change_topic_url:\n    type: string\n    description: neighbor list change notification topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/PCI-NOTIF-TOPIC-NGHBR-LIST-CHANGE-INFO\"\n  dcae_cl_response_topic_url:\n    type: string\n    description: dcae control loop response topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/DCAE_CL_RSP\"\n  dcae_cl_topic_url:\n    type: string\n    description: dcae control loop topic url\n    default: \"https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_CL_OUTPUT\"\n  policyNegativeAckThreshold:\n    type: integer\n    description: negative acknowledgement from policy threshold\n    default: 3\n  policyFixedPciTimeInterval:\n    type: integer\n    description: time interval for checking FixedPci table\n    default: 30000\n  nfNamingCode:\n    type: string\n    description: filter fm and pm notification using this parameter\n    default: \"RansimAgent\"\n\nnode_templates:\n  pgaasvm:\n    type: dcae.nodes.pgaas.database\n    properties:\n      writerfqdn: { get_input: pgaas_cluster_name }\n      name: { get_input: database_name }\n      use_existing: false\n\n  sonhms:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              STANDALONE: \"false\"\n            ports:\n              - \"8080:0\"\n            volumes:\n              - host:\n                  path: { get_input: log_path }\n                container:\n                  bind: /home/sonhms/logs\n                  mode: rw\n    properties:\n      image:\n        get_input: tag_version\n      service_component_type: 'dcae-sonhms'\n      service_id: 'sonhms'\n      always_pull_image: true\n      replicas: {get_input: replicas}\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      application_config:\n        streams_subscribes:\n          performance_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: performance_management_topic_url }\n            type: message-router\n          fault_management_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: fault_management_topic_url }\n            type: message-router\n          nbr_list_change_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: nbr_list_change_topic_url }\n            type: message-router\n          dcae_cl_response_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_response_topic_url }\n            type: message-router\n        streams_publishes:\n          CL_topic:\n            aaf_username: { get_input: aaf_username }\n            aaf_password: { get_input: aaf_password }\n            dmaap_info:\n              topic_url: { get_input: dcae_cl_topic_url }\n            type: message-router\n        postgres.host: { get_attribute: [ pgaasvm, admin, host ] }\n        postgres.port: { get_attribute: [ pgaasvm, admin, port ] }\n        postgres.username: { get_attribute: [ pgaasvm, admin, user ] }\n        postgres.password: { get_attribute: [ pgaasvm, admin, password ] }\n        sonhandler.pollingInterval: { get_input: polling_interval}\n        sonhandler.pollingTimeout: { get_input: polling_timeout }\n        cbsPollingInterval: { get_input: cbs_polling_interval }\n        sonhandler.numSolutions: { get_input: num_solutions }\n        sonhandler.minCollision: { get_input: min_collision }\n        sonhandler.minConfusion: { get_input: min_confusion }\n        sonhandler.maximumClusters: { get_input: max_clusters }\n        sonhandler.badThreshold: { get_input: bad_threshold }\n        sonhandler.poorThreshold: { get_input: poor_threshold }\n        sonhandler.namespace: { get_input: namespace }\n        sonhandler.sourceId: SONHMS\n        sonhandler.dmaap.server:\n          - { get_input: dmaap }\n        sonhandler.bufferTime: { get_input: buffer_time }\n        sonhandler.cg: { get_input: cg }\n        sonhandler.cid: { get_input: cid }\n        sonhandler.configDb.service: { get_input: config_db }\n        sonhandler.oof.service: { get_input: oof }\n        sonhandler.oof.endpoint: { get_input: oof_endpoint }\n        sonhandler.pciOptimizer: { get_input: pci_optimizer }\n        sonhandler.pciAnrOptimizer: { get_input: pci_anr_optimizer }\n        sonhandler.poorCountThreshold: { get_input: poorCountThreshold}\n        sonhandler.badCountThreshold: { get_input: badCountThreshold}\n        sonhandler.oofTriggerCountTimer: { get_input: oofTriggerCountTimer}\n        sonhandler.oofTriggerCountThreshold: { get_input: oofTriggerCountThreshold}\n        sonhandler.policyRespTimer: { get_input: policyRespTimer}\n        sonhandler.policyNegativeAckThreshold: { get_input: policyNegativeAckThreshold}\n        sonhandler.policyFixedPciTimeInterval: { get_input: policyFixedPciTimeInterval}\n        sonhandler.nfNamingCode: { get_input: nfNamingCode}\n        service_calls:\n          sdnr-getpnfname: []\n          sdnr-getpci: []\n          sdnr-getnbrlist: []\n          sdnr-getcelllist: []\n          oof-req: []\n          policy-req: []\n    relationships:\n      - type: cloudify.relationships.depends_on\n        target: pgaasvm\n      - type: cloudify.relationships.depends_on\n        target: son_policy\n\n  son_policy:\n    type: dcae.nodes.policy\n    properties:\n      policy_id:\n           get_input: policy_id\n\n\n\n\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"6dc1a785-3165-479d-a078-85253e7b6161","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/6dc1a785-3165-479d-a078-85253e7b6161"},"created":1622333397125,"deactivated":null}
Blueprint uploaded. The blueprint's id is ves-tls

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 15565  100  7918  100  7647   286k   276k --:--:-- --:--:-- --:--:--  562k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-tcagen2.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-tcagen2.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
++ basename /blueprints/k8s-tcagen2.yaml .yaml
++ flatten /blueprints/k8s-tcagen2.yaml
+++ +++ tr -d '\n'sed 
-e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
++ FLAT='# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  service_component_type:\n    type: string\n    default: \"dcae-tcagen2\"\n  service_id:\n    type: string\n    default: \"dcae-tcagen2\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-tcagen2\"\n  log_directory:\n    type: string\n    default: \"/opt/logs/dcae-analytics-tca\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  spring.data.mongodb.uri:\n    type: string\n    default: \"mongodb://dcae-mongohost/dcae-tcagen2\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.2.1\"\n  tca.aai.password:\n    type: string\n    default: \"DCAE\"\n  tca.aai.url:\n    type: string\n    default: \"http://aai.onap.svc.cluster.local\"\n  tca.aai.username:\n    type: string\n    default: \"DCAE\"\n  tca_handle_in_subscribe_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  tca_handle_out_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT\"\n  tca_consumer_group:\n    type: string\n    default: \"cg1\"\n\nnode_templates:\n  docker.tca:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - concat: [\"9091:\", \"0\"]\n    properties:\n      application_config:\n        service_calls: []\n        streams_publishes:\n          tca_handle_out:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_out_publish_url\n            type: message_router\n        streams_subscribes:\n          tca_handle_in:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_in_subscribe_url\n            type: message_router\n        spring.data.mongodb.uri:\n          get_input: spring.data.mongodb.uri\n        streams_subscribes.tca_handle_in.consumer_group:\n          get_input: tca_consumer_group\n        streams_subscribes.tca_handle_in.consumer_ids[0]: c0\n        streams_subscribes.tca_handle_in.consumer_ids[1]: c1\n        streams_subscribes.tca_handle_in.message_limit: 50000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.max: 60000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.min: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up: 10000\n        streams_subscribes.tca_handle_in.polling.fixed_rate: 0\n        streams_subscribes.tca_handle_in.timeout: -1\n        tca.aai.enable_enrichment: true\n        tca.aai.generic_vnf_path: aai/v11/network/generic-vnfs/generic-vnf\n        tca.aai.node_query_path: aai/v11/search/nodes-query\n        tca.aai.password:\n          get_input: tca.aai.password\n        tca.aai.url:\n          get_input: tca.aai.url\n        tca.aai.username:\n          get_input: tca.aai.username\n        tca.policy: '\''{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VM\",\"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\":\"vLoadBalancer\",\"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\"}]}]}'\''\n        tca.processing_batch_size: 10000\n        tca.enable_abatement: true\n        tca.enable_ecomp_logging: true\n      docker_config:\n        healthcheck:\n          endpoint: /actuator/health\n          interval: 30s\n          timeout: 10s\n          type: http\n      image:\n        get_input: tag_version\n      log_info:\n        log_directory:\n          get_input: log_directory\n      tls_info:\n        use_tls: true\n        cert_directory: '\''/etc/tca-gen2/ssl'\''\n      replicas:\n        get_input: replicas\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n'
++ echo '# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  service_component_type:\n    type: string\n    default: \"dcae-tcagen2\"\n  service_id:\n    type: string\n    default: \"dcae-tcagen2\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-tcagen2\"\n  log_directory:\n    type: string\n    default: \"/opt/logs/dcae-analytics-tca\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  spring.data.mongodb.uri:\n    type: string\n    default: \"mongodb://dcae-mongohost/dcae-tcagen2\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.2.1\"\n  tca.aai.password:\n    type: string\n    default: \"DCAE\"\n  tca.aai.url:\n    type: string\n    default: \"http://aai.onap.svc.cluster.local\"\n  tca.aai.username:\n    type: string\n    default: \"DCAE\"\n  tca_handle_in_subscribe_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  tca_handle_out_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT\"\n  tca_consumer_group:\n    type: string\n    default: \"cg1\"\n\nnode_templates:\n  docker.tca:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - concat: [\"9091:\", \"0\"]\n    properties:\n      application_config:\n        service_calls: []\n        streams_publishes:\n          tca_handle_out:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_out_publish_url\n            type: message_router\n        streams_subscribes:\n          tca_handle_in:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_in_subscribe_url\n            type: message_router\n        spring.data.mongodb.uri:\n          get_input: spring.data.mongodb.uri\n        streams_subscribes.tca_handle_in.consumer_group:\n          get_input: tca_consumer_group\n        streams_subscribes.tca_handle_in.consumer_ids[0]: c0\n        streams_subscribes.tca_handle_in.consumer_ids[1]: c1\n        streams_subscribes.tca_handle_in.message_limit: 50000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.max: 60000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.min: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up: 10000\n        streams_subscribes.tca_handle_in.polling.fixed_rate: 0\n        streams_subscribes.tca_handle_in.timeout: -1\n        tca.aai.enable_enrichment: true\n        tca.aai.generic_vnf_path: aai/v11/network/generic-vnfs/generic-vnf\n        tca.aai.node_query_path: aai/v11/search/nodes-query\n        tca.aai.password:\n          get_input: tca.aai.password\n        tca.aai.url:\n          get_input: tca.aai.url\n        tca.aai.username:\n          get_input: tca.aai.username\n        tca.policy: '\''{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VM\",\"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\":\"vLoadBalancer\",\"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\"}]}]}'\''\n        tca.processing_batch_size: 10000\n        tca.enable_abatement: true\n        tca.enable_ecomp_logging: true\n      docker_config:\n        healthcheck:\n          endpoint: /actuator/health\n          interval: 30s\n          timeout: 10s\n          type: http\n      image:\n        get_input: tag_version\n      log_info:\n        log_directory:\n          get_input: log_directory\n      tls_info:\n        use_tls: true\n        cert_directory: '\''/etc/tca-gen2/ssl'\''\n      replicas:\n        get_input: replicas\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-tcagen2",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  service_component_type:\n    type: string\n    default: \"dcae-tcagen2\"\n  service_id:\n    type: string\n    default: \"dcae-tcagen2\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-tcagen2\"\n  log_directory:\n    type: string\n    default: \"/opt/logs/dcae-analytics-tca\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  spring.data.mongodb.uri:\n    type: string\n    default: \"mongodb://dcae-mongohost/dcae-tcagen2\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.2.1\"\n  tca.aai.password:\n    type: string\n    default: \"DCAE\"\n  tca.aai.url:\n    type: string\n    default: \"http://aai.onap.svc.cluster.local\"\n  tca.aai.username:\n    type: string\n    default: \"DCAE\"\n  tca_handle_in_subscribe_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  tca_handle_out_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT\"\n  tca_consumer_group:\n    type: string\n    default: \"cg1\"\n\nnode_templates:\n  docker.tca:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - concat: [\"9091:\", \"0\"]\n    properties:\n      application_config:\n        service_calls: []\n        streams_publishes:\n          tca_handle_out:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_out_publish_url\n            type: message_router\n        streams_subscribes:\n          tca_handle_in:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_in_subscribe_url\n            type: message_router\n        spring.data.mongodb.uri:\n          get_input: spring.data.mongodb.uri\n        streams_subscribes.tca_handle_in.consumer_group:\n          get_input: tca_consumer_group\n        streams_subscribes.tca_handle_in.consumer_ids[0]: c0\n        streams_subscribes.tca_handle_in.consumer_ids[1]: c1\n        streams_subscribes.tca_handle_in.message_limit: 50000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.max: 60000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.min: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up: 10000\n        streams_subscribes.tca_handle_in.polling.fixed_rate: 0\n        streams_subscribes.tca_handle_in.timeout: -1\n        tca.aai.enable_enrichment: true\n        tca.aai.generic_vnf_path: aai/v11/network/generic-vnfs/generic-vnf\n        tca.aai.node_query_path: aai/v11/search/nodes-query\n        tca.aai.password:\n          get_input: tca.aai.password\n        tca.aai.url:\n          get_input: tca.aai.url\n        tca.aai.username:\n          get_input: tca.aai.username\n        tca.policy: '\''{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VM\",\"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\":\"vLoadBalancer\",\"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\"}]}]}'\''\n        tca.processing_batch_size: 10000\n        tca.enable_abatement: true\n        tca.enable_ecomp_logging: true\n      docker_config:\n        healthcheck:\n          endpoint: /actuator/health\n          interval: 30s\n          timeout: 10s\n          type: http\n      image:\n        get_input: tag_version\n      log_info:\n        log_directory:\n          get_input: log_directory\n      tls_info:\n        use_tls: true\n        cert_directory: '\''/etc/tca-gen2/ssl'\''\n      replicas:\n        get_input: replicas\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
{"owner":"dcaeorch","typeName":"k8s-tcagen2-clampnode","typeVersion":2105301209,"blueprintTemplate":"# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n#k8s-tca-gen2-v3.yaml\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n  - plugin:clamppolicyplugin?version=1.1.0\ninputs:\n  service_name:\n    type: string\n    default: 'dcae-tcagen2'\n  log_directory:\n    type: string\n    default: \"/opt/logs/dcae-analytics-tca\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  spring.data.mongodb.uri:\n    type: string\n    default: \"mongodb://dcae-mongohost/dcae-tcagen2\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.2.1\"\n  tca.aai.password:\n    type: string\n    default: \"DCAE\"\n  tca.aai.url:\n    type: string\n    default: \"http://aai.onap.svc.cluster.local\"\n  tca.aai.username:\n    type: string\n    default: \"DCAE\"\n  tca_handle_in_subscribe_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  tca_handle_out_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT\"\n  tca_consumer_group:\n    type: string\n    default: \"cg1\"\n  policy_model_id:\n    type: string\n    default: \"onap.policies.monitoring.tcagen2\"\n  policy_id:\n    type: string\n    default: \"onap.restart.tca\"\nnode_templates:\n  docker.tca:\n    type: dcae.nodes.ContainerizedServiceComponent\n    relationships:\n      - target: tcagen2_policy\n        type: cloudify.relationships.depends_on\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - concat: [\"9091:\", \"0\"]\n    properties:\n      application_config:\n        service_calls: []\n        streams_publishes:\n          tca_handle_out:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_out_publish_url\n            type: message_router\n        streams_subscribes:\n          tca_handle_in:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_in_subscribe_url\n            type: message_router\n        spring.data.mongodb.uri:\n          get_input: spring.data.mongodb.uri\n        streams_subscribes.tca_handle_in.consumer_group:\n          get_input: tca_consumer_group\n        streams_subscribes.tca_handle_in.consumer_ids[0]: c0\n        streams_subscribes.tca_handle_in.consumer_ids[1]: c1\n        streams_subscribes.tca_handle_in.message_limit: 50000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.max: 60000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.min: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up: 10000\n        streams_subscribes.tca_handle_in.polling.fixed_rate: 0\n        streams_subscribes.tca_handle_in.timeout: -1\n        tca.aai.enable_enrichment: true\n        tca.aai.generic_vnf_path: aai/v11/network/generic-vnfs/generic-vnf\n        tca.aai.node_query_path: aai/v11/search/nodes-query\n        tca.aai.password:\n          get_input: tca.aai.password\n        tca.aai.url:\n          get_input: tca.aai.url\n        tca.aai.username:\n          get_input: tca.aai.username\n        tca.policy: '{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VM\",\"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\":\"vLoadBalancer\",\"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\"}]}]}'\n        tca.processing_batch_size: 10000\n        tca.enable_abatement: true\n        tca.enable_ecomp_logging: true\n      docker_config:\n        healthcheck:\n          endpoint: /actuator/health\n          interval: 30s\n          timeout: 10s\n          type: http\n      image:\n        get_input: tag_version\n      log_info:\n        log_directory:\n          get_input: log_directory\n      tls_info:\n        use_tls: true\n        cert_directory: '/etc/tca-gen2/ssl'\n      replicas:\n        get_input: replicas\n      service_component_type: { get_input: service_name }\n  tcagen2_policy:\n    type: clamp.nodes.policy\n    properties:\n      policy_id:\n        get_input: policy_id\n      policy_model_id:\n        get_input: policy_model_id\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"30a8efff-27fc-4079-9e69-f617f6987051","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/30a8efff-27fc-4079-9e69-f617f6987051"},"created":1622333397210,"deactivated":null}
Blueprint uploaded. The blueprint's id is tcagen2

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 15159  100  7715  100  7444   243k   234k --:--:-- --:--:-- --:--:--  493k
+ for BP in /blueprints/*.yaml
+ upload_service_type /blueprints/k8s-ves-mapper.yaml /certs/cacert.pem
+ '[' /certs/cacert.pem ']'
+ TLSCURL='--cacert /certs/cacert.pem'
+ create_service_type /blueprints/k8s-ves-mapper.yaml
+ curl --cacert /certs/cacert.pem -X POST -H 'Content-Type: application/json' -d @- https://inventory:8080/dcae-service-types
++ date +%y%m%d%I%M
+ cm_hasany 'deployments?id=ves-tls'
++ curl -Ss -H 'Tenant: default_tenant' --user admin:UmH7vbj6 --cacert /certs/cacert.pem 'https://dcae-cloudify-manager:443/api/v3.1/deployments?id=ves-tls&_include=id'
++ /bin/jq .metadata.pagination.total
++ basename /blueprints/k8s-ves-mapper.yaml .yaml
++ flatten /blueprints/k8s-ves-mapper.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2019 TechMahindra. All rights reserved.\n# Copyright (c) 2020-2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ndescription: \"UniversalVESAdapter blueprint\"\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  rcc_notification_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_RCC_OUTPUT\"\n    type: string\n  snmp_notification_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.ONAP-COLLECTOR-SNMPTRAP\"\n    type: string\n  tag_version:\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.mapper.vesadapter.universalvesadaptor:1.2.0\"\n    type: string\n  ves_fault_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_FAULT_OUTPUT\"\n    type: string\n  ves_measurement_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n    type: string\n  ves_notification_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT\"\n    type: string\n  ves_pnfRegistration_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT\"\n    type: string\n  service_component_type:\n    type: string\n    default: \"dcae-svc-vesmapper\"\n  service_id:\n    type: string\n    default: \"dcae-svc-vesmapper\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-svc-vesmapper\"\nnode_templates:\n  universalvesadapter:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              CONFIG_BINDING_SERVICE: config_binding_service\n            max_wait: 3600\n            ports:\n              - \"80:0\"\n    properties:\n      application_config:\n        app_preferences:\n          collectors:\n            -\n              identifier: notification-id\n              mapping-files:\n                -\n                  defaultMappingFile-rcc-notification: \"org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.Version._4_0_1'\''pnfRegistration'\''org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.VesEventListenerVersion._7_0_1'\''registration_'\''+commonEventHeader.ts1'\''VESMapper'\''org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.Domain.PNF_REGISTRATIONcommonEventHeader.domaincommonEventHeader.ts1commonEventHeader.ts1org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.Priority.NORMALpnfRegistrationFields.vendorName+'\''-'\''+pnfRegistrationFields.serialNumberorg.onap.dcaegen2.ves.domain.ves70.PnfRegistrationFields.PnfRegistrationFieldsVersion._2_0\"\n              stream_publisher: ves-pnfRegistration\n              stream_subscriber: rcc-notification\n            -\n              identifier: notify OID\n              mapping-files:\n                -\n                  defaultMappingFile-snmp-notification: \"'\''3.0'\'''\''FaultField'\'''\''XXXX'\'''\''VESMapper'\''org.onap.dcaegen2.ves.domain.ves54.CommonEventHeader.Domain.FAULTcommonEventHeader.domainorg.onap.dcaegen2.ves.domain.ves54.CommonEventHeader.Priority.NORMAL'\''VesAdapter'\'''\''SNMP Fault'\''org.onap.dcaegen2.ves.domain.ves54.FaultFields.VfStatus.ACTIVEorg.onap.dcaegen2.ves.domain.ves54.FaultFields.EventSeverity.MINOR\"\n              stream_publisher: ves-fault\n              stream_subscriber: snmp-notification\n        streams_publishes:\n          ves-fault:\n            dmaap_info:\n              topic_url:\n                get_input: ves_fault_publish_url\n            type: message_router\n          ves-pnfRegistration:\n            dmaap_info:\n              topic_url:\n                get_input: ves_pnfRegistration_publish_url\n            type: message_router\n        streams_subscribes:\n          rcc-notification:\n            dmaap_info:\n              topic_url:\n                get_input: rcc_notification_url\n            type: message_router\n          snmp-notification:\n            dmaap_info:\n              topic_url:\n                get_input: snmp_notification_url\n            type: message_router\n      docker_config: {}\n      image:\n        get_input: tag_version\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n    type: dcae.nodes.ContainerizedServiceComponent\ntosca_definitions_version: cloudify_dsl_1_3\n\n'
++ echo '#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2019 TechMahindra. All rights reserved.\n# Copyright (c) 2020-2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ndescription: \"UniversalVESAdapter blueprint\"\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  rcc_notification_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_RCC_OUTPUT\"\n    type: string\n  snmp_notification_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.ONAP-COLLECTOR-SNMPTRAP\"\n    type: string\n  tag_version:\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.mapper.vesadapter.universalvesadaptor:1.2.0\"\n    type: string\n  ves_fault_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_FAULT_OUTPUT\"\n    type: string\n  ves_measurement_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n    type: string\n  ves_notification_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT\"\n    type: string\n  ves_pnfRegistration_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT\"\n    type: string\n  service_component_type:\n    type: string\n    default: \"dcae-svc-vesmapper\"\n  service_id:\n    type: string\n    default: \"dcae-svc-vesmapper\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-svc-vesmapper\"\nnode_templates:\n  universalvesadapter:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              CONFIG_BINDING_SERVICE: config_binding_service\n            max_wait: 3600\n            ports:\n              - \"80:0\"\n    properties:\n      application_config:\n        app_preferences:\n          collectors:\n            -\n              identifier: notification-id\n              mapping-files:\n                -\n                  defaultMappingFile-rcc-notification: \"org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.Version._4_0_1'\''pnfRegistration'\''org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.VesEventListenerVersion._7_0_1'\''registration_'\''+commonEventHeader.ts1'\''VESMapper'\''org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.Domain.PNF_REGISTRATIONcommonEventHeader.domaincommonEventHeader.ts1commonEventHeader.ts1org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.Priority.NORMALpnfRegistrationFields.vendorName+'\''-'\''+pnfRegistrationFields.serialNumberorg.onap.dcaegen2.ves.domain.ves70.PnfRegistrationFields.PnfRegistrationFieldsVersion._2_0\"\n              stream_publisher: ves-pnfRegistration\n              stream_subscriber: rcc-notification\n            -\n              identifier: notify OID\n              mapping-files:\n                -\n                  defaultMappingFile-snmp-notification: \"'\''3.0'\'''\''FaultField'\'''\''XXXX'\'''\''VESMapper'\''org.onap.dcaegen2.ves.domain.ves54.CommonEventHeader.Domain.FAULTcommonEventHeader.domainorg.onap.dcaegen2.ves.domain.ves54.CommonEventHeader.Priority.NORMAL'\''VesAdapter'\'''\''SNMP Fault'\''org.onap.dcaegen2.ves.domain.ves54.FaultFields.VfStatus.ACTIVEorg.onap.dcaegen2.ves.domain.ves54.FaultFields.EventSeverity.MINOR\"\n              stream_publisher: ves-fault\n              stream_subscriber: snmp-notification\n        streams_publishes:\n          ves-fault:\n            dmaap_info:\n              topic_url:\n                get_input: ves_fault_publish_url\n            type: message_router\n          ves-pnfRegistration:\n            dmaap_info:\n              topic_url:\n                get_input: ves_pnfRegistration_publish_url\n            type: message_router\n        streams_subscribes:\n          rcc-notification:\n            dmaap_info:\n              topic_url:\n                get_input: rcc_notification_url\n            type: message_router\n          snmp-notification:\n            dmaap_info:\n              topic_url:\n                get_input: snmp_notification_url\n            type: message_router\n      docker_config: {}\n      image:\n        get_input: tag_version\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n    type: dcae.nodes.ContainerizedServiceComponent\ntosca_definitions_version: cloudify_dsl_1_3\n\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-ves-mapper",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2019 TechMahindra. All rights reserved.\n# Copyright (c) 2020-2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ndescription: \"UniversalVESAdapter blueprint\"\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  rcc_notification_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_RCC_OUTPUT\"\n    type: string\n  snmp_notification_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.ONAP-COLLECTOR-SNMPTRAP\"\n    type: string\n  tag_version:\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.mapper.vesadapter.universalvesadaptor:1.2.0\"\n    type: string\n  ves_fault_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_FAULT_OUTPUT\"\n    type: string\n  ves_measurement_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n    type: string\n  ves_notification_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT\"\n    type: string\n  ves_pnfRegistration_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT\"\n    type: string\n  service_component_type:\n    type: string\n    default: \"dcae-svc-vesmapper\"\n  service_id:\n    type: string\n    default: \"dcae-svc-vesmapper\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-svc-vesmapper\"\nnode_templates:\n  universalvesadapter:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              CONFIG_BINDING_SERVICE: config_binding_service\n            max_wait: 3600\n            ports:\n              - \"80:0\"\n    properties:\n      application_config:\n        app_preferences:\n          collectors:\n            -\n              identifier: notification-id\n              mapping-files:\n                -\n                  defaultMappingFile-rcc-notification: \"org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.Version._4_0_1'\''pnfRegistration'\''org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.VesEventListenerVersion._7_0_1'\''registration_'\''+commonEventHeader.ts1'\''VESMapper'\''org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.Domain.PNF_REGISTRATIONcommonEventHeader.domaincommonEventHeader.ts1commonEventHeader.ts1org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.Priority.NORMALpnfRegistrationFields.vendorName+'\''-'\''+pnfRegistrationFields.serialNumberorg.onap.dcaegen2.ves.domain.ves70.PnfRegistrationFields.PnfRegistrationFieldsVersion._2_0\"\n              stream_publisher: ves-pnfRegistration\n              stream_subscriber: rcc-notification\n            -\n              identifier: notify OID\n              mapping-files:\n                -\n                  defaultMappingFile-snmp-notification: \"'\''3.0'\'''\''FaultField'\'''\''XXXX'\'''\''VESMapper'\''org.onap.dcaegen2.ves.domain.ves54.CommonEventHeader.Domain.FAULTcommonEventHeader.domainorg.onap.dcaegen2.ves.domain.ves54.CommonEventHeader.Priority.NORMAL'\''VesAdapter'\'''\''SNMP Fault'\''org.onap.dcaegen2.ves.domain.ves54.FaultFields.VfStatus.ACTIVEorg.onap.dcaegen2.ves.domain.ves54.FaultFields.EventSeverity.MINOR\"\n              stream_publisher: ves-fault\n              stream_subscriber: snmp-notification\n        streams_publishes:\n          ves-fault:\n            dmaap_info:\n              topic_url:\n                get_input: ves_fault_publish_url\n            type: message_router\n          ves-pnfRegistration:\n            dmaap_info:\n              topic_url:\n                get_input: ves_pnfRegistration_publish_url\n            type: message_router\n        streams_subscribes:\n          rcc-notification:\n            dmaap_info:\n              topic_url:\n                get_input: rcc_notification_url\n            type: message_router\n          snmp-notification:\n            dmaap_info:\n              topic_url:\n                get_input: snmp_notification_url\n            type: message_router\n      docker_config: {}\n      image:\n        get_input: tag_version\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n    type: dcae.nodes.ContainerizedServiceComponent\ntosca_definitions_version: cloudify_dsl_1_3\n\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
{"owner":"dcaeorch","typeName":"k8s-tcagen2","typeVersion":2105301209,"blueprintTemplate":"# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\ninputs:\n  service_component_type:\n    type: string\n    default: \"dcae-tcagen2\"\n  service_id:\n    type: string\n    default: \"dcae-tcagen2\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-tcagen2\"\n  log_directory:\n    type: string\n    default: \"/opt/logs/dcae-analytics-tca\"\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  spring.data.mongodb.uri:\n    type: string\n    default: \"mongodb://dcae-mongohost/dcae-tcagen2\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.2.1\"\n  tca.aai.password:\n    type: string\n    default: \"DCAE\"\n  tca.aai.url:\n    type: string\n    default: \"http://aai.onap.svc.cluster.local\"\n  tca.aai.username:\n    type: string\n    default: \"DCAE\"\n  tca_handle_in_subscribe_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  tca_handle_out_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT\"\n  tca_consumer_group:\n    type: string\n    default: \"cg1\"\n\nnode_templates:\n  docker.tca:\n    type: dcae.nodes.ContainerizedServiceComponent\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - concat: [\"9091:\", \"0\"]\n    properties:\n      application_config:\n        service_calls: []\n        streams_publishes:\n          tca_handle_out:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_out_publish_url\n            type: message_router\n        streams_subscribes:\n          tca_handle_in:\n            dmaap_info:\n              topic_url:\n                get_input: tca_handle_in_subscribe_url\n            type: message_router\n        spring.data.mongodb.uri:\n          get_input: spring.data.mongodb.uri\n        streams_subscribes.tca_handle_in.consumer_group:\n          get_input: tca_consumer_group\n        streams_subscribes.tca_handle_in.consumer_ids[0]: c0\n        streams_subscribes.tca_handle_in.consumer_ids[1]: c1\n        streams_subscribes.tca_handle_in.message_limit: 50000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.max: 60000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.min: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down: 30000\n        streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up: 10000\n        streams_subscribes.tca_handle_in.polling.fixed_rate: 0\n        streams_subscribes.tca_handle_in.timeout: -1\n        tca.aai.enable_enrichment: true\n        tca.aai.generic_vnf_path: aai/v11/network/generic-vnfs/generic-vnf\n        tca.aai.node_query_path: aai/v11/search/nodes-query\n        tca.aai.password:\n          get_input: tca.aai.password\n        tca.aai.url:\n          get_input: tca.aai.url\n        tca.aai.username:\n          get_input: tca.aai.username\n        tca.policy: '{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VM\",\"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\":\"vLoadBalancer\",\"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\"}]}]}'\n        tca.processing_batch_size: 10000\n        tca.enable_abatement: true\n        tca.enable_ecomp_logging: true\n      docker_config:\n        healthcheck:\n          endpoint: /actuator/health\n          interval: 30s\n          timeout: 10s\n          type: http\n      image:\n        get_input: tag_version\n      log_info:\n        log_directory:\n          get_input: log_directory\n      tls_info:\n        use_tls: true\n        cert_directory: '/etc/tca-gen2/ssl'\n      replicas:\n        get_input: replicas\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"be32c14b-8719-414c-a91c-905d75ac4b71","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/be32c14b-8719-414c-a91c-905d75ac4b71"},"created":1622333397305,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-ves-mapper","typeVersion":2105301209,"blueprintTemplate":"#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2019 TechMahindra. All rights reserved.\n# Copyright (c) 2020-2021 AT&T Intellectual Property. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ndescription: \"UniversalVESAdapter blueprint\"\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  rcc_notification_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_RCC_OUTPUT\"\n    type: string\n  snmp_notification_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.ONAP-COLLECTOR-SNMPTRAP\"\n    type: string\n  tag_version:\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.mapper.vesadapter.universalvesadaptor:1.2.0\"\n    type: string\n  ves_fault_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_FAULT_OUTPUT\"\n    type: string\n  ves_measurement_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n    type: string\n  ves_notification_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT\"\n    type: string\n  ves_pnfRegistration_publish_url:\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT\"\n    type: string\n  service_component_type:\n    type: string\n    default: \"dcae-svc-vesmapper\"\n  service_id:\n    type: string\n    default: \"dcae-svc-vesmapper\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-svc-vesmapper\"\nnode_templates:\n  universalvesadapter:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            envs:\n              CONFIG_BINDING_SERVICE: config_binding_service\n            max_wait: 3600\n            ports:\n              - \"80:0\"\n    properties:\n      application_config:\n        app_preferences:\n          collectors:\n            -\n              identifier: notification-id\n              mapping-files:\n                -\n                  defaultMappingFile-rcc-notification: \"org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.Version._4_0_1'pnfRegistration'org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.VesEventListenerVersion._7_0_1'registration_'+commonEventHeader.ts1'VESMapper'org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.Domain.PNF_REGISTRATIONcommonEventHeader.domaincommonEventHeader.ts1commonEventHeader.ts1org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.Priority.NORMALpnfRegistrationFields.vendorName+'-'+pnfRegistrationFields.serialNumberorg.onap.dcaegen2.ves.domain.ves70.PnfRegistrationFields.PnfRegistrationFieldsVersion._2_0\"\n              stream_publisher: ves-pnfRegistration\n              stream_subscriber: rcc-notification\n            -\n              identifier: notify OID\n              mapping-files:\n                -\n                  defaultMappingFile-snmp-notification: \"'3.0''FaultField''XXXX''VESMapper'org.onap.dcaegen2.ves.domain.ves54.CommonEventHeader.Domain.FAULTcommonEventHeader.domain 0  ))
+ return 1
+ INPUTS=
+ '[' -n k8s-ves-inputs-tls.yaml ']'
+ INPUTS=-i/inputs/k8s-ves-inputs-tls.yaml
+ cfy deployments create -b ves-tls -i/inputs/k8s-ves-inputs-tls.yaml ves-tls
++ flatten /blueprints/k8s-ves.yaml
+++ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g'
+++ tr -d '\n'
++ FLAT='# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved.\n# Copyright (c) 2020 Nokia. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  ves_other_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_OTHER_OUTPUT\"\n  ves_heartbeat_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT\"\n  ves_fault_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_FAULT_OUTPUT\"\n  ves_measurement_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  ves_notification_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT\"\n  ves_pnfRegistration_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT\"\n  ves_3gpp_fault_supervision_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT\"\n  ves_3gpp_provisioning_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT\"\n  ves_3gpp_hearbeat_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_HEARTBEAT_OUTPUT\"\n  ves_3gpp_performance_assurance_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.8.0\"\n  internal_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"8080\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30235\"\n  internal_port_tls:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"8443\"\n  external_port_tls:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30417\"\n  auth_method:\n    type: string\n    default: \"noAuth\"\n  service_component_type:\n    type: string\n    default: \"dcae-ves-collector\"\n  service_id:\n    type: string\n    default: \"dcae-ves-collector\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-ves-collector\"\n  enable_tls:\n    type: boolean\n    default: false\n  external_cert_cert_type:\n    type: string\n    description: Output type\n    default: \"JKS\"\n  external_cert_ca_name:\n    type: string\n    description: Name of Certificate Authority configured on CertService side.\n    default: \"RA\"\n  external_cert_common_name:\n    type: string\n    description: Common name which should be present in certificate.\n    default: \"dcae-ves-collector\"\n  external_cert_sans:\n    type: string\n    description: \"List of Subject Alternative Names (SANs) which should be present\n      in certificate. Delimiter - , Should contain common_name value and other FQDNs\n      under which given component is accessible.\"\n    default: \"dcae-ves-collector,ves-collector,ves\"\n  external_cert_use_external_tls:\n    type: boolean\n    description: Flag to indicate external tls enable/disable.\n    default: false\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  user_list:\n    type: string\n    description: List of user,password separated by pipe; pwd should be generated by using crypt-password tool (https://nexus.onap.org/#nexus-search;quick~crypt-password)\n    default: \"sample1,$2a$10$0buh.2WeYwN868YMwnNNEuNEAMNYVU9.FSMJGyIKV3dGET/7oGOi6|demouser,$2a$10$1cc.COcqV/d3iT2N7BjPG.S6ZKv2jpb9a5MV.o7lMih/GpjJRX.Ce\"\n  collector_externalSchema_checkflag:\n    type: integer\n    default: 1\n  collector_externalSchema_schemasLocation:\n    type: string\n    default: \"./etc/externalRepo/\"\n  collector_externalSchema_mappingFileLocation:\n    type: string\n    default: \"./etc/externalRepo/schema-map.json\"\nnode_templates:\n  ves:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - concat: [{get_input: internal_port},\":\",{get_input: external_port}]\n              - concat: [{get_input: internal_port_tls},\":\",{get_input: external_port_tls}]\n    properties:\n      application_config:\n        collector.dmaap.streamid: fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurement=ves-measurement|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|3GPP-FaultSupervision=ves-3gpp-fault-supervision|3GPP-Heartbeat=ves-3gpp-heartbeat|3GPP-Provisioning=ves-3gpp-provisioning|3GPP-PerformanceAssurance=ves-3gpp-performance-assurance\n        collector.inputQueue.maxPending: \"8096\"\n        collector.keystore.file.location: /opt/app/dcae-certificate/cert.jks\n        collector.keystore.passwordfile: /opt/app/dcae-certificate/jks.pass\n        collector.truststore.file.location: /opt/app/dcae-certificate/trust.jks\n        collector.truststore.passwordfile: /opt/app/dcae-certificate/trust.pass\n        collector.schema.checkflag: \"1\"\n        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.2.1_ONAP.json\\\"}\"\n        collector.externalSchema.checkflag:\n          get_input: collector_externalSchema_checkflag\n        collector.externalSchema.schemasLocation:\n          get_input: collector_externalSchema_schemasLocation\n        collector.externalSchema.mappingFileLocation:\n          get_input: collector_externalSchema_mappingFileLocation\n        event.externalSchema.schemaRefPath: $.event.stndDefinedFields.schemaReference\n        event.externalSchema.stndDefinedDataPath: $.event.stndDefinedFields.data\n        collector.service.port: \"8080\"\n        collector.service.secure.port: \"8443\"\n        event.transform.flag: \"0\"\n        auth.method:\n          get_input: auth_method\n        header.authlist:\n          get_input: user_list\n        services_calls: []\n        streams_publishes:\n          ves-fault:\n            dmaap_info:\n              topic_url:\n                get_input: ves_fault_publish_url\n            type: message_router\n          ves-measurement:\n            dmaap_info:\n              topic_url:\n                get_input: ves_measurement_publish_url\n            type: message_router\n          ves-notification:\n            dmaap_info:\n              topic_url:\n                get_input: ves_notification_publish_url\n            type: message_router\n          ves-pnfRegistration:\n            dmaap_info:\n              topic_url:\n                get_input: ves_pnfRegistration_publish_url\n            type: message_router\n          ves-heartbeat:\n            dmaap_info:\n              topic_url:\n                get_input: ves_heartbeat_publish_url\n            type: message_router\n          ves-other:\n            dmaap_info:\n              topic_url:\n                get_input: ves_other_publish_url\n            type: message_router\n          ves-3gpp-fault-supervision:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_fault_supervision_publish_url\n            type: message_router\n          ves-3gpp-provisioning:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_provisioning_publish_url\n            type: message_router\n          ves-3gpp-heartbeat:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_hearbeat_publish_url\n            type: message_router\n          ves-3gpp-performance-assurance:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_performance_assurance_publish_url\n            type: message_router\n        collector.dynamic.config.update.frequency: \"5\"\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      image:\n        get_input: tag_version\n      replicas: {get_input: replicas}\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      log_info:\n        log_directory: \"/opt/app/VESCollector/logs\"\n      tls_info:\n        cert_directory: '\''/opt/app/dcae-certificate/'\''\n        use_tls:\n          get_input: enable_tls\n      external_cert:\n        external_cert_directory: '\''/opt/app/dcae-certificate/'\''\n        use_external_tls:\n          get_input: external_cert_use_external_tls\n        cert_type:\n          get_input: external_cert_cert_type\n        ca_name:\n          get_input: external_cert_ca_name\n        external_certificate_parameters:\n          common_name:\n            get_input: external_cert_common_name\n          sans:\n            get_input: external_cert_sans\n    type: dcae.nodes.ContainerizedServiceComponent\n'
++ echo '# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved.\n# Copyright (c) 2020 Nokia. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  ves_other_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_OTHER_OUTPUT\"\n  ves_heartbeat_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT\"\n  ves_fault_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_FAULT_OUTPUT\"\n  ves_measurement_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  ves_notification_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT\"\n  ves_pnfRegistration_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT\"\n  ves_3gpp_fault_supervision_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT\"\n  ves_3gpp_provisioning_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT\"\n  ves_3gpp_hearbeat_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_HEARTBEAT_OUTPUT\"\n  ves_3gpp_performance_assurance_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.8.0\"\n  internal_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"8080\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30235\"\n  internal_port_tls:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"8443\"\n  external_port_tls:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30417\"\n  auth_method:\n    type: string\n    default: \"noAuth\"\n  service_component_type:\n    type: string\n    default: \"dcae-ves-collector\"\n  service_id:\n    type: string\n    default: \"dcae-ves-collector\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-ves-collector\"\n  enable_tls:\n    type: boolean\n    default: false\n  external_cert_cert_type:\n    type: string\n    description: Output type\n    default: \"JKS\"\n  external_cert_ca_name:\n    type: string\n    description: Name of Certificate Authority configured on CertService side.\n    default: \"RA\"\n  external_cert_common_name:\n    type: string\n    description: Common name which should be present in certificate.\n    default: \"dcae-ves-collector\"\n  external_cert_sans:\n    type: string\n    description: \"List of Subject Alternative Names (SANs) which should be present\n      in certificate. Delimiter - , Should contain common_name value and other FQDNs\n      under which given component is accessible.\"\n    default: \"dcae-ves-collector,ves-collector,ves\"\n  external_cert_use_external_tls:\n    type: boolean\n    description: Flag to indicate external tls enable/disable.\n    default: false\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  user_list:\n    type: string\n    description: List of user,password separated by pipe; pwd should be generated by using crypt-password tool (https://nexus.onap.org/#nexus-search;quick~crypt-password)\n    default: \"sample1,$2a$10$0buh.2WeYwN868YMwnNNEuNEAMNYVU9.FSMJGyIKV3dGET/7oGOi6|demouser,$2a$10$1cc.COcqV/d3iT2N7BjPG.S6ZKv2jpb9a5MV.o7lMih/GpjJRX.Ce\"\n  collector_externalSchema_checkflag:\n    type: integer\n    default: 1\n  collector_externalSchema_schemasLocation:\n    type: string\n    default: \"./etc/externalRepo/\"\n  collector_externalSchema_mappingFileLocation:\n    type: string\n    default: \"./etc/externalRepo/schema-map.json\"\nnode_templates:\n  ves:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - concat: [{get_input: internal_port},\":\",{get_input: external_port}]\n              - concat: [{get_input: internal_port_tls},\":\",{get_input: external_port_tls}]\n    properties:\n      application_config:\n        collector.dmaap.streamid: fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurement=ves-measurement|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|3GPP-FaultSupervision=ves-3gpp-fault-supervision|3GPP-Heartbeat=ves-3gpp-heartbeat|3GPP-Provisioning=ves-3gpp-provisioning|3GPP-PerformanceAssurance=ves-3gpp-performance-assurance\n        collector.inputQueue.maxPending: \"8096\"\n        collector.keystore.file.location: /opt/app/dcae-certificate/cert.jks\n        collector.keystore.passwordfile: /opt/app/dcae-certificate/jks.pass\n        collector.truststore.file.location: /opt/app/dcae-certificate/trust.jks\n        collector.truststore.passwordfile: /opt/app/dcae-certificate/trust.pass\n        collector.schema.checkflag: \"1\"\n        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.2.1_ONAP.json\\\"}\"\n        collector.externalSchema.checkflag:\n          get_input: collector_externalSchema_checkflag\n        collector.externalSchema.schemasLocation:\n          get_input: collector_externalSchema_schemasLocation\n        collector.externalSchema.mappingFileLocation:\n          get_input: collector_externalSchema_mappingFileLocation\n        event.externalSchema.schemaRefPath: $.event.stndDefinedFields.schemaReference\n        event.externalSchema.stndDefinedDataPath: $.event.stndDefinedFields.data\n        collector.service.port: \"8080\"\n        collector.service.secure.port: \"8443\"\n        event.transform.flag: \"0\"\n        auth.method:\n          get_input: auth_method\n        header.authlist:\n          get_input: user_list\n        services_calls: []\n        streams_publishes:\n          ves-fault:\n            dmaap_info:\n              topic_url:\n                get_input: ves_fault_publish_url\n            type: message_router\n          ves-measurement:\n            dmaap_info:\n              topic_url:\n                get_input: ves_measurement_publish_url\n            type: message_router\n          ves-notification:\n            dmaap_info:\n              topic_url:\n                get_input: ves_notification_publish_url\n            type: message_router\n          ves-pnfRegistration:\n            dmaap_info:\n              topic_url:\n                get_input: ves_pnfRegistration_publish_url\n            type: message_router\n          ves-heartbeat:\n            dmaap_info:\n              topic_url:\n                get_input: ves_heartbeat_publish_url\n            type: message_router\n          ves-other:\n            dmaap_info:\n              topic_url:\n                get_input: ves_other_publish_url\n            type: message_router\n          ves-3gpp-fault-supervision:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_fault_supervision_publish_url\n            type: message_router\n          ves-3gpp-provisioning:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_provisioning_publish_url\n            type: message_router\n          ves-3gpp-heartbeat:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_hearbeat_publish_url\n            type: message_router\n          ves-3gpp-performance-assurance:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_performance_assurance_publish_url\n            type: message_router\n        collector.dynamic.config.update.frequency: \"5\"\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      image:\n        get_input: tag_version\n      replicas: {get_input: replicas}\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      log_info:\n        log_directory: \"/opt/app/VESCollector/logs\"\n      tls_info:\n        cert_directory: '\''/opt/app/dcae-certificate/'\''\n        use_tls:\n          get_input: enable_tls\n      external_cert:\n        external_cert_directory: '\''/opt/app/dcae-certificate/'\''\n        use_external_tls:\n          get_input: external_cert_use_external_tls\n        cert_type:\n          get_input: external_cert_cert_type\n        ca_name:\n          get_input: external_cert_ca_name\n        external_certificate_parameters:\n          common_name:\n            get_input: external_cert_common_name\n          sans:\n            get_input: external_cert_sans\n    type: dcae.nodes.ContainerizedServiceComponent\n'
+ echo '
   {
    "vnfTypes": [],
    "owner": "dcaeorch",
    "typeVersion": 2105301209,
    "typeName": "k8s-ves",
    "component": "dcae",
    "application": "DCAE",
    "blueprintTemplate": "# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved.\n# Copyright (c) 2020 Nokia. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  ves_other_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_OTHER_OUTPUT\"\n  ves_heartbeat_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT\"\n  ves_fault_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_FAULT_OUTPUT\"\n  ves_measurement_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  ves_notification_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT\"\n  ves_pnfRegistration_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT\"\n  ves_3gpp_fault_supervision_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT\"\n  ves_3gpp_provisioning_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT\"\n  ves_3gpp_hearbeat_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_HEARTBEAT_OUTPUT\"\n  ves_3gpp_performance_assurance_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.8.0\"\n  internal_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"8080\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30235\"\n  internal_port_tls:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"8443\"\n  external_port_tls:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30417\"\n  auth_method:\n    type: string\n    default: \"noAuth\"\n  service_component_type:\n    type: string\n    default: \"dcae-ves-collector\"\n  service_id:\n    type: string\n    default: \"dcae-ves-collector\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-ves-collector\"\n  enable_tls:\n    type: boolean\n    default: false\n  external_cert_cert_type:\n    type: string\n    description: Output type\n    default: \"JKS\"\n  external_cert_ca_name:\n    type: string\n    description: Name of Certificate Authority configured on CertService side.\n    default: \"RA\"\n  external_cert_common_name:\n    type: string\n    description: Common name which should be present in certificate.\n    default: \"dcae-ves-collector\"\n  external_cert_sans:\n    type: string\n    description: \"List of Subject Alternative Names (SANs) which should be present\n      in certificate. Delimiter - , Should contain common_name value and other FQDNs\n      under which given component is accessible.\"\n    default: \"dcae-ves-collector,ves-collector,ves\"\n  external_cert_use_external_tls:\n    type: boolean\n    description: Flag to indicate external tls enable/disable.\n    default: false\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  user_list:\n    type: string\n    description: List of user,password separated by pipe; pwd should be generated by using crypt-password tool (https://nexus.onap.org/#nexus-search;quick~crypt-password)\n    default: \"sample1,$2a$10$0buh.2WeYwN868YMwnNNEuNEAMNYVU9.FSMJGyIKV3dGET/7oGOi6|demouser,$2a$10$1cc.COcqV/d3iT2N7BjPG.S6ZKv2jpb9a5MV.o7lMih/GpjJRX.Ce\"\n  collector_externalSchema_checkflag:\n    type: integer\n    default: 1\n  collector_externalSchema_schemasLocation:\n    type: string\n    default: \"./etc/externalRepo/\"\n  collector_externalSchema_mappingFileLocation:\n    type: string\n    default: \"./etc/externalRepo/schema-map.json\"\nnode_templates:\n  ves:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - concat: [{get_input: internal_port},\":\",{get_input: external_port}]\n              - concat: [{get_input: internal_port_tls},\":\",{get_input: external_port_tls}]\n    properties:\n      application_config:\n        collector.dmaap.streamid: fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurement=ves-measurement|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|3GPP-FaultSupervision=ves-3gpp-fault-supervision|3GPP-Heartbeat=ves-3gpp-heartbeat|3GPP-Provisioning=ves-3gpp-provisioning|3GPP-PerformanceAssurance=ves-3gpp-performance-assurance\n        collector.inputQueue.maxPending: \"8096\"\n        collector.keystore.file.location: /opt/app/dcae-certificate/cert.jks\n        collector.keystore.passwordfile: /opt/app/dcae-certificate/jks.pass\n        collector.truststore.file.location: /opt/app/dcae-certificate/trust.jks\n        collector.truststore.passwordfile: /opt/app/dcae-certificate/trust.pass\n        collector.schema.checkflag: \"1\"\n        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.2.1_ONAP.json\\\"}\"\n        collector.externalSchema.checkflag:\n          get_input: collector_externalSchema_checkflag\n        collector.externalSchema.schemasLocation:\n          get_input: collector_externalSchema_schemasLocation\n        collector.externalSchema.mappingFileLocation:\n          get_input: collector_externalSchema_mappingFileLocation\n        event.externalSchema.schemaRefPath: $.event.stndDefinedFields.schemaReference\n        event.externalSchema.stndDefinedDataPath: $.event.stndDefinedFields.data\n        collector.service.port: \"8080\"\n        collector.service.secure.port: \"8443\"\n        event.transform.flag: \"0\"\n        auth.method:\n          get_input: auth_method\n        header.authlist:\n          get_input: user_list\n        services_calls: []\n        streams_publishes:\n          ves-fault:\n            dmaap_info:\n              topic_url:\n                get_input: ves_fault_publish_url\n            type: message_router\n          ves-measurement:\n            dmaap_info:\n              topic_url:\n                get_input: ves_measurement_publish_url\n            type: message_router\n          ves-notification:\n            dmaap_info:\n              topic_url:\n                get_input: ves_notification_publish_url\n            type: message_router\n          ves-pnfRegistration:\n            dmaap_info:\n              topic_url:\n                get_input: ves_pnfRegistration_publish_url\n            type: message_router\n          ves-heartbeat:\n            dmaap_info:\n              topic_url:\n                get_input: ves_heartbeat_publish_url\n            type: message_router\n          ves-other:\n            dmaap_info:\n              topic_url:\n                get_input: ves_other_publish_url\n            type: message_router\n          ves-3gpp-fault-supervision:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_fault_supervision_publish_url\n            type: message_router\n          ves-3gpp-provisioning:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_provisioning_publish_url\n            type: message_router\n          ves-3gpp-heartbeat:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_hearbeat_publish_url\n            type: message_router\n          ves-3gpp-performance-assurance:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_performance_assurance_publish_url\n            type: message_router\n        collector.dynamic.config.update.frequency: \"5\"\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      image:\n        get_input: tag_version\n      replicas: {get_input: replicas}\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      log_info:\n        log_directory: \"/opt/app/VESCollector/logs\"\n      tls_info:\n        cert_directory: '\''/opt/app/dcae-certificate/'\''\n        use_tls:\n          get_input: enable_tls\n      external_cert:\n        external_cert_directory: '\''/opt/app/dcae-certificate/'\''\n        use_external_tls:\n          get_input: external_cert_use_external_tls\n        cert_type:\n          get_input: external_cert_cert_type\n        ca_name:\n          get_input: external_cert_ca_name\n        external_certificate_parameters:\n          common_name:\n            get_input: external_cert_common_name\n          sans:\n            get_input: external_cert_sans\n    type: dcae.nodes.ContainerizedServiceComponent\n"
   }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 22659    0 11465  100 11194   414k   404k --:--:-- --:--:-- --:--:--  819k
+ keep_running 'Finished bootstrap steps.'
+ echo Finished bootstrap steps.
 default='0' decoder='Long' />org.onap.dcaegen2.ves.domain.ves54.CommonEventHeader.Priority.NORMAL'VesAdapter''SNMP Fault'org.onap.dcaegen2.ves.domain.ves54.FaultFields.VfStatus.ACTIVEorg.onap.dcaegen2.ves.domain.ves54.FaultFields.EventSeverity.MINOR\"\n              stream_publisher: ves-fault\n              stream_subscriber: snmp-notification\n        streams_publishes:\n          ves-fault:\n            dmaap_info:\n              topic_url:\n                get_input: ves_fault_publish_url\n            type: message_router\n          ves-pnfRegistration:\n            dmaap_info:\n              topic_url:\n                get_input: ves_pnfRegistration_publish_url\n            type: message_router\n        streams_subscribes:\n          rcc-notification:\n            dmaap_info:\n              topic_url:\n                get_input: rcc_notification_url\n            type: message_router\n          snmp-notification:\n            dmaap_info:\n              topic_url:\n                get_input: snmp_notification_url\n            type: message_router\n      docker_config: {}\n      image:\n        get_input: tag_version\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n    type: dcae.nodes.ContainerizedServiceComponent\ntosca_definitions_version: cloudify_dsl_1_3\n\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"7b0db10e-12dd-46af-90b0-9f0b4167260f","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/7b0db10e-12dd-46af-90b0-9f0b4167260f"},"created":1622333397416,"deactivated":null}{"owner":"dcaeorch","typeName":"k8s-ves","typeVersion":2105301209,"blueprintTemplate":"# -*- indent-tabs-mode: nil -*- # vi: set expandtab:\n#\n# ============LICENSE_START====================================================\n# =============================================================================\n# Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved.\n# Copyright (c) 2020 Nokia. All rights reserved.\n# =============================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ============LICENSE_END======================================================\n\ntosca_definitions_version: cloudify_dsl_1_3\n\nimports:\n  - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\n  - plugin:k8splugin?version=>=3.4.3,<4.0.0\n\ninputs:\n  ves_other_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_OTHER_OUTPUT\"\n  ves_heartbeat_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT\"\n  ves_fault_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_FAULT_OUTPUT\"\n  ves_measurement_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\n  ves_notification_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT\"\n  ves_pnfRegistration_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT\"\n  ves_3gpp_fault_supervision_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT\"\n  ves_3gpp_provisioning_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT\"\n  ves_3gpp_hearbeat_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_HEARTBEAT_OUTPUT\"\n  ves_3gpp_performance_assurance_publish_url:\n    type: string\n    default: \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT\"\n  tag_version:\n    type: string\n    default: \"nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.8.0\"\n  internal_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"8080\"\n  external_port:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30235\"\n  internal_port_tls:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"8443\"\n  external_port_tls:\n    type: string\n    description: Kubernetes node port on which collector is exposed\n    default: \"30417\"\n  auth_method:\n    type: string\n    default: \"noAuth\"\n  service_component_type:\n    type: string\n    default: \"dcae-ves-collector\"\n  service_id:\n    type: string\n    default: \"dcae-ves-collector\"\n  service_component_name_override:\n    type: string\n    default: \"dcae-ves-collector\"\n  enable_tls:\n    type: boolean\n    default: false\n  external_cert_cert_type:\n    type: string\n    description: Output type\n    default: \"JKS\"\n  external_cert_ca_name:\n    type: string\n    description: Name of Certificate Authority configured on CertService side.\n    default: \"RA\"\n  external_cert_common_name:\n    type: string\n    description: Common name which should be present in certificate.\n    default: \"dcae-ves-collector\"\n  external_cert_sans:\n    type: string\n    description: \"List of Subject Alternative Names (SANs) which should be present\n      in certificate. Delimiter - , Should contain common_name value and other FQDNs\n      under which given component is accessible.\"\n    default: \"dcae-ves-collector,ves-collector,ves\"\n  external_cert_use_external_tls:\n    type: boolean\n    description: Flag to indicate external tls enable/disable.\n    default: false\n  replicas:\n    type: integer\n    description: number of instances\n    default: 1\n  user_list:\n    type: string\n    description: List of user,password separated by pipe; pwd should be generated by using crypt-password tool (https://nexus.onap.org/#nexus-search;quick~crypt-password)\n    default: \"sample1,$2a$10$0buh.2WeYwN868YMwnNNEuNEAMNYVU9.FSMJGyIKV3dGET/7oGOi6|demouser,$2a$10$1cc.COcqV/d3iT2N7BjPG.S6ZKv2jpb9a5MV.o7lMih/GpjJRX.Ce\"\n  collector_externalSchema_checkflag:\n    type: integer\n    default: 1\n  collector_externalSchema_schemasLocation:\n    type: string\n    default: \"./etc/externalRepo/\"\n  collector_externalSchema_mappingFileLocation:\n    type: string\n    default: \"./etc/externalRepo/schema-map.json\"\nnode_templates:\n  ves:\n    interfaces:\n      cloudify.interfaces.lifecycle:\n        start:\n          inputs:\n            ports:\n              - concat: [{get_input: internal_port},\":\",{get_input: external_port}]\n              - concat: [{get_input: internal_port_tls},\":\",{get_input: external_port_tls}]\n    properties:\n      application_config:\n        collector.dmaap.streamid: fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurement=ves-measurement|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|3GPP-FaultSupervision=ves-3gpp-fault-supervision|3GPP-Heartbeat=ves-3gpp-heartbeat|3GPP-Provisioning=ves-3gpp-provisioning|3GPP-PerformanceAssurance=ves-3gpp-performance-assurance\n        collector.inputQueue.maxPending: \"8096\"\n        collector.keystore.file.location: /opt/app/dcae-certificate/cert.jks\n        collector.keystore.passwordfile: /opt/app/dcae-certificate/jks.pass\n        collector.truststore.file.location: /opt/app/dcae-certificate/trust.jks\n        collector.truststore.passwordfile: /opt/app/dcae-certificate/trust.pass\n        collector.schema.checkflag: \"1\"\n        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.2.1_ONAP.json\\\"}\"\n        collector.externalSchema.checkflag:\n          get_input: collector_externalSchema_checkflag\n        collector.externalSchema.schemasLocation:\n          get_input: collector_externalSchema_schemasLocation\n        collector.externalSchema.mappingFileLocation:\n          get_input: collector_externalSchema_mappingFileLocation\n        event.externalSchema.schemaRefPath: $.event.stndDefinedFields.schemaReference\n        event.externalSchema.stndDefinedDataPath: $.event.stndDefinedFields.data\n        collector.service.port: \"8080\"\n        collector.service.secure.port: \"8443\"\n        event.transform.flag: \"0\"\n        auth.method:\n          get_input: auth_method\n        header.authlist:\n          get_input: user_list\n        services_calls: []\n        streams_publishes:\n          ves-fault:\n            dmaap_info:\n              topic_url:\n                get_input: ves_fault_publish_url\n            type: message_router\n          ves-measurement:\n            dmaap_info:\n              topic_url:\n                get_input: ves_measurement_publish_url\n            type: message_router\n          ves-notification:\n            dmaap_info:\n              topic_url:\n                get_input: ves_notification_publish_url\n            type: message_router\n          ves-pnfRegistration:\n            dmaap_info:\n              topic_url:\n                get_input: ves_pnfRegistration_publish_url\n            type: message_router\n          ves-heartbeat:\n            dmaap_info:\n              topic_url:\n                get_input: ves_heartbeat_publish_url\n            type: message_router\n          ves-other:\n            dmaap_info:\n              topic_url:\n                get_input: ves_other_publish_url\n            type: message_router\n          ves-3gpp-fault-supervision:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_fault_supervision_publish_url\n            type: message_router\n          ves-3gpp-provisioning:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_provisioning_publish_url\n            type: message_router\n          ves-3gpp-heartbeat:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_hearbeat_publish_url\n            type: message_router\n          ves-3gpp-performance-assurance:\n            dmaap_info:\n              topic_url:\n                get_input: ves_3gpp_performance_assurance_publish_url\n            type: message_router\n        collector.dynamic.config.update.frequency: \"5\"\n      docker_config:\n        healthcheck:\n          endpoint: /healthcheck\n          interval: 15s\n          timeout: 1s\n          type: http\n      image:\n        get_input: tag_version\n      replicas: {get_input: replicas}\n      service_component_type: { get_input: service_component_type }\n      service_id: { get_input: service_id }\n      service_component_name_override: { get_input: service_component_name_override }\n      log_info:\n        log_directory: \"/opt/app/VESCollector/logs\"\n      tls_info:\n        cert_directory: '/opt/app/dcae-certificate/'\n        use_tls:\n          get_input: enable_tls\n      external_cert:\n        external_cert_directory: '/opt/app/dcae-certificate/'\n        use_external_tls:\n          get_input: external_cert_use_external_tls\n        cert_type:\n          get_input: external_cert_cert_type\n        ca_name:\n          get_input: external_cert_ca_name\n        external_certificate_parameters:\n          common_name:\n            get_input: external_cert_common_name\n          sans:\n            get_input: external_cert_sans\n    type: dcae.nodes.ContainerizedServiceComponent\n","serviceIds":null,"vnfTypes":[],"serviceLocations":null,"asdcServiceId":null,"asdcResourceId":null,"asdcServiceURL":null,"application":"DCAE","component":"dcae","typeId":"2699e029-b4fe-403b-9ab2-ecab05651d3c","selfLink":{"rel":"self","href":"https://inventory:8080/dcae-service-types/2699e029-b4fe-403b-9ab2-ecab05651d3c"},"created":1622333397521,"deactivated":null}Finished bootstrap steps.
+ wait
+ sleep infinity
+ COUNT=0
+ ((  0 > 0  ))
+ return 1
+ INPUTS=
+ '[' -n k8s-tcagen2-inputs.yaml ']'
+ INPUTS=-i/inputs/k8s-tcagen2-inputs.yaml
+ cfy deployments create -b tcagen2 -i/inputs/k8s-tcagen2-inputs.yaml tcagen2

Blueprint uploaded. The blueprint's id is prh

Blueprint uploaded. The blueprint's id is hv-ves
+ cm_hasany 'deployments?id=prh'
++ curl -Ss -H 'Tenant: default_tenant' --user admin:UmH7vbj6 --cacert /certs/cacert.pem 'https://dcae-cloudify-manager:443/api/v3.1/deployments?id=prh&_include=id'
++ /bin/jq .metadata.pagination.total
+ cm_hasany 'deployments?id=hv-ves'
++ curl ++ -Ss -H /bin/jq 'Tenant: default_tenant' .metadata.pagination.total
--user admin:UmH7vbj6 --cacert /certs/cacert.pem 'https://dcae-cloudify-manager:443/api/v3.1/deployments?id=hv-ves&_include=id'
+ COUNT=0
+ ((  0 > 0  ))
+ return 1
+ INPUTS=
+ '[' -n k8s-prh-inputs.yaml ']'
+ INPUTS=-i/inputs/k8s-prh-inputs.yaml
+ cfy deployments create -b prh -i/inputs/k8s-prh-inputs.yaml prh
+ COUNT=0
+ ((  0 > 0  ))
+ return 1
+ INPUTS=
+ '[' -n k8s-hv_ves-inputs.yaml ']'
+ INPUTS=-i/inputs/k8s-hv_ves-inputs.yaml
+ cfy deployments create -b hv-ves -i/inputs/k8s-hv_ves-inputs.yaml hv-ves
Creating new deployment from blueprint ves-tls...
Creating new deployment from blueprint tcagen2...
Deployment created. The deployment's id is ves-tls
+ cm_hasany 'node-instances?deployment_id=ves-tls&state=uninitialized&state=deleted'
++ curl -Ss -H 'Tenant: default_tenant' --user admin:UmH7vbj6 --cacert /certs/cacert.pem 'https://dcae-cloudify-manager:443/api/v3.1/node-instances?deployment_id=ves-tls&state=uninitialized&state=deleted&_include=id'
++ /bin/jq .metadata.pagination.total
Deployment created. The deployment's id is tcagen2
Creating new deployment from blueprint prh...
+ COUNT=1
+ ((  1 > 0  ))
+ return 0
+ cfy executions start -d ves-tls install
+ cm_hasany 'node-instances?deployment_id=tcagen2&state=uninitialized&state=deleted'
++ curl -Ss -H 'Tenant: default_tenant' --user admin:UmH7vbj6 --cacert /certs/cacert.pem 'https://dcae-cloudify-manager:443/api/v3.1/node-instances?deployment_id=tcagen2&state=uninitialized&state=deleted&_include=id'
++ /bin/jq .metadata.pagination.total
Creating new deployment from blueprint hv-ves...
+ COUNT=1
+ ((  1 > 0  ))
+ return 0
+ cfy executions start -d tcagen2 install
Deployment created. The deployment's id is prh
+ cm_hasany 'node-instances?deployment_id=prh&state=uninitialized&state=deleted'
++ curl -Ss -H 'Tenant: default_tenant' --user admin:UmH7vbj6 --cacert /certs/cacert.pem ++ 'https://dcae-cloudify-manager:443/api/v3.1/node-instances?deployment_id=prh&state=uninitialized&state=deleted&_include=id'
/bin/jq .metadata.pagination.total
Deployment created. The deployment's id is hv-ves
+ COUNT=1
+ ((  1 > 0  ))
+ return 0
+ cfy executions start -d prh install
+ cm_hasany 'node-instances?deployment_id=hv-ves&state=uninitialized&state=deleted'
++ curl -Ss -H 'Tenant: default_tenant' --user admin:UmH7vbj6 --cacert /certs/cacert.pem 'https://dcae-cloudify-manager:443/api/v3.1/node-instances?deployment_id=hv-ves&state=uninitialized&state=deleted&_include=id'
++ /bin/jq .metadata.pagination.total
Executing workflow `install` on deployment `ves-tls` [timeout=900 seconds]
Executing workflow `install` on deployment `tcagen2` [timeout=900 seconds]
+ COUNT=1
+ ((  1 > 0  ))
+ return 0
+ cfy executions start -d hv-ves install
Deployment environment creation is pending...
Deployment environment creation is pending...
Executing workflow `install` on deployment `prh` [timeout=900 seconds]
Executing workflow `install` on deployment `hv-ves` [timeout=900 seconds]
Deployment environment creation is pending...
Deployment environment creation is pending...
2021-05-30 00:10:02.584  CFY  Starting 'create_deployment_environment' workflow execution
2021-05-30 00:10:02.589  LOG  INFO: Creating deployment work directory
2021-05-30 00:10:02.879  CFY  'create_deployment_environment' workflow execution succeeded
2021-05-30 00:10:02.987  CFY  Starting 'create_deployment_environment' workflow execution
2021-05-30 00:10:02.993  LOG  INFO: Creating deployment work directory
2021-05-30 00:10:03.184  CFY  'create_deployment_environment' workflow execution succeeded
2021-05-30 00:10:05.576  CFY  Starting 'create_deployment_environment' workflow execution
2021-05-30 00:10:05.582  LOG  INFO: Creating deployment work directory
2021-05-30 00:10:05.787  CFY  'create_deployment_environment' workflow execution succeeded
2021-05-30 00:10:05.265  CFY  Starting 'create_deployment_environment' workflow execution
2021-05-30 00:10:05.270  LOG  INFO: Creating deployment work directory
2021-05-30 00:10:05.567  CFY  'create_deployment_environment' workflow execution succeeded
2021-05-30 00:10:06.914  CFY  Starting 'install' workflow execution
2021-05-30 00:10:07.463  CFY  [ves_7ne49s] Validating node instance before creation: nothing to do
2021-05-30 00:10:07.467  CFY  [ves_7ne49s] Precreating node instance: nothing to do
2021-05-30 00:10:07.469  CFY  [ves_7ne49s] Creating node instance
2021-05-30 00:10:08.074  CFY  [ves_7ne49s.create] Sending task 'k8splugin.create_for_components'
2021-05-30 00:10:07.042  CFY  Starting 'install' workflow execution
2021-05-30 00:10:07.581  CFY  [docker.tca_df97s3] Validating node instance before creation: nothing to do
2021-05-30 00:10:07.585  CFY  [docker.tca_df97s3] Precreating node instance: nothing to do
2021-05-30 00:10:07.590  CFY  [docker.tca_df97s3] Creating node instance
2021-05-30 00:10:08.138  CFY  [docker.tca_df97s3.create] Sending task 'k8splugin.create_for_components'
2021-05-30 00:10:08.662  LOG  [docker.tca_df97s3.create] INFO: Installing managed plugin: 5625ee82-3b4a-4af7-a078-1e89a5b39cb8 [package_name: k8splugin, package_version: 3.8.0, supported_platform: linux_x86_64, distribution: centos, distribution_release: core]
2021-05-30 00:10:11.110  CFY  Starting 'install' workflow execution
2021-05-30 00:10:11.908  CFY  [hv-ves_wmrm23] Validating node instance before creation: nothing to do
2021-05-30 00:10:11.956  CFY  [hv-ves_wmrm23] Precreating node instance: nothing to do
2021-05-30 00:10:11.960  CFY  [hv-ves_wmrm23] Creating node instance
2021-05-30 00:10:12.759  CFY  [hv-ves_wmrm23.create] Sending task 'k8splugin.create_for_components'
2021-05-30 00:10:11.493  CFY  Starting 'install' workflow execution
2021-05-30 00:10:12.599  CFY  [prh_wfjvjs] Validating node instance before creation: nothing to do
2021-05-30 00:10:12.656  CFY  [prh_wfjvjs] Precreating node instance: nothing to do
2021-05-30 00:10:12.665  CFY  [prh_wfjvjs] Creating node instance
2021-05-30 00:10:13.660  CFY  [prh_wfjvjs.create] Sending task 'k8splugin.create_for_components'
2021-05-30 00:10:35.247  LOG  [ves_7ne49s.create] INFO: Using existing installation of managed plugin: 5625ee82-3b4a-4af7-a078-1e89a5b39cb8 [package_name: k8splugin, package_version: 3.8.0, supported_platform: linux_x86_64, distribution: centos, distribution_release: core]
2021-05-30 00:10:36.463  LOG  [prh_wfjvjs.create] INFO: Using existing installation of managed plugin: 5625ee82-3b4a-4af7-a078-1e89a5b39cb8 [package_name: k8splugin, package_version: 3.8.0, supported_platform: linux_x86_64, distribution: centos, distribution_release: core]
2021-05-30 00:10:35.690  LOG  [hv-ves_wmrm23.create] INFO: Using existing installation of managed plugin: 5625ee82-3b4a-4af7-a078-1e89a5b39cb8 [package_name: k8splugin, package_version: 3.8.0, supported_platform: linux_x86_64, distribution: centos, distribution_release: core]
2021-05-30 00:10:42.082  LOG  [ves_7ne49s.create] INFO: Added config for dcae-ves-collector
2021-05-30 00:10:42.082  LOG  [ves_7ne49s.create] INFO: Done setting up: dcae-ves-collector
2021-05-30 00:10:42.967  CFY  [ves_7ne49s.create] Task succeeded 'k8splugin.create_for_components'
2021-05-30 00:10:42.969  CFY  [ves_7ne49s] Node instance created
2021-05-30 00:10:43.569  CFY  [ves_7ne49s] Configuring node instance: nothing to do
2021-05-30 00:10:42.083  LOG  [docker.tca_df97s3.create] INFO: Added config for dcae-tcagen2
2021-05-30 00:10:42.083  LOG  [docker.tca_df97s3.create] INFO: Done setting up: dcae-tcagen2
2021-05-30 00:10:43.273  CFY  [docker.tca_df97s3.create] Task succeeded 'k8splugin.create_for_components'
2021-05-30 00:10:43.274  CFY  [docker.tca_df97s3] Node instance created
2021-05-30 00:10:42.106  LOG  [prh_wfjvjs.create] INFO: Added config for dcae-prh
2021-05-30 00:10:42.106  LOG  [prh_wfjvjs.create] INFO: Done setting up: dcae-prh
2021-05-30 00:10:43.073  CFY  [prh_wfjvjs.create] Task succeeded 'k8splugin.create_for_components'
2021-05-30 00:10:43.076  CFY  [prh_wfjvjs] Node instance created
2021-05-30 00:10:43.582  CFY  [prh_wfjvjs] Configuring node instance: nothing to do
2021-05-30 00:10:43.663  CFY  [prh_wfjvjs] Starting node instance
2021-05-30 00:10:42.084  LOG  [hv-ves_wmrm23.create] INFO: Added config for dcae-hv-ves-collector
2021-05-30 00:10:42.084  LOG  [hv-ves_wmrm23.create] INFO: Done setting up: dcae-hv-ves-collector
2021-05-30 00:10:42.986  CFY  [hv-ves_wmrm23.create] Task succeeded 'k8splugin.create_for_components'
2021-05-30 00:10:42.992  CFY  [hv-ves_wmrm23] Node instance created
2021-05-30 00:10:43.578  CFY  [hv-ves_wmrm23] Configuring node instance: nothing to do
2021-05-30 00:10:43.582  CFY  [hv-ves_wmrm23] Starting node instance
2021-05-30 00:10:43.572  CFY  [ves_7ne49s] Starting node instance
2021-05-30 00:10:45.057  CFY  [ves_7ne49s.start] Sending task 'k8splugin.create_and_start_container_for_components'
2021-05-30 00:10:43.770  CFY  [docker.tca_df97s3] Configuring node instance: nothing to do
2021-05-30 00:10:43.860  CFY  [docker.tca_df97s3] Starting node instance
2021-05-30 00:10:45.109  CFY  [docker.tca_df97s3.start] Sending task 'k8splugin.create_and_start_container_for_components'
2021-05-30 00:10:45.157  CFY  [hv-ves_wmrm23.start] Sending task 'k8splugin.create_and_start_container_for_components'
2021-05-30 00:10:45.112  CFY  [prh_wfjvjs.start] Sending task 'k8splugin.create_and_start_container_for_components'
2021-05-30 00:10:50.889  LOG  [docker.tca_df97s3.start] INFO: Starting k8s deployment for dcae-tcagen2, image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.2.1, env: {'CONSUL_HOST': 'consul-server.onap', 'CONFIG_BINDING_SERVICE': 'config-binding-service', 'DCAE_CA_CERTPATH': '/etc/tca-gen2/ssl/cacert.pem', 'CBS_CONFIG_URL': 'https://config-binding-service:10443/service_component_all/dcae-tcagen2'}, kwargs: {'volumes': [], 'ports': ['9091:0'], 'envs': {}, 'log_info': {'log_directory': '/opt/logs/dcae-analytics-tca'}, 'tls_info': {'cert_directory': '/etc/tca-gen2/ssl', 'use_tls': True}, 'external_cert': {'external_cert_directory': '/opt/app/dcae-certificate/external', 'use_external_tls': False, 'ca_name': 'RA', 'cert_type': 'P12', 'external_certificate_parameters': {'common_name': '', 'sans': ''}}, 'labels': {'cfydeployment': 'tcagen2', 'cfynode': 'docker.tca', 'cfynodeinstance': 'docker.tca_df97s3'}, 'resource_config': {}, 'readiness': {'endpoint': '/actuator/health', 'interval': '30s', 'timeout': '10s', 'type': 'http'}, 'liveness': {}, 'k8s_location': 'central'}
2021-05-30 00:10:50.889  LOG  [docker.tca_df97s3.start] INFO: Passing k8sconfig: {'namespace': 'onap', 'consul_dns_name': 'consul-server.onap', 'default_k8s_location': 'central', 'image_pull_secrets': ['onap-docker-registry-key'], 'max_wait': 1800, 'filebeat': {'log_path': '/var/log/onap', 'data_path': '/usr/share/filebeat/data', 'config_path': '/usr/share/filebeat/filebeat.yml', 'config_subpath': 'filebeat.yml', 'image': 'docker.nexus.azure.onap.eu/beats/filebeat:5.5.0', 'config_map': 'onap-dcae-filebeat-configmap'}, 'tls': {'cert_path': '/opt/app/osaaf', 'image': 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0', 'component_cert_dir': '/opt/dcae/cacert', 'component_ca_cert_path': '/opt/dcae/cacert/cacert.pem', 'ca_cert_configmap': 'onap-dcae-cloudify-manager-dcae-cacert'}, 'external_cert': {'image_tag': 'nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-client:2.3.3', 'request_url': 'https://oom-cert-service:8443/v1/certificate/', 'timeout': '30000', 'country': 'US', 'organization': 'Linux-Foundation', 'state': 'California', 'organizational_unit': 'ONAP', 'location': 'San-Francisco', 'cert_secret_name': 'oom-cert-service-client-tls-secret', 'keystore_password': 'secret', 'truststore_password': 'secret'}, 'cert_post_processor': {'image_tag': 'nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-post-processor:2.3.3'}, 'cbs': {'base_url': 'https://config-binding-service:10443/service_component_all'}, 'cmpv2_issuer': {'enabled': 'false', 'name': 'cmpv2-issuer-onap'}, 'consul_host': 'consul-server:8500'}
2021-05-30 00:10:50.971  LOG  [docker.tca_df97s3.start] INFO: Creating init container: TLS 
  * [nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0]
2021-05-30 00:10:50.972  LOG  [docker.tca_df97s3.start] INFO: CMPv2 Issuer properties: {'enabled': 'false', 'name': 'cmpv2-issuer-onap'}
2021-05-30 00:10:50.972  LOG  [docker.tca_df97s3.start] INFO: CMPv2 integration enabled: False
2021-05-30 00:10:51.180  LOG  [docker.tca_df97s3.start] ERROR: Unexpected error while starting container: (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '210'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-tcagen2\" already exists","reason":"AlreadyExists","details":{"name":"dcae-tcagen2","kind":"services"},"code":409}


2021-05-30 00:10:51.057  LOG  [hv-ves_wmrm23.start] INFO: Starting k8s deployment for dcae-hv-ves-collector, image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.6.0, env: {'CONSUL_HOST': 'consul-server.onap', 'CONFIG_BINDING_SERVICE': 'config-binding-service', 'DCAE_CA_CERTPATH': '/etc/ves-hv/ssl/cacert.pem', 'CBS_CONFIG_URL': 'https://config-binding-service:10443/service_component_all/dcae-hv-ves-collector', 'JAVA_OPTS': '-Dlogback.configurationFile=/etc/ONAP/dcae-hv-ves-collector/logback.xml'}, kwargs: {'volumes': [], 'ports': ['6061:30222'], 'envs': {'JAVA_OPTS': '-Dlogback.configurationFile=/etc/ONAP/dcae-hv-ves-collector/logback.xml'}, 'log_info': {'log_directory': '/var/log/ONAP/dcae-hv-ves-collector'}, 'tls_info': {'cert_directory': '/etc/ves-hv/ssl', 'use_tls': True}, 'external_cert': {'external_cert_directory': '/etc/ves-hv/ssl', 'use_external_tls': False, 'ca_name': 'RA', 'cert_type': 'JKS', 'external_certificate_parameters': {'common_name': 'dcae-hv-ves-collector', 'sans': 'dcae-hv-ves-collector,hv-ves-collector,hv-ves'}}, 'labels': {'cfydeployment': 'hv-ves', 'cfynode': 'hv-ves', 'cfynodeinstance': 'hv-ves_wmrm23'}, 'resource_config': {}, 'readiness': {'type': 'script', 'script': '/opt/ves-hv-collector/healthcheck.sh', 'interval': '15s', 'timeout': '2s'}, 'liveness': {}, 'k8s_location': 'central'}
2021-05-30 00:10:51.057  LOG  [hv-ves_wmrm23.start] INFO: Passing k8sconfig: {'namespace': 'onap', 'consul_dns_name': 'consul-server.onap', 'default_k8s_location': 'central', 'image_pull_secrets': ['onap-docker-registry-key'], 'max_wait': 1800, 'filebeat': {'log_path': '/var/log/onap', 'data_path': '/usr/share/filebeat/data', 'config_path': '/usr/share/filebeat/filebeat.yml', 'config_subpath': 'filebeat.yml', 'image': 'docker.nexus.azure.onap.eu/beats/filebeat:5.5.0', 'config_map': 'onap-dcae-filebeat-configmap'}, 'tls': {'cert_path': '/opt/app/osaaf', 'image': 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0', 'component_cert_dir': '/opt/dcae/cacert', 'component_ca_cert_path': '/opt/dcae/cacert/cacert.pem', 'ca_cert_configmap': 'onap-dcae-cloudify-manager-dcae-cacert'}, 'external_cert': {'image_tag': 'nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-client:2.3.3', 'request_url': 'https://oom-cert-service:8443/v1/certificate/', 'timeout': '30000', 'country': 'US', 'organization': 'Linux-Foundation', 'state': 'California', 'organizational_unit': 'ONAP', 'location': 'San-Francisco', 'cert_secret_name': 'oom-cert-service-client-tls-secret', 'keystore_password': 'secret', 'truststore_password': 'secret'}, 'cert_post_processor': {'image_tag': 'nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-post-processor:2.3.3'}, 'cbs': {'base_url': 'https://config-binding-service:10443/service_component_all'}, 'cmpv2_issuer': {'enabled': 'false', 'name': 'cmpv2-issuer-onap'}, 'consul_host': 'consul-server:8500'}
2021-05-30 00:10:51.070  LOG  [hv-ves_wmrm23.start] INFO: Creating init container: TLS 
  * [nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0]
2021-05-30 00:10:51.070  LOG  [hv-ves_wmrm23.start] INFO: CMPv2 Issuer properties: {'enabled': 'false', 'name': 'cmpv2-issuer-onap'}
2021-05-30 00:10:51.070  LOG  [hv-ves_wmrm23.start] INFO: CMPv2 integration enabled: False
2021-05-30 00:10:51.780  LOG  [hv-ves_wmrm23.start] ERROR: Unexpected error while starting container: (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '228'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-hv-ves-collector\" already exists","reason":"AlreadyExists","details":{"name":"dcae-hv-ves-collector","kind":"services"},"code":409}


2021-05-30 00:10:51.094  LOG  [prh_wfjvjs.start] INFO: Starting k8s deployment for dcae-prh, image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:1.5.6, env: {'CONSUL_HOST': 'consul-server.onap', 'CONFIG_BINDING_SERVICE': 'config-binding-service', 'DCAE_CA_CERTPATH': '/opt/app/prh/etc/cert/cacert.pem', 'CBS_CONFIG_URL': 'https://config-binding-service:10443/service_component_all/dcae-prh'}, kwargs: {'volumes': [], 'ports': ['8100:0'], 'envs': {}, 'log_info': {'log_directory': '/opt/app/prh/logs'}, 'tls_info': {'cert_directory': '/opt/app/prh/etc/cert', 'use_tls': True}, 'external_cert': {'external_cert_directory': '/opt/app/dcae-certificate/external', 'use_external_tls': False, 'ca_name': 'RA', 'cert_type': 'P12', 'external_certificate_parameters': {'common_name': '', 'sans': ''}}, 'labels': {'cfydeployment': 'prh', 'cfynode': 'prh', 'cfynodeinstance': 'prh_wfjvjs'}, 'resource_config': {}, 'readiness': {'endpoint': '/heartbeat', 'interval': '15s', 'timeout': '1s', 'type': 'http'}, 'liveness': {}, 'k8s_location': 'central'}
2021-05-30 00:10:51.094  LOG  [prh_wfjvjs.start] INFO: Passing k8sconfig: {'namespace': 'onap', 'consul_dns_name': 'consul-server.onap', 'default_k8s_location': 'central', 'image_pull_secrets': ['onap-docker-registry-key'], 'max_wait': 1800, 'filebeat': {'log_path': '/var/log/onap', 'data_path': '/usr/share/filebeat/data', 'config_path': '/usr/share/filebeat/filebeat.yml', 'config_subpath': 'filebeat.yml', 'image': 'docker.nexus.azure.onap.eu/beats/filebeat:5.5.0', 'config_map': 'onap-dcae-filebeat-configmap'}, 'tls': {'cert_path': '/opt/app/osaaf', 'image': 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0', 'component_cert_dir': '/opt/dcae/cacert', 'component_ca_cert_path': '/opt/dcae/cacert/cacert.pem', 'ca_cert_configmap': 'onap-dcae-cloudify-manager-dcae-cacert'}, 'external_cert': {'image_tag': 'nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-client:2.3.3', 'request_url': 'https://oom-cert-service:8443/v1/certificate/', 'timeout': '30000', 'country': 'US', 'organization': 'Linux-Foundation', 'state': 'California', 'organizational_unit': 'ONAP', 'location': 'San-Francisco', 'cert_secret_name': 'oom-cert-service-client-tls-secret', 'keystore_password': 'secret', 'truststore_password': 'secret'}, 'cert_post_processor': {'image_tag': 'nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-post-processor:2.3.3'}, 'cbs': {'base_url': 'https://config-binding-service:10443/service_component_all'}, 'cmpv2_issuer': {'enabled': 'false', 'name': 'cmpv2-issuer-onap'}, 'consul_host': 'consul-server:8500'}
2021-05-30 00:10:51.181  LOG  [prh_wfjvjs.start] INFO: Creating init container: TLS 
  * [nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0]
2021-05-30 00:10:51.181  LOG  [prh_wfjvjs.start] INFO: CMPv2 Issuer properties: {'enabled': 'false', 'name': 'cmpv2-issuer-onap'}
2021-05-30 00:10:51.181  LOG  [prh_wfjvjs.start] INFO: CMPv2 integration enabled: False
2021-05-30 00:10:51.774  LOG  [prh_wfjvjs.start] ERROR: Unexpected error while starting container: (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '202'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-prh\" already exists","reason":"AlreadyExists","details":{"name":"dcae-prh","kind":"services"},"code":409}


2021-05-30 00:10:51.077  LOG  [ves_7ne49s.start] INFO: Starting k8s deployment for dcae-ves-collector, image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.8.0, env: {'CONSUL_HOST': 'consul-server.onap', 'CONFIG_BINDING_SERVICE': 'config-binding-service', 'DCAE_CA_CERTPATH': '/opt/app/dcae-certificate//cacert.pem', 'CBS_CONFIG_URL': 'https://config-binding-service:10443/service_component_all/dcae-ves-collector'}, kwargs: {'volumes': [], 'ports': ['8080:0', '8443:30417'], 'envs': {}, 'log_info': {'log_directory': '/opt/app/VESCollector/logs'}, 'tls_info': {'cert_directory': '/opt/app/dcae-certificate/', 'use_tls': True}, 'external_cert': {'external_cert_directory': '/opt/app/dcae-certificate/', 'use_external_tls': False, 'ca_name': 'RA', 'cert_type': 'JKS', 'external_certificate_parameters': {'common_name': 'dcae-ves-collector', 'sans': 'dcae-ves-collector,ves-collector,ves'}}, 'labels': {'cfydeployment': 'ves-tls', 'cfynode': 'ves', 'cfynodeinstance': 'ves_7ne49s'}, 'resource_config': {}, 'readiness': {'endpoint': '/healthcheck', 'interval': '15s', 'timeout': '1s', 'type': 'http'}, 'liveness': {}, 'k8s_location': 'central'}
2021-05-30 00:10:51.077  LOG  [ves_7ne49s.start] INFO: Passing k8sconfig: {'namespace': 'onap', 'consul_dns_name': 'consul-server.onap', 'default_k8s_location': 'central', 'image_pull_secrets': ['onap-docker-registry-key'], 'max_wait': 1800, 'filebeat': {'log_path': '/var/log/onap', 'data_path': '/usr/share/filebeat/data', 'config_path': '/usr/share/filebeat/filebeat.yml', 'config_subpath': 'filebeat.yml', 'image': 'docker.nexus.azure.onap.eu/beats/filebeat:5.5.0', 'config_map': 'onap-dcae-filebeat-configmap'}, 'tls': {'cert_path': '/opt/app/osaaf', 'image': 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0', 'component_cert_dir': '/opt/dcae/cacert', 'component_ca_cert_path': '/opt/dcae/cacert/cacert.pem', 'ca_cert_configmap': 'onap-dcae-cloudify-manager-dcae-cacert'}, 'external_cert': {'image_tag': 'nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-client:2.3.3', 'request_url': 'https://oom-cert-service:8443/v1/certificate/', 'timeout': '30000', 'country': 'US', 'organization': 'Linux-Foundation', 'state': 'California', 'organizational_unit': 'ONAP', 'location': 'San-Francisco', 'cert_secret_name': 'oom-cert-service-client-tls-secret', 'keystore_password': 'secret', 'truststore_password': 'secret'}, 'cert_post_processor': {'image_tag': 'nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-post-processor:2.3.3'}, 'cbs': {'base_url': 'https://config-binding-service:10443/service_component_all'}, 'cmpv2_issuer': {'enabled': 'false', 'name': 'cmpv2-issuer-onap'}, 'consul_host': 'consul-server:8500'}
2021-05-30 00:10:51.099  LOG  [ves_7ne49s.start] INFO: Creating init container: TLS 
  * [nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0]
2021-05-30 00:10:51.099  LOG  [ves_7ne49s.start] INFO: CMPv2 Issuer properties: {'enabled': 'false', 'name': 'cmpv2-issuer-onap'}
2021-05-30 00:10:51.099  LOG  [ves_7ne49s.start] INFO: CMPv2 integration enabled: False
2021-05-30 00:10:51.510  LOG  [ves_7ne49s.start] ERROR: Unexpected error while starting container: (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '222'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-ves-collector\" already exists","reason":"AlreadyExists","details":{"name":"dcae-ves-collector","kind":"services"},"code":409}


2021-05-30 00:10:52.260  CFY  [ves_7ne49s.start] Task failed 'k8splugin.create_and_start_container_for_components' -> (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '222'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-ves-collector\" already exists","reason":"AlreadyExists","details":{"name":"dcae-ves-collector","kind":"services"},"code":409}


Traceback (most recent call last):
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 48, in wrapper
    return task_start_func(**kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 99, in wrapper
    ctx.instance.runtime_properties, **kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 77, in _wrapper_merge_inputs
    return task_func(**inputs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 38, in wrapper
    return task_func(**kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/tasks.py", line 459, in create_and_start_container_for_components
    **_parse_cloudify_context(**start_inputs))))
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/tasks.py", line 413, in _create_and_start_component
    returned_args = _create_and_start_container(service_component_name, image, **sub_kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/tasks.py", line 314, in _create_and_start_container
    k8s_location=kwargs.get("k8s_location"))
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8sclient/k8sclient.py", line 976, in deploy
    raise e
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8sclient/k8sclient.py", line 949, in deploy
    core.create_namespaced_service(namespace, service)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api/core_v1_api.py", line 8304, in create_namespaced_service
    return self.create_namespaced_service_with_http_info(namespace, body, **kwargs)  # noqa: E501
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api/core_v1_api.py", line 8413, in create_namespaced_service_with_http_info
    collection_formats=collection_formats)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 353, in call_api
    _preload_content, _request_timeout, _host)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 184, in __call_api
    _request_timeout=_request_timeout)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 397, in request
    body=body)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/rest.py", line 280, in POST
    body=body)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/rest.py", line 233, in request
    raise ApiException(http_resp=r)
kubernetes.client.exceptions.ApiException: (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '222'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-ves-collector\" already exists","reason":"AlreadyExists","details":{"name":"dcae-ves-collector","kind":"services"},"code":409}



During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/mgmtworker/env/lib/python3.6/site-packages/cloudify/dispatch.py", line 793, in main
    payload = handler.handle()
  File "/opt/mgmtworker/env/lib/python3.6/site-packages/cloudify/dispatch.py", line 456, in handle
    result = self._run_operation_func(ctx, kwargs)
  File "/opt/mgmtworker/env/lib/python3.6/site-packages/cloudify/dispatch.py", line 509, in _run_operation_func
    return self.func(*self.args, **kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 60, in wrapper
    raise NonRecoverableError(e)
cloudify.exceptions.NonRecoverableError: (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '222'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-ves-collector\" already exists","reason":"AlreadyExists","details":{"name":"dcae-ves-collector","kind":"services"},"code":409}



2021-05-30 00:10:52.708  CFY  'install' workflow execution failed: Task failed 'k8splugin.create_and_start_container_for_components'
Finished executing workflow install on deployment ves-tls
* Run 'cfy events list bdb36f96-6fdc-4281-9f1a-7b2e5a9eb48f' to retrieve the execution's events/logs
2021-05-30 00:10:51.965  CFY  [docker.tca_df97s3.start] Task failed 'k8splugin.create_and_start_container_for_components' -> (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '210'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-tcagen2\" already exists","reason":"AlreadyExists","details":{"name":"dcae-tcagen2","kind":"services"},"code":409}


Traceback (most recent call last):
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 48, in wrapper
    return task_start_func(**kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 99, in wrapper
    ctx.instance.runtime_properties, **kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 77, in _wrapper_merge_inputs
    return task_func(**inputs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 38, in wrapper
    return task_func(**kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/tasks.py", line 459, in create_and_start_container_for_components
    **_parse_cloudify_context(**start_inputs))))
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/tasks.py", line 413, in _create_and_start_component
    returned_args = _create_and_start_container(service_component_name, image, **sub_kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/tasks.py", line 314, in _create_and_start_container
    k8s_location=kwargs.get("k8s_location"))
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8sclient/k8sclient.py", line 976, in deploy
    raise e
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8sclient/k8sclient.py", line 949, in deploy
    core.create_namespaced_service(namespace, service)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api/core_v1_api.py", line 8304, in create_namespaced_service
    return self.create_namespaced_service_with_http_info(namespace, body, **kwargs)  # noqa: E501
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api/core_v1_api.py", line 8413, in create_namespaced_service_with_http_info
    collection_formats=collection_formats)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 353, in call_api
    _preload_content, _request_timeout, _host)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 184, in __call_api
    _request_timeout=_request_timeout)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 397, in request
    body=body)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/rest.py", line 280, in POST
    body=body)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/rest.py", line 233, in request
    raise ApiException(http_resp=r)
kubernetes.client.exceptions.ApiException: (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '210'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-tcagen2\" already exists","reason":"AlreadyExists","details":{"name":"dcae-tcagen2","kind":"services"},"code":409}



During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/mgmtworker/env/lib/python3.6/site-packages/cloudify/dispatch.py", line 793, in main
    payload = handler.handle()
  File "/opt/mgmtworker/env/lib/python3.6/site-packages/cloudify/dispatch.py", line 456, in handle
    result = self._run_operation_func(ctx, kwargs)
  File "/opt/mgmtworker/env/lib/python3.6/site-packages/cloudify/dispatch.py", line 509, in _run_operation_func
    return self.func(*self.args, **kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 60, in wrapper
    raise NonRecoverableError(e)
cloudify.exceptions.NonRecoverableError: (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '210'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-tcagen2\" already exists","reason":"AlreadyExists","details":{"name":"dcae-tcagen2","kind":"services"},"code":409}



2021-05-30 00:10:52.560  CFY  'install' workflow execution failed: Task failed 'k8splugin.create_and_start_container_for_components'
Finished executing workflow install on deployment tcagen2
* Run 'cfy events list 418eb4c6-4cb1-4105-804c-15fd0a374439' to retrieve the execution's events/logs
2021-05-30 00:10:52.767  CFY  [hv-ves_wmrm23.start] Task failed 'k8splugin.create_and_start_container_for_components' -> (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '228'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-hv-ves-collector\" already exists","reason":"AlreadyExists","details":{"name":"dcae-hv-ves-collector","kind":"services"},"code":409}


Traceback (most recent call last):
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 48, in wrapper
    return task_start_func(**kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 99, in wrapper
    ctx.instance.runtime_properties, **kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 77, in _wrapper_merge_inputs
    return task_func(**inputs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 38, in wrapper
    return task_func(**kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/tasks.py", line 459, in create_and_start_container_for_components
    **_parse_cloudify_context(**start_inputs))))
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/tasks.py", line 413, in _create_and_start_component
    returned_args = _create_and_start_container(service_component_name, image, **sub_kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/tasks.py", line 314, in _create_and_start_container
    k8s_location=kwargs.get("k8s_location"))
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8sclient/k8sclient.py", line 976, in deploy
    raise e
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8sclient/k8sclient.py", line 949, in deploy
    core.create_namespaced_service(namespace, service)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api/core_v1_api.py", line 8304, in create_namespaced_service
    return self.create_namespaced_service_with_http_info(namespace, body, **kwargs)  # noqa: E501
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api/core_v1_api.py", line 8413, in create_namespaced_service_with_http_info
    collection_formats=collection_formats)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 353, in call_api
    _preload_content, _request_timeout, _host)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 184, in __call_api
    _request_timeout=_request_timeout)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 397, in request
    body=body)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/rest.py", line 280, in POST
    body=body)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/rest.py", line 233, in request
    raise ApiException(http_resp=r)
kubernetes.client.exceptions.ApiException: (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '228'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-hv-ves-collector\" already exists","reason":"AlreadyExists","details":{"name":"dcae-hv-ves-collector","kind":"services"},"code":409}



During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/mgmtworker/env/lib/python3.6/site-packages/cloudify/dispatch.py", line 793, in main
    payload = handler.handle()
  File "/opt/mgmtworker/env/lib/python3.6/site-packages/cloudify/dispatch.py", line 456, in handle
    result = self._run_operation_func(ctx, kwargs)
  File "/opt/mgmtworker/env/lib/python3.6/site-packages/cloudify/dispatch.py", line 509, in _run_operation_func
    return self.func(*self.args, **kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 60, in wrapper
    raise NonRecoverableError(e)
cloudify.exceptions.NonRecoverableError: (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '228'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-hv-ves-collector\" already exists","reason":"AlreadyExists","details":{"name":"dcae-hv-ves-collector","kind":"services"},"code":409}



2021-05-30 00:10:53.021  CFY  'install' workflow execution failed: Task failed 'k8splugin.create_and_start_container_for_components'
Finished executing workflow install on deployment hv-ves
* Run 'cfy events list b65a9a5e-ea60-440a-924f-7497808e343e' to retrieve the execution's events/logs
2021-05-30 00:10:52.773  CFY  [prh_wfjvjs.start] Task failed 'k8splugin.create_and_start_container_for_components' -> (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '202'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-prh\" already exists","reason":"AlreadyExists","details":{"name":"dcae-prh","kind":"services"},"code":409}


Traceback (most recent call last):
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 48, in wrapper
    return task_start_func(**kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 99, in wrapper
    ctx.instance.runtime_properties, **kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 77, in _wrapper_merge_inputs
    return task_func(**inputs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 38, in wrapper
    return task_func(**kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/tasks.py", line 459, in create_and_start_container_for_components
    **_parse_cloudify_context(**start_inputs))))
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/tasks.py", line 413, in _create_and_start_component
    returned_args = _create_and_start_container(service_component_name, image, **sub_kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/tasks.py", line 314, in _create_and_start_container
    k8s_location=kwargs.get("k8s_location"))
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8sclient/k8sclient.py", line 976, in deploy
    raise e
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8sclient/k8sclient.py", line 949, in deploy
    core.create_namespaced_service(namespace, service)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api/core_v1_api.py", line 8304, in create_namespaced_service
    return self.create_namespaced_service_with_http_info(namespace, body, **kwargs)  # noqa: E501
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api/core_v1_api.py", line 8413, in create_namespaced_service_with_http_info
    collection_formats=collection_formats)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 353, in call_api
    _preload_content, _request_timeout, _host)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 184, in __call_api
    _request_timeout=_request_timeout)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 397, in request
    body=body)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/rest.py", line 280, in POST
    body=body)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/kubernetes/client/rest.py", line 233, in request
    raise ApiException(http_resp=r)
kubernetes.client.exceptions.ApiException: (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '202'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-prh\" already exists","reason":"AlreadyExists","details":{"name":"dcae-prh","kind":"services"},"code":409}



During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/mgmtworker/env/lib/python3.6/site-packages/cloudify/dispatch.py", line 793, in main
    payload = handler.handle()
  File "/opt/mgmtworker/env/lib/python3.6/site-packages/cloudify/dispatch.py", line 456, in handle
    result = self._run_operation_func(ctx, kwargs)
  File "/opt/mgmtworker/env/lib/python3.6/site-packages/cloudify/dispatch.py", line 509, in _run_operation_func
    return self.func(*self.args, **kwargs)
  File "/opt/mgmtworker/env/plugins/default_tenant/k8splugin/3.8.0/lib/python3.6/site-packages/k8splugin/decorators.py", line 60, in wrapper
    raise NonRecoverableError(e)
cloudify.exceptions.NonRecoverableError: (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Sun, 30 May 2021 00:10:51 GMT', 'Content-Length': '202'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"services \"dcae-prh\" already exists","reason":"AlreadyExists","details":{"name":"dcae-prh","kind":"services"},"code":409}



2021-05-30 00:10:53.019  CFY  'install' workflow execution failed: Task failed 'k8splugin.create_and_start_container_for_components'
Finished executing workflow install on deployment prh
* Run 'cfy events list 100994e8-8a77-41e4-aeb0-94d0dd209103' to retrieve the execution's events/logs