././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8739161 python_masakariclient-8.6.0/0000775000175000017500000000000000000000000016140 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/.coveragerc0000664000175000017500000000011300000000000020254 0ustar00zuulzuul00000000000000[run] branch = True source = masakariclient [report] ignore_errors = True ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/.mailmap0000664000175000017500000000013100000000000017554 0ustar00zuulzuul00000000000000# Format is: # # ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/.stestr.conf0000664000175000017500000000007400000000000020412 0ustar00zuulzuul00000000000000[DEFAULT] test_path=./masakariclient/tests/unit top_dir=./ ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/.zuul.yaml0000664000175000017500000000055700000000000020110 0ustar00zuulzuul00000000000000- project: templates: - check-requirements - openstack-python3-jobs - openstackclient-plugin-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 - periodic-stable-jobs - periodic-jobs-with-oslo-master check: jobs: - openstack-tox-linters gate: jobs: - openstack-tox-linters ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695570.0 python_masakariclient-8.6.0/AUTHORS0000664000175000017500000000364300000000000017216 0ustar00zuulzuul00000000000000Andreas Jaeger Corey Bryant Dinesh Bhor Doug Hellmann Ghanshyam Mann Hervé Beraud Jieqiang Sui Keiji Niwa Kengo Takahara Kengo Takahara Monty Taylor Nguyen Hai OpenStack Release Bot Radosław Piliszek Rikimaru Honjo Sean McGinnis Shilpa Devharakar Takahiro Izumi XinxinShen ZhijunWei akhiljain23 avnish bhagyashris dengzhaosen dineshbhor ericxiett gugug hussainchachuliya jacky06 jayashri bidwe kangyufei liushuobj melissaml nehaalhat nizam openstack openstack poojajadhav qingszhao ricolin samp sampath shilpa.devharakar songwenping sunjia suzhengwei suzhengwei tpatil zhangbailin zhangboye zhangyangyang ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/CONTRIBUTING.rst0000664000175000017500000000122300000000000020577 0ustar00zuulzuul00000000000000The source repository for this project can be found at: https://opendev.org/openstack/python-masakariclient Pull requests submitted through GitHub are not monitored. To start contributing to OpenStack, follow the steps in the contribution guide to set up and use Gerrit: https://docs.openstack.org/contributors/code-and-documentation/quick-start.html Bugs should be filed on Launchpad: https://bugs.launchpad.net/python-masakariclient For more specific information about contributing to this repository, see the python-masakariclient contributor guide: https://docs.openstack.org/python-masakariclient/latest/contributor/contributing.html ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695570.0 python_masakariclient-8.6.0/ChangeLog0000664000175000017500000001166000000000000017716 0ustar00zuulzuul00000000000000CHANGES ======= 8.6.0 ----- * Update master for stable/2024.2 8.5.0 ----- * reno: Update master for unmaintained/zed * Update master for stable/2024.1 * reno: Update master for unmaintained/xena * reno: Update master for unmaintained/wallaby * reno: Update master for unmaintained/victoria * reno: Update master for unmaintained/yoga 8.4.0 ----- * Update python unit testing template 8.3.0 ----- * support for Masakari VMove 8.2.0 ----- * Update master for stable/2023.1 8.1.0 ----- * Fix tox4 issues * Add Python3 antelope unit tests * Update master for stable/zed 8.0.0 ----- * Drop Python 3.6 and 3.7 support * Add Python3 zed unit tests * Update master for stable/yoga 7.2.0 ----- * Update python testing classifier * Add Python3 yoga unit tests * Update master for stable/xena 7.1.0 ----- * Fix home\_page in setup.cfg * Fix url to docs * [CI] Run bandit * [community goal] Update contributor documentation * Replace deprecated UPPER\_CONSTRAINTS\_FILE variable * setup.cfg: Replace dashes with underscores * Use py3 as the default runtime for tox * Add Python3 xena unit tests * Update master for stable/wallaby 7.0.0 ----- * Fix the plugin after removing the legacy client * Drop the legacy client * Add 'is\_enabled' attr to segment * [CI] Add openstackclient-plugin-jobs template 6.2.1 ----- * Revert "remove py37" * Fix docs reqs for new pip * remove unicode from code * Add release notes to readme.rst * remove py37 * Use unittest.mock instead of mock in the doc * [CI] Add periodic jobs * Drop lower-constraints 6.2.0 ----- * Remove usage of six * Add py38 package metadata * Add py38 package metadata * Add Python3 wallaby unit tests * Update master for stable/victoria * Fix tox for py38 and lower-contraints * [goal] Migrate testing to ubuntu focal 6.1.1 ----- * remove future from lower-constraints * drop mock from lower-constraints * Stop to use the \_\_future\_\_ module * Switch to newer openstackdocstheme and reno versions * Remove translation sections from setup.cfg * Fix hacking min version to 3.0.1 6.1.0 ----- * Use unittest.mock instead of third party mock * Add Python3 victoria unit tests * Update master for stable/ussuri 6.0.0 ----- * Cleanup py27 support * Update hacking for Python3 * [ussuri][goal] Drop python 2.7 support and testing 5.6.0 ----- * Update master for stable/train * Update operator guide documentation 5.5.0 ----- * Add Python 3 Train unit tests * [Gate Fix]Switch to stestr * Replace git.openstack.org URLs with opendev.org URLs * OpenDev Migration Patch * Update master for stable/stein 5.4.0 ----- * Use template for lower-constraints * Display progress\_details of the notification * Deprecate masakari CLI * Add api\_version support * Run all jobs by default using python3 5.3.0 ----- * Delete segment and host shouldn't ignore not found error * Update the hacking to latest * Change openstack-dev to openstack-discuss * Add Python 3.6 classifier to setup.cfg * Fix osc command issue * Update the outdated URL in HACKING.rst * import zuul job settings from project-config * Add --os-interface and --os-region-name options * Update reno for stable/rocky 5.2.0 ----- * fix tox python3 overrides * add lower-constraints job 5.1.0 ----- * Remove masakariclient's proxy class * Updated from global requirements * Updated from global requirements 5.0.0 ----- * Update for upcoming openstacksdk changes * Updated from global requirements * Avoid tox\_install.sh for constraints support * Add support for auto\_priority, rh\_priority recovery method * Re-factor test cases to reduce code 4.0.0.0rc1 ---------- * Fix failing gate jobs by fixing constraints support * Use os-testr and add PY35 support * Add assertions to UT code * Remove inproper comment for APIs * Remove unnecessary return statement * Improve command arguments * Fix failing test case for PY3 * Enable to specify name and ID when operating segments and hosts * [Fix gate]Update test requirement * Change the base class of osc.v1.DeleteHost * Bump openstacksdk to 0.9.13 3.0.1 ----- * Improve logging * Fix to be able to specify the name of the resource * Implemented the host subcommands masakari CLI * Implemented the segment subcommands masakari CLI * Implemented the notification subcommands masakari CLI * Update to match latest global-requirements * Fix incorrect help info for segment, host and notification list * Add sorting and filters support to the list apis * Remove name attribute from help of notification show * Fix status not displayed in response for notification * Change Service Type vmha to ha 2.0.0 ----- * Add masakari CLI Implemented the masakari CLI code * Add masakari openstackclient host command * Change using openstacksdk libraries * Add masakari openstackclient segment command * Add masakari openstackclient notification command * Add masakari openstackclient plugin base * Change masakariclient initial module * Drop MANIFEST.in - it's not needed by pbr * Add masakari openstackclient library * Initial Cookiecutter Commit * Added .gitreview ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/HACKING.rst0000664000175000017500000000024400000000000017736 0ustar00zuulzuul00000000000000python-masakariclient Style Commandments ======================================== Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/ ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/LICENSE0000664000175000017500000002363700000000000017160 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=1740695570.8739161 python_masakariclient-8.6.0/PKG-INFO0000644000175000017500000000343200000000000017235 0ustar00zuulzuul00000000000000Metadata-Version: 2.1 Name: python-masakariclient Version: 8.6.0 Summary: masakariclient module and a CLI tool for masakari Home-page: https://docs.openstack.org/python-masakariclient/latest/ Author: OpenStack Author-email: openstack-discuss@lists.openstack.org 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 :: Implementation :: CPython Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Requires-Python: >=3.8 License-File: LICENSE Requires-Dist: openstacksdk>=0.13.0 Requires-Dist: osc-lib>=1.8.0 Requires-Dist: oslo.i18n>=3.15.3 Requires-Dist: oslo.serialization!=2.19.1,>=2.18.0 Requires-Dist: pbr!=2.1.0,>=2.0.0 ===================== python-masakariclient ===================== masakariclient module and a CLI tool for masakari Please fill here a long description which must be at least 3 lines wrapped on 80 cols, so that distribution package maintainers can use it in their packages. Note that this is a hard requirement. * Free software: Apache license * Documentation: https://docs.openstack.org/python-masakariclient/latest/ * Source: https://opendev.org/openstack/python-masakariclient * Bugs: https://bugs.launchpad.net/python-masakariclient * Release Notes: https://docs.openstack.org/releasenotes/python-masakariclient Features -------- * TODO ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/README.rst0000664000175000017500000000120600000000000017626 0ustar00zuulzuul00000000000000===================== python-masakariclient ===================== masakariclient module and a CLI tool for masakari Please fill here a long description which must be at least 3 lines wrapped on 80 cols, so that distribution package maintainers can use it in their packages. Note that this is a hard requirement. * Free software: Apache license * Documentation: https://docs.openstack.org/python-masakariclient/latest/ * Source: https://opendev.org/openstack/python-masakariclient * Bugs: https://bugs.launchpad.net/python-masakariclient * Release Notes: https://docs.openstack.org/releasenotes/python-masakariclient Features -------- * TODO ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8619163 python_masakariclient-8.6.0/doc/0000775000175000017500000000000000000000000016705 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/doc/requirements.txt0000664000175000017500000000015400000000000022171 0ustar00zuulzuul00000000000000sphinx>=2.0.0,!=2.1.0 # BSD openstackdocstheme>=2.2.1 # Apache-2.0 # releasenotes reno>=3.1.0 # Apache-2.0 ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8619163 python_masakariclient-8.6.0/doc/source/0000775000175000017500000000000000000000000020205 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8619163 python_masakariclient-8.6.0/doc/source/cli/0000775000175000017500000000000000000000000020754 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/doc/source/cli/commands.rst0000664000175000017500000000266400000000000023317 0ustar00zuulzuul00000000000000============= Command List ============= The following list covers the extended commands for Masakari service available in **openstack** command. These commands can be referenced by doing **openstack help** and the detail of individual command can be referred by **openstack help **. .. code-block:: console openstack segment create Create failover segment. openstack segment update Update failover segment. openstack segment list List all failover segments. openstack segment show Show requested failover segment. openstack segment delete Delete failover segment. openstack segment host create Create host for given failover segment. openstack segment host update Update Create host for given failover segment. openstack segment host list List all hosts associated to failover segment. openstack segment host show Show Create host for given failover segment. openstack segment host delete Delete Create host for given failover segment. openstack notification create Create notification of host. openstack notification list List notifications of host. openstack notification show List notification of host. ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/doc/source/cli/index.rst0000664000175000017500000000012100000000000022607 0ustar00zuulzuul00000000000000============ CLI Usage ============ .. toctree:: :glob: :maxdepth: 3 *././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/doc/source/cli/masakari_commands.rst0000664000175000017500000000023300000000000025155 0ustar00zuulzuul00000000000000================= Masakari commands ================= Masakari commands are CLI interface. .. autoprogram-cliff:: openstack.ha.v1 :command: * ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/doc/source/conf.py0000775000175000017500000000543400000000000021515 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. import os import sys sys.path.insert(0, os.path.abspath('../..')) # -- 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 = [ 'openstackdocstheme', 'sphinx.ext.autodoc', 'cliff.sphinxext', #'sphinx.ext.intersphinx', ] # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. # execute "export SPHINX_DEBUG=1" in your terminal to disable # The suffix of source filenames. source_suffix = '.rst' # The master toctree document. master_doc = 'index' # General information about the project. project = 'python-masakariclient' copyright = '2016, OpenStack Foundation' # If true, '()' will be appended to :func: etc. cross-reference text. add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). add_module_names = True # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'native' # -- 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_path = ["."] html_theme = 'openstackdocs' # html_static_path = ['static'] # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ ('index', '%s.tex' % project, '%s Documentation' % project, 'OpenStack Foundation', 'manual'), ] # Example configuration for intersphinx: refer to the Python standard library. #intersphinx_mapping = {'http://docs.python.org/': None} # -- Options for openstackdocstheme --------------------------------------- openstackdocs_repo_name = 'openstack/python-masakariclient' openstackdocs_bug_project = 'python-masakariclient' openstackdocs_bug_tag = '' # -- Options for cliff.sphinxext plugin --------------------------------------- autoprogram_cliff_application = 'openstack' ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8619163 python_masakariclient-8.6.0/doc/source/contributor/0000775000175000017500000000000000000000000022557 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/doc/source/contributor/contributing.rst0000664000175000017500000000364600000000000026031 0ustar00zuulzuul00000000000000============================ So You Want to Contribute... ============================ For general information on contributing to OpenStack, please check out the `contributor guide `_ to get started. It covers all the basics that are common to all OpenStack projects: the accounts you need, the basics of interacting with our Gerrit review system, how we communicate as a community, etc. Below will cover the more project specific information you need to get started with python-masakariclient. Communication ~~~~~~~~~~~~~ * IRC channel #openstack-masakari at OFTC * Mailing list (prefix subjects with ``[masakari]`` for faster responses) http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-discuss Contacting the Core Team ~~~~~~~~~~~~~~~~~~~~~~~~ Please refer the `python-masakariclient Core Team `_ contacts. New Feature Planning ~~~~~~~~~~~~~~~~~~~~ python-masakariclient features are tracked on `Launchpad `_. Task Tracking ~~~~~~~~~~~~~ We track our tasks in `Launchpad `_. If you're looking for some smaller, easier work item to pick up and get started on, search for the 'low-hanging-fruit' tag. Reporting a Bug ~~~~~~~~~~~~~~~ You found an issue and want to make sure we are aware of it? You can do so on `Launchpad `_. Getting Your Patch Merged ~~~~~~~~~~~~~~~~~~~~~~~~~ All changes proposed to the python-masakariclient project require one or two +2 votes from python-masakariclient core reviewers before one of the core reviewers can approve patch by giving ``Workflow +1`` vote. Project Team Lead Duties ~~~~~~~~~~~~~~~~~~~~~~~~ All common PTL duties are enumerated in the `PTL guide `_. ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/doc/source/contributor/developing.rst0000664000175000017500000001024100000000000025443 0ustar00zuulzuul00000000000000===================================== Developing with Python-masakariClient ===================================== Project Info ============ * **Free software:** under the `Apache license `_ * **masakari Service:** https://opendev.org/openstack/masakari * **Masakari Client Library:** https://opendev.org/openstack/python-masakariclient * **masakari Service Bugs:** https://bugs.launchpad.net/masakari * **Client Bugs:** https://bugs.launchpad.net/python-masakariclient * **Blueprints:** https://blueprints.launchpad.net/masakari Meetings ======== For details please refer to the `OpenStack IRC meetings`_ page. .. _`OpenStack IRC meetings`: http://eavesdrop.openstack.org/#Masakari_Team_Meeting Testing ======= Install the prerequisites for Tox: * On Ubuntu or Debian: .. code-block:: bash $ apt-get install gcc gettext python-dev libxml2-dev libxslt1-dev \ zlib1g-dev You may need to use pip install for some packages. * On RHEL or CentOS including Fedora: .. code-block:: bash $ yum install gcc python-devel libxml2-devel libxslt-devel * On openSUSE or SUSE linux Enterprise: .. code-block:: bash $ zypper install gcc python-devel libxml2-devel libxslt-devel Install python-tox: .. code-block:: bash $ pip install tox To run the full suite of tests maintained within Masakariclient. .. code-block:: bash $ tox .. NOTE:: The first time you run ``tox``, it will take additional time to build virtualenvs. You can later use the ``-r`` option with ``tox`` to rebuild your virtualenv in a similar manner. To run tests for one or more specific test environments(for example, the most common configuration of Python 2.7, Python 3.6, Python 3.7 and PEP-8), list the environments with the ``-e`` option, separated by spaces: .. code-block:: bash $ tox -e py36,py37,pep8 See ``tox.ini`` for the full list of available test environments. Building the Documentation ========================== The documentation is generated with Sphinx using the ``tox`` command. To create HTML docs, run the commands: .. code-block:: bash $ tox -e docs The resultant HTML will be in the ``doc/build/html`` directory. Release Notes ============= The release notes for a patch should be included in the patch. See the `Project Team Guide`_ for more information on using reno in OpenStack. .. _`Project Team Guide`: http://docs.openstack.org/project-team-guide/release-management.html#managing-release-notes If any of the following applies to the patch, a release note is required: * The deployer needs to take an action when upgrading * The plugin interface changes * A new feature is implemented * A command or option is removed * Current behavior is changed * A security bug is fixed Reno is used to generate release notes. Use the commands: .. code-block:: bash $ tox -e venv -- reno new Then edit the sample file that was created and push it with your change. To run the commands and see results: .. code-block:: bash $ git commit # Commit the change because reno scans git log. $ tox -e releasenotes At last, look at the generated release notes files in ``releasenotes/build/html`` in your browser. Testing new code ================ If a developer wants to test new code (feature, command or option) that they have written, Python-masakariclient may be installed from source by running the following commands in the base directory of the project: .. code-block:: bash $ python setup.py install or .. code-block:: bash $ pip install -e . Standardize Import Format ========================= .. _`Import Order Guide`: https://docs.openstack.org/hacking/latest/user/hacking.html#imports The import order shows below: * {{stdlib imports in human alphabetical order}} * \n * {{third-party lib imports in human alphabetical order}} * \n * {{project imports in human alphabetical order}} * \n * \n * {{begin your code}} Example ~~~~~~~ .. code-block:: python import copy import fixtures from unittest import mock import os from osc_lib.api import auth from osc_lib import utils from openstackclient import shell from openstackclient.tests import utils ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/doc/source/contributor/index.rst0000664000175000017500000000043100000000000024416 0ustar00zuulzuul00000000000000================= Contributor Guide ================= In the Contributor Guide, you will find information on tackerclient's lower level programming details or APIs as well as the transition to OpenStack client. .. toctree:: :maxdepth: 2 contributing.rst developing.rst ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/doc/source/index.rst0000664000175000017500000000167100000000000022053 0ustar00zuulzuul00000000000000.. python-masakariclient documentation master file, created by sphinx-quickstart on Tue Jul 9 22:26:36 2013. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. ================================================= Welcome to python-masakariclient's documentation! ================================================= Masakariclient is a command-line client for Masakari. Contents ======== .. toctree:: :maxdepth: 2 install/index cli/index contributor/index Release Notes ============= .. toctree:: :maxdepth: 1 Release Notes For Contributors ================ * If you are a new contributor to Python-masakariclient please refer: :doc:`contributor/contributing` .. toctree:: :hidden: contributor/contributing Indices and Tables ================== * :ref:`genindex` * :ref:`search` ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8619163 python_masakariclient-8.6.0/doc/source/install/0000775000175000017500000000000000000000000021653 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/doc/source/install/index.rst0000664000175000017500000000171500000000000023520 0ustar00zuulzuul00000000000000============ Installation ============ **Note:** The paths we are using for configuration files in these steps are with reference to Ubuntu Operating System. The paths may vary for other Operating Systems. The branch_name which is used in commands, specify the branch_name as stable/ for any stable branch installation. For eg: stable/queens, stable/pike. If unspecified the default will be master branch. Using python install ==================== Clone and install python-masakariclient repository.:: $ cd ~/ $ git clone https://github.com/openstack/python-masakariclient -b $ cd python-masakariclient $ sudo python setup.py install Using pip ========= You can also install the latest version by using ``pip`` command::: $ pip install python-masakariclient Or, if it is needed to install ``python-masakariclient`` from master branch, type:: $ pip install git+https://github.com/openstack/python-masakariclient.git ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8659163 python_masakariclient-8.6.0/masakariclient/0000775000175000017500000000000000000000000021127 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/__init__.py0000664000175000017500000000124500000000000023242 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. import pbr.version __version__ = pbr.version.VersionInfo( 'python-masakariclient').version_string() ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/api_versions.py0000664000175000017500000001263500000000000024211 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 re from masakariclient.common import exception from masakariclient.common.i18n import _ _type_error_msg = _("'%(other)s' should be an instance of '%(cls)s'") class APIVersion(object): """This class represents an API Version Request. This class provides convenience methods for manipulation and comparison of version numbers that we need to do to implement microversions. """ def __init__(self, version_str=None): """Create an API version object. :param version_str: String representation of APIVersionRequest. Correct format is 'X.Y', where 'X' and 'Y' are int values. None value should be used to create Null APIVersionRequest, which is equal to 0.0 """ self.ver_major = 0 self.ver_minor = 0 if version_str is not None: match = re.match(r"^([1-9]\d*)\.([1-9]\d*|0|latest)$", version_str) if match: self.ver_major = int(match.group(1)) if match.group(2) == "latest": # Infinity allows to easily determine latest version and # doesn't require any additional checks in comparison # methods. self.ver_minor = float("inf") else: self.ver_minor = int(match.group(2)) else: msg = _("Invalid format of client version '%s'. " "Expected format 'X.Y', where X is a major part and Y " "is a minor part of version.") % version_str raise exception.UnsupportedVersion(msg) def __str__(self): """Debug/Logging representation of object.""" if self.is_latest(): return "Latest API Version Major: %s" % self.ver_major return ("API Version Major: %s, Minor: %s" % (self.ver_major, self.ver_minor)) def __repr__(self): if self.is_null(): return "" else: return "" % self.get_string() def is_null(self): return self.ver_major == 0 and self.ver_minor == 0 def is_latest(self): return self.ver_minor == float("inf") def __lt__(self, other): if not isinstance(other, APIVersion): raise TypeError(_type_error_msg % {"other": other, "cls": self.__class__}) return ((self.ver_major, self.ver_minor) < (other.ver_major, other.ver_minor)) def __eq__(self, other): if not isinstance(other, APIVersion): raise TypeError(_type_error_msg % {"other": other, "cls": self.__class__}) return ((self.ver_major, self.ver_minor) == (other.ver_major, other.ver_minor)) def __gt__(self, other): if not isinstance(other, APIVersion): raise TypeError(_type_error_msg % {"other": other, "cls": self.__class__}) return ((self.ver_major, self.ver_minor) > (other.ver_major, other.ver_minor)) def __le__(self, other): return self < other or self == other def __ne__(self, other): return not self.__eq__(other) def __ge__(self, other): return self > other or self == other def matches(self, min_version, max_version): """Matches the version object. Returns whether the version object represents a version greater than or equal to the minimum version and less than or equal to the maximum version. :param min_version: Minimum acceptable version. :param max_version: Maximum acceptable version. :returns: boolean If min_version is null then there is no minimum limit. If max_version is null then there is no maximum limit. If self is null then raise ValueError """ if self.is_null(): raise ValueError(_("Null APIVersion doesn't support 'matches'.")) if max_version.is_null() and min_version.is_null(): return True elif max_version.is_null(): return min_version <= self elif min_version.is_null(): return self <= max_version else: return min_version <= self <= max_version def get_string(self): """Version string representation. Converts object to string representation which if used to create an APIVersion object results in the same version. """ if self.is_null(): raise ValueError( _("Null APIVersion cannot be converted to string.")) elif self.is_latest(): return "%s.%s" % (self.ver_major, "latest") return "%s.%s" % (self.ver_major, self.ver_minor) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8659163 python_masakariclient-8.6.0/masakariclient/common/0000775000175000017500000000000000000000000022417 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/common/__init__.py0000664000175000017500000000000000000000000024516 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/common/exception.py0000664000175000017500000000175300000000000024775 0ustar00zuulzuul00000000000000# Copyright(c) 2016 Nippon Telegraph and Telephone Corporation # # 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. class BaseException(Exception): """An error occurred.""" def __init__(self, message=None): self.message = message def __str__(self): return self.message or self.__class__.__doc__ class CommandError(BaseException): """Invalid usage of CLI.""" class UnsupportedVersion(Exception): """User is trying to use an unsupported version of the API.""" pass ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/common/i18n.py0000664000175000017500000000210200000000000023543 0ustar00zuulzuul00000000000000# Copyright(c) 2016 Nippon Telegraph and Telephone Corporation # # 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 _translators = oslo_i18n.TranslatorFactory(domain='masakariclient') # The primary translation function using the well-known name "_" _ = _translators.primary # Translators for log levels. # The abbreviated names are meant to reflect the usual use of a short # name like '_'. The "L" is for "log" and the other letter comes from # the level. _LI = _translators.log_info _LW = _translators.log_warning _LE = _translators.log_error _LC = _translators.log_critical ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/common/utils.py0000664000175000017500000000655400000000000024143 0ustar00zuulzuul00000000000000# Copyright(c) 2016 Nippon Telegraph and Telephone Corporation # # 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_utils import uuidutils from masakariclient.common import exception as exc from masakariclient.common.i18n import _ def _format_parameters(params, parse_semicolon=True): """Reformat parameters into dict of format expected by the API.""" if not params: return {} if parse_semicolon: # expect multiple invocations of --parameters but fall back to ';' # delimited if only one --parameters is specified if len(params) == 1: params = params[0].split(';') parameters = {} for p in params: try: (n, v) = p.split(('='), 1) except ValueError: msg = _('Malformed parameter(%s). Use the key=value format.') % p raise exc.CommandError(msg) if n not in parameters: parameters[n] = v else: if not isinstance(parameters[n], list): parameters[n] = [parameters[n]] parameters[n].append(v) return parameters def remove_unspecified_items(attrs): """Remove the items that don't have any values.""" for key, value in list(attrs.items()): if value is None: del attrs[key] return attrs def format_sort_filter_params(parsed_args): queries = {} limit = parsed_args.limit marker = parsed_args.marker sort = parsed_args.sort if limit: queries['limit'] = limit if marker: queries['marker'] = marker sort_keys = [] sort_dirs = [] if sort: for sort_param in sort.split(','): sort_key, _sep, sort_dir = sort_param.partition(':') if not sort_dir: sort_dir = 'desc' elif sort_dir not in ('asc', 'desc'): raise exc.CommandError(_( 'Unknown sort direction: %s') % sort_dir) sort_keys.append(sort_key) sort_dirs.append(sort_dir) queries['sort_key'] = sort_keys queries['sort_dir'] = sort_dirs if parsed_args.filters: queries.update(_format_parameters(parsed_args.filters)) return queries def get_uuid_by_name(manager, name, segment=None): """Helper methods for getting uuid of segment or host by name. :param manager: A client manager class :param name: The resource we are trying to find a uuid :param segment: segment id, default None :return: The uuid of found resource """ # If it cannot be found return the name. uuid = name if not uuidutils.is_uuid_like(name): if segment: items = manager.hosts(segment) else: items = manager.segments() for item in items: item_name = getattr(item, 'name') if item_name == name: uuid = getattr(item, 'uuid') break return uuid ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8659163 python_masakariclient-8.6.0/masakariclient/osc/0000775000175000017500000000000000000000000021713 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/osc/__init__.py0000664000175000017500000000000000000000000024012 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8659163 python_masakariclient-8.6.0/masakariclient/osc/v1/0000775000175000017500000000000000000000000022241 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/osc/v1/__init__.py0000664000175000017500000000000000000000000024340 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/osc/v1/host.py0000664000175000017500000002447500000000000023604 0ustar00zuulzuul00000000000000# Copyright(c) 2016 Nippon Telegraph and Telephone Corporation # # 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 logging from openstack import exceptions as sdk_exc from osc_lib.command import command from osc_lib import exceptions from osc_lib import utils from masakariclient.common.i18n import _ import masakariclient.common.utils as masakariclient_utils # Get the logger of this module LOG = logging.getLogger(__name__) class ListHost(command.Lister): """List Hosts.""" def get_parser(self, prog_name): parser = super(ListHost, self).get_parser(prog_name) parser.add_argument( 'segment_id', metavar='', help=_('Name or ID of segment.') ) parser.add_argument( '--limit', metavar='', help=_('Limit the number of hosts returned') ) parser.add_argument( '--marker', metavar='', help=_('Only return hosts that appear after the given host ID') ) parser.add_argument( '--sort', metavar='[:]', help=_("Sorting option which is a string containing a list of " "keys separated by commas. Each key can be optionally " "appended by a sort direction (:asc or :desc). The valid " "sort keys are: ['type', 'name', 'created_at', " "'updated_at']") ) parser.add_argument( '--filters', metavar='<"key1=value1;key2=value2...">', help=_("Filter parameters to apply on returned hosts. " "This can be specified multiple times, or once with " "parameters separated by a semicolon. The valid filter " "keys are: ['failover_segment_id', 'type', " "'on_maintenance', 'reserved']"), action='append' ) return parser def take_action(self, parsed_args): masakari_client = self.app.client_manager.ha segment_id = masakariclient_utils.get_uuid_by_name( masakari_client, parsed_args.segment_id) columns = ['uuid', 'name', 'type', 'control_attributes', 'reserved', 'on_maintenance', 'failover_segment_id'] queries = masakariclient_utils.format_sort_filter_params(parsed_args) hosts = masakari_client.hosts(segment_id, **queries) formatters = {} return ( columns, (utils.get_item_properties(p, columns, formatters=formatters) for p in hosts) ) class ShowHost(command.ShowOne): """Show host details.""" def get_parser(self, prog_name): parser = super(ShowHost, self).get_parser(prog_name) parser.add_argument( 'segment_id', metavar='', help=_('Name or ID of segment.') ) parser.add_argument( 'host', metavar='', help='Name or ID of the Host', ) return parser def take_action(self, parsed_args): masakari_client = self.app.client_manager.ha segment_id = masakariclient_utils.get_uuid_by_name( masakari_client, parsed_args.segment_id) uuid = masakariclient_utils.get_uuid_by_name( masakari_client, parsed_args.host, segment=segment_id) return _show_host(masakari_client, segment_id, uuid) class CreateHost(command.ShowOne): """Create a Host.""" def get_parser(self, prog_name): parser = super(CreateHost, self).get_parser(prog_name) parser.add_argument( 'name', metavar='', help=_('Name of host.') ) parser.add_argument( 'type', metavar='', help=_('Type of host.') ) parser.add_argument( 'control_attributes', metavar='', help=_('Attribute about control.') ) parser.add_argument( 'segment_id', metavar='', help=_('Name or ID of segment.') ) parser.add_argument( '--reserved', metavar='', choices=['True', 'False'], help=_('Host reservation. The supported options are: ' 'True, False.') ) parser.add_argument( '--on_maintenance', metavar='', choices=['True', 'False'], help=_('Maintenance status of host. The supported options are: ' 'True, False.') ) return parser def take_action(self, parsed_args): masakari_client = self.app.client_manager.ha segment_id = masakariclient_utils.get_uuid_by_name( masakari_client, parsed_args.segment_id) attrs = { 'name': parsed_args.name, 'type': parsed_args.type, 'control_attributes': parsed_args.control_attributes, 'reserved': parsed_args.reserved, 'on_maintenance': parsed_args.on_maintenance, } # Remove not specified keys attrs = masakariclient_utils.remove_unspecified_items(attrs) try: host = masakari_client.create_host( segment_id=segment_id, **attrs) except Exception as ex: LOG.debug(_("Failed to create segment host: %s"), parsed_args) raise ex return _show_host(masakari_client, segment_id, host.uuid) class UpdateHost(command.ShowOne): """Update a Host.""" def get_parser(self, prog_name): parser = super(UpdateHost, self).get_parser(prog_name) parser.add_argument( 'segment_id', metavar='', help=_('Name or ID of segment.') ) parser.add_argument( 'host', metavar='', help='Name or ID of the Host', ) parser.add_argument( '--reserved', metavar='', choices=['True', 'False'], help=_('Host reservation. The supported options are: ' 'True, False.') ) parser.add_argument( '--on_maintenance', metavar='', choices=['True', 'False'], help=_('Maintenance status of host. The supported options are: ' 'True, False.') ) parser.add_argument( '--name', metavar='', help=_('Name of host.') ) parser.add_argument( '--type', metavar='', help=_('Type of host.') ) parser.add_argument( '--control_attributes', metavar='', help=_('Attributes about control.') ) return parser def take_action(self, parsed_args): masakari_client = self.app.client_manager.ha segment_id = masakariclient_utils.get_uuid_by_name( masakari_client, parsed_args.segment_id) uuid = masakariclient_utils.get_uuid_by_name( masakari_client, parsed_args.host, segment=segment_id) attrs = { 'name': parsed_args.name, 'type': parsed_args.type, 'control_attributes': parsed_args.control_attributes, 'reserved': parsed_args.reserved, 'on_maintenance': parsed_args.on_maintenance, } # Remove not specified keys attrs = masakariclient_utils.remove_unspecified_items(attrs) try: masakari_client.update_host( uuid, segment_id=segment_id, **attrs) except sdk_exc.NotFoundException: # Reraise. To unify exceptions with other functions. LOG.debug(_("Segment host is not found: %s"), parsed_args) raise sdk_exc.ResourceNotFound( _('No Host found for %s') % uuid) except Exception as ex: LOG.debug(_("Failed to update segment host: %s"), parsed_args) raise ex return _show_host(masakari_client, segment_id, uuid) class DeleteHost(command.Command): """Delete a host.""" def get_parser(self, prog_name): parser = super(DeleteHost, self).get_parser(prog_name) parser.add_argument( 'segment_id', metavar='', help=_('Name or ID of segment.') ) parser.add_argument( 'host', metavar='', help='Name or ID of the Host', ) return parser def take_action(self, parsed_args): masakari_client = self.app.client_manager.ha segment_id = masakariclient_utils.get_uuid_by_name( masakari_client, parsed_args.segment_id) uuid = masakariclient_utils.get_uuid_by_name( masakari_client, parsed_args.host, segment=segment_id) masakari_client.delete_host( uuid, segment_id=segment_id, ignore_missing=False) print('Host deleted: %s' % parsed_args.host) def _show_host(masakari_client, segment_id, uuid): try: host = masakari_client.get_host(uuid, segment_id=segment_id) except sdk_exc.ResourceNotFound: raise exceptions.CommandError(_('Segment host is not found: %s' ) % uuid) formatters = {} columns = [ 'created_at', 'updated_at', 'uuid', 'name', 'type', 'control_attributes', 'reserved', 'on_maintenance', 'failover_segment_id', ] return columns, utils.get_dict_properties(host.to_dict(), columns, formatters=formatters) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/osc/v1/notification.py0000664000175000017500000001347300000000000025311 0ustar00zuulzuul00000000000000# Copyright(c) 2016 Nippon Telegraph and Telephone Corporation # # 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 openstack import exceptions as sdk_exc from osc_lib.command import command from osc_lib import exceptions from osc_lib import utils from oslo_serialization import jsonutils from masakariclient import api_versions from masakariclient.common.i18n import _ import masakariclient.common.utils as masakariclient_utils class ListNotification(command.Lister): """List notifications.""" def get_parser(self, prog_name): parser = super(ListNotification, self).get_parser(prog_name) parser.add_argument( '--limit', metavar='', help=_('Limit the number of notifications returned') ) parser.add_argument( '--marker', metavar='', help=_('Only return notifications that appear after the given ' 'notification ID') ) parser.add_argument( '--sort', metavar='[:]', help=_("Sorting option which is a string containing a list of " "keys separated by commas. Each key can be optionally " "appended by a sort direction (:asc or :desc). The valid " "sort keys are: ['type', 'created_at', 'updated_at']") ) parser.add_argument( '--filters', metavar='<"key1=value1;key2=value2...">', help=_("Filter parameters to apply on returned notifications. " "This can be specified multiple times, or once with " "parameters separated by a semicolon. The valid filter " "keys are: ['source_host_uuid', 'type', 'status', " "generated-since]"), action='append' ) return parser def take_action(self, parsed_args): masakari_client = self.app.client_manager.ha columns = ['notification_uuid', 'generated_time', 'status', 'type', 'source_host_uuid', 'payload'] queries = masakariclient_utils.format_sort_filter_params(parsed_args) notifications = masakari_client.notifications(**queries) formatters = {} return ( columns, (utils.get_item_properties(p, columns, formatters=formatters) for p in notifications) ) class ShowNotification(command.ShowOne): """Show notification details.""" def get_parser(self, prog_name): parser = super(ShowNotification, self).get_parser(prog_name) parser.add_argument( 'notification', metavar='', help='UUID of notification to display', ) return parser def take_action(self, parsed_args): masakari_client = self.app.client_manager.ha return _show_notification(masakari_client, notification_uuid=parsed_args.notification) class CreateNotification(command.ShowOne): """Create notification.""" def get_parser(self, prog_name): parser = super(CreateNotification, self).get_parser(prog_name) parser.add_argument( 'type', metavar='', choices=['COMPUTE_HOST', 'VM', 'PROCESS'], help=_('Type of failure. The supported options are: ' 'COMPUTE_HOST, VM, PROCESS.') ) parser.add_argument( 'hostname', metavar='', help=_('Hostname of notification.') ) parser.add_argument( 'generated_time', metavar='', help=_('Timestamp for notification. e.g. 2016-01-01T01:00:00.000') ) parser.add_argument( 'payload', metavar='', help=_('JSON string about failure event.') ) return parser def take_action(self, parsed_args): masakari_client = self.app.client_manager.ha payload = jsonutils.loads(parsed_args.payload) attrs = { 'type': parsed_args.type, 'hostname': parsed_args.hostname, 'generated_time': parsed_args.generated_time, 'payload': payload, } notification = masakari_client.create_notification(**attrs) return _show_notification(masakari_client, notification.notification_uuid) def _show_notification(masakari_client, notification_uuid): try: notification = masakari_client.get_notification(notification_uuid) except sdk_exc.ResourceNotFound: raise exceptions.CommandError(_('Notification not found: %s' ) % notification_uuid) formatters = {} columns = [ 'created_at', 'updated_at', 'notification_uuid', 'type', 'status', 'source_host_uuid', 'generated_time', 'payload' ] if masakari_client.default_microversion: api_version = api_versions.APIVersion( masakari_client.default_microversion) if api_version >= api_versions.APIVersion("1.1"): columns.append('recovery_workflow_details') return columns, utils.get_dict_properties(notification.to_dict(), columns, formatters=formatters) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/osc/v1/segment.py0000664000175000017500000002453300000000000024264 0ustar00zuulzuul00000000000000# Copyright(c) 2016 Nippon Telegraph and Telephone Corporation # # 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 logging from openstack import exceptions as sdk_exc from osc_lib.command import command from osc_lib import exceptions from osc_lib import utils from oslo_utils import strutils from masakariclient import api_versions from masakariclient.common.i18n import _ import masakariclient.common.utils as masakariclient_utils # Get the logger of this module LOG = logging.getLogger(__name__) class ListSegment(command.Lister): """List segments.""" def get_parser(self, prog_name): parser = super(ListSegment, self).get_parser(prog_name) parser.add_argument( '--limit', metavar='', help=_('Limit the number of segments returned') ) parser.add_argument( '--marker', metavar='', help=_('Only return segments that appear after the given segment ' 'ID') ) parser.add_argument( '--sort', metavar='[:]', help=_("Sorting option which is a string containing a list of " "keys separated by commas. Each key can be optionally " "appended by a sort direction (:asc or :desc). The valid " "sort keys are: ['type', 'name', 'created_at', " "'updated_at']") ) parser.add_argument( '--filters', metavar='<"key1=value1;key2=value2...">', help=_("Filter parameters to apply on returned segments. " "This can be specified multiple times, or once with " "parameters separated by a semicolon. The valid filter " "keys are: ['recovery_method', 'service_type']"), action='append' ) return parser def take_action(self, parsed_args): masakari_client = self.app.client_manager.ha columns = ['uuid', 'name', 'description', 'service_type', 'recovery_method'] if masakari_client.default_microversion: api_version = api_versions.APIVersion( masakari_client.default_microversion) if api_version >= api_versions.APIVersion("1.2"): columns.append('is_enabled') queries = masakariclient_utils.format_sort_filter_params(parsed_args) segments = masakari_client.segments(**queries) formatters = {} return ( columns, (utils.get_item_properties(p, columns, formatters=formatters) for p in segments) ) class ShowSegment(command.ShowOne): """Show segment details.""" def get_parser(self, prog_name): parser = super(ShowSegment, self).get_parser(prog_name) parser.add_argument( 'segment', metavar='', help='Segment to display (name or ID)', ) return parser def take_action(self, parsed_args): masakari_client = self.app.client_manager.ha uuid = masakariclient_utils.get_uuid_by_name( masakari_client, parsed_args.segment) return _show_segment(masakari_client, segment_uuid=uuid) class CreateSegment(command.ShowOne): """Create segment.""" def get_parser(self, prog_name): parser = super(CreateSegment, self).get_parser(prog_name) parser.add_argument( 'name', metavar='', help=_('Name of segment.') ) parser.add_argument( 'recovery_method', metavar='', choices=['auto', 'reserved_host', 'auto_priority', 'rh_priority'], help=_('Recovery method of segment. The supported options are: ' 'auto, reserved_host, auto_priority, rh_priority.') ) parser.add_argument( 'service_type', metavar='', help=_('Service type of segment.') ) parser.add_argument( '--is_enabled', metavar='', help=_('The enabled flag of this segment. ' 'Supported after microversion 1.2.') ) parser.add_argument( '--description', metavar='', help=_('Description of segment.') ) return parser def take_action(self, parsed_args): masakari_client = self.app.client_manager.ha attrs = { 'name': parsed_args.name, 'description': parsed_args.description, 'recovery_method': parsed_args.recovery_method, 'service_type': parsed_args.service_type, } if masakari_client.default_microversion: api_version = api_versions.APIVersion( masakari_client.default_microversion) if (api_version >= api_versions.APIVersion("1.2") and parsed_args.is_enabled is not None): attrs['is_enabled'] = strutils.bool_from_string( parsed_args.is_enabled, strict=True) # Remove not specified keys attrs = masakariclient_utils.remove_unspecified_items(attrs) try: segment = masakari_client.create_segment(**attrs) except Exception as ex: LOG.debug(_("Failed to create segment: %s"), parsed_args) raise ex return _show_segment(masakari_client, segment.uuid) class UpdateSegment(command.ShowOne): """Update a segment.""" def get_parser(self, prog_name): parser = super(UpdateSegment, self).get_parser(prog_name) parser.add_argument( 'segment', metavar='', help=_('Name or ID of the segment to update.') ) parser.add_argument( '--name', metavar='', help=_('Name of segment.') ) parser.add_argument( '--recovery_method', metavar='', choices=['auto', 'reserved_host', 'auto_priority', 'rh_priority'], help=_('Recovery method of segment. The supported options are: ' 'auto, reserved_host, auto_priority, rh_priority') ) parser.add_argument( '--service_type', metavar='', help=_('Service type of segment.') ) parser.add_argument( '--is_enabled', metavar='', help=_('The enabled flag of this segment. ' 'Supported after microversion 1.2.') ) parser.add_argument( '--description', metavar='', help=_('Description of segment.') ) return parser def take_action(self, parsed_args): masakari_client = self.app.client_manager.ha uuid = masakariclient_utils.get_uuid_by_name( masakari_client, parsed_args.segment) attrs = { 'name': parsed_args.name, 'description': parsed_args.description, 'recovery_method': parsed_args.recovery_method, 'service_type': parsed_args.service_type, } if masakari_client.default_microversion: api_version = api_versions.APIVersion( masakari_client.default_microversion) if (api_version >= api_versions.APIVersion("1.2") and parsed_args.is_enabled is not None): attrs['is_enabled'] = strutils.bool_from_string( parsed_args.is_enabled, strict=True) # Remove not specified keys attrs = masakariclient_utils.remove_unspecified_items(attrs) try: masakari_client.update_segment(segment=uuid, **attrs) # Reraise. To unify exceptions with other functions. except sdk_exc.NotFoundException: LOG.debug(_("Segment is not found: %s"), parsed_args) raise sdk_exc.ResourceNotFound( _('No Segment found for %s') % uuid) except Exception as ex: LOG.debug(_("Failed to update segment: %s"), parsed_args) raise ex return _show_segment(masakari_client, uuid) class DeleteSegment(command.Command): """Delete a segment(s).""" def get_parser(self, prog_name): parser = super(DeleteSegment, self).get_parser(prog_name) parser.add_argument( 'segment', metavar='', nargs='+', help=_('Name or ID of segment(s) to delete') ) return parser def take_action(self, parsed_args): masakari_client = self.app.client_manager.ha for sid in parsed_args.segment: try: uuid = masakariclient_utils.get_uuid_by_name( masakari_client, sid) masakari_client.delete_segment(uuid, False) print('Segment deleted: %s' % sid) except Exception as ex: print(ex) def _show_segment(masakari_client, segment_uuid): try: segment = masakari_client.get_segment(segment_uuid) except sdk_exc.ResourceNotFound: raise exceptions.CommandError(_('Segment is not found: %s' ) % segment_uuid) formatters = {} columns = [ 'created_at', 'updated_at', 'uuid', 'name', 'description', 'id', 'service_type', 'recovery_method', ] if masakari_client.default_microversion: api_version = api_versions.APIVersion( masakari_client.default_microversion) if api_version >= api_versions.APIVersion("1.2"): columns.append('is_enabled') return columns, utils.get_dict_properties(segment.to_dict(), columns, formatters=formatters) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/osc/v1/vmove.py0000664000175000017500000001061000000000000023745 0ustar00zuulzuul00000000000000# Copyright(c) 2022 Inspur # # 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 logging from openstack import exceptions as sdk_exc from osc_lib.command import command from osc_lib import exceptions from osc_lib import utils from masakariclient.common.i18n import _ import masakariclient.common.utils as masakariclient_utils # Get the logger of this module LOG = logging.getLogger(__name__) class ListVMove(command.Lister): """List VMoves.""" def get_parser(self, prog_name): parser = super(ListVMove, self).get_parser(prog_name) parser.add_argument( 'notification_id', metavar='', help=_('UUID of notification.') ) parser.add_argument( '--limit', metavar='', help=_('Limit the number of vmoves returned') ) parser.add_argument( '--marker', metavar='', help=_('Only return vmoves that appear after the given vmove ID') ) parser.add_argument( '--sort', metavar='[:]', help=_("Sorting option which is a string containing a list of " "keys separated by commas. Each key can be optionally " "appended by a sort direction (:asc or :desc). The valid " "sort keys are: ['type', 'status', 'start_time', " "'end_time']") ) parser.add_argument( '--filters', metavar='<"key1=value1;key2=value2...">', help=_("Filter parameters to apply on returned vmoves. " "This can be specified multiple times, or once with " "parameters separated by a semicolon. The valid filter " "keys are: ['type', 'status'"), action='append' ) return parser def take_action(self, parsed_args): masakari_client = self.app.client_manager.ha columns = ['uuid', 'server_id', 'server_name', 'source_host', 'dest_host', 'start_time', 'end_time', 'type', 'status'] queries = masakariclient_utils.format_sort_filter_params(parsed_args) vmoves = masakari_client.vmoves(parsed_args.notification_id, **queries) formatters = {} return ( columns, (utils.get_item_properties(p, columns, formatters=formatters) for p in vmoves) ) class ShowVMove(command.ShowOne): """Show vmove details.""" def get_parser(self, prog_name): parser = super(ShowVMove, self).get_parser(prog_name) parser.add_argument( 'notification_id', metavar='', help=_('UUID of COMPUTE_NODE type notification.') ) parser.add_argument( 'vmove_id', metavar='', help='UUID of the VMove', ) return parser def take_action(self, parsed_args): masakari_client = self.app.client_manager.ha return _show_vmove(masakari_client, parsed_args.notification_id, parsed_args.vmove_id) def _show_vmove(masakari_client, notification_id, vmove_id): try: vmove = masakari_client.get_vmove(vmove_id, notification_id) except sdk_exc.ResourceNotFound: raise exceptions.CommandError(_('VMove %s is not found.') % vmove_id) formatters = {} columns = [ 'created_at', 'updated_at', 'uuid', 'server_id', 'server_name', 'source_host', 'dest_host', 'start_time', 'end_time', 'type', 'status', 'message' ] return columns, utils.get_dict_properties(vmove.to_dict(), columns, formatters=formatters) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/plugin.py0000664000175000017500000000332500000000000023002 0ustar00zuulzuul00000000000000# Copyright(c) 2016 Nippon Telegraph and Telephone Corporation # # 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 logging from openstack.connection import Connection from osc_lib import utils LOG = logging.getLogger(__name__) DEFAULT_HA_API_VERSION = '1.3' API_VERSION_OPTION = 'os_ha_api_version' API_NAME = 'ha' SUPPORTED_VERSIONS = [ '1', '1.0', '1.1', '1.2', '1.3', ] API_VERSIONS = {v: None for v in SUPPORTED_VERSIONS} def make_client(instance): """Returns a instance_ha proxy""" LOG.debug('Instantiating masakari service client') con = Connection(session=instance.session, interface=instance.interface, region_name=instance.region_name, ha_api_version=instance._api_version[API_NAME]) return con.instance_ha def build_option_parser(parser): """Hook to add global options""" parser.add_argument( '--os-ha-api-version', metavar='', default=utils.env( 'OS_HA_API_VERSION', default=DEFAULT_HA_API_VERSION), help='ha API version, default=' + DEFAULT_HA_API_VERSION + ' (Env: OS_HA_API_VERSION)') return parser ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8659163 python_masakariclient-8.6.0/masakariclient/tests/0000775000175000017500000000000000000000000022271 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/tests/__init__.py0000664000175000017500000000000000000000000024370 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/tests/base.py0000664000175000017500000000140100000000000023551 0ustar00zuulzuul00000000000000# Copyright 2010-2011 OpenStack Foundation # 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. from oslotest import base class TestCase(base.BaseTestCase): """Test case base class for all unit tests.""" ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8659163 python_masakariclient-8.6.0/masakariclient/tests/unit/0000775000175000017500000000000000000000000023250 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/tests/unit/__init__.py0000664000175000017500000000000000000000000025347 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8659163 python_masakariclient-8.6.0/masakariclient/tests/unit/osc/0000775000175000017500000000000000000000000024034 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/tests/unit/osc/__init__.py0000664000175000017500000000000000000000000026133 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8699162 python_masakariclient-8.6.0/masakariclient/tests/unit/osc/v1/0000775000175000017500000000000000000000000024362 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/tests/unit/osc/v1/__init__.py0000664000175000017500000000000000000000000026461 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/tests/unit/osc/v1/test_host.py0000664000175000017500000001643200000000000026756 0ustar00zuulzuul00000000000000# Copyright(c) 2016 Nippon Telegraph and Telephone Corporation # # 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_masakariclient ---------------------------------- Tests for `masakariclient` module. """ from unittest import mock import uuid from osc_lib import utils from masakariclient.osc.v1.host import DeleteHost from masakariclient.osc.v1.host import ShowHost from masakariclient.osc.v1.host import UpdateHost from masakariclient.tests import base HOST_NAME = 'host_name' HOST_ID = uuid.uuid4() SEGMENT_NAME = 'segment_name' SEGMENT_ID = uuid.uuid4() class FakeNamespace(object): """Fake parser object.""" def __init__(self, segment_id=None, host=None, reserved=None, name=None, type=None, control_attributes=None, on_maintenance=None): super(FakeNamespace, self).__init__() self.segment_id = segment_id self.host = host self.reserved = reserved self.name = name self.type = type self.control_attributes = control_attributes self.on_maintenance = on_maintenance class FakeHosts(object): """Fake segment host list.""" def __init__(self, name=None, uuid=None): super(FakeHosts, self).__init__() self.name = name self.uuid = uuid class FakeSegments(object): """Fake segment show detail.""" def __init__(self, name=None, uuid=None): super(FakeSegments, self).__init__() self.name = name self.uuid = uuid class FakeHost(object): """Fake segment show detail.""" def __init__(self,): super(FakeHost, self).__init__() def to_dict(self): return { 'reserved': 'False', 'uuid': HOST_ID, 'on_maintenance': False, 'created_at': '2016-12-18T05:47:55.000000', 'control_attributes': 'control_attributes', 'updated_at': None, 'name': HOST_NAME, 'type': 'auto', 'id': 18, 'failover_segment_id': SEGMENT_ID, } class BaseV1Host(base.TestCase): def setUp(self): super(BaseV1Host, self).setUp() self.app = mock.Mock() self.app_args = mock.Mock() self.client_manager = mock.Mock() self.app.client_manager.ha = self.client_manager self.columns = [ 'created_at', 'updated_at', 'uuid', 'name', 'type', 'control_attributes', 'reserved', 'on_maintenance', 'failover_segment_id', ] # fake host list self.dummy_hosts = [FakeHosts(name=HOST_NAME, uuid=HOST_ID)] # fake segment list self.dummy_segments = [FakeSegments(name=SEGMENT_NAME, uuid=SEGMENT_ID)] # fake host show self.dummy_host = FakeHost() class TestV1ShowHost(BaseV1Host): def setUp(self): super(TestV1ShowHost, self).setUp() self.show_host = ShowHost(self.app, self.app_args, cmd_name='host show') def test_take_action_by_uuid(self): # command param parsed_args = FakeNamespace(segment_id=SEGMENT_ID, host=HOST_ID) self._test_take_action(parsed_args) def test_take_action_by_name(self): # command param parsed_args = FakeNamespace(segment_id=SEGMENT_ID, host=HOST_NAME) self._test_take_action(parsed_args) @mock.patch.object(utils, 'get_dict_properties') def _test_take_action(self, parsed_args, mock_get_dict_properties): # return value segment list self.app.client_manager.ha.segments.return_value = self.dummy_segments # return value host list self.app.client_manager.ha.hosts.return_value = self.dummy_hosts # return value host show self.app.client_manager.ha.get_host.return_value = self.dummy_host # show the host specified by uuid self.show_host.take_action(parsed_args) self.app.client_manager.ha.get_host.assert_called_once_with( HOST_ID, segment_id=SEGMENT_ID) mock_get_dict_properties.assert_called_once_with( self.dummy_host.to_dict(), self.columns, formatters={}) class TestV1UpdateHost(BaseV1Host): def setUp(self): super(TestV1UpdateHost, self).setUp() self.update_host = UpdateHost(self.app, self.app_args, cmd_name='host update') def test_take_action_by_uuid(self): # command param parsed_args = FakeNamespace( segment_id=SEGMENT_ID, host=HOST_ID, reserved=True) self._test_take_action(parsed_args) def test_take_action_by_name(self): # command param parsed_args = FakeNamespace( segment_id=SEGMENT_ID, host=HOST_NAME, reserved=True) self._test_take_action(parsed_args) @mock.patch.object(utils, 'get_dict_properties') def _test_take_action(self, parsed_args, mock_get_dict_properties): # return value segment list self.app.client_manager.ha.segments.return_value = self.dummy_segments # return value host list self.app.client_manager.ha.hosts.return_value = self.dummy_hosts # return value host show self.app.client_manager.ha.get_host.return_value = self.dummy_host # show the host specified by uuid self.update_host.take_action(parsed_args) self.app.client_manager.ha.update_host.assert_called_once_with( HOST_ID, segment_id=SEGMENT_ID, reserved=True) self.app.client_manager.ha.get_host.assert_called_once_with( HOST_ID, segment_id=SEGMENT_ID) mock_get_dict_properties.assert_called_once_with( self.dummy_host.to_dict(), self.columns, formatters={}) class TestV1DeleteHost(BaseV1Host): def setUp(self): super(TestV1DeleteHost, self).setUp() self.delete_host = DeleteHost(self.app, self.app_args, cmd_name='host delete') def test_take_action_by_uuid(self): # command param parsed_args = FakeNamespace(segment_id=SEGMENT_ID, host=HOST_ID) self._test_take_action(parsed_args) def test_take_action_by_name(self): # command param parsed_args = FakeNamespace(segment_id=SEGMENT_ID, host=HOST_NAME) self._test_take_action(parsed_args) def _test_take_action(self, parsed_args): # return value segment list self.app.client_manager.ha.segments.return_value = self.dummy_segments # return value host list self.app.client_manager.ha.hosts.return_value = self.dummy_hosts # return value host show self.app.client_manager.ha.delete_host.return_value = None # show the host specified by uuid self.delete_host.take_action(parsed_args) self.app.client_manager.ha.delete_host.assert_called_once_with( HOST_ID, segment_id=SEGMENT_ID, ignore_missing=False) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/tests/unit/osc/v1/test_notification.py0000664000175000017500000000756100000000000030472 0ustar00zuulzuul00000000000000# Copyright(c) 2019 NTT DATA # # 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_masakariclient ---------------------------------- Tests for `masakariclient` module. """ from unittest import mock import uuid from osc_lib.tests import utils as osc_lib_utils from osc_lib import utils from masakariclient.osc.v1.notification import ShowNotification from masakariclient.tests import base NOTIFICATION_NAME = 'notification_name' NOTIFICATION_ID = uuid.uuid4() RECOVERY_WORKFLOW_DETAILS = [{ "progress": 1.0, "state": "SUCCESS", "name": "DisableComputeNodeTask", "progress_details": [ {"timestamp:": "2019-02-28 07:21:33.170190", "progress": 0.5, "message": "Disabling compute host: host"}, {"timestamp:": "2019-02-28 07:21:33.291810", "progress": 1.0, "message": "Skipping recovery for process nova-compute " "as it is already disabled"}]}] class FakeNotification(object): """Fake notification show detail.""" def __init__(self,): super(FakeNotification, self).__init__() def to_dict(self): return { 'created_at': '2019-02-18T05:47:46.000000', 'updated_at': '2019-02-18T06:05:16.000000', 'notification_uuid': NOTIFICATION_ID, 'source_host_uuid': '9ab67dc7-110a-4a4c-af64-abc6e5798433', 'name': NOTIFICATION_NAME, 'id': 1, 'type': 'VM', 'payload': { "instance_uuid": "99ffc832-2252-4a9e-9b98-28bc70f7ff09", "vir_domain_event": "STOPPED_FAILED", "event": "LIFECYCLE"}, 'status': 'finished', 'recovery_workflow_details': RECOVERY_WORKFLOW_DETAILS, 'generated_time': '2019-02-13T15:34:55.000000' } class BaseV1Notification(base.TestCase, osc_lib_utils.TestCommand): def setUp(self): super(BaseV1Notification, self).setUp() self.app = mock.Mock() self.app_args = mock.Mock() self.client_manager = mock.Mock() self.client_manager.default_microversion = '1.0' self.app.client_manager.ha = self.client_manager self.dummy_notification = FakeNotification() self.show_notification = ShowNotification( self.app, self.app_args, cmd_name='notification show') self.columns = ['created_at', 'updated_at', 'notification_uuid', 'type', 'status', 'source_host_uuid', 'generated_time', 'payload'] class TestShowNotificationV1(BaseV1Notification): def test_take_action_by_uuid(self): arglist = ['8c35987c-f416-46ca-be37-52f58fd8d294'] parsed_args = self.check_parser(self.show_notification, arglist, []) self._test_take_action(parsed_args) @mock.patch.object(utils, 'get_dict_properties') def _test_take_action(self, parsed_args, mock_get_dict_properties): self.app.client_manager.ha.get_notification.return_value = ( self.dummy_notification) self.show_notification.take_action(parsed_args) mock_get_dict_properties.assert_called_once_with( self.dummy_notification.to_dict(), self.columns, formatters={}) class TestShowNotificationV1_1(TestShowNotificationV1): def setUp(self): super(TestShowNotificationV1_1, self).setUp() self.client_manager.default_microversion = '1.1' self.columns.append('recovery_workflow_details') ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/tests/unit/osc/v1/test_segment.py0000664000175000017500000002506500000000000027445 0ustar00zuulzuul00000000000000# Copyright(c) 2016 Nippon Telegraph and Telephone Corporation # # 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_masakariclient ---------------------------------- Tests for `masakariclient` module. """ from unittest import mock import ddt import uuid from osc_lib.tests import utils as osc_lib_utils from osc_lib import utils from masakariclient.osc.v1.segment import CreateSegment from masakariclient.osc.v1.segment import DeleteSegment from masakariclient.osc.v1.segment import ShowSegment from masakariclient.osc.v1.segment import UpdateSegment from masakariclient.tests import base SEGMENT_NAME = 'segment_name' SEGMENT_ID = uuid.uuid4() class FakeNamespace(object): """Fake parser object.""" def __init__(self, segment=None, name=None, description=None, recovery_method=None, service_type=None): super(FakeNamespace, self).__init__() self.segment = segment self.name = name self.description = description self.recovery_method = recovery_method self.service_type = service_type class FakeSegments(object): """Fake segment list.""" def __init__(self, name=None, uuid=None, description=None, recovery_method=None, service_type=None): super(FakeSegments, self).__init__() self.name = name self.uuid = uuid self.description = description self.recovery_method = recovery_method self.service_type = service_type class FakeSegment(object): """Fake segment show detail.""" def __init__(self,): super(FakeSegment, self).__init__() def to_dict(self): return { 'created_at': '2016-12-18T05:47:46.000000', 'updated_at': '2016-12-18T06:05:16.000000', 'uuid': SEGMENT_ID, 'name': SEGMENT_NAME, 'description': 'test_segment_description', 'id': 1, 'service_type': 'test_type', 'recovery_method': 'auto', } class BaseV1Segment(base.TestCase): def setUp(self): super(BaseV1Segment, self).setUp() self.app = mock.Mock() self.app_args = mock.Mock() self.client_manager = mock.Mock() self.client_manager.default_microversion = '1.0' self.app.client_manager.ha = self.client_manager # segment data setup self.dummy_segment = FakeSegment() class TestV1ShowSegment(BaseV1Segment): def setUp(self): super(TestV1ShowSegment, self).setUp() self.show_seg = ShowSegment(self.app, self.app_args, cmd_name='segment show') self.columns = ['created_at', 'updated_at', 'uuid', 'name', 'description', 'id', 'service_type', 'recovery_method', ] # return value segment list self.dummy_segments = [FakeSegments(name=SEGMENT_NAME, uuid=SEGMENT_ID)] def test_take_action_by_uuid(self): # command param parsed_args = FakeNamespace(segment=SEGMENT_ID) self._test_take_action(parsed_args) def test_take_action_by_name(self): # command param parsed_args = FakeNamespace(segment=SEGMENT_NAME) self._test_take_action(parsed_args) @mock.patch.object(utils, 'get_dict_properties') def _test_take_action(self, parsed_args, mock_get_dict_properties): # return value segment list self.app.client_manager.ha.segments.return_value = self.dummy_segments # return value segment show self.app.client_manager.ha.get_segment.return_value = ( self.dummy_segment) # show segment self.show_seg.take_action(parsed_args) mock_get_dict_properties.assert_called_once_with( self.dummy_segment.to_dict(), self.columns, formatters={}) class TestV1UpdateSegment(BaseV1Segment, osc_lib_utils.TestCommand): def setUp(self): super(TestV1UpdateSegment, self).setUp() self.update_seg = UpdateSegment(self.app, self.app_args, cmd_name='segment update') self.columns = ['created_at', 'updated_at', 'uuid', 'name', 'description', 'id', 'service_type', 'recovery_method', ] # segment list self.dummy_segments = [ FakeSegments( name=SEGMENT_NAME, uuid=SEGMENT_ID, description='FakeNamespace_description', recovery_method='Update_recovery_method', service_type='test_type')] self.dummy_segments.append(FakeSegments( name=SEGMENT_NAME, uuid=SEGMENT_ID, description='FakeNamespace_description', recovery_method='Update_recovery_method', service_type='test_type')) def test_take_action_by_uuid(self): # command param arglist = ['8c35987c-f416-46ca-be37-52f58fd8d294', '--name', 'test_segment', '--recovery_method', 'rh_priority', '--service_type', 'test_service', '--description', 'test_segment'] parsed_args = self.check_parser(self.update_seg, arglist, []) self._test_take_action(parsed_args) def test_take_action_by_name(self): # command param arglist = [SEGMENT_NAME, '--name', 'test_segment', '--recovery_method', 'auto_priority', '--service_type', 'test_service', '--description', 'test_segment'] parsed_args = self.check_parser(self.update_seg, arglist, []) self._test_take_action(parsed_args) def test_update_segment_with_recovery_method_reserved_host(self): arglist = ['8c35987c-f416-46ca-be37-52f58fd8d294', '--name', 'test_segment', '--recovery_method', 'reserved_host', '--service_type', 'test_service', '--description', 'test_segment'] parsed_args = self.check_parser(self.update_seg, arglist, []) self._test_take_action(parsed_args) @mock.patch.object(utils, 'get_dict_properties') def _test_take_action(self, parsed_args, mock_get_dict_properties): # return value segment list self.app.client_manager.ha.segments.return_value = self.dummy_segments # return value segment data setup self.app.client_manager.ha.get_segment.return_value = ( self.dummy_segment) # segment update self.update_seg.take_action(parsed_args) mock_get_dict_properties.assert_called_once_with( self.dummy_segment.to_dict(), self.columns, formatters={}) def test_update_with_invalid_recovery_method(self): arglist = [SEGMENT_NAME, '--name', 'test_segment', '--recovery_method', 'invalid-rcovery-method', '--service_type', 'test_service', '--description', 'test_segment'] self.assertRaises(osc_lib_utils.ParserException, self.check_parser, self.update_seg, arglist, []) class TestV1DeleteSegment(BaseV1Segment): def setUp(self): super(TestV1DeleteSegment, self).setUp() self.delete_seg = DeleteSegment(self.app, self.app_args, cmd_name='segment delete') # segment list self.dummy_segments = [ FakeSegments( name=SEGMENT_NAME, uuid=SEGMENT_ID, description='FakeNamespace_description', recovery_method='Update_recovery_method', service_type='test_type')] def test_take_action_by_uuid(self): # command param parsed_args = FakeNamespace(segment=[SEGMENT_ID]) self._test_take_action(parsed_args) def test_take_action_by_name(self): # command param parsed_args = FakeNamespace(segment=[SEGMENT_NAME]) self._test_take_action(parsed_args) def _test_take_action(self, parsed_args): # return_value segment list self.app.client_manager.ha.segments.return_value = self.dummy_segments # return_value segment delete self.app.client_manager.ha.delete_segment.return_value = None # segment delete self.delete_seg.take_action(parsed_args) self.app.client_manager.ha.delete_segment.assert_called_once_with( SEGMENT_ID, False) @ddt.ddt class TestV1CreateSegment(BaseV1Segment, osc_lib_utils.TestCommand): def setUp(self): super(TestV1CreateSegment, self).setUp() self.cmd = CreateSegment(self.app, None) @ddt.data({"recovery_method": "auto"}, {"recovery_method": "reserved_host"}, {"recovery_method": "auto_priority"}, {"recovery_method": "rh_priority"}) def test_create_with_all_recovery_methods(self, ddt_data): arglist = ['test_segment', ddt_data['recovery_method'], 'test_service', '--description', 'test_segment'] parsed_args = self.check_parser(self.cmd, arglist, []) self._test_take_action(parsed_args, arglist) def _test_take_action(self, parsed_args, arglist): # return value segment list self.app.client_manager.ha.segments.return_value = arglist # return value segment data setup self.app.client_manager.ha.get_segment.return_value = ( self.dummy_segment) self.cmd.take_action(parsed_args) self.app.client_manager.ha.create_segment.assert_called_with( description='test_segment', name='test_segment', recovery_method=arglist[1], service_type='test_service') def test_create_segment_recovery_method_invalid(self): arglist = ['test_segment', 'invalid_recovery_method', 'test_service', '--description', 'test_segment'] self.assertRaises(osc_lib_utils.ParserException, self.check_parser, self.cmd, arglist, []) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/masakariclient/tests/unit/osc/v1/test_vmove.py0000664000175000017500000000610500000000000027131 0ustar00zuulzuul00000000000000# Copyright(c) 2022 Inspur # # 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 unittest import mock import uuid from osc_lib import utils from masakariclient.osc.v1.vmove import ShowVMove from masakariclient.tests import base VMOVE_ID = uuid.uuid4() NOTIFICATION_ID = uuid.uuid4() SERVER_ID = uuid.uuid4() class FakeNamespace(object): """Fake parser object.""" def __init__(self, notification_id=None, vmove_id=None): super(FakeNamespace, self).__init__() self.notification_id = notification_id self.vmove_id = vmove_id class FakeVMove(object): """Fake notification show detail.""" def __init__(self,): super(FakeVMove, self).__init__() def to_dict(self): return { 'created_at': '2023-01-28T14:55:27.000000', 'uuid': VMOVE_ID, 'notification_id': NOTIFICATION_ID, 'server_id': SERVER_ID, 'server_name': 'test', 'source_host': 'host1', 'dest_host': 'host2', 'start_time': '2023-01-28T14:55:27.000000', 'end_time': "2023-01-28T14:55:31.000000", 'status': 'succeeded', 'type': 'evacuation', 'message': None, } class BaseV1VMove(base.TestCase): def setUp(self): super(BaseV1VMove, self).setUp() self.app = mock.Mock() self.app_args = mock.Mock() self.client_manager = mock.Mock() self.app.client_manager.ha = self.client_manager self.columns = [ 'created_at', 'updated_at', 'uuid', 'server_id', 'server_name', 'source_host', 'dest_host', 'start_time', 'end_time', 'type', 'status', 'message' ] self.dummy_vmove = FakeVMove() class TestV1ShowVMove(BaseV1VMove): def setUp(self): super(TestV1ShowVMove, self).setUp() self.show_vmove = ShowVMove(self.app, self.app_args, cmd_name='vmove show') @mock.patch.object(utils, 'get_dict_properties') def test_take_action(self, mock_get_dict_properties): parsed_args = FakeNamespace(notification_id=NOTIFICATION_ID, vmove_id=VMOVE_ID) self.app.client_manager.ha.get_vmove.return_value = self.dummy_vmove # show the vmove specified by uuid self.show_vmove.take_action(parsed_args) self.app.client_manager.ha.get_vmove.assert_called_once_with( VMOVE_ID, NOTIFICATION_ID) mock_get_dict_properties.assert_called_once_with( self.dummy_vmove.to_dict(), self.columns, formatters={}) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8739161 python_masakariclient-8.6.0/python_masakariclient.egg-info/0000775000175000017500000000000000000000000024222 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695570.0 python_masakariclient-8.6.0/python_masakariclient.egg-info/PKG-INFO0000644000175000017500000000343200000000000025317 0ustar00zuulzuul00000000000000Metadata-Version: 2.1 Name: python-masakariclient Version: 8.6.0 Summary: masakariclient module and a CLI tool for masakari Home-page: https://docs.openstack.org/python-masakariclient/latest/ Author: OpenStack Author-email: openstack-discuss@lists.openstack.org 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 :: Implementation :: CPython Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Requires-Python: >=3.8 License-File: LICENSE Requires-Dist: openstacksdk>=0.13.0 Requires-Dist: osc-lib>=1.8.0 Requires-Dist: oslo.i18n>=3.15.3 Requires-Dist: oslo.serialization!=2.19.1,>=2.18.0 Requires-Dist: pbr!=2.1.0,>=2.0.0 ===================== python-masakariclient ===================== masakariclient module and a CLI tool for masakari Please fill here a long description which must be at least 3 lines wrapped on 80 cols, so that distribution package maintainers can use it in their packages. Note that this is a hard requirement. * Free software: Apache license * Documentation: https://docs.openstack.org/python-masakariclient/latest/ * Source: https://opendev.org/openstack/python-masakariclient * Bugs: https://bugs.launchpad.net/python-masakariclient * Release Notes: https://docs.openstack.org/releasenotes/python-masakariclient Features -------- * TODO ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695570.0 python_masakariclient-8.6.0/python_masakariclient.egg-info/SOURCES.txt0000664000175000017500000000513000000000000026105 0ustar00zuulzuul00000000000000.coveragerc .mailmap .stestr.conf .zuul.yaml AUTHORS CONTRIBUTING.rst ChangeLog HACKING.rst LICENSE README.rst requirements.txt setup.cfg setup.py test-requirements.txt tox.ini doc/requirements.txt doc/source/conf.py doc/source/index.rst doc/source/cli/commands.rst doc/source/cli/index.rst doc/source/cli/masakari_commands.rst doc/source/contributor/contributing.rst doc/source/contributor/developing.rst doc/source/contributor/index.rst doc/source/install/index.rst masakariclient/__init__.py masakariclient/api_versions.py masakariclient/plugin.py masakariclient/common/__init__.py masakariclient/common/exception.py masakariclient/common/i18n.py masakariclient/common/utils.py masakariclient/osc/__init__.py masakariclient/osc/v1/__init__.py masakariclient/osc/v1/host.py masakariclient/osc/v1/notification.py masakariclient/osc/v1/segment.py masakariclient/osc/v1/vmove.py masakariclient/tests/__init__.py masakariclient/tests/base.py masakariclient/tests/unit/__init__.py masakariclient/tests/unit/osc/__init__.py masakariclient/tests/unit/osc/v1/__init__.py masakariclient/tests/unit/osc/v1/test_host.py masakariclient/tests/unit/osc/v1/test_notification.py masakariclient/tests/unit/osc/v1/test_segment.py masakariclient/tests/unit/osc/v1/test_vmove.py python_masakariclient.egg-info/PKG-INFO python_masakariclient.egg-info/SOURCES.txt python_masakariclient.egg-info/dependency_links.txt python_masakariclient.egg-info/entry_points.txt python_masakariclient.egg-info/not-zip-safe python_masakariclient.egg-info/pbr.json python_masakariclient.egg-info/requires.txt python_masakariclient.egg-info/top_level.txt releasenotes/notes/.placeholder releasenotes/notes/add-version-support-for-progress-details-recovery-workflows-06614c76d44e64ff.yaml releasenotes/notes/blueprint-add-vmoves-a74335fec8446523.yaml releasenotes/notes/blueprint-enable-to-segment-3a938bdddbd57c88.yaml releasenotes/notes/bug-1764931-889d9fe4cfb80b01.yaml releasenotes/notes/deprecate-cli-9ffee25a5c3d1b3b.yaml releasenotes/notes/drop-py-2-7-d3c0f239678a4c83.yaml releasenotes/notes/drop-the-legacy-client-1b25f27aa5525295.yaml releasenotes/source/2023.1.rst releasenotes/source/2024.1.rst releasenotes/source/2024.2.rst releasenotes/source/conf.py releasenotes/source/index.rst releasenotes/source/rocky.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/yoga.rst releasenotes/source/zed.rst releasenotes/source/_static/.placeholder releasenotes/source/_templates/.placeholder././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695570.0 python_masakariclient-8.6.0/python_masakariclient.egg-info/dependency_links.txt0000664000175000017500000000000100000000000030270 0ustar00zuulzuul00000000000000 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695570.0 python_masakariclient-8.6.0/python_masakariclient.egg-info/entry_points.txt0000664000175000017500000000176100000000000027525 0ustar00zuulzuul00000000000000[openstack.cli.extension] ha = masakariclient.plugin [openstack.ha.v1] notification_create = masakariclient.osc.v1.notification:CreateNotification notification_list = masakariclient.osc.v1.notification:ListNotification notification_show = masakariclient.osc.v1.notification:ShowNotification notification_vmove_list = masakariclient.osc.v1.vmove:ListVMove notification_vmove_show = masakariclient.osc.v1.vmove:ShowVMove segment_create = masakariclient.osc.v1.segment:CreateSegment segment_delete = masakariclient.osc.v1.segment:DeleteSegment segment_host_create = masakariclient.osc.v1.host:CreateHost segment_host_delete = masakariclient.osc.v1.host:DeleteHost segment_host_list = masakariclient.osc.v1.host:ListHost segment_host_show = masakariclient.osc.v1.host:ShowHost segment_host_update = masakariclient.osc.v1.host:UpdateHost segment_list = masakariclient.osc.v1.segment:ListSegment segment_show = masakariclient.osc.v1.segment:ShowSegment segment_update = masakariclient.osc.v1.segment:UpdateSegment ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695570.0 python_masakariclient-8.6.0/python_masakariclient.egg-info/not-zip-safe0000664000175000017500000000000100000000000026450 0ustar00zuulzuul00000000000000 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695570.0 python_masakariclient-8.6.0/python_masakariclient.egg-info/pbr.json0000664000175000017500000000005600000000000025701 0ustar00zuulzuul00000000000000{"git_version": "eee0832", "is_release": true}././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695570.0 python_masakariclient-8.6.0/python_masakariclient.egg-info/requires.txt0000664000175000017500000000015500000000000026623 0ustar00zuulzuul00000000000000openstacksdk>=0.13.0 osc-lib>=1.8.0 oslo.i18n>=3.15.3 oslo.serialization!=2.19.1,>=2.18.0 pbr!=2.1.0,>=2.0.0 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695570.0 python_masakariclient-8.6.0/python_masakariclient.egg-info/top_level.txt0000664000175000017500000000001700000000000026752 0ustar00zuulzuul00000000000000masakariclient ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8579164 python_masakariclient-8.6.0/releasenotes/0000775000175000017500000000000000000000000020631 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8699162 python_masakariclient-8.6.0/releasenotes/notes/0000775000175000017500000000000000000000000021761 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/notes/.placeholder0000664000175000017500000000000000000000000024232 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000024000000000000011451 xustar0000000000000000138 path=python_masakariclient-8.6.0/releasenotes/notes/add-version-support-for-progress-details-recovery-workflows-06614c76d44e64ff.yaml 22 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/notes/add-version-support-for-progress-details-recovery-wor0000664000175000017500000000036300000000000034345 0ustar00zuulzuul00000000000000--- features: - | The 1.1 microversion is now supported. This introduces the following changes: * User can get the `progress_details` of the notification in microversion 1.1. The default version is set to 1.1 if not provided. ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/notes/blueprint-add-vmoves-a74335fec8446523.yaml0000664000175000017500000000032700000000000031000 0ustar00zuulzuul00000000000000--- features: - | Adds support for Masakari VMove API in microversion 1.3. `Blueprint vm-evacuations-for-host-recovery `__ ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/notes/blueprint-enable-to-segment-3a938bdddbd57c88.yaml0000664000175000017500000000031200000000000032541 0ustar00zuulzuul00000000000000--- features: - | Adds support for API microversion 1.2 with ``enabled`` flag for segments. `Blueprint enable-to-segment `__ ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/notes/bug-1764931-889d9fe4cfb80b01.yaml0000664000175000017500000000101200000000000026560 0ustar00zuulzuul00000000000000--- features: - | Added ``--os-region-name`` and ``--os-interface`` options to select which endpoint it should use to connect to the masakari service. If masakari services are running in multiple regions of your cloud, you can specify `--os-region-name` in order to get OpenStack service client for the specified region. By default, keystoneauth always selects `public` interface endpoint from the service catalog. Now you can also specify `admin` or `internal` in the --os-interface option. ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/notes/deprecate-cli-9ffee25a5c3d1b3b.yaml0000664000175000017500000000030000000000000027772 0ustar00zuulzuul00000000000000--- deprecations: - | The masakari CLI is now deprecated. This is the signal that it is time to start using the openstack CLI. No new features will be added to the masakari CLI. ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/notes/drop-py-2-7-d3c0f239678a4c83.yaml0000664000175000017500000000031700000000000026706 0ustar00zuulzuul00000000000000--- upgrade: - | Python 2.7 support has been dropped. Last release of python-masakariclient to support python 2.7 is OpenStack Train. The minimum version of Python now supported is Python 3.6. ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/notes/drop-the-legacy-client-1b25f27aa5525295.yaml0000664000175000017500000000025600000000000031161 0ustar00zuulzuul00000000000000--- upgrade: - | The legacy Masakari client (invoked by calling ``masakari`` as opposed to ``openstack``) has been removed. It has been deprecated since Stein. ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8739161 python_masakariclient-8.6.0/releasenotes/source/0000775000175000017500000000000000000000000022131 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/2023.1.rst0000664000175000017500000000020200000000000023402 0ustar00zuulzuul00000000000000=========================== 2023.1 Series Release Notes =========================== .. release-notes:: :branch: stable/2023.1 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/2024.1.rst0000664000175000017500000000020200000000000023403 0ustar00zuulzuul00000000000000=========================== 2024.1 Series Release Notes =========================== .. release-notes:: :branch: stable/2024.1 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/2024.2.rst0000664000175000017500000000020200000000000023404 0ustar00zuulzuul00000000000000=========================== 2024.2 Series Release Notes =========================== .. release-notes:: :branch: stable/2024.2 ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8739161 python_masakariclient-8.6.0/releasenotes/source/_static/0000775000175000017500000000000000000000000023557 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/_static/.placeholder0000664000175000017500000000000000000000000026030 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1740695570.8739161 python_masakariclient-8.6.0/releasenotes/source/_templates/0000775000175000017500000000000000000000000024266 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/_templates/.placeholder0000664000175000017500000000000000000000000026537 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/conf.py0000664000175000017500000002226500000000000023437 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. # Masakari Release Notes documentation build configuration file, created by # sphinx-quickstart on Tue Nov 3 17:40:50 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'openstackdocstheme', 'reno.sphinxext', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. # source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = 'PythonMasakariClient Release Notes' copyright = '2016, OpenStack Foundation' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. # The full version, including alpha/beta/rc tags. release = '' # The short X.Y version. version = '' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: # today = '' # Else, today_fmt is used as the format for a strftime call. # today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = [] # The reST default role (used for this markup: `text`) to use for all # documents. # default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. # add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). # add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. # show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'native' # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. # keep_warnings = False # -- 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' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". # html_title = None # A shorter title for the navigation bar. Default is the same as html_title. # html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. # html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. # html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. # html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. # html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True # Custom sidebar templates, maps document names to template names. # html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. # html_additional_pages = {} # If false, no module index is generated. # html_domain_indices = True # If false, no index is generated. # html_use_index = True # If true, the index is split into individual pages for each letter. # html_split_index = False # If true, links to the reST sources are added to the pages. # html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. # html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. # html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. # html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). # html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'MasakariClientReleaseNotesdoc' # -- Options for openstackdocstheme --------------------------------------- openstackdocs_repo_name = 'openstack/python-masakariclient' openstackdocs_bug_project = 'python-masakariclient' openstackdocs_bug_tag = '' openstackdocs_auto_name = False # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # 'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ('index', 'MasakariClientReleaseNotes.tex', 'MasakariClient Release Notes Documentation', 'MasakariClient Developers', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. # latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. # latex_use_parts = False # If true, show page references after internal links. # latex_show_pagerefs = False # If true, show URL addresses after external links. # latex_show_urls = False # Documents to append as an appendix to all manuals. # latex_appendices = [] # If false, no module index is generated. # latex_domain_indices = True # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'MasakariClientreleasenotes', 'MasakariClient Release Notes Documentation', ['MasakariClient Developers'], 1) ] # If true, show URL addresses after external links. # man_show_urls = False # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'PythonMasakariClient', 'PythonMasakariClient Release Notes Documentation', 'Masakari developers', 'PythonMasakariClient', 'One line description of project.', 'Miscellaneous') ] # Documents to append as an appendix to all manuals. # texinfo_appendices = [] # If false, no module index is generated. # texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. # texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. # texinfo_no_detailmenu = False # -- Options for Internationalization output ------------------------------ locale_dirs = ['locale/'] ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/index.rst0000664000175000017500000000042600000000000023774 0ustar00zuulzuul00000000000000============================================ masakariclient Release Notes ============================================ .. toctree:: :maxdepth: 1 unreleased 2024.2 2024.1 2023.1 zed yoga xena wallaby victoria ussuri train stein rocky ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/rocky.rst0000664000175000017500000000022100000000000024005 0ustar00zuulzuul00000000000000=================================== Rocky Series Release Notes =================================== .. release-notes:: :branch: stable/rocky ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/stein.rst0000664000175000017500000000022100000000000024000 0ustar00zuulzuul00000000000000=================================== Stein Series Release Notes =================================== .. release-notes:: :branch: stable/stein ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/train.rst0000664000175000017500000000017600000000000024004 0ustar00zuulzuul00000000000000========================== Train Series Release Notes ========================== .. release-notes:: :branch: stable/train ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/unreleased.rst0000664000175000017500000000016000000000000025007 0ustar00zuulzuul00000000000000============================== Current Series Release Notes ============================== .. release-notes:: ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/ussuri.rst0000664000175000017500000000020200000000000024207 0ustar00zuulzuul00000000000000=========================== Ussuri Series Release Notes =========================== .. release-notes:: :branch: stable/ussuri ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/victoria.rst0000664000175000017500000000022000000000000024475 0ustar00zuulzuul00000000000000============================= Victoria Series Release Notes ============================= .. release-notes:: :branch: unmaintained/victoria ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/wallaby.rst0000664000175000017500000000021400000000000024313 0ustar00zuulzuul00000000000000============================ Wallaby Series Release Notes ============================ .. release-notes:: :branch: unmaintained/wallaby ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/xena.rst0000664000175000017500000000020000000000000023606 0ustar00zuulzuul00000000000000========================= Xena Series Release Notes ========================= .. release-notes:: :branch: unmaintained/xena ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/yoga.rst0000664000175000017500000000020000000000000023612 0ustar00zuulzuul00000000000000========================= Yoga Series Release Notes ========================= .. release-notes:: :branch: unmaintained/yoga ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/releasenotes/source/zed.rst0000664000175000017500000000017400000000000023447 0ustar00zuulzuul00000000000000======================== Zed Series Release Notes ======================== .. release-notes:: :branch: unmaintained/zed ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/requirements.txt0000664000175000017500000000060100000000000021421 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. openstacksdk>=0.13.0 # Apache-2.0 osc-lib>=1.8.0 # Apache-2.0 oslo.i18n>=3.15.3 # Apache-2.0 oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0 pbr!=2.1.0,>=2.0.0 # Apache-2.0 ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1740695570.877916 python_masakariclient-8.6.0/setup.cfg0000664000175000017500000000365500000000000017772 0ustar00zuulzuul00000000000000[metadata] name = python-masakariclient summary = masakariclient module and a CLI tool for masakari description_file = README.rst author = OpenStack author_email = openstack-discuss@lists.openstack.org home_page = https://docs.openstack.org/python-masakariclient/latest/ python_requires = >=3.8 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 :: Implementation :: CPython Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 [files] packages = masakariclient [entry_points] openstack.cli.extension = ha = masakariclient.plugin openstack.ha.v1 = notification_create = masakariclient.osc.v1.notification:CreateNotification notification_show = masakariclient.osc.v1.notification:ShowNotification notification_list = masakariclient.osc.v1.notification:ListNotification notification_vmove_show = masakariclient.osc.v1.vmove:ShowVMove notification_vmove_list = masakariclient.osc.v1.vmove:ListVMove segment_create = masakariclient.osc.v1.segment:CreateSegment segment_update = masakariclient.osc.v1.segment:UpdateSegment segment_delete = masakariclient.osc.v1.segment:DeleteSegment segment_show = masakariclient.osc.v1.segment:ShowSegment segment_list = masakariclient.osc.v1.segment:ListSegment segment_host_create = masakariclient.osc.v1.host:CreateHost segment_host_show = masakariclient.osc.v1.host:ShowHost segment_host_list = masakariclient.osc.v1.host:ListHost segment_host_delete = masakariclient.osc.v1.host:DeleteHost segment_host_update = masakariclient.osc.v1.host:UpdateHost [egg_info] tag_build = tag_date = 0 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/setup.py0000664000175000017500000000127100000000000017653 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>=2.0.0'], pbr=True) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/test-requirements.txt0000664000175000017500000000074500000000000022407 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.1,<3.1.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 ddt>=1.0.1 # MIT python-subunit>=1.0.0 # Apache-2.0/BSD oslotest>=3.2.0 # Apache-2.0 requests-mock>=1.2.0 # Apache-2.0 stestr>=1.0.0 # Apache-2.0 testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1740695500.0 python_masakariclient-8.6.0/tox.ini0000664000175000017500000000366600000000000017466 0ustar00zuulzuul00000000000000[tox] minversion = 3.1.1 envlist = pep8,py3 ignore_basepython_conflict = True [testenv] basepython = python3 usedevelop = True deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = stestr run {posargs} passenv = HTTP_PROXY, HTTPS_PROXY, NO_PROXY, OS_DEBUG, GENERATE_HASHES [testenv:linters] skip_install = True deps = {[testenv:pep8]deps} {[testenv:bandit]deps} commands = {[testenv:pep8]commands} {[testenv:bandit]commands} [testenv:pep8] skip_install = True deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} hacking commands = flake8 {posargs} [testenv:bandit] skip_install = True deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} bandit commands = bandit -r masakariclient [testenv:venv] commands = {posargs} [testenv:cover] setenv = PYTHON=coverage run --source masakariclient --parallel-mode commands = stestr run {posargs} coverage combine coverage html -d cover coverage xml -o cover/coverage.xml [testenv:docs] deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html doc/source doc/build/html [testenv:releasenotes] skip_install = True deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:debug] commands = oslo_debug_helper {posargs} [flake8] # E123, E125 skipped as they are invalid PEP-8. # W504 line break after binary operator show-source = True ignore = E123,E125,W504 builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build