Ejemplo n.º 1
0
 def destroy(self):
     LOG.debug("VMThunder: destroy VM instance %s according snapshot_name %s" %(self.instance_name, self.snapshot_name))
     #unlink snapshot
     if os.path.exists(self.snapshot_link):
         commands.unlink(self.snapshot_link)
     dmsetup.remove_table(self.snapshot_name)
     self.snapshot.destroy_snapshot()
     LOG.debug("VMThunder: success!")
     return True
Ejemplo n.º 2
0
 def destroy(self):
     LOG.debug("VMThunder: destroy VM instance %s according snapshot_name %s" %(self.instance_name, self.snapshot_name))
     dmsetup.remove_table(self.snapshot_name)
     self.snapshot.destroy_snapshot()
     LOG.debug("VMThunder: succeed to destroy the VM instance!")
     return True
Ejemplo n.º 3
0
 def _delete_snapshot(self):
     snapshot_name = self._snapshot_name()
     dmsetup.remove_table(snapshot_name)
Ejemplo n.º 4
0
 def _delete_snapshot(self):
     snapshot_name = self.snapshot_name
     dmsetup.remove_table(snapshot_name)
     if self.snapshot_with_cache:
         self._delete_cache()
Ejemplo n.º 5
0
 def _delete_origin(self):
     origin_name = self._origin_name()
     dmsetup.remove_table(origin_name)
     LOG.debug("remove origin %s " % origin_name)
     self.has_origin = False
     self.origin = ''
Ejemplo n.º 6
0
 def _delete_multipath(self):
     multipath_name = self._multipath_name()
     dmsetup.remove_table(multipath_name)
     self.has_multipath = False
     LOG.debug("delete multipath of %s" % multipath_name)