'Validate that subports can be used in a trunk.'

def validate(self, context, basic_validation=False, trunk_validation=True):

    if basic_validation:
        msg = validators.validate_subports(self.subports)
        if msg:
            raise n_exc.InvalidInput(error_message=msg)
    if trunk_validation:
        trunk_port_mtu = self._get_port_mtu(context, self.trunk_port_id)
        self._prepare_subports(context)
        return [self._validate(context, s, trunk_port_mtu) for s in self.subports]
    else:
        return self.subports
