def _mounted_processing(device, key, net, metadata):
 dev_path = utils.make_dev_path(device, partition=1)
 with utils.tempdir() as tmpdir:
  err = _mount_filesystem(dev_path, tmpdir)
  if (not err):
   try:
    if (not agent.find_guest_agent(tmpdir)):
     vfs = vfsimpl.VFSLocalFS(imgmodel.LocalFileImage(None, imgmodel.FORMAT_RAW), imgdir=tmpdir)
     LOG.info(_LI('Manipulating interface files directly'))
     disk.inject_data_into_fs(vfs, key, net, metadata, None, None)
   finally:
    utils.execute('umount', dev_path, run_as_root=True)
  else:
   LOG.info(_LI('Failed to mount filesystem (expected for non-linux instances): %s'), err)

def _mounted_processing ( device , key , net , metadata ) : dev_path = utils . make_dev_path ( device , partition = 1 ) with utils . tempdir ( ) as tmpdir : err = _mount_filesystem ( dev_path , tmpdir ) if ( not err ) : try : if ( not agent . find_guest_agent ( tmpdir ) ) : vfs = vfsimpl . VFSLocalFS ( imgmodel . LocalFileImage ( None , imgmodel . FORMAT_RAW ) , imgdir = tmpdir ) LOG . info ( _LI ( 'Manipulating interface files directly' ) ) disk . inject_data_into_fs ( vfs , key , net , metadata , None , None ) finally : utils . execute ( 'umount' , dev_path , run_as_root = True ) else : LOG . info ( _LI ( 'Failed to mount filesystem (expected for non-linux instances): %s' ) , err )
callback which runs with the image vdi attached .