aboutsummaryrefslogtreecommitdiffstats
path: root/extra/docker
diff options
context:
space:
mode:
Diffstat (limited to 'extra/docker')
-rw-r--r--extra/docker/clamp/config/clds-policy-config-third_party_proxy.properties37
-rw-r--r--extra/docker/elk/.env11
-rw-r--r--extra/docker/elk/docker-compose.yml8
-rwxr-xr-xextra/docker/elk/tools/DMaaPServiceMocker/ds_mocker.py54
4 files changed, 80 insertions, 30 deletions
diff --git a/extra/docker/clamp/config/clds-policy-config-third_party_proxy.properties b/extra/docker/clamp/config/clds-policy-config-third_party_proxy.properties
new file mode 100644
index 000000000..ecf21e65a
--- /dev/null
+++ b/extra/docker/clamp/config/clds-policy-config-third_party_proxy.properties
@@ -0,0 +1,37 @@
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2017 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============================================
+# ===================================================================
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+###
+
+# Configuration Settings for Policy Engine Components
+PDP_URL1=http://third_party_proxy:8085/pdp/ , testpdp, alpha123
+PDP_URL2=http://third_party_proxy:8085/pdp/ , testpdp, alpha123
+NOTIFICATION_TYPE=websocket
+NOTIFICATION_UEB_SERVERS=localhost
+NOTIFICATION_TOPIC=
+CLIENT_ID=python
+# base64 encoding
+#CLIENT_KEY=ChlakDuk
+CLIENT_KEY=dGVzdA==
+#DEVL for development
+#TEST for Test environments
+#PROD for prod environments
+ENVIRONMENT=TEST
diff --git a/extra/docker/elk/.env b/extra/docker/elk/.env
index 4f1781d51..79d794306 100644
--- a/extra/docker/elk/.env
+++ b/extra/docker/elk/.env
@@ -1,13 +1,2 @@
# docker compose related
COMPOSE_PROJECT_NAME=clamp_elk
-
-# dmaap configuration for logstash
-dmaap_base_url=http://localhost:3904/
-dmaap_user=user
-dmaap_password=password
-dmaap_consumer_group=CG42
-dmaap_consumer_id=C42
-
-event_topic=EVENT_TOPIC
-notification_topic=NOTIFICATION_TOPIC
-request_topic=REQUEST_TOPIC
diff --git a/extra/docker/elk/docker-compose.yml b/extra/docker/elk/docker-compose.yml
index ded2c6b01..3b7284d53 100644
--- a/extra/docker/elk/docker-compose.yml
+++ b/extra/docker/elk/docker-compose.yml
@@ -20,6 +20,14 @@ services:
networks:
es_net:
environment:
+ - dmaap_base_url=http://localhost:3904/
+ - dmaap_user=user
+ - dmaap_password=password
+ - dmaap_consumer_group=CG42
+ - dmaap_consumer_id=C42
+ - event_topic=EVENT_TOPIC
+ - notification_topic=NOTIFICATION_TOPIC
+ - request_topic=REQUEST_TOPIC
kibana:
image: kibana
diff --git a/extra/docker/elk/tools/DMaaPServiceMocker/ds_mocker.py b/extra/docker/elk/tools/DMaaPServiceMocker/ds_mocker.py
index 9891b8ef6..c1116066e 100755
--- a/extra/docker/elk/tools/DMaaPServiceMocker/ds_mocker.py
+++ b/extra/docker/elk/tools/DMaaPServiceMocker/ds_mocker.py
@@ -194,25 +194,41 @@ class CLStatus(object):
yield Notification.final().success(**config)
raise StopIteration()
-DMaaPMessage.dmaap_host_url = "http://uebsb93kcdc.it.att.com:3904"
-Event.topic = "APPC-TEST-AMDOCS1-1607-E2E"
-Notification.topic = "APPC-TEST-AMDOCS1-1607-IST"
-# Request.topic = "APPC-TEST-AMDOCS1-1607-RY303T"
-
-test_datas = [CLStatus(missing=False, disabled=False, op_failure=False) for i in range(45)] \
+def print_usage():
+ print("""
+ ./ds_mocker.py <DMAAP_URL> <EVENT_TOPIC> [NOTIFICATION_TOPIC [REQUEST_TOPIC]]
+ """)
+ exit()
+
+def push(test_datas):
+ for current_i, status in enumerate(test_datas):
+ time.sleep(random.randint(0,6))
+ for s in status:
+ # print(s)
+ status_code = s.publish()
+ if status_code != 200:
+ print("Error when publishing : status_code={}".format(status_code))
+ exit(1)
+ time.sleep(random.randint(0,3))
+ print("%03d,missing:%5s,disabled:%5s,op_failure:%5s - %s" % (current_i, status._missing, status._disabled, status._op_failure, status._config))
+
+
+def generate_dataset_1():
+ test_datas = [CLStatus(missing=False, disabled=False, op_failure=False) for i in range(45)] \
+ [CLStatus(missing=True, disabled=False, op_failure=False) for i in range(5)] \
+ [CLStatus(missing=False, disabled=True, op_failure=False) for i in range(6)] \
+ [CLStatus(missing=False, disabled=False, op_failure=True) for i in range(7)]
-random.shuffle(test_datas)
-random.shuffle(test_datas)
-
-for current_i, status in enumerate(test_datas):
- time.sleep(random.randint(0,6))
- for s in status:
- # print(s)
- status_code = s.publish()
- if status_code != 200:
- print("Error when publishing : status_code={}".format(status_code))
- exit(1)
- time.sleep(random.randint(0,3))
- print("%03d,missing:%5s,disabled:%5s,op_failure:%5s - %s" % (current_i, status._missing, status._disabled, status._op_failure, status._config))
+ random.shuffle(test_datas)
+ return test_datas
+
+
+if __name__ == "__main__":
+ import sys
+ if len(sys.argv) < 3:
+ print_usage()
+
+ DMaaPMessage.dmaap_host_url = sys.argv[1]
+ Event.topic = sys.argv[2]
+ Notification.topic = len(sys.argv) > 3 and sys.argv[3] or sys.argv[2]
+ # Request.topic = len(sys.argv) > 4 or Notification.topic
+ push(generate_dataset_1())