summaryrefslogtreecommitdiffstats
path: root/vnfmarket-be/vnf-sdk-marketplace/pom.xml
blob: f78b00b8ce52d96a20997e7940aaacf0200612b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<?xml version="1.0"?>
<!-- Copyright 2017 Huawei Technologies Co., Ltd. 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. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<parent>
		<groupId>org.onap.vnfsdk.refrepo</groupId>
		<artifactId>vnf-sdk-marketplace-core-parent</artifactId>
		<version>1.1.0</version>
	</parent>

	<modelVersion>4.0.0</modelVersion>
	<artifactId>vnf-sdk-marketplace</artifactId>
	<version>1.1.0</version>
	<name>vnf-sdk-marketplace/vnf-sdk-marketplace</name>
	<packaging>war</packaging>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<cxf.version>3.2.3</cxf.version>
		<!-- slf4j.version>1.6.1</slf4j.version> -->
		<maven.test.skip>false</maven.test.skip>
		<maven.test.failure.ignore>false</maven.test.failure.ignore>
	</properties>



	<dependencies>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxrs</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-rs-client</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http-hc</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.16</version>
		</dependency>
		<dependency>
			<groupId>io.dropwizard</groupId>
			<artifactId>dropwizard-assets</artifactId>
			<version>1.2.4</version>
		</dependency>
		<dependency>
			<groupId>org.eclipse.persistence</groupId>
			<artifactId>javax.persistence</artifactId>
			<version>2.1.0</version>
		</dependency>

		<dependency>
			<groupId>io.swagger</groupId>
			<artifactId>swagger-jersey2-jaxrs</artifactId>
			<version>1.5.18</version>
		</dependency>
		<!-- jersey -->

		<dependency>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-multipart</artifactId>
			<version>2.25.1</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.containers</groupId>
			<artifactId>jersey-container-jetty-servlet</artifactId>
			<version>2.25.1</version>		
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpmime</artifactId>
			<version>4.5.3</version>
		</dependency>
		<!-- consumer -->
		<dependency>
			<groupId>com.eclipsesource.jaxrs</groupId>
			<artifactId>consumer</artifactId>
			<exclusions>
				<exclusion>
					<groupId>com.eclipsesource.jaxrs</groupId>
					<artifactId>jersey-all</artifactId>
				</exclusion>
			</exclusions>
			<version>5.0</version>
		</dependency>
		<!-- gson -->
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.3.1</version>
		</dependency>
		<dependency>
			<groupId>org.postgresql</groupId>
			<artifactId>postgresql</artifactId>
			<version>42.1.1</version>
		</dependency>
		<dependency>
			<groupId>org.mybatis</groupId>
			<artifactId>mybatis</artifactId>
			<version>3.2.7</version>
		</dependency>
		<!-- UT -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-module-junit4</artifactId>
			<version>1.4.10</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-api-mockito</artifactId>
			<version>1.4.10</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jmockit</groupId>
			<artifactId>jmockit</artifactId>
			<version>1.19</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jmockit</groupId>
			<artifactId>jmockit-coverage</artifactId>
			<version>1.19</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.ant</groupId>
			<artifactId>ant</artifactId>
			<version>1.8.2</version>
			<scope>test</scope>
		</dependency>


		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-io</artifactId>
			<version>1.3.2</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.4</version>
		</dependency>
		<dependency>
           <groupId>org.glassfish.jersey.bundles.repackaged</groupId>
           <artifactId>jersey-guava</artifactId>
           <version>2.6</version>
        </dependency>
		<!-- UT end -->
		<dependency>
			<groupId>org.onap.vnfsdk.validation</groupId>
			<artifactId>validation-csar</artifactId>
			<version>1.1.1</version>
		</dependency>
	</dependencies>
	<profiles>
		<profile>
			<id>all-tests</id>
			<properties>
				<build.profile.id>all-tests</build.profile.id>
				<skip.unit.tests>false</skip.unit.tests>
			</properties>
		</profile>
	</profiles>
	<build>
		<finalName>ROOT</finalName>
		<plugins>
			<!-- Used for unit tests -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.20</version>
				<configuration>
					<forkMode>always</forkMode>
					<argLine>${surefireArgLine}</argLine>
					<skip>${maven.test.skip}</skip>
					<testFailureIgnore>${maven.test.failure.ignore}</testFailureIgnore>
					<!-- Excludes integration tests when unit tests are run. -->
					<excludes>
						<exclude>**/IT*.java</exclude>
					</excludes>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
