1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Removed 'default=None' in a batch of modules (#4556) (#4568)

* removed default=None

* removed default=None

* removed default=None

* removed default=None

* added changelog fragment

(cherry picked from commit b916cb369b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2022-04-24 10:49:45 +02:00 committed by GitHub
parent e933ed782f
commit ed0c768aaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 48 additions and 57 deletions

View file

@ -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).

View file

@ -228,8 +228,7 @@ class ClcAlertPolicy:
choices=[ choices=[
'cpu', 'cpu',
'memory', 'memory',
'disk'], 'disk']),
default=None),
duration=dict(type='str'), duration=dict(type='str'),
threshold=dict(type='int'), threshold=dict(type='int'),
state=dict(default='present', choices=['present', 'absent']) state=dict(default='present', choices=['present', 'absent'])

View file

@ -297,9 +297,9 @@ class ClcGroup(object):
""" """
argument_spec = dict( argument_spec = dict(
name=dict(required=True), name=dict(required=True),
description=dict(default=None), description=dict(),
parent=dict(default=None), parent=dict(),
location=dict(default=None), location=dict(),
state=dict(default='present', choices=['present', 'absent']), state=dict(default='present', choices=['present', 'absent']),
wait=dict(type='bool', default=True)) wait=dict(type='bool', default=True))

View file

