From 4e7a57c5077bcab789a72acce55cdcbf6953113c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miles=20St=C3=B6tzner?= Date: Thu, 12 Sep 2024 00:09:29 +0200 Subject: [PATCH] minor (#407) --- .../scripts/deploy.sh | 2 +- .../scripts/implement.sh | 2 +- .../scripts/quality.sh | 2 +- .../scripts/implement.sh | 2 +- src/assets/templates/template-init/scripts/implement.sh | 2 +- src/assets/templates/template-init/scripts/quality.sh | 2 +- src/cli/program.ts | 8 +++----- src/controller/template/implement.ts | 6 ------ src/controller/template/quality.ts | 2 -- src/controller/utils/normative.ts | 6 +++--- 10 files changed, 12 insertions(+), 22 deletions(-) diff --git a/examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/deploy.sh b/examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/deploy.sh index 00aaf273b2..cee5d2e516 100755 --- a/examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/deploy.sh +++ b/examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/deploy.sh @@ -8,7 +8,7 @@ cd "$(dirname "$0")" source configuration.sh $VINTNER template pull --dir ${TEMPLATE_DIR} -$VINTNER template implement --dir ${TEMPLATE_DIR} --experimental +$VINTNER template implement --dir ${TEMPLATE_DIR} $VINTNER templates import --template ${TEMPLATE_NAME} --path ${TEMPLATE_DIR} $VINTNER instances init --instance ${TEMPLATE_NAME} --template ${TEMPLATE_NAME} $VINTNER instances resolve --instance ${TEMPLATE_NAME} --inputs ${TEMPLATE_DIR}/tests/${VARIANT}/inputs.yaml diff --git a/examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/implement.sh b/examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/implement.sh index 0ac779ce2c..9c237945e2 100755 --- a/examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/implement.sh +++ b/examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/implement.sh @@ -5,4 +5,4 @@ set -e source configuration.sh # Implement types -$VINTNER template implement --dir ${TEMPLATE_DIR} --experimental +$VINTNER template implement --dir ${TEMPLATE_DIR} diff --git a/examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/quality.sh b/examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/quality.sh index 640d86d97d..9981978956 100755 --- a/examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/quality.sh +++ b/examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/quality.sh @@ -9,5 +9,5 @@ source configuration.sh for dir in "../tests/gcp"; do dir=$(basename $dir) - echo "${dir}: $($VINTNER template quality --template ${TEMPLATE_DIR}/variable-service-template.yaml --experimental --inputs ${TEMPLATE_DIR}/tests/${dir}/inputs.yaml)" + echo "${dir}: $($VINTNER template quality --template ${TEMPLATE_DIR}/variable-service-template.yaml --inputs ${TEMPLATE_DIR}/tests/${dir}/inputs.yaml)" done diff --git a/examples/unfurl-technology---shop---plus-maintenance-automated/scripts/implement.sh b/examples/unfurl-technology---shop---plus-maintenance-automated/scripts/implement.sh index 0ac779ce2c..9c237945e2 100755 --- a/examples/unfurl-technology---shop---plus-maintenance-automated/scripts/implement.sh +++ b/examples/unfurl-technology---shop---plus-maintenance-automated/scripts/implement.sh @@ -5,4 +5,4 @@ set -e source configuration.sh # Implement types -$VINTNER template implement --dir ${TEMPLATE_DIR} --experimental +$VINTNER template implement --dir ${TEMPLATE_DIR} diff --git a/src/assets/templates/template-init/scripts/implement.sh b/src/assets/templates/template-init/scripts/implement.sh index 0ac779ce2c..9c237945e2 100644 --- a/src/assets/templates/template-init/scripts/implement.sh +++ b/src/assets/templates/template-init/scripts/implement.sh @@ -5,4 +5,4 @@ set -e source configuration.sh # Implement types -$VINTNER template implement --dir ${TEMPLATE_DIR} --experimental +$VINTNER template implement --dir ${TEMPLATE_DIR} diff --git a/src/assets/templates/template-init/scripts/quality.sh b/src/assets/templates/template-init/scripts/quality.sh index 439e70c00a..73ed9a68c2 100644 --- a/src/assets/templates/template-init/scripts/quality.sh +++ b/src/assets/templates/template-init/scripts/quality.sh @@ -8,5 +8,5 @@ source configuration.sh for dir in ../tests/*/; do dir=$(basename $dir) - echo "${dir}: $($VINTNER template quality --template ${TEMPLATE_DIR}/variable-service-template.yaml --experimental --inputs ${TEMPLATE_DIR}/tests/${dir}/inputs.yaml)" + echo "${dir}: $($VINTNER template quality --template ${TEMPLATE_DIR}/variable-service-template.yaml --inputs ${TEMPLATE_DIR}/tests/${dir}/inputs.yaml)" done \ No newline at end of file diff --git a/src/cli/program.ts b/src/cli/program.ts index ce9e7b16ae..a1bb8c3829 100644 --- a/src/cli/program.ts +++ b/src/cli/program.ts @@ -488,8 +488,7 @@ template template .command('quality') - .description('get quality of template (experimental)') - .requiredOption('--experimental', 'enable experimental feature') + .description('get quality of template') .requiredOption('--template ', 'path to service template') .option('--presets [string...]', 'names of variability presets(env: OPENTOSCA_VINTNER_VARIABILITY_PRESETS)', []) .option( @@ -516,7 +515,6 @@ template .command('implement') .description('implement node types') .requiredOption('--dir ', 'path to service template directory') - .requiredOption('--experimental', 'enable experimental feature') .option('--orchestrator [string]', 'the orchestrator for which node type should be implemented', 'unfurl') .action( hae.exit(async options => { @@ -1127,8 +1125,8 @@ utils .option('--no-profile [boolean]') .option('--base [boolean]', 'include base types', true) .option('--no-base [boolean]') - .option('--specific [boolean]', 'include specific types', true) - .option('--no-specific [boolean]') + .option('--extended [boolean]', 'include extended types', true) + .option('--no-extended [boolean]') .addOption(new Option('--format [string]', 'output format').default('yaml').choices(['yaml', 'json'])) .action( hae.exit(async options => { diff --git a/src/controller/template/implement.ts b/src/controller/template/implement.ts index 4a9281a646..9a62a4ae48 100644 --- a/src/controller/template/implement.ts +++ b/src/controller/template/implement.ts @@ -26,15 +26,9 @@ import path from 'path' export type TemplateImplementOptions = { dir: string orchestrator: string - experimental: string } export default async function (options: TemplateImplementOptions) { - /** - * Experimental - */ - assert.isTrue(options.experimental) - /** * Orchestrator */ diff --git a/src/controller/template/quality.ts b/src/controller/template/quality.ts index 4f4b7b0615..efeade716b 100644 --- a/src/controller/template/quality.ts +++ b/src/controller/template/quality.ts @@ -7,12 +7,10 @@ export type TemplateQualityOptions = { template: string presets?: string[] inputs?: string - experimental: boolean } export default async function (options: TemplateQualityOptions) { assert.isDefined(options.template, 'Template not defined') - assert.isTrue(options.experimental) /** * Note, checker does not run on these results! diff --git a/src/controller/utils/normative.ts b/src/controller/utils/normative.ts index e60aff29c3..24c7020343 100644 --- a/src/controller/utils/normative.ts +++ b/src/controller/utils/normative.ts @@ -7,7 +7,7 @@ export type NormativeOptions = { format?: string profile?: boolean base?: boolean - specific?: boolean + extended?: boolean } export default async function (options: NormativeOptions) { @@ -16,7 +16,7 @@ export default async function (options: NormativeOptions) { */ options.format = options.format ?? 'yaml' options.base = options.base ?? true - options.specific = options.specific ?? true + options.extended = options.extended ?? true /** * Normative types @@ -29,7 +29,7 @@ export default async function (options: NormativeOptions) { const types = [] if (options.profile) types.push(normative.profile.template) if (options.base) types.push(normative.core.template) - if (options.specific) types.push(normative.extended.template) + if (options.extended) types.push(normative.extended.template) /** * Simplify