mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Implement available device listing
This commit is contained in:
parent
c9e7f4dc18
commit
d769bc85a7
1 changed files with 14 additions and 1 deletions
|
@ -60,6 +60,19 @@ def shutdown(opts, *args, **kw):
|
|||
return True
|
||||
|
||||
|
||||
def _get_devices(params):
|
||||
'''
|
||||
Parse device(s) ID(s) from the common params.
|
||||
|
||||
:param params:
|
||||
:return:
|
||||
'''
|
||||
if 'id' not in params:
|
||||
raise CommandExecutionError("Parameter ID is required.")
|
||||
|
||||
return [int(dev) for dev in params['id'].split(",")]
|
||||
|
||||
|
||||
# Callers
|
||||
def call_ping(*args, **kwargs):
|
||||
'''
|
||||
|
@ -79,7 +92,7 @@ def call_status(*args, **kwargs):
|
|||
}
|
||||
|
||||
|
||||
def call_alert(*args, **kwargs):
|
||||
def call_alert(*args, **kw):
|
||||
'''
|
||||
Blink the alert.
|
||||
'''
|
||||
|
|
Loading…
Add table
Reference in a new issue