Example #1
0
 def restore_action_scripts(self):
     """
     Put the action scripts back into place
     """
     LOG.debug(_('Restoring actionscripts into place'))
     for a_script in self.actionscripts:
         a_script = os.path.abspath('%s/%s.%s' % (self.as_dumpdir,
                                                  self.instance['id'],
                                                  a_script))
         if os.path.exists(a_script):
             LOG.debug(_('Restoring actionscript: %s') % a_script)
             ovz_utils.copy(a_script, CONF.ovz_config_dir)
             LOG.debug(_('Restored actionscript: %s') % a_script)
     LOG.debug(_('Restored actionscripts into place'))
Example #2
0
 def backup_action_scripts(self):
     """
     Take the action scripts with us in the backup/migration
     """
     LOG.debug(_('Copying actionscripts into place'))
     for a_script in self.actionscripts:
         a_script = os.path.abspath(
             '%s/%s.%s' % (CONF.ovz_config_dir, self.instance['id'],
                           a_script))
         if os.path.exists(a_script):
             LOG.debug(_('Copying actionscript: %s') % a_script)
             ovz_utils.copy(a_script, self.as_dumpdir)
             LOG.debug(_('Copied actionscript: %s') % a_script)
     LOG.debug(_('Copied actionscripts into place'))
 def restore_action_scripts(self):
     """
     Put the action scripts back into place
     """
     LOG.debug(_('Restoring actionscripts into place'))
     for a_script in self.actionscripts:
         a_script_src = os.path.abspath('%s/%s.%s' % (self.as_dumpdir,
                                                      self.container.uuid,
                                                      a_script))
         if os.path.exists(a_script_src):
             LOG.debug(_('Restoring actionscript: %s') % a_script_src)
             a_script_dest = os.path.abspath(
                 '%s/%s.%s' % (CONF.ovz_config_dir, self.container.ovz_id,
                               a_script))
             ovz_utils.copy(a_script_src, a_script_dest)
             LOG.debug(_('Restored actionscript: %(src)s as %(dest)s')
                       % { 'src': a_script_src, 'dest': a_script_dest })
     LOG.debug(_('Restored actionscripts into place'))
 def backup_action_scripts(self):
     """
     Take the action scripts with us in the backup/migration
     """
     LOG.debug(_('Copying actionscripts into place'))
     for a_script in self.actionscripts:
         a_script_src = os.path.abspath(
             '%s/%s.%s' % (CONF.ovz_config_dir, self.container.ovz_id,
                           a_script))
         if os.path.exists(a_script_src):
             LOG.debug(_('Copying actionscript: %s') % a_script_src)
             a_script_dest = os.path.abspath(
                 '%s/%s.%s' % (self.as_dumpdir, self.container.uuid,
                               a_script))
             ovz_utils.copy(a_script_src, a_script_dest)
             LOG.debug(_('Copied actionscript: %(src)s as %(dest)s')
                       % { 'src': a_script_src, 'dest': a_script_dest })
     LOG.debug(_('Copied actionscripts into place'))