def _validate_snap_name(name, snap_name, strict=True, runas=None):
 snap_name = _sdecode(snap_name)
 if re.match(GUID_REGEX, snap_name):
  return snap_name.strip('{}')
 else:
  return snapshot_name_to_id(name, snap_name, strict=strict, runas=runas)

def _validate_snap_name ( name , snap_name , strict = True , runas = None ) : snap_name = _sdecode ( snap_name ) if re . match ( GUID_REGEX , snap_name ) : return snap_name . strip ( '{}' ) else : return snapshot_name_to_id ( name , snap_name , strict = strict , runas = runas )
validate snapshot name and convert to snapshot id .