@depends(HAS_PYVMOMI)
def get_vsan_enabled(host, username, password, protocol=None, port=None, host_names=None):
 service_instance = salt.utils.vmware.get_service_instance(host=host, username=username, password=password, protocol=protocol, port=port)
 host_names = _check_hosts(service_instance, host, host_names)
 ret = {}
 for host_name in host_names:
  host_ref = _get_host_ref(service_instance, host, host_name=host_name)
  vsan_config = host_ref.config.vsanHostConfig
  if (vsan_config is None):
   msg = "VSAN System Config Manager is unset for host '{0}'.".format(host_name)
   log.debug(msg)
   ret.update({host_name: {'Error': msg}})
  else:
   ret.update({host_name: {'VSAN Enabled': vsan_config.enabled}})
 return ret

@ depends ( HAS_PYVMOMI ) def get_vsan_enabled ( host , username , password , protocol = None , port = None , host_names = None ) : service_instance = salt . utils . vmware . get_service_instance ( host = host , username = username , password = password , protocol = protocol , port = port ) host_names = _check_hosts ( service_instance , host , host_names ) ret = { } for host_name in host_names : host_ref = _get_host_ref ( service_instance , host , host_name = host_name ) vsan_config = host_ref . config . vsanHostConfig if ( vsan_config is None ) : msg = "VSAN System Config Manager is unset for host '{0}'." . format ( host_name ) log . debug ( msg ) ret . update ( { host_name : { 'Error' : msg } } ) else : ret . update ( { host_name : { 'VSAN Enabled' : vsan_config . enabled } } ) return ret
get the vsan enabled status for a given host or a list of host_names .