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 switches to the use of subqueries for 1-m relationships
which will result in a higher constant query factor but will
eliminate the potential for cross-product explosions.
Closes-Bug: #1649317
Change-Id: I6952c48236153a8e2f2f155375b70573ddc2cf0f
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
This patch is dependent on commit I45b54b80d994f7e7f06128f73256b94675db97b2
which introduces the Extra Dhcp Opt OVO.
This patch integrates the VersionedObject with the existing code.
Change-Id: I0e01831b2b869fbd1ef90bd72a5b63173f554e66
Partial-Bug: #1541928