Commit Graph

13 Commits

Author SHA1 Message Date
Brian Haley e63cdd216b Alphabetize some of the admin and contrib docs
Over time docs were added or updated such that they were
no longer in alphabetical order based on the index order
or their title strings. Tried to fix it up a bit along
with some capitalization.

Trivialfix

Change-Id: I948b2a1c86faaffed07adcf0198a3fba72401abe
2023-09-18 13:12:31 -04:00
yatinkarel 4e395c5d2b Fix links for Source code references
These are leftover from opendev migration and
without this fix the links results into Not Found.

Mainly need to use "src" in place of "tree" to
get these links working with opendev.org.

Also used git tags where line references are used
as branched references do not persist. And for line
references use #L in place of #n as that's where it
get's redirected.

Also update references for zuul and use of
devstack-vm-gate-wrap.sh in neutron functional jobs.

Change-Id: I92d11c99a17dab80d4b91da49f341f9ba202bcfe
2021-12-02 20:12:34 +05:30
Slawek Kaplonski bf35cf65c8 Finish the new DB engine facade migration
This patch implements the last code bits pending to
conclude the new DB engine facade migration.

Due to the resultant interactions in the modified code, is
not possible to submit smaller patches; this code must be
migrated at once.

Partially-Implements blueprint: enginefacade-switch

Signed-off-by: Slawek Kaplonski <skaplons@redhat.com>
Co-Authored-By: Rodolfo Alonso Hernandez <ralonsoh@redhat.com>

Change-Id: Id3f09b78c8d0a8daa7ec4fa6f5bf79f7d5ab8f8b
2020-11-24 09:20:35 +00:00
Nate Johnston 184530cf7b Add guidelines for removal of OVO version downgrades
OVO objects include downgrade code, so that if a new object version is
introduced but an agent is running old code that does not understand it,
OVO can downgrade the object to something compatible with the older
version.  But this code should not be permanent.  This change codifies
guidelines for how long that code should exist and when it can be
removed.  It also adds pointers to information regarding the upgrade
strategies for several major distributions.

Change-Id: Ia0a6c3de932ff032aca59ac9b799faff7e261f2c
2019-06-06 18:00:46 -04:00
Rodolfo Alonso Hernandez 079de324ab Add documentation about OVO "obj_make_compatible"
Adds new documentation about how to implement
"VersionedObject.obj_make_compatible" when a new object version
is released and how to test it.

Change-Id: I055cf2ae493759562175f9d859d2a065458ca7e2
Related-Bug: #1828437
2019-05-22 10:31:20 +00:00
ZhongShengping 161e6b80f0 Replace git.openstack.org URLs with opendev.org URLs
Thorough replacement of git.openstack.org URLs with their opendev.org
counterparts.

Change-Id: Ifc446e00d7f69cb23411b3a50c8d880c719f1e73
2019-04-23 10:00:45 +08:00
Boden R a73deb9909 remove unused methods from CommonDbMixin
The register_model_query_hook and _apply_dict_extend_functions methods
from CommonDbMixin is not being used by consumers today. This patch
removes them and updates any doc references as well.

NeutronLibImpact

Change-Id: I3e72d7f33f5a7b0c9c023295302929410f94eefb
2018-11-20 06:55:13 -07:00
Boden R 100491cec7 use object utils from neutron-lib
The neutron.object.utils module was rehomed into neutron-lib with
https://review.openstack.org/#/c/557809/
This patch consumes it by removing the neutron.objects.utils module
and corresponding test module, updating the contributor internals for
objects and using lib's version of the module.

NeutronLibImpact

Change-Id: If53d0ad660851275462d2641ed1829cdb4c32d05
2018-06-11 11:10:53 -06:00
Ihar Hrachyshka 92b9581531 objects: automatically detect whether engine facade is used
While we added new_facade object attribute to framework and it has its
niche and used in some stadium subprojects, it's not ideal because it's
global to an object. Meaning that if you mark an object for new_facade =
True, *all* business logic using the object must also switch to new
facade in the same step, which is a pain and sometimes close to
impossible to do without changing thousands loosely related lines of
code in multiple modules. It would be nice to instead use objects as
usual in different contexts - some using engine facade and some still
using session.begin(...) - and allow the OVO framework to pick the right
way to nest subtransactions.