@ -865,7 +865,7 @@ class ClcLoadBalancer:
""" """
argument_spec = dict( argument_spec = dict(
name=dict(required=True), name=dict(required=True),
description=dict(default=None), description=dict(),
location=dict(required=True), location=dict(required=True),
alias=dict(required=True), alias=dict(required=True),
port=dict(choices=[80, 443]), port=dict(choices=[80, 443]),

View file

@ -567,31 +567,31 @@ class ClcServer:
template=dict(), template=dict(),
group=dict(default='Default Group'), group=dict(default='Default Group'),
network_id=dict(), network_id=dict(),
location=dict(default=None), location=dict(),
cpu=dict(default=1, type='int'), cpu=dict(default=1, type='int'),
memory=dict(default=1, type='int'), memory=dict(default=1, type='int'),
alias=dict(default=None), alias=dict(),
password=dict(default=None, no_log=True), password=dict(no_log=True),
ip_address=dict(default=None), ip_address=dict(),
storage_type=dict( storage_type=dict(
default='standard', default='standard',
choices=[ choices=[
'standard', 'standard',
'hyperscale']), 'hyperscale']),
type=dict(default='standard', choices=['standard', 'hyperscale', 'bareMetal']), type=dict(default='standard', choices=['standard', 'hyperscale', 'bareMetal']),
primary_dns=dict(default=None), primary_dns=dict(),
secondary_dns=dict(default=None), secondary_dns=dict(),
additional_disks=dict(type='list', default=[], elements='dict'), additional_disks=dict(type='list', default=[], elements='dict'),
custom_fields=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), managed_os=dict(type='bool', default=False),
description=dict(default=None), description=dict(),
source_server_password=dict(default=None, no_log=True), source_server_password=dict(no_log=True),
cpu_autoscale_policy_id=dict(default=None), cpu_autoscale_policy_id=dict(),
anti_affinity_policy_id=dict(default=None), anti_affinity_policy_id=dict(),
anti_affinity_policy_name=dict(default=None), anti_affinity_policy_name=dict(),
alert_policy_id=dict(default=None), alert_policy_id=dict(),
alert_policy_name=dict(default=None), alert_policy_name=dict(),
packages=dict(type='list', default=[], elements='dict'), packages=dict(type='list', default=[], elements='dict'),
state=dict( state=dict(
default='present', default='present',
@ -601,7 +601,7 @@ class ClcServer:
'started', 'started',
'stopped']), 'stopped']),
count=dict(type='int', default=1), count=dict(type='int', default=1),
exact_count=dict(type='int', default=None), exact_count=dict(type='int', ),
count_group=dict(), count_group=dict(),
server_ids=dict(type='list', default=[], elements='str'), server_ids=dict(type='list', default=[], elements='str'),
add_public_ip=dict(type='bool', default=False), add_public_ip=dict(type='bool', default=False),
@ -612,14 +612,13 @@ class ClcServer:
'UDP', 'UDP',
'ICMP']), 'ICMP']),
public_ip_ports=dict(type='list', default=[], elements='dict'), public_ip_ports=dict(type='list', default=[], elements='dict'),
configuration_id=dict(default=None), configuration_id=dict(),
os_type=dict(default=None, os_type=dict(choices=[
choices=[ 'redHat6_64Bit',
'redHat6_64Bit', 'centOS6_64Bit',
'centOS6_64Bit', 'windows2012R2Standard_64Bit',
'windows2012R2Standard_64Bit', 'ubuntu14_64Bit'
'ubuntu14_64Bit' ]),
]),
wait=dict(type='bool', default=True)) wait=dict(type='bool', default=True))
mutually_exclusive = [ mutually_exclusive = [

View file

@ -95,8 +95,7 @@ def main():
argument_spec=dict( argument_spec=dict(
name=dict(required=True, name=dict(required=True,
type='str'), type='str'),
description=dict(default=None, description=dict(type='str'),
type='str'),
position=dict(default='', position=dict(default='',
type='str'), type='str'),
ou=dict(default='', ou=dict(default='',

View file

@ -354,12 +354,10 @@ def main():
default='0'), default='0'),
group=dict(type='str', group=dict(type='str',
default='0'), default='0'),
path=dict(type='path', path=dict(type='path'),
default=None),
directorymode=dict(type='str', directorymode=dict(type='str',
default='00755'), default='00755'),
host=dict(type='str', host=dict(type='str'),
default=None),
root_squash=dict(type='bool', root_squash=dict(type='bool',
default=True), default=True),
subtree_checking=dict(type='bool', subtree_checking=dict(type='bool',
@ -369,8 +367,7 @@ def main():
writeable=dict(type='bool', writeable=dict(type='bool',
default=True), default=True),
sambaBlockSize=dict(type='str', sambaBlockSize=dict(type='str',
aliases=['samba_block_size'], aliases=['samba_block_size']),
default=None),
sambaBlockingLocks=dict(type='bool', sambaBlockingLocks=dict(type='bool',
aliases=['samba_blocking_locks'], aliases=['samba_blocking_locks'],
default=True), default=True),
@ -408,17 +405,14 @@ def main():
aliases=['samba_force_directory_security_mode'], aliases=['samba_force_directory_security_mode'],
default=False), default=False),
sambaForceGroup=dict(type='str', sambaForceGroup=dict(type='str',
aliases=['samba_force_group'], aliases=['samba_force_group']),
default=None),
sambaForceSecurityMode=dict(type='bool', sambaForceSecurityMode=dict(type='bool',
aliases=['samba_force_security_mode'], aliases=['samba_force_security_mode'],
default=False), default=False),
sambaForceUser=dict(type='str', sambaForceUser=dict(type='str',
aliases=['samba_force_user'], aliases=['samba_force_user']),
default=None),
sambaHideFiles=dict(type='str', sambaHideFiles=dict(type='str',
aliases=['samba_hide_files'], aliases=['samba_hide_files']),
default=None),
sambaHideUnreadable=dict(type='bool', sambaHideUnreadable=dict(type='bool',
aliases=['samba_hide_unreadable'], aliases=['samba_hide_unreadable'],
default=False), default=False),
@ -438,8 +432,7 @@ def main():
aliases=['samba_inherit_permissions'], aliases=['samba_inherit_permissions'],
default=False), default=False),
sambaInvalidUsers=dict(type='str', sambaInvalidUsers=dict(type='str',
aliases=['samba_invalid_users'], aliases=['samba_invalid_users']),
default=None),
sambaLevel2Oplocks=dict(type='bool', sambaLevel2Oplocks=dict(type='bool',
aliases=['samba_level_2_oplocks'], aliases=['samba_level_2_oplocks'],
default=True), default=True),
@ -450,8 +443,7 @@ def main():
aliases=['samba_msdfs_root'], aliases=['samba_msdfs_root'],
default=False), default=False),
sambaName=dict(type='str', sambaName=dict(type='str',
aliases=['samba_name'], aliases=['samba_name']),
default=None),
sambaNtAclSupport=dict(type='bool', sambaNtAclSupport=dict(type='bool',
aliases=['samba_nt_acl_support'], aliases=['samba_nt_acl_support'],
default=True), default=True),
@ -459,11 +451,9 @@ def main():
aliases=['samba_oplocks'], aliases=['samba_oplocks'],
default=True), default=True),
sambaPostexec=dict(type='str', sambaPostexec=dict(type='str',
aliases=['samba_postexec'], aliases=['samba_postexec']),
default=None),
sambaPreexec=dict(type='str', sambaPreexec=dict(type='str',
aliases=['samba_preexec'], aliases=['samba_preexec']),
default=None),
sambaPublic=dict(type='bool', sambaPublic=dict(type='bool',
aliases=['samba_public'], aliases=['samba_public'],
default=False), default=False),
@ -474,14 +464,11 @@ def main():
aliases=['samba_strict_locking'], aliases=['samba_strict_locking'],
default='Auto'), default='Auto'),
sambaVFSObjects=dict(type='str', sambaVFSObjects=dict(type='str',
aliases=['samba_vfs_objects'], aliases=['samba_vfs_objects']),
default=None),
sambaValidUsers=dict(type='str', sambaValidUsers=dict(type='str',
aliases=['samba_valid_users'], aliases=['samba_valid_users']),
default=None),
sambaWriteList=dict(type='str', sambaWriteList=dict(type='str',
aliases=['samba_write_list'], aliases=['samba_write_list']),
default=None),
sambaWriteable=dict(type='bool', sambaWriteable=dict(type='bool',
aliases=['samba_writeable'], aliases=['samba_writeable'],
default=True), default=True),