mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Added salt.states.esxcluster._get_vsan_datastore
This commit is contained in:
parent
08100d719d
commit
26207e2acc
@ -73,6 +73,22 @@ def mod_init(low):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def _get_vsan_datastore(si, cluster_name):
|
||||||
|
'''Retrieves the vsan_datastore'''
|
||||||
|
|
||||||
|
log.trace('Retrieving vsan datastore')
|
||||||
|
vsan_datastores = [ds for ds in
|
||||||
|
__salt__['vsphere.list_datastores_via_proxy'](
|
||||||
|
service_instance=si)
|
||||||
|
if ds['type'] == 'vsan']
|
||||||
|
|
||||||
|
if not vsan_datastores:
|
||||||
|
raise salt.exceptions.VMwareObjectRetrievalError(
|
||||||
|
'No vSAN datastores where retrieved for cluster '
|
||||||
|
'\'{0}\''.format(cluster_name))
|
||||||
|
return vsan_datastores[0]
|
||||||
|
|
||||||
|
|
||||||
def cluster_configured(name, cluster_config):
|
def cluster_configured(name, cluster_config):
|
||||||
'''
|
'''
|
||||||
Configures a cluster. Creates a new cluster, if it doesn't exist on the
|
Configures a cluster. Creates a new cluster, if it doesn't exist on the
|
||||||
|
Loading…
Reference in New Issue
Block a user