Integrate docker-compose for ONAP policy framework 34/6234/1
authorRehanRaza <muhammad.rehan.raza@est.tech>
Fri, 4 Jun 2021 14:26:27 +0000 (16:26 +0200)
committerMuhammad Rehan Raza <muhammad.rehan.raza@est.tech>
Fri, 4 Jun 2021 14:38:19 +0000 (14:38 +0000)
Change-Id: I0af06df80a34a3aa98434e128cea2eb75c94fce6
Issue-ID: NONRTRIC-520
Signed-off-by: RehanRaza <muhammad.rehan.raza@est.tech>
34 files changed:
solution/integration/smo/onap-policy/config/apex-pdp/OnapPfConfig.json [new file with mode: 0644]
solution/integration/smo/onap-policy/config/db/db.conf [new file with mode: 0644]
solution/integration/smo/onap-policy/config/db/db.sh [new file with mode: 0755]
solution/integration/smo/onap-policy/config/distribution/defaultConfig.json [new file with mode: 0644]
solution/integration/smo/onap-policy/config/dns_keystore.txt [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/AAI-http-client.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/APPC-CL-topic.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/APPC-LCM-READ-topic.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/APPC-LCM-WRITE-topic.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/DCAE_CL_RSP-topic.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/DCAE_TOPIC-topic.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/GUARD-http-client.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/POLICY-CL-MGT-topic.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/SDNC-http-client.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/SDNR-CL-RSP-topic.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/SDNR-CL-topic.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/SO-http-client.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/VFC-http-client.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/engine-system.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/engine.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/feature-lifecycle.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/custom/features.pre.sh [new file with mode: 0755]
solution/integration/smo/onap-policy/config/drools-apps/custom/standalone-settings.xml [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/env/base.conf [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/env/feature-healthcheck.conf [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools-apps/env/feature-pooling-dmaap.conf [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools/custom/engine-system.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools/custom/engine.properties [new file with mode: 0644]
solution/integration/smo/onap-policy/config/drools/custom/noop.pre.sh [new file with mode: 0755]
solution/integration/smo/onap-policy/config/drools/env/base.conf [new file with mode: 0644]
solution/integration/smo/onap-policy/config/pap/defaultConfig.json [new file with mode: 0644]
solution/integration/smo/onap-policy/config/xacml-pdp/defaultConfig.json [new file with mode: 0644]
solution/integration/smo/onap-policy/docker-compose.yml [new file with mode: 0644]
solution/integration/smo/onap-policy/wait_for_port.sh [new file with mode: 0755]

diff --git a/solution/integration/smo/onap-policy/config/apex-pdp/OnapPfConfig.json b/solution/integration/smo/onap-policy/config/apex-pdp/OnapPfConfig.json
new file mode 100644 (file)
index 0000000..f48630f
--- /dev/null
@@ -0,0 +1,43 @@
+{
+    "name":"OnapPfParameterGroup",
+     "restServerParameters": {
+        "host": "0.0.0.0",
+        "port": 6969,
+        "userName": "healthcheck",
+        "password": "zb!XztG34",
+        "https": true
+    },
+    "pdpStatusParameters":{
+        "pdpGroup": "defaultGroup",
+        "timeIntervalMs": 120000,
+        "pdpType":"apex",
+        "desiredInstanceCount": 2,
+        "description":"Pdp Heartbeat",
+        "supportedPolicyTypes": [
+            {
+              "name": "onap.policies.controlloop.operational.common.Apex",
+              "version": "1.0.0"
+            },
+            {
+                "name": "onap.policies.native.Apex",
+                "version": "1.0.0"
+            }
+        ]
+    },
+    "topicParameterGroup": {
+        "topicSources" : [{
+            "topic" : "POLICY-PDP-PAP",
+            "servers" : [ "onap-dmaap" ],
+            "topicCommInfrastructure" : "dmaap",
+            "useHttps" : false,
+            "allowSelfSignedCerts" : true
+        }],
+        "topicSinks" : [{
+            "topic" : "POLICY-PDP-PAP",
+            "servers" : [ "onap-dmaap" ],
+            "topicCommInfrastructure" : "dmaap",
+            "useHttps" : false,
+            "allowSelfSignedCerts" : true
+        }]
+    }
+}
diff --git a/solution/integration/smo/onap-policy/config/db/db.conf b/solution/integration/smo/onap-policy/config/db/db.conf
new file mode 100644 (file)
index 0000000..22b37f8
--- /dev/null
@@ -0,0 +1,16 @@
+# Copyright 2019,2021 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.
+MYSQL_ROOT_PASSWORD=secret
+MYSQL_USER=policy_user
+MYSQL_PASSWORD=policy_user
diff --git a/solution/integration/smo/onap-policy/config/db/db.sh b/solution/integration/smo/onap-policy/config/db/db.sh
new file mode 100755 (executable)
index 0000000..a5c8129
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash -xv
+# Copyright 2019,2021 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.
+
+for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory
+do
+    mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};"
+    mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;"
+done
+
+mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;"
diff --git a/solution/integration/smo/onap-policy/config/distribution/defaultConfig.json b/solution/integration/smo/onap-policy/config/distribution/defaultConfig.json
new file mode 100644 (file)
index 0000000..140fd70
--- /dev/null
@@ -0,0 +1,73 @@
+{
+    "name":"SDCDistributionGroup",
+    "restServerParameters":{
+        "host":"0.0.0.0",
+        "port":6969,
+        "userName":"healthcheck",
+        "password":"zb!XztG34",
+        "https": true
+    },
+    "receptionHandlerParameters":{
+        "FileReceptionHandler":{
+            "receptionHandlerType":"File",
+            "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.file.FileSystemReceptionHandler",
+            "receptionHandlerConfigurationName":"fileConfiguration",
+            "pluginHandlerParameters":{
+                "policyDecoders":{
+                    "ApexDecoder":{
+                        "decoderType":"ApexDecoder",
+                        "decoderClassName":"org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicy",
+                        "decoderConfigurationName": "apexDecoderConfiguration"
+                    }
+                },
+                "policyForwarders":{
+                    "LifeCycleApiForwarder":{
+                        "forwarderType":"LifeCycleAPI",
+                        "forwarderClassName":"org.onap.policy.distribution.forwarding.lifecycle.api.LifecycleApiPolicyForwarder",
+                        "forwarderConfigurationName": "lifecycleApiConfiguration"
+                    }
+                }
+            }
+        }
+    },
+    "receptionHandlerConfigurationParameters":{
+        "fileConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.reception.handling.file.FileSystemReceptionHandlerConfigurationParameterGroup",
+            "parameters":{
+                "watchPath": "/opt/app/policy/distribution/etc/temp/",
+                "maxThread": 1
+            }
+        }
+    },
+    "policyDecoderConfigurationParameters":{
+        "apexDecoderConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicyParameterGroup",
+            "parameters":{
+                "policyFileName": "apex_policy.json",
+                "policyTypeFileName": "apex_policy_type.json"
+            }
+        }
+    },
+    "policyForwarderConfigurationParameters":{
+        "lifecycleApiConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.forwarding.lifecycle.api.LifecycleApiForwarderParameters",
+            "parameters":{
+                "apiParameters": {
+                    "hostName": "policy-api",
+                    "port": 6969,
+                    "userName": "healthcheck",
+                    "password": "zb!XztG34"
+                },
+                "papParameters": {
+                    "hostName": "policy-pap",
+                    "port": 6969,
+                    "userName": "healthcheck",
+                    "password": "zb!XztG34"
+                },
+                "isHttps": true,
+                "allowSelfSignedCerts": true,
+                "deployPolicies": true
+            }
+        }
+    }
+}
diff --git a/solution/integration/smo/onap-policy/config/dns_keystore.txt b/solution/integration/smo/onap-policy/config/dns_keystore.txt
new file mode 100644 (file)
index 0000000..6ef0320
--- /dev/null
@@ -0,0 +1,14 @@
+DNS:policy
+DNS:drools
+DNS:drools.onap
+DNS:policy-apex-pdp
+DNS:policy-apex-pdp.onap
+DNS:policy-api
+DNS:policy-api.onap
+DNS:policy-distribution
+DNS:policy-distribution.onap
+DNS:policy-pap
+DNS:policy-pap.onap
+DNS:policy-xacml-pdp
+DNS:policy-xacml-pdp.onap
+DNS:onap-dmaap
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/AAI-http-client.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/AAI-http-client.properties
new file mode 100644 (file)
index 0000000..35fa7f6
--- /dev/null
@@ -0,0 +1,28 @@
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+
+http.client.services=AAI
+
+http.client.services.AAI.managed=true
+http.client.services.AAI.https=true
+http.client.services.AAI.host=${envd:AAI_HOST}
+http.client.services.AAI.port=${envd:AAI_PORT}
+http.client.services.AAI.userName=${envd:AAI_USERNAME}
+http.client.services.AAI.password=${envd:AAI_PASSWORD}
+http.client.services.AAI.contextUriPath=${envd:AAI_CONTEXT_URI}
+http.client.services.AAI.selfSignedCertificates=true
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/APPC-CL-topic.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/APPC-CL-topic.properties
new file mode 100644 (file)
index 0000000..77362f2
--- /dev/null
@@ -0,0 +1,28 @@
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+
+dmaap.source.topics=APPC-CL
+dmaap.sink.topics=APPC-CL
+
+dmaap.source.topics.APPC-CL.servers=${env:DMAAP_SERVERS}
+dmaap.source.topics.APPC-CL.https=false
+dmaap.source.topics.APPC-CL.selfSignedCertificates=true
+
+dmaap.sink.topics.APPC-CL.servers=${env:DMAAP_SERVERS}
+dmaap.sink.topics.APPC-CL.https=false
+dmaap.sink.topics.APPC-CL.selfSignedCertificates=true
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/APPC-LCM-READ-topic.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/APPC-LCM-READ-topic.properties
new file mode 100644 (file)
index 0000000..f444f38
--- /dev/null
@@ -0,0 +1,23 @@
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+
+dmaap.sink.topics=APPC-LCM-READ
+
+dmaap.sink.topics.APPC-LCM-READ.servers=${env:DMAAP_SERVERS}
+dmaap.sink.topics.APPC-LCM-READ.https=false
+dmaap.sink.topics.APPC-LCM-READ.selfSignedCertificates=true
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/APPC-LCM-WRITE-topic.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/APPC-LCM-WRITE-topic.properties
new file mode 100644 (file)
index 0000000..2398550
--- /dev/null
@@ -0,0 +1,23 @@
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+
+dmaap.source.topics=APPC-LCM-WRITE
+
+dmaap.source.topics.APPC-LCM-WRITE.servers=${env:DMAAP_SERVERS}
+dmaap.source.topics.APPC-LCM-WRITE.https=false
+dmaap.source.topics.APPC-LCM-WRITE.selfSignedCertificates=true
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/DCAE_CL_RSP-topic.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/DCAE_CL_RSP-topic.properties
new file mode 100644 (file)
index 0000000..b31cddb
--- /dev/null
@@ -0,0 +1,23 @@
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+
+dmaap.sink.topics=DCAE_CL_RSP
+
+dmaap.sink.topics.DCAE_CL_RSP.servers=${env:DMAAP_SERVERS}
+dmaap.sink.topics.DCAE_CL_RSP.https=false
+dmaap.sink.topics.DCAE_CL_RSP.selfSignedCertificates=true
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/DCAE_TOPIC-topic.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/DCAE_TOPIC-topic.properties
new file mode 100644 (file)
index 0000000..38f9f89
--- /dev/null
@@ -0,0 +1,25 @@
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+
+dmaap.source.topics=DCAE_TOPIC
+
+dmaap.source.topics.DCAE_TOPIC.effectiveTopic=${env:DCAE_TOPIC}
+dmaap.source.topics.DCAE_TOPIC.servers=${env:DMAAP_SERVERS}
+dmaap.source.topics.DCAE_TOPIC.consumerGroup=${env:DCAE_CONSUMER_GROUP}
+dmaap.source.topics.DCAE_TOPIC.https=false
+dmaap.source.topics.DCAE_TOPIC.selfSignedCertificates=true
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/GUARD-http-client.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/GUARD-http-client.properties
new file mode 100644 (file)
index 0000000..4266b04
--- /dev/null
@@ -0,0 +1,28 @@
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+
+http.client.services=GUARD
+
+http.client.services.GUARD.managed=true
+http.client.services.GUARD.https=false
+http.client.services.GUARD.host=${envd:PDP_HOST}
+http.client.services.GUARD.port=${envd:PDP_PORT}
+http.client.services.GUARD.userName=${envd:PDP_USERNAME}
+http.client.services.GUARD.password=${envd:PDP_PASSWORD}
+http.client.services.GUARD.contextUriPath=${envd:PDP_CONTEXT_URI:policy/pdpx/v1/}
+http.client.services.GUARD.selfSignedCertificates=true
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/POLICY-CL-MGT-topic.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/POLICY-CL-MGT-topic.properties
new file mode 100644 (file)
index 0000000..7fa0f10
--- /dev/null
@@ -0,0 +1,22 @@
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+
+dmaap.sink.topics=POLICY-CL-MGT
+dmaap.sink.topics.POLICY-CL-MGT.servers=${env:DMAAP_SERVERS}
+dmaap.sink.topics.POLICY-CL-MGT.https=false
+dmaap.sink.topics.POLICY-CL-MGT.selfSignedCertificates=true
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/SDNC-http-client.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/SDNC-http-client.properties
new file mode 100644 (file)
index 0000000..3f91b07
--- /dev/null
@@ -0,0 +1,28 @@
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+
+http.client.services=SDNC
+
+http.client.services.SDNC.managed=true
+http.client.services.SDNC.https=false
+http.client.services.SDNC.host=${envd:SDNC_HOST}
+http.client.services.SDNC.port=${envd:SDNC_PORT}
+http.client.services.SDNC.userName=${envd:SDNC_USERNAME}
+http.client.services.SDNC.password=${envd:SDNC_PASSWORD}
+http.client.services.SDNC.contextUriPath=${envd:SDNC_CONTEXT_URI}
+http.client.services.SDNC.selfSignedCertificates=true
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/SDNR-CL-RSP-topic.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/SDNR-CL-RSP-topic.properties
new file mode 100644 (file)
index 0000000..79b5e55
--- /dev/null
@@ -0,0 +1,22 @@
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+
+dmaap.source.topics=SDNR-CL-RSP
+dmaap.source.topics.SDNR-CL-RSP.servers=${env:DMAAP_SERVERS}
+dmaap.source.topics.SDNR-CL-RSP.https=false
+dmaap.source.topics.SDNR-CL-RSP.selfSignedCertificates=true
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/SDNR-CL-topic.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/SDNR-CL-topic.properties
new file mode 100644 (file)
index 0000000..5eac5e3
--- /dev/null
@@ -0,0 +1,23 @@
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+
+dmaap.sink.topics=SDNR-CL
+
+dmaap.sink.topics.SDNR-CL.servers=${env:DMAAP_SERVERS}
+dmaap.sink.topics.SDNR-CL.https=false
+dmaap.sink.topics.SDNR-CL.selfSignedCertificates=true
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/SO-http-client.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/SO-http-client.properties
new file mode 100644 (file)
index 0000000..7e71e35
--- /dev/null
@@ -0,0 +1,28 @@
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+
+http.client.services=SO
+
+http.client.services.SO.managed=true
+http.client.services.SO.https=false
+http.client.services.SO.host=${envd:SO_HOST}
+http.client.services.SO.port=${envd:SO_PORT}
+http.client.services.SO.userName=${envd:SO_USERNAME}
+http.client.services.SO.password=${envd:SO_PASSWORD}
+http.client.services.SO.contextUriPath=${envd:SO_CONTEXT_URI}
+http.client.services.SO.selfSignedCertificates=true
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/VFC-http-client.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/VFC-http-client.properties
new file mode 100644 (file)
index 0000000..c267b7a
--- /dev/null
@@ -0,0 +1,28 @@
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+
+http.client.services=VFC
+
+http.client.services.VFC.managed=true
+http.client.services.VFC.https=false
+http.client.services.VFC.host=${envd:VFC_HOST}
+http.client.services.VFC.port=${envd:VFC_PORT}
+http.client.services.VFC.userName=${envd:VFC_USERNAME}
+http.client.services.VFC.password=${envd:VFC_PASSWORD}
+http.client.services.VFC.contextUriPath=${envd:VFC_CONTEXT_URI:api/nslcm/v1/}
+http.client.services.VFC.selfSignedCertificates=true
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/engine-system.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/engine-system.properties
new file mode 100644 (file)
index 0000000..19e03b5
--- /dev/null
@@ -0,0 +1,45 @@
+#
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+#
+
+# system properties set within the application
+
+java.net.preferIPv4Stack=true
+
+# jmx
+
+com.sun.management.jmxremote.port=9991
+com.sun.management.jmxremote.authenticate=false
+com.sun.management.jmxremote.ssl=false
+
+# certs
+
+javax.net.ssl.trustStore=${envd:TRUSTSTORE:/opt/app/policy/etc/ssl/policy-truststore}
+javax.net.ssl.trustStorePassword=${envd:TRUSTSTORE_PASSWD:Pol1cy_0nap}
+
+javax.net.ssl.keyStore=${envd:KEYSTORE:/opt/app/policy/etc/ssl/policy-keystore}
+javax.net.ssl.keyStorePassword=${envd:KEYSTORE_PASSWD:Pol1cy_0nap}
+
+# kie
+
+kie.maven.offline.force=${envd:REPOSITORY_OFFLINE:false}
+
+# symmetric key for sensitive configuration data
+
+engine.symm.key=${envd:SYMM_KEY}
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/engine.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/engine.properties
new file mode 100644 (file)
index 0000000..01e6ed6
--- /dev/null
@@ -0,0 +1,50 @@
+###
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+###
+
+# Policy Engine Configuration Channels
+
+dmaap.source.topics=PDPD-CONFIGURATION
+
+dmaap.source.topics.PDPD-CONFIGURATION.servers=${envd:DMAAP_SERVERS}
+dmaap.source.topics.PDPD-CONFIGURATION.effectiveTopic=${envd:PDPD_CONFIGURATION_TOPIC}
+dmaap.source.topics.PDPD-CONFIGURATION.apiKey=${envd:PDPD_CONFIGURATION_API_KEY}
+dmaap.source.topics.PDPD-CONFIGURATION.apiSecret=${envd:PDPD_CONFIGURATION_API_SECRET}
+dmaap.source.topics.PDPD-CONFIGURATION.consumerGroup=${envd:PDPD_CONFIGURATION_CONSUMER_GROUP}
+dmaap.source.topics.PDPD-CONFIGURATION.consumerInstance=${envd:PDPD_CONFIGURATION_CONSUMER_INSTANCE}
+dmaap.source.topics.PDPD-CONFIGURATION.managed=false
+dmaap.source.topics.PDPD-CONFIGURATION.https=false
+dmaap.source.topics.PDPD-CONFIGURATION.selfSignedCertificates=true
+
+http.server.services=SECURED-CONFIG
+
+http.server.services.SECURED-CONFIG.host=${envd:TELEMETRY_HOST}
+http.server.services.SECURED-CONFIG.port=9696
+http.server.services.SECURED-CONFIG.userName=${envd:TELEMETRY_USER}
+http.server.services.SECURED-CONFIG.password=${envd:TELEMETRY_PASSWORD}
+http.server.services.SECURED-CONFIG.restPackages=org.onap.policy.drools.server.restful
+http.server.services.SECURED-CONFIG.managed=false
+http.server.services.SECURED-CONFIG.swagger=true
+http.server.services.SECURED-CONFIG.https=false
+http.server.services.SECURED-CONFIG.aaf=${envd:AAF:false}
+http.server.services.SECURED-CONFIG.serialization.provider=org.onap.policy.common.gson.JacksonHandler,org.onap.policy.common.endpoints.http.server.YamlJacksonHandler
+
+aaf.namespace=${envd:AAF_NAMESPACE:false}
+aaf.root.permission=${envd:AAF_NAMESPACE:org.onap.policy}.pdpd
+
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/feature-lifecycle.properties b/solution/integration/smo/onap-policy/config/drools-apps/custom/feature-lifecycle.properties
new file mode 100644 (file)
index 0000000..ab97035
--- /dev/null
@@ -0,0 +1,40 @@
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+
+lifecycle.pdp.group=${envd:POLICY_PDP_PAP_GROUP:defaultGroup}
+lifecycle.pdp.type=${envd:POLICY_PDP_PAP_TYPE:drools}
+
+# Mandatory policy types that this PDP-D must support at a minimum
+lifecycle.pdp.policytypes=${envd:POLICY_PDP_PAP_POLICYTYPES}
+
+dmaap.source.topics=POLICY-PDP-PAP
+dmaap.sink.topics=POLICY-PDP-PAP
+
+dmaap.source.topics.POLICY-PDP-PAP.servers=${envd:DMAAP_SERVERS}
+dmaap.source.topics.POLICY-PDP-PAP.effectiveTopic=${envd:POLICY_PDP_PAP_TOPIC}
+dmaap.source.topics.POLICY-PDP-PAP.apiKey=${envd:POLICY_PDP_PAP_API_KEY}
+dmaap.source.topics.POLICY-PDP-PAP.apiSecret=${envd:POLICY_PDP_PAP_API_SECRET}
+dmaap.source.topics.POLICY-PDP-PAP.https=false
+dmaap.source.topics.POLICY-PDP-PAP.selfSignedCertificates=true
+
+dmaap.sink.topics.POLICY-PDP-PAP.servers=${envd:DMAAP_SERVERS}
+dmaap.sink.topics.POLICY-PDP-PAP.effectiveTopic=${envd:POLICY_PDP_PAP_TOPIC}
+dmaap.sink.topics.POLICY-PDP-PAP.apiKey=${envd:POLICY_PDP_PAP_API_KEY}
+dmaap.sink.topics.POLICY-PDP-PAP.apiSecret=${envd:POLICY_PDP_PAP_API_SECRET}
+dmaap.sink.topics.POLICY-PDP-PAP.https=false
+dmaap.sink.topics.POLICY-PDP-PAP.selfSignedCertificates=true
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/features.pre.sh b/solution/integration/smo/onap-policy/config/drools-apps/custom/features.pre.sh
new file mode 100755 (executable)
index 0000000..fd7b5b9
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+# ============LICENSE_START===================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# ============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=====================================================
+
+sh -c "features disable distributed-locking"
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/custom/standalone-settings.xml b/solution/integration/smo/onap-policy/config/drools-apps/custom/standalone-settings.xml
new file mode 100644 (file)
index 0000000..ebd6dd2
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+  Base Package
+  ================================================================================
+  Copyright (C) 2017-2019 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=========================================================
+  -->
+
+
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+    <offline>true</offline>
+
+    <profiles>
+
+        <profile>
+            <id>policy-local</id>
+
+            <repositories>
+                <repository>
+                    <id>file-repository</id>
+                    <url>file:${user.home}/.m2/file-repository</url>
+                    <releases>
+                        <enabled>true</enabled>
+                        <updatePolicy>always</updatePolicy>
+                    </releases>
+                    <snapshots>
+                        <enabled>true</enabled>
+                        <updatePolicy>always</updatePolicy>
+                    </snapshots>
+                </repository>
+            </repositories>
+
+        </profile>
+
+    </profiles>
+
+    <activeProfiles>
+        <activeProfile>policy-local</activeProfile>
+    </activeProfiles>
+
+</settings>
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/env/base.conf b/solution/integration/smo/onap-policy/config/drools-apps/env/base.conf
new file mode 100644 (file)
index 0000000..a56dbaa
--- /dev/null
@@ -0,0 +1,132 @@
+# ============LICENSE_START==================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# ===========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END====================================================
+
+# JVM options
+
+JVM_OPTIONS=-server -Xms512m -Xmx512m
+
+# SYSTEM software configuration
+
+DEBUG=y
+POLICY_HOME=/opt/app/policy
+POLICY_LOGS=/var/log/onap/policy/pdpd
+KEYSTORE_PASSWD=Pol1cy_0nap
+TRUSTSTORE_PASSWD=Pol1cy_0nap
+
+# Telemetry credentials
+
+TELEMETRY_PORT=9696
+TELEMETRY_HOST=0.0.0.0
+TELEMETRY_USER=demo@people.osaaf.org
+TELEMETRY_PASSWORD=demo123456!
+
+# nexus repository
+
+SNAPSHOT_REPOSITORY_ID=
+SNAPSHOT_REPOSITORY_URL=
+RELEASE_REPOSITORY_ID=
+RELEASE_REPOSITORY_URL=
+REPOSITORY_USERNAME=
+REPOSITORY_PASSWORD=
+REPOSITORY_OFFLINE=true
+
+# Relational (SQL) DB access
+
+SQL_HOST=mariadb
+SQL_USER=policy_user
+SQL_PASSWORD=policy_user
+
+# AAF
+
+AAF=false
+AAF_NAMESPACE=org.onap.policy
+AAF_HOST=aaf.api.simpledemo.onap.org
+
+# PDP-D DMaaP configuration channel
+
+PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION
+PDPD_CONFIGURATION_API_KEY=
+PDPD_CONFIGURATION_API_SECRET=
+PDPD_CONFIGURATION_CONSUMER_GROUP=
+PDPD_CONFIGURATION_CONSUMER_INSTANCE=
+PDPD_CONFIGURATION_PARTITION_KEY=
+
+# PAP-PDP configuration channel
+
+POLICY_PDP_PAP_TOPIC=POLICY-PDP-PAP
+POLICY_PDP_PAP_API_KEY=
+POLICY_PDP_PAP_API_SECRET=
+
+# PAP
+
+PAP_HOST=pap
+PAP_USERNAME=testpap
+PAP_PASSWORD=alpha123
+
+# PDP-X
+
+GUARD_DISABLED=false
+PDP_HOST=policy-xacml-pdp
+PDP_PORT=6969
+PDP_CONTEXT_URI=policy/pdpx/v1/
+PDP_USERNAME=healthcheck
+PDP_PASSWORD=zb!XztG34
+PDP_CLIENT_USERNAME=python
+PDP_CLIENT_PASSWORD=test
+PDP_ENVIRONMENT=TEST
+
+# DCAE DMaaP
+
+DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT
+DCAE_SERVERS=policy.api.simpledemo.onap.org
+DCAE_CONSUMER_GROUP=dcae.policy.shared
+
+# Open DMaaP
+
+DMAAP_SERVERS=onap-dmaap
+
+# AAI
+
+AAI_HOST=policy.api.simpledemo.onap.org
+AAI_PORT=6666
+AAI_CONTEXT_URI=
+AAI_USERNAME=policy@policy.onap.org
+AAI_PASSWORD=demo123456!
+
+# MSO
+
+SO_HOST=policy.api.simpledemo.onap.org
+SO_PORT=6669
+SO_CONTEXT_URI=
+SO_URL=https://policy.api.simpledemo.onap.org:6669/
+SO_USERNAME=InfraPortalClient
+SO_PASSWORD=password1$
+
+# VFC
+
+VFC_HOST=policy.api.simpledemo.onap.org
+VFC_PORT=6670
+VFC_CONTEXT_URI=
+VFC_USERNAME=
+VFC_PASSWORD=
+
+# SDNC
+
+SDNC_HOST=policy.api.simpledemo.onap.org
+SDNC_PORT=6668
+SDNC_CONTEXT_URI=
+SDNC_USERNAME=
+SDNC_PASSWORD=
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/env/feature-healthcheck.conf b/solution/integration/smo/onap-policy/config/drools-apps/env/feature-healthcheck.conf
new file mode 100644 (file)
index 0000000..1c71054
--- /dev/null
@@ -0,0 +1,18 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+HEALTHCHECK_USER=demo@people.osaaf.org
+HEALTHCHECK_PASSWORD=demo123456!
diff --git a/solution/integration/smo/onap-policy/config/drools-apps/env/feature-pooling-dmaap.conf b/solution/integration/smo/onap-policy/config/drools-apps/env/feature-pooling-dmaap.conf
new file mode 100644 (file)
index 0000000..3808e3d
--- /dev/null
@@ -0,0 +1,17 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+POOLING_TOPIC=POOLING
diff --git a/solution/integration/smo/onap-policy/config/drools/custom/engine-system.properties b/solution/integration/smo/onap-policy/config/drools/custom/engine-system.properties
new file mode 100644 (file)
index 0000000..19e03b5
--- /dev/null
@@ -0,0 +1,45 @@
+#
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+#
+
+# system properties set within the application
+
+java.net.preferIPv4Stack=true
+
+# jmx
+
+com.sun.management.jmxremote.port=9991
+com.sun.management.jmxremote.authenticate=false
+com.sun.management.jmxremote.ssl=false
+
+# certs
+
+javax.net.ssl.trustStore=${envd:TRUSTSTORE:/opt/app/policy/etc/ssl/policy-truststore}
+javax.net.ssl.trustStorePassword=${envd:TRUSTSTORE_PASSWD:Pol1cy_0nap}
+
+javax.net.ssl.keyStore=${envd:KEYSTORE:/opt/app/policy/etc/ssl/policy-keystore}
+javax.net.ssl.keyStorePassword=${envd:KEYSTORE_PASSWD:Pol1cy_0nap}
+
+# kie
+
+kie.maven.offline.force=${envd:REPOSITORY_OFFLINE:false}
+
+# symmetric key for sensitive configuration data
+
+engine.symm.key=${envd:SYMM_KEY}
diff --git a/solution/integration/smo/onap-policy/config/drools/custom/engine.properties b/solution/integration/smo/onap-policy/config/drools/custom/engine.properties
new file mode 100644 (file)
index 0000000..790bf55
--- /dev/null
@@ -0,0 +1,37 @@
+###
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+###
+
+# Policy Engine Telemetry Server
+
+http.server.services=SECURED-CONFIG
+
+http.server.services.SECURED-CONFIG.host=${envd:TELEMETRY_HOST}
+http.server.services.SECURED-CONFIG.port=9696
+http.server.services.SECURED-CONFIG.userName=${envd:TELEMETRY_USER}
+http.server.services.SECURED-CONFIG.password=${envd:TELEMETRY_PASSWORD}
+http.server.services.SECURED-CONFIG.restPackages=org.onap.policy.drools.server.restful
+http.server.services.SECURED-CONFIG.managed=false
+http.server.services.SECURED-CONFIG.swagger=true
+http.server.services.SECURED-CONFIG.https=false
+http.server.services.SECURED-CONFIG.aaf=${envd:AAF:false}
+http.server.services.SECURED-CONFIG.serialization.provider=org.onap.policy.common.gson.JacksonHandler,org.onap.policy.common.endpoints.http.server.YamlJacksonHandler
+
+aaf.namespace=${envd:AAF_NAMESPACE:false}
+aaf.root.permission=${envd:AAF_NAMESPACE:org.onap.policy}.pdpd
diff --git a/solution/integration/smo/onap-policy/config/drools/custom/noop.pre.sh b/solution/integration/smo/onap-policy/config/drools/custom/noop.pre.sh
new file mode 100755 (executable)
index 0000000..63bdc4c
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash -x
+# ============LICENSE_START=======================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+sed -i "s/^dmaap/noop/g" \
+    ${POLICY_HOME}/config/engine.properties \
+    ${POLICY_HOME}/config/feature-lifecycle.properties
+
+chmod 644 ${POLICY_HOME}/config/engine.properties ${POLICY_HOME}/config/feature-lifecycle.properties
diff --git a/solution/integration/smo/onap-policy/config/drools/env/base.conf b/solution/integration/smo/onap-policy/config/drools/env/base.conf
new file mode 100644 (file)
index 0000000..8189419
--- /dev/null
@@ -0,0 +1,132 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+# JVM options
+
+JVM_OPTIONS=-server -Xms512m -Xmx512m
+
+# SYSTEM software configuration
+
+DEBUG=y
+POLICY_HOME=/opt/app/policy
+POLICY_LOGS=/var/log/onap/policy/pdpd
+KEYSTORE_PASSWD=Pol1cy_0nap
+TRUSTSTORE_PASSWD=Pol1cy_0nap
+
+# Telemetry credentials
+
+TELEMETRY_PORT=9696
+TELEMETRY_HOST=0.0.0.0
+TELEMETRY_USER=demo@people.osaaf.org
+TELEMETRY_PASSWORD=demo123456!
+
+# nexus repository
+
+SNAPSHOT_REPOSITORY_ID=policy-nexus-snapshots
+SNAPSHOT_REPOSITORY_URL=http://nexus:8081/nexus/content/repositories/snapshots/
+RELEASE_REPOSITORY_ID=policy-nexus-releases
+RELEASE_REPOSITORY_URL=http://nexus:8081/nexus/content/repositories/releases/
+REPOSITORY_USERNAME=admin
+REPOSITORY_PASSWORD=admin123
+REPOSITORY_OFFLINE=false
+
+# Relational (SQL) DB access
+
+SQL_HOST=mariadb
+SQL_USER=policy_user
+SQL_PASSWORD=policy_user
+
+# AAF
+
+AAF=false
+AAF_NAMESPACE=org.onap.policy
+AAF_HOST=aaf.api.simpledemo.onap.org
+
+# PDP-D DMaaP configuration channel
+
+PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION
+PDPD_CONFIGURATION_API_KEY=
+PDPD_CONFIGURATION_API_SECRET=
+PDPD_CONFIGURATION_CONSUMER_GROUP=
+PDPD_CONFIGURATION_CONSUMER_INSTANCE=
+PDPD_CONFIGURATION_PARTITION_KEY=
+
+# PAP-PDP configuration channel
+
+POLICY_PDP_PAP_TOPIC=POLICY-PDP-PAP
+POLICY_PDP_PAP_API_KEY=
+POLICY_PDP_PAP_API_SECRET=
+
+# PAP
+
+PAP_HOST=
+PAP_USERNAME=
+PAP_PASSWORD=
+
+# PDP-X
+
+PDP_HOST=
+PDP_PORT=
+PDP_CONTEXT_URI=policy/pdpx/v1/
+PDP_USERNAME=
+PDP_PASSWORD=
+PDP_CLIENT_USERNAME=
+PDP_CLIENT_PASSWORD=
+PDP_ENVIRONMENT=
+GUARD_DISABLED=false
+
+# DCAE DMaaP
+
+DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT
+DCAE_SERVERS=
+DCAE_CONSUMER_GROUP=dcae.policy.shared
+
+# Open DMaaP
+
+DMAAP_SERVERS=onap-dmaap
+
+# AAI
+
+AAI_HOST=aai.api.simpledemo.onap.org
+AAI_PORT=8443
+AAI_CONTEXT_URI=
+AAI_USERNAME=policy@policy.onap.org
+AAI_PASSWORD=demo123456!
+
+# MSO
+
+SO_HOST=vm1.mso.simpledemo.onap.org
+SO_PORT=8080
+SO_CONTEXT_URI=onap/so/infra/
+SO_URL=http://vm1.mso.simpledemo.onap.org:8080/onap/so/infra
+SO_USERNAME=InfraPortalClient
+SO_PASSWORD=password1$
+
+# VFC
+
+VFC_HOST=
+VFC_PORT=
+VFC_CONTEXT_URI=api/nslcm/v1/
+VFC_USERNAME=
+VFC_PASSWORD=
+
+# SDNC
+
+SDNC_HOST=
+SDNC_PORT=
+SDNC_CONTEXT_URI=restconf/operations/
+SDNC_USERNAME=
+SDNC_PASSWORD=
diff --git a/solution/integration/smo/onap-policy/config/pap/defaultConfig.json b/solution/integration/smo/onap-policy/config/pap/defaultConfig.json
new file mode 100644 (file)
index 0000000..369a37c
--- /dev/null
@@ -0,0 +1,64 @@
+{
+    "name": "PapGroup",
+    "restServerParameters": {
+        "host": "0.0.0.0",
+        "port": 6969,
+        "userName": "healthcheck",
+        "password": "zb!XztG34",
+        "https": true,
+        "aaf": false
+    },
+    "pdpParameters": {
+        "heartBeatMs": 120000,
+        "updateParameters": {
+            "maxRetryCount": 1,
+            "maxWaitMs": 30000
+        },
+        "stateChangeParameters": {
+            "maxRetryCount": 1,
+            "maxWaitMs": 30000
+        }
+    },
+    "databaseProviderParameters": {
+        "name": "PolicyProviderParameterGroup",
+        "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl",
+        "databaseDriver": "org.mariadb.jdbc.Driver",
+        "databaseUrl": "jdbc:mariadb://mariadb:3306/policyadmin",
+        "databaseUser": "policy_user",
+        "databasePassword": "policy_user",
+        "persistenceUnit": "PolicyMariaDb"
+    },
+    "topicParameterGroup": {
+        "topicSources" : [{
+            "topic" : "POLICY-PDP-PAP",
+            "servers" : [ "onap-dmaap" ],
+            "topicCommInfrastructure" : "dmaap",
+            "useHttps": false,
+            "allowSelfSignedCerts" : true
+        }],
+        "topicSinks" : [{
+            "topic" : "POLICY-PDP-PAP",
+            "servers" : [ "onap-dmaap" ],
+            "topicCommInfrastructure" : "dmaap",
+            "useHttps": false,
+            "allowSelfSignedCerts" : true
+        },
+        {
+            "topic" : "POLICY-NOTIFICATION",
+            "servers" : [ "onap-dmaap" ],
+            "topicCommInfrastructure" : "dmaap",
+            "useHttps": false,
+            "allowSelfSignedCerts" : true
+        }]
+    },
+    "healthCheckRestClientParameters":[{
+        "clientName": "api",
+        "hostname": "policy-api",
+        "port": 6969,
+        "userName": "healthcheck",
+        "password": "zb!XztG34",
+        "useHttps": true,
+        "allowSelfSignedCerts" : true,
+        "basePath": "policy/api/v1/healthcheck"
+    }]
+}
diff --git a/solution/integration/smo/onap-policy/config/xacml-pdp/defaultConfig.json b/solution/integration/smo/onap-policy/config/xacml-pdp/defaultConfig.json
new file mode 100644 (file)
index 0000000..9f39089
--- /dev/null
@@ -0,0 +1,39 @@
+{
+    "name": "XacmlPdpParameters",
+    "pdpGroup": "defaultGroup",
+    "pdpType": "xacml",
+    "restServerParameters": {
+        "host": "0.0.0.0",
+        "port": 6969,
+        "userName": "healthcheck",
+        "password": "zb!XztG34",
+        "https": true,
+        "aaf": false
+    },
+    "policyApiParameters": {
+        "host": "policy-api",
+        "port": 6969,
+        "userName": "healthcheck",
+        "password": "zb!XztG34",
+        "useHttps": true,
+        "allowSelfSignedCerts" : true,
+        "aaf": false
+    },
+    "applicationPath": "/opt/app/policy/pdpx/apps",
+    "topicParameterGroup": {
+        "topicSources" : [{
+            "topic" : "POLICY-PDP-PAP",
+            "servers" : [ "onap-dmaap" ],
+            "topicCommInfrastructure" : "dmaap",
+            "useHttps" : false,
+            "allowSelfSignedCerts" : true
+        }],
+        "topicSinks" : [{
+            "topic" : "POLICY-PDP-PAP",
+            "servers" : [ "onap-dmaap" ],
+            "topicCommInfrastructure" : "dmaap",
+            "useHttps" : false,
+            "allowSelfSignedCerts" : true
+        }]
+    }
+}
diff --git a/solution/integration/smo/onap-policy/docker-compose.yml b/solution/integration/smo/onap-policy/docker-compose.yml
new file mode 100644 (file)
index 0000000..8062312
--- /dev/null
@@ -0,0 +1,210 @@
+#
+# ===========LICENSE_START====================================================
+#  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+#  Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
+#  Modifications Copyright (C) 2021 Nordix Foundation. 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=====================================================
+#
+version: '2'
+networks:
+  nonrtric:
+    driver: bridge
+    name: nonrtric
+  smo_integration:
+    external: true
+
+services:
+   mariadb:
+      image: nexus3.onap.org:10001/mariadb:10.5.8
+      container_name: mariadb
+      hostname: mariadb
+      command: ['--lower-case-table-names=1', '--wait_timeout=28800']
+      env_file: config/db/db.conf
+      volumes:
+         - ./config/db:/docker-entrypoint-initdb.d:ro
+      expose:
+       - 3306
+      networks:
+       - nonrtric
+   api:
+      image: nexus3.onap.org:10001/onap/policy-api:2.4.2
+      container_name: policy-api
+      depends_on:
+       - mariadb
+      hostname: policy-api
+      ports:
+       - "6969:6969"
+      expose:
+       - 6969
+      volumes:
+       - ./config/ks.jks:/opt/app/policy/api/etc/ssl/policy-keystore.jks:ro
+       - ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh:ro
+      entrypoint: ./wait_for_port.sh
+      command: [
+        '-c', './policy-api.sh',
+        'mariadb', '3306'
+        ]
+      networks:
+       - nonrtric
+   pap:
+      image: nexus3.onap.org:10001/onap/policy-pap:2.4.2
+      container_name: policy-pap
+      depends_on:
+       - mariadb
+       - api
+      hostname: policy-pap
+      ports:
+       - "6868:6969"
+      expose:
+       - 6868
+      volumes:
+       - ./config/pap/defaultConfig.json:/opt/app/policy/pap/etc/defaultConfig.json:ro
+       - ./config/ks.jks:/opt/app/policy/pap/etc/ssl/policy-keystore.jks:ro
+       - ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh:ro
+      entrypoint: ./wait_for_port.sh
+      command: [
+        '-c', './policy-pap.sh',
+        'mariadb', '3306',
+        'onap-dmaap', '3904',
+        'api', '6969'
+        ]
+      networks:
+       - nonrtric
+       - smo_integration
+   xacml-pdp:
+      image: nexus3.onap.org:10001/onap/policy-xacml-pdp:2.4.2
+      container_name: policy-xacml-pdp
+      depends_on:
+       - mariadb
+       - pap
+      hostname: policy-xacml-pdp
+      expose:
+       - 6969
+      volumes:
+       - ./config/xacml-pdp/defaultConfig.json:/opt/app/policy/pdpx/etc/defaultConfig.json:ro
+       - ./config/ks.jks:/opt/app/policy/pdpx/etc/ssl/policy-keystore.jks:ro
+       - ./wait_for_port.sh:/opt/app/policy/pdpx/bin/wait_for_port.sh:ro
+      entrypoint: ./wait_for_port.sh
+      command: [
+        '-c', './policy-pdpx.sh',
+        'mariadb', '3306',
+        'onap-dmaap', '3904',
+        'pap', '6969'
+        ]
+      networks:
+       - nonrtric
+       - smo_integration
+   drools:
+      image: nexus3.onap.org:10001/onap/policy-drools:1.8.2
+      container_name: drools
+      depends_on:
+       - mariadb
+       - pap
+      hostname: drools
+      expose:
+       - 6969
+       - 9696
+      volumes:
+       - ./config/drools/custom:/tmp/policy-install/config:ro
+       - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
+      env_file:
+        - config/drools/env/base.conf
+      entrypoint: /opt/app/policy/bin/wait_for_port.sh
+      command: [
+        '-c', '/opt/app/policy/bin/pdpd-entrypoint.sh boot',
+        'mariadb', '3306',
+        'onap-dmaap', '3904'
+        ]
+      networks:
+       - nonrtric
+       - smo_integration
+   drools-apps:
+      image: nexus3.onap.org:10001/onap/policy-pdpd-cl:1.8.2
+      container_name: drools-apps
+      depends_on:
+       - mariadb
+       - pap
+       - xacml-pdp
+      hostname: drools-apps
+      expose:
+       - 6969
+       - 9696
+      volumes:
+       - ./config/drools-apps/custom:/tmp/policy-install/config:ro
+       - ./config/drools-apps/custom/feature-lifecycle.properties:/opt/app/policy/features/lifecycle/config/feature-lifecycle.properties:ro
+       - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
+      env_file:
+        - config/drools-apps/env/base.conf
+        - config/drools-apps/env/feature-healthcheck.conf
+        - config/drools-apps/env/feature-pooling-dmaap.conf
+      entrypoint: /opt/app/policy/bin/wait_for_port.sh
+      command: [
+        '-c', '/opt/app/policy/bin/pdpd-cl-entrypoint.sh boot',
+        'mariadb', '3306',
+        'onap-dmaap', '3904',
+        'pap', '6969'
+        ]
+      networks:
+       - nonrtric
+       - smo_integration
+   apex-pdp:
+      image: onap/policy-apex-pdp:latest
+      container_name: policy-apex-pdp
+      depends_on:
+       - mariadb
+       - pap
+      hostname: policy-apex-pdp
+      expose:
+       - 6969
+       - 23324
+      volumes:
+       - ./config/apex-pdp/OnapPfConfig.json:/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json:ro
+       - ./config/ks.jks:/opt/app/policy/apex-pdp/etc/ssl/policy-keystore.jks:ro
+       - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
+      entrypoint: /opt/app/policy/bin/wait_for_port.sh
+      command: [
+        '-c', '/opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json',
+        'mariadb', '3306',
+        'onap-dmaap', '3904',
+        'pap', '6969'
+        ]
+      networks:
+       - nonrtric
+       - smo_integration
+   distribution:
+      image: nexus3.onap.org:10001/onap/policy-distribution:2.5.2
+      container_name: policy-distribution
+      depends_on:
+       - mariadb
+       - api
+       - pap
+       - apex-pdp
+      hostname: policy-distribution
+      volumes:
+       - ./config/distribution/defaultConfig.json:/opt/app/policy/distribution/etc/defaultConfig.json:ro
+       - ./config/ks.jks:/opt/app/policy/distribution/etc/ssl/policy-keystore.jks:ro
+       - ./distribution/config/temp/:/opt/app/policy/distribution/etc/temp/:ro
+       - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
+      entrypoint: /opt/app/policy/bin/wait_for_port.sh
+      command: [
+        '-c', './policy-dist.sh',
+        'mariadb', '3306',
+        'onap-dmaap', '3904',
+        'pap', '6969',
+        'apex-pdp', '6969'
+        ]
+      networks:
+       - nonrtric
+       - smo_integration
diff --git a/solution/integration/smo/onap-policy/wait_for_port.sh b/solution/integration/smo/onap-policy/wait_for_port.sh
new file mode 100755 (executable)
index 0000000..aec5f22
--- /dev/null
@@ -0,0 +1,56 @@
+#!/bin/sh
+# ============LICENSE_START====================================================
+#  Copyright (C) 2021 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+tmout=120
+cmd=
+while getopts c:t: opt; do
+    case "$opt" in
+    c) cmd="$OPTARG" ;;
+    t) tmout="$OPTARG" ;;
+    esac
+done
+nargs=$(expr $OPTIND - 1)
+shift $nargs
+
+even_args=$(expr $# % 2)
+if [ $# -lt 2 -o $even_args -ne 0 ]; then
+    echo "args: [-t timeout] [-c command] hostname1 port1 hostname2 port2 ..." >&2
+    exit 1
+fi
+
+while [ $# -ge 2 ]; do
+    export host=$1
+    export port=$2
+    shift
+    shift
+
+    echo "Waiting for $host port $port..."
+    timeout $tmout sh -c 'until nc -vz "$host" "$port"; do echo -n ".";
+        sleep 1; done'
+    rc=$?
+
+    if [ $rc != 0 ]; then
+        echo "$host port $port cannot be reached"
+        exit $rc
+    fi
+done
+
+$cmd
+
+exit 0