Implement available device listing

This commit is contained in:
Bo Maryniuk 2015-10-12 23:46:58 +02:00 committed by C. R. Oldham
parent c9e7f4dc18
commit d769bc85a7

View file

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