예제 #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'))
예제 #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'))