#NEWLINE# def _run( self ) : #NEWLINE# #INDENT# self . o . reset ( ) #NEWLINE# LoginTask ( self . o , self . container , self . _registries ) . run ( ) #NEWLINE# self . o . pending ( 'pulling image {}...' . format ( self . container . short_image ) ) #NEWLINE# registry = LoginTask . registry_for_container ( self . container , self . _registries ) #NEWLINE# insecure = ( ( urlparse . urlparse ( registry [ 'registry' ] ) . scheme == 'http' ) if registry else False ) #NEWLINE# image = self . container . get_image_details ( ) #NEWLINE# for dlstatus in self . container . ship . backend . pull ( stream = True , insecure_registry = insecure , ** image ) : #NEWLINE# #INDENT# if dlstatus : #NEWLINE# #INDENT# percentage = self . _update_pull_progress ( dlstatus ) #NEWLINE# self . o . pending ( '... {:.1f}%' . format ( percentage ) ) #NEWLINE# #UNINDENT# #UNINDENT# if self . _standalone : #NEWLINE# #INDENT# self . o . commit ( CONTAINER_STATUS_FMT . format ( '' ) ) #NEWLINE# self . o . commit ( green ( TASK_RESULT_FMT . format ( 'done' ) ) )