Skip to content

Commit 1dfdcb7

Browse files
committed
fix sanity test
1 parent 9c514ef commit 1dfdcb7

File tree

6 files changed

+30
-35
lines changed

6 files changed

+30
-35
lines changed

plugins/inventory/instance.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,11 @@
44
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
55

66
from __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

1410
DOCUMENTATION = 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
@@ -148,11 +143,13 @@
148143
created: {{ instance.created }}
149144
'''
150145

151-
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, AnsibleError
146+
import yaml
152147
from 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)
154150
from jinja2 import Template
155151

152+
from ..module_utils.cloudstack import HAS_LIB_CS
156153

157154
try:
158155
from cs import CloudStack, CloudStackException

plugins/modules/cs_loadbalancer_rule.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
77

88
from __future__ import absolute_import, division, print_function
9+
910
__metaclass__ = type
1011

1112

@@ -57,7 +58,7 @@
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:
@@ -219,11 +220,9 @@
219220
'''
220221

221222
from 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

229228
class AnsibleCloudStackLBRule(AnsibleCloudStack):

plugins/modules/cs_portforward.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66

77
from __future__ import absolute_import, division, print_function
8+
89
__metaclass__ = type
910

1011

@@ -63,7 +64,7 @@
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:
@@ -227,7 +228,9 @@
227228
'''
228229

229230
from 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

233236
class AnsibleCloudStackPortforwarding(AnsibleCloudStack):

plugins/modules/cs_role_permission.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66

77
from __future__ import absolute_import, division, print_function
8+
89
__metaclass__ = type
910

1011

@@ -108,14 +109,11 @@
108109
sample: Deny createVPC for users
109110
'''
110111

111-
from distutils.version import LooseVersion
112-
113112
from 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

121119
class AnsibleCloudStackRolePermission(AnsibleCloudStack):

plugins/modules/cs_router.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66

77
from __future__ import absolute_import, division, print_function
8+
89
__metaclass__ = type
910

1011

@@ -14,7 +15,7 @@
1415
short_description: Manages routers on Apache CloudStack based clouds.
1516
description:
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.
1819
author: René Moser (@resmo)
1920
version_added: 0.1.0
2021
options:
@@ -156,11 +157,9 @@
156157
'''
157158

158159
from 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

166165
class AnsibleCloudStackRouter(AnsibleCloudStack):

plugins/modules/cs_vpn_connection.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66

77
from __future__ import absolute_import, division, print_function
8+
89
__metaclass__ = type
910

1011

@@ -36,7 +37,7 @@
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:
@@ -183,11 +184,9 @@
183184
'''
184185

185186
from 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

193192
class AnsibleCloudStackVpnConnection(AnsibleCloudStack):

0 commit comments

Comments
 (0)