]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Network RBAC DB setup and legacy migration
authorKevin Benton <blak111@gmail.com>
Mon, 15 Jun 2015 09:18:36 +0000 (02:18 -0700)
committerKevin Benton <blak111@gmail.com>
Thu, 16 Jul 2015 12:48:10 +0000 (05:48 -0700)
commit3e0328b992d8a90213a56ec5a4144677279bea66
tree746e5ed872f069287df208e49ef161ca5b4c46f7
parenteb9226214fbf3d7a1812ca454c7c304769e262dc
Network RBAC DB setup and legacy migration

This patch implements the database model required for the network
RBAC work. In addition it migrates the current network and subnet
'shared' attributes to leverage the new table.

'shared' is no longer a property of the DB model because its status
is based on the tenant ID of the API caller. From an API perspective
this is the same (tenants will see networks as 'shared=True' if the
network is shared with them). However, internal callers (e.g. plugins,
drivers, services) will not be able to check for the 'shared' attribute
on network and subnet db objects any more.

This patch just achieves parity with the current shared behavior so it
doesn't add the ability to manipulate the RBAC entries directly. The
RBAC API is in the following patch.

Partially-Implements: blueprint rbac-networks
Change-Id: I3426b13eede8bfa29729cf3efea3419fb91175c4
13 files changed:
neutron/db/common_db_mixin.py
neutron/db/db_base_plugin_common.py
neutron/db/db_base_plugin_v2.py
neutron/db/ipam_non_pluggable_backend.py
neutron/db/migration/alembic_migrations/versions/HEADS
neutron/db/migration/alembic_migrations/versions/liberty/contract/4ffceebfada_rbac_network.py [new file with mode: 0644]
neutron/db/migration/alembic_migrations/versions/liberty/expand/8675309a5c4f_rbac_network.py [new file with mode: 0644]
neutron/db/migration/models/head.py
neutron/db/models_v2.py
neutron/db/rbac_db_models.py [new file with mode: 0644]
neutron/plugins/ml2/plugin.py
neutron/tests/api/admin/test_shared_network_extension.py
neutron/tests/unit/db/test_db_base_plugin_v2.py