Skip to content

Commit b7d1c28

Browse files
GH issue #181: Updating Examples playbooks for NetworkPool Module (#182)
* GH issue #181: Updating Examples playbooks for NetworkPool Module Signed-off-by: Bhavneet-Sharma <[email protected]> * GH issue #181: Updating Examples playbooks for NetworkPool Module Signed-off-by: Bhavneet-Sharma <[email protected]> --------- Signed-off-by: Bhavneet-Sharma <[email protected]>
1 parent e4ae620 commit b7d1c28

File tree

3 files changed

+48
-48
lines changed

3 files changed

+48
-48
lines changed

docs/modules/networkpool.rst

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Parameters
158158

159159

160160
aggregation_mode (optional, str, None)
161-
OneFS supports the following :literal:`NIC` aggregation modes.
161+
OneFS supports the following \ :literal:`NIC`\ aggregation modes.
162162

163163

164164

@@ -173,9 +173,9 @@ Parameters
173173
verify_ssl (True, bool, None)
174174
boolean variable to specify whether to validate SSL certificate or not.
175175

176-
:literal:`true` - indicates that the SSL certificate should be verified.
176+
\ :literal:`true`\ - indicates that the SSL certificate should be verified.
177177

178-
:literal:`false` - indicates that the SSL certificate should not be verified.
178+
\ :literal:`false`\ - indicates that the SSL certificate should not be verified.
179179

180180

181181
api_user (True, str, None)
@@ -193,9 +193,9 @@ Notes
193193
-----
194194

195195
.. note::
196-
- The :emphasis:`check\_mode` is supported.
197-
- The :emphasis:`diff` is supported.
198-
- Removal of :emphasis:`sc\_dns\_zone\_aliases` is not supported.
196+
- The \ :emphasis:`check\_mode`\ is supported.
197+
- The \ :emphasis:`diff`\ is supported.
198+
- Removal of \ :emphasis:`sc\_dns\_zone\_aliases`\ is not supported.
199199
- The modules present in this collection named as 'dellemc.powerscale' are built to support the Dell PowerScale storage platform.
200200

201201

@@ -213,17 +213,17 @@ Examples
213213
api_user: "{{api_user}}"
214214
api_password: "{{api_password}}"
215215
verify_ssl: "{{verify_ssl}}"
216-
groupnet: "groupnet0"
217-
subnet: "subnet0"
216+
groupnet_name: "groupnet0"
217+
subnet_name: "subnet0"
218218
additional_pool_params:
219-
ranges:
220-
- low: "10.230.**.***"
221-
high: "10.230.**.***"
222-
range_state: "add"
223-
ifaces:
224-
- iface: "ext-1"
225-
lnn: 1
226-
iface_state: "add"
219+
ranges:
220+
- low: "10.230.**.***"
221+
high: "10.230.**.***"
222+
range_state: "add"
223+
ifaces:
224+
- iface: "ext-1"
225+
lnn: 1
226+
iface_state: "add"
227227
sc_params:
228228
sc_dns_zone: "10.230.**.***"
229229
sc_connect_policy: "throughput"
@@ -239,7 +239,7 @@ Examples
239239
prefix_len: 21
240240
subnet: "10.**.**.**"
241241
route_state: "add"
242-
pool: "Test_Pool_2"
242+
pool_name: "Test_Pool_2"
243243
access_zone: "system"
244244
state: "present"
245245

@@ -249,9 +249,9 @@ Examples
249249
api_user: "{{api_user}}"
250250
api_password: "{{api_password}}"
251251
verify_ssl: "{{verify_ssl}}"
252-
groupnet: "groupnet0"
253-
subnet: "subnet0"
254-
pool: "Test_Pool_2"
252+
groupnet_name: "groupnet0"
253+
subnet_name: "subnet0"
254+
pool_name: "Test_Pool_2"
255255
state: "present"
256256

257257
- name: Modify Network Pool
@@ -260,9 +260,9 @@ Examples
260260
api_user: "{{api_user}}"
261261
api_password: "{{api_password}}"
262262
verify_ssl: "{{verify_ssl}}"
263-
groupnet: "groupnet0"
264-
subnet: "subnet0"
265-
pool: "Test_Pool_2"
263+
groupnet_name: "groupnet0"
264+
subnet_name: "subnet0"
265+
pool_name: "Test_Pool_2"
266266
additional_pool_params:
267267
ranges:
268268
- low: "10.230.**.***"
@@ -301,9 +301,9 @@ Examples
301301
api_user: "{{api_user}}"
302302
api_password: "{{api_password}}"
303303
verify_ssl: "{{verify_ssl}}"
304-
groupnet: "groupnet0"
305-
subnet: "subnet0"
306-
pool: "Test_Pool_2"
304+
groupnet_name: "groupnet0"
305+
subnet_name: "subnet0"
306+
pool_name: "Test_Pool_2"
307307
state: "absent"
308308

