Ejemplo n.º 1
0
 def _create_origin(self):
     if not self.has_origin:
         LOG.debug("Virtman: start to create origin, cache path = %s" %
                   self.cached_path)
         self.origin_path = dmsetup.origin(self.origin_name,
                                           self.cached_path)
         self.has_origin = True
         LOG.debug("Virtman: create origin complete, origin path = %s" %
                   self.origin_path)
     return self.origin_path
Ejemplo n.º 2
0
 def create_origin(base_image):
     """
     :type base_image: BlockDeviceBaseImage
     """
     if not base_image.origin_path:
         LOG.debug("Virtman: start to create origin, cache path = %s" %
                   base_image.cached_path)
         base_image.origin_path = dmsetup.origin(base_image.origin_name,
                                                 base_image.cached_path)
         LOG.debug("Virtman: create origin complete, origin path = %s" %
                   base_image.origin_path)
     return base_image.origin_path