code: def get_image_id(kwargs=None, call=None):
      '''
      Returns an image's ID from the given image name.
  
      .. versionadded:: 2016.3.0
  
      CLI Example:
  
      .. code-block:: bash
  
          salt-cloud -f get_image_id opennebula name=my-image-name
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The get_image_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_image_id function requires a name.'
          )
  
      try:
          ret = avail_images()[name]['id']
      except KeyError:
          raise SaltCloudSystemExit(
              'The image \'{0}\' could not be found'.format(name)
          )
  
      return ref get_image_id(kwargs=None, call=None):
      '''
      Returns an image's ID from the given image name.
  
      .. versionadded:: 2016.3.0
  
      CLI Example:
  
      .. code-block:: bash
  
          salt-cloud -f get_image_id opennebula name=my-image-name
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The get_image_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_image_id function requires a name.'
          )
  
      try:
          ret = avail_images()[name]['id']
      except KeyError:
          raise SaltCloudSystemExit(
              'The image \'{0}\' could not be found'.format(name)
          )
  
      return ret
docs: Returns an image's ID from the given image name.
  
      .. versionadded:: 2016.3.0
  
      CLI Example:
  
      .. code-block:: bash
  
          salt-cloud -f get_image_id opennebula name=my-image-name