In some places, indentation was wrong.
In this patchset, they are fixed.
Also, I did some readibility improvements which I've found
during indentation fixing.
Change-Id: I298b9b0c557c07848c69ed23b0faa3a3147d055d
This patch set is for breaking the circular dependency between
Agent/AgentVersionedObject.
See:https://review.openstack.org/#/c/297887/ for details.
Change-Id: I7be4ce2513e49e6da46a7bdffb8538613f0be7c7
Partial-Bug: #1597913
Co-Authored-By: Victor Morales <victor.morales@intel.com>
Co-Authored-By: Sindhu Devale <sindhu.devale@intel.com>
apply_filters_to_query was performing an outerjoin to rbac_entries
unconditionally when model_query could have already performed an
outerjoin (if the request was from an unprivileged user) and/or when
the join wasn't even necessary (the '?shared=False' query that uses
a subquery and not a join). This resulted in terrible performance
because of cartesian products of rbac entries with themselves.
This fixes the issue by ensuring there is only an outerjoin to the
rbac table if it's going to be used for a filter condition and it's
not already joined because of a query scope imposed due to the user
not being privileged.
Unfortunately this doesn't include tests to prevent regressions because
we don't have any methods for testing the performance of individual
queries.
Closes-Bug: #1630939
Change-Id: I4364f4a97a29041e86b2fbd8aa895578153f4cf9
This adds an order_by clause to the fixed_ips relationship
on the port object to ensure that the fixed_ip ordering is
consistent between a create, an update, and a get request
for a port. Without it we were at the mercy of the sql backend
to determine how it felt like ordering them on the join condition.
Closes-Bug: #1630410
Change-Id: I523e0ab6e376f5ff6205b1cc1748aa6d546919cb
Releasenote translation publishing is being prepared. 'locale_dirs'
needs to be defined in conf.py to generate translated version of the
release notes.
Note that this repository might not get translated release notes - or
no translations at all - but we add the entry here nevertheless to
prepare for it.
Change-Id: Ic0d37f26c59aeed3a55a5b229404c1d18bf248f0
As there would be issue of cyclic imports while implementation of
objects for segments which has db models definition and mixins in same
file, this patch will relocate segment models.
Change-Id: I6f5aea69a0f7f1647bb06c86f1fac9367717033c
Partial-Bug: #1597913
Co-Authored-By: Victor Morales <victor.morales@intel.com>
This patch will separate flavor and service profile db models from
mixins for Oslo-Versioned Objects implementation work.
Change-Id: Ia35d24c075dc716e44fbf8a9b6a2ebb0297e7aa9
Partial-Bug: #1597913
With this change the L3 DVR code for add_router_interface
will always generate ROUTER_INTERFACE AFTER_CREATE notifications,
even in the absence of a gateway on the router.
Change-Id: I2eae49b06cad0c42950ac76f1db7ea6e37e308b9
Closes-Bug: 1629861