mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Added modules.vsphere.get_service_instance_via_proxy
- retrieves a service instance to the endpoint defined by the proxy [NOTE] Should be used in state modules, not invoked directly
This commit is contained in:
parent
424e83d472
commit
1981ac1618
@ -330,6 +330,18 @@ def gets_service_instance_via_proxy(fn):
|
||||
return _gets_service_instance_via_proxy
|
||||
|
||||
|
||||
@supports_proxies('esxi')
|
||||
def get_service_instance_via_proxy(service_instance=None):
|
||||
'''
|
||||
Returns a service instance to the proxied endpoint (vCenter/ESXi host).
|
||||
|
||||
Note:
|
||||
Should be used by state functions not invoked directly.
|
||||
'''
|
||||
connection_details = _get_proxy_connection_details()
|
||||
return salt.utils.vmware.get_service_instance(*connection_details)
|
||||
|
||||
|
||||
def esxcli_cmd(cmd_str, host=None, username=None, password=None, protocol=None, port=None, esxi_hosts=None):
|
||||
'''
|
||||
Run an ESXCLI command directly on the host or list of hosts.
|
||||
|
Loading…
Reference in New Issue
Block a user