Skip to content

Commit

Permalink
cloudstack: exoscale: fix boilerplate (ansible#63532)
Browse files Browse the repository at this point in the history
  • Loading branch information
resmo authored Oct 19, 2019
1 parent df0e747 commit 712abfd
Show file tree
Hide file tree
Showing 49 changed files with 139 additions and 110 deletions.
3 changes: 2 additions & 1 deletion contrib/inventory/cloudstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
usage: cloudstack.py [--list] [--host HOST] [--project PROJECT] [--domain DOMAIN]
"""

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

import sys
import argparse
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/module_utils/exoscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Copyright (c) 2016, René Moser <[email protected]>
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)

from __future__ import absolute_import, division, print_function
__metaclass__ = type

import os

from ansible.module_utils.six.moves import configparser
Expand Down
7 changes: 5 additions & 2 deletions lib/ansible/modules/cloud/cloudstack/_cs_zone_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Copyright (c) 2016, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['deprecated'],
'supported_by': 'community'}
Expand All @@ -23,12 +26,12 @@
version_added: '2.1'
author: René Moser (@resmo)
options:
name:
zone:
description:
- Name of the zone.
type: str
required: true
aliases: [ zone ]
aliases: [ name ]
extends_documentation_fragment: cloudstack
'''

Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2015, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'community'}
Expand Down
10 changes: 4 additions & 6 deletions lib/ansible/modules/cloud/cloudstack/cs_affinitygroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2015, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'community'}
Expand All @@ -27,7 +30,6 @@
description:
- Type of the affinity group. If not specified, first found affinity type is used.
type: str
aliases: [ affinty_type ]
description:
description:
- Description of the affinity group.
Expand Down Expand Up @@ -143,7 +145,7 @@ def get_affinity_group(self):
return self.affinity_group

def get_affinity_type(self):
affinity_type = self.module.params.get('affinity_type') or self.module.params.get('affinty_type')
affinity_type = self.module.params.get('affinity_type')

affinity_types = self.query_api('listAffinityGroupTypes', )
if affinity_types:
Expand Down Expand Up @@ -200,7 +202,6 @@ def main():
argument_spec = cs_argument_spec()
argument_spec.update(dict(
name=dict(required=True),
affinty_type=dict(removed_in_version='2.9'),
affinity_type=dict(),
description=dict(),
state=dict(choices=['present', 'absent'], default='present'),
Expand All @@ -213,9 +214,6 @@ def main():
module = AnsibleModule(
argument_spec=argument_spec,
required_together=cs_required_together(),
mutually_exclusive=(
['affinity_type', 'affinty_type'],
),
supports_check_mode=True
)

Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2016, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2016, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2015, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2015, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_firewall.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Copyright: (c) 2015, René Moser <[email protected]>
# 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


ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2016, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_image_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# Copyright: (c) 2019, Patryk Cichy @PatTheSilent
# 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

ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_instance_nic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# (c) 2017, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2017, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_instancegroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2015, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_ip_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# Copyright (c) 2015, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_iso.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2015, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_loadbalancer_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# (c) 2015, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'community'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# Copyright (c) 2015, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# Copyright (c) 2017, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
Expand Down Expand Up @@ -78,6 +80,7 @@
- The gateway of the IPv6 network.
- Required for shared networks.
- Only considered on create.
type: str
vlan:
description:
- The ID or VID of the network.
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_network_acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2017, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_network_acl_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Copyright (c) 2017, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_network_offering.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# Copyright (c) 2017, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_physical_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2017, Netservers Ltd. <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
Expand Down
2 changes: 2 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_pod.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# Copyright (c) 2016, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2015, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_region.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2016, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_resourcelimit.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Copyright (c) 2016, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'community'}
Expand Down
9 changes: 6 additions & 3 deletions lib/ansible/modules/cloud/cloudstack/cs_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2016, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
Expand All @@ -23,12 +26,12 @@
- Name of the role.
type: str
required: true
id:
uuid:
description:
- ID of the role.
- If provided, I(id) is used as key.
- If provided, I(uuid) is used as key.
type: str
aliases: [ uuid ]
aliases: [ id ]
role_type:
description:
- Type of the role.
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_role_permission.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Copyright (c) 2017, David Passante (@dpassante)
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2016, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'community'}
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/cloudstack/cs_sshkeypair.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (c) 2015, René Moser <[email protected]>
# 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

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'community'}
Expand Down
Loading

0 comments on commit 712abfd

Please sign in to comment.