def get_datastore_id(kwargs=None, call=None):
 if (call == 'action'):
  raise SaltCloudSystemExit('The get_datastore_id function must be called with -f or --function.')
 if (kwargs is None):
  kwargs = {}
 name = kwargs.get('name', None)
 if (name is None):
  raise SaltCloudSystemExit('The get_datastore_id function requires a name.')
 try:
  ret = list_datastores()[name]['id']
 except KeyError:
  raise SaltCloudSystemExit("The datastore '{0}' could not be found.".format(name))
 return ret

def get_datastore_id ( kwargs = None , call = None ) : if ( call == 'action' ) : raise SaltCloudSystemExit ( 'The get_datastore_id function must be called with -f or --function.' ) if ( kwargs is None ) : kwargs = { } name = kwargs . get ( 'name' , None ) if ( name is None ) : raise SaltCloudSystemExit ( 'The get_datastore_id function requires a name.' ) try : ret = list_datastores ( ) [ name ] [ 'id' ] except KeyError : raise SaltCloudSystemExit ( "The datastore '{0}' could not be found." . format ( name ) ) return ret
returns a data stores id from the given data store name .