This patch does exactly that. We call an internal function from oslo.db
and check whether it raises an exception. If it does, it means that the
engine facade is not used; otherwise, we use the new style of nested
transactions management.

By default, if session is not active when OVO action is called, we stick
to the old facade. Once we are done with switching the rest of the
plugin code / OVO objects to the new facade, we will rip off the
transitionary logic.

Change-Id: Ia05df925eccf3c9d397748f282e995203a058de9
Partially-Implements: blueprint enginefacade-switch
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
2018-04-27 21:50:19 +00:00
Ihar Hrachyshka 6f83466307 Allow objects to opt in new engine facade
New facade is enabled by setting new_facade = True for the object of
interest. With new_facade on, all OVO actions will use the new reader /
writer decorator to activate sessions.

There are two new facade decorators added to OVO: db_context_reader and
db_context_write that should be used instead of explicit
autonested_transaction / reader.using / writer.using in OVO context.

All neutron.objects.db.api helpers now receive OVO classes / objects
instead of model classes, since they need to know which type of engine
facade to use for which object. While it means we change signatures for
those helper functions, they are not used anywhere outside neutron tree
except vmware-nsx unit tests, and the latter pass anyway because the
tests completely mock out them disregarding their signatures.

This patch also adds several new OVO objects to be able to continue
using neutron.objects.db.api helpers to persist models that previously
didn't have corresponding OVO classes.

Finally, the patch adds registration for missing options in
neutron/tests/unit/extensions/test_qos_fip.py to be able to debug
failures in those unit tests. Strictly speaking, this change doesn't
belong to the patch, but I include it nevertheless to speed up merge in
time close to release.

There are several non-obvious changes included, specifically:

- in neutron.objects.base, decorator() that refreshes / expunges models
from the active session now opens a subtransaction for the whole span of
call / refresh / expunge, so that we can safely refresh model regardless
of whether caller opened another parent subtransaction (it was not the
case for create_subnetpool in base db plugin code).

- in neutron.db.l3_fip_qos, removed code that updates obj.db_model
relationship directly after corresponding insertions for child policy
binding model. This code is not needed because the only caller to the
_process_extra_fip_qos_update method refetches latest state of floating
ip OVO object anyway, and this code triggers several unit test failures.

- unit tests checking that a single commit happens for get_object and
get_objects are no longer valid for new facade objects that use reader
decorator that doesn't commit but close. This change is as intended, so
unit tests were tweaked to check close for new facade objects.

Change-Id: I15ec238c18a464f977f7d1079605b82965052311
Related-Bug: #1746996
2018-02-09 04:07:34 +00:00
Lujin 28e8265651 Add initialization in StringMatchingFilterObj class
In order to support LIKE statement filter in OVO objects,
StringMatchingFilterObj class is introduced. However, this class
does not provide initial attributes of "starts", "contains" and
"ends".

In real usage, if these attributes are not initialized, we will
hit failures in method apply_filters() in db/_model_query.py.

This patch adds the initialization back.

Secondly, a typo of "obj_utils.StringMatchingContains" is revised
in this patch too.

Change-Id: If828068d8d08ff09dff6c63d53320bc397d32448
Closes-Bug: #1724446
2017-11-03 13:25:21 +09:00
Akihiro Motoki d3c393ff6b Update the documentation link for doc migration
* Update the URLs affected by the doc-migration
  (/developer/<project>/ to <project>/latest/)
* Follow content rearrangement
* Convert links to local documents into :doc: or :ref:
* Use https instead of http for the updated links on docs.openstack.org.

Part of the doc-migration work.

Change-Id: I62e317d9198f175a43d73bbfd419b6878de90d5a
2017-07-22 18:46:13 +09:00
Akihiro Motoki 2a47ffd96d Rearrange existing documentation to fit the new standard layout
For more detail, see the doc migration spec.
http://specs.openstack.org/openstack/docs-specs/specs/pike/os-manuals-migration.html

Change-Id: I142a686a3abbe65138a9f3296cd21fc21fbd763a
2017-07-08 05:49:56 +00:00