Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding deprecation for timeout parameter from 10 to 60 for redfish_info, redfish_config and redfish_command #7295

15 changes: 13 additions & 2 deletions plugins/modules/redfish_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@
timeout:
description:
- Timeout in seconds for HTTP requests to OOB controller.
default: 10
- The default value for this param is C(10) but that is being deprecated
and it will be replaced with C(60) in community.general 7.5.0.
type: int
boot_override_mode:
description:
Expand Down Expand Up @@ -782,7 +783,7 @@ def main():
update_username=dict(type='str', aliases=["account_updatename"]),
account_properties=dict(type='dict', default={}),
bootdevice=dict(),
timeout=dict(type='int', default=10),
timeout=dict(type='int'),
uefi_target=dict(),
boot_next=dict(),
boot_override_mode=dict(choices=['Legacy', 'UEFI']),
Expand Down Expand Up @@ -829,6 +830,16 @@ def main():
supports_check_mode=False
)

if module.params['timeout'] is None:
timeout = 10
module.deprecate(
'The default value {0} for parameter param1 is being deprecated and it will be replaced by {1}'.format(
10, 60
),
version='7.5.0',
collection_name='community.general'
)

category = module.params['category']
command_list = module.params['command']

Expand Down
14 changes: 13 additions & 1 deletion plugins/modules/redfish_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
timeout:
description:
- Timeout in seconds for HTTP requests to OOB controller.
- The default value for this param is C(10) but that is being deprecated
and it will be replaced with C(60) in community.general 7.5.0.
default: 10
type: int
boot_order:
Expand Down Expand Up @@ -331,7 +333,7 @@ def main():
password=dict(no_log=True),
auth_token=dict(no_log=True),
bios_attributes=dict(type='dict', default={}),
timeout=dict(type='int', default=10),
timeout=dict(type='int'),
boot_order=dict(type='list', elements='str', default=[]),
network_protocols=dict(
type='dict',
Expand Down Expand Up @@ -362,6 +364,16 @@ def main():
supports_check_mode=False
)

if module.params['timeout'] is None:
timeout = 10
module.deprecate(
'The default value {0} for parameter param1 is being deprecated and it will be replaced by {1}'.format(
10, 60
),
version='7.5.0',
collection_name='community.general'
)

category = module.params['category']
command_list = module.params['command']

Expand Down
14 changes: 13 additions & 1 deletion plugins/modules/redfish_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
timeout:
description:
- Timeout in seconds for HTTP requests to OOB controller.
- The default value for this param is C(10) but that is being deprecated
and it will be replaced with C(60) in community.general 7.5.0.
default: 10
type: int
update_handle:
Expand Down Expand Up @@ -386,7 +388,7 @@ def main():
username=dict(),
password=dict(no_log=True),
auth_token=dict(no_log=True),
timeout=dict(type='int', default=10),
timeout=dict(type='int'),
update_handle=dict(),
),
required_together=[
Expand All @@ -401,6 +403,16 @@ def main():
supports_check_mode=True,
)

if module.params['timeout'] is None:
timeout = 10
module.deprecate(
'The default value {0} for parameter param1 is being deprecated and it will be replaced by {1}'.format(
10, 60
),
version='7.5.0',
collection_name='community.general'
)

# admin credentials used for authentication
creds = {'user': module.params['username'],
'pswd': module.params['password'],
Expand Down