diff --git a/Makefile b/Makefile index 02148b43..33c54ddf 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ PERL_SCRIPTS = \ sbin/ngcp-sync-grants \ # EOL YAML_SCHEMAS = \ + schemas/instances.yml \ schemas/sites.yml \ # EOL RESULTS ?= results diff --git a/debian/ngcp-ngcpcfg.install b/debian/ngcp-ngcpcfg.install index 7b80a78c..113bded8 100644 --- a/debian/ngcp-ngcpcfg.install +++ b/debian/ngcp-ngcpcfg.install @@ -20,6 +20,7 @@ sbin/ngcp-network-validator usr/sbin/ sbin/ngcp-sync-constants usr/sbin/ sbin/ngcp-sync-grants usr/sbin/ sbin/ngcpcfg usr/sbin/ +schemas/instances.yml usr/share/ngcp-ngcpcfg/schemas/ schemas/sites.yml usr/share/ngcp-ngcpcfg/schemas/ scripts/apply usr/share/ngcp-ngcpcfg/scripts/ scripts/build usr/share/ngcp-ngcpcfg/scripts/ diff --git a/schemas/instances.yml b/schemas/instances.yml new file mode 100644 index 00000000..8b5df091 --- /dev/null +++ b/schemas/instances.yml @@ -0,0 +1,17 @@ +name: instances.yml +desc: Kwalify schema for NGCP instances.yml +type: map +mapping: + "sources": + type: seq + required: yes + sequence: + - type: map + required: yes + mapping: + "orig": { type: str, required: yes, + desc: "Specify the original service pathname." } + "dest": { type: str, required: yes, + desc: "Specify the destination service pathname." } + "label": { type: str, required: yes, + desc: "Specify service label." } diff --git a/scripts/check b/scripts/check index 9501da1b..7835dc0e 100755 --- a/scripts/check +++ b/scripts/check @@ -172,7 +172,7 @@ validate_config() { local schema case "${name}" in - sites.yml) + sites.yml|instances.yml) if ! [ -e "${f}" ]; then continue fi @@ -275,7 +275,8 @@ check_shared_storage() { if [ "$*" = "" ] ; then SITES_FILE="${SITES_FILE:-${NGCPCTL_MAIN}/sites.yml}" - config_files="${NGCPCTL_CONFIG:-} ${NODE_CONFIG:-} ${PAIR_CONFIG:-} ${HOST_CONFIG:-} ${LOCAL_CONFIG:-} ${NETWORK_CONFIG:-} ${EXTRA_CONFIG_FILES[*]} ${CONSTANTS_CONFIG:-} ${SITES_FILE:-}" + INSTANCES_FILE="${INSTANCES_FILE:-${NGCPCTL_MAIN}/instances.yml}" + config_files="${NGCPCTL_CONFIG:-} ${NODE_CONFIG:-} ${PAIR_CONFIG:-} ${HOST_CONFIG:-} ${LOCAL_CONFIG:-} ${NETWORK_CONFIG:-} ${EXTRA_CONFIG_FILES[*]} ${CONSTANTS_CONFIG:-} ${SITES_FILE:-} ${INSTANCES_FILE:-}" else config_files="$*" fi