diff --git a/hot/software-config/elements/README.rst b/hot/software-config/elements/README.rst index db803406..7fe09a43 100644 --- a/hot/software-config/elements/README.rst +++ b/hot/software-config/elements/README.rst @@ -2,6 +2,11 @@ Software configuration hooks ============================ +.. warning:: + All hooks (heat agents) in heat-templates repository are deprecated, + please use hooks in `heat-agents https://git.openstack.org/cgit/openstack/heat-agents` instead. + Here is document entry for heat-agents: `https://docs.openstack.org/heat-agents/latest/` + This directory contains `diskimage-builder `_ elements to build an image which contains the software configuration hook required to use your preferred configuration method. diff --git a/hot/software-config/elements/heat-config-ansible/install.d/hook-ansible.py b/hot/software-config/elements/heat-config-ansible/install.d/hook-ansible.py index 426ee544..b07d1828 100755 --- a/hot/software-config/elements/heat-config-ansible/install.d/hook-ansible.py +++ b/hot/software-config/elements/heat-config-ansible/install.d/hook-ansible.py @@ -17,6 +17,7 @@ import logging import os import subprocess import sys +import warnings WORKING_DIR = os.environ.get('HEAT_ANSIBLE_WORKING', '/var/lib/heat-config/heat-config-ansible') @@ -32,6 +33,9 @@ def prepare_dir(path): def main(argv=sys.argv): + warnings.warn('This hook is deprecated, please use hooks from heat-agents ' + 'repository instead.', DeprecationWarning) + log = logging.getLogger('heat-config') handler = logging.StreamHandler(sys.stderr) handler.setFormatter( diff --git a/hot/software-config/elements/heat-config-apply-config/install.d/hook-apply-config.py b/hot/software-config/elements/heat-config-apply-config/install.d/hook-apply-config.py index df29cb29..a48209da 100755 --- a/hot/software-config/elements/heat-config-apply-config/install.d/hook-apply-config.py +++ b/hot/software-config/elements/heat-config-apply-config/install.d/hook-apply-config.py @@ -17,11 +17,14 @@ import logging import os import subprocess import sys +import warnings APPLY_CONFIG_CMD = os.environ.get('HEAT_APPLY_CONFIG_CMD', 'os-apply-config') def main(argv=sys.argv): + warnings.warn('This hook is deprecated, please use hooks from heat-agents ' + 'repository instead.', DeprecationWarning) log = logging.getLogger('heat-config') handler = logging.StreamHandler(sys.stderr) handler.setFormatter( diff --git a/hot/software-config/elements/heat-config-cfn-init/install.d/hook-cfn-init.py b/hot/software-config/elements/heat-config-cfn-init/install.d/hook-cfn-init.py index f5d859c7..bcbafc9b 100755 --- a/hot/software-config/elements/heat-config-cfn-init/install.d/hook-cfn-init.py +++ b/hot/software-config/elements/heat-config-cfn-init/install.d/hook-cfn-init.py @@ -17,6 +17,7 @@ import logging import os import subprocess import sys +import warnings # Ideally this path would be /var/lib/heat-cfntools/cfn-init-data @@ -30,6 +31,9 @@ CFN_INIT_CMD = os.environ.get('HEAT_CFN_INIT_CMD', def main(argv=sys.argv, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr): + warnings.warn('This hook is deprecated, please use hooks from heat-agents ' + 'repository instead.', DeprecationWarning) + log = logging.getLogger('heat-config') handler = logging.StreamHandler(stderr) handler.setFormatter( diff --git a/hot/software-config/elements/heat-config-chef/install.d/hook-chef.py b/hot/software-config/elements/heat-config-chef/install.d/hook-chef.py index 3a4d8105..f1429822 100755 --- a/hot/software-config/elements/heat-config-chef/install.d/hook-chef.py +++ b/hot/software-config/elements/heat-config-chef/install.d/hook-chef.py @@ -19,6 +19,7 @@ import shutil import six import subprocess import sys +import warnings DEPLOY_KEYS = ("deploy_server_id", "deploy_action", @@ -59,6 +60,9 @@ def run_subproc(fn, **kwargs): def main(argv=sys.argv): + warnings.warn('This hook is deprecated, please use hooks from heat-agents ' + 'repository instead.', DeprecationWarning) + log = logging.getLogger('heat-config') handler = logging.StreamHandler(sys.stderr) handler.setFormatter( diff --git a/hot/software-config/elements/heat-config-docker-cmd/install.d/hook-docker-cmd.py b/hot/software-config/elements/heat-config-docker-cmd/install.d/hook-docker-cmd.py index 8e9e89fd..c30f7beb 100755 --- a/hot/software-config/elements/heat-config-docker-cmd/install.d/hook-docker-cmd.py +++ b/hot/software-config/elements/heat-config-docker-cmd/install.d/hook-docker-cmd.py @@ -18,6 +18,7 @@ import os import six import subprocess import sys +import warnings import yaml @@ -52,6 +53,9 @@ def docker_arg_map(key, value): def main(argv=sys.argv): + warnings.warn('This hook is deprecated, please use hooks from heat-agents ' + 'repository instead.', DeprecationWarning) + global log log = logging.getLogger('heat-config') handler = logging.StreamHandler(sys.stderr) diff --git a/hot/software-config/elements/heat-config-docker-compose/install.d/hook-docker-compose.py b/hot/software-config/elements/heat-config-docker-compose/install.d/hook-docker-compose.py index 0ccd51a4..9afefdac 100755 --- a/hot/software-config/elements/heat-config-docker-compose/install.d/hook-docker-compose.py +++ b/hot/software-config/elements/heat-config-docker-compose/install.d/hook-docker-compose.py @@ -20,6 +20,7 @@ import os import six import subprocess import sys +import warnings import yaml @@ -51,6 +52,8 @@ def build_response(deploy_stdout, deploy_stderr, deploy_status_code): def main(argv=sys.argv): + warnings.warn('This hook is deprecated, please use hooks from heat-agents ' + 'repository instead.', DeprecationWarning) log = logging.getLogger('heat-config') handler = logging.StreamHandler(sys.stderr) handler.setFormatter( diff --git a/hot/software-config/elements/heat-config-hiera/install.d/hook-hiera.py b/hot/software-config/elements/heat-config-hiera/install.d/hook-hiera.py index d8b90596..4886934f 100755 --- a/hot/software-config/elements/heat-config-hiera/install.d/hook-hiera.py +++ b/hot/software-config/elements/heat-config-hiera/install.d/hook-hiera.py @@ -16,6 +16,7 @@ import json import logging import os import sys +import warnings HIERA_DATADIR = os.environ.get('HEAT_PUPPET_HIERA_DATADIR', @@ -38,6 +39,9 @@ def prepare_dir(path): def main(argv=sys.argv): + warnings.warn('This hook is deprecated, please use hooks from heat-agents ' + 'repository instead.', DeprecationWarning) + log = logging.getLogger('heat-config') handler = logging.StreamHandler(sys.stderr) handler.setFormatter( diff --git a/hot/software-config/elements/heat-config-json-file/install.d/hook-json-file.py b/hot/software-config/elements/heat-config-json-file/install.d/hook-json-file.py index 57c9a792..6679735a 100755 --- a/hot/software-config/elements/heat-config-json-file/install.d/hook-json-file.py +++ b/hot/software-config/elements/heat-config-json-file/install.d/hook-json-file.py @@ -16,6 +16,7 @@ import json import logging import os import sys +import warnings def prepare_dir(path): @@ -24,6 +25,8 @@ def prepare_dir(path): def main(argv=sys.argv): + warnings.warn('This hook is deprecated, please use hooks from heat-agents ' + 'repository instead.', DeprecationWarning) log = logging.getLogger('heat-config') handler = logging.StreamHandler(sys.stderr) handler.setFormatter( diff --git a/hot/software-config/elements/heat-config-kubelet/install.d/hook-kubelet.py b/hot/software-config/elements/heat-config-kubelet/install.d/hook-kubelet.py index eee08c1c..6ef747af 100755 --- a/hot/software-config/elements/heat-config-kubelet/install.d/hook-kubelet.py +++ b/hot/software-config/elements/heat-config-kubelet/install.d/hook-kubelet.py @@ -20,6 +20,7 @@ import re import six import sys import time +import warnings try: import docker @@ -165,6 +166,9 @@ def wait_required_containers(client, log, def main(argv=sys.argv, sys_stdin=sys.stdin, sys_stdout=sys.stdout): + warnings.warn('This hook is deprecated, please use hooks from heat-agents ' + 'repository instead.', DeprecationWarning) + (log, deploy_stdout, deploy_stderr) = configure_logging() client = get_client(log) diff --git a/hot/software-config/elements/heat-config-puppet/install.d/hook-puppet.py b/hot/software-config/elements/heat-config-puppet/install.d/hook-puppet.py index 02b867ad..29a6b63f 100755 --- a/hot/software-config/elements/heat-config-puppet/install.d/hook-puppet.py +++ b/hot/software-config/elements/heat-config-puppet/install.d/hook-puppet.py @@ -18,6 +18,7 @@ import os import re import subprocess import sys +import warnings WORKING_DIR = os.environ.get('HEAT_PUPPET_WORKING', @@ -48,6 +49,8 @@ def get_hostname_f(log): def main(argv=sys.argv): + warnings.warn('This hook is deprecated, please use hooks from heat-agents ' + 'repository instead.', DeprecationWarning) log = logging.getLogger('heat-config') handler = logging.StreamHandler(sys.stderr) handler.setFormatter( diff --git a/hot/software-config/elements/heat-config-salt/install.d/hook-salt.py b/hot/software-config/elements/heat-config-salt/install.d/hook-salt.py index 8c837d4a..a2b34070 100755 --- a/hot/software-config/elements/heat-config-salt/install.d/hook-salt.py +++ b/hot/software-config/elements/heat-config-salt/install.d/hook-salt.py @@ -20,6 +20,7 @@ import sys import salt.cli.caller import salt.config from salt import exceptions +import warnings import yaml @@ -35,6 +36,9 @@ def prepare_dir(path): def main(argv=sys.argv): + warnings.warn('This hook is deprecated, please use hooks from heat-agents ' + 'repository instead.', DeprecationWarning) + log = logging.getLogger('heat-config') handler = logging.StreamHandler(sys.stderr) handler.setFormatter( diff --git a/hot/software-config/elements/heat-config-script/install.d/hook-script.py b/hot/software-config/elements/heat-config-script/install.d/hook-script.py index 5c9cb4dc..064aef54 100755 --- a/hot/software-config/elements/heat-config-script/install.d/hook-script.py +++ b/hot/software-config/elements/heat-config-script/install.d/hook-script.py @@ -17,6 +17,7 @@ import logging import os import subprocess import sys +import warnings WORKING_DIR = os.environ.get('HEAT_SCRIPT_WORKING', '/var/lib/heat-config/heat-config-script') @@ -30,6 +31,8 @@ def prepare_dir(path): def main(argv=sys.argv): + warnings.warn('This hook is deprecated, please use hooks from heat-agents ' + 'repository instead.', DeprecationWarning) log = logging.getLogger('heat-config') handler = logging.StreamHandler(sys.stderr) handler.setFormatter(