neutron/neutron/tests/unit/objects
Artur Korzeniewski 94ee8bc306 Introduce ovo objects for networks
Those objects are intentionally not integrated into the database code so
far. This is to quicken access to their definitions to implement
push-notifications for networks.

Segments are part of the network object. Since we need to reduce the
number of SQL queries executed per resource, and we want to include
segmentation information for networks, Network model was extended with
segments relationship that makes the information available on every
network resource fetch from the database. This change required some
change in test_dhcp_agent_scheduler to expire a session used in the
tests to avoid obsolete segment state to be reused to validate
scheduling.

This implementation of the object is not complete for the job of
updating the resource in database. For example, tags are not yet exposed
on the object; also attributes like availability_zones, or external
network attributes, are not covered. Those attributes are hopefully
needed on server side only, so until we adopt the object for server
side, it should be ok to live without them.

Another database related thing still missing in this patch is lack of
RBAC support for the object. To complete this support,
a real get_bound_tenant_ids should be put onto the object, instead of
the current no-op stub.

This patch also includes some rearrangements that simplified the work.
Specifically, all network related objects are consolidated in the
neutron.objects.network module, instead of being scattered through the
code base. Also, some setup code from test_policy relevant to RBAC was
moved into the base test class so that it can be utilized by other RBAC
enabled objects, like network.

Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
Partially-Implements: blueprint push-notifications

Co-Authored-By: Victor Morales <victor.morales@intel.com>
Change-Id: I5160d0ab9e8042c356229420739db0ce42842368
2016-09-29 15:36:47 +00:00
..
db Introduce ovo objects for ports 2016-09-28 20:46:19 +00:00
extensions Add common way to extend standard attribute models 2016-09-15 01:42:24 +00:00
port tests: refactor objects test cases to use db models instead of dicts 2016-09-06 13:44:12 +00:00
qos Introduce ovo objects for networks 2016-09-29 15:36:47 +00:00
__init__.py objects.base: avoid db access if object does not have changes 2015-07-03 02:02:17 +03:00
test_address_scope.py Address Scope added to OVO 2016-04-19 09:58:19 -05:00
test_base.py Introduce ovo objects for networks 2016-09-29 15:36:47 +00:00
test_common_types.py Introduce ovo objects for ports 2016-09-28 20:46:19 +00:00
test_network.py Introduce ovo objects for networks 2016-09-29 15:36:47 +00:00
test_objects.py Introduce ovo objects for networks 2016-09-29 15:36:47 +00:00
test_ports.py Introduce ovo objects for networks 2016-09-29 15:36:47 +00:00
test_rbac_db.py objects: expose database model for NeutronDbObject instances 2016-09-10 03:53:17 +00:00
test_securitygroup.py tests: refactor objects test cases to use db models instead of dicts 2016-09-06 13:44:12 +00:00
test_subnet.py tests: don't override base object test class attributes 2016-09-10 07:11:57 +00:00
test_subnetpool.py tests: refactor objects test cases to use db models instead of dicts 2016-09-06 13:44:12 +00:00
test_trunk.py tests: remove self.db_obj from objects tests 2016-09-09 03:07:00 +00:00
test_utils.py objects: introduce a util function to handle tenant_id filter 2016-08-03 08:42:38 +00:00