]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fixs shared networks in Arista ML2 driver
authorSukhdev <sukhdev@aristanetworks.com>
Sat, 10 Jan 2015 01:02:53 +0000 (17:02 -0800)
committerSukhdev <sukhdev@aristanetworks.com>
Wed, 14 Jan 2015 23:43:54 +0000 (15:43 -0800)
commit141e7d19e275a7a301ead273fb323aff56333271
treecd8ad43b4c74b428279c4f39e0b5a63a78f0cea1
parent75832ea45a4a14ded26fc488d6eae80a30fcde24
Fixs shared networks in Arista ML2 driver

When a shared network is created, it is stored
in arista_provisioned_nets under the tenant_id of
owner of the network. Later, when a different
tenant launches an instance on the shared network,
above mentioned DB is looked to find the network
under requesting tenant's ID, and it is not found,
and hence, the request is rejected.

The fix is made such that when a network is not
found under the requesting tenant's ID, check if
this network is shared network. If yes, then
check the DB to ensure that owner tenant exists
in the DB. If yes, then this is a valid request
and do not reject it. Otherwise reject it - as an
unknown tenant or network is specified in the
request.

Change-Id: I8f25d8f84af844afdb3b607bd8ade32f0f5e81fb
Closes-bug: 1409176
neutron/plugins/ml2/drivers/arista/db.py
neutron/plugins/ml2/drivers/arista/mechanism_arista.py
neutron/tests/unit/ml2/drivers/arista/test_arista_mechanism_driver.py