Skip to content

Commit

Permalink
Removed 'default=None' in a batch of modules (#4556) (#4568)
Browse files Browse the repository at this point in the history
* removed default=None

* removed default=None

* removed default=None

* removed default=None

* added changelog fragment

(cherry picked from commit b916cb3)

Co-authored-by: Alexei Znamensky <[email protected]>
  • Loading branch information
patchback[bot] and russoz authored Apr 24, 2022
1 parent e933ed7 commit ed0c768
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 57 deletions.
7 changes: 7 additions & 0 deletions changelogs/fragments/4556-remove-default-none-1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
minor_changes:
- clc_alert_policy - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556).
- clc_group - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556).
- clc_loadbalancer - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556).
- clc_server - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556).
- udm_group - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556).
- udm_share - minor refactoring (https://github.com/ansible-collections/community.general/pull/4556).
3 changes: 1 addition & 2 deletions plugins/modules/cloud/centurylink/clc_alert_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ def _define_module_argument_spec():
choices=[
'cpu',
'memory',
'disk'],
default=None),
'disk']),
duration=dict(type='str'),
threshold=dict(type='int'),
state=dict(default='present', choices=['present', 'absent'])
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/cloud/centurylink/clc_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ def _define_module_argument_spec():
"""
argument_spec = dict(
name=dict(required=True),
description=dict(default=None),
parent=dict(default=None),
location=dict(default=None),
description=dict(),
parent=dict(),
location=dict(),
state=dict(default='present', choices=['present', 'absent']),
wait=dict(type='bool', default=True))

Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/cloud/centurylink/clc_loadbalancer.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ def define_argument_spec():
"""
argument_spec = dict(
name=dict(required=True),
description=dict(default=None),
description=dict(),
location=dict(required=True),
alias=dict(required=True),
port=dict(choices=[80, 443]),
Expand Down
45 changes: 22 additions & 23 deletions plugins/modules/cloud/centurylink/clc_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,31 +567,31 @@ def _define_module_argument_spec():
template=dict(),
group=dict(default='Default Group'),
network_id=dict(),
location=dict(default=None),
location=dict(),
cpu=dict(default=1, type='int'),
memory=dict(default=1, type='int'),
alias=dict(default=None),
password=dict(default=None, no_log=True),
ip_address=dict(default=None),
alias=dict(),
password=dict(no_log=True),
ip_address=dict(),
storage_type=dict(
default='standard',
choices=[
'standard',
'hyperscale']),
type=dict(default='standard', choices=['standard', 'hyperscale', 'bareMetal']),
primary_dns=dict(default=None),
secondary_dns=dict(default=None),
primary_dns=dict(),
secondary_dns=dict(),
additional_disks=dict(type='list', default=[], elements='dict'),
custom_fields=dict(type='list', default=[], elements='dict'),
ttl=dict(default=None),
ttl=dict(),
managed_os=dict(type='bool', default=False),
description=dict(default=None),
source_server_password=dict(default=None, no_log=True),
cpu_autoscale_policy_id=dict(default=None),
anti_affinity_policy_id=dict(default=None),
anti_affinity_policy_name=dict(default=None),
alert_policy_id=dict(default=None),
alert_policy_name=dict(default=None),
description=dict(),
source_server_password=dict(no_log=True),
cpu_autoscale_policy_id=dict(),
anti_affinity_policy_id=dict(),
anti_affinity_policy_name=dict(),
alert_policy_id=dict(),
alert_policy_name=dict(),
packages=dict(type='list', default=[], elements='dict'),
state=dict(
default='present',
Expand All @@ -601,7 +601,7 @@ def _define_module_argument_spec():
'started',
'stopped']),
count=dict(type='int', default=1),
exact_count=dict(type='int', default=None),
exact_count=dict(type='int', ),
count_group=dict(),
server_ids=dict(type='list', default=[], elements='str'),
add_public_ip=dict(type='bool', default=False),
Expand All @@ -612,14 +612,13 @@ def _define_module_argument_spec():
'UDP',
'ICMP']),
public_ip_ports=dict(type='list', default=[], elements='dict'),
configuration_id=dict(default=None),
os_type=dict(default=None,
choices=[
'redHat6_64Bit',
'centOS6_64Bit',
'windows2012R2Standard_64Bit',
'ubuntu14_64Bit'
]),
configuration_id=dict(),
os_type=dict(choices=[
'redHat6_64Bit',
'centOS6_64Bit',
'windows2012R2Standard_64Bit',
'ubuntu14_64Bit'
]),
wait=dict(type='bool', default=True))

