]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
In Arista ML2 delete tenant without any resources
authorSukhdev <sukhdev@aristanetworks.com>
Mon, 9 Mar 2015 21:45:21 +0000 (14:45 -0700)
committerSukhdev Kapur <sukhdev@aristanetworks.com>
Mon, 9 Mar 2015 21:56:10 +0000 (21:56 +0000)
commit1ec7c542116f4980ee6680adf261d9a29c5a1d61
treed5ec57bef3467fae3a8fd19c3262b0e0da37363f
parentfeb3273e68235b7ff0bd5c79f3297ce3cb5c341b
In Arista ML2 delete tenant without any resources

If there are no resources associated with a
tenant, it was deleted from Arista DB in
delete_xxx_precommit() methods. The sync
mechanism used to make sure that back-end is in
sync with DB.

Lately, the sync mechanism has been enhanced to
support scaled deployment. Therefore, the
delete_tenat() call now needs to be invoked from
delete_xxx_postcommit() methods instead of
delete_xxx_precommit() methods. Additionally,
when the tenant is removed from the DB, it is
removed from the back-end as well. This removes
the dependancy on the sync mechanism to take
care of this.
[Note: Sync will still do it, but, this way it
gets done right away]

Closes-bug: 1429968
Change-Id: I2f6ddb01079fe4e2648685ca97d0be06db2d1a55
neutron/plugins/ml2/drivers/arista/mechanism_arista.py
neutron/tests/unit/ml2/drivers/arista/test_arista_mechanism_driver.py