Update philips Hue proxy to support __proxy__ variable.

This commit is contained in:
C. R. Oldham 2015-11-14 20:13:01 -07:00
parent 001e768465
commit d7fb7ba52d

View File

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