Skip to content

Commit 216b592

Browse files
authored
fix linter version and several files (#372)
fix linter version and several files Reviewed-by: Anton Sidelnikov
1 parent 3fbff5b commit 216b592

34 files changed

+125
-122
lines changed

meta/runtime.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
requires_ansible: '>=2.9.10'
2+
requires_ansible: '>=2.17.0'
33
action_groups:
44
otc:
55
- as_config

plugins/modules/as_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@
237237
- size: 10
238238
volume_type: 'sas'
239239
disk_type: 'data'
240-
241240
'''
242241

243242
from ansible_collections.opentelekomcloud.cloud.plugins.module_utils.otc import OTCModule

plugins/modules/as_group.py

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -265,32 +265,31 @@
265265
'''
266266

267267
EXAMPLES = '''
268-
#Create AS Group
269-
- opentelekomcloud.cloud.as_group:
270-
scaling_group:
271-
name: "as_group_test"
272-
networks:
273-
- id: "a64b4561-af18-4440-9976-b2398ed39ce5"
274-
router: "5d1ac1f4-bec6-4b8c-aae0-7c4345c68f5d"
275-
scaling_configuration: "as_config_test"
276-
desire_instance_number: 1
277-
max_instance_number: 1
278-
action: "resume"
279-
state: "present"
280-
wait: true
281-
timeout: 360
282-
register: result
283-
284-
#Delete AS Group
285-
- opentelekomcloud.cloud.as_group:
286-
scaling_group:
287-
name: "as_group_test"
288-
state: "absent"
289-
force_delete: true
290-
wait: true
291-
timeout: 360
292-
register: result
293-
268+
# Create AS Group
269+
- opentelekomcloud.cloud.as_group:
270+
scaling_group:
271+
name: "as_group_test"
272+
networks:
273+
- id: "a64b4561-af18-4440-9976-b2398ed39ce5"
274+
router: "5d1ac1f4-bec6-4b8c-aae0-7c4345c68f5d"
275+
scaling_configuration: "as_config_test"
276+
desire_instance_number: 1
277+
max_instance_number: 1
278+
action: "resume"
279+
state: "present"
280+
wait: true
281+
timeout: 360
282+
register: result
283+
284+
# Delete AS Group
285+
- opentelekomcloud.cloud.as_group:
286+
scaling_group:
287+
name: "as_group_test"
288+
state: "absent"
289+
force_delete: true
290+
wait: true
291+
timeout: 360
292+
register: result
294293
'''
295294

296295
from ansible_collections.opentelekomcloud.cloud.plugins.module_utils.otc import OTCModule

plugins/modules/as_instance.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,21 @@
7777
7878
# Protect AS instances
7979
- opentelekomcloud.cloud.as_instance:
80-
scaling_group: "as_group_id"
81-
scaling_instances: ["89af599d-a8ab-4c29-a063-0b719ed77e8e", \
82-
"89af599d-a8ab-4c29-a063-0b719ed77555"]
80+
scaling_group: "89af599d-a8ab-4c29-a063-0b719ed88888"
81+
scaling_instances:
82+
- "89af599d-a8ab-4c29-a063-0b719ed77e8e"
83+
- "89af599d-a8ab-4c29-a063-0b719ed77555"
8384
action: "protect"
8485
state: present
8586
register: as_instances
8687
8788
# Unprotect AS instances
8889
- opentelekomcloud.cloud.as_instance:
8990
scaling_group: "89af599d-a8ab-4c29-a063-0b719ed88888"
90-
scaling_instances: ["89af599d-a8ab-4c29-a063-0b719ed77e8e", \
91-
"89af599d-a8ab-4c29-a063-0b719ed77555"]
92-
action: "protect"
91+
scaling_instances:
92+
- "89af599d-a8ab-4c29-a063-0b719ed77e8e"
93+
- "89af599d-a8ab-4c29-a063-0b719ed77555"
94+
action: "unprotect"
9395
state: present
9496
register: as_instances
9597

plugins/modules/as_policy.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,8 @@
181181
scaling_policy: "{{ as_policy_name }}"
182182
state: "absent"
183183
register: as_policy
184-
185184
'''
186185

187-
188186
from ansible_collections.opentelekomcloud.cloud.plugins.module_utils.otc import OTCModule
189187

190188

plugins/modules/cbr_policy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
opentelekomcloud.cloud.cbr_policy:
215215
name: "newpolicy"
216216
count_day_backups: 5
217-
is_enabled: False
217+
is_enabled: false
218218
219219
- name: Delete policy
220220
opentelekomcloud.cloud.cbr_policy:

plugins/modules/cce_cluster_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@
281281
data_volumes:
282282
- volumetype: 'SATA'
283283
size: 100
284-
encrypted: False
284+
encrypted: false
285285
cmk_id: ''
286286
- volumetype: 'SAS'
287287
size: 120

plugins/modules/cce_node_pool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,14 @@
258258
- cce_node_pool:
259259
cloud: "{{ test_cloud }}"
260260
availability_zone: "random"
261-
autoscaling_enabled: True
261+
autoscaling_enabled: true
262262
cluster: tino-test
263263
data_volumes:
264264
- volumetype: SSD
265265
size: 120
266266
- volumetype: SATA
267267
size: 100
268-
encrypted: False
268+
encrypted: false
269269
cmk_id: ''
270270
flavor: s2.large.2
271271
initial_node_count: 0

plugins/modules/ces_alarms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@
188188
value: 6
189189
unit: "B/s"
190190
count: 1
191-
alarm_enabled: True
191+
alarm_enabled: true
192192
ok_actions:
193193
- type: notification
194194
notificationList:

plugins/modules/css_cluster.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
'''
204204

205205
EXAMPLES = '''
206-
#Create CSS Cluster
206+
# Create CSS Cluster
207207
---
208208
- hosts: localhost
209209
tasks:
@@ -223,10 +223,10 @@
223223
system_encrypted: 0
224224
timeout: 1200
225225
tags:
226-
- key: "key0"
227-
value: "value0"
228-
- key: "key1"
229-
value: "value1"
226+
- key: "key0"
227+
value: "value0"
228+
- key: "key1"
229+
value: "value1"
230230
backup_strategy:
231231
period: "00:00 GMT+03:00"
232232
prefix: "yetanother"
@@ -235,7 +235,7 @@
235235
bucket: "css-bucket"
236236
basepath: "css-test"
237237
238-
#Delete CSS Cluster
238+
# Delete CSS Cluster
239239
- hosts: localhost
240240
tasks:
241241
- name: Create CSS cluster

0 commit comments

Comments
 (0)