Commit Graph

5 Commits

Author SHA1 Message Date
Kevin Benton 6dee4c5942 Cleanup _find_related_obj
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
2017-02-25 06:29:33 +00:00
Kevin Benton 3ffe006743 Switch to 'subquery' for 1-M relationships
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
2017-02-06 09:01:31 +00:00
Kevin Benton 971cf85034 Add missing revision number altercations
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
2016-09-25 02:18:01 -07:00
Henry Gessau 61cc14fd67 Switch to neutron-lib for model_base
Change-Id: If5b2b4cc0346515ddef3da1255ab49327c8e5732
2016-08-31 11:12:18 -04:00
Martin Hickey 7ed3cb2ca1 Integrate the Extra Dhcp Opt VersionedObject in Neutron
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
2016-04-07 16:44:33 +01:00