summaryrefslogtreecommitdiffstats
path: root/cps-ri/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ri/src/main/resources')
-rw-r--r--cps-ri/src/main/resources/changelog/db/changes/09-loadData-dmi-registry-schema-set.yaml50
-rw-r--r--cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set_yang_resources@2021-10-20.csv3
-rw-r--r--cps-ri/src/main/resources/changelog/db/changes/data/dmi/yang_resource@2021-10-20.csv53
3 files changed, 105 insertions, 1 deletions
diff --git a/cps-ri/src/main/resources/changelog/db/changes/09-loadData-dmi-registry-schema-set.yaml b/cps-ri/src/main/resources/changelog/db/changes/09-loadData-dmi-registry-schema-set.yaml
index d9be36a155..fe2428e0c3 100644
--- a/cps-ri/src/main/resources/changelog/db/changes/09-loadData-dmi-registry-schema-set.yaml
+++ b/cps-ri/src/main/resources/changelog/db/changes/09-loadData-dmi-registry-schema-set.yaml
@@ -111,4 +111,52 @@ databaseChangeLog:
tableName: 'anchor'
rollback:
- sql:
- sql: delete from anchor where name = 'ncmp-dmi-registry' \ No newline at end of file
+ sql: delete from anchor where name = 'ncmp-dmi-registry'
+
+ - changeSet:
+ author: cps
+ label: dmi-registry-schema-preload
+ id: 9.5
+ loadUpdateData:
+ encoding: UTF-8
+ file: 'changelog/db/changes/data/dmi/yang_resource@2021-10-20.csv'
+ onlyUpdate: 'false'
+ primaryKey: 'id'
+ quotchar: '"'
+ separator: '|'
+ tableName: 'yang_resource'
+ columns:
+ - column:
+ header: name
+ name: name
+ type: STRING
+ - column:
+ header: content
+ name: content
+ type: STRING
+ - column:
+ header: checksum
+ name: checksum
+ type: STRING
+ rollback:
+ - sql:
+ sql: delete from yang_resource where name = 'dmi-registry@2021-10-20.yang'
+
+ - changeSet:
+ author: cps
+ label: dmi-registry-schema-preload
+ id: 9.6
+ loadUpdateData:
+ encoding: UTF-8
+ file: 'changelog/db/changes/data/dmi/schema_set_yang_resources@2021-10-20.csv'
+ quotchar: '"'
+ primaryKey: 'schema_set_id,yang_resource_id'
+ separator: '|'
+ tableName: 'schema_set_yang_resources'
+ usePreparedStatements: true
+ rollback:
+ - sql:
+ sql: >
+ delete from schema_set_yang_resources
+ where schema_set_id = (select id from schema_set where name = 'ncmp-dmi-registry-model')
+ and yang_resource_id = (select id from yang_resource where name = 'dmi-registry@2021-10-20.yang')
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set_yang_resources@2021-10-20.csv b/cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set_yang_resources@2021-10-20.csv
new file mode 100644
index 0000000000..d419fc92b4
--- /dev/null
+++ b/cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set_yang_resources@2021-10-20.csv
@@ -0,0 +1,3 @@
+schema_set_id|yang_resource_id
+(select id from schema_set where name='ncmp-dmi-registry-model')|(select id from yang_resource where name='dmi-registry@2021-10-20.yang')
+
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/dmi/yang_resource@2021-10-20.csv b/cps-ri/src/main/resources/changelog/db/changes/data/dmi/yang_resource@2021-10-20.csv
new file mode 100644
index 0000000000..80caea2142
--- /dev/null
+++ b/cps-ri/src/main/resources/changelog/db/changes/data/dmi/yang_resource@2021-10-20.csv
@@ -0,0 +1,53 @@
+name|content|checksum
+dmi-registry@2021-10-20.yang|"module dmi-registry {
+
+ yang-version 1.1;
+
+ namespace \"org:onap:cps:ncmp\";
+
+ prefix dmi-reg;
+
+ organization \"Nordix Foundation\";
+
+ contact \"rahul.tyagi@est.tech\";
+
+ revision \"2021-10-20\" {
+ description
+ \"Added dmi-data-service-name & dmi-model-service-name to allow separate DMI instances for each responsibility\";
+ }
+
+ container dmi-registry {
+
+ list cm-handles {
+
+ key \"id\";
+
+ leaf id {
+ type string;
+ }
+
+ leaf dmi-service-name {
+ type string;
+ }
+
+ leaf dmi-data-service-name {
+ type string;
+ }
+
+ leaf dmi-model-service-name {
+ type string;
+ }
+
+ list additional-properties {
+ key \"name\";
+ leaf name {
+ type string;
+ }
+ leaf value {
+ type string;
+ }
+ }
+ }
+ }
+}
+"|f9145662dfc97363297dc1c06b8bde3a8621c658abefd56946faaab240714181