309309
- name: Rename a network Pool

plugins/modules/networkpool.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/python
2-
# Copyright: (c) 2021-2024, Dell Technologies
2+
# Copyright: (c) 2021-2025, Dell Technologies
33

44
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
55

@@ -197,17 +197,17 @@
197197
api_user: "{{api_user}}"
198198
api_password: "{{api_password}}"
199199
verify_ssl: "{{verify_ssl}}"
200-
groupnet: "groupnet0"
201-
subnet: "subnet0"
200+
groupnet_name: "groupnet0"
201+
subnet_name: "subnet0"
202202
additional_pool_params:
203-
ranges:
204-
- low: "10.230.**.***"
205-
high: "10.230.**.***"
206-
range_state: "add"
207-
ifaces:
208-
- iface: "ext-1"
209-
lnn: 1
210-
iface_state: "add"
203+
ranges:
204+
- low: "10.230.**.***"
205+
high: "10.230.**.***"
206+
range_state: "add"
207+
ifaces:
208+
- iface: "ext-1"
209+
lnn: 1
210+
iface_state: "add"
211211
sc_params:
212212
sc_dns_zone: "10.230.**.***"
213213
sc_connect_policy: "throughput"
@@ -223,7 +223,7 @@
223223
prefix_len: 21
224224
subnet: "10.**.**.**"
225225
route_state: "add"
226-
pool: "Test_Pool_2"
226+
pool_name: "Test_Pool_2"
227227
access_zone: "system"
228228
state: "present"
229229
@@ -233,9 +233,9 @@
233233
api_user: "{{api_user}}"
234234
api_password: "{{api_password}}"
235235
verify_ssl: "{{verify_ssl}}"
236-
groupnet: "groupnet0"
237-
subnet: "subnet0"
238-
pool: "Test_Pool_2"
236+
groupnet_name: "groupnet0"
237+
subnet_name: "subnet0"
238+
pool_name: "Test_Pool_2"
239239
state: "present"
240240
241241
- name: Modify Network Pool
@@ -244,9 +244,9 @@
244244
api_user: "{{api_user}}"
245245
api_password: "{{api_password}}"
246246
verify_ssl: "{{verify_ssl}}"
247-
groupnet: "groupnet0"
248-
subnet: "subnet0"
249-
pool: "Test_Pool_2"
247+
groupnet_name: "groupnet0"
248+
subnet_name: "subnet0"
249+
pool_name: "Test_Pool_2"
250250
additional_pool_params:
251251
ranges:
252252
- low: "10.230.**.***"
@@ -285,9 +285,9 @@
285285
api_user: "{{api_user}}"
286286
api_password: "{{api_password}}"
287287
verify_ssl: "{{verify_ssl}}"
288-
groupnet: "groupnet0"
289-
subnet: "subnet0"
290-
pool: "Test_Pool_2"
288+
groupnet_name: "groupnet0"
289+
subnet_name: "subnet0"
290+
pool_name: "Test_Pool_2"
291291
state: "absent"
292292
293293
- name: Rename a network Pool

plugins/modules/user_mapping_rule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ def handle(self, user_mapping_rule_object, user_mapping_rule_params):
761761
error_message = "apply_order should be greater than 0."
762762
LOG.error(error_message)
763763
user_mapping_rule_object.module.fail_json(msg=error_message)
764-
if user_mapping_rule_params['apply_order'] is not None and user_mapping_rule_params['state'] == 'present':
764+
if 'apply_order' in user_mapping_rule_params and user_mapping_rule_params['apply_order'] is not None and user_mapping_rule_params['state'] == 'present':
765765
user_mapping_rule_details = user_mapping_rule_object.get_rule_details(
766766
user_mapping_rule_params['apply_order'], user_mapping_rule_params['access_zone'])
767767
user_mapping_rule_object.result['user_mapping_rule_details'] = user_mapping_rule_details

0 commit comments

Comments
 (0)