def untar_instance(self):
     """
     Expand the tarball from the instance and expand it into place
     """
     LOG.debug(_('Untarring instance: %s') % self.instance_source)
     ovz_utils.untar(self.instance_tarfile, self.instance_parent)
     LOG.debug(_('Untarred instance: %s') % self.instance_source)
 def untar_dumpdir(self):
     """
     Expand the dumpdir into place on the destination machine
     """
     LOG.debug(_('Untarring instance dumpdir: %s') % self.dumpdir)
     ovz_utils.untar(self.dumpdir_tarfile, self.dumpdir_parent)
     LOG.debug(_('Untarred instance dumpdir: %s') % self.dumpdir)
    def untar_instance(self):
        """
        Expand the tarball from the instance and expand it into place
        """
        LOG.debug(_('Untarring instance: %s') % self.instance_tarfile)
        LOG.debug(_('Make sure directory exists: %s') % self.instance_source)
        ovz_utils.make_dir(self.instance_source)

        sed_regex = 's/%(uuid)s/%(ctid)s/' % {
            'ctid': self.container.ovz_id,
            'uuid': self.container.uuid,
        }
        ovz_utils.untar(self.instance_tarfile, self.instance_parent,
                        extra=['--transform', sed_regex])
        LOG.debug(_('Untarred instance: %s') % self.instance_source)