diff options
author | BT2983 <BT2983@att.com> | 2018-07-23 23:51:20 -0600 |
---|---|---|
committer | BT2983 <BT2983@att.com> | 2018-07-23 23:51:20 -0600 |
commit | f5da5198e43addc77989dee8b500cb69e9885f93 (patch) | |
tree | d68226f2b418787e012bd044f57dea60b1b2a331 /ms/neng/src/main/resources/db | |
parent | 3437d0aa56f7c0630cbd1b9074579f7e0f8a44ae (diff) |
Adding naming micro-service code - more tests.
Integration tests and more unit tests.
Change-Id: Id3500085a43ff817d04d8f407e5cdbc4271dfb35
Issue-ID: CCSDK-342
Signed-off-by: BT2983 <BT2983@att.com>
Diffstat (limited to 'ms/neng/src/main/resources/db')
4 files changed, 21 insertions, 16 deletions
diff --git a/ms/neng/src/main/resources/db/changelog/db.changelog-master.xml b/ms/neng/src/main/resources/db/changelog/db.changelog-master.xml index 9d735e64..dbbd71b6 100644 --- a/ms/neng/src/main/resources/db/changelog/db.changelog-master.xml +++ b/ms/neng/src/main/resources/db/changelog/db.changelog-master.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -/*- +<!-- * ============LICENSE_START======================================================= * ONAP : CCSDK.apps * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - */ + --> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9" @@ -28,13 +28,6 @@ <include file="db/changelog/scripts/rel_18_10/create_base_tables.sql" /> <include file="db/changelog/scripts/rel_18_10/01_initial_ref_data_v1.sql" /> <include file="db/changelog/scripts/rel_18_10/02_create_indexes_ddl.sql" /> - <include file="db/changelog/scripts/rel_18_10/03_ref_data_upd_dml.sql" /> <include file="db/changelog/scripts/rel_18_10/04_ref_data_extrn_int.sql" /> - <include file="db/changelog/scripts/rel_18_10/05_ref_data_upd_dml.sql" /> - <include file="db/changelog/scripts/rel_18_10/06_ref_data_upd_dml.sql" /> - <include file="db/changelog/scripts/rel_18_10/07_ref_data_extrn_int_update_dml.sql" /> - <include file="db/changelog/scripts/rel_18_10/08_ref_data_extrn_int_update_dml.sql" /> - <include file="db/changelog/scripts/rel_18_10/09_table_upd_ddl.sql" /> - <include file="db/changelog/scripts/rel_18_10/10_ref_data_upd_dml.sql" /> </databaseChangeLog> diff --git a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/01_initial_ref_data_v1.sql b/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/01_initial_ref_data_v1.sql index 44d86f0a..e5a4e117 100644 --- a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/01_initial_ref_data_v1.sql +++ b/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/01_initial_ref_data_v1.sql @@ -5,14 +5,18 @@ --set @@autocommit:=0; ---delete all records delete from SERVICE_PARAMETER; INSERT INTO SERVICE_PARAMETER(NAME, VALUE, CREATED_BY) VALUES ('initial_increment','10,40,50,100','Initial'); +INSERT INTO SERVICE_PARAMETER(NAME, VALUE, CREATED_BY) VALUES ('max_gen_attempt','50','Initial'); INSERT INTO SERVICE_PARAMETER(NAME, VALUE, CREATED_BY) VALUES ('recipe_separator','|":",','Initial'); +INSERT INTO SERVICE_PARAMETER(NAME, VALUE, CREATED_BY) VALUES ('use_db_policy','N','Initial'); delete from IDENTIFIER_MAP; +INSERT INTO IDENTIFIER_MAP(POLICY_FN_NAME, JS_FN_NAME, CREATED_BY) VALUES ('sub_str','substring', 'Initial'); INSERT INTO IDENTIFIER_MAP(POLICY_FN_NAME, JS_FN_NAME, CREATED_BY) VALUES ('substr','substring', 'Initial'); +INSERT INTO IDENTIFIER_MAP(POLICY_FN_NAME, JS_FN_NAME, CREATED_BY) VALUES ('to_lower_case','toLowerCase', 'Initial'); +INSERT INTO IDENTIFIER_MAP(POLICY_FN_NAME, JS_FN_NAME, CREATED_BY) VALUES ('to_upper_case','toUpperCase', 'Initial'); commit; diff --git a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/04_ref_data_extrn_int.sql b/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/04_ref_data_extrn_int.sql index bc72a2e8..7b0973c2 100644 --- a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/04_ref_data_extrn_int.sql +++ b/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/04_ref_data_extrn_int.sql @@ -1,24 +1,32 @@ --liquibase formatted sql --changeset ref_data_update:18_10.ref_data_update.sql --- clean up any data delete from external_interface; ---insert the data - insert into external_interface(SYSTEM,PARAM,URL_SUFFIX,CREATED_TIME,CREATED_BY,LAST_UPDATED_TIME,LAST_UPDATED_BY) values('aai','vnf-name','nodes/generic-vnfs?vnf-name=',sysdate(),'nengsys',sysdate(),'nengsys'); +insert into external_interface(SYSTEM,PARAM,URL_SUFFIX,CREATED_TIME,CREATED_BY,LAST_UPDATED_TIME,LAST_UPDATED_BY) +values('aai','VNF','nodes/generic-vnfs?vnf-name=',sysdate(),'nengsys',sysdate(),'nengsys'); insert into external_interface(SYSTEM,PARAM,URL_SUFFIX,CREATED_TIME,CREATED_BY,LAST_UPDATED_TIME,LAST_UPDATED_BY) values('aai','vnfc-name','nodes/vnfcs?vnfc-name=',sysdate(),'nengsys',sysdate(),'nengsys'); +insert into external_interface(SYSTEM,PARAM,URL_SUFFIX,CREATED_TIME,CREATED_BY,LAST_UPDATED_TIME,LAST_UPDATED_BY) +values('aai','VNFC','nodes/vnfcs?vnfc-name=',sysdate(),'nengsys',sysdate(),'nengsys'); insert into external_interface(SYSTEM,PARAM,URL_SUFFIX,CREATED_TIME,CREATED_BY,LAST_UPDATED_TIME,LAST_UPDATED_BY) values('aai','vserver-name','nodes/vservers?vserver-name=',sysdate(),'nengsys',sysdate(),'nengsys'); insert into external_interface(SYSTEM,PARAM,URL_SUFFIX,CREATED_TIME,CREATED_BY,LAST_UPDATED_TIME,LAST_UPDATED_BY) values('aai','vf-module-name','nodes/vf-modules?vf-module-name=',sysdate(),'nengsys',sysdate(),'nengsys'); +insert into external_interface(SYSTEM,PARAM,URL_SUFFIX,CREATED_TIME,CREATED_BY,LAST_UPDATED_TIME,LAST_UPDATED_BY) +values('aai','VFMODULE','nodes/vf-modules?vf-module-name=',sysdate(),'nengsys',sysdate(),'nengsys'); +insert into external_interface(SYSTEM,PARAM,URL_SUFFIX,CREATED_TIME,CREATED_BY,LAST_UPDATED_TIME,LAST_UPDATED_BY) +values('aai','VF-MODULE','nodes/vf-modules?vf-module-name=',sysdate(),'nengsys',sysdate(),'nengsys'); insert into external_interface(SYSTEM,PARAM,URL_SUFFIX,CREATED_TIME,CREATED_BY,LAST_UPDATED_TIME,LAST_UPDATED_BY) values('aai','service-instance-id','nodes/service-instances?service-instance-id=',sysdate(),'nengsys',sysdate(),'nengsys'); +insert into external_interface(SYSTEM,PARAM,URL_SUFFIX,CREATED_TIME,CREATED_BY,LAST_UPDATED_TIME,LAST_UPDATED_BY) +values('aai','VM','nodes/vservers?vserver-name=',sysdate(),'nengsys',sysdate(),'nengsys'); + commit; diff --git a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/create_base_tables.sql b/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/create_base_tables.sql index f79dd3fc..4cfe05c8 100644 --- a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/create_base_tables.sql +++ b/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/create_base_tables.sql @@ -10,14 +10,14 @@ NAME VARCHAR(500) COMMENT 'Generated name', PREFIX VARCHAR(100) COMMENT 'The prefix for the name. (The part of the name before the sequence number.)', SUFFIX VARCHAR(100) COMMENT 'The suffix for the name. (The part of the name after the sequence number.)', IS_RELEASED CHAR(1) COMMENT 'Indicating if the entry is released/unassigned', -CREATED_TIME DATETIME DEFAULT CURRENT_TIMESTAMP, +CREATED_TIME DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CREATED_BY VARCHAR(50), LAST_UPDATED_TIME DATETIME, LAST_UPDATED_BY VARCHAR(50)) AUTO_INCREMENT=100; -- COMMENT 'TABLE TO STORE GENERATED NAMES'; CREATE TABLE SERVICE_PARAMETER (SERVICE_PARAMETER_ID INTEGER PRIMARY KEY AUTO_INCREMENT, -NAME VARCHAR(500) COMMENT 'Parameter name' NOT NULL UNIQUE, +NAME VARCHAR(500) NOT NULL COMMENT 'Parameter name', VALUE VARCHAR(500) COMMENT 'Parameter value', CREATED_TIME DATETIME DEFAULT CURRENT_TIMESTAMP, CREATED_BY VARCHAR(50), @@ -26,7 +26,7 @@ LAST_UPDATED_BY VARCHAR(50) ) AUTO_INCREMENT=100; CREATE TABLE IDENTIFIER_MAP (IDENTIFIER_MAP_ID INTEGER PRIMARY KEY AUTO_INCREMENT, -POLICY_FN_NAME VARCHAR(500) COMMENT 'Function name in policy manager' NOT NULL UNIQUE, +POLICY_FN_NAME VARCHAR(500) COMMENT 'Function name in policy manager' NOT NULL, JS_FN_NAME VARCHAR(500) COMMENT 'Equivalent name in Java or script', CREATED_TIME DATETIME DEFAULT CURRENT_TIMESTAMP, CREATED_BY VARCHAR(50), |