Ensure action plugins accept only valid args (#44779)

* Ensure action plugins accept only valid args

This fixes #25424
This also fixes #44773

* Add missing parameters, use private _VALID_ARGS
This commit is contained in:
Dag Wieers 2018-08-30 15:40:36 +02:00 committed by Brian Coca
commit bf9ed0263a
15 changed files with 61 additions and 13 deletions

View file

@ -24,6 +24,10 @@ class TimedOutException(Exception):
class ActionModule(RebootActionModule, ActionBase):
TRANSFERS_FILES = False
_VALID_ARGS = frozenset((
'connect_timeout', 'connect_timeout_sec', 'msg', 'post_reboot_delay', 'post_reboot_delay_sec', 'pre_reboot_delay', 'pre_reboot_delay_sec',
'reboot_timeout', 'reboot_timeout_sec', 'shutdown_timeout', 'shutdown_timeout_sec', 'test_command',
))
DEFAULT_CONNECT_TIMEOUT = 5
DEFAULT_PRE_REBOOT_DELAY = 2