diff options
author | 2019-03-14 15:06:40 +0530 | |
---|---|---|
committer | 2019-03-18 15:25:23 +0530 | |
commit | be11dee889f5a740d584458b62804e5fd4296e53 (patch) | |
tree | 2cc5e14c29df1a40f8e7bbe3bb08fffa38e023b8 /etc | |
parent | d76c2d0f61bfb4373b13fcdb6fc3317467dd19b4 (diff) |
Issue-ID: DCAEGEN2-1055 Generic RestConfCollector
Change-Id: I1800affa2b34cbb7487c0d8411e078adec5a0c48
Signed-off-by: s00370346 <swarup.nayak1@huawei.com>
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/DmaapConfig.json | 6 | ||||
-rwxr-xr-x | etc/access-token.json | 5 | ||||
-rwxr-xr-x | etc/collector.properties | 100 | ||||
-rwxr-xr-x | etc/establish-subscription-input-template.json | 5 | ||||
-rwxr-xr-x | etc/keystore | bin | 0 -> 2196 bytes | |||
-rwxr-xr-x | etc/log4j.xml | 23 | ||||
-rwxr-xr-x | etc/ont_registartion_subscription_template.json | 19 | ||||
-rwxr-xr-x | etc/ont_registartion_unsubscription_template.json | 5 | ||||
-rwxr-xr-x | etc/passwordfile | 2 | ||||
-rwxr-xr-x | etc/rcc_passwordfile | 1 | ||||
-rwxr-xr-x | etc/sdnc.p12 | bin | 0 -> 1713 bytes | |||
-rwxr-xr-x | etc/trustpasswordfile | 1 | ||||
-rwxr-xr-x | etc/truststore | bin | 0 -> 1453 bytes |
13 files changed, 131 insertions, 36 deletions
diff --git a/etc/DmaapConfig.json b/etc/DmaapConfig.json index 5176cea..6aac252 100755 --- a/etc/DmaapConfig.json +++ b/etc/DmaapConfig.json @@ -1,12 +1,12 @@ { "channels": [ { - "name": "route_failure", - "cambria.topic": "unauthenticated.DCAE_RESTCONF_COL_OUTPUT", + "name": "device-registration", + "cambria.topic": "unauthenticated.DCAE_RCC_OUTPUT", "class": "HpCambriaOutputStream", "stripHpId": "true", "type": "out", - "cambria.hosts": "onap-message-router" + "cambria.hosts": "119.3.84.152:30227" } ] } diff --git a/etc/access-token.json b/etc/access-token.json index 6fc9fbb..caae620 100755 --- a/etc/access-token.json +++ b/etc/access-token.json @@ -1,4 +1,5 @@ { - "userName" : "test123", - "password" : "Changeme_123" + "grantType" : "password", + "userName" : "tokenUser", + "value" : "Test_12345" } diff --git a/etc/collector.properties b/etc/collector.properties index 6907e88..96cc845 100755 --- a/etc/collector.properties +++ b/etc/collector.properties @@ -1,28 +1,90 @@ +#
+# ============LICENSE_START====================================================
+# =============================================================================
+# Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2019 Huawei. 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======================================================
###############################################################################
##
-## Collector config
+## Collector Server config
##
## - Default values are shown as commented settings.
##
###############################################################################
-## Processing
-collector.dmaapfile=./etc/DmaapConfig.json
+# list all restconf collector parameters
+
+collector.rcc.appName = "RCCollector"
+collector.rcc.appDescription = "DCAE RestConf Collector Application"
+
###############################################################################
##
-## Tomcat control
+## HTTP(S) service
##
-#tomcat.maxthreads=(tomcat default, which is usually 200)
-# list all restconf collector parameters
-templateFileName=./etc/establish-subscription-input-template.json
-restapiUrl=10.0.4.1:8080;10.0.4.2:8080
-httpMethod=post
-responsePrefix=restapi-result
-skipSending=false
-sseConnectURL=http://10.0.4.1:8080/RestConfServer/rest/ssevents; http://10.0.4.2:8080/RestConfServer/rest/ssevents
-format=json
-restapiUser=access
-restapiPassword=Huawei@123
-trustStoreFileName=./etc/truststore1.openecomp.client.jks;./etc/truststore2.openecomp.client.jks
-trustStorePassword=adminadmin
-keyStoreFileName=./etc/sotn1.p12;./etc/ctrl2.p12
-keyStorePassword=adminadmin
+## Normally:
+##
+## - 8686 is http service
+## - https is disabled by default (-1)
+##
+## - At this time, the server always binds to 0.0.0.0
+##
+## The default port when collector.header.authflag is disabled (0)
+collector.rcc.service.port=8686
+
+## The secure port is required if collector.header.authflag is set to 1 (true)
+## Authentication is only supported via secure port
+## When enabled - require valid keystore defined
+collector.rcc.service.secure.port=8687
+
+
+## The keystore must be setup per installation when secure port is configured
+collector.rcc.keystore.file.location=etc/sdnc.p12
+collector.rcc.keystore.passwordfile=etc/passwordfile
+
+## The truststore must be setup per installation when mutual tls support is configured
+collector.rcc.truststore.file.location=etc/truststore.onap.client.jks
+collector.rcc.truststore.passwordfile=etc/trustpasswordfile
+
+###############################################################################
+## Processing
+##
+## If there's a problem that prevents the collector from processing alarms,
+## it's normally better to apply back pressure to the caller than to try to
+## buffer beyond a reasonable size limit. With a limit, the server won't crash
+## due to being out of memory, and the caller will get a 5xx reply saying the
+## server is in trouble.
+collector.rcc.inputQueue.maxPending=8096
+
+
+## List all streamid per domain to be supported. The streamid should match to channel name on dmaapfile
+collector.rcc.dmaap.streamid=notification=device-registration
+collector.dmaapfile=./etc/DmaapConfig.json
+rcc_policy = [{\"controller_name\":\"AccessM&C\",\"controller_restapiUrl\":\"10.118.191.43: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\",\"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\":\"777777777\"}]}]
+
+# Describes at what frequency (measured in minutes) should application try to fetch config from CBS
+
+
+## authflag control authentication by the collector
+## If enabled (1) - then authlist has to be defined
+## When authflag is enabled, only secure port will be supported
+## To disable enter 0
+collector.header.authflag=0
+
+## Combination of userid,hashPassword encoded pwd list to be supported
+## userid and pwd comma separated; pipe delimitation between each pair
+collector.header.authlist=sample1,$2a$10$0buh.2WeYwN868YMwnNNEuNEAMNYVU9.FSMJGyIKV3dGET/7oGOi6
+collector.keystore.file.location=etc/keystore
+collector.keystore.passwordfile=etc/rcc_passwordfile
+collector.rcc.keystore.alias=tomcat
+collector.rcc.service.secure.clientauth=0
diff --git a/etc/establish-subscription-input-template.json b/etc/establish-subscription-input-template.json deleted file mode 100755 index 5273683..0000000 --- a/etc/establish-subscription-input-template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "ietf-subscribed-notifications:input": { - "encoding": "encode-json" - } -} diff --git a/etc/keystore b/etc/keystore Binary files differnew file mode 100755 index 0000000..26a16f7 --- /dev/null +++ b/etc/keystore diff --git a/etc/log4j.xml b/etc/log4j.xml index 3e3b132..43bd6ac 100755 --- a/etc/log4j.xml +++ b/etc/log4j.xml @@ -1,11 +1,22 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - ~ Copyright (c) 2018. Lorem ipsum dolor sit amet, consectetur adipiscing elit. - ~ Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. - ~ Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. - ~ Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus. - ~ Vestibulum commodo. Ut rhoncus gravida arcu. - --> +================================================================================ +Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. +Copyright (c) 2019 Huawei. 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========================================================= +--> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> diff --git a/etc/ont_registartion_subscription_template.json b/etc/ont_registartion_subscription_template.json new file mode 100755 index 0000000..eae6325 --- /dev/null +++ b/etc/ont_registartion_subscription_template.json @@ -0,0 +1,19 @@ +{ + "input": { + "encoding": "encode-json", + "protocol": "sse", + "subscription" : [ + { + "topic" : "resources", + "object-type-infos" : [ + { + "object-type" : "onu", + "version" : "v1" + } + ], + "operation" : ["create"] + } + ] + } +} + diff --git a/etc/ont_registartion_unsubscription_template.json b/etc/ont_registartion_unsubscription_template.json new file mode 100755 index 0000000..07d767a --- /dev/null +++ b/etc/ont_registartion_unsubscription_template.json @@ -0,0 +1,5 @@ +{ + "input": { + "identifier" : "" + } +} diff --git a/etc/passwordfile b/etc/passwordfile index 702a4cb..d4631a9 100755 --- a/etc/passwordfile +++ b/etc/passwordfile @@ -1 +1 @@ -collector +adminadmin diff --git a/etc/rcc_passwordfile b/etc/rcc_passwordfile new file mode 100755 index 0000000..25acfbf --- /dev/null +++ b/etc/rcc_passwordfile @@ -0,0 +1 @@ +collector
\ No newline at end of file diff --git a/etc/sdnc.p12 b/etc/sdnc.p12 Binary files differnew file mode 100755 index 0000000..15c8893 --- /dev/null +++ b/etc/sdnc.p12 diff --git a/etc/trustpasswordfile b/etc/trustpasswordfile new file mode 100755 index 0000000..3fe4600 --- /dev/null +++ b/etc/trustpasswordfile @@ -0,0 +1 @@ +adminadmin
\ No newline at end of file diff --git a/etc/truststore b/etc/truststore Binary files differnew file mode 100755 index 0000000..1fbf7ef --- /dev/null +++ b/etc/truststore |