def _validate_prefixes_for_update(self, prop_diff): old_prefixes = self.properties[self.PREFIXES] new_prefixes = prop_diff[self.PREFIXES] # check new_prefixes is a superset of old_prefixes if not netutils.is_prefix_subset(old_prefixes, new_prefixes): msg = (_('Property %(key)s updated value %(new)s should ' 'be superset of existing value ' '%(old)s.') % dict(key=self.PREFIXES, new=sorted(new_prefixes), old=sorted(old_prefixes))) raise exception.StackValidationFailed(message=msg)