'Ensure the reference contains the specified attribute.
Raise a ValidationError if the given attribute is not present'

def _require_attribute(self, ref, attribute):

    if self._attribute_is_empty(ref, attribute):
        msg = (_('%s    field    is    required    and    cannot    be    empty') % attribute)
        raise exception.ValidationError(message=msg)
