File tree Expand file tree Collapse file tree 6 files changed +30
-35
lines changed Expand file tree Collapse file tree 6 files changed +30
-35
lines changed Original file line number Diff line number Diff line change 44# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
55
66from __future__ import absolute_import , division , print_function
7- __metaclass__ = type
87
9- import sys
10- import os
11- import traceback
12- import yaml
8+ __metaclass__ = type
139
1410DOCUMENTATION = r'''
1511 name: instance
16- plugin_type: inventory
1712 short_description: Apache CloudStack instance inventory source
1813 author: Rafael del Valle (@rvalle)
1914 version_added: 2.1.0
148143 created: {{ instance.created }}
149144'''
150145
151- from ansible . plugins . inventory import BaseInventoryPlugin , Constructable , AnsibleError
146+ import yaml
152147from ansible .module_utils .basic import missing_required_lib
153- from ..module_utils .cloudstack import HAS_LIB_CS
148+ from ansible .plugins .inventory import (AnsibleError , BaseInventoryPlugin ,
149+ Constructable )
154150from jinja2 import Template
155151
152+ from ..module_utils .cloudstack import HAS_LIB_CS
156153
157154try :
158155 from cs import CloudStack , CloudStackException
Original file line number Diff line number Diff line change 66# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
77
88from __future__ import absolute_import , division , print_function
9+
910__metaclass__ = type
1011
1112
5758 open_firewall:
5859 description:
5960 - Whether the firewall rule for public port should be created, while creating the new rule.
60- - Use M(cs_firewall) for managing firewall rules.
61+ - Use M(ngine_io.cloudstack. cs_firewall) for managing firewall rules.
6162 type: bool
6263 default: no
6364 cidr:
219220'''
220221
221222from ansible .module_utils .basic import AnsibleModule
222- from ..module_utils .cloudstack import (
223- AnsibleCloudStack ,
224- cs_argument_spec ,
225- cs_required_together ,
226- )
223+
224+ from ..module_utils .cloudstack import (AnsibleCloudStack , cs_argument_spec ,
225+ cs_required_together )
227226
228227
229228class AnsibleCloudStackLBRule (AnsibleCloudStack ):
Original file line number Diff line number Diff line change 55# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66
77from __future__ import absolute_import , division , print_function
8+
89__metaclass__ = type
910
1011
6364 description:
6465 - Whether the firewall rule for public port should be created, while creating the new rule.
6566 - Not supported when forwarding ports in a VPC.
66- - Use M(cs_firewall) for managing firewall rules.
67+ - Use M(ngine_io.cloudstack. cs_firewall) for managing firewall rules.
6768 default: no
6869 type: bool
6970 vm_guest_ip:
227228'''
228229
229230from ansible .module_utils .basic import AnsibleModule
230- from ..module_utils .cloudstack import AnsibleCloudStack , cs_argument_spec , cs_required_together
231+
232+ from ..module_utils .cloudstack import (AnsibleCloudStack , cs_argument_spec ,
233+ cs_required_together )
231234
232235
233236class AnsibleCloudStackPortforwarding (AnsibleCloudStack ):
Original file line number Diff line number Diff line change 55# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66
77from __future__ import absolute_import , division , print_function
8+
89__metaclass__ = type
910
1011
108109 sample: Deny createVPC for users
109110'''
110111
111- from distutils .version import LooseVersion
112-
113112from ansible .module_utils .basic import AnsibleModule
114- from ..module_utils .cloudstack import (
115- AnsibleCloudStack ,
116- cs_argument_spec ,
117- cs_required_together ,
118- )
113+ from ansible .module_utils .compat .version import LooseVersion
114+
115+ from ..module_utils .cloudstack import (AnsibleCloudStack , cs_argument_spec ,
116+ cs_required_together )
119117
120118
121119class AnsibleCloudStackRolePermission (AnsibleCloudStack ):
Original file line number Diff line number Diff line change 55# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66
77from __future__ import absolute_import , division , print_function
8+
89__metaclass__ = type
910
1011
1415short_description: Manages routers on Apache CloudStack based clouds.
1516description:
1617 - Start, restart, stop and destroy routers.
17- - I(state=present) is not able to create routers, use M(cs_network) instead.
18+ - I(state=present) is not able to create routers, use M(ngine_io.cloudstack. cs_network) instead.
1819author: René Moser (@resmo)
1920version_added: 0.1.0
2021options:
156157'''
157158
158159from ansible .module_utils .basic import AnsibleModule
159- from ..module_utils .cloudstack import (
160- AnsibleCloudStack ,
161- cs_argument_spec ,
162- cs_required_together ,
163- )
160+
161+ from ..module_utils .cloudstack import (AnsibleCloudStack , cs_argument_spec ,
162+ cs_required_together )
164163
165164
166165class AnsibleCloudStackRouter (AnsibleCloudStack ):
Original file line number Diff line number Diff line change 55# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66
77from __future__ import absolute_import , division , print_function
8+
89__metaclass__ = type
910
1011
3637 force:
3738 description:
3839 - Activate the VPN gateway if not already activated on I(state=present).
39- - Also see M(cs_vpn_gateway).
40+ - Also see M(ngine_io.cloudstack. cs_vpn_gateway).
4041 default: no
4142 type: bool
4243 state:
183184'''
184185
185186from ansible .module_utils .basic import AnsibleModule
186- from ..module_utils .cloudstack import (
187- AnsibleCloudStack ,
188- cs_argument_spec ,
189- cs_required_together
190- )
187+
188+ from ..module_utils .cloudstack import (AnsibleCloudStack , cs_argument_spec ,
189+ cs_required_together )
191190
192191
193192class AnsibleCloudStackVpnConnection (AnsibleCloudStack ):
You can’t perform that action at this time.
0 commit comments