mutually_exclusive = [
Expand Down
3 changes: 1 addition & 2 deletions plugins/modules/cloud/univention/udm_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ def main():
argument_spec=dict(
name=dict(required=True,
type='str'),
description=dict(default=None,
type='str'),
description=dict(type='str'),
position=dict(default='',
type='str'),
ou=dict(default='',
Expand Down
39 changes: 13 additions & 26 deletions plugins/modules/cloud/univention/udm_share.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,10 @@ def main():
default='0'),
group=dict(type='str',
default='0'),
path=dict(type='path',
default=None),
path=dict(type='path'),
directorymode=dict(type='str',
default='00755'),
host=dict(type='str',
default=None),
host=dict(type='str'),
root_squash=dict(type='bool',
default=True),
subtree_checking=dict(type='bool',
Expand All @@ -369,8 +367,7 @@ def main():
writeable=dict(type='bool',
default=True),
sambaBlockSize=dict(type='str',
aliases=['samba_block_size'],
default=None),
aliases=['samba_block_size']),
sambaBlockingLocks=dict(type='bool',
aliases=['samba_blocking_locks'],
default=True),
Expand Down Expand Up @@ -408,17 +405,14 @@ def main():
aliases=['samba_force_directory_security_mode'],
default=False),
sambaForceGroup=dict(type='str',
aliases=['samba_force_group'],
default=None),
aliases=['samba_force_group']),
sambaForceSecurityMode=dict(type='bool',
aliases=['samba_force_security_mode'],
default=False),
sambaForceUser=dict(type='str',
aliases=['samba_force_user'],
default=None),
aliases=['samba_force_user']),
sambaHideFiles=dict(type='str',
aliases=['samba_hide_files'],
default=None),
aliases=['samba_hide_files']),
sambaHideUnreadable=dict(type='bool',
aliases=['samba_hide_unreadable'],
default=False),
Expand All @@ -438,8 +432,7 @@ def main():
aliases=['samba_inherit_permissions'],
default=False),
sambaInvalidUsers=dict(type='str',
aliases=['samba_invalid_users'],
default=None),
aliases=['samba_invalid_users']),
sambaLevel2Oplocks=dict(type='bool',
aliases=['samba_level_2_oplocks'],
default=True),
Expand All @@ -450,20 +443,17 @@ def main():
aliases=['samba_msdfs_root'],
default=False),
sambaName=dict(type='str',
aliases=['samba_name'],
default=None),
aliases=['samba_name']),
sambaNtAclSupport=dict(type='bool',
aliases=['samba_nt_acl_support'],
default=True),
sambaOplocks=dict(type='bool',
aliases=['samba_oplocks'],
default=True),
sambaPostexec=dict(type='str',
aliases=['samba_postexec'],
default=None),
aliases=['samba_postexec']),
sambaPreexec=dict(type='str',
aliases=['samba_preexec'],
default=None),
aliases=['samba_preexec']),
sambaPublic=dict(type='bool',
aliases=['samba_public'],
default=False),
Expand All @@ -474,14 +464,11 @@ def main():
aliases=['samba_strict_locking'],
default='Auto'),
sambaVFSObjects=dict(type='str',
aliases=['samba_vfs_objects'],
default=None),
aliases=['samba_vfs_objects']),
sambaValidUsers=dict(type='str',
aliases=['samba_valid_users'],
default=None),
aliases=['samba_valid_users']),
sambaWriteList=dict(type='str',
aliases=['samba_write_list'],
default=None),
aliases=['samba_write_list']),
sambaWriteable=dict(type='bool',
aliases=['samba_writeable'],
default=True),
Expand Down

0 comments on commit ed0c768

Please sign in to comment.