+ final String oldDeviceOwner = oldPort.getDeviceOwner();\r
+ final String oldVifType = oldPortAugmentation.getVifType();\r
+ final String newDeviceOwner = newPort.getDeviceOwner();\r
+ final String newVifType = newPortAugmentation.getVifType();\r
+\r
+ // TODO potential bug here\r
+ // Temporary change for Openstack Mitaka: If old neutron-binding:vif-type is vhost, new one is unbound and\r
+ // device owner is ROUTER_OWNER, skip update. Openstack (or ml2) sometimes sends router update messages in\r
+ // incorrect order which causes unwanted port removal\r
+ if (oldVifType.equals(VHOST_USER) && newVifType.equals(UNBOUND) && oldDeviceOwner != null &&\r
+ ROUTER_OWNER.equals(oldDeviceOwner) && ROUTER_OWNER.equals(newDeviceOwner)) {\r
+ LOG.warn("Port vif-type was updated from vhost to unbound. This update is currently disabled and will be skipped");\r
+ return false;\r
+ }\r
+\r
+ if (newVifType != null && !newVifType.equals(oldVifType)) {\r
+ LOG.trace("Vif type changed, old: {} new {}", oldVifType, newVifType);\r
+ return true;\r
+ }\r
+\r
+ final List<VifDetails> vifDetails = oldPortAugmentation.getVifDetails();\r
+\r