All of the additional lookup logic was essentially duplicating
a relationship property of 'load_on_pending=True', which tells
SQLAlchemy to lookup the relationship during object creation [1].
So we can dump all of this logic and just use that option.
1. http://docs.sqlalchemy.org/en/latest/orm/relationship_api.html
#sqlalchemy.orm.relationship.params.load_on_pending
Related: blueprint push-notifications
Change-Id: I0e495a50f5cab9b6449825039d7683d77de1e763
This adds revises_on_change for the following models
and API tests to ensure the correct behavior:
* port security (network and port)
* DNS domain (network and port)
* extra dhcp opts (port)
* extra routes (router)
* subnet service type (subnet)
Additionally, it configures the DNS extension to be loaded
in the gate since the extension is enabled for tempest.
Closes-Bug: #1627649
Change-Id: Ifa969c8c2582f8f41d42df07652f259781a36bb5
Since there are two models for binding, and it's easier if they behave
identically from objects POV, renamed port_id field in PortSecurity into
id, and kept the same fields in NetworkPortSecurity.
Switched db code to using those objects. Some refactoring took place to
reduce code duplication.
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
Change-Id: Ic104f113c4aa3f0c1448f83fe5128feed7b4444b