def image_info(call=None, kwargs=None):
 if (call != 'function'):
  raise SaltCloudSystemExit('The image_info function must be called with -f or --function.')
 if (kwargs is None):
  kwargs = {}
 name = kwargs.get('name', None)
 image_id = kwargs.get('image_id', None)
 if image_id:
  if name:
   log.warning("Both the 'image_id' and 'name' arguments were provided. 'image_id' will take precedence.")
 elif name:
  image_id = get_image_id(kwargs={'name': name})
 else:
  raise SaltCloudSystemExit("The image_info function requires either a 'name or an 'image_id' to be provided.")
 (server, user, password) = _get_xml_rpc()
 auth = ':'.join([user, password])
 info = {}
 response = server.one.image.info(auth, int(image_id))[1]
 tree = _get_xml(response)
 info[tree.find('NAME').text] = _xml_to_dict(tree)
 return info

def image_info ( call = None , kwargs = None ) : if ( call != 'function' ) : raise SaltCloudSystemExit ( 'The image_info function must be called with -f or --function.' ) if ( kwargs is None ) : kwargs = { } name = kwargs . get ( 'name' , None ) image_id = kwargs . get ( 'image_id' , None ) if image_id : if name : log . warning ( "Both the 'image_id' and 'name' arguments were provided. 'image_id' will take precedence." ) elif name : image_id = get_image_id ( kwargs = { 'name' : name } ) else : raise SaltCloudSystemExit ( "The image_info function requires either a 'name or an 'image_id' to be provided." ) ( server , user , password ) = _get_xml_rpc ( ) auth = ':' . join ( [ user , password ] ) info = { } response = server . one . image . info ( auth , int ( image_id ) ) [ 1 ] tree = _get_xml ( response ) info [ tree . find ( 'NAME' ) . text ] = _xml_to_dict ( tree ) return info
retrieves information for a given image .