def extract_id_from_snapshot_name(snap_name):
 regex = re.compile(CONF.snapshot_name_template.replace('%s', '(?P<uuid>.+)'))
 match = regex.match(snap_name)
 return (match.group('uuid') if match else None)

def extract_id_from_snapshot_name ( snap_name ) : regex = re . compile ( CONF . snapshot_name_template . replace ( '%s' , '(?P<uuid>.+)' ) ) match = regex . match ( snap_name ) return ( match . group ( 'uuid' ) if match else None )
return a snapshots id from its name on the backend .