def import_image(src, repo, tag=None):
 client = _get_client()
 status = base_status.copy()
 try:
  ret = client.import_image(src, repository=repo, tag=tag)
  if ret:
   (image_logs, _info) = _parse_image_multilogs_string(ret)
   _create_image_assemble_error_status(status, ret, image_logs)
   if (status['status'] is not False):
    infos = _get_image_infos(image_logs[0]['status'])
    _valid(status, comment='Image {0} was created'.format(infos['Id']), id_=infos['Id'], out=ret)
  else:
   _invalid(status)
 except Exception:
  _invalid(status, out=traceback.format_exc())
 return status

def import_image ( src , repo , tag = None ) : client = _get_client ( ) status = base_status . copy ( ) try : ret = client . import_image ( src , repository = repo , tag = tag ) if ret : ( image_logs , _info ) = _parse_image_multilogs_string ( ret ) _create_image_assemble_error_status ( status , ret , image_logs ) if ( status [ 'status' ] is not False ) : infos = _get_image_infos ( image_logs [ 0 ] [ 'status' ] ) _valid ( status , comment = 'Image {0} was created' . format ( infos [ 'Id' ] ) , id_ = infos [ 'Id' ] , out = ret ) else : _invalid ( status ) except Exception : _invalid ( status , out = traceback . format_exc ( ) ) return status
import an image from the repository uuid : string uuid to import verbose : boolean toggle verbose output cli example: .