i try to solve the problem like this, is it right?
def _delete_clone_parent_refs(self, client, parent_name, parent_snap) parent_image_found = True try: parent_rbd = self.rbd.Image(client.ioctx, parent_name) except self.rbd.ImageNotFound: parent_image_found = False LOG.info("parent volume %s no longer exists in backend", parent_name)
if not parent_image_found: parent_name = parent_name + '.deleted' try: parent_rbd = self.rbd.Image(client.ioctx, parent_name) except self.rbd.ImageNotFound: LOG.info("parent volume %s no longer exists in backend", parent_name) return
parent_has_snapts = False ... ...
i try to solve the problem like this, is it right?
def _delete_ clone_parent_ refs(self, client, parent_name, parent_snap) image_found = True Image(client. ioctx, parent_name) ImageNotFound:
parent_ image_found = False
LOG.info( "parent volume %s no longer exists in backend", parent_name)
parent_
try:
parent_rbd = self.rbd.
except self.rbd.
if not parent_image_found:
parent_ rbd = self.rbd. Image(client. ioctx, parent_name) ImageNotFound:
LOG. info("parent volume %s no longer exists in backend", parent_name)
parent_name = parent_name + '.deleted'
try:
except self.rbd.
return
parent_ has_snapts = False
... ...