saltext.vmware.utils.connect#
- saltext.vmware.utils.connect.get_service_instance(opts=None, pillar=None, esxi_host=None)[source]#
Connect to VMware service instance
- opts
(optional) Any additional options.
- pillar
(optional) If specified, allows for a dictionary of pillar data to be made available to pillar and ext_pillar rendering. These pillar variables will also override any variables of the same name in pillar or ext_pillar.
- esxi_host
(optional) If specified, retrieves the configured username and password for this host.
Pillar Example:
vmware_config: host: 198.51.100.100 password: **** user: @example.com vmware_config: host: 198.51.100.100 password: **** user: @example.com esxi_host: 198.52.100.105: user: admin password: *** 198.52.100.106: user: admin password: ***
- saltext.vmware.utils.connect.request(url, method, body=None, token=None, opts=None, pillar=None)[source]#
Make a request to VMware rest api
- url
url address for request.
- method
Method for api request.
- body
Body of the api request.
- token
(optional) Api session token for api access, will create new token if not passed.
- opts
(optional) Any additional options.
- pillar
(optional) If specified, allows for a dictionary of pillar data to be made available to pillar and ext_pillar rendering. These pillar variables will also override any variables of the same name in pillar or ext_pillar.