OpenStack Networking (Neutron)
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Mike Bayer e98a268de4 Propose replacement of ORM from_self()
The from_self() method in SQLAlchemy is currently
being considered for removal from the library,
with a deprecation phase throughout 1.4 and then
removal by SQLAlchemy 2.0.

The from_self() method takes an ORM query object,
turns it into a subquery, then returns a new query
object that will SELECT from that subquery, while transparently
altering subsequent criteria added to the query to
be stated in terms of the subquery.   The current
design direction of SQLAlchemy hopes to
de-emphasize the "transparently altering criteria"
part of the above use case, and to move users towards a
more explicit and model of usage where a subquery should
be created and used explicitly using the aliased()
construct, which is now very mature and can be used in ways
that were not available when from_self() was first introduced.

On the SQLAlchemy side, from_self() has proven to be one
of the most difficult features to maintain and test
as it can easily lead to extremely complicated scenarios, and
while I am also experimenting with some alternatives that
may still retain some of the "automatic translation" features,
those features are still proving to add similar internal
complexity which is having me lean towards the original
plan of removing open-ended "entity translation" features
like that of from_self() at least through the start
of the 2.0 series.

A code search for all of Openstack shows that the
two files modified here are the only usages of the
from_self() method throughout all of searchable Openstack
code.  This speaks to the general obscurity of this method,
although neutron's Subnet code is actually using this
method as intended.    The new approach necessarily changes
some of the method signatures here so that the explicit
"subquery" entity can be passed; code searches again
show that these methods are not being called anywhere
outside, so the query_filter_service_subnets method
becomes the private _query_entity_service_subnets method.


Closes-Bug: #2004263

Change-Id: Icec998873221ac8e6a1566a157b2044c1f6cd7f3
4 months ago
api-ref Fix some typos 7 years ago
devstack Remove note about migration from lib/neutron-legacy to lib/neutron 5 months ago
doc Add doc note on nf_conntrack module requirement 4 months ago
etc Add an env variable "PROCESS_TAG" in ``ProcessManager`` 5 months ago
neutron Propose replacement of ORM from_self() 4 months ago
playbooks Limit tox version to <4 6 months ago
rally-jobs [ci] Fix several rally task arguments 3 years ago
releasenotes Imported Translations from Zanata 4 months ago
roles Use same ovs/ovn versions in local test setups 6 months ago
tools Merge "Remove deprecated "list_moved_globals" script" 5 months ago
vagrant/ovn Fix local neutron folder path in ovn/sparse/Vagrantfile 3 years ago
zuul.d Use dhcpcd client in the tempest slow jobs 4 months ago
.coveragerc Cleanup coverage configuration 7 years ago
.gitignore Ignore reno artefacts (RELEASENOTES.rst and reno.cache) 4 months ago
.gitreview OpenDev Migration Patch 4 years ago
.mailmap Add mailmap entry 9 years ago
.pylintrc Update .pylintrc 6 months ago
.stestr.conf Fix post gate hook to accommodate for new os-testr 6 years ago
CONTRIBUTING.rst [Community goal] Add contributor and PTL guide 3 years ago
HACKING.rst Follow up for replacing assertItemsEqual 2 years ago
LICENSE Adding Apache Version 2.0 license file. This is the official license agreement under which Quantum code is available to 12 years ago
README.rst Doc: make the contributor guide more visible 11 months ago
TESTING.rst Amend documentation for fullstack tests 6 months ago
bindep.txt Drop vzctl dep from bindep package list 1 year ago
plugin.spec Add OVN migration OSP 16.2 option 2 years ago
requirements.txt Bump the minimum pyroute2 version to 0.7.3 4 months ago
setup.cfg Merge "Fix missing [designate] options" 6 months ago Updated from global requirements 6 years ago
test-requirements.txt Follow-up: Move linters dependencies to tox.ini 2 years ago
tox.ini Temporary update envlist for tox4 5 months ago


OpenStack Neutron


Neutron is an OpenStack project to provide "network connectivity as a service" between interface devices (e.g., vNICs) managed by other OpenStack services (e.g., Nova).

To learn more about neutron:

If you would like to contribute to Neutron, please read the file CONTRIBUTING.rst or see the Neutron contributor guide:

Get in touch via email. Use [Neutron] in your subject.