ass="nv">HOSTNAME_CONSUL}:8500/v1/kv/docker_plugin/docker_logins" # registering Holmes services SVC_NAME="${SRVCNAME_MVP_HR}" SVC_IP="$(cat /opt/config/dcae_ip_addr.txt)" REGREQ=" { \"Name\" : \"${SVC_NAME}\", \"ID\" : \"${SVC_NAME}\", \"Address\": \"${SVC_IP}\", \"Port\": 9101, \"Check\" : { \"Name\" : \"${SVC_NAME}_health\", \"Interval\" : \"15s\", \"HTTP\" : \"https://${SVC_IP}:9101/api/holmes-rule-mgmt/v1/healthcheck\", \"tls_skip_verify\": true, \"Status\" : \"passing\" } } " curl -v -X PUT -H 'Content-Type: application/json' \ --data-binary \ "$REGREQ" "http://${HOSTNAME_CONSUL}:8500/v1/agent/service/register" SVC_NAME="${SRVCNAME_MVP_HE}" SVC_IP="$(cat /opt/config/dcae_ip_addr.txt)" REGREQ=" { \"Name\" : \"${SVC_NAME}\", \"ID\" : \"${SVC_NAME}\", \"Address\": \"${SVC_IP}\", \"Port\": 9102, \"Check\" : { \"Name\" : \"${SVC_NAME}_health\", \"Interval\" : \"15s\", \"HTTP\" : \"https://${SVC_IP}:9102/api/holmes-engine-mgmt/v1/healthcheck\", \"tls_skip_verify\": true, \"Status\" : \"passing\" } } " curl -v -X PUT -H 'Content-Type: application/json' \ --data-binary "$REGREQ" \ "http://${HOSTNAME_CONSUL}:8500/v1/agent/service/register" # now push KVs # generated with https://www.browserling.com/tools/json-escape # config binding service REGKV=" {} " curl -v -X PUT -H "Content-Type: application/json" \ --data "${REGKV}" \ http://${HOSTNAME_CONSUL}:8500/v1/kv/config_binding_service # checked # inventory REGKV=' { "database": { "checkConnectionWhileIdle": false, "driverClass": "org.postgresql.Driver", "evictionInterval": "10s", "initialSize": 2, "maxSize": 8, "maxWaitForConnection": "1s", "minIdleTime": "1 minute", "minSize": 2, "password": "inventorypwd", "properties": { "charSet": "UTF-8"}, "url": "jdbc:postgresql://pgInventory:5432/postgres", "user": "inventory", "validationQuery": "/* MyService Health Check */ SELECT 1" }, "databusControllerConnection": { "host": "databus-controller-hostname", "mechId": null, "password": null, "port": 8443, "required": false}, "httpClient": { "connectionTimeout": "5000milliseconds", "gzipEnabled": false, "gzipEnabledForRequests": false, "maxThreads": 128, "minThreads": 1, "timeout": "5000milliseconds" } } } }' curl -v -X PUT -H "Content-Type: application/json" \ --data "${REGKV}" \ http://${HOSTNAME_CONSUL}:8500/v1/kv/inventory # checked # policy handler REGKV=' { "policy_handler": { "deploy_handler": { "target_entity": "deployment_handler", "max_msg_length_mb": 5, "query": { "cfy_tenant_name": "default_tenant" } }, "thread_pool_size": 4, "policy_retry_count": 5, "pool_connections": 20, "policy_retry_sleep": 5, "catch_up": { "interval": 1200 }, "reconfigure": { "interval": 600 }, "policy_engine": { "path_api": "/pdp/api/", "headers": { "Environment": "TEST", "ClientAuth": "cHl0aG9uOnRlc3Q=", "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Basic dGVzdHBkcDphbHBoYTEyMw==" }, "path_pdp": "/pdp/", "url": "http://{{ policy_ip_addr }}:8081", "target_entity": "policy_engine" } } }' curl -v -X PUT -H "Content-Type: application/json" \ --data "${REGKV}" \ "http://${HOSTNAME_CONSUL}:8500/v1/kv/policy_handler" # service change handler REGKV=' { "asdcDistributionClient": { "asdcAddress": "{{ sdc_ip_addr }}:8443", "asdcUri": "https://{{ sdc_ip_addr }}:8443", "msgBusAddress": "{{ mr_ip_addr }}", "user": "dcae", "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U", "pollingInterval": 20, "pollingTimeout": 20, "consumerGroup": "dcae", "consumerId": "dcae-sch", "environmentName": "AUTO", "keyStorePath": null, "keyStorePassword": null, "activateServerTLSAuth": false, "useHttpsWithDmaap": false, "isFilterInEmptyResources": false }, "dcaeInventoryClient": { "uri": "http://inventory:8080" } }' curl -v -X PUT -H "Content-Type: application/json" \ --data "${REGKV}" \ "http://${HOSTNAME_CONSUL}:8500/v1/kv/service-change-handler" # deployment handler REGKV=' { "logLevel": "DEBUG", "cloudify": { "protocol": "http" }, "inventory": { "protocol": "http" } }' curl -v -X PUT -H "Content-Type: application/json" \ --data "${REGKV}" \ "http://${HOSTNAME_CONSUL}:8500/v1/kv/deployment_handler" # ves MR_IP="$(cat /opt/config/mr_ip_addr.txt)" REGKV=' { "event.transform.flag": "0", "tomcat.maxthreads": "200", "collector.schema.checkflag": "1", "collector.dmaap.streamid": "fault=ves_fault|syslog=ves_syslog|heartbeat=ves_heartbeat|measurementsForVfScaling=ves_measurement|mobileFlow=ves_mobileflow|other=ves_other|stateChange=ves_statechange|thresholdCrossingAlert=ves_thresholdCrossingAlert|voiceQuality=ves_voicequality|sipSignaling=ves_sipsignaling", "collector.service.port": "8080", "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\"}", "collector.keystore.passwordfile": "/opt/app/VESCollector/etc/passwordfile", "collector.inputQueue.maxPending": "8096", "streams_publishes": { "ves_measurement": { "type": "message_router", "dmaap_info": { "topic_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT/" } }, "ves_fault": { "type": "message_router", "dmaap_info": { "topic_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.SEC_FAULT_OUTPUT/" } } }, "collector.service.secure.port": "8443", "header.authflag": "0", "collector.keystore.file.location": "/opt/app/VESCollector/etc/keystore", "collector.keystore.alias": "dynamically generated", "services_calls": [], "header.authlist": "userid1,base64encodepwd1|userid2,base64encodepwd2" }' curl -v -X PUT -H "Content-Type: application/json" \ --data "${REGKV}" \ "http://${HOSTNAME_CONSUL}:8500/v1/kv/mvp-dcaegen2-collectors-ves" # holmes rule management MSB_IP="$(cat /opt/config/msb_ip_addr.txt)" REGKV=" { \"streams_subscribes\": {}, \"msb.hostname\": \"${MSB_IP_ADDR}\", \"msb.uri\": \"/api/microservices/v1/services\", \"streams_publishes\": {}, \"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, \\\"unauthenticated.DCAE_CL_OUTPUT\\\");\\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, \\\"unauthenticated.DCAE_CL_OUTPUT\\\");\\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, \\\"unauthenticated.DCAE_CL_OUTPUT\\\");\\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\", \"services_calls\": {} }" REGKV=' { "streams_subscribes": {}, "msb.hostname": "{{ msb_ip_addr }}", "msb.uri": "/api/microservices/v1/services", "streams_publishes": {}, "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, \"unauthenticated.DCAE_CL_OUTPUT\");\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, \"unauthenticated.DCAE_CL_OUTPUT\");\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, \"unauthenticated.DCAE_CL_OUTPUT\");\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", "services_calls": {} }' curl -v -X PUT -H "Content-Type: application/json" \ --data "${REGKV}" \ "http://${HOSTNAME_CONSUL}:8500/v1/kv/mvp-dcae-analytics-holmes-rule-management" # Holmes engine management REGKV=' { "msb.hostname": "10.0.14.1", "services_calls": {}, "msb.uri": "/api/microservices/v1/services", "streams_publishes": { "dcae_cl_out": { "type": "message_router", "dmaap_info": { "topic_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.DCAE_CL_OUTPUT" } } }, "streams_subscribes": { "ves_fault": { "type": "message_router", "dmaap_info": { "topic_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.SEC_FAULT_OUTPUT" } } } }' curl -v -X PUT -H "Content-Type: application/json" \ --data "${REGKV}" \ "http://${HOSTNAME_CONSUL}:8500/v1/kv/mvp-dcae-analytics-holmes-engine-management" #curl http://localhost:8500/v1/kv/config_binding_service |jq .[0].Value |sed -e 's/\"//g' |base64 --decode # TCA REGKV=' { "thresholdCalculatorFlowletInstances": "2", "tcaVESMessageStatusTableTTLSeconds": "86400", "tcaVESMessageStatusTableName": "TCAVESMessageStatusTable", "tcaVESAlertsTableTTLSeconds": "1728000", "tcaVESAlertsTableName": "TCAVESAlertsTable", "tcaSubscriberOutputStreamName": "TCASubscriberOutputStream", "tcaAlertsAbatementTableTTLSeconds": "1728000", "tcaAlertsAbatementTableName": "TCAAlertsAbatementTable", "streams_subscribes": {}, "streams_publishes": {}, "services_calls": {}, "appName": "dcae-tca", "appDescription": "DCAE Analytics Threshold Crossing Alert Application" }' curl -v -X PUT -H "Content-Type: application/json" \ --data "${REGKV}" \ "http://${HOSTNAME_CONSUL}:8500/v1/kv/mvp-dcaegen2-analytics-tca" # TCA pref REGKV='{ "tca_policy": "{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].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.vNicUsageArray[*].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.vNicUsageArray[*].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\"}]}]}", "subscriberTopicName": "unauthenticated.VES_MEASUREMENT_OUTPUT", "subscriberTimeoutMS": "-1", "subscriberProtocol": "http", "subscriberPollingInterval": "30000", "subscriberMessageLimit": "-1", "subscriberHostPort": "3904", "subscriberHostName":"{{ mr_ip_addr }}", "subscriberContentType": "application/json", "subscriberConsumerId": "c12", "subscriberConsumerGroup": "OpenDCAE-c12", "publisherTopicName": "unauthenticated.DCAE_CL_OUTPUT", "publisherProtocol": "http", "publisherPollingInterval": "20000", "publisherMaxRecoveryQueueSize": "100000", "publisherMaxBatchSize": "1", "publisherHostPort": "3904", "publisherHostName": "{{ mr_ip_addr }}", "publisherContentType": "application/json", "enableAlertCEFFormat": "false", "enableAAIEnrichment": true, "aaiVNFEnrichmentAPIPath": "/aai/v11/network/generic-vnfs/generic-vnf", "aaiVMEnrichmentAPIPath": "/aai/v11/search/nodes-query", "aaiEnrichmentUserPassword": "DCAE", "aaiEnrichmentUserName": "DCAE", "aaiEnrichmentProtocol": "https", "aaiEnrichmentPortNumber": "8443", "aaiEnrichmentIgnoreSSLCertificateErrors": "true", "aaiEnrichmentHost":"{{ aai1_ip_addr }}", "enableRedisCaching":false }' curl -v -X PUT -H "Content-Type: application/json" \ --data "${REGKV}" \ "http://${HOSTNAME_CONSUL}:8500/v1/kv/mvp-dcaegen2-analytics-tca:preferences" # SNMP Trap Collector REGKV='{ "snmptrap.version": "1.3.0", "snmptrap.title": "ONAP SNMP Trap Receiver" , "protocols.transport": "udp", "protocols.ipv4_interface": "0.0.0.0", "protocols.ipv4_port": 6162, "protocols.ipv6_interface": "::1", "protocols.ipv6_port": 6162, "cache.dns_cache_ttl_seconds": 60, "publisher.http_timeout_milliseconds": 1500, "publisher.http_retries": 3, "publisher.http_milliseconds_between_retries": 750, "publisher.http_primary_publisher": "true", "publisher.http_peer_publisher": "unavailable", "publisher.max_traps_between_publishes": 10, "publisher.max_milliseconds_between_publishes": 10000, "streams_publishes": { "sec_fault_unsecure": { "type": "message_router", "aaf_password": null, "dmaap_info": { "location": "mtl5", "client_id": null, "client_role": null, "topic_url": "http://{{ mr_ip_addr }}:3904/events/ONAP-COLLECTOR-SNMPTRAP" }, "aaf_username": null } }, "files.runtime_base_dir": "/opt/app/snmptrap", "files.log_dir": "logs", "files.data_dir": "data", "files.pid_dir": "tmp", "files.arriving_traps_log": "snmptrapd_arriving_traps.log", "files.snmptrapd_diag": "snmptrapd_prog_diag.log", "files.traps_stats_log": "snmptrapd_stats.csv", "files.perm_status_file": "snmptrapd_status.log", "files.eelf_base_dir": "/opt/app/snmptrap/logs", "files.eelf_error": "error.log", "files.eelf_debug": "debug.log", "files.eelf_audit": "audit.log", "files.eelf_metrics": "metrics.log", "files.roll_frequency": "hour", "files.minimum_severity_to_log": 1, "trap_def.1.trap_oid" : ".1.3.6.1.4.1.74.2.46.12.1.1", "trap_def.1.trap_category": "ONAP-COLLECTOR-SNMPTRAP", "trap_def.2.trap_oid" : "*", "trap_def.2.trap_category": "ONAP-COLLECTOR-SNMPTRAP", "stormwatch.1.stormwatch_oid" : ".1.3.6.1.4.1.74.2.46.12.1.1", "stormwatch.1.low_water_rearm_per_minute" : "5", "stormwatch.1.high_water_arm_per_minute" : "100", "stormwatch.2.stormwatch_oid" : ".1.3.6.1.4.1.74.2.46.12.1.2", "stormwatch.2.low_water_rearm_per_minute" : "2", "stormwatch.2.high_water_arm_per_minute" : "200", "stormwatch.3.stormwatch_oid" : ".1.3.6.1.4.1.74.2.46.12.1.2", "stormwatch.3.low_water_rearm_per_minute" : "2", "stormwatch.3.high_water_arm_per_minute" : "200" }' curl -v -X PUT -H "Content-Type: application/json" \ --data "${REGKV}" \ "http://${HOSTNAME_CONSUL}:8500/v1/kv/${SRVCNAME_STATIC_SNMPTRAP}"