summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-05-10 13:01:59 +0000
committerGerrit Code Review <review@openstack.org>2018-05-10 13:01:59 +0000
commit6b5a7cd2b5fddcee647dbc38d8b9100384157d05 (patch)
tree21ab08f44301e8a1aec19dcd57298c57ee792803
parent28ab0afaa557d4814f1406db4a097fbbc5037550 (diff)
parent20fb0efa112e64ed3c601b0b4e5853dc2c3c6891 (diff)
downloadheat-templates-6b5a7cd2b5fddcee647dbc38d8b9100384157d05.tar.gz
Merge "Deprecate hooks in heat-templates"
-rw-r--r--hot/software-config/elements/README.rst5
-rwxr-xr-xhot/software-config/elements/heat-config-ansible/install.d/hook-ansible.py4
-rwxr-xr-xhot/software-config/elements/heat-config-apply-config/install.d/hook-apply-config.py3
-rwxr-xr-xhot/software-config/elements/heat-config-cfn-init/install.d/hook-cfn-init.py4
-rwxr-xr-xhot/software-config/elements/heat-config-chef/install.d/hook-chef.py4
-rwxr-xr-xhot/software-config/elements/heat-config-docker-cmd/install.d/hook-docker-cmd.py4
-rwxr-xr-xhot/software-config/elements/heat-config-docker-compose/install.d/hook-docker-compose.py3
-rwxr-xr-xhot/software-config/elements/heat-config-hiera/install.d/hook-hiera.py4
-rwxr-xr-xhot/software-config/elements/heat-config-json-file/install.d/hook-json-file.py3
-rwxr-xr-xhot/software-config/elements/heat-config-kubelet/install.d/hook-kubelet.py4
-rwxr-xr-xhot/software-config/elements/heat-config-puppet/install.d/hook-puppet.py3
-rwxr-xr-xhot/software-config/elements/heat-config-salt/install.d/hook-salt.py4
-rwxr-xr-xhot/software-config/elements/heat-config-script/install.d/hook-script.py3
13 files changed, 48 insertions, 0 deletions
diff --git a/hot/software-config/elements/README.rst b/hot/software-config/elements/README.rst
index db80340..7fe09a4 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 <https://github.com/openstack/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 426ee54..b07d182 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 df29cb2..a48209d 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 f5d859c..bcbafc9 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 3a4d810..f142982 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 8e9e89f..c30f7be 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 0ccd51a..9afefda 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 d8b9059..4886934 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 57c9a79..6679735 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 eee08c1..6ef747a 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 02b867a..29a6b63 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 8c837d4..a2b3407 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 5c9cb4d..064aef5 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(