From 87c76e8d7ab44d6a1966c63c87250987ee28ff96 Mon Sep 17 00:00:00 2001 From: James Slagle Date: Mon, 16 Apr 2018 11:53:55 -0400 Subject: [PATCH] Fail validation on new workflow_tasks Adds a new validation to check role_data for workflow_tasks. If found, the validation will fail. Existing templates with workflow_tasks are excluded for now until they are fully migrated to external_deploy_tasks. Depends-On: I0cf206e8ceeecfca17dd99a83b8c2eaa50e66712 Change-Id: I830a5cda660f5f73ca3a98f4a886abce6989daf0 implements: blueprint deprecate-workflow-tasks --- tools/yaml-validate.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py index 5b64f56056..f3ef8ea7a1 100755 --- a/tools/yaml-validate.py +++ b/tools/yaml-validate.py @@ -168,6 +168,22 @@ DEPLOYMENT_RESOURCE_TYPES = [ ] VALID_ANSIBLE_UPGRADE_TAGS = [ 'common', 'validation', 'pre-upgrade' ] +WORKFLOW_TASKS_EXCLUSIONS = [ + './docker/services/octavia/octavia-deployment-config.yaml', + './docker/services/ceph-ansible/ceph-external.yaml', + './docker/services/ceph-ansible/ceph-osd.yaml', + './docker/services/ceph-ansible/ceph-rbdmirror.yaml', + './docker/services/ceph-ansible/ceph-client.yaml', + './docker/services/ceph-ansible/ceph-mds.yaml', + './docker/services/ceph-ansible/ceph-rgw.yaml', + './docker/services/ceph-ansible/ceph-base.yaml', + './docker/services/ceph-ansible/ceph-mon.yaml', + './docker/services/ceph-ansible/ceph-mgr.yaml', + './docker/services/skydive/skydive-base.yaml', + './docker/services/skydive/skydive-agent.yaml', + './docker/services/skydive/skydive-analyzer.yaml', +] + def exit_usage(): print('Usage %s ' % sys.argv[0]) @@ -533,6 +549,12 @@ def validate_docker_service(filename, tpl): print('ERROR: fast_forward_post_upgrade_tasks validation failed') return 1 + if 'workflow_tasks' in role_data and \ + filename not in WORKFLOW_TASKS_EXCLUSIONS: + print('ERROR: workflow_tasks are no longer supported ' + 'with config-download in %s.' % filename) + return 1 + if 'parameters' in tpl: for param in required_params: if param not in tpl['parameters']: