def setup_container(image, container_dir):
 img = _DiskImage(image=image, mount_dir=container_dir)
 dev = img.mount()
 if (dev is None):
  LOG.error(_LE("Failed to mount container filesystem '%(image)s' on '%(target)s': %(errors)s"), {'image': img, 'target': container_dir, 'errors': img.errors})
  raise exception.NovaException(img.errors)
 return dev

def setup_container ( image , container_dir ) : img = _DiskImage ( image = image , mount_dir = container_dir ) dev = img . mount ( ) if ( dev is None ) : LOG . error ( _LE ( "Failed to mount container filesystem '%(image)s' on '%(target)s': %(errors)s" ) , { 'image' : img , 'target' : container_dir , 'errors' : img . errors } ) raise exception . NovaException ( img . errors ) return dev
setup the lxc container .