'Return a valid trunk or raises an error if unable to do so.'

def validate(self, context, trunk):

    trunk_details = trunk
    trunk_validator = rules.TrunkPortValidator(trunk['port_id'])
    trunk_details['port_id'] = trunk_validator.validate(context)
    subports_validator = rules.SubPortsValidator(self._segmentation_types, trunk['sub_ports'], trunk['port_id'])
    trunk_details['sub_ports'] = subports_validator.validate(context)
    return trunk_details
