From e06737d701ff5b3dcab311f4337ce40be52c966e Mon Sep 17 00:00:00 2001 From: Fiachra Corcoran Date: Thu, 9 Aug 2018 00:04:29 +0100 Subject: Update for OOM integration Issue-ID: DMAAP-107 Change-Id: Iff9f93040f7b3120cffb5755adc693e24de991a7 Signed-off-by: Fiachra Corcoran --- datarouter-prov/src/main/resources/misc/provcmd | 15 +++++++++++++++ datarouter-prov/src/main/resources/misc/sql_init_01.sql | 13 +++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) (limited to 'datarouter-prov/src/main/resources/misc') diff --git a/datarouter-prov/src/main/resources/misc/provcmd b/datarouter-prov/src/main/resources/misc/provcmd index 75d0bffa..e3654eb9 100644 --- a/datarouter-prov/src/main/resources/misc/provcmd +++ b/datarouter-prov/src/main/resources/misc/provcmd @@ -19,6 +19,21 @@ # # ECOMP is a trademark and service mark of AT&T Intellectual Property. +urlencode() { + local data + if [[ $# != 1 ]]; then + echo "Usage: $0 string-to-urlencode" + return 1 + fi + data="$(curl -s -o /dev/null -w %url_effective --get --data-urlencode "$1" "")" + if [[ $? != 3 ]]; then + echo "Unexpected error" 1>&2 + return 2 + fi + echo "${data##/?}" + return 0 +} +export urlencode PATH=/opt/app/datartr/bin:/bin:/usr/bin:$PATH PROVCMD="$0" diff --git a/datarouter-prov/src/main/resources/misc/sql_init_01.sql b/datarouter-prov/src/main/resources/misc/sql_init_01.sql index e1dfd0c8..e01ce3b0 100644 --- a/datarouter-prov/src/main/resources/misc/sql_init_01.sql +++ b/datarouter-prov/src/main/resources/misc/sql_init_01.sql @@ -114,12 +114,12 @@ CREATE TABLE NODES ( ); CREATE TABLE GROUPS ( - GROUPID INT UNSIGNED NOT NULL PRIMARY KEY, - AUTHID VARCHAR(100) NOT NULL, - NAME VARCHAR(50) NOT NULL, + GROUPID INT UNSIGNED NOT NULL PRIMARY KEY, + AUTHID VARCHAR(100) NOT NULL, + NAME VARCHAR(50) NOT NULL, DESCRIPTION VARCHAR(255), - CLASSIFICATION VARCHAR(20) NOT NULL, - MEMBERS TINYTEXT, + CLASSIFICATION VARCHAR(20) NOT NULL, + MEMBERS TINYTEXT, LAST_MOD TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); @@ -143,6 +143,3 @@ INSERT INTO PARAMETERS VALUES ('PROV_REQUIRE_SECURE', 'false'), ('_INT_VALUES', 'LOGROLL_INTERVAL|PROV_MAXFEED_COUNT|PROV_MAXSUB_COUNT|DELIVERY_INIT_RETRY_INTERVAL|DELIVERY_MAX_RETRY_INTERVAL|DELIVERY_RETRY_RATIO|DELIVERY_MAX_AGE') ; - -INSERT INTO FEED_ENDPOINT_ADDRS VALUES - (1, '172.100.0.1'); \ No newline at end of file -- cgit 1.2.3-korg