././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1645028042.6212587 oslo.upgradecheck-1.5.0/0000775000175000017500000000000000000000000015140 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/.coveragerc0000664000175000017500000000015700000000000017264 0ustar00zuulzuul00000000000000[run] branch = True source = oslo_upgradecheck omit = oslo_upgradecheck/tests/* [report] ignore_errors = True ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/.mailmap0000664000175000017500000000013100000000000016554 0ustar00zuulzuul00000000000000# Format is: # # ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/.pre-commit-config.yaml0000664000175000017500000000252300000000000021423 0ustar00zuulzuul00000000000000# We from the Oslo project decided to pin repos based on the # commit hash instead of the version tag to prevend arbitrary # code from running in developer's machines. To update to a # newer version, run `pre-commit autoupdate` and then replace # the newer versions with their commit hash. default_language_version: python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: 9136088a246768144165fcc3ecc3d31bb686920a # v3.3.0 hooks: - id: trailing-whitespace # Replaces or checks mixed line ending - id: mixed-line-ending args: ['--fix', 'lf'] exclude: '.*\.(svg)$' # Forbid files which have a UTF-8 byte-order marker - id: check-byte-order-marker # Checks that non-binary executables have a proper shebang - id: check-executables-have-shebangs # Check for files that contain merge conflict strings. - id: check-merge-conflict # Check for debugger imports and py37+ breakpoint() # calls in python source - id: debug-statements - id: check-yaml files: .*\.(yaml|yml)$ - repo: local hooks: - id: flake8 name: flake8 additional_dependencies: - hacking>=3.0.1,<3.1.0 language: python entry: flake8 files: '^.*\.py$' exclude: '^(doc|releasenotes|tools)/.*$' ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/.stestr.conf0000664000175000017500000000006300000000000017410 0ustar00zuulzuul00000000000000[DEFAULT] test_path=./oslo_upgradecheck top_dir=./ ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/.zuul.yaml0000664000175000017500000000027400000000000017104 0ustar00zuulzuul00000000000000- project: templates: - publish-openstack-docs-pti - openstack-python3-yoga-jobs - check-requirements - release-notes-jobs-python3 - periodic-stable-jobs ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028042.0 oslo.upgradecheck-1.5.0/AUTHORS0000664000175000017500000000137100000000000016212 0ustar00zuulzuul00000000000000Andreas Jaeger Ben Nemec Charles Short Chris Dent Corey Bryant Daniel Bengtsson Dmitry Tantsur Doug Hellmann Ghanshyam Mann Hervé Beraud Matt Riedemann Moisés Guimarães de Medeiros OpenStack Release Bot Sean McGinnis Slawek Kaplonski Stephen Finucane caoyuan jacky06 pengyuesheng qingszhao ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/CONTRIBUTING.rst0000664000175000017500000000153300000000000017603 0ustar00zuulzuul00000000000000If you would like to contribute to the development of oslo's libraries, first you must take a look to this page: https://specs.openstack.org/openstack/oslo-specs/specs/policy/contributing.html If you would like to contribute to the development of OpenStack, you must follow the steps in this page: http://docs.openstack.org/infra/manual/developers.html If you already have a good understanding of how the system works and your OpenStack accounts are set up, you can skip to the development workflow section of this documentation to learn how changes to OpenStack should be submitted for review via the Gerrit tool: http://docs.openstack.org/infra/manual/developers.html#development-workflow Pull requests submitted through GitHub will be ignored. Bugs should be filed on Launchpad, not GitHub: https://bugs.launchpad.net/oslo.upgradecheck ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028042.0 oslo.upgradecheck-1.5.0/ChangeLog0000664000175000017500000000603700000000000016720 0ustar00zuulzuul00000000000000CHANGES ======= 1.5.0 ----- * Add Python3 yoga unit tests * Update master for stable/xena 1.4.0 ----- * Move flake8 as a pre-commit local target * Add Python3 xena unit tests * Update master for stable/wallaby * Remove lower-constraints remnants * Uncap PrettyTable * Remove six * Dropping lower constraints testing 1.3.0 ----- * Register oslo policy opts explicitly for check\_policy\_json * Fix lower-constraints job 1.2.0 ----- * Add common checks for json to yaml policy file migration * Use TOX\_CONSTRAINTS\_FILE * Use py3 as the default runtime for tox * Add Python3 wallaby unit tests * Update master for stable/victoria * Adding pre-commit 1.1.1 ----- 1.1.0 ----- * Switch to newer openstackdocstheme and reno versions * Align contributing doc with oslo's policy * Bump default tox env from py37 to py38 * Add py38 package metadata * Remove Babel from requirements * Add release notes links to doc index * Add Python3 victoria unit tests * Update master for stable/ussuri 1.0.1 ----- * Update hacking for Python3 * Use unittest.mock instead of third party mock 1.0.0 ----- * remove outdated header * [ussuri][goal] Drop python 2.7 support and testing 0.4.0 ----- * tox: Trivial cleanup * Bump Babel to 2.3.4 on lower-constraint * tox: Keeping going with docs * Switch to Ussuri jobs * Bump the openstackdocstheme extension to 1.20 * Update the constraints url * Update master for stable/train 0.3.2 ----- 0.3.1 ----- * Add Python 3 Train unit tests * Move doc related modules to doc/requirements.txt 0.3.0 ----- * Address nits from json change * Enable JSON results output * Sync Sphinx requirement * Replace git.openstack.org URLs with opendev.org URLs * OpenDev Migration Patch * Dropping the py35 testing * Update master for stable/stein 0.2.1 ----- 0.2.0 ----- * Change python3.5 job to python3.7 job on Stein+ * Add doc params to run and register\_cli\_opts * Move displayed checker title to be in variable * Separate opt registration from command running * Update py33,py34 to py35,py36 * doc: Switch to openstackdocstheme * doc: Remove crud from conf.py file * Change openstack-dev to openstack-discuss 0.1.1 ----- * Force translation of table header 0.1.0 ----- * Use template for lower-constraints zuul job * Move example implementation to docs * Add reno support * Don't run tempest jobs on changes * Add database access details to UpgradeCommands docstring * enable debug output for tests * tighten API for main() * Improve config handling * Modernize tox.ini * Use sphinx-build for all docs venvs * Add lower-constraints job * Shorten UpgradeCheck class names * Add proper documentation * Use python3 by default * Flesh out readme * Add .zuul.yaml and .stestr.conf * Flesh out readme * Add success test case * Handle exceptions from checks * Propagate return code * Add more unit tests * Test \_get\_details * Get coverage job working * Remove history file from docs * Migrate to stestr * Add docstring to main() * Fix pep8 failures * Proper requirements specification * Add \_i18n module * Add i18n support * Initial implementation * Initial commit ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/HACKING.rst0000664000175000017500000000023400000000000016735 0ustar00zuulzuul00000000000000oslo.upgradecheck Style Commandments ==================================== Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/ ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/LICENSE0000664000175000017500000002363700000000000016160 0ustar00zuulzuul00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1645028042.6212587 oslo.upgradecheck-1.5.0/PKG-INFO0000664000175000017500000000314500000000000016240 0ustar00zuulzuul00000000000000Metadata-Version: 1.2 Name: oslo.upgradecheck Version: 1.5.0 Summary: Common code for writing OpenStack upgrade checks Home-page: http://launchpad.net/oslo Author: OpenStack Author-email: openstack-discuss@lists.openstack.org License: UNKNOWN Description: ================= oslo.upgradecheck ================= Common code for writing OpenStack upgrade checks This project contains the common code necessary for writing upgrade checks in OpenStack projects. It includes a module (oslo_upgradecheck.upgradecheck) for the common code as well as an example (oslo_upgradecheck.__main__) of integrating that code into a project. * Free software: Apache license * Documentation: https://docs.openstack.org/oslo.upgradecheck/latest/ * Source: https://opendev.org/openstack/oslo.upgradecheck * Bugs: https://bugs.launchpad.net/oslo.upgradecheck Platform: UNKNOWN Classifier: Environment :: OpenStack Classifier: Intended Audience :: Information Technology Classifier: Intended Audience :: System Administrators Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Requires-Python: >=3.6 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/README.rst0000664000175000017500000000110700000000000016626 0ustar00zuulzuul00000000000000================= oslo.upgradecheck ================= Common code for writing OpenStack upgrade checks This project contains the common code necessary for writing upgrade checks in OpenStack projects. It includes a module (oslo_upgradecheck.upgradecheck) for the common code as well as an example (oslo_upgradecheck.__main__) of integrating that code into a project. * Free software: Apache license * Documentation: https://docs.openstack.org/oslo.upgradecheck/latest/ * Source: https://opendev.org/openstack/oslo.upgradecheck * Bugs: https://bugs.launchpad.net/oslo.upgradecheck ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/babel.cfg0000664000175000017500000000002100000000000016657 0ustar00zuulzuul00000000000000[python: **.py] ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1645028042.6132588 oslo.upgradecheck-1.5.0/doc/0000775000175000017500000000000000000000000015705 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/doc/requirements.txt0000664000175000017500000000045700000000000021177 0ustar00zuulzuul00000000000000# The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. sphinx>=2.0.0,!=2.1.0 # BSD reno>=3.1.0 # Apache-2.0 openstackdocstheme>=2.2.0 # Apache-2.0 ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1645028042.6172588 oslo.upgradecheck-1.5.0/doc/source/0000775000175000017500000000000000000000000017205 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/doc/source/api.rst0000664000175000017500000000016700000000000020514 0ustar00zuulzuul00000000000000===== API ===== upgradecheck module ------------------- .. automodule:: oslo_upgradecheck.upgradecheck :members: ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/doc/source/conf.py0000664000175000017500000000363400000000000020512 0ustar00zuulzuul00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2020 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config import os import sys sys.path.insert(0, os.path.abspath('../..')) # -- Project information ----------------------------------------------------- # General information about the project. copyright = '2018, Oslo Contributors' # -- General configuration ---------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ 'sphinx.ext.autodoc', 'openstackdocstheme' ] # The master toctree document. master_doc = 'index' # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # -- Options for HTML output -------------------------------------------------- # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. html_theme = 'openstackdocs' # -- Options for openstackdocstheme ------------------------------------------- openstackdocs_repo_name = 'openstack/oslo.upgradecheck' openstackdocs_bug_project = 'oslo.upgradecheck' openstackdocs_bug_tag = '' ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/doc/source/contributing.rst0000664000175000017500000000012100000000000022440 0ustar00zuulzuul00000000000000============== Contributing ============== .. include:: ../../CONTRIBUTING.rst ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/doc/source/index.rst0000664000175000017500000000151400000000000021047 0ustar00zuulzuul00000000000000================= oslo.upgradecheck ================= Common code for writing OpenStack upgrade checks. This project can be used to assist with the implementation of a ``$SERVICE-status`` command that responds to parameters of ``upgrade check`` by running upgrade check functions on the existing installation. For further details see :doc:`usage` and the `Nova documentation on upgrade checks`_. .. _`Nova documentation on upgrade checks`: https://docs.openstack.org/nova/latest/reference/upgrade-checks.html Contents ======== .. toctree:: :maxdepth: 2 installation api usage contributing Release Notes ============= Read also the `oslo.upgradecheck Release Notes `_. Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/doc/source/installation.rst0000664000175000017500000000015000000000000022434 0ustar00zuulzuul00000000000000============== Installation ============== At the command line:: $ pip install oslo.upgradecheck ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/doc/source/main.py0000664000175000017500000000245100000000000020505 0ustar00zuulzuul00000000000000# Copyright 2018 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Example CLI command for running upgrade checks""" import sys from oslo_config import cfg from oslo_upgradecheck import upgradecheck class Checks(upgradecheck.UpgradeCommands): def success(self): return upgradecheck.Result(upgradecheck.Code.SUCCESS, 'Always succeeds') def failure(self): return upgradecheck.Result(upgradecheck.Code.FAILURE, 'Always fails') _upgrade_checks = (('always succeeds', success), ('always fails', failure), ) def main(): return upgradecheck.main( conf=cfg.CONF, project='myprojectname', upgrade_command=Checks(), ) if __name__ == '__main__': sys.exit(main()) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/doc/source/usage.rst0000664000175000017500000000413200000000000021043 0ustar00zuulzuul00000000000000======= Usage ======= See the module ``oslo_upgradecheck.__main__`` for an example of how to use this project. Each consuming project should create a class that inherits from :class:`oslo_upgradecheck.upgradecheck.UpgradeCommands` and implement check methods on it. Those check methods should then be added to the ``_upgrade_checks`` tuple so they will be run when the :meth:`oslo_upgradecheck.upgradecheck.UpgradeCommands.check` method is called. For example:: from oslo_upgradecheck import upgradecheck class ProjectSpecificUpgradeCommands(upgradecheck.UpgradeCommands): def an_upgrade_check(self): if everything_is_awesome(): return upgradecheck.Result( upgradecheck.Code.SUCCESS, 'Success details') else: return upgradecheck.Result( upgradecheck.Code.FAILURE, 'Failure details') _upgrade_checks = (('Awesome upgrade check', an_upgrade_check)) oslo.upgradecheck also includes a basic implementation of command line argument handling that can be used to provide the minimum processing needed to implement a ``$SERVICE-status upgrade check`` command. To make use of it, write a method that creates an instance of the class created above, then pass that class's ``check`` function into :func:`oslo_upgradecheck.upgradecheck.main`. The project's ConfigOpts instance must also be passed. In most projects this will just be cfg.CONF. For example:: from oslo_config import cfg def main(): return upgradecheck.main( conf=cfg.CONF, project='myprojectname', upgrade_command=ProjectSpecificUpgradeCommands(), ) The entry point for the ``$SERVICE-status`` command should then point at this function. Alternatively, if a project has its own CLI code that it would prefer to reuse, it simply needs to ensure that the ``inst.check`` method is called when the ``upgrade check`` parameters are passed to the ``$SERVICE-status`` command. Example ------- The following is a fully functional example of implementing a check command: .. literalinclude:: main.py ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1645028042.6172588 oslo.upgradecheck-1.5.0/oslo.upgradecheck.egg-info/0000775000175000017500000000000000000000000022232 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028042.0 oslo.upgradecheck-1.5.0/oslo.upgradecheck.egg-info/PKG-INFO0000664000175000017500000000314500000000000023332 0ustar00zuulzuul00000000000000Metadata-Version: 1.2 Name: oslo.upgradecheck Version: 1.5.0 Summary: Common code for writing OpenStack upgrade checks Home-page: http://launchpad.net/oslo Author: OpenStack Author-email: openstack-discuss@lists.openstack.org License: UNKNOWN Description: ================= oslo.upgradecheck ================= Common code for writing OpenStack upgrade checks This project contains the common code necessary for writing upgrade checks in OpenStack projects. It includes a module (oslo_upgradecheck.upgradecheck) for the common code as well as an example (oslo_upgradecheck.__main__) of integrating that code into a project. * Free software: Apache license * Documentation: https://docs.openstack.org/oslo.upgradecheck/latest/ * Source: https://opendev.org/openstack/oslo.upgradecheck * Bugs: https://bugs.launchpad.net/oslo.upgradecheck Platform: UNKNOWN Classifier: Environment :: OpenStack Classifier: Intended Audience :: Information Technology Classifier: Intended Audience :: System Administrators Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Requires-Python: >=3.6 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028042.0 oslo.upgradecheck-1.5.0/oslo.upgradecheck.egg-info/SOURCES.txt0000664000175000017500000000256600000000000024127 0ustar00zuulzuul00000000000000.coveragerc .mailmap .pre-commit-config.yaml .stestr.conf .zuul.yaml AUTHORS CONTRIBUTING.rst ChangeLog HACKING.rst LICENSE README.rst babel.cfg requirements.txt setup.cfg setup.py test-requirements.txt tox.ini doc/requirements.txt doc/source/api.rst doc/source/conf.py doc/source/contributing.rst doc/source/index.rst doc/source/installation.rst doc/source/main.py doc/source/usage.rst oslo.upgradecheck.egg-info/PKG-INFO oslo.upgradecheck.egg-info/SOURCES.txt oslo.upgradecheck.egg-info/dependency_links.txt oslo.upgradecheck.egg-info/not-zip-safe oslo.upgradecheck.egg-info/pbr.json oslo.upgradecheck.egg-info/requires.txt oslo.upgradecheck.egg-info/top_level.txt oslo_upgradecheck/__init__.py oslo_upgradecheck/_i18n.py oslo_upgradecheck/common_checks.py oslo_upgradecheck/upgradecheck.py oslo_upgradecheck/tests/__init__.py oslo_upgradecheck/tests/test_common_checks.py oslo_upgradecheck/tests/test_upgradecheck.py releasenotes/notes/drop-python27-support-bd23b9c4556739ba.yaml releasenotes/notes/json-output-78a9e19588b7b1e1.yaml releasenotes/source/conf.py releasenotes/source/index.rst releasenotes/source/stein.rst releasenotes/source/train.rst releasenotes/source/unreleased.rst releasenotes/source/ussuri.rst releasenotes/source/victoria.rst releasenotes/source/wallaby.rst releasenotes/source/xena.rst releasenotes/source/_static/.placeholder releasenotes/source/_templates/.placeholder././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028042.0 oslo.upgradecheck-1.5.0/oslo.upgradecheck.egg-info/dependency_links.txt0000664000175000017500000000000100000000000026300 0ustar00zuulzuul00000000000000 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028042.0 oslo.upgradecheck-1.5.0/oslo.upgradecheck.egg-info/not-zip-safe0000664000175000017500000000000100000000000024460 0ustar00zuulzuul00000000000000 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028042.0 oslo.upgradecheck-1.5.0/oslo.upgradecheck.egg-info/pbr.json0000664000175000017500000000005600000000000023711 0ustar00zuulzuul00000000000000{"git_version": "1559e03", "is_release": true}././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028042.0 oslo.upgradecheck-1.5.0/oslo.upgradecheck.egg-info/requires.txt0000664000175000017500000000013500000000000024631 0ustar00zuulzuul00000000000000PrettyTable>=0.7.1 oslo.config>=5.2.0 oslo.i18n>=3.15.3 oslo.policy>=2.0.0 oslo.utils>=4.5.0 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028042.0 oslo.upgradecheck-1.5.0/oslo.upgradecheck.egg-info/top_level.txt0000664000175000017500000000002200000000000024756 0ustar00zuulzuul00000000000000oslo_upgradecheck ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1645028042.6172588 oslo.upgradecheck-1.5.0/oslo_upgradecheck/0000775000175000017500000000000000000000000020621 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/oslo_upgradecheck/__init__.py0000664000175000017500000000000000000000000022720 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/oslo_upgradecheck/_i18n.py0000664000175000017500000000211100000000000022104 0ustar00zuulzuul00000000000000# Copyright 2018 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import oslo_i18n DOMAIN = "oslo_upgradecheck" _translators = oslo_i18n.TranslatorFactory(domain=DOMAIN) # The primary translation function using the well-known name "_" _ = _translators.primary # The contextual translation function using the name "_C" # requires oslo.i18n >=2.1.0 _C = _translators.contextual_form # The plural translation function using the name "_P" # requires oslo.i18n >=2.1.0 _P = _translators.plural_form def get_available_languages(): return oslo_i18n.get_available_languages(DOMAIN) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/oslo_upgradecheck/common_checks.py0000664000175000017500000000350500000000000024006 0ustar00zuulzuul00000000000000# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from oslo_policy import opts as policy_opts from oslo_utils import fileutils from oslo_upgradecheck import upgradecheck """ Common checks which can be used by multiple services. """ def check_policy_json(self, conf): "Checks to see if policy file is JSON-formatted policy file." # NOTE(gmann): This method need [oslo_policy].policy_file # config value so register those options in case they # are not register by services. conf.register_opts(policy_opts._options, group=policy_opts._option_group) msg = ("Your policy file is JSON-formatted which is " "deprecated. You need to switch to YAML-formatted file. " "Use the ``oslopolicy-convert-json-to-yaml`` " "tool to convert the existing JSON-formatted files to " "YAML in a backwards-compatible manner: " "https://docs.openstack.org/oslo.policy/" "latest/cli/oslopolicy-convert-json-to-yaml.html.") status = upgradecheck.Result(upgradecheck.Code.SUCCESS) # Check if policy file exist and is JSON-formatted. policy_path = conf.find_file(conf.oslo_policy.policy_file) if policy_path and fileutils.is_json(policy_path): status = upgradecheck.Result(upgradecheck.Code.FAILURE, msg) return status ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1645028042.6172588 oslo.upgradecheck-1.5.0/oslo_upgradecheck/tests/0000775000175000017500000000000000000000000021763 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/oslo_upgradecheck/tests/__init__.py0000664000175000017500000000000000000000000024062 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/oslo_upgradecheck/tests/test_common_checks.py0000664000175000017500000001011300000000000026200 0ustar00zuulzuul00000000000000# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import fixtures import os.path import tempfile import yaml from oslo_config import cfg from oslo_config import fixture as config from oslo_policy import opts as policy_opts from oslo_serialization import jsonutils from oslotest import base from oslo_upgradecheck import common_checks from oslo_upgradecheck import upgradecheck class TestUpgradeCheckPolicyJSON(base.BaseTestCase): def setUp(self): super(TestUpgradeCheckPolicyJSON, self).setUp() conf_fixture = self.useFixture(config.Config()) conf_fixture.load_raw_values() self.conf = conf_fixture.conf self.conf.register_opts(policy_opts._options, group=policy_opts._option_group) self.cmd = upgradecheck.UpgradeCommands() self.cmd._upgrade_checks = (('Policy File JSON to YAML Migration', (common_checks.check_policy_json, {'conf': self.conf})),) self.data = { 'rule_admin': 'True', 'rule_admin2': 'is_admin:True' } self.temp_dir = self.useFixture(fixtures.TempDir()) fd, self.json_file = tempfile.mkstemp(dir=self.temp_dir.path) fd, self.yaml_file = tempfile.mkstemp(dir=self.temp_dir.path) with open(self.json_file, 'w') as fh: jsonutils.dump(self.data, fh) with open(self.yaml_file, 'w') as fh: yaml.dump(self.data, fh) original_search_dirs = cfg._search_dirs def fake_search_dirs(dirs, name): dirs.append(self.temp_dir.path) return original_search_dirs(dirs, name) mock_search_dir = self.useFixture( fixtures.MockPatch('oslo_config.cfg._search_dirs')).mock mock_search_dir.side_effect = fake_search_dirs def test_policy_json_file_fail_upgrade(self): # Test with policy json file full path set in config. self.conf.set_override('policy_file', self.json_file, group="oslo_policy") self.assertEqual(upgradecheck.Code.FAILURE, self.cmd.check()) def test_policy_yaml_file_pass_upgrade(self): # Test with full policy yaml file path set in config. self.conf.set_override('policy_file', self.yaml_file, group="oslo_policy") self.assertEqual(upgradecheck.Code.SUCCESS, self.cmd.check()) def test_no_policy_file_pass_upgrade(self): # Test with no policy file exist, means use policy from code. self.conf.set_override('policy_file', 'non_exist_file', group="oslo_policy") self.assertEqual(upgradecheck.Code.SUCCESS, self.cmd.check()) def test_default_policy_yaml_file_pass_upgrade(self): self.conf.set_override('policy_file', 'policy.yaml', group="oslo_policy") tmpfilename = os.path.join(self.temp_dir.path, 'policy.yaml') with open(tmpfilename, 'w') as fh: yaml.dump(self.data, fh) self.assertEqual(upgradecheck.Code.SUCCESS, self.cmd.check()) def test_old_default_policy_json_file_fail_upgrade(self): self.conf.set_override('policy_file', 'policy.json', group="oslo_policy") tmpfilename = os.path.join(self.temp_dir.path, 'policy.json') with open(tmpfilename, 'w') as fh: jsonutils.dump(self.data, fh) self.assertEqual(upgradecheck.Code.FAILURE, self.cmd.check()) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/oslo_upgradecheck/tests/test_upgradecheck.py0000664000175000017500000000655300000000000026032 0ustar00zuulzuul00000000000000# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """ test_upgradecheck ---------------------------------- Tests for `upgradecheck` module. """ import os.path import subprocess import sys from unittest import mock from oslo_config import cfg from oslotest import base from oslo_upgradecheck import upgradecheck class TestUpgradeCheckResult(base.BaseTestCase): def test_details(self): result = upgradecheck.Result(upgradecheck.Code.SUCCESS, 'test details') self.assertEqual(0, result.code) self.assertEqual('test details', result.details) class TestCommands(upgradecheck.UpgradeCommands): def success(self): return upgradecheck.Result(upgradecheck.Code.SUCCESS, 'Always succeeds') def warning(self): return upgradecheck.Result(upgradecheck.Code.WARNING, 'Always warns') def failure(self): return upgradecheck.Result(upgradecheck.Code.FAILURE, 'Always fails') _upgrade_checks = (('always succeeds', success), ('always warns', warning), ('always fails', failure), ) class SuccessCommands(TestCommands): _upgrade_checks = () class TestUpgradeCommands(base.BaseTestCase): def test_get_details(self): result = upgradecheck.Result(upgradecheck.Code.SUCCESS, '*' * 70) upgrade_commands = upgradecheck.UpgradeCommands() details = upgrade_commands._get_details(result) wrapped = '*' * 60 + '\n ' + '*' * 10 self.assertEqual(wrapped, details) def test_check(self): inst = TestCommands() result = inst.check() self.assertEqual(upgradecheck.Code.FAILURE, result) class TestMain(base.BaseTestCase): def _run_test(self, upgrade_command, expected): conf = cfg.ConfigOpts() result = upgradecheck.main( conf=conf, project='oslo-upgradecheck-test', upgrade_command=upgrade_command, argv=['upgrade', 'check'], ) self.assertEqual(expected, result) def test_main(self): inst = TestCommands() self._run_test(inst, upgradecheck.Code.FAILURE) def test_main_exception(self): raises = mock.Mock() raises.check.side_effect = Exception('test exception') self._run_test(raises, 255) def test_main_success(self): inst = SuccessCommands() self._run_test(inst, 0) class TestExampleFile(base.BaseTestCase): def test_example_main(self): path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../doc/source/main.py') # The example includes both a passing and failing test, which means the # overall result is failure. self.assertEqual( upgradecheck.Code.FAILURE, subprocess.call([sys.executable, path, 'upgrade', 'check'])) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/oslo_upgradecheck/upgradecheck.py0000664000175000017500000002102000000000000023613 0ustar00zuulzuul00000000000000# Copyright 2018 Red Hat Inc. # Copyright 2016 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json import sys import textwrap import traceback import enum from oslo_config import cfg import prettytable from oslo_upgradecheck._i18n import _ CONF = None class Code(enum.IntEnum): """Status codes for the upgrade check command""" # All upgrade readiness checks passed successfully and there is # nothing to do. SUCCESS = 0 # At least one check encountered an issue and requires further # investigation. This is considered a warning but the upgrade may be OK. WARNING = 1 # There was an upgrade status check failure that needs to be # investigated. This should be considered something that stops an upgrade. FAILURE = 2 UPGRADE_CHECK_MSG_MAP = { Code.SUCCESS: _('Success'), Code.WARNING: _('Warning'), Code.FAILURE: _('Failure'), } class Result(object): """Class used for 'nova-status upgrade check' results. The 'code' attribute is a Code enum. The 'details' attribute is a translated message generally only used for checks that result in a warning or failure code. The details should provide information on what issue was discovered along with any remediation. """ def __init__(self, code, details=None): super(Result, self).__init__() self.code = code self.details = details class UpgradeCommands(object): """Base class for upgrade checks This class should be inherited by a class in each project that provides the actual checks. Those checks should be added to the _upgrade_checks class member so that they are run when the ``check`` method is called. The subcommands here must not rely on the service object model since they should be able to run on n-1 data. Any queries to the database should be done through the sqlalchemy query language directly like the database schema migrations. """ display_title = _('Upgrade Check Results') _upgrade_checks = () def _get_details(self, upgrade_check_result): if upgrade_check_result.details is not None: # wrap the text on the details to 60 characters return '\n'.join(textwrap.wrap(upgrade_check_result.details, 60, subsequent_indent=' ')) def check(self): """Performs checks to see if the deployment is ready for upgrade. These checks are expected to be run BEFORE services are restarted with new code. :returns: Code """ return_code = Code.SUCCESS # This is a list if 2-item tuples for the check name and it's results. check_results = [] for name, func in self._upgrade_checks: if isinstance(func, tuple): func_name, kwargs = func result = func_name(self, **kwargs) else: result = func(self) # store the result of the check for the summary table check_results.append((name, result)) # we want to end up with the highest level code of all checks if result.code > return_code: return_code = result.code # We're going to build a summary table that looks like: # +----------------------------------------------------+ # | Upgrade Check Results | # +----------------------------------------------------+ # | Check: Cells v2 | # | Result: Success | # | Details: None | # +----------------------------------------------------+ # | Check: Placement API | # | Result: Failure | # | Details: There is no placement-api endpoint in the | # | service catalog. | # +----------------------------------------------------+ # Since registering opts can be overridden by consuming code, we can't # assume that our locally defined option exists. if (hasattr(CONF, 'command') and hasattr(CONF.command, 'json') and CONF.command.json): # NOTE(bnemec): We use str on the translated string to # force immediate translation if lazy translation is in use. # See lp1801761 for details. output = {'name': str(self.display_title), 'checks': []} for name, result in check_results: output['checks'].append( {'check': name, 'result': result.code, 'details': result.details} ) print(json.dumps(output)) else: # NOTE(bnemec): We use str on the translated string to # force immediate translation if lazy translation is in use. # See lp1801761 for details. t = prettytable.PrettyTable( [str(self.display_title)], hrules=prettytable.ALL) t.align = 'l' for name, result in check_results: cell = ( _('Check: %(name)s\n' 'Result: %(result)s\n' 'Details: %(details)s') % { 'name': name, 'result': UPGRADE_CHECK_MSG_MAP[result.code], 'details': self._get_details(result), } ) t.add_row([cell]) print(t) return return_code def register_cli_options(conf, upgrade_command): """Set up the command line options. Adds a subcommand to support 'upgrade check' on the command line. :param conf: An oslo.confg ConfigOpts instance on which to register the upgrade check arguments. :param upgrade_command: The UpgradeCommands instance. """ def add_parsers(subparsers): upgrade_action = subparsers.add_parser('upgrade') upgrade_action.add_argument('check') upgrade_action.set_defaults(action_fn=upgrade_command.check) upgrade_action.add_argument( '--json', action='store_true', help='Output the results in JSON format. Default is to print ' 'results in human readable table format.') opt = cfg.SubCommandOpt('command', handler=add_parsers) conf.register_cli_opt(opt) def run(conf): """Run the requested command. :param conf: An oslo.confg ConfigOpts instance on which the upgrade commands have been previously registered. """ try: return conf.command.action_fn() except Exception: print(_('Error:\n%s') % traceback.format_exc()) # This is 255 so it's not confused with the upgrade check exit codes. return 255 def main(conf, project, upgrade_command, argv=sys.argv[1:], default_config_files=None): """Simple implementation of main for upgrade checks This can be used in upgrade check commands to provide the minimum necessary parameter handling and logic. :param conf: An oslo.confg ConfigOpts instance on which to register the upgrade check arguments. :param project: The name of the project, to be used as an argument to the oslo_config.ConfigOpts instance to find configuration files. :param upgrade_command: The UpgradeCommands instance. :param argv: The command line arguments to parse. Defaults to sys.argv[1:]. :param default_config_files: The configuration files to load. For projects that use non-standard default locations for the configuration files, use this to override the search behavior in oslo.config. """ global CONF register_cli_options(conf, upgrade_command) conf( args=argv, project=project, default_config_files=default_config_files, ) CONF = conf return run(conf) ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1645028042.609259 oslo.upgradecheck-1.5.0/releasenotes/0000775000175000017500000000000000000000000017631 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1645028042.6172588 oslo.upgradecheck-1.5.0/releasenotes/notes/0000775000175000017500000000000000000000000020761 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/releasenotes/notes/drop-python27-support-bd23b9c4556739ba.yaml0000664000175000017500000000017700000000000030240 0ustar00zuulzuul00000000000000--- upgrade: - | Support for Python 2.7 has been dropped. The minimum version of Python now supported is Python 3.6. ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/releasenotes/notes/json-output-78a9e19588b7b1e1.yaml0000664000175000017500000000041500000000000026330 0ustar00zuulzuul00000000000000--- features: - | oslo.upgradecheck now supports the command line flag ``--json`` to have the upgrade check results output in a compact, machine readable JSON format. The default output without this flag remains a human readable table of the results. ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1645028042.6212587 oslo.upgradecheck-1.5.0/releasenotes/source/0000775000175000017500000000000000000000000021131 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1645028042.6212587 oslo.upgradecheck-1.5.0/releasenotes/source/_static/0000775000175000017500000000000000000000000022557 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/releasenotes/source/_static/.placeholder0000664000175000017500000000000000000000000025030 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1645028042.6212587 oslo.upgradecheck-1.5.0/releasenotes/source/_templates/0000775000175000017500000000000000000000000023266 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/releasenotes/source/_templates/.placeholder0000664000175000017500000000000000000000000025537 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/releasenotes/source/conf.py0000664000175000017500000000314400000000000022432 0ustar00zuulzuul00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2020 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Project information ----------------------------------------------------- copyright = '2018, Oslo Contributors' author = 'Oslo Contributors' # The short X.Y version version = '' # The full version, including alpha/beta/rc tags release = '' # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ 'reno.sphinxext', 'openstackdocstheme', ] # The master toctree document. master_doc = 'index' # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'openstackdocs' ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/releasenotes/source/index.rst0000664000175000017500000000025000000000000022767 0ustar00zuulzuul00000000000000oslo.upgradecheck Release Notes =============================== .. toctree:: :maxdepth: 1 unreleased xena wallaby victoria ussuri train stein ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/releasenotes/source/stein.rst0000664000175000017500000000022100000000000023000 0ustar00zuulzuul00000000000000=================================== Stein Series Release Notes =================================== .. release-notes:: :branch: stable/stein ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/releasenotes/source/train.rst0000664000175000017500000000017600000000000023004 0ustar00zuulzuul00000000000000========================== Train Series Release Notes ========================== .. release-notes:: :branch: stable/train ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/releasenotes/source/unreleased.rst0000664000175000017500000000016000000000000024007 0ustar00zuulzuul00000000000000============================== Current Series Release Notes ============================== .. release-notes:: ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/releasenotes/source/ussuri.rst0000664000175000017500000000020200000000000023207 0ustar00zuulzuul00000000000000=========================== Ussuri Series Release Notes =========================== .. release-notes:: :branch: stable/ussuri ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/releasenotes/source/victoria.rst0000664000175000017500000000021200000000000023476 0ustar00zuulzuul00000000000000============================= Victoria Series Release Notes ============================= .. release-notes:: :branch: stable/victoria ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/releasenotes/source/wallaby.rst0000664000175000017500000000020600000000000023314 0ustar00zuulzuul00000000000000============================ Wallaby Series Release Notes ============================ .. release-notes:: :branch: stable/wallaby ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/releasenotes/source/xena.rst0000664000175000017500000000017200000000000022616 0ustar00zuulzuul00000000000000========================= Xena Series Release Notes ========================= .. release-notes:: :branch: stable/xena ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/requirements.txt0000664000175000017500000000055200000000000020426 0ustar00zuulzuul00000000000000# The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. oslo.config>=5.2.0 # Apache-2.0 oslo.i18n>=3.15.3 # Apache-2.0 PrettyTable>=0.7.1 # BSD oslo.utils>=4.5.0 # Apache-2.0 oslo.policy>=2.0.0 # Apache-2.0 ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1645028042.6212587 oslo.upgradecheck-1.5.0/setup.cfg0000664000175000017500000000231300000000000016760 0ustar00zuulzuul00000000000000[metadata] name = oslo.upgradecheck summary = Common code for writing OpenStack upgrade checks description-file = README.rst author = OpenStack author-email = openstack-discuss@lists.openstack.org home-page = http://launchpad.net/oslo python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology Intended Audience :: System Administrators License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3 :: Only Programming Language :: Python :: Implementation :: CPython [files] packages = oslo_upgradecheck [compile_catalog] directory = oslo.upgradecheck/locale domain = oslo.upgradecheck [update_catalog] domain = oslo.upgradecheck output_dir = oslo.upgradecheck/locale input_file = oslo.upgradecheck/locale/oslo.upgradecheck.pot [extract_messages] keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg output_file = oslo.upgradecheck/locale/oslo.upgradecheck.pot [egg_info] tag_build = tag_date = 0 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/setup.py0000664000175000017500000000126200000000000016653 0ustar00zuulzuul00000000000000# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. # See the License for the specific language governing permissions and # limitations under the License. import setuptools setuptools.setup( setup_requires=['pbr'], pbr=True) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/test-requirements.txt0000664000175000017500000000052200000000000021400 0ustar00zuulzuul00000000000000# The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. hacking>=3.0,<3.1.0 # Apache-2.0 oslotest>=3.5.0 stestr>=2.0.0 pre-commit>=2.6.0 # MIT oslo.serialization>=2.21.1 # Apache-2.0 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1645028003.0 oslo.upgradecheck-1.5.0/tox.ini0000664000175000017500000000270000000000000016452 0ustar00zuulzuul00000000000000[tox] minversion = 3.1.1 envlist = py3,pep8 skipsdist = True ignore_basepython_conflict = true [testenv] basepython = python3 usedevelop = True setenv = OS_DEBUG=1 OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt commands = stestr run --slowest {posargs} [testenv:pep8] commands = pre-commit run -a [testenv:venv] commands = {posargs} [testenv:cover] deps = {[testenv]deps} coverage setenv = PYTHON=coverage run --source oslo_upgradecheck --parallel-mode commands = stestr run {posargs} coverage combine coverage html -d cover coverage xml -o cover/coverage.xml [testenv:docs] whitelist_externals = rm deps = {[testenv]deps} -r{toxinidir}/doc/requirements.txt commands = rm -rf doc/build sphinx-build -W --keep-going -b html doc/source doc/build/html [testenv:releasenotes] deps = {[testenv:docs]deps} whitelist_externals = rm commands = rm -rf releasenotes/build sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html [testenv:debug] commands = oslo_debug_helper {posargs} [flake8] # E123, E125 skipped as they are invalid PEP-8. show-source = True ignore = E123,E125,W504 builtins = _ exclude=.venv,.git,.tox,dist,doc,releasenotes,*lib/python*,*egg,build [hacking] import_exception = oslo_upgradecheck._i18n