aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorMichal Nasiadka <mnasiadka@gmail.com>2020-06-03 15:18:50 +0200
committerMichal Nasiadka <mnasiadka@gmail.com>2020-06-03 16:45:15 +0200
commit231ef23ce1125dbe17cc2568d143c0d7da2c2141 (patch)
tree64ffab48d33951741c7c0495a8ee1cd31c2d1083 /docker
parentfa5abde6c60c92b6996f051095a0a9cbd08d8227 (diff)
downloadkolla-231ef23ce1125dbe17cc2568d143c0d7da2c2141.tar.gz
kolla-231ef23ce1125dbe17cc2568d143c0d7da2c2141.zip
Remove shade and kolla_sanity.py from kolla-toolbox
Shade is deprecated long time, and only kolla_sanity.py utilised by k-a swift role is using that. Closes-Bug: #1760517 Depends-On: https://review.opendev.org/733143 Change-Id: Ie2e17bba37494b320986c17b30b15b62dd71ba22
Diffstat (limited to 'docker')
-rw-r--r--docker/kolla-toolbox/Dockerfile.j24
-rw-r--r--docker/kolla-toolbox/kolla_sanity.py64
2 files changed, 1 insertions, 67 deletions
diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/docker/kolla-toolbox/Dockerfile.j2
index 08ac79024..97408922d 100644
--- a/docker/kolla-toolbox/Dockerfile.j2
+++ b/docker/kolla-toolbox/Dockerfile.j2
@@ -79,7 +79,6 @@ ENV PATH {{ virtualenv_path }}/bin:$PATH
'python-openstackclient',
'pytz',
'pyudev',
- 'shade'
] %}
RUN mkdir -p /requirements \
@@ -91,10 +90,9 @@ RUN mkdir -p /requirements \
ENV ANSIBLE_LIBRARY /usr/share/ansible:$ANSIBLE_LIBRARY
-COPY find_disks.py kolla_sanity.py /usr/share/ansible/
+COPY find_disks.py /usr/share/ansible/
COPY ansible.cfg /var/lib/ansible/.ansible.cfg
RUN chmod 644 /usr/share/ansible/find_disks.py \
- /usr/share/ansible/kolla_sanity.py \
/var/lib/ansible/.ansible.cfg
COPY ansible_sudoers /etc/sudoers.d/kolla_ansible_sudoers
diff --git a/docker/kolla-toolbox/kolla_sanity.py b/docker/kolla-toolbox/kolla_sanity.py
deleted file mode 100644
index 4de0026b8..000000000
--- a/docker/kolla-toolbox/kolla_sanity.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/python
-
-# Copyright 2015 Intel corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This file is a barebones file needed to file a gap until Ansible 2.0. No
-# error checking, no deletions, no updates. Idempotent creation only.
-
-# If you look closely, you will see we arent _really_ using the shade module
-# we just use it to slightly abstract the authentication model. As patches land
-# in upstream shade we will be able to use more of the shade module. Until then
-# if we want to be 'stable' we really need to be using it as a passthrough
-
-import traceback
-
-import shade
-
-from ansible.module_utils.basic import AnsibleModule
-from ansible.module_utils.openstack import openstack_full_argument_spec
-
-
-class SanityChecks(object):
- # TODO(pbourke): remove and replace with direct call to os_object
- @staticmethod
- def swift(cloud):
- [container for container in cloud.swift_client.list()]
-
-
-def main():
- module = AnsibleModule(
- argument_spec=openstack_full_argument_spec(
- password=dict(required=True, type='str'),
- project=dict(required=True, type='str'),
- role=dict(required=True, type='str'),
- user=dict(required=True, type='str'),
- service=dict(required=True, type='str'),
- )
- )
-
- try:
- changed = True
- cloud = shade.operator_cloud(**module.params)
-
- getattr(SanityChecks, module.params.pop("service"))(cloud)
-
- module.exit_json(changed=changed)
- except Exception:
- module.exit_json(failed=True, changed=True,
- msg=repr(traceback.format_exc()))
-
-
-if __name__ == '__main__':
- main()