def volume_types_encryption_changed(context, vol_type_id1, vol_type_id2):
 def _get_encryption(enc):
  enc = dict(enc)
  for param in ENCRYPTION_IGNORED_FIELDS:
   enc.pop(param, None)
  return enc
 enc1 = get_volume_type_encryption(context, vol_type_id1)
 enc2 = get_volume_type_encryption(context, vol_type_id2)
 enc1_filtered = (_get_encryption(enc1) if enc1 else None)
 enc2_filtered = (_get_encryption(enc2) if enc2 else None)
 return (enc1_filtered != enc2_filtered)

def volume_types_encryption_changed ( context , vol_type_id1 , vol_type_id2 ) : def _get_encryption ( enc ) : enc = dict ( enc ) for param in ENCRYPTION_IGNORED_FIELDS : enc . pop ( param , None ) return enc enc1 = get_volume_type_encryption ( context , vol_type_id1 ) enc2 = get_volume_type_encryption ( context , vol_type_id2 ) enc1_filtered = ( _get_encryption ( enc1 ) if enc1 else None ) enc2_filtered = ( _get_encryption ( enc2 ) if enc2 else None ) return ( enc1_filtered != enc2_filtered )
return whether encryptions of two volume types are same .