]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Big Switch ML2: sync detection in port-update
authorKevin Benton <blak111@gmail.com>
Wed, 18 Jun 2014 07:17:02 +0000 (00:17 -0700)
committerKevin Benton <blak111@gmail.com>
Wed, 18 Jun 2014 07:24:27 +0000 (00:24 -0700)
commitddc62e2d25abc7459fd28f21a6e0b12fb600d896
tree6d205302e0f68fefaf450ba8e525c2f191654b37
parentff9173ede242d5ce59530221398c7aaa81db2758
Big Switch ML2: sync detection in port-update

Adds logic to the update_port_postcommit method of the
Big Switch ML2 driver to detect when afailure to update
the port via REST was caused by the backend being out-of-sync
with neutron.

This was accomplished by checking for the NXNETWORK message
which indicates that a port request referenced a network that
does not exist on the backend. This only occurs when they are
out-of-sync so the driver will then trigger a full topology sync.

The same logic exists in the port creation method shared with
the Big Switch plugin. However, the Big Switch ML2 driver does
not send port requests to the controller unless the port binding
host ID is set, which doesn't occur until a port update after
binding in the ML2 scenario. Therefore, the logic has to be repeated
in the ML2 driver port update operation.

Closes-Bug: #1331335
Change-Id: Id6488fbdea2c8c22a34e775977d94389c8da74f8
neutron/plugins/ml2/drivers/mech_bigswitch/driver.py
neutron/tests/unit/ml2/drivers/test_bigswitch_mech.py