def dump_trash(self, expire_days): if not os.path.exists(self.dev): raise Exception("%s not exist" % (self.dev)) if os.path.exists(self.trash_dev): vps_common.lv_delete(self.trash_dev) vps_common.lv_rename(self.dev, self.trash_dev) self._set_expire_days(expire_days)
def dump_trash (self, expire_days): if not os.path.exists (self.dev): raise Exception ("%s not exist" % (self.dev)) if os.path.exists (self.trash_dev): vps_common.lv_delete (self.trash_dev) vps_common.lv_rename (self.dev, self.trash_dev) self._set_expire_days (expire_days)
def dump_trash(self): if not os.path.exists(self.dev): raise Exception("%s not exist" % (self.dev)) self.destroy_limit() if os.path.exists(self.trash_dev): vps_common.lv_delete(self.trash_dev) vps_common.lv_rename(self.dev, self.trash_dev) self.trash_date = datetime.date.today()
def restore_from_trash (self): if not os.path.exists (self.trash_dev): raise Exception ("%s not exist" % (self.trash_dev)) vps_common.lv_rename (self.trash_dev, self.dev) self._set_expire_days (None)
def restore_from_trash(self): if not os.path.exists(self.trash_dev): raise Exception("%s not exist" % (self.trash_dev)) vps_common.lv_rename(self.trash_dev, self.dev) self.trash_date = None self.create_limit()
def restore_from_trash(self): if not os.path.exists(self.trash_dev): raise Exception("%s not exist" % (self.trash_dev)) vps_common.lv_rename(self.trash_dev, self.dev) self._set_expire_days(None)