diff options
author | Stavros Kanarakis <stavros.kanarakis@nokia.com> | 2019-03-21 10:50:44 +0200 |
---|---|---|
committer | Stavros Kanarakis <stavros.kanarakis@nokia.com> | 2019-03-22 13:11:10 +0200 |
commit | d860357fe6481107f593a40163839f757102836d (patch) | |
tree | b93f0e15096cea868e0a2c23605ac6f03b6f90d4 /components/bbs-event-processor/dpo | |
parent | 82fe4e29ff6c0b48fe15d88b1fca882292e6af43 (diff) |
BBS use case event processor microservice code
BBS event processor code handling PNF-relocation internal events from PRH
and CPE authentication events raised by external Edge SDN M&C entities onto
ONAP platform
Change-Id: Icd2077dbe43192621228e07d88a01d65332262db
Issue-ID: DCAEGEN2-1354
Signed-off-by: Stavros Kanarakis <stavros.kanarakis@nokia.com>
Diffstat (limited to 'components/bbs-event-processor/dpo')
5 files changed, 432 insertions, 0 deletions
diff --git a/components/bbs-event-processor/dpo/blueprints/bbs-event-processor-input.yaml b/components/bbs-event-processor/dpo/blueprints/bbs-event-processor-input.yaml new file mode 100644 index 00000000..97bb138e --- /dev/null +++ b/components/bbs-event-processor/dpo/blueprints/bbs-event-processor-input.yaml @@ -0,0 +1,29 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= + + +tag_version: nexus3.onap.org:10003/dcae-services/org.onap.dcaegen2.services.components.bbs-event-processor:1.0.0-SNAPSHOT +pnf_reregistration_url: http:message-router:3904/events/unauthenticated.PNF_UPDATE +cpe_authentication_url: http:message-router:3904/events/unauthenticated.CPE_AUTHENTICATION +close_loop_url: http:message-router:3904/events/unauthenticated.DCAE_CL_OUTPUT +application_rereg_policy_scope: policyScopeReReg +application_rereg_cl_control_name: clControlNameReReg +application_cpeAuth_policy_scope: policyScopeCpeAuth +application_cpeAuth_cl_control_name: clControlNameCpeAuth +application_cbs_polling_interval_sec: 120 +dmaap_consumer_id: c12 +dmaap_consumer_group: OpenDcae-c12 diff --git a/components/bbs-event-processor/dpo/blueprints/k8s-bbs-event-processor.yaml-template b/components/bbs-event-processor/dpo/blueprints/k8s-bbs-event-processor.yaml-template new file mode 100644 index 00000000..3468d7f6 --- /dev/null +++ b/components/bbs-event-processor/dpo/blueprints/k8s-bbs-event-processor.yaml-template @@ -0,0 +1,130 @@ +# -*- indent-tabs-mode: nil -*- # vi: set expandtab: +# +# ============LICENSE_START==================================================== +# ============================================================================= +# Copyright (c) 2019 AT&T, NOKIA +# ============================================================================= +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END====================================================== + +tosca_definitions_version: cloudify_dsl_1_3 + +imports: + - "http://www.getcloudify.org/spec/cloudify/3.4/types.yaml" + - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.4.5/k8splugin_types.yaml + +inputs: + aai_enrichment_host: + type: string + default: "aai" + aai_enrichment_port: + type: integer + default: 8443 + aai_enrichment_protocol: + type: string + default: "https" + tag_version: + type: string + replicas: + type: integer + description: number of instances + default: 1 + host_port: + description: port on Kubernetes host where bbs-event-processor API will be exposed + default: 0 + pnf_reregistration_url: + type: string + cpe_authentication_url: + type: string + close_loop_url: + type: string + application_rereg_policy_scope: + description: Policy Scope value for building PNF relocation CL event + type: string + application_rereg_cl_control_name: + description: Close Loop control name value for building PNF relocation CL event + type: string + application_cpeAuth_policy_scope: + description: Policy Scope value for building CPE Authentication CL event + type: string + application_cpeAuth_cl_control_name: + description: Close Loop control name value for building CPE Authentication CL event + type: string + application_cbs_polling_interval_sec: + type: integer + default: 300 + dmaap_consumer_id: + type: string + dmaap_consumer_group: + type: string +node_templates: + bbs-event-processor: + type: dcae.nodes.ContainerizedPlatformComponent + properties: + application_config: + streams_subscribes: + pnf_reregistration: + type: message_router + dmaap_info: + topic_url: { get_input: pnf_reregistration_url } + cpe_authentication: + type: message_router + dmaap_info: + topic_url: { get_input: cpe_authentication_url } + streams_publishes: + close_loop: + type: message_router + dmaap_info: + topic_url: { get_input: close_loop_url } + dmaap.protocol: "http" + dmaap.contentType: "application/json" + dmaap.consumer.consumerId: { get_input: dmaap_consumer_id } + dmaap.consumer.consumerGroup: { get_input: dmaap_consumer_group } + dmaap.messageLimit: -1 + dmaap.timeoutMs: -1 + aai.host: { get_input: aai_enrichment_host } + aai.port: { get_input: aai_enrichment_port } + aai.protocol: { get_input: aai_enrichment_protocol } + aai.username: "AAI" + aai.password: "AAI" + aai.aaiIgnoreSslCertificateErrors: true + application.pipelinesPollingIntervalSec: 30 + application.pipelinesTimeoutSec: 15 + application.cbsPollingIntervalSec: { get_input: application_cbs_polling_interval_sec } + application.reregistration.policyScope: { get_input: application_rereg_policy_scope } + application.reregistration.clControlName: { get_input: application_rereg_cl_control_name } + application.cpe.authentication.policyScope: { get_input: application_cpeAuth_policy_scope } + application.cpe.authentication.clControlName: { get_input: application_cpeAuth_cl_control_name } + application.reregistration.configKey: "pnf_reregistration" + application.cpeAuth.configKey: "cpe_authentication" + application.closeLoop.configKey: "close_loop" + host_port: + { get_input: host_port } + container_port: + 8100 + docker_config: + healthcheck: + endpoint: /heartbeat + interval: 180s + timeout: 5s + type: http + image: + { get_input: tag_version } + replicas: {get_input: replicas} + name: 'bbs-event-processor' + dns_name: 'bbs-event-processor' + log_info: + log_directory: "/opt/app/bbs-event-processor/logs" + tls_info: + cert_directory: '/opt/app/bbs-event-processor/etc/cert/' + use_tls: false diff --git a/components/bbs-event-processor/dpo/data-formats/aai-interaction.json b/components/bbs-event-processor/dpo/data-formats/aai-interaction.json new file mode 100644 index 00000000..e502d866 --- /dev/null +++ b/components/bbs-event-processor/dpo/data-formats/aai-interaction.json @@ -0,0 +1,11 @@ +{ + "self": { + "name": "AAI_Interaction", + "version": "1.0.0", + "description": "Messages exchanged between a microservice and AAI" + }, + "dataformatversion": "1.0.0", + "unstructured": { + "encoding": "UTF-8" + } +} diff --git a/components/bbs-event-processor/dpo/data-formats/pnf-reregistration.json b/components/bbs-event-processor/dpo/data-formats/pnf-reregistration.json new file mode 100644 index 00000000..f6fcbe6d --- /dev/null +++ b/components/bbs-event-processor/dpo/data-formats/pnf-reregistration.json @@ -0,0 +1,11 @@ +{ + "self": { + "name": "PNF_Reregistration_internal", + "version": "1.0.0", + "description": "Internal event sent by PRH for PNF re-registration" + }, + "dataformatversion": "1.0.0", + "unstructured": { + "encoding": "UTF-8" + } +} diff --git a/components/bbs-event-processor/dpo/spec/bbs-event-processor-spec.json b/components/bbs-event-processor/dpo/spec/bbs-event-processor-spec.json new file mode 100644 index 00000000..b1329bef --- /dev/null +++ b/components/bbs-event-processor/dpo/spec/bbs-event-processor-spec.json @@ -0,0 +1,251 @@ +{ + "self": { + "version": "1.0.0", + "name": "dcae-bbs-event-processor", + "description": "Processes events for PNF relocation and CPE authentication", + "component_type": "docker" + }, + "streams": { + "subscribes": [ + { + "format": "PNF_Reregistration_internal", + "version": "1.0.0", + "type": "message_router", + "config_key" : "pnf_reregistration" + }, + { + "format": "VES_specification", + "version": "7.30.1", + "type": "message_router", + "config_key" : "cpe_authentication" + } + ], + "publishes": [ + { + "format": "DCAE_CL_Output", + "version": "1.0.1", + "type": "message_router", + "config_key": "close_loop" + } + ] + }, + "services": { + "calls": [ + { + "config_key": "aai-interaction", + "request": { + "format": "AAI_Interaction", + "version": "1.0.0" + }, + "response": { + "format": "AAI_Interaction", + "version": "1.0.0" + } + } + ], + "provides": [] + }, + "parameters": [ + { + "name": "dmaap.protocol", + "value": "http", + "designer_editable": true, + "policy_editable": false, + "sourced_at_deployment": false, + "description": "DmaaP protocol used for any DMaaP interaction" + }, + { + "name": "dmaap.contentType", + "value": "application/json", + "designer_editable": true, + "policy_editable": false, + "sourced_at_deployment": false, + "description": "DmaaP content type" + }, + { + "name": "dmaap.consumer.consumerId", + "value": "c12", + "designer_editable": true, + "policy_editable": false, + "sourced_at_deployment": true, + "description": "DmaaP consumer consumer ID" + }, + { + "name": "dmaap.consumer.consumerGroup", + "value": "OpenDcae-c12", + "designer_editable": true, + "policy_editable": false, + "sourced_at_deployment": true, + "description": "DmaaP consumer consumer group" + }, + { + "name": "dmaap.messageLimit", + "value": 1, + "designer_editable": true, + "policy_editable": false, + "sourced_at_deployment": false, + "description": "DmaaP message limit" + }, + { + "name": "dmaap.timeoutMs", + "value": -1, + "designer_editable": true, + "policy_editable": false, + "sourced_at_deployment": false, + "description": "DmaaP timeout in millis" + }, + { + "name": "aai.host", + "value": "aai.onap.svc.cluster.local", + "designer_editable": true, + "policy_editable": false, + "sourced_at_deployment": true, + "description": "AAI enrichment host" + }, + { + "name": "aai.port", + "value": 8443, + "designer_editable": true, + "policy_editable": false, + "sourced_at_deployment": true, + "description": "AAI enrichment port" + }, + { + "name": "aai.protocol", + "value": "https", + "designer_editable": true, + "policy_editable": false, + "sourced_at_deployment": true, + "description": "AAI protocol" + }, + { + "name": "aai.username", + "value": "AAI", + "designer_editable": true, + "policy_editable": false, + "sourced_at_deployment": false, + "description": "AAI username" + }, + { + "name": "aai.password", + "value": "AAI", + "designer_editable": true, + "policy_editable": false, + "sourced_at_deployment": false, + "description": "AAI password" + }, + { + "name": "aai.aaiIgnoreSslCertificateErrors", + "value": true, + "designer_editable": true, + "policy_editable": false, + "sourced_at_deployment": false, + "description": "Ignore SSL Certificate errors for AAI" + }, + { + "name": "application.pipelinesPollingIntervalSec", + "value": 30, + "constraints": [ + { + "greater_or_equal": 15 + } + ], + "designer_editable": true, + "policy_editable": false, + "sourced_at_deployment": false, + "description": "Polling interval in seconds for executing event processing reactive pipelines" + }, + { + "name": "application.pipelinesTimeoutSec", + "value": 15, + "designer_editable": true, + "policy_editable": false, + "sourced_at_deployment": false, + "description": "Timeout in seconds to wait in reactive pipelines processing" + }, + { + "name": "application.cbsPollingIntervalSec", + "value": 300, + "constraints": [ + { + "greater_or_equal": 20 + } + ], + "designer_editable": true, + "policy_editable": false, + "sourced_at_deployment": true, + "description": "Polling interval in seconds for fetching configuration from Consul via CBS service" + }, + { + "name": "application.reregistration.policyScope", + "value": "policyScope", + "designer_editable": false, + "policy_editable": true, + "sourced_at_deployment": true, + "description": "Hard-coded value for Policy Scope parameter in Policy triggering event to be published" + }, + { + "name": "application.reregistration.clControlName", + "value": "controlName", + "designer_editable": false, + "policy_editable": true, + "sourced_at_deployment": true, + "description": "Hard-coded value for CL control name parameter in Policy triggering event to be published" + }, + { + "name": "application.cpe.authentication.policyScope", + "value": "policyScope", + "designer_editable": false, + "policy_editable": true, + "sourced_at_deployment": true, + "description": "Hard-coded value for CL control nam parameter in Policy triggering event to be published" + }, + { + "name": "application.cpe.authentication.clControlName", + "value": "controlName", + "designer_editable": false, + "policy_editable": true, + "sourced_at_deployment": true, + "description": "Hard-coded value for CL control nam parameter in Policy triggering event to be published" + }, + { + "name": "application.reregistration.configKey", + "value": "pnf_reregistration", + "designer_editable": false, + "policy_editable": true, + "sourced_at_deployment": true, + "description": "Config-key for PNF re-registration" + } + , + { + "name": "application.cpeAuth.configKey", + "value": "cpe_authentication", + "designer_editable": false, + "policy_editable": true, + "sourced_at_deployment": true, + "description": "Config-key for CPE authentication" + }, + { + "name": "application.closeLoop.configKey", + "value": "close_loop", + "designer_editable": false, + "policy_editable": true, + "sourced_at_deployment": true, + "description": "Config-key for Close Loop" + } + ], + "auxilary": { + "healthcheck": { + "type": "http", + "interval": "180s", + "timeout": "5s", + "endpoint": "/heartbeat" + } + }, + "artifacts": [ + { + "uri": "nexus3.onap.org:10003/dcae-services/org.onap.dcaegen2.services.components.bbs-event-processor:1.0.0-SNAPSHOT", + "type": "docker image" + } + ] +} |