From 948cf41926da4a6c716634fec8bee36d50e65093 Mon Sep 17 00:00:00 2001 From: Armando Migliaccio Date: Tue, 21 Feb 2017 20:21:43 -0800 Subject: [PATCH] Fetch trunk port MTU only on trunk validation During subport removal (when trunk validation is False) we do not need to fetch the MTU. TrivialFix (cherry picked from commit 9364442a309d960d0b6c7a33a0f653661f73670f) Change-Id: I9201e33fdc7da5a6aa45135d9531d65c92d83b12 --- neutron/services/trunk/rules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/services/trunk/rules.py b/neutron/services/trunk/rules.py index d6f48b1b264..4a5654bd508 100644 --- a/neutron/services/trunk/rules.py +++ b/neutron/services/trunk/rules.py @@ -162,8 +162,8 @@ class SubPortsValidator(object): msg = validators.validate_subports(self.subports) if msg: raise n_exc.InvalidInput(error_message=msg) - trunk_port_mtu = self._get_port_mtu(context, self.trunk_port_id) if trunk_validation: + trunk_port_mtu = self._get_port_mtu(context, self.trunk_port_id) return [self._validate(context, s, trunk_port_mtu) for s in self.subports] else: