diff options
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/log4j.properties | 29 | ||||
-rw-r--r-- | src/main/resources/schema_0.sql | 35 | ||||
-rw-r--r-- | src/main/resources/schema_1.sql | 136 | ||||
-rw-r--r-- | src/main/resources/schema_2.sql | 51 | ||||
-rw-r--r-- | src/main/resources/schema_3.sql | 29 | ||||
-rw-r--r-- | src/main/resources/schema_4.sql | 33 | ||||
-rw-r--r-- | src/main/resources/schema_5.sql | 25 | ||||
-rw-r--r-- | src/main/resources/schema_6.sql | 33 |
8 files changed, 371 insertions, 0 deletions
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties new file mode 100644 index 0000000..bfaeaf2 --- /dev/null +++ b/src/main/resources/log4j.properties @@ -0,0 +1,29 @@ +### +# ============LICENSE_START======================================================= +# OpenECOMP - org.openecomp.dmaapbc +# ================================================================================ +# 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========================================================= +### + +log4j.debug=FALSE +log4j.rootLogger=INFO,Root + +log4j.appender.Root=org.apache.log4j.DailyRollingFileAppender +log4j.appender.Root.file=logs/dmaapBC-api.log +log4j.appender.Root.datePattern='.'yyyyMMdd +log4j.appender.Root.append=true +log4j.appender.Root.layout=org.apache.log4j.PatternLayout +log4j.appender.Root.layout.ConversionPattern=%d %p %F %L %t %m%n diff --git a/src/main/resources/schema_0.sql b/src/main/resources/schema_0.sql new file mode 100644 index 0000000..3b59800 --- /dev/null +++ b/src/main/resources/schema_0.sql @@ -0,0 +1,35 @@ +--- +-- ============LICENSE_START======================================================= +-- OpenECOMP - org.openecomp.dmaapbc +-- ================================================================================ +-- 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========================================================= +--- + +@drop table dcae_location; +@drop table dmaap; +@drop table dr_node; +@drop table dr_pub; +@drop table dr_sub; +@drop table mr_client; +@drop table mr_cluster; +@drop table feed; +@drop table topic; +@drop table mirror_maker; +@drop table dmaapbc_sch_ver; +CREATE TABLE dmaapbc_sch_ver ( + version INTEGER +); +INSERT INTO dmaapbc_sch_ver (version) VALUES (0); diff --git a/src/main/resources/schema_1.sql b/src/main/resources/schema_1.sql new file mode 100644 index 0000000..27ae13f --- /dev/null +++ b/src/main/resources/schema_1.sql @@ -0,0 +1,136 @@ +--- +-- ============LICENSE_START======================================================= +-- OpenECOMP - org.openecomp.dmaapbc +-- ================================================================================ +-- 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========================================================= +--- + +@drop table dcae_location; +create table dcae_location ( + dcae_location_name VARCHAR(100), + clli VARCHAR(100), + dcae_layer VARCHAR(100), + open_stack_availability_zone VARCHAR(100), + last_mod TIMESTAMP, + PRIMARY KEY(dcae_location_name) +); +@drop table dmaap; +create table dmaap ( + version VARCHAR(100), + topic_ns_root VARCHAR(100), + dmaap_name VARCHAR(100), + dr_prov_url VARCHAR(200), + node_key VARCHAR(100), + access_key_owner VARCHAR(100), + last_mod TIMESTAMP, + status VARCHAR(100), + bridge_admin_topic VARCHAR(100), + logging_url VARCHAR(200) +); +@drop table dr_node; +create table dr_node ( + fqdn VARCHAR(100), + dcae_location_name VARCHAR(100), + host_name VARCHAR(100), + version VARCHAR(100), + PRIMARY KEY(fqdn) +); +@drop table dr_pub; +create table dr_pub ( + dcae_location_name VARCHAR(100), + username VARCHAR(100), + userpwd VARCHAR(100), + feed_id VARCHAR(100), + pub_id VARCHAR(100), + status VARCHAR(100), + PRIMARY KEY(pub_id) +); +@drop table dr_sub; +create table dr_sub ( + owner VARCHAR(100), + suspended BOOLEAN, + status VARCHAR(100), + use100 BOOLEAN, + dcae_location_name VARCHAR(100), + username VARCHAR(100), + userpwd VARCHAR(100), + feed_id VARCHAR(100), + delivery_u_r_l VARCHAR(200), + log_u_r_l VARCHAR(200), + sub_id VARCHAR(100), + PRIMARY KEY(sub_id) +); +@drop table mr_client; +create table mr_client ( + dcae_location_name VARCHAR(100), + fqtn VARCHAR(100), + client_role VARCHAR(100), + action VARCHAR(300), + mr_client_id VARCHAR(100), + status VARCHAR(100), + topic_u_r_l VARCHAR(200), + last_mod TIMESTAMP, + PRIMARY KEY(mr_client_id) +); +@drop table mr_cluster; +create table mr_cluster ( + last_mod TIMESTAMP, + dcae_location_name VARCHAR(100), + fqdn VARCHAR(100), + hosts VARCHAR(300), + topic_protocol VARCHAR(100), + topic_port VARCHAR(100), + PRIMARY KEY(dcae_location_name) +); +@drop table feed; +create table feed ( + suspended BOOLEAN, + subscribe_u_r_l VARCHAR(200), + feed_id VARCHAR(100), + feed_name VARCHAR(100), + feed_version VARCHAR(100), + feed_description VARCHAR(1000), + owner VARCHAR(100), + aspr_classification VARCHAR(100), + publish_u_r_l VARCHAR(200), + log_u_r_l VARCHAR(200), + status VARCHAR(100), + -- pubs not stored here + -- subs not stored here + PRIMARY KEY(feed_id) +); +@drop table topic; +create table topic ( + last_mod TIMESTAMP, + fqtn VARCHAR(100), + topic_name VARCHAR(100), + topic_description VARCHAR(1000), + tnx_enabled VARCHAR(100), + owner VARCHAR(100), + status VARCHAR(100), + -- clients not stored here + PRIMARY KEY(fqtn) +); +@drop table mirror_maker; +create table mirror_maker ( + mm_name VARCHAR(100), + source_cluster VARCHAR(100), + target_cluster VARCHAR(100), + last_mod TIMESTAMP, + vectors TEXT, + PRIMARY KEY(source_cluster) +); +update dmaapbc_sch_ver set version = 1 where version = 0; diff --git a/src/main/resources/schema_2.sql b/src/main/resources/schema_2.sql new file mode 100644 index 0000000..c9e5c02 --- /dev/null +++ b/src/main/resources/schema_2.sql @@ -0,0 +1,51 @@ +--- +-- ============LICENSE_START======================================================= +-- OpenECOMP - org.openecomp.dmaapbc +-- ================================================================================ +-- 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========================================================= +--- + +@alter table dcae_location + add column subnet VARCHAR(100), + add column status VARCHAR(100) +; + +@alter table dr_node + add column last_mod TIMESTAMP, + add column status VARCHAR(100) +; +@alter table dr_pub + add column last_mod TIMESTAMP +; +@alter table dr_sub + add column last_mod TIMESTAMP +; + +@alter table mr_cluster + add column status VARCHAR(100) +; +@alter table feed + add column last_mod TIMESTAMP, + add column format_uuid VARCHAR(100) +; +@alter table topic + add column format_uuid VARCHAR(100) +; + +@alter table mirror_maker + add column status VARCHAR(100) +; +update dmaapbc_sch_ver set version = 2 where version = 1; diff --git a/src/main/resources/schema_3.sql b/src/main/resources/schema_3.sql new file mode 100644 index 0000000..0f28988 --- /dev/null +++ b/src/main/resources/schema_3.sql @@ -0,0 +1,29 @@ +--- +-- ============LICENSE_START======================================================= +-- OpenECOMP - org.openecomp.dmaapbc +-- ================================================================================ +-- 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========================================================= +--- + + +@alter table mirror_maker + add column topics TEXT +; +@alter table mirror_maker + drop column vectors +; +@delete from mirror_maker; +update dmaapbc_sch_ver set version = 3 where version = 2; diff --git a/src/main/resources/schema_4.sql b/src/main/resources/schema_4.sql new file mode 100644 index 0000000..727c4bd --- /dev/null +++ b/src/main/resources/schema_4.sql @@ -0,0 +1,33 @@ +--- +-- ============LICENSE_START======================================================= +-- OpenECOMP - org.openecomp.dmaapbc +-- ================================================================================ +-- 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========================================================= +--- + + +@drop table mirror_maker; +create table mirror_maker ( + mm_name VARCHAR(512), + source_cluster VARCHAR(256), + target_cluster VARCHAR(256), + last_mod TIMESTAMP, + topics TEXT, + PRIMARY KEY(source_cluster) +); + + +update dmaapbc_sch_ver set version = 4 where version = 3; diff --git a/src/main/resources/schema_5.sql b/src/main/resources/schema_5.sql new file mode 100644 index 0000000..cd7130b --- /dev/null +++ b/src/main/resources/schema_5.sql @@ -0,0 +1,25 @@ +--- +-- ============LICENSE_START======================================================= +-- OpenECOMP - org.openecomp.dmaapbc +-- ================================================================================ +-- 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========================================================= +--- + + +@delete from mirror_maker; + + +update dmaapbc_sch_ver set version = 5 where version = 4; diff --git a/src/main/resources/schema_6.sql b/src/main/resources/schema_6.sql new file mode 100644 index 0000000..7c2bbd7 --- /dev/null +++ b/src/main/resources/schema_6.sql @@ -0,0 +1,33 @@ +--- +-- ============LICENSE_START======================================================= +-- OpenECOMP - org.openecomp.dmaapbc +-- ================================================================================ +-- 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========================================================= +--- + + +@drop table mirror_maker; +create table mirror_maker ( + mm_name VARCHAR(512), + source_cluster VARCHAR(256), + target_cluster VARCHAR(256), + last_mod TIMESTAMP, + topics TEXT, + PRIMARY KEY(mm_name) +); + + +update dmaapbc_sch_ver set version = 6 where version = 5; |