mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Update philips Hue proxy to support __proxy__ variable.
This commit is contained in:
parent
001e768465
commit
d7fb7ba52d
@ -29,20 +29,20 @@ def _proxy():
|
||||
'''
|
||||
Get proxy.
|
||||
'''
|
||||
return __opts__.get('proxymodule')
|
||||
return __proxy__
|
||||
|
||||
|
||||
def __virtual__():
|
||||
'''
|
||||
Start the Philips HUE only for proxies.
|
||||
'''
|
||||
|
||||
if not _proxy():
|
||||
return False
|
||||
|
||||
def _mkf(cmd_name, doc):
|
||||
def _cmd(*args, **kw):
|
||||
return _proxy()[_proxy().loaded_base_name + "." + cmd_name](*args, **kw)
|
||||
proxyfn = 'philips_hue.'+cmd_name
|
||||
return __proxy__[proxyfn](*args, **kw)
|
||||
return _cmd
|
||||
|
||||
import salt.proxy.philips_hue as hue
|
||||
|
Loading…
Reference in New Issue
Block a user