Browse Source

Stop to use the __future__ module.

The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I088f435bfc0dfeb67b4b2c3400aaa08eb41d7c59
changes/63/732963/1
Hervé Beraud 1 month ago
parent
commit
c09f624891
35 changed files with 0 additions and 102 deletions
  1. +0
    -2
      tripleo_ansible/ansible_plugins/action/tripleo_nova_image_cache.py
  2. +0
    -2
      tripleo_ansible/ansible_plugins/callback/tripleo.py
  3. +0
    -1
      tripleo_ansible/ansible_plugins/callback/tripleo_dense.py
  4. +0
    -1
      tripleo_ansible/ansible_plugins/callback/tripleo_profile_tasks.py
  5. +0
    -4
      tripleo_ansible/ansible_plugins/modules/baremetal_nodes_validate.py
  6. +0
    -4
      tripleo_ansible/ansible_plugins/modules/baremetal_register_or_update_nodes.py
  7. +0
    -2
      tripleo_ansible/ansible_plugins/modules/container_config_data.py
  8. +0
    -2
      tripleo_ansible/ansible_plugins/modules/container_puppet_config.py
  9. +0
    -2
      tripleo_ansible/ansible_plugins/modules/metalsmith_instances.py
  10. +0
    -4
      tripleo_ansible/ansible_plugins/modules/os_baremetal_clean_node.py
  11. +0
    -4
      tripleo_ansible/ansible_plugins/modules/os_baremetal_node_info.py
  12. +0
    -4
      tripleo_ansible/ansible_plugins/modules/os_baremetal_provide_node.py
  13. +0
    -4
      tripleo_ansible/ansible_plugins/modules/os_tripleo_baremetal_node_introspection.py
  14. +0
    -4
      tripleo_ansible/ansible_plugins/modules/paunch.py
  15. +0
    -2
      tripleo_ansible/ansible_plugins/modules/podman_container.py
  16. +0
    -2
      tripleo_ansible/ansible_plugins/modules/podman_container_info.py
  17. +0
    -2
      tripleo_ansible/ansible_plugins/modules/podman_volume_info.py
  18. +0
    -2
      tripleo_ansible/ansible_plugins/modules/tripleo_baremetal_check_existing.py
  19. +0
    -2
      tripleo_ansible/ansible_plugins/modules/tripleo_baremetal_expand_roles.py
  20. +0
    -2
      tripleo_ansible/ansible_plugins/modules/tripleo_baremetal_populate_environment.py
  21. +0
    -4
      tripleo_ansible/ansible_plugins/modules/tripleo_config_download.py
  22. +0
    -4
      tripleo_ansible/ansible_plugins/modules/tripleo_fernet_keys_rotate.py
  23. +0
    -4
      tripleo_ansible/ansible_plugins/modules/tripleo_generate_ansible_inventory.py
  24. +0
    -4
      tripleo_ansible/ansible_plugins/modules/tripleo_generate_overcloudrc.py
  25. +0
    -4
      tripleo_ansible/ansible_plugins/modules/tripleo_image_params_prepare.py
  26. +0
    -2
      tripleo_ansible/ansible_plugins/modules/tripleo_nova_image_cache.py
  27. +0
    -4
      tripleo_ansible/ansible_plugins/modules/tripleo_passwords_rotate.py
  28. +0
    -4
      tripleo_ansible/ansible_plugins/modules/tripleo_plan_deploy.py
  29. +0
    -4
      tripleo_ansible/ansible_plugins/modules/tripleo_plan_parameters_update.py
  30. +0
    -4
      tripleo_ansible/ansible_plugins/modules/tripleo_swift_tempurl.py
  31. +0
    -4
      tripleo_ansible/ansible_plugins/modules/tripleo_templates_upload.py
  32. +0
    -2
      tripleo_ansible/ansible_plugins/strategy/tripleo_base.py
  33. +0
    -2
      tripleo_ansible/ansible_plugins/strategy/tripleo_free.py
  34. +0
    -2
      tripleo_ansible/ansible_plugins/strategy/tripleo_linear.py
  35. +0
    -2
      tripleo_ansible/roles/tripleo_ovs_dpdk/library/openvswitch_db.py

+ 0
- 2
tripleo_ansible/ansible_plugins/action/tripleo_nova_image_cache.py View File

@@ -13,8 +13,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
__metaclass__ = type

import hashlib


+ 0
- 2
tripleo_ansible/ansible_plugins/callback/tripleo.py View File

@@ -12,8 +12,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

from ansible import constants as C


+ 0
- 1
tripleo_ansible/ansible_plugins/callback/tripleo_dense.py View File

@@ -1,4 +1,3 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

import uuid


+ 0
- 1
tripleo_ansible/ansible_plugins/callback/tripleo_profile_tasks.py View File

@@ -1,4 +1,3 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

import time


+ 0
- 4
tripleo_ansible/ansible_plugins/modules/baremetal_nodes_validate.py View File

@@ -15,10 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from ansible.module_utils.basic import AnsibleModule

from tripleo_common import exception


+ 0
- 4
tripleo_ansible/ansible_plugins/modules/baremetal_register_or_update_nodes.py View File

@@ -15,10 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import yaml

from ansible.module_utils import tripleo_common_utils as tc


+ 0
- 2
tripleo_ansible/ansible_plugins/modules/container_config_data.py View File

@@ -14,8 +14,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import, division, print_function
__metaclass__ = type

from ansible.module_utils.basic import AnsibleModule


+ 0
- 2
tripleo_ansible/ansible_plugins/modules/container_puppet_config.py View File

@@ -14,8 +14,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import, division, print_function
__metaclass__ = type

from ansible.module_utils.basic import AnsibleModule


+ 0
- 2
tripleo_ansible/ansible_plugins/modules/metalsmith_instances.py View File

@@ -13,8 +13,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
__metaclass__ = type

from concurrent import futures


+ 0
- 4
tripleo_ansible/ansible_plugins/modules/os_baremetal_clean_node.py View File

@@ -15,10 +15,6 @@
# under the License.

# flake8: noqa: E501

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__metaclass__ = type




+ 0
- 4
tripleo_ansible/ansible_plugins/modules/os_baremetal_node_info.py View File

@@ -15,10 +15,6 @@
# under the License.

# flake8: noqa: E501

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__metaclass__ = type




+ 0
- 4
tripleo_ansible/ansible_plugins/modules/os_baremetal_provide_node.py View File

@@ -15,10 +15,6 @@
# under the License.

# flake8: noqa: E501

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__metaclass__ = type




+ 0
- 4
tripleo_ansible/ansible_plugins/modules/os_tripleo_baremetal_node_introspection.py View File

@@ -13,10 +13,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__metaclass__ = type

ANSIBLE_METADATA = {'metadata_version': '1.1',


+ 0
- 4
tripleo_ansible/ansible_plugins/modules/paunch.py View File

@@ -12,10 +12,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__metaclass__ = type

from ansible.module_utils.basic import AnsibleModule


+ 0
- 2
tripleo_ansible/ansible_plugins/modules/podman_container.py View File

@@ -16,8 +16,6 @@

# flake8: noqa: E501

from __future__ import absolute_import, division, print_function

__metaclass__ = type

import json


+ 0
- 2
tripleo_ansible/ansible_plugins/modules/podman_container_info.py View File

@@ -12,8 +12,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import, division, print_function
__metaclass__ = type




+ 0
- 2
tripleo_ansible/ansible_plugins/modules/podman_volume_info.py View File

@@ -14,8 +14,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import, division, print_function
__metaclass__ = type

ANSIBLE_METADATA = {


+ 0
- 2
tripleo_ansible/ansible_plugins/modules/tripleo_baremetal_check_existing.py View File

@@ -13,8 +13,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
__metaclass__ = type

from ansible.module_utils import baremetal_deploy as bd


+ 0
- 2
tripleo_ansible/ansible_plugins/modules/tripleo_baremetal_expand_roles.py View File

@@ -13,8 +13,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
__metaclass__ = type

from ansible.module_utils import baremetal_deploy as bd


+ 0
- 2
tripleo_ansible/ansible_plugins/modules/tripleo_baremetal_populate_environment.py View File

@@ -13,8 +13,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
__metaclass__ = type

from ansible.module_utils import baremetal_deploy as bd


+ 0
- 4
tripleo_ansible/ansible_plugins/modules/tripleo_config_download.py View File

@@ -15,10 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import yaml

from ansible.module_utils import tripleo_common_utils as tc


+ 0
- 4
tripleo_ansible/ansible_plugins/modules/tripleo_fernet_keys_rotate.py View File

@@ -15,10 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import yaml

from ansible.module_utils import tripleo_common_utils as tc


+ 0
- 4
tripleo_ansible/ansible_plugins/modules/tripleo_generate_ansible_inventory.py View File

@@ -15,10 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import yaml

from ansible.module_utils import tripleo_common_utils as tc


+ 0
- 4
tripleo_ansible/ansible_plugins/modules/tripleo_generate_overcloudrc.py View File

@@ -15,10 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import yaml

from ansible.module_utils import tripleo_common_utils as tc


+ 0
- 4
tripleo_ansible/ansible_plugins/modules/tripleo_image_params_prepare.py View File

@@ -15,10 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import yaml

from ansible.module_utils import tripleo_common_utils as tc


+ 0
- 2
tripleo_ansible/ansible_plugins/modules/tripleo_nova_image_cache.py View File

@@ -13,8 +13,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
__metaclass__ = type

from ansible.module_utils.basic import AnsibleModule


+ 0
- 4
tripleo_ansible/ansible_plugins/modules/tripleo_passwords_rotate.py View File

@@ -15,10 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import yaml

from ansible.module_utils import tripleo_common_utils as tc


+ 0
- 4
tripleo_ansible/ansible_plugins/modules/tripleo_plan_deploy.py View File

@@ -15,10 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import yaml

from ansible.module_utils import tripleo_common_utils as tc


+ 0
- 4
tripleo_ansible/ansible_plugins/modules/tripleo_plan_parameters_update.py View File

@@ -15,10 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import yaml

from ansible.module_utils import tripleo_common_utils as tc


+ 0
- 4
tripleo_ansible/ansible_plugins/modules/tripleo_swift_tempurl.py View File

@@ -15,10 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import yaml

from ansible.module_utils import tripleo_common_utils as tc


+ 0
- 4
tripleo_ansible/ansible_plugins/modules/tripleo_templates_upload.py View File

@@ -15,10 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import yaml

from ansible.module_utils import tripleo_common_utils as tc


+ 0
- 2
tripleo_ansible/ansible_plugins/strategy/tripleo_base.py View File

@@ -12,8 +12,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

from ansible.errors import AnsibleError


+ 0
- 2
tripleo_ansible/ansible_plugins/strategy/tripleo_free.py View File

@@ -12,8 +12,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

import os


+ 0
- 2
tripleo_ansible/ansible_plugins/strategy/tripleo_linear.py View File

@@ -12,8 +12,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

import os


+ 0
- 2
tripleo_ansible/roles/tripleo_ovs_dpdk/library/openvswitch_db.py View File

@@ -5,8 +5,6 @@
# (c) 2015, Mark Hamilton <mhamilton@vmware.com>
# Portions copyright @ 2015 VMware, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import absolute_import, division, print_function
__metaclass__ = type




Loading…
Cancel
Save