

def rebase(self, base, shallow=False, reuse_ext=False, copy=False, relative=False):
    'Rebases block to new base\n\n        :param shallow: Limit copy to top of source backing chain\n        :param reuse_ext: Reuse existing external file of a copy\n        :param copy: Start a copy job\n        :param relative: Keep backing chain referenced using relative names\n        '
    flags = ((shallow and libvirt.VIR_DOMAIN_BLOCK_REBASE_SHALLOW) or 0)
    flags |= ((reuse_ext and libvirt.VIR_DOMAIN_BLOCK_REBASE_REUSE_EXT) or 0)
    flags |= ((copy and libvirt.VIR_DOMAIN_BLOCK_REBASE_COPY) or 0)
    flags |= ((relative and libvirt.VIR_DOMAIN_BLOCK_REBASE_RELATIVE) or 0)
    return self._guest._domain.blockRebase(self._disk, base, self.REBASE_DEFAULT_BANDWIDTH, flags=flags)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/virt/libvirt/guest.py BlockDevice.rebase/original