...
Code Block |
---|
language | yml |
---|
title | Load Data into Test Table |
---|
collapse | true |
---|
|
databaseChangeLog:
- changeSet:
author: cps
label: xnf-data-preload
id: 14.1
loadUpdateData:
encoding: UTF-8
file: 'changelog/db/changes/data/test_table.csv'
onlyUpdate: 'false'
primaryKey: 'id'
quotchar: '"'
separator: '|'
tableName: 'test_table' |
test table with data
![](/download/attachments/117740339/image2021-12-16_10-39-20.png?version=1&modificationDate=1639651160000&api=v2)
Adding New Yang Resource
...
Loading data for Yang Resource
To load a yang resource, create a new yang resource csv file to load the data (as outlined above) in the following format 'yang_resource_@*data-of-creation*'
Code Block |
---|
language | bash |
---|
title | yang_resource@2021-12-13.csv |
---|
collapse | true |
---|
|
name|content|checksum
dmi-registry@2021-12-13.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-12-13\" {
description
\"Added new list of public additonal properties for a Cm-Handle which are exposed to clients of the NCMP interface. \";
}
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;
}
}
list public-additional-properties {
key \"name\";
leaf name {
type string;
}
leaf value {
type string;
}
}
}
}
}
"|4899c384835ec48194ab5e3837549d32b844e02cfc81e9205234fa36354f3fe4 |
Note |
---|
Before adding the checksum in the file above, first generate the checksum within the yang_resource table following the step below |
Generating Checksum For New Yang Resource
Run the following command to insert a new yang resource INTO THE
Code Block |
---|
|
curl --location --request POST 'http://localhost:8080/cps/api/v1/dataspaces/*dataspacename*/schema-sets' --header 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' --form 'file=*PATH-TO-YANG-FILE*' --form 'schema-set-name='*NAME-OF-SCEHMA-SET-DEFINED-IN-YANG_RESOURCE*' |
Rollback
Potential Issues