python-ironicclient-4.1.0/0000775000175000017500000000000013643706510015544 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/playbooks/0000775000175000017500000000000013643706510017547 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/playbooks/functional/0000775000175000017500000000000013643706510021711 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/playbooks/functional/run.yaml0000664000175000017500000000315513643706361023411 0ustar zuulzuul00000000000000- hosts: all tasks: - shell: cmd: | set -e set -x export BASE='/opt/stack' export IRONICCLIENT_DIR="$BASE/python-ironicclient" sudo chmod -R a+rw /opt/stack/ cd $IRONICCLIENT_DIR set +e echo "Running ironicclient functional test suite" # Only admin credentials needed for ironic api source $BASE/devstack/openrc admin admin FUNC_TEST_DIR=$IRONICCLIENT_DIR/ironicclient/tests/functional CONFIG_FILE=$IRONICCLIENT_DIR/test.conf echo 'Generating configuration file for functional tests' if [[ -n "$IRONIC_URL" ]]; then cat <$CONFIG_FILE [functional] api_version = 1 auth_strategy=noauth ironic_url=$IRONIC_URL END else cat <$CONFIG_FILE [functional] api_version = 1 os_auth_url=$OS_AUTH_URL os_identity_api_version=$OS_IDENTITY_API_VERSION os_username=$OS_USERNAME os_password=$OS_PASSWORD os_project_name=$OS_PROJECT_NAME os_user_domain_id=$OS_USER_DOMAIN_ID os_project_domain_id=$OS_PROJECT_DOMAIN_ID os_service_type=baremetal os_endpoint_type=public END fi echo 'Configuration file is in '$CONFIG_FILE'' export IRONICCLIENT_TEST_CONFIG=$CONFIG_FILE cd $IRONICCLIENT_DIR echo 'Running Functional Tests under Python3' tox -e functionalpy3 executable: /bin/bash chdir: '/opt/stack/python-ironicclient' python-ironicclient-4.1.0/AUTHORS0000664000175000017500000001435413643706510016623 0ustar zuulzuul00000000000000Adam Gandelman Alexey Galkin Aline Bousquet Andreas Jaeger Andreas Jaeger Andrey Kurilin Anh Tran Anton Arefiev Arne Wiebalck Arun S A G Ben Nemec Brad P. Crochet ChangBo Guo(gcb) Chaozhe.Chen Charles Short ChenZheng Chris Krelle Christian Berendt Chuck Short Clark Boylan Clif Houck Corey Bryant Dao Cong Tien Davanum Srinivas David Hu David Shrewsbury Devananda van der Veen Diego de Lima Pereira Dirk Mueller Dmitry Tantsur Dmitry Tantsur Dmitry Tantsur Doug Hellmann Eric Fried Eric Fried Flavio Percoco Florian Fuchs Galyna Zholtkevych Gaëtan Trellu Ghanshyam Mann Ghe Rivero Guang Yee Gábor Antal Hamdy Khader Hangdong Zhang HaoZhi, Cui Haomeng, Wang He Yongli Himanshu Kumar Hironori Shiina Ian Wienand Iury Gregory Melo Ferreira James E. Blair Jamie Lennox Jamie Lennox Jason Jeremy Stanley Jim Rollenhagen John L. Villalovos John L. Villalovos John Trowbridge JuPing Julia Kreger KATO Tomoyuki KaiFeng Wang Kaifeng Wang Kan Kevin McDonald Kui Shi Kyrylo Romanenko Lin Tan Lin Tan LiuNanke Lokesh S Lucas Alvares Gomes Luong Anh Tuan M V P Nitesh Madhuri Kumari Marc Aubry Mario Villaplana Mark Goddard Martin Geisler Mathieu Gagné Matt Keenan Maxime Belanger Michael Davies Michael Johnson Michael Turek Mikhail Durnosvistov Miles Gould Monty Taylor Motohiro OTSUKA Nam Nguyen Hoai Naohiro Tamura Nguyen Hai Nisha Agarwal Ondřej Nový OpenStack Release Bot Pavlo Shchelokovskyy Pavlo Shchelokovskyy Rakesh H S Ramakrishnan G Riccardo Pittau Rodion Promyshlennikov Ruby Loo Ruby Loo Ruby Loo Ruby Loo Rui Chen Sam Betts Sascha Peilicke Sergey Lupersolsky Sergey Turivnyi Sergii Turivnyi Shuquan Huang Sinval Vieira SofiiaAndriichenko Steve Martinelli Tang Chen Tang Chen Tao Li TienDC Tony Breeds Tuan Do Anh Tzu-Mainn Chen Ukesh Kumar Vasudevan Vadim Hmyrov Vasyl Saienko Victor Sergeyev Vladyslav Drok Vu Cong Tuan William Stevenson Yang Hongyang Yolanda Robla Yuiko Takada YuikoTakada Yuriy Zveryanskyy Yushiro FURUKAWA Zenghui Shi Zhenguo Niu chenke deepakmourya dnuka ericxiett fpxie ghanshyam huang.zhiping jiang wei jiangfei linbing linggao lingyongxu liuqing llg8212 max_lobur melissaml qinchunhua qingszhao ricolin sandriichenko shu-mutou sonu.kumar sunjia venkatamahesh vishal mahajan wangfaxin wu.chunyang xiexs ya.wang zhengchuan hu zhulingjie python-ironicclient-4.1.0/setup.cfg0000664000175000017500000002212513643706510017367 0ustar zuulzuul00000000000000[metadata] name = python-ironicclient summary = OpenStack Bare Metal Provisioning API Client Library description-file = README.rst author = OpenStack author-email = openstack-discuss@lists.openstack.org home-page = https://docs.openstack.org/python-ironicclient/latest/ python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology Intended Audience :: System Administrators License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 [files] packages = ironicclient [entry_points] console_scripts = baremetal = ironicclient.shell:main openstack.cli.extension = baremetal = ironicclient.osc.plugin openstack.baremetal.v1 = baremetal_allocation_create = ironicclient.osc.v1.baremetal_allocation:CreateBaremetalAllocation baremetal_allocation_delete = ironicclient.osc.v1.baremetal_allocation:DeleteBaremetalAllocation baremetal_allocation_list = ironicclient.osc.v1.baremetal_allocation:ListBaremetalAllocation baremetal_allocation_show = ironicclient.osc.v1.baremetal_allocation:ShowBaremetalAllocation baremetal_allocation_set = ironicclient.osc.v1.baremetal_allocation:SetBaremetalAllocation baremetal_allocation_unset = ironicclient.osc.v1.baremetal_allocation:UnsetBaremetalAllocation baremetal_chassis_create = ironicclient.osc.v1.baremetal_chassis:CreateBaremetalChassis baremetal_chassis_delete = ironicclient.osc.v1.baremetal_chassis:DeleteBaremetalChassis baremetal_chassis_list = ironicclient.osc.v1.baremetal_chassis:ListBaremetalChassis baremetal_chassis_set = ironicclient.osc.v1.baremetal_chassis:SetBaremetalChassis baremetal_chassis_show = ironicclient.osc.v1.baremetal_chassis:ShowBaremetalChassis baremetal_chassis_unset = ironicclient.osc.v1.baremetal_chassis:UnsetBaremetalChassis baremetal_create = ironicclient.osc.v1.baremetal_create:CreateBaremetal baremetal_deploy_template_create = ironicclient.osc.v1.baremetal_deploy_template:CreateBaremetalDeployTemplate baremetal_deploy_template_delete = ironicclient.osc.v1.baremetal_deploy_template:DeleteBaremetalDeployTemplate baremetal_deploy_template_list = ironicclient.osc.v1.baremetal_deploy_template:ListBaremetalDeployTemplate baremetal_deploy_template_set = ironicclient.osc.v1.baremetal_deploy_template:SetBaremetalDeployTemplate baremetal_deploy_template_unset = ironicclient.osc.v1.baremetal_deploy_template:UnsetBaremetalDeployTemplate baremetal_deploy_template_show = ironicclient.osc.v1.baremetal_deploy_template:ShowBaremetalDeployTemplate baremetal_driver_list = ironicclient.osc.v1.baremetal_driver:ListBaremetalDriver baremetal_driver_passthru_call = ironicclient.osc.v1.baremetal_driver:PassthruCallBaremetalDriver baremetal_driver_passthru_list = ironicclient.osc.v1.baremetal_driver:PassthruListBaremetalDriver baremetal_driver_property_list = ironicclient.osc.v1.baremetal_driver:ListBaremetalDriverProperty baremetal_driver_raid_property_list = ironicclient.osc.v1.baremetal_driver:ListBaremetalDriverRaidProperty baremetal_driver_show = ironicclient.osc.v1.baremetal_driver:ShowBaremetalDriver baremetal_node_abort = ironicclient.osc.v1.baremetal_node:AbortBaremetalNode baremetal_node_add_trait = ironicclient.osc.v1.baremetal_node:AddTraitBaremetalNode baremetal_node_adopt = ironicclient.osc.v1.baremetal_node:AdoptBaremetalNode baremetal_node_bios_setting_list = ironicclient.osc.v1.baremetal_node:ListBIOSSettingBaremetalNode baremetal_node_bios_setting_show = ironicclient.osc.v1.baremetal_node:BIOSSettingShowBaremetalNode baremetal_node_boot_device_set = ironicclient.osc.v1.baremetal_node:BootdeviceSetBaremetalNode baremetal_node_boot_device_show = ironicclient.osc.v1.baremetal_node:BootdeviceShowBaremetalNode baremetal_node_clean = ironicclient.osc.v1.baremetal_node:CleanBaremetalNode baremetal_node_console_disable = ironicclient.osc.v1.baremetal_node:ConsoleDisableBaremetalNode baremetal_node_console_enable = ironicclient.osc.v1.baremetal_node:ConsoleEnableBaremetalNode baremetal_node_console_show = ironicclient.osc.v1.baremetal_node:ConsoleShowBaremetalNode baremetal_node_create = ironicclient.osc.v1.baremetal_node:CreateBaremetalNode baremetal_node_delete = ironicclient.osc.v1.baremetal_node:DeleteBaremetalNode baremetal_node_deploy = ironicclient.osc.v1.baremetal_node:DeployBaremetalNode baremetal_node_inspect = ironicclient.osc.v1.baremetal_node:InspectBaremetalNode baremetal_node_list = ironicclient.osc.v1.baremetal_node:ListBaremetalNode baremetal_node_maintenance_set = ironicclient.osc.v1.baremetal_node:MaintenanceSetBaremetalNode baremetal_node_maintenance_unset = ironicclient.osc.v1.baremetal_node:MaintenanceUnsetBaremetalNode baremetal_node_manage = ironicclient.osc.v1.baremetal_node:ManageBaremetalNode baremetal_node_passthru_call = ironicclient.osc.v1.baremetal_node:PassthruCallBaremetalNode baremetal_node_passthru_list = ironicclient.osc.v1.baremetal_node:PassthruListBaremetalNode baremetal_node_power_off = ironicclient.osc.v1.baremetal_node:PowerOffBaremetalNode baremetal_node_power_on = ironicclient.osc.v1.baremetal_node:PowerOnBaremetalNode baremetal_node_provide = ironicclient.osc.v1.baremetal_node:ProvideBaremetalNode baremetal_node_reboot = ironicclient.osc.v1.baremetal_node:RebootBaremetalNode baremetal_node_rebuild = ironicclient.osc.v1.baremetal_node:RebuildBaremetalNode baremetal_node_remove_trait = ironicclient.osc.v1.baremetal_node:RemoveTraitBaremetalNode baremetal_node_rescue = ironicclient.osc.v1.baremetal_node:RescueBaremetalNode baremetal_node_set = ironicclient.osc.v1.baremetal_node:SetBaremetalNode baremetal_node_show = ironicclient.osc.v1.baremetal_node:ShowBaremetalNode baremetal_node_trait_list = ironicclient.osc.v1.baremetal_node:ListTraitsBaremetalNode baremetal_node_undeploy = ironicclient.osc.v1.baremetal_node:UndeployBaremetalNode baremetal_node_unrescue = ironicclient.osc.v1.baremetal_node:UnrescueBaremetalNode baremetal_node_unset = ironicclient.osc.v1.baremetal_node:UnsetBaremetalNode baremetal_node_validate = ironicclient.osc.v1.baremetal_node:ValidateBaremetalNode baremetal_node_vif_attach = ironicclient.osc.v1.baremetal_node:VifAttachBaremetalNode baremetal_node_vif_detach = ironicclient.osc.v1.baremetal_node:VifDetachBaremetalNode baremetal_node_vif_list = ironicclient.osc.v1.baremetal_node:VifListBaremetalNode baremetal_node_inject_nmi = ironicclient.osc.v1.baremetal_node:InjectNmiBaremetalNode baremetal_port_create = ironicclient.osc.v1.baremetal_port:CreateBaremetalPort baremetal_port_delete = ironicclient.osc.v1.baremetal_port:DeleteBaremetalPort baremetal_port_list = ironicclient.osc.v1.baremetal_port:ListBaremetalPort baremetal_port_set = ironicclient.osc.v1.baremetal_port:SetBaremetalPort baremetal_port_show = ironicclient.osc.v1.baremetal_port:ShowBaremetalPort baremetal_port_unset = ironicclient.osc.v1.baremetal_port:UnsetBaremetalPort baremetal_port_group_create = ironicclient.osc.v1.baremetal_portgroup:CreateBaremetalPortGroup baremetal_port_group_delete = ironicclient.osc.v1.baremetal_portgroup:DeleteBaremetalPortGroup baremetal_port_group_list = ironicclient.osc.v1.baremetal_portgroup:ListBaremetalPortGroup baremetal_port_group_set = ironicclient.osc.v1.baremetal_portgroup:SetBaremetalPortGroup baremetal_port_group_show = ironicclient.osc.v1.baremetal_portgroup:ShowBaremetalPortGroup baremetal_port_group_unset = ironicclient.osc.v1.baremetal_portgroup:UnsetBaremetalPortGroup baremetal_volume_connector_create = ironicclient.osc.v1.baremetal_volume_connector:CreateBaremetalVolumeConnector baremetal_volume_connector_delete = ironicclient.osc.v1.baremetal_volume_connector:DeleteBaremetalVolumeConnector baremetal_volume_connector_list = ironicclient.osc.v1.baremetal_volume_connector:ListBaremetalVolumeConnector baremetal_volume_connector_set = ironicclient.osc.v1.baremetal_volume_connector:SetBaremetalVolumeConnector baremetal_volume_connector_show = ironicclient.osc.v1.baremetal_volume_connector:ShowBaremetalVolumeConnector baremetal_volume_connector_unset = ironicclient.osc.v1.baremetal_volume_connector:UnsetBaremetalVolumeConnector baremetal_volume_target_create = ironicclient.osc.v1.baremetal_volume_target:CreateBaremetalVolumeTarget baremetal_volume_target_delete = ironicclient.osc.v1.baremetal_volume_target:DeleteBaremetalVolumeTarget baremetal_volume_target_list = ironicclient.osc.v1.baremetal_volume_target:ListBaremetalVolumeTarget baremetal_volume_target_set = ironicclient.osc.v1.baremetal_volume_target:SetBaremetalVolumeTarget baremetal_volume_target_show = ironicclient.osc.v1.baremetal_volume_target:ShowBaremetalVolumeTarget baremetal_volume_target_unset = ironicclient.osc.v1.baremetal_volume_target:UnsetBaremetalVolumeTarget baremetal_conductor_list = ironicclient.osc.v1.baremetal_conductor:ListBaremetalConductor baremetal_conductor_show = ironicclient.osc.v1.baremetal_conductor:ShowBaremetalConductor [extras] cli = python-openstackclient>=3.12.0 # Apache-2.0 [egg_info] tag_build = tag_date = 0 python-ironicclient-4.1.0/setup.py0000664000175000017500000000127113643706361017263 0ustar zuulzuul00000000000000# 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) python-ironicclient-4.1.0/requirements.txt0000664000175000017500000000114613643706361021036 0ustar zuulzuul00000000000000# 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. pbr!=2.1.0,>=2.0.0 # Apache-2.0 appdirs>=1.3.0 # MIT License cliff!=2.9.0,>=2.8.0 # Apache-2.0 dogpile.cache>=0.6.2 # BSD jsonschema>=2.6.0 # MIT keystoneauth1>=3.4.0 # Apache-2.0 openstacksdk>=0.18.0 # Apache-2.0 osc-lib>=1.10.0 # Apache-2.0 oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0 oslo.utils>=3.33.0 # Apache-2.0 PyYAML>=3.12 # MIT requests>=2.14.2 # Apache-2.0 stevedore>=1.20.0 # Apache-2.0 python-ironicclient-4.1.0/LICENSE0000664000175000017500000002363713643706361016570 0ustar zuulzuul00000000000000 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. python-ironicclient-4.1.0/doc/0000775000175000017500000000000013643706510016311 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/doc/source/0000775000175000017500000000000013643706510017611 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/doc/source/conf.py0000664000175000017500000000515613643706361021123 0ustar zuulzuul00000000000000# -- 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 = ['sphinxcontrib.apidoc', 'sphinx.ext.viewcode', 'openstackdocstheme', 'cliff.sphinxext', ] # sphinxcontrib.apidoc options apidoc_module_dir = '../../ironicclient' apidoc_output_dir = 'reference/api' apidoc_excluded_paths = [ 'tests/functional/*', 'tests'] apidoc_separate_modules = True # openstackdocstheme options repository_name = 'openstack/python-ironicclient' use_storyboard = True # 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 # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The master toctree document. master_doc = 'index' # General information about the project. copyright = u'OpenStack Foundation' # A list of ignored prefixes for module index sorting. modindex_common_prefix = ['ironicclient.'] # 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 = 'sphinx' # A list of glob-style patterns that should be excluded when looking for # source files. They are matched against the source file names relative to the # source directory, using slashes as directory separators on all platforms. exclude_patterns = ['api/ironicclient.tests.functional.*'] # -- 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 = '_theme' #html_static_path = ['_static'] html_theme = 'openstackdocs' # Output file base name for HTML help builder. htmlhelp_basename = 'python-ironicclientdoc' latex_use_xindy = False # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ ( 'index', 'doc-python-ironicclient.tex', u'Python Ironic Client Documentation', u'OpenStack LLC', 'manual' ), ] autoprogram_cliff_application = 'openstack' python-ironicclient-4.1.0/doc/source/api_v1.rst0000664000175000017500000000740513643706361021534 0ustar zuulzuul00000000000000.. _api_v1: ======================= ironicclient Python API ======================= The ironicclient python API lets you access ironic, the OpenStack Bare Metal Provisioning Service. For example, to manipulate nodes, you interact with an `ironicclient.v1.node`_ object. You obtain access to nodes via attributes of the `ironicclient.v1.client.Client`_ object. Usage ===== Get a Client object ------------------- First, create an `ironicclient.v1.client.Client`_ instance by passing your credentials to `ironicclient.client.get_client()`_. By default, the Bare Metal Provisioning system is configured so that only administrators (users with 'admin' role) have access. .. note:: Explicit instantiation of `ironicclient.v1.client.Client`_ may cause errors since it doesn't verify provided arguments, using `ironicclient.client.get_client()` is preferred way to get client object. There are two different sets of credentials that can be used:: * ironic endpoint and auth token * Identity Service (keystone) credentials Using ironic endpoint and auth token .................................... An auth token and the ironic endpoint can be used to authenticate:: * os_auth_token: authentication token (from Identity Service) * ironic_url: ironic API endpoint, eg http://ironic.example.org:6385/v1 To create the client, you can use the API like so:: >>> from ironicclient import client >>> >>> kwargs = {'os_auth_token': '3bcc3d3a03f44e3d8377f9247b0ad155', >>> 'ironic_url': 'http://ironic.example.org:6385/'} >>> ironic = client.get_client(1, **kwargs) Using Identity Service (keystone) credentials ............................................. These Identity Service credentials can be used to authenticate:: * os_username: name of user * os_password: user's password * os_auth_url: Identity Service endpoint for authorization * insecure: Boolean. If True, does not perform X.509 certificate validation when establishing SSL connection with identity service. default: False (optional) * os_tenant_{name|id}: name or ID of tenant Also the following parameters are required when using the Identity API v3:: * os_user_domain_name: name of a domain the user belongs to, usually 'default' * os_project_domain_name: name of a domain the project belongs to, usually 'default' To create a client, you can use the API like so:: >>> from ironicclient import client >>> >>> kwargs = {'os_username': 'name', >>> 'os_password': 'password', >>> 'os_auth_url': 'http://keystone.example.org:5000/', >>> 'os_project_name': 'project'} >>> ironic = client.get_client(1, **kwargs) Perform ironic operations ------------------------- Once you have an ironic `Client`_, you can perform various tasks:: >>> ironic.driver.list() # list of drivers >>> ironic.node.list() # list of nodes >>> ironic.node.get(node_uuid) # information about a particular node When the `Client`_ needs to propagate an exception, it will usually raise an instance subclassed from `ironicclient.exc.BaseException`_ or `ironicclient.exc.ClientException`_. Refer to the modules themselves, for more details. ironicclient Modules ==================== * :ref:`modindex` .. _ironicclient.v1.node: api/ironicclient.v1.node.html#ironicclient.v1.node.Node .. _ironicclient.v1.client.Client: api/ironicclient.v1.client.html#ironicclient.v1.client.Client .. _Client: api/ironicclient.v1.client.html#ironicclient.v1.client.Client .. _ironicclient.client.get_client(): api/ironicclient.client.html#ironicclient.client.get_client .. _ironicclient.exc.BaseException: api/ironicclient.exc.html#ironicclient.exc.BaseException .. _ironicclient.exc.ClientException: api/ironicclient.exc.html#ironicclient.exc.ClientException python-ironicclient-4.1.0/doc/source/reference/0000775000175000017500000000000013643706510021547 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/doc/source/reference/index.rst0000664000175000017500000000024413643706361023414 0ustar zuulzuul00000000000000======================================= Full Ironic Client Python API Reference ======================================= .. toctree:: :maxdepth: 1 api/modules python-ironicclient-4.1.0/doc/source/contributor/0000775000175000017500000000000013643706510022163 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/doc/source/contributor/contributing.rst0000664000175000017500000000276713643706361025444 0ustar zuulzuul00000000000000.. _contributing: =================================== Contributing to python-ironicclient =================================== If you're interested in contributing to the python-ironicclient project, the following will help get you started. #openstack-ironic on Freenode IRC Network ----------------------------------------- There is a very active chat channel at irc://freenode.net/#openstack-ironic. This is usually the best place to ask questions and find your way around. IRC stands for Internet Relay Chat and it is a way to chat online in real time. You can ask a question and come back later to read the answer in the log files. Logs for the #openstack-ironic IRC channel are stored at http://eavesdrop.openstack.org/irclogs/%23openstack-ironic/. Contributor License Agreement ----------------------------- .. index:: single: license; agreement In order to contribute to the python-ironicclient project, you need to have signed OpenStack's contributor's agreement. .. seealso:: * https://docs.openstack.org/infra/manual/developers.html * https://wiki.openstack.org/wiki/CLA Project Hosting Details ----------------------- Bug tracker https://storyboard.openstack.org/#!/project/959 Mailing list (prefix subjects with ``[ironic]`` for faster responses) http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-discuss Code Hosting https://opendev.org/openstack/python-ironicclient Code Review https://review.opendev.org/#/q/status:open+project:openstack/python-ironicclient,n,z python-ironicclient-4.1.0/doc/source/contributor/index.rst0000664000175000017500000000026413643706361024032 0ustar zuulzuul00000000000000============================================= python-ironicclient Contributor Documentation ============================================= .. toctree:: contributing testing python-ironicclient-4.1.0/doc/source/contributor/testing.rst0000664000175000017500000000365713643706361024411 0ustar zuulzuul00000000000000.. _testing: ======= Testing ======= Python Guideline Enforcement ............................ All code has to pass the pep8 style guideline to merge into OpenStack, to validate the code against these guidelines you can run:: $ tox -e pep8 Unit Testing ............ It is strongly encouraged to run the unit tests locally under one or more test environments prior to submitting a patch. To run all the recommended environments sequentially and pep8 style guideline run:: $ tox You can also selectively pick specific test environments by listing your chosen environments after a -e flag:: $ tox -e py35,py27,pep8,pypy .. note:: Tox sets up virtual environment and installs all necessary dependencies. Sharing the environment with devstack testing is not recommended due to conflicting configuration with system dependencies. Functional Testing .................. Functional testing assumes the existence of the script run_functional.sh in the python-ironicclient/tools directory. The script run_functional.sh generates test.conf file. To run functional tests just run ./run_functional.sh. Also, the test.conf file could be created manually or generated from environment variables. It assumes the existence of an openstack cloud installation along with admin credentials. The test.conf file lives in ironicclient/tests/functional/ directory. To run functional tests in that way create test.conf manually and run:: $ tox -e functional An example test.conf file:: [functional] api_version = 1 os_auth_url=http://192.168.0.2:5000/v2.0/ os_username=admin os_password=admin os_project_name=admin If you are testing ironic in standalone mode, only the parameters 'auth_strategy', 'os_auth_token' and 'ironic_url' are required; all others will be ignored. An example test.conf file for standalone host:: [functional] auth_strategy = noauth os_auth_token = fake ironic_url = http://10.0.0.2:6385 python-ironicclient-4.1.0/doc/source/cli/0000775000175000017500000000000013643706510020360 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/doc/source/cli/osc/0000775000175000017500000000000013643706510021144 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/doc/source/cli/osc/v1/0000775000175000017500000000000013643706510021472 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/doc/source/cli/osc/v1/index.rst0000664000175000017500000000211013643706361023331 0ustar zuulzuul00000000000000Command Reference ================= List of released CLI commands available in openstack client. These commands can be referenced by doing ``openstack help baremetal``. ==================== baremetal allocation ==================== .. autoprogram-cliff:: openstack.baremetal.v1 :command: baremetal allocation * ================= baremetal chassis ================= .. autoprogram-cliff:: openstack.baremetal.v1 :command: baremetal chassis * ================ baremetal create ================ .. autoprogram-cliff:: openstack.baremetal.v1 :command: baremetal create ================ baremetal driver ================ .. autoprogram-cliff:: openstack.baremetal.v1 :command: baremetal driver * ============== baremetal node ============== .. autoprogram-cliff:: openstack.baremetal.v1 :command: baremetal node * ============== baremetal port ============== .. autoprogram-cliff:: openstack.baremetal.v1 :command: baremetal port * ================ baremetal volume ================ .. autoprogram-cliff:: openstack.baremetal.v1 :command: baremetal volume * python-ironicclient-4.1.0/doc/source/cli/osc_plugin_cli.rst0000664000175000017500000000505213643706361024111 0ustar zuulzuul00000000000000==================================================== ``openstack baremetal`` Command-Line Interface (CLI) ==================================================== .. program:: openstack baremetal .. highlight:: bash Synopsis ======== :program:`openstack [options] baremetal` [command-options] :program:`openstack help baremetal` Description =========== The OpenStack Client plugin interacts with the Bare Metal service through the ``openstack baremetal`` command line interface (CLI). To use the ``openstack`` CLI, the OpenStackClient (python-openstackclient) package must be installed. There are two ways to do this: * along with this python-ironicclient package:: $ pip install python-ironicclient[cli] * directly:: $ pip install python-openstackclient This CLI is provided by python-openstackclient and osc-lib projects: * https://opendev.org/openstack/python-openstackclient * https://opendev.org/openstack/osc-lib .. _osc-auth: Authentication -------------- To use the CLI, you must provide your OpenStack username, password, project, and auth endpoint. You can use configuration options ``--os-username``, ``--os-password``, ``--os-project-id`` (or ``--os-project-name``), and ``--os-auth-url``, or set the corresponding environment variables:: $ export OS_USERNAME=user $ export OS_PASSWORD=password $ export OS_PROJECT_NAME=project # or OS_PROJECT_ID $ export OS_PROJECT_DOMAIN_ID=default $ export OS_USER_DOMAIN_ID=default $ export OS_IDENTITY_API_VERSION=3 $ export OS_AUTH_URL=http://auth.example.com:5000/identity Getting help ============ To get a list of available (sub)commands and options, run:: $ openstack help baremetal To get usage and options of a command, run:: $ openstack help baremetal Examples ======== Get information about the openstack baremetal node create command:: $ openstack help baremetal node create Get a list of available drivers:: $ openstack baremetal driver list Enroll a node with the ``ipmi`` driver:: $ openstack baremetal node create --driver ipmi --driver-info ipmi_address=1.2.3.4 Get a list of nodes:: $ openstack baremetal node list The baremetal API version can be specified via: * environment variable OS_BAREMETAL_API_VERSION:: $ export OS_BAREMETAL_API_VERSION=1.25 * or optional command line argument --os-baremetal-api-version:: $ openstack baremetal port group list --os-baremetal-api-version 1.25 Command Reference ================= .. toctree:: :glob: :maxdepth: 3 osc/v1/* python-ironicclient-4.1.0/doc/source/cli/index.rst0000664000175000017500000000024413643706361022225 0ustar zuulzuul00000000000000====================================== python-ironicclient User Documentation ====================================== .. toctree:: standalone osc_plugin_cli python-ironicclient-4.1.0/doc/source/cli/standalone.rst0000664000175000017500000000555313643706361023256 0ustar zuulzuul00000000000000===================================================== ``baremetal`` Standalone Command-Line Interface (CLI) ===================================================== .. program:: baremetal .. highlight:: bash Synopsis ======== :program:`baremetal [options]` [command-options] :program:`baremetal help` Description =========== The standalone ``baremetal`` tool allows interacting with the Bare Metal service without installing the OpenStack Client tool as in :doc:`osc_plugin_cli`. The standalone tool is mostly identical to its OSC counterpart, with two exceptions: #. No need to prefix commands with ``openstack``. #. No authentication is assumed by default. Check the :doc:`OSC CLI reference ` for a list of available commands. Inspector support ----------------- The standalone ``baremetal`` tool optionally supports the low-level bare metal introspection API provided by ironic-inspector_. If ironic-inspector-client_ is installed, its commands_ are automatically available (also without the ``openstack`` prefix). .. _ironic-inspector: https://docs.openstack.org/ironic-inspector/ .. _ironic-inspector-client: https://docs.openstack.org/python-ironic-inspector-client/ .. _commands: https://docs.openstack.org/python-ironic-inspector-client/latest/cli/index.html Standalone usage ---------------- To use the CLI with a standalone bare metal service, you need to provide an endpoint to connect to. It can be done in three ways: #. Provide an explicit ``--os-endpoint`` argument, e.g.: .. code-block:: bash $ baremetal --os-endpoint https://ironic.host:6385 node list #. Set the corresponding environment variable, e.g.: .. code-block:: bash $ export OS_ENDPOINT=https://ironic.host:6385 $ baremetal node list #. Populate a clouds.yaml_ file, setting ``baremetal_endpoint_override``, e.g.: .. code-block:: bash $ cat ~/.config/openstack/clouds.yaml clouds: ironic: auth_type: none baremetal_endpoint_override: http://127.0.0.1:6385 $ export OS_CLOUD=ironic $ baremetal node list `Inspector support`_ works similarly, but the ``clouds.yaml`` option is called ``baremetal_introspection_endpoint_override``. The two endpoints can be configured simultaneously, e.g.: .. code-block:: bash $ cat ~/.config/openstack/clouds.yaml clouds: ironic: auth_type: none baremetal_endpoint_override: http://127.0.0.1:6385 baremetal_introspection_endpoint_override: http://127.0.0.1:5050 $ export OS_CLOUD=ironic $ baremetal node list $ baremetal introspection list .. _clouds.yaml: https://docs.openstack.org/openstacksdk/latest/user/guides/connect_from_config.html Usage with OpenStack -------------------- The standalone CLI can also be used with the Bare Metal service installed as part of OpenStack. See :ref:`osc-auth` for information on the required input. python-ironicclient-4.1.0/doc/source/index.rst0000664000175000017500000000122113643706361021452 0ustar zuulzuul00000000000000=========================================== Python Bindings to the OpenStack Ironic API =========================================== This is a client for the OpenStack `Ironic`_ API. It provides: * a Python API: the ``ironicclient`` module, and * command-line interface: ``openstack baremetal`` Contents ======== .. toctree:: :maxdepth: 2 api_v1 cli/index user/create_command contributor/index reference/index Release Notes Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` .. _Ironic: https://wiki.openstack.org/wiki/Ironic python-ironicclient-4.1.0/doc/source/user/0000775000175000017500000000000013643706510020567 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/doc/source/user/create_command.rst0000664000175000017500000001274513643706361024277 0ustar zuulzuul00000000000000=================================================== Creating the Bare Metal service resources from file =================================================== It is possible to create a set of resources using their descriptions in JSON or YAML format. It can be done in one of two ways: 1. Using OpenStackClient bare metal plugin CLI's command ``openstack baremetal create``:: $ openstack -h baremetal create usage: openstack baremetal create [-h] [ ...] Create resources from files positional arguments: File (.yaml or .json) containing descriptions of the resources to create. Can be specified multiple times. 2. Programmatically using the Python API: .. autofunction:: ironicclient.v1.create_resources.create_resources :noindex: File containing Resource Descriptions ===================================== The resources to be created can be described either in JSON or YAML. A file ending with ``.json`` is assumed to contain valid JSON, and a file ending with ``.yaml`` is assumed to contain valid YAML. Specifying a file with any other extension leads to an error. The resources that can be created are chassis, nodes, port groups and ports. A chassis can contain nodes (and resources of nodes) definitions nested under ``"nodes"`` key. A node can contain port groups definitions nested under ``"portgroups"``, and ports definitions under ``"ports"`` keys. Ports can be also nested under port groups in ``"ports"`` key. The schema used to validate the supplied data is the following:: { "$schema": "http://json-schema.org/draft-04/schema#", "description": "Schema for ironic resources file", "type": "object", "properties": { "chassis": { "type": "array", "items": { "type": "object" } }, "nodes": { "type": "array", "items": { "type": "object" } } }, "additionalProperties": False } More detailed description of the creation process can be seen in the following sections. Examples ======== Here is an example of the JSON file that can be passed to the ``create`` command:: { "chassis": [ { "description": "chassis 3 in row 23", "nodes": [ { "name": "node-3", "driver": "agent_ipmitool", "portgroups": [ { "name": "switch.cz7882.ports.1-2", "ports": [ { "address": "ff:00:00:00:00:00" }, { "address": "ff:00:00:00:00:01" } ] } ], "ports": [ { "address": "00:00:00:00:00:02" }, { "address": "00:00:00:00:00:03" } ] }, { "name": "node-4", "driver": "agent_ipmitool", "ports": [ { "address": "00:00:00:00:00:04" }, { "address": "00:00:00:00:00:01" } ] } ] } ], "nodes": [ { "name": "node-5", "driver": "pxe_ipmitool", "chassis_uuid": "74d93e6e-7384-4994-a614-fd7b399b0785", "ports": [ { "address": "00:00:00:00:00:00" } ] }, { "name": "node-6", "driver": "pxe_ipmitool" } ] } Creation Process ================ #. The client deserializes the files' contents and validates that the top-level dictionary in each of them contains only "chassis" and/or "nodes" keys, and their values are lists. The creation process is aborted if any failure is encountered in this stage. The rest of the validation is done by the ironic-api service. #. Each resource is created via issuing a POST request (with the resource's dictionary representation in the body) to the ironic-api service. In the case of nested resources (``"nodes"`` key inside chassis, ``"portgroups"`` key inside nodes, ``"ports"`` key inside nodes or portgroups), the top-level resource is created first, followed by the sub-resources. For example, if a chassis contains a list of nodes, the chassis will be created first followed by the creation of each node. The same is true for ports and port groups described within nodes. #. If a resource could not be created, it does not stop the entire process. Any sub-resources of the failed resource will not be created, but otherwise, the rest of the resources will be created if possible. Any failed resources will be mentioned in the response. python-ironicclient-4.1.0/doc/requirements.txt0000664000175000017500000000053213643706361021601 0ustar zuulzuul00000000000000# 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. openstackdocstheme>=1.20.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0 sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD sphinxcontrib-apidoc>=0.2.0 # BSD python-ironicclient-4.1.0/PKG-INFO0000664000175000017500000001011313643706510016635 0ustar zuulzuul00000000000000Metadata-Version: 2.1 Name: python-ironicclient Version: 4.1.0 Summary: OpenStack Bare Metal Provisioning API Client Library Home-page: https://docs.openstack.org/python-ironicclient/latest/ Author: OpenStack Author-email: openstack-discuss@lists.openstack.org License: UNKNOWN Description: ================================== Python bindings for the Ironic API ================================== Team and repository tags ------------------------ .. image:: https://governance.openstack.org/tc/badges/python-ironicclient.svg :target: https://governance.openstack.org/tc/reference/tags/index.html Overview -------- This is a client for the OpenStack `Bare Metal API `_. It provides: * a Python API: the ``ironicclient`` module, and * a command-line interfaces: ``openstack baremetal`` Development takes place via the usual OpenStack processes as outlined in the `developer guide `_. The master repository is on `opendev.org `_. ``python-ironicclient`` is licensed under the Apache License, Version 2.0, like the rest of OpenStack. .. contents:: Contents: :local: Project resources ----------------- * Documentation: https://docs.openstack.org/python-ironicclient/latest/ * Source: https://opendev.org/openstack/python-ironicclient * Bugs: https://storyboard.openstack.org/#!/project/959 * Release notes: https://docs.openstack.org/releasenotes/python-ironicclient/ Python API ---------- Quick-start Example:: >>> from ironicclient import client >>> >>> kwargs = {'os_auth_token': '3bcc3d3a03f44e3d8377f9247b0ad155', >>> 'ironic_url': 'http://ironic.example.org:6385/'} >>> ironic = client.get_client(1, **kwargs) ``openstack baremetal`` CLI --------------------------- The ``openstack baremetal`` command line interface is available when the bare metal plugin (included in this package) is used with the `OpenStackClient `_. There are two ways to install the OpenStackClient (python-openstackclient) package: * along with this python-ironicclient package:: # pip install python-ironicclient[cli] * directly:: # pip install python-openstackclient An example of creating a basic node with the ``ipmi`` driver:: $ openstack baremetal node create --driver ipmi An example of creating a port on a node:: $ openstack baremetal port create --node AA:BB:CC:DD:EE:FF An example of updating driver properties for a node:: $ openstack baremetal node set --driver-info ipmi_address= For more information about the ``openstack baremetal`` command and the subcommands available, run:: $ openstack help baremetal Platform: UNKNOWN Classifier: Environment :: OpenStack Classifier: Intended Audience :: Information Technology Classifier: Intended Audience :: System Administrators Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Requires-Python: >=3.6 Provides-Extra: cli Provides-Extra: test python-ironicclient-4.1.0/releasenotes/0000775000175000017500000000000013643706510020235 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/releasenotes/source/0000775000175000017500000000000013643706510021535 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/releasenotes/source/unreleased.rst0000664000175000017500000000016013643706361024417 0ustar zuulzuul00000000000000============================== Current Series Release Notes ============================== .. release-notes:: python-ironicclient-4.1.0/releasenotes/source/newton.rst0000664000175000017500000000023213643706361023602 0ustar zuulzuul00000000000000=================================== Newton Series Release Notes =================================== .. release-notes:: :branch: origin/stable/newton python-ironicclient-4.1.0/releasenotes/source/ocata.rst0000664000175000017500000000023013643706361023355 0ustar zuulzuul00000000000000=================================== Ocata Series Release Notes =================================== .. release-notes:: :branch: origin/stable/ocata python-ironicclient-4.1.0/releasenotes/source/conf.py0000664000175000017500000002163213643706361023044 0ustar zuulzuul00000000000000# -*- 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. # # Ironic Client Release Notes documentation build configuration file, created # by sphinx-quickstart on Wed Dec 23 22:54:56 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', ] # openstackdocstheme options repository_name = 'openstack/python-ironicclient' bug_project = 'python-ironicclient' bug_tag = '' # 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 = u'Ironic Client Release Notes' copyright = u'2015, Ironic Developers' # Release notes are version independent. # The short X.Y version. version = '' # The full version, including alpha/beta/rc tags. release = '' # 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 = 'sphinx' # 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 = '%Y-%m-%d %H:%M' # 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 = 'IronicClientReleaseNotesdoc' # -- 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', 'IronicClientReleaseNotes.tex', u'Ironic Client Release Notes Documentation', u'Ironic 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', 'ironicclientreleasenotes', u'Ironic Client Release Notes Documentation', [u'Ironic 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', 'IronicClientReleaseNotes', u'Ironic Client Release Notes Documentation', u'Ironic Developers', 'IronicClientReleaseNotes', 'Bare metal provisioning service client.', '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/'] python-ironicclient-4.1.0/releasenotes/source/_static/0000775000175000017500000000000013643706510023163 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/releasenotes/source/_static/.placeholder0000664000175000017500000000000013643706361025440 0ustar zuulzuul00000000000000python-ironicclient-4.1.0/releasenotes/source/rocky.rst0000664000175000017500000000022113643706361023415 0ustar zuulzuul00000000000000=================================== Rocky Series Release Notes =================================== .. release-notes:: :branch: stable/rocky python-ironicclient-4.1.0/releasenotes/source/mitaka.rst0000664000175000017500000000023213643706361023536 0ustar zuulzuul00000000000000=================================== Mitaka Series Release Notes =================================== .. release-notes:: :branch: origin/stable/mitaka python-ironicclient-4.1.0/releasenotes/source/train.rst0000664000175000017500000000026113643706361023407 0ustar zuulzuul00000000000000=========================================== Train Series (2.8.0 - 3.1.x) Release Notes =========================================== .. release-notes:: :branch: stable/train python-ironicclient-4.1.0/releasenotes/source/_templates/0000775000175000017500000000000013643706510023672 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/releasenotes/source/_templates/.placeholder0000664000175000017500000000000013643706361026147 0ustar zuulzuul00000000000000python-ironicclient-4.1.0/releasenotes/source/stein.rst0000664000175000017500000000022113643706361023410 0ustar zuulzuul00000000000000=================================== Stein Series Release Notes =================================== .. release-notes:: :branch: stable/stein python-ironicclient-4.1.0/releasenotes/source/pike.rst0000664000175000017500000000021713643706361023223 0ustar zuulzuul00000000000000=================================== Pike Series Release Notes =================================== .. release-notes:: :branch: stable/pike python-ironicclient-4.1.0/releasenotes/source/queens.rst0000664000175000017500000000022313643706361023570 0ustar zuulzuul00000000000000=================================== Queens Series Release Notes =================================== .. release-notes:: :branch: stable/queens python-ironicclient-4.1.0/releasenotes/source/index.rst0000664000175000017500000000032013643706361023375 0ustar zuulzuul00000000000000============================= Ironic Client Release Notes ============================= .. toctree:: :maxdepth: 1 unreleased train stein rocky queens pike ocata newton mitaka python-ironicclient-4.1.0/releasenotes/notes/0000775000175000017500000000000013643706510021365 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/releasenotes/notes/allow-allocation-update-b4fb715045ab40a2.yaml0000664000175000017500000000032713643706361031173 0ustar zuulzuul00000000000000--- features: - | Adds support for the allocation update API introduced in API version 1.57. Adds new commands: * ``openstack baremetal allocation set`` * ``openstack baremetal allocation unset`` python-ironicclient-4.1.0/releasenotes/notes/osc-commands-1-7-d531960472a11ac2.yaml0000664000175000017500000000222213643706361027177 0ustar zuulzuul00000000000000--- features: - | Adds new OpenStackClient commands: * ``openstack baremetal chassis create`` * ``openstack baremetal chassis delete`` * ``openstack baremetal chassis list`` * ``openstack baremetal chassis set`` * ``openstack baremetal chassis show`` * ``openstack baremetal chassis unset`` * ``openstack baremetal driver list`` * ``openstack baremetal driver passthru call`` * ``openstack baremetal driver passthru list`` * ``openstack baremetal driver show`` * ``openstack baremetal node adopt`` * ``openstack baremetal node boot device set`` * ``openstack baremetal node boot device show`` * ``openstack baremetal node console disable`` * ``openstack baremetal node console enable`` * ``openstack baremetal node console show`` * ``openstack baremetal node passthru call`` * ``openstack baremetal node passthru list`` * ``openstack baremetal node validate`` * ``openstack baremetal port delete`` * ``openstack baremetal port list`` * ``openstack baremetal port set`` * ``openstack baremetal port unset`` Please see the help for each command for more information. python-ironicclient-4.1.0/releasenotes/notes/.placeholder0000664000175000017500000000000013643706361023642 0ustar zuulzuul00000000000000././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/add-rescue-interface-to-node-and-driver-e3ff9b5df2628e5a.yamlpython-ironicclient-4.1.0/releasenotes/notes/add-rescue-interface-to-node-and-driver-e3ff9b5df2628e50000664000175000017500000000061413643706361033112 0ustar zuulzuul00000000000000--- features: - | Adds support for rescue_interface for the commands below. They are available starting with ironic API microversion 1.38. * ``openstack baremetal node create`` * ``openstack baremetal node show`` * ``openstack baremetal node set`` * ``openstack baremetal node unset`` * ``openstack baremetal driver list`` * ``openstack baremetal driver show`` python-ironicclient-4.1.0/releasenotes/notes/deprecate-http-client-8d664e5ec50ec403.yaml0000664000175000017500000000522113643706361030661 0ustar zuulzuul00000000000000--- features: - | The client now supports ``none`` authorization method, which should be used if the Identity service is not present in the deployment that the client talks to. To use it: - openstack baremetal CLI -- supported starting with ``osc-lib`` version ``1.10.0``, by providing ``--os-auth-type none`` and ``--os-endpoint`` argument to ``openstack`` command - ironic CLI -- just specify the ``--ironic-url`` or ``--os-endpoint`` argument in the ``ironic`` command (or set the corresponding environment variable) - python API -- specify the ``endpoint_override`` argument to the ``client.get_client()`` method (in addition to the required ``api_version``) deprecations: - | ``common.http.HTTPClient`` class is deprecated and will be removed in the Stein release. If you initialize the ironic client via ``v1.client.Client`` class directly, please pass the `keystoneauth `_ session to the Client constructor, so that ``common.http.SessionClient`` is used instead. - | As part of standardizing argument naming to the one used by `keystoneauth `_, the following arguments to ``client.get_client`` method are deprecated and will be removed in Stein release: * ``os_auth_token``: use ``token`` instead * ``os_username``: use ``username`` instead * ``os_password``: use ``password`` instead * ``os_auth_url``: use ``auth_url`` instead * ``os_project_id``: use ``project_id`` instead * ``os_project_name``: use ``project_name`` instead * ``os_tenant_id``: use ``tenant_id`` instead * ``os_tenant_name``: use ``tenant_name`` instead * ``os_region_name``: use ``region_name`` instead * ``os_user_domain_id``: use ``user_domain_id`` instead * ``os_user_domain_name``: use ``user_domain_name`` instead * ``os_project_domain_id``: use ``project_domain_id`` instead * ``os_project_domain_name``: use ``project_domain_name`` instead * ``os_service_type``: use ``service_type`` instead * ``os_endpoint_type``: use ``interface`` instead * ``ironic_url``: use ``endpoint`` instead * ``os_cacert``, ``ca_file``: use ``cafile`` instead * ``os_cert``, ``cert_file``: use ``certfile`` instead * ``os_key``, ``key_file``: use ``keyfile`` instead - | The ``endpoint`` argument to the ``v1.client.Client`` constructor is deprecated and will be removed in Stein release. Instead, please use the standard `keystoneauth `_ argument name ``endpoint_override``. python-ironicclient-4.1.0/releasenotes/notes/list-nodes-by-driver-b1e1e1018077089b.yaml0000664000175000017500000000013113643706361030300 0ustar zuulzuul00000000000000--- features: - Add support for filtering nodes using the same driver in list command. python-ironicclient-4.1.0/releasenotes/notes/strip-prefix-when-paginating-6140465b1488828e.yaml0000664000175000017500000000022313643706361031711 0ustar zuulzuul00000000000000--- fixes: - | Fixes an issue where automatic pagination was broken when ironic is deployed at a subpath (e.g. http://localhost/ironic). python-ironicclient-4.1.0/releasenotes/notes/add-node-lessee-c36409eb0415f75d.yaml0000664000175000017500000000017713643706361027350 0ustar zuulzuul00000000000000--- features: - | Adds support to display and update the ``lessee`` field of nodes, which is introduced in API 1.64. python-ironicclient-4.1.0/releasenotes/notes/add-volume-target-cli-e062303f4b3b40f0.yaml0000664000175000017500000000123513643706361030457 0ustar zuulzuul00000000000000--- features: - | Adds these ``openstack baremetal`` and ``ironic`` CLI commands for volume target resources. * ``openstack baremetal volume target create`` * ``openstack baremetal volume target list`` * ``openstack baremetal volume target show`` * ``openstack baremetal volume target set`` * ``openstack baremetal volume target unset`` * ``openstack baremetal volume target delete`` * ``ironic volume-target-create`` * ``ironic volume-target-list`` * ``ironic volume-target-show`` * ``ironic volume-target-update`` * ``ironic volume-target-delete`` They are available starting with ironic API microversion 1.32. python-ironicclient-4.1.0/releasenotes/notes/ironic-create-files-fix-c31e40e566ff86b8.yaml0000664000175000017500000000015313643706361031113 0ustar zuulzuul00000000000000--- fixes: - Fixes 'ironic create ' command so that it handles the file argument(s) correctly. python-ironicclient-4.1.0/releasenotes/notes/implicit-version-warning-old-cli-fe34d423ae63544a.yaml0000664000175000017500000000045713643706361032755 0ustar zuulzuul00000000000000--- deprecations: - | Currently, the default API version for the ``ironic`` tool is fixed to be 1.9. In the Queens release, it will be changed to the latest version understood by both the client and the server. In this release a warning is logged, if no explicit version is provided. python-ironicclient-4.1.0/releasenotes/notes/osc-node-power-on-off-c269980e3b9c79ca.yaml0000664000175000017500000000064213643706361030536 0ustar zuulzuul00000000000000--- fixes: - | Replaces ``openstack baremetal node power `` with the two commands: * ``openstack baremetal node power on`` and * ``openstack baremetal node power off``. There is no change to the command the user enters (the actual command line is the same). However, help (e.g. via ``openstack -h baremetal``) will list the two power commands (instead of the original one). python-ironicclient-4.1.0/releasenotes/notes/add-no-retired-opt-403bb5e466e4facb.yaml0000664000175000017500000000030113643706361030214 0ustar zuulzuul00000000000000--- features: - | Adds ability to get list of nodes that are not marked for retirement adding the --no-retired optional argument to the ``openstack baremetal node list`` command. python-ironicclient-4.1.0/releasenotes/notes/add-json-option-0cf29be2a97e0212.yaml0000664000175000017500000000020513643706361027464 0ustar zuulzuul00000000000000--- features: - Add a --json option to the client to display the JSON response body from the Ironic API without formatting it. python-ironicclient-4.1.0/releasenotes/notes/add-node-owner-c2dce5a6075ce2b7.yaml0000664000175000017500000000017613643706361027435 0ustar zuulzuul00000000000000--- features: - | Adds support to display and update the ``owner`` field of nodes, which is introduced in API 1.50. python-ironicclient-4.1.0/releasenotes/notes/osc-plugin-f87e0fbb472261dd.yaml0000664000175000017500000000101513643706361026631 0ustar zuulzuul00000000000000--- features: - | Extend the OpenStackClient plugin with new commands: * openstack baremetal port group create * openstack baremetal port group show * openstack baremetal port group list * openstack baremetal port group delete * openstack baremetal port group set * openstack baremetal port group unset Extends the 'openstack baremetal port' commands (where applicable) to allow specifying the port group (if any) that a port is a member of, via the new --port-group argument. python-ironicclient-4.1.0/releasenotes/notes/add-neutron-integration-fields-cee7596c49722de6.yaml0000664000175000017500000000066013643706361032523 0ustar zuulzuul00000000000000--- features: - | Add support of new fields: * ``node.network_interface`` is introduced in API 1.20, specifies the network interface to use for a node. * ``port.local_link_connection`` contains the port binding profile. * ``port.pxe_enabled`` indicates whether PXE is enabled for the port. The ``port.local_link_connection`` and ``port.pxe_enabled`` fields were introduced in API 1.19. python-ironicclient-4.1.0/releasenotes/notes/fix-negotiate-version-503-c3cb8d1d4901541a.yaml0000664000175000017500000000054613643706361031217 0ustar zuulzuul00000000000000--- fixes: - | Fixes an issue where some failure modes of communication with the Ironic API could result in an exception that circumvents the client's retry mechanisms. In particular this includes HTTP 503 service unavailable which is seen when Ironic operates behind a load balancer, and no backend is available to handle the request. python-ironicclient-4.1.0/releasenotes/notes/not-ignore-delete-failtures-0783d33a606ed6f1.yaml0000664000175000017500000000040313643706361031723 0ustar zuulzuul00000000000000--- fixes: - Fixes an issue where deleting nodes ignore failures and just prints the results which nodes are deleted and which are failed, always returning exit code of 0. This now will return a non-zero exit code if at least one node-delete fails. python-ironicclient-4.1.0/releasenotes/notes/continue-del-next-node-8827e67e1c41a0a5.yaml0000664000175000017500000000012613643706361030676 0ustar zuulzuul00000000000000--- fixes: - when deleting multiple nodes, continue with deletes even if one fails. python-ironicclient-4.1.0/releasenotes/notes/bug-1724974-add-wanboot-to-supported-boot-devices.yaml0000664000175000017500000000013013643706361033104 0ustar zuulzuul00000000000000--- features: - Adds missing ``wanboot`` value to the list of supported boot devices. python-ironicclient-4.1.0/releasenotes/notes/add-volume-target-api-e062303f4b3b40ef.yaml0000664000175000017500000000107313643706361030546 0ustar zuulzuul00000000000000--- features: - | Adds these python API client methods to support volume target resources (available starting with API version 1.32): * ``client.volume_target.create`` for creating a volume target * ``client.volume_target.list`` for listing volume targets * ``client.volume_target.get`` for getting a volume target * ``client.volume_target.update`` for updating a volume target * ``client.volume_target.delete`` for deleting a volume target * ``client.node.list_volume_targets`` for getting volume targets associated with a node python-ironicclient-4.1.0/releasenotes/notes/add-portgroups-support-c3cf3826093ee815.yaml0000664000175000017500000000055113643706361031105 0ustar zuulzuul00000000000000--- features: - | Extends the Ironic CLI with new commands: * ironic portgroup-create * ironic portgroup-show * ironic portgroup-list * ironic portgroup-delete * ironic portgroup-update * ironic portgroup-port-list Also extends ironic port-create with --portgroup. Portgroup support was added in Ironic API version 1.24. ././@LongLink0000000000000000000000000000015500000000000011216 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/retry-on-keystone-auth-retriable-failures-91c08b9f8bdab7f3.yamlpython-ironicclient-4.1.0/releasenotes/notes/retry-on-keystone-auth-retriable-failures-91c08b9f8bdab0000664000175000017500000000046513643706361033521 0ustar zuulzuul00000000000000--- fixes: - The client will now retry on keystoneauth retriable connection failures if retries are enabled for a particular request. This ensures that on a temporary network outage to the keystone auth services a request we be retried the requested number of times before raising an exception. python-ironicclient-4.1.0/releasenotes/notes/provision-state-adopt-d07b838813cecfb1.yaml0000664000175000017500000000042613643706361031027 0ustar zuulzuul00000000000000--- features: - Support has been added for the node-set-provision-state verb ``adopt`` which requires API version 1.17. This feature allows an operator move a node from ``MANAGABLE`` state to ``ACTIVE`` state without performing cleaning or a deployment operation. python-ironicclient-4.1.0/releasenotes/notes/add-volume-connector-cli-873090474d5e41b9.yaml0000664000175000017500000000130613643706361031054 0ustar zuulzuul00000000000000--- features: - | Adds these ``openstack baremetal`` and ``ironic`` CLI commands for volume connector resources. * ``openstack baremetal volume connector create`` * ``openstack baremetal volume connector list`` * ``openstack baremetal volume connector show`` * ``openstack baremetal volume connector set`` * ``openstack baremetal volume connector unset`` * ``openstack baremetal volume connector delete`` * ``ironic volume-connector-create`` * ``ironic volume-connector-list`` * ``ironic volume-connector-show`` * ``ironic volume-connector-update`` * ``ironic volume-connector-delete`` They are available starting with ironic API microversion 1.32. python-ironicclient-4.1.0/releasenotes/notes/osc-node-list-chassis-091d080684cdccf8.yaml0000664000175000017500000000031313643706361030605 0ustar zuulzuul00000000000000--- features: - | Adds an option ``--chassis `` to the ``openstack baremetal node list`` command. It provides the ability to get a list of the nodes of the specified chassis. ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/bug-1524745-update-baremetal-node-set-c1ac57de0d481efe.yamlpython-ironicclient-4.1.0/releasenotes/notes/bug-1524745-update-baremetal-node-set-c1ac57de0d481efe.0000664000175000017500000000036713643706361032367 0ustar zuulzuul00000000000000--- features: - Adds new arguments to the OSC baremetal-node-set to allow setting boot, console, deploy, inspect, management, power, raid, and vendor hardware interfaces. They are available starting with ironic API microversion 1.30.python-ironicclient-4.1.0/releasenotes/notes/osc-node-set-chassis-aae3413489b66b9b.yaml0000664000175000017500000000021213643706361030422 0ustar zuulzuul00000000000000--- features: - The chassis of a node can be set via the new --chassis-uuid optional argument for ``openstack baremetal node set``. python-ironicclient-4.1.0/releasenotes/notes/deprecate-ironic-cli-686b7a238ddf3e25.yaml0000664000175000017500000000034713643706361030470 0ustar zuulzuul00000000000000--- deprecations: - | The ``ironic`` command line interface (``ironic`` commands) is deprecated and will be removed in the OpenStack S* release. Please use the ``openstack baremetal`` command line interface instead. python-ironicclient-4.1.0/releasenotes/notes/latest-renegotiation-55daa01b3fc261be.yaml0000664000175000017500000000063513643706361030756 0ustar zuulzuul00000000000000--- fixes: - | When using ``--os-baremetal-api-version=latest`` (for ``openstack baremetal`` CLI) or ``--ironic-api-version=latest`` (for ``ironic`` CLI), the resulting API version is now the maximum API version supported by both the client and the server. Previously, the maximum API version supported by the client was used, which prevented ``latest`` from working with older servers. python-ironicclient-4.1.0/releasenotes/notes/instance-crash-dump-d845a31e72b5a9f7.yaml0000664000175000017500000000017313643706361030346 0ustar zuulzuul00000000000000--- features: - Add a new command "ironic node-inject-nmi" to support the injection of Non-Masking Interrupts (NMI). python-ironicclient-4.1.0/releasenotes/notes/add-allocation-owner-0c6daad4ebfea5e6.yaml0000664000175000017500000000020313643706361031042 0ustar zuulzuul00000000000000--- features: - | Adds support to create an allocation with an ``owner``, as well as display it. Introduced in API 1.60. python-ironicclient-4.1.0/releasenotes/notes/keystone-token-auth-661a0c0d53c1b4de.yaml0000664000175000017500000000025713643706361030454 0ustar zuulzuul00000000000000--- features: - Added a possibility to pass os_auth_token instead of os_username and os_password to authenticate in keystone both in CLI and in get_client function. ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/add-chassis_uuid-removal-possibility-5bc0bc3a7953eaa5.yamlpython-ironicclient-4.1.0/releasenotes/notes/add-chassis_uuid-removal-possibility-5bc0bc3a7953eaa5.y0000664000175000017500000000023313643706361033351 0ustar zuulzuul00000000000000--- features: - Add possibility to remove chassis_uuid for node by adding '--chassis-uuid' argument to 'openstack baremetal node unset' command. ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/node-driver-support-storage-interface-e93fc8d4de5d24d6.yamlpython-ironicclient-4.1.0/releasenotes/notes/node-driver-support-storage-interface-e93fc8d4de5d24d6.0000664000175000017500000000103413643706361033311 0ustar zuulzuul00000000000000--- features: - | Adds support for storage_interface for the commands below. They are available starting with ironic API microversion 1.33. * ``openstack baremetal node create`` * ``openstack baremetal node show`` * ``openstack baremetal node set`` * ``openstack baremetal node unset`` * ``openstack baremetal driver list`` * ``openstack baremetal driver show`` * ``ironic node-create`` * ``ironic node-show`` * ``ironic node-update`` * ``ironic driver-list`` * ``ironic driver-show`` python-ironicclient-4.1.0/releasenotes/notes/node-fault-adbe74fd600063ee.yaml0000664000175000017500000000024613643706361026664 0ustar zuulzuul00000000000000--- features: - | Supports the node's ``fault`` field, introduced in the Bare Metal API version 1.42, including displaying or querying nodes by this field. python-ironicclient-4.1.0/releasenotes/notes/add-portgroup-mode-properties-0a3023cf905adaef.yaml0000664000175000017500000000035313643706361032517 0ustar zuulzuul00000000000000--- features: - Mode and properties fields were added to the portgroup object, along with respective arguments for the ironic CLI and the OpenStackClient plugin, they are available starting with ironic API microversion 1.26. python-ironicclient-4.1.0/releasenotes/notes/deploy-templates-df354ce825b00430.yaml0000664000175000017500000000063613643706361027675 0ustar zuulzuul00000000000000--- features: - | Adds Python API and CLI for the deploy templates API introduced in API version 1.55. The following new commands are available: * ``openstack baremetal deploy template create`` * ``openstack baremetal deploy template delete`` * ``openstack baremetal deploy template list`` * ``openstack baremetal deploy template set`` * ``openstack baremetal deploy template show`` python-ironicclient-4.1.0/releasenotes/notes/SHA1-hash-auth-token-f8dce46f854c002c.yaml0000664000175000017500000000012013643706361030240 0ustar zuulzuul00000000000000--- other: - Log the SHA1 hash of X-Auth-Token value prefixed by '{SHA}'. ././@LongLink0000000000000000000000000000017500000000000011220 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/add-environment-variable-to-specify-version-cache-timeout-dfa5f6d4af0ea1d3.yamlpython-ironicclient-4.1.0/releasenotes/notes/add-environment-variable-to-specify-version-cache-timeo0000664000175000017500000000026113643706361034107 0ustar zuulzuul00000000000000--- features: - Add support for specifying the expiry (in seconds) of the caching of the ironic API version, via the environment variable "IRONICCLIENT_CACHE_EXPIRY". ././@LongLink0000000000000000000000000000020300000000000011210 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/bug-1712935-allow-os_baremetal_api_version_env_var_to_be_latest-28c8eed24f389673.yamlpython-ironicclient-4.1.0/releasenotes/notes/bug-1712935-allow-os_baremetal_api_version_env_var_to_b0000664000175000017500000000045213643706361033613 0ustar zuulzuul00000000000000--- fixes: - | ``openstack baremetal`` commands no longer fail when specifying ``latest`` as the API version (via ``--os-baremetal-api-version`` or ``export OS_BAREMETAL_API_VERSION=latest``). For more details, see `bug 1712935 `_. python-ironicclient-4.1.0/releasenotes/notes/extend-vif-attach-commands-ef3a931413ddcee7.yaml0000664000175000017500000000031113643706361031737 0ustar zuulzuul00000000000000--- features: - Adds ability to set custom VIF information fields via the `--vif-info ` option in the `ironic node-vif-attach` and `openstack baremetal node vif attach` commands. python-ironicclient-4.1.0/releasenotes/notes/add-is-smartnic-port-attr-ed46d887aec276ed.yaml0000664000175000017500000000045613643706361031567 0ustar zuulzuul00000000000000--- features: - | Adds support for Smart NIC ports by adding the ``--is-smartnic`` argument to the following CLI commands: * ``openstack baremetal port create`` * ``openstack baremetal port set`` * ``openstack baremetal port unset`` This was introduced in API version 1.53. python-ironicclient-4.1.0/releasenotes/notes/no-resource-attributeerror-d0cb327abab7dcc0.yaml0000664000175000017500000000063713643706361032270 0ustar zuulzuul00000000000000--- fixes: - For node resources that had no boot devices, no supported boot devices, or no passthru methods (and driver resources with no properties or no passthru methods), issuing a request to get that information (for example, 'ironic driver-get-vendor-passthru-methods fake') would result in the error "'NoneType' has no attribute 'to_dict'". This is fixed; an empty list is now returned. python-ironicclient-4.1.0/releasenotes/notes/traits-support-8864f6816abecdb2.yaml0000664000175000017500000000123413643706361027602 0ustar zuulzuul00000000000000--- features: - | Adds support for reading and modifying traits for a node, including adding traits to the detailed output of a node. This is available starting with Bare Metal API version 1.37. The new commands are: * ``openstack baremetal node trait list `` * ``openstack baremetal node add trait [...]`` * ``openstack baremetal node remove trait [ [...]] [--all]`` It also adds the following methods to the Python SDK: * ``NodeManager.get_traits`` * ``NodeManager.add_trait`` * ``NodeManager.set_traits`` * ``NodeManager.remove_trait`` * ``NodeManager.remove_all_traits`` python-ironicclient-4.1.0/releasenotes/notes/typerror-132801fe4541fdb4.yaml0000664000175000017500000000035413643706361026272 0ustar zuulzuul00000000000000--- fixes: - | Fixes ``TypeError`` when the bare metal endpoint cannot be detected from a session. A proper ``EndpointNotFound`` exception is raised now. - | Fixes using ``endpoint_override`` with the ``SessionClient``. python-ironicclient-4.1.0/releasenotes/notes/osc-plugin-ff0d897d8441a9e1.yaml0000664000175000017500000000223513643706361026571 0ustar zuulzuul00000000000000--- features: - | Extend the OpenStackClient plugin with new commands: * openstack baremetal node abort * openstack baremetal node clean * openstack baremetal node create * openstack baremetal node delete - Supports deleting multiple nodes * openstack baremetal node deploy * openstack baremetal node inspect * openstack baremetal node list * openstack baremetal node maintenance set * openstack baremetal node maintenance unset * openstack baremetal node manage * openstack baremetal node power * openstack baremetal node provide * openstack baremetal node reboot * openstack baremetal node rebuild * openstack baremetal node set * openstack baremetal node show * openstack baremetal node undeploy * openstack baremetal node unset * openstack baremetal port create deprecations: - | Deprecating the following commands in favor of the new commands: * openstack baremetal create * openstack baremetal delete * openstack baremetal list * openstack baremetal set * openstack baremetal show * openstack baremetal unset These will be removed in the 'Queens' release. python-ironicclient-4.1.0/releasenotes/notes/index-error-no-endpoint-eb281187f80a9aa4.yaml0000664000175000017500000000025213643706361031157 0ustar zuulzuul00000000000000--- fixes: - Fail with EndpointException instead of IndexError while creating v1 client without ``endpoint`` argument if os_ironic_api_version isn't specified. python-ironicclient-4.1.0/releasenotes/notes/configdrive-7bd2b67830691b2e.yaml0000664000175000017500000000051313643706361026712 0ustar zuulzuul00000000000000--- features: - | Supports passing a JSON object to ``--config-drive`` to build the config drive on the server side (requires API version 1.56) to the following commands: * ``openstack baremetal node deploy --config-drive '{...}'`` * ``openstack baremetal node rebuild --config-drive '{...}'`` python-ironicclient-4.1.0/releasenotes/notes/add_automated_clean_field-d2a0c824a4e90bf4.yaml0000664000175000017500000000032413643706361031640 0ustar zuulzuul00000000000000--- features: - | Adds the ability to set the ``automated_clean`` field (available starting with API version 1.47) on the baremetal node, to enable the automated cleaning feature at the node level. python-ironicclient-4.1.0/releasenotes/notes/fix-token-with-vhosts-5d0a6d53e807fa5e.yaml0000664000175000017500000000050713643706361030756 0ustar zuulzuul00000000000000--- fixes: - | Fixes a bug where the client could not access the ironic API service when the client was instantiated with a keystone token and an ironic API endpoint that included a virtual host (such as "http://hostname/baremetal"). For more details, see `bug 1721599 `_. ././@LongLink0000000000000000000000000000017000000000000011213 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/display-empty-string-for-chassis-uuid-if-it-is-empty-a5471c3aa740a27d.yamlpython-ironicclient-4.1.0/releasenotes/notes/display-empty-string-for-chassis-uuid-if-it-is-empty-a50000664000175000017500000000024013643706361033656 0ustar zuulzuul00000000000000--- fixes: - | If a node does not have ``chassis_uuid`` field in the API response, it is added to the output of the node commands as an empty string. python-ironicclient-4.1.0/releasenotes/notes/add_api_versions-a59e5b6899833c33.yaml0000664000175000017500000000032313643706361027663 0ustar zuulzuul00000000000000--- features: - Add support to the openstackclient plugin for all Ironic API versions of the form 1.x, up to the latest known minor version. The regular Ironic CLI already supports all known versions. python-ironicclient-4.1.0/releasenotes/notes/endpoint-strip-dea59ccb05628a35.yaml0000664000175000017500000000017613643706361027533 0ustar zuulzuul00000000000000--- fixes: - | Prevent trying to access endpoints with ``/v1/v1`` when using endpoint overrides containing ``/v1``. python-ironicclient-4.1.0/releasenotes/notes/version-overrides-4e9ba1266a238c6a.yaml0000664000175000017500000000071313643706361030154 0ustar zuulzuul00000000000000--- features: - | Adds support for ``NodeManager.set_provision_state``, ``NodeManager.update``, ``NodeManager.get``, and ``NodeManager.list`` to accept an ``os_ironic_api_version`` keyword argument to override the API version for that specific call to the REST API. When overridden, the API version is not preserved, and if an unsupported version is requested from the remote API, an ``UnsupportedVersion`` exception is raised. python-ironicclient-4.1.0/releasenotes/notes/fix-python3-compatibility-993ace45fefcba34.yaml0000664000175000017500000000026313643706361031757 0ustar zuulzuul00000000000000--- fixes: - Fixes an issue in a python 3 environment, where TypeError exceptions were being raised (due to the "requests" library returning bytes instead of a string). python-ironicclient-4.1.0/releasenotes/notes/add-node-description-support-6efd0882eaa0c788.yaml0000664000175000017500000000042213643706361032266 0ustar zuulzuul00000000000000--- features: - | Adds ``description`` field support, which is introduced in ironic API 1.51. This field is used to store informational text about the node. User can also do queries for nodes where their ``description`` field contains specified substring. ././@LongLink0000000000000000000000000000020700000000000011214 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/show-required-arguments-in-help-commands-of-node-create-port-create-b213bb28bcc94743.yamlpython-ironicclient-4.1.0/releasenotes/notes/show-required-arguments-in-help-commands-of-node-create0000664000175000017500000000036613643706361034041 0ustar zuulzuul00000000000000fixes: - | Where applicable, help for commands will output the required arguments in a separate section from the optional arguments. For example, the commands ``ironic help node-create`` and ``ironic help port-create``. python-ironicclient-4.1.0/releasenotes/notes/port-physical-network-6ea8860d773e473c.yaml0000664000175000017500000000017413643706361030716 0ustar zuulzuul00000000000000--- features: - | Adds support for the ``port.physical_network`` field, which was introduced in API version 1.34. python-ironicclient-4.1.0/releasenotes/notes/add-port-internal-info-74a03ebd8b0a3dfc.yaml0000664000175000017500000000027213643706361031155 0ustar zuulzuul00000000000000--- features: - The ``ironic port-show``, ``ironic port-list --detail``, and ``ironic node-port-list --detail`` commands now include the ``internal_info`` field in the output. python-ironicclient-4.1.0/releasenotes/notes/add-pecan-exc-construction-a776408f7ae110dc.yaml0000664000175000017500000000014413643706361031607 0ustar zuulzuul00000000000000--- fixes: - Fixes an issue where certain error messages from the ironic API were suppressed. python-ironicclient-4.1.0/releasenotes/notes/allocation-api-5f13082a8b36d788.yaml0000664000175000017500000000047213643706361027241 0ustar zuulzuul00000000000000--- features: - | Adds Python API and CLI for the allocation API introduced in API version 1.52. Adds new commands: * ``openstack baremetal allocation create`` * ``openstack baremetal allocation delete`` * ``openstack baremetal allocation get`` * ``openstack baremetal allocation list`` python-ironicclient-4.1.0/releasenotes/notes/feature-parity-osc-cli-7606eed15f1c124f.yaml0000664000175000017500000000023413643706361030757 0ustar zuulzuul00000000000000--- prelude: > With this release, we have achieved feature parity between the ``ironic`` and ``openstack baremetal`` (OpenStack Client plugin) CLI. python-ironicclient-4.1.0/releasenotes/notes/negative-wrap-fix-4197e91b2ecfb722.yaml0000664000175000017500000000036613643706361030037 0ustar zuulzuul00000000000000--- fixes: - | ``--wrap`` CLI argument for ``ironic driver-properties`` and ``ironic driver-raid-logical-disk-properties`` commands now takes only non-negative integers as input. An error is shown if a negative value is passed. ././@LongLink0000000000000000000000000000015500000000000011216 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/osc-wait-option-for-provisioning-commands-b6f5b875d573c9c8.yamlpython-ironicclient-4.1.0/releasenotes/notes/osc-wait-option-for-provisioning-commands-b6f5b875d573c0000664000175000017500000000074513643706361033401 0ustar zuulzuul00000000000000--- features: - | Adds an option ``--wait []`` to all of the OSC provisioning commands, except for abort which is not supported. When specified, provisioning commands will wait for the node to reach the desired state before returning. An optional argument, time-out, can be specified which will end the waiting after the specified amount of time (in seconds). The default value for this timeout is 0, which means it will wait indefinitely. python-ironicclient-4.1.0/releasenotes/notes/client-session-09e6ced1fbc6a9b0.yaml0000664000175000017500000000032713643706361027651 0ustar zuulzuul00000000000000--- fixes: - | Fails with a clear TypeError when a session is not provided to ``client.Client`` or ``v1.client.Client``. Before we used to throw:: _construct_http_client() takes at least 1 argument python-ironicclient-4.1.0/releasenotes/notes/manual-clean-09f6b49df7d2513f.yaml0000664000175000017500000000112013643706361027033 0ustar zuulzuul00000000000000--- features: - Adds support for manual cleaning API; available with ironic-api-version 1.15 or higher. The ironic CLI is "ironic node-set-provision-state --clean-steps " where is 'clean' and is the clean steps in JSON format. May be the path to a file containing the clean steps; OR '-', with the clean steps being read from standard input; OR a string. The value should be a list of clean-step dictionaries; each dictionary should have keys 'interface' and 'step', and optional key 'args'. ././@LongLink0000000000000000000000000000014700000000000011217 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/remove-deprecated-endpoint-argument-fc0bd8099067e4ca.yamlpython-ironicclient-4.1.0/releasenotes/notes/remove-deprecated-endpoint-argument-fc0bd8099067e4ca.ya0000664000175000017500000000030513643706361033253 0ustar zuulzuul00000000000000--- upgrade: - | Removes deprecated argument ``endpoint`` from the v1.client.Client constructor. Please use the standard keystoneauth argument name ``endpoint_override`` instead. python-ironicclient-4.1.0/releasenotes/notes/ironic-cli-version-a5cdec73d585444d.yaml0000664000175000017500000000221513643706361030272 0ustar zuulzuul00000000000000--- upgrade: - | The default API version for the ``ironic`` command changed from ``1.9`` to ``latest``. ``latest`` is the maximum version understood by both the client and the server. This change makes the CLI automatically pull in new features and changes (including potentially breaking), when talking to new servers. Scripts that used the previous default API version, or that rely on some specific API behavior, should set the ``IRONIC_API_VERSION`` environment variable or use the ``--ironic-api-version`` CLI argument. .. note:: This change does not affect the Python API. features: - | The ``ironic`` command now supports the specification of API version ``1``. The actual version used will be the maximum 1.x version understood by both the client and the server. Thus, it is currently identical to the ``latest`` value. fixes: - | Users of the ``ironic`` command no longer have to specify an explicit API version to use the latest features. The default API version changed from ``1.9`` to ``latest``, which is the maximum version understood by both the client and the server. python-ironicclient-4.1.0/releasenotes/notes/add-portgroups-to-create-command-6d685277f7af79df.yaml0000664000175000017500000000020113643706361032765 0ustar zuulzuul00000000000000--- features: - | Supports creation of port groups via ``ironic create`` and ``openstack baremetal create`` commands. python-ironicclient-4.1.0/releasenotes/notes/add-vif-attach-detach-support-e680d64e4add0fa4.yaml0000664000175000017500000000073413643706361032350 0ustar zuulzuul00000000000000--- features: - | Adds support for attaching and detaching VIFs. This is available starting with ironic API microversion 1.28. The new commands are: * ``ironic node-vif-list `` * ``ironic node-vif-attach `` * ``ironic node-vif-detach `` * ``openstack baremetal node vif list `` * ``openstack baremetal node vif attach `` * ``openstack baremetal node vif detach `` python-ironicclient-4.1.0/releasenotes/notes/osc-max-microver-22-dc0d91a62f03a2e6.yaml0000664000175000017500000000014713643706361030155 0ustar zuulzuul00000000000000--- fixes: - Fixes the OpenStackClient plugin so that microversions 1.21 and 1.22 are supported. python-ironicclient-4.1.0/releasenotes/notes/osc-node-list-no-maintenance-ff1cef7cfbe60fb9.yaml0000664000175000017500000000031113643706361032430 0ustar zuulzuul00000000000000--- features: - | For OSC, adds ability to get list of nodes that are not in maintenance mode via the --no-maintenance optional argument to the ``openstack baremetal node list`` command. python-ironicclient-4.1.0/releasenotes/notes/bug-1524745-adds-node-create-args-a7ace744515e5943.yaml0000664000175000017500000000042013643706361032050 0ustar zuulzuul00000000000000--- features: - Add new arguments to the CLI node-create to allow selecting boot, console, deploy, inspect, management, power, raid, and vendor hardware interfaces, when hardware types are used. They are available starting with ironic API microversion 1.31. ././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/bug-1524745-extend-driver-list-and-driver-show-800d96393aa17342.yamlpython-ironicclient-4.1.0/releasenotes/notes/bug-1524745-extend-driver-list-and-driver-show-800d96390000664000175000017500000000146113643706361032466 0ustar zuulzuul00000000000000--- features: - | To support dynamic drivers (available starting with ironic API microversion 1.30): * ironic driver-list has two new optional arguments, ``--type `` for the type of driver ('classic' or 'dynamic') to list, and ``--detail`` to show detailed information about the drivers. * ironic driver-show returns a lot more information, including the type of driver and the default and enabled interfaces. * openstack baremetal driver list has two new optional arguments, ``--type `` for the type of driver ('classic' or 'dynamic') to list, and ``--long`` to show detailed information about the drivers. * openstack baremetal driver show returns a lot more information, including the type of driver and the default and enabled interfaces.python-ironicclient-4.1.0/releasenotes/notes/prelude-2-0-release-ee44150902d3d399.yaml0000664000175000017500000000147013643706361027711 0ustar zuulzuul00000000000000--- prelude: | The 2.0 release has three major changes: * The default API version for the ``openstack baremetal`` and ``ironic`` commands changed from ``1.9`` to ``latest``. ``latest`` is the maximum version understood by both the client and the server. This change makes the CLI automatically pull in new features and changes (including potentially breaking), from servers. * The ``python-ironicclient`` package no longer includes the ``python-openstackclient`` (OSC) package as a requirement. ``python-openstackclient`` is needed if using the ``openstack baremetal`` CLI. * The ``ironic`` command line interface (``ironic`` commands) is deprecated and will be removed in the OpenStack S* release. Please use the ``openstack baremetal`` CLI instead. python-ironicclient-4.1.0/releasenotes/notes/pass-interface-argument-deb92e3feb0bf051.yaml0000664000175000017500000000045713643706361031435 0ustar zuulzuul00000000000000--- fixes: - | The ``interface`` argument was being ignored so that the HTTP client was always using the public endpoint for Ironic. This fixes it so that the ``interface`` argument is taken into consideration. See `story 2005118 `_. python-ironicclient-4.1.0/releasenotes/notes/remove-deprecated-osc-cmd-6dc980299d2fbde4.yaml0000664000175000017500000000164413643706361031512 0ustar zuulzuul00000000000000--- upgrade: - | These previously deprecated commands were removed and are no longer available: * ``openstack baremetal delete`` * ``openstack baremetal list`` * ``openstack baremetal show`` * ``openstack baremetal set`` * ``openstack baremetal unset`` Instead, use these corresponding equivalent commands: * ``openstack baremetal node delete`` * ``openstack baremetal node list`` * ``openstack baremetal node show`` * ``openstack baremetal node set`` * ``openstack baremetal node unset`` - | Support for creating a single node via ``openstack baremetal create`` had been previously deprecated; it is now no longer available. Instead, use the equivalent command ``openstack baremetal node create``. The only valid usage of ``openstack baremetal create`` is to create various resources (chassis, nodes, port groups, and ports) from resource files. python-ironicclient-4.1.0/releasenotes/notes/start-using-reno-ccd220efa2c7022a.yaml0000664000175000017500000000007113643706361030024 0ustar zuulzuul00000000000000--- other: - Start using reno to manage release notes. ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/osc-plugin-node-set-target-raid-config-5d538d6253902ecb.yamlpython-ironicclient-4.1.0/releasenotes/notes/osc-plugin-node-set-target-raid-config-5d538d6253902ecb0000664000175000017500000000043513643706361032715 0ustar zuulzuul00000000000000--- features: - | Allows setting and unsetting (clearing) the node's target RAID configuration via the OpenStackClient plugin commands ``openstack baremetal node set --target-raid-config`` and ``openstack baremetal node unset --target-raid-config`` respectively. python-ironicclient-4.1.0/releasenotes/notes/osc-node-list-unassociated-60e46958a0abc3e5.yaml0000664000175000017500000000032313643706361031627 0ustar zuulzuul00000000000000--- features: - | Adds an option ``--unassociated`` to the ``openstack baremetal node list`` command. It provides the ability to get a list of the nodes that are not associated with instances. python-ironicclient-4.1.0/releasenotes/notes/remove-deprecated-http-client-c969f583573251e9.yaml0000664000175000017500000000022013643706361032116 0ustar zuulzuul00000000000000--- upgrade: - | Removes deprecated ``common.http.HTTPClient`` class. The ``common.http.SessionClient`` class should be used instead. python-ironicclient-4.1.0/releasenotes/notes/osc-instance-crash-dump-22634a57104561a5.yaml0000664000175000017500000000020613643706361030604 0ustar zuulzuul00000000000000--- features: - Add a new OSC command for the injection of Non-Masking Interrupts (NMI), "openstack baremetal node inject nmi". python-ironicclient-4.1.0/releasenotes/notes/add-node-resource-class-6040d1d6c734522c.yaml0000664000175000017500000000017013643706361030721 0ustar zuulzuul00000000000000--- features: - Adds support for the new ``node.resource_class`` field, which was introduced in API version 1.21. python-ironicclient-4.1.0/releasenotes/notes/node-deploy-step-061e8925dfee3918.yaml0000664000175000017500000000054613643706361027624 0ustar zuulzuul00000000000000--- features: - | Adds support for a node's ``deploy_step`` (read-only) field. The deploy step indicates which step is being performed during the deployment/provisioning of a node. It is available starting with Bare Metal API version 1.44. For more details, see `story 1753128 `_. python-ironicclient-4.1.0/releasenotes/notes/session-client-endpoint-override-20f1d822b4430afa.yaml0000664000175000017500000000026513643706361033045 0ustar zuulzuul00000000000000--- fixes: - Fixes an issue when SessionClient ignores endpoint_override while doing session requests, which leads to undeterministic results in multi-region deployments. python-ironicclient-4.1.0/releasenotes/notes/osc-node-list-provisionstate-cd98dbddaad93e96.yaml0000664000175000017500000000015113643706361032552 0ustar zuulzuul00000000000000--- fixes: - Allows all provision states for OSC node list command with --provision-state argument python-ironicclient-4.1.0/releasenotes/notes/accept-valid_interfaces-3b8f5e3e362e04cd.yaml0000664000175000017500000000106713643706361031315 0ustar zuulzuul00000000000000--- features: - | The consumer of ironicclient may be deriving their ``get_client`` kwargs from config inherited from ksa, where the ``interface`` option has been deprecated in favor of ``valid_interfaces``. To accomodate this, we now accept ``valid_interfaces`` as a kwarg, giving it precedence over ``interface``. However, we still accept ``interface``, as the consumer may be deriving kwargs from a non-conf source (such as an already-created ksa Adapter where ``valid_interfaces`` has already been translated to ``interfaces``). ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/osc-baremetal-node-bios-setting-list-b062b31d0d4de337.yamlpython-ironicclient-4.1.0/releasenotes/notes/osc-baremetal-node-bios-setting-list-b062b31d0d4de337.y0000664000175000017500000000122113643706361032775 0ustar zuulzuul00000000000000--- features: - | Adds two new commands. * ``openstack baremetal node bios setting list `` * ``openstack baremetal node bios setting show `` The first command returns a list of BIOS settings for a given node, the second command returns a specified BIOS setting from the given node. Also adds support of bios_interface for the commands below. * ``openstack baremetal node create`` * ``openstack baremetal node show`` * ``openstack baremetal node set`` * ``openstack baremetal node unset`` * ``openstack baremetal driver list`` * ``openstack baremetal driver show`` python-ironicclient-4.1.0/releasenotes/notes/add_retired_field-6ec9f97c7c2f86ec.yaml0000664000175000017500000000062313643706361030274 0ustar zuulzuul00000000000000--- features: - | Adds the ability to set and unset the ``retired`` and ``retired_reason`` with API 1.61. Setting the ``retired`` field on a node excludes it from scheduling, but still allows the node to be cleaned (unlike maintenance, for instance). The fields can be set irrespective of the node's state and are meant to be used to prepare nodes for removal from ironic. python-ironicclient-4.1.0/releasenotes/notes/soft-reboot-poweroff-e33d078a05db3894.yaml0000664000175000017500000000016313643706361030504 0ustar zuulzuul00000000000000--- features: - Add optional arguments '--soft' and '--power-timeout' to the command "node-set-power-state". python-ironicclient-4.1.0/releasenotes/notes/remove-ironic-command-5c9f7bc4946996e0.yaml0000664000175000017500000000031313643706361030630 0ustar zuulzuul00000000000000--- upgrade: - | The long deprecated ``ironic`` command has been removed. The ``openstack baremetal`` command must now be used. Please update any scripts that you may be using with ironic. python-ironicclient-4.1.0/releasenotes/notes/latest-baremetal-api-version-a20e3099e3b97a1b.yaml0000664000175000017500000000044013643706361032143 0ustar zuulzuul00000000000000--- features: - For OSC commands, the --os-baremetal-api-version optional argument (or OS_BAREMETAL_API_VERSION environment variable) can have the value 'latest'. If set to 'latest', the latest API version known by client will be used in requests to the Bare Metal service. python-ironicclient-4.1.0/releasenotes/notes/osc-port-set-llc-pxeenabled-21fd8ea1982af17e.yaml0000664000175000017500000000110613643706361031767 0ustar zuulzuul00000000000000--- features: - | For ``openstack baremetal port set``, adds these options: * ``--local-link-connection ``: Key/value metadata describing local link connection information. Valid keys are ``switch_info``, ``switch_id``, and ``port_id``. The keys ``switch_id`` and ``port_id`` are required (repeat option to specify multiple keys). * ``--pxe-enabled``: Indicates that this port should be used when PXE booting this node (default) * ``--pxe-disabled``: Indicates that this port should not be used when PXE booting this node python-ironicclient-4.1.0/releasenotes/notes/add-create-command-3df5efbbecc33276.yaml0000664000175000017500000000101013643706361030310 0ustar zuulzuul00000000000000--- features: - Adds a new ``ironic create`` command that creates resources (chassis, nodes, ports) specified in one or more JSON (``*.json``) or YAML (``*.yaml``) files. - Adds a new ``openstack baremetal create`` command. Similar to the ``ironic create`` command, this command creates resources specified in one or more files. (Note that ``openstack baremetal create`` can also be used to create a node via specified node attributes. However, this feature has been deprecated since 1.4.0.) python-ironicclient-4.1.0/releasenotes/notes/wait-for-prov-last-error-5f49b1c488879775.yaml0000664000175000017500000000062113643706361031112 0ustar zuulzuul00000000000000--- fixes: - | Waiting for a provision state to be reached (via CLI ``--wait`` argument or the ``wait_for_provision_state`` function) no longer aborts when the node's ``last_error`` field gets populated. It can cause a normal deployment to abort if a heartbeat from the ramdisk fails because of locking - see `story 2002094 `_. python-ironicclient-4.1.0/releasenotes/notes/drop-py-2-7-b0b950c0c2b6a667.yaml0000664000175000017500000000034413643706361026356 0ustar zuulzuul00000000000000--- upgrade: - | Python 2.7 support has been dropped. Last release of python-ironicclient to support Python 2.7 is OpenStack Train. The minimum version of Python now supported by python-ironicclient is Python 3.6. python-ironicclient-4.1.0/releasenotes/notes/implicit-version-warning-d34b99727b50d519.yaml0000664000175000017500000000045113643706361031303 0ustar zuulzuul00000000000000--- deprecations: - | Currently, the default API version for the OSC plugin is fixed to be 1.9. In the Queens release, it will be changed to the latest version understood by both the client and the server. In this release a warning is logged, if no explicit version is provided. python-ironicclient-4.1.0/releasenotes/notes/reset-interface-bbd7a612242db399.yaml0000664000175000017500000000051713643706361027551 0ustar zuulzuul00000000000000--- features: - | Adds new family of arguments to the ``openstack baremetal node set`` command: ``--reset-XXX-interface``, where ``XXX`` is a name of a hardware interface. This argument resets the node's ``XXX_interface`` field to its calculated default (based on the node's hardware type and the configuration). python-ironicclient-4.1.0/releasenotes/notes/fix-owner-feature-2f3f0163ff307727.yaml0000664000175000017500000000040513643706361027701 0ustar zuulzuul00000000000000--- fixes: - | ``openstack baremetal node list --owner`` was returning an error instead of a list of nodes for the specified owner. It has been fixed. See `story 2006563 `__ for details. python-ironicclient-4.1.0/releasenotes/notes/osc-node-rebuild-configdrive-8979d5b1373e8d5f.yaml0000664000175000017500000000040213643706361032064 0ustar zuulzuul00000000000000--- features: - | Adds the ability to specify a configuration drive when rebuilding a node, via the ``--config-drive`` option to the ``openstack baremetal node rebuild`` command. This is available starting with Bare Metal API version 1.35. python-ironicclient-4.1.0/releasenotes/notes/missing-session-cc11e62dc966b4e0.yaml0000664000175000017500000000061513643706361027702 0ustar zuulzuul00000000000000--- fixes: - | Fixes a confusing error message when a session is not provided for ``ironicclient.v1.client.Client``. - | With the removal of the ``HTTPClient`` class in the release 3.0.0, it is now mandatory to pass a session into ``ironicclient.v1.client.Client``. The helper call ``ironicclient.client.get_client`` can also be used to construct a session implicitly. python-ironicclient-4.1.0/releasenotes/notes/osc-node-list-option-driver-a2901ba6b4e1d3b5.yaml0000664000175000017500000000026313643706361032012 0ustar zuulzuul00000000000000--- features: - | For the OSC command ``openstack baremetal node list``, adds the ``--driver `` option to limit the list to nodes with the specified driver. python-ironicclient-4.1.0/releasenotes/notes/protected-72d7419245a4f6c3.yaml0000664000175000017500000000036313643706361026331 0ustar zuulzuul00000000000000--- features: - | Adds the ability to set and unset the ``protected`` and ``protected_reason`` fields introduced in API 1.48. Setting ``protected`` allows protecting a deployed node from undeploying, rebuilding and deleting. python-ironicclient-4.1.0/releasenotes/notes/conductor-group-9cfab3756aa108e4.yaml0000664000175000017500000000050213643706361027677 0ustar zuulzuul00000000000000--- features: - | Adds support for the ``--conductor-group`` argument to the following CLI commands: * ``openstack baremetal node create`` * ``openstack baremetal node set`` * ``openstack baremetal node unset`` * ``openstack baremetal node list`` This feature requires bare metal API 1.46. python-ironicclient-4.1.0/releasenotes/notes/reset-interfaces-bec227bf933fea59.yaml0000664000175000017500000000032313643706361030101 0ustar zuulzuul00000000000000--- features: - | Adds the new argument ``--reset-interfaces`` to the ``openstack baremetal node set`` command. It can be used together with ``--driver`` to reset all interfaces to their defaults. python-ironicclient-4.1.0/releasenotes/notes/allow-api-user-to-use-latest-6b80e9f584eaaa4e.yaml0000664000175000017500000000231113643706361032202 0ustar zuulzuul00000000000000--- features: - | Allows a python API user to pass ``latest`` to the client creation request for the ``os_ironic_api_version`` parameter. The version utilized for REST API requests will, as a result, be the highest available version understood by both the ironicclient library and the server. - | Adds base client properties to provide insight to a python API user of what the current REST API version that will be utilized, and if API version negotiation has occured. These new properties are ``client.current_api_version`` and ``client.is_api_version_negotiated`` respectively. - | Adds additional base client method to allow a python API user to trigger version negotiation and return the negotiated version. This new method is ``client.negotiate_api_version()``. other: - | The maximum supported version supported for negotiation is now defined in the ``common/http.py`` file. Any new feature added to the API client library must increment this version. - | The maximum known version supported by the ``OpenStackClient`` plugin is now defined by the maximum supported version for API negotiation as defined in the ``common/http.py`` file. python-ironicclient-4.1.0/releasenotes/notes/remove-deprecated-keystone-args-925ac5f3607a89a3.yaml0000664000175000017500000000015413643706361032603 0ustar zuulzuul00000000000000--- upgrade: - | Removing deprecated keystone arguments in favor of standardized argument naming. python-ironicclient-4.1.0/releasenotes/notes/osc-default-microver-172d6e69316e70c1.yaml0000664000175000017500000000021113643706361030360 0ustar zuulzuul00000000000000--- fixes: - Fixes the OpenStackClient plugin so that it uses the same default API version as the Ironic CLI (1.9 instead of 1.6). python-ironicclient-4.1.0/releasenotes/notes/add-conductor-cli-233249ebc9d5a5f3.yaml0000664000175000017500000000027513643706361027773 0ustar zuulzuul00000000000000--- features: - | Adds the ability to list and show conductors known by the Bare Metal service, as well as showing the ``conductor`` field on the node, introduced in API 1.49.python-ironicclient-4.1.0/releasenotes/notes/osc-plugin-9b5344aceb886cc1.yaml0000664000175000017500000000016213643706361026634 0ustar zuulzuul00000000000000--- features: - | Extend the OpenStackClient plugin with new commands: * openstack baremetal port show python-ironicclient-4.1.0/releasenotes/notes/oslo.config-f67bf37ea35dd7fe.yaml0000664000175000017500000000012213643706361027142 0ustar zuulzuul00000000000000--- upgrade: - | An implicit dependency on ``oslo.config`` is now explicit. python-ironicclient-4.1.0/releasenotes/notes/raid_CLI_support-7e816ccd0fb31d2b.yaml0000664000175000017500000000077513643706361030036 0ustar zuulzuul00000000000000--- features: - | Adds support for RAID configuration: * Ability to set target_raid_config for a node using node-set-target-raid-config. * Displays target_raid_config and raid_config in node-show. * Displays logical disk properties for a driver using driver-raid-logical-disk-properties. API version 1.15 should be used with these features, as RAID configuration was added in 1.12 and manual cleaning (used to trigger RAID configuration) was added in 1.15. python-ironicclient-4.1.0/releasenotes/notes/oslo-i18n-optional-ff28821441a0807c.yaml0000664000175000017500000000025613643706361027706 0ustar zuulzuul00000000000000--- upgrade: - | The dependency on ``oslo.i18n`` is now optional. If you would like messages from ironicclient to be translated, you need to install it explicitly. python-ironicclient-4.1.0/releasenotes/notes/add-rescue-unrescue-support-f78266514ca59346.yaml0000664000175000017500000000033613643706361031645 0ustar zuulzuul00000000000000--- features: - | Adds the below commands to OSC to support rescue mode for ironic available starting with API version 1.38: * ``openstack baremetal node rescue`` * ``openstack baremetal node unrescue`` ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/osc-plugin-set-unset-target-raid-config-9a1cecb5620eafda.yamlpython-ironicclient-4.1.0/releasenotes/notes/osc-plugin-set-unset-target-raid-config-9a1cecb5620eafd0000664000175000017500000000033313643706361033326 0ustar zuulzuul00000000000000--- fixes: - No longer emits the incorrect warning "Please specify what to set" (or "unset") when only the ``--target-raid-config`` is specified in the ``openstack baremetal node set`` (or ``unset``) command. python-ironicclient-4.1.0/releasenotes/notes/endpoint-plus-version-4248f4f229dbc7dd.yaml0000664000175000017500000000035613643706361031051 0ustar zuulzuul00000000000000--- fixes: - | Removes the requirement on passing either ``endpoint_override`` or ``os_ironic_api_version`` to ``get_client``. This is only required for efficient caching of API versions and shouldn't be a hard requirement. python-ironicclient-4.1.0/releasenotes/notes/add-volume-connector-api-873090474d5e41b8.yaml0000664000175000017500000000114213643706361031053 0ustar zuulzuul00000000000000--- features: - | Adds these python API client methods to support volume connector resources (available starting with API version 1.32): * ``client.volume_connector.create`` for creating a volume connector * ``client.volume_connector.list`` for listing volume connectors * ``client.volume_connector.get`` for getting a volume connector * ``client.volume_connector.update`` for updating a volume connector * ``client.volume_connector.delete`` for deleting a volume connector * ``client.node.list_volume_connectors`` for getting volume connectors associated with a node ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/osc-plugin-chassis-create-show-fix-ee276d707c5a5bdf.yamlpython-ironicclient-4.1.0/releasenotes/notes/osc-plugin-chassis-create-show-fix-ee276d707c5a5bdf.yam0000664000175000017500000000022613643706361033201 0ustar zuulzuul00000000000000--- upgrade: - Hide nodes field in 'chasiss create' and 'chassis show' OSC subcommand output because this field is not meant for CLI users. python-ironicclient-4.1.0/releasenotes/notes/session-create-092172964afdb71b.yaml0000664000175000017500000000027713643706361027343 0ustar zuulzuul00000000000000--- upgrade: - | When no session is provided in the ``get_client`` call, a session is now created using OpenStackSDK. Only arguments that are supported by it are supported now. python-ironicclient-4.1.0/releasenotes/notes/switch-requests-8304d4465a8976b1.yaml0000664000175000017500000000030513643706361027432 0ustar zuulzuul00000000000000--- features: - Switch HTTP client to requests lib. It allows client to work with API behind the proxy, configure proxies by setting the environment variables HTTP_PROXY and HTTPS_PROXY. python-ironicclient-4.1.0/releasenotes/notes/osc-versioned-endpoint-fix-08f6b7af2f47a5d6.yaml0000664000175000017500000000016613643706361031746 0ustar zuulzuul00000000000000--- fixes: - Fixes an issue with OpenStackClient plugin not being able to work with versioned ironic endpoints. python-ironicclient-4.1.0/releasenotes/notes/provision-state-wait-e7ff919ce8e13703.yaml0000664000175000017500000000036713643706361030626 0ustar zuulzuul00000000000000--- features: - Adds ``--wait`` flag to the ``ironic node-set-provision-state`` command and the associated ``node.wait_for_provision_state`` method in the Python API. The flag works with all provision state changes except for ``abort``. python-ironicclient-4.1.0/releasenotes/notes/osc-port-create-uuid-5da551b154540ef7.yaml0000664000175000017500000000023113643706361030355 0ustar zuulzuul00000000000000--- features: - | Adds the ``--uuid`` option for the ``openstack baremetal port create`` command so that the new port's UUID can be specified. python-ironicclient-4.1.0/releasenotes/notes/allocation-backfill-4d4e51af2f787a72.yaml0000664000175000017500000000017713643706361030377 0ustar zuulzuul00000000000000--- features: - | Adds the ``--node`` argument to ``baremetal allocation create`` to support allocation backfilling. ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/bug-1745099-allow-integer-portgroup-mode-6be4d3b35e216486.yamlpython-ironicclient-4.1.0/releasenotes/notes/bug-1745099-allow-integer-portgroup-mode-6be4d3b35e21640000664000175000017500000000036413643706361032445 0ustar zuulzuul00000000000000--- fixes: - | Fixes `bug 1745099 `_, which prevented a port group's mode from being set to an integer value via the ``openstack baremetal port group set`` command. python-ironicclient-4.1.0/releasenotes/notes/remove-llc-short-arg-89c7443acc6c54a4.yaml0000664000175000017500000000032513643706361030447 0ustar zuulzuul00000000000000--- deprecations: - Deprecates ``-l`` argument of ``openstack baremetal port create`` command in favor of ``--local-link-connection``, as by OpenStackClient guidelines, the options should be full words. python-ironicclient-4.1.0/releasenotes/notes/no-osc-requirement-411f25fd10f18caa.yaml0000664000175000017500000000107313643706361030271 0ustar zuulzuul00000000000000--- upgrade: - | ``python-ironicclient`` package no longer has the ``python-openstackclient`` package (OSC) as a requirement. Users installing only the ``python-ironicclient`` package will not automatically get access to ``openstack baremetal ...`` OSC commands. To have them available, the ``python-openstackclient`` package must be installed separately, or, when installing ``python-ironicclient`` via ``pip``, the new ``cli`` extra can be used to also install OSC: .. code-block:: shell pip install python-ironicclient[cli] ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/allow-client-to-request-list-of-versions-88f019cad76e6464.yamlpython-ironicclient-4.1.0/releasenotes/notes/allow-client-to-request-list-of-versions-88f019cad76e640000664000175000017500000000043613643706361033241 0ustar zuulzuul00000000000000--- features: - | The ``os_ironic_api_version`` parameter now accepts a list of REST API micro-versions to attempt to negotiate with the remote server. The highest available microversion in the list will be negotiated for the remaining lifetime of the client session. python-ironicclient-4.1.0/releasenotes/notes/standalone-cli-f07834585909334a.yaml0000664000175000017500000000062613643706361027106 0ustar zuulzuul00000000000000--- prelude: | This release includes a new standalone CLI tool ``baremetal`` that is mostly identical to the existing OSC plugin, but * Does not require commands to be prefixed with ``openstack``. * Does not require ``python-openstackclient`` to be installed. * Defaults to no authentication. features: - | Adds a new ``baremetal`` CLI tool, mostly targeted at standalone users. python-ironicclient-4.1.0/releasenotes/notes/latest-default-41fdcc49701c4d70.yaml0000664000175000017500000000236613643706361027413 0ustar zuulzuul00000000000000--- upgrade: - | The default API version for the bare metal OSC client (``openstack baremetal`` commands) changed from ``1.9`` to ``latest``. ``latest`` is the maximum version understood by both the client and the server. This change makes the CLI automatically pull in new features and changes (including potentially breaking), when talking to new servers. Scripts that used the previous default API version, or that rely on some specific API behavior, should set the ``OS_BAREMETAL_API_VERSION`` environment variable or use the ``--os-baremetal-api-version`` CLI argument. .. note:: This change does not affect the Python API. features: - | The bare metal OSC client (``openstack baremetal`` commands) now supports the specification of API version ``1``. The actual version used will be the maximum 1.x version understood by both the client and the server. Thus, it is currently identical to the ``latest`` value. fixes: - | Users of the ``openstack baremetal`` commands no longer have to specify an explicit API version to use the latest features. The default API version changed from ``1.9`` to ``latest``, which is the maximum version understood by both the client and the server. python-ironicclient-4.1.0/releasenotes/notes/osc-soft-reboot-poweroff-121b8043567f54a9.yaml0000664000175000017500000000016013643706361031121 0ustar zuulzuul00000000000000--- features: - Enhances OSC to support soft reboot and soft power off with power control timeout option. python-ironicclient-4.1.0/releasenotes/notes/add-events-support-53c461d28abf010b.yaml0000664000175000017500000000047213643706361030221 0ustar zuulzuul00000000000000--- features: - | Adds the ``Event`` resource and the ``client.events.create`` Python SDK method to support publishing events to the Bare Metal service using the /v1/events API endpoint (introduced in API version 1.54). .. Note:: Events are not intended for end-user usage. (Internal use only.) ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000python-ironicclient-4.1.0/releasenotes/notes/osc-baremetal-driver-raid-properties-159bd57058c0fc0e.yamlpython-ironicclient-4.1.0/releasenotes/notes/osc-baremetal-driver-raid-properties-159bd57058c0fc0e.y0000664000175000017500000000053313643706361033116 0ustar zuulzuul00000000000000--- features: - Adds the ``openstack baremetal driver raid property list `` command. For a specified driver, this returns a list of the RAID logical disk properties that can be specified, along with a description for each property. (The values of these properties are specified in a node's ``target_raid_config`` field.) python-ironicclient-4.1.0/releasenotes/notes/osc-plugin-node-create-show-fix-283148c86fbccce2.yaml0000664000175000017500000000022013643706361032555 0ustar zuulzuul00000000000000--- upgrade: - Hide ports field in 'node create' and 'node show' OSC subcommand output because this field is not meant for CLI users. python-ironicclient-4.1.0/releasenotes/notes/remove-states-field-0242960d121a09a7.yaml0000664000175000017500000000024313643706361030111 0ustar zuulzuul00000000000000--- upgrade: - Hides 'states' field in 'node create' and 'node show' OSC subcommands output because this field is not meant to be present in the output. python-ironicclient-4.1.0/releasenotes/notes/driver-properties-for-osc-07a99d2d4e166436.yaml0000664000175000017500000000043213643706361031373 0ustar zuulzuul00000000000000--- features: - Adds the ``openstack baremetal driver property list `` command. For the specified driver, this returns a list of its properties, along with descriptions for each property. (The values of these properties are specified in a node's driver_info.) python-ironicclient-4.1.0/python_ironicclient.egg-info/0000775000175000017500000000000013643706510023321 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/python_ironicclient.egg-info/entry_points.txt0000664000175000017500000002014713643706510026623 0ustar zuulzuul00000000000000[console_scripts] baremetal = ironicclient.shell:main [openstack.baremetal.v1] baremetal_allocation_create = ironicclient.osc.v1.baremetal_allocation:CreateBaremetalAllocation baremetal_allocation_delete = ironicclient.osc.v1.baremetal_allocation:DeleteBaremetalAllocation baremetal_allocation_list = ironicclient.osc.v1.baremetal_allocation:ListBaremetalAllocation baremetal_allocation_set = ironicclient.osc.v1.baremetal_allocation:SetBaremetalAllocation baremetal_allocation_show = ironicclient.osc.v1.baremetal_allocation:ShowBaremetalAllocation baremetal_allocation_unset = ironicclient.osc.v1.baremetal_allocation:UnsetBaremetalAllocation baremetal_chassis_create = ironicclient.osc.v1.baremetal_chassis:CreateBaremetalChassis baremetal_chassis_delete = ironicclient.osc.v1.baremetal_chassis:DeleteBaremetalChassis baremetal_chassis_list = ironicclient.osc.v1.baremetal_chassis:ListBaremetalChassis baremetal_chassis_set = ironicclient.osc.v1.baremetal_chassis:SetBaremetalChassis baremetal_chassis_show = ironicclient.osc.v1.baremetal_chassis:ShowBaremetalChassis baremetal_chassis_unset = ironicclient.osc.v1.baremetal_chassis:UnsetBaremetalChassis baremetal_conductor_list = ironicclient.osc.v1.baremetal_conductor:ListBaremetalConductor baremetal_conductor_show = ironicclient.osc.v1.baremetal_conductor:ShowBaremetalConductor baremetal_create = ironicclient.osc.v1.baremetal_create:CreateBaremetal baremetal_deploy_template_create = ironicclient.osc.v1.baremetal_deploy_template:CreateBaremetalDeployTemplate baremetal_deploy_template_delete = ironicclient.osc.v1.baremetal_deploy_template:DeleteBaremetalDeployTemplate baremetal_deploy_template_list = ironicclient.osc.v1.baremetal_deploy_template:ListBaremetalDeployTemplate baremetal_deploy_template_set = ironicclient.osc.v1.baremetal_deploy_template:SetBaremetalDeployTemplate baremetal_deploy_template_show = ironicclient.osc.v1.baremetal_deploy_template:ShowBaremetalDeployTemplate baremetal_deploy_template_unset = ironicclient.osc.v1.baremetal_deploy_template:UnsetBaremetalDeployTemplate baremetal_driver_list = ironicclient.osc.v1.baremetal_driver:ListBaremetalDriver baremetal_driver_passthru_call = ironicclient.osc.v1.baremetal_driver:PassthruCallBaremetalDriver baremetal_driver_passthru_list = ironicclient.osc.v1.baremetal_driver:PassthruListBaremetalDriver baremetal_driver_property_list = ironicclient.osc.v1.baremetal_driver:ListBaremetalDriverProperty baremetal_driver_raid_property_list = ironicclient.osc.v1.baremetal_driver:ListBaremetalDriverRaidProperty baremetal_driver_show = ironicclient.osc.v1.baremetal_driver:ShowBaremetalDriver baremetal_node_abort = ironicclient.osc.v1.baremetal_node:AbortBaremetalNode baremetal_node_add_trait = ironicclient.osc.v1.baremetal_node:AddTraitBaremetalNode baremetal_node_adopt = ironicclient.osc.v1.baremetal_node:AdoptBaremetalNode baremetal_node_bios_setting_list = ironicclient.osc.v1.baremetal_node:ListBIOSSettingBaremetalNode baremetal_node_bios_setting_show = ironicclient.osc.v1.baremetal_node:BIOSSettingShowBaremetalNode baremetal_node_boot_device_set = ironicclient.osc.v1.baremetal_node:BootdeviceSetBaremetalNode baremetal_node_boot_device_show = ironicclient.osc.v1.baremetal_node:BootdeviceShowBaremetalNode baremetal_node_clean = ironicclient.osc.v1.baremetal_node:CleanBaremetalNode baremetal_node_console_disable = ironicclient.osc.v1.baremetal_node:ConsoleDisableBaremetalNode baremetal_node_console_enable = ironicclient.osc.v1.baremetal_node:ConsoleEnableBaremetalNode baremetal_node_console_show = ironicclient.osc.v1.baremetal_node:ConsoleShowBaremetalNode baremetal_node_create = ironicclient.osc.v1.baremetal_node:CreateBaremetalNode baremetal_node_delete = ironicclient.osc.v1.baremetal_node:DeleteBaremetalNode baremetal_node_deploy = ironicclient.osc.v1.baremetal_node:DeployBaremetalNode baremetal_node_inject_nmi = ironicclient.osc.v1.baremetal_node:InjectNmiBaremetalNode baremetal_node_inspect = ironicclient.osc.v1.baremetal_node:InspectBaremetalNode baremetal_node_list = ironicclient.osc.v1.baremetal_node:ListBaremetalNode baremetal_node_maintenance_set = ironicclient.osc.v1.baremetal_node:MaintenanceSetBaremetalNode baremetal_node_maintenance_unset = ironicclient.osc.v1.baremetal_node:MaintenanceUnsetBaremetalNode baremetal_node_manage = ironicclient.osc.v1.baremetal_node:ManageBaremetalNode baremetal_node_passthru_call = ironicclient.osc.v1.baremetal_node:PassthruCallBaremetalNode baremetal_node_passthru_list = ironicclient.osc.v1.baremetal_node:PassthruListBaremetalNode baremetal_node_power_off = ironicclient.osc.v1.baremetal_node:PowerOffBaremetalNode baremetal_node_power_on = ironicclient.osc.v1.baremetal_node:PowerOnBaremetalNode baremetal_node_provide = ironicclient.osc.v1.baremetal_node:ProvideBaremetalNode baremetal_node_reboot = ironicclient.osc.v1.baremetal_node:RebootBaremetalNode baremetal_node_rebuild = ironicclient.osc.v1.baremetal_node:RebuildBaremetalNode baremetal_node_remove_trait = ironicclient.osc.v1.baremetal_node:RemoveTraitBaremetalNode baremetal_node_rescue = ironicclient.osc.v1.baremetal_node:RescueBaremetalNode baremetal_node_set = ironicclient.osc.v1.baremetal_node:SetBaremetalNode baremetal_node_show = ironicclient.osc.v1.baremetal_node:ShowBaremetalNode baremetal_node_trait_list = ironicclient.osc.v1.baremetal_node:ListTraitsBaremetalNode baremetal_node_undeploy = ironicclient.osc.v1.baremetal_node:UndeployBaremetalNode baremetal_node_unrescue = ironicclient.osc.v1.baremetal_node:UnrescueBaremetalNode baremetal_node_unset = ironicclient.osc.v1.baremetal_node:UnsetBaremetalNode baremetal_node_validate = ironicclient.osc.v1.baremetal_node:ValidateBaremetalNode baremetal_node_vif_attach = ironicclient.osc.v1.baremetal_node:VifAttachBaremetalNode baremetal_node_vif_detach = ironicclient.osc.v1.baremetal_node:VifDetachBaremetalNode baremetal_node_vif_list = ironicclient.osc.v1.baremetal_node:VifListBaremetalNode baremetal_port_create = ironicclient.osc.v1.baremetal_port:CreateBaremetalPort baremetal_port_delete = ironicclient.osc.v1.baremetal_port:DeleteBaremetalPort baremetal_port_group_create = ironicclient.osc.v1.baremetal_portgroup:CreateBaremetalPortGroup baremetal_port_group_delete = ironicclient.osc.v1.baremetal_portgroup:DeleteBaremetalPortGroup baremetal_port_group_list = ironicclient.osc.v1.baremetal_portgroup:ListBaremetalPortGroup baremetal_port_group_set = ironicclient.osc.v1.baremetal_portgroup:SetBaremetalPortGroup baremetal_port_group_show = ironicclient.osc.v1.baremetal_portgroup:ShowBaremetalPortGroup baremetal_port_group_unset = ironicclient.osc.v1.baremetal_portgroup:UnsetBaremetalPortGroup baremetal_port_list = ironicclient.osc.v1.baremetal_port:ListBaremetalPort baremetal_port_set = ironicclient.osc.v1.baremetal_port:SetBaremetalPort baremetal_port_show = ironicclient.osc.v1.baremetal_port:ShowBaremetalPort baremetal_port_unset = ironicclient.osc.v1.baremetal_port:UnsetBaremetalPort baremetal_volume_connector_create = ironicclient.osc.v1.baremetal_volume_connector:CreateBaremetalVolumeConnector baremetal_volume_connector_delete = ironicclient.osc.v1.baremetal_volume_connector:DeleteBaremetalVolumeConnector baremetal_volume_connector_list = ironicclient.osc.v1.baremetal_volume_connector:ListBaremetalVolumeConnector baremetal_volume_connector_set = ironicclient.osc.v1.baremetal_volume_connector:SetBaremetalVolumeConnector baremetal_volume_connector_show = ironicclient.osc.v1.baremetal_volume_connector:ShowBaremetalVolumeConnector baremetal_volume_connector_unset = ironicclient.osc.v1.baremetal_volume_connector:UnsetBaremetalVolumeConnector baremetal_volume_target_create = ironicclient.osc.v1.baremetal_volume_target:CreateBaremetalVolumeTarget baremetal_volume_target_delete = ironicclient.osc.v1.baremetal_volume_target:DeleteBaremetalVolumeTarget baremetal_volume_target_list = ironicclient.osc.v1.baremetal_volume_target:ListBaremetalVolumeTarget baremetal_volume_target_set = ironicclient.osc.v1.baremetal_volume_target:SetBaremetalVolumeTarget baremetal_volume_target_show = ironicclient.osc.v1.baremetal_volume_target:ShowBaremetalVolumeTarget baremetal_volume_target_unset = ironicclient.osc.v1.baremetal_volume_target:UnsetBaremetalVolumeTarget [openstack.cli.extension] baremetal = ironicclient.osc.plugin python-ironicclient-4.1.0/python_ironicclient.egg-info/pbr.json0000664000175000017500000000005613643706510025000 0ustar zuulzuul00000000000000{"git_version": "fc31b5e", "is_release": true}python-ironicclient-4.1.0/python_ironicclient.egg-info/SOURCES.txt0000664000175000017500000003557613643706510025225 0ustar zuulzuul00000000000000.coveragerc .stestr.conf AUTHORS CONTRIBUTING.rst ChangeLog LICENSE README.rst lower-constraints.txt requirements.txt setup.cfg setup.py test-requirements.txt tox.ini doc/requirements.txt doc/source/api_v1.rst doc/source/conf.py doc/source/index.rst doc/source/cli/index.rst doc/source/cli/osc_plugin_cli.rst doc/source/cli/standalone.rst doc/source/cli/osc/v1/index.rst doc/source/contributor/contributing.rst doc/source/contributor/index.rst doc/source/contributor/testing.rst doc/source/reference/index.rst doc/source/user/create_command.rst ironicclient/__init__.py ironicclient/client.py ironicclient/exc.py ironicclient/shell.py ironicclient/common/__init__.py ironicclient/common/base.py ironicclient/common/filecache.py ironicclient/common/http.py ironicclient/common/i18n.py ironicclient/common/utils.py ironicclient/common/apiclient/__init__.py ironicclient/common/apiclient/base.py ironicclient/common/apiclient/exceptions.py ironicclient/osc/__init__.py ironicclient/osc/plugin.py ironicclient/osc/v1/__init__.py ironicclient/osc/v1/baremetal_allocation.py ironicclient/osc/v1/baremetal_chassis.py ironicclient/osc/v1/baremetal_conductor.py ironicclient/osc/v1/baremetal_create.py ironicclient/osc/v1/baremetal_deploy_template.py ironicclient/osc/v1/baremetal_driver.py ironicclient/osc/v1/baremetal_node.py ironicclient/osc/v1/baremetal_port.py ironicclient/osc/v1/baremetal_portgroup.py ironicclient/osc/v1/baremetal_volume_connector.py ironicclient/osc/v1/baremetal_volume_target.py ironicclient/tests/__init__.py ironicclient/tests/functional/__init__.py ironicclient/tests/functional/base.py ironicclient/tests/functional/utils.py ironicclient/tests/functional/osc/__init__.py ironicclient/tests/functional/osc/v1/__init__.py ironicclient/tests/functional/osc/v1/base.py ironicclient/tests/functional/osc/v1/test_baremetal_allocation.py ironicclient/tests/functional/osc/v1/test_baremetal_chassis_basic.py ironicclient/tests/functional/osc/v1/test_baremetal_conductor_basic.py ironicclient/tests/functional/osc/v1/test_baremetal_deploy_template_basic.py ironicclient/tests/functional/osc/v1/test_baremetal_driver_basic.py ironicclient/tests/functional/osc/v1/test_baremetal_node_basic.py ironicclient/tests/functional/osc/v1/test_baremetal_node_create_negative.py ironicclient/tests/functional/osc/v1/test_baremetal_node_fields.py ironicclient/tests/functional/osc/v1/test_baremetal_node_negative.py ironicclient/tests/functional/osc/v1/test_baremetal_node_power_states.py ironicclient/tests/functional/osc/v1/test_baremetal_node_provision_states.py ironicclient/tests/functional/osc/v1/test_baremetal_port_basic.py ironicclient/tests/functional/osc/v1/test_baremetal_portgroup_basic.py ironicclient/tests/unit/__init__.py ironicclient/tests/unit/test_client.py ironicclient/tests/unit/test_exc.py ironicclient/tests/unit/test_import.py ironicclient/tests/unit/utils.py ironicclient/tests/unit/common/__init__.py ironicclient/tests/unit/common/test_base.py ironicclient/tests/unit/common/test_filecache.py ironicclient/tests/unit/common/test_http.py ironicclient/tests/unit/common/test_utils.py ironicclient/tests/unit/common/apiclient/__init__.py ironicclient/tests/unit/common/apiclient/test_base.py ironicclient/tests/unit/common/apiclient/test_exceptions.py ironicclient/tests/unit/osc/__init__.py ironicclient/tests/unit/osc/fakes.py ironicclient/tests/unit/osc/test_plugin.py ironicclient/tests/unit/osc/v1/__init__.py ironicclient/tests/unit/osc/v1/fakes.py ironicclient/tests/unit/osc/v1/test_baremetal_allocation.py ironicclient/tests/unit/osc/v1/test_baremetal_chassis.py ironicclient/tests/unit/osc/v1/test_baremetal_conductor.py ironicclient/tests/unit/osc/v1/test_baremetal_create.py ironicclient/tests/unit/osc/v1/test_baremetal_deploy_template.py ironicclient/tests/unit/osc/v1/test_baremetal_driver.py ironicclient/tests/unit/osc/v1/test_baremetal_node.py ironicclient/tests/unit/osc/v1/test_baremetal_port.py ironicclient/tests/unit/osc/v1/test_baremetal_portgroup.py ironicclient/tests/unit/osc/v1/test_baremetal_volume_connector.py ironicclient/tests/unit/osc/v1/test_baremetal_volume_target.py ironicclient/tests/unit/v1/__init__.py ironicclient/tests/unit/v1/test_allocation.py ironicclient/tests/unit/v1/test_chassis.py ironicclient/tests/unit/v1/test_client.py ironicclient/tests/unit/v1/test_conductor.py ironicclient/tests/unit/v1/test_create_resources.py ironicclient/tests/unit/v1/test_deploy_template.py ironicclient/tests/unit/v1/test_driver.py ironicclient/tests/unit/v1/test_events.py ironicclient/tests/unit/v1/test_node.py ironicclient/tests/unit/v1/test_port.py ironicclient/tests/unit/v1/test_portgroup.py ironicclient/tests/unit/v1/test_resource_fields.py ironicclient/tests/unit/v1/test_volume_connector.py ironicclient/tests/unit/v1/test_volume_target.py ironicclient/v1/__init__.py ironicclient/v1/allocation.py ironicclient/v1/chassis.py ironicclient/v1/client.py ironicclient/v1/conductor.py ironicclient/v1/create_resources.py ironicclient/v1/deploy_template.py ironicclient/v1/driver.py ironicclient/v1/events.py ironicclient/v1/node.py ironicclient/v1/port.py ironicclient/v1/portgroup.py ironicclient/v1/resource_fields.py ironicclient/v1/utils.py ironicclient/v1/volume_connector.py ironicclient/v1/volume_target.py playbooks/functional/run.yaml python_ironicclient.egg-info/PKG-INFO python_ironicclient.egg-info/SOURCES.txt python_ironicclient.egg-info/dependency_links.txt python_ironicclient.egg-info/entry_points.txt python_ironicclient.egg-info/not-zip-safe python_ironicclient.egg-info/pbr.json python_ironicclient.egg-info/requires.txt python_ironicclient.egg-info/top_level.txt releasenotes/notes/.placeholder releasenotes/notes/SHA1-hash-auth-token-f8dce46f854c002c.yaml releasenotes/notes/accept-valid_interfaces-3b8f5e3e362e04cd.yaml releasenotes/notes/add-allocation-owner-0c6daad4ebfea5e6.yaml releasenotes/notes/add-chassis_uuid-removal-possibility-5bc0bc3a7953eaa5.yaml releasenotes/notes/add-conductor-cli-233249ebc9d5a5f3.yaml releasenotes/notes/add-create-command-3df5efbbecc33276.yaml releasenotes/notes/add-environment-variable-to-specify-version-cache-timeout-dfa5f6d4af0ea1d3.yaml releasenotes/notes/add-events-support-53c461d28abf010b.yaml releasenotes/notes/add-is-smartnic-port-attr-ed46d887aec276ed.yaml releasenotes/notes/add-json-option-0cf29be2a97e0212.yaml releasenotes/notes/add-neutron-integration-fields-cee7596c49722de6.yaml releasenotes/notes/add-no-retired-opt-403bb5e466e4facb.yaml releasenotes/notes/add-node-description-support-6efd0882eaa0c788.yaml releasenotes/notes/add-node-lessee-c36409eb0415f75d.yaml releasenotes/notes/add-node-owner-c2dce5a6075ce2b7.yaml releasenotes/notes/add-node-resource-class-6040d1d6c734522c.yaml releasenotes/notes/add-pecan-exc-construction-a776408f7ae110dc.yaml releasenotes/notes/add-port-internal-info-74a03ebd8b0a3dfc.yaml releasenotes/notes/add-portgroup-mode-properties-0a3023cf905adaef.yaml releasenotes/notes/add-portgroups-support-c3cf3826093ee815.yaml releasenotes/notes/add-portgroups-to-create-command-6d685277f7af79df.yaml releasenotes/notes/add-rescue-interface-to-node-and-driver-e3ff9b5df2628e5a.yaml releasenotes/notes/add-rescue-unrescue-support-f78266514ca59346.yaml releasenotes/notes/add-vif-attach-detach-support-e680d64e4add0fa4.yaml releasenotes/notes/add-volume-connector-api-873090474d5e41b8.yaml releasenotes/notes/add-volume-connector-cli-873090474d5e41b9.yaml releasenotes/notes/add-volume-target-api-e062303f4b3b40ef.yaml releasenotes/notes/add-volume-target-cli-e062303f4b3b40f0.yaml releasenotes/notes/add_api_versions-a59e5b6899833c33.yaml releasenotes/notes/add_automated_clean_field-d2a0c824a4e90bf4.yaml releasenotes/notes/add_retired_field-6ec9f97c7c2f86ec.yaml releasenotes/notes/allocation-api-5f13082a8b36d788.yaml releasenotes/notes/allocation-backfill-4d4e51af2f787a72.yaml releasenotes/notes/allow-allocation-update-b4fb715045ab40a2.yaml releasenotes/notes/allow-api-user-to-use-latest-6b80e9f584eaaa4e.yaml releasenotes/notes/allow-client-to-request-list-of-versions-88f019cad76e6464.yaml releasenotes/notes/bug-1524745-adds-node-create-args-a7ace744515e5943.yaml releasenotes/notes/bug-1524745-extend-driver-list-and-driver-show-800d96393aa17342.yaml releasenotes/notes/bug-1524745-update-baremetal-node-set-c1ac57de0d481efe.yaml releasenotes/notes/bug-1712935-allow-os_baremetal_api_version_env_var_to_be_latest-28c8eed24f389673.yaml releasenotes/notes/bug-1724974-add-wanboot-to-supported-boot-devices.yaml releasenotes/notes/bug-1745099-allow-integer-portgroup-mode-6be4d3b35e216486.yaml releasenotes/notes/client-session-09e6ced1fbc6a9b0.yaml releasenotes/notes/conductor-group-9cfab3756aa108e4.yaml releasenotes/notes/configdrive-7bd2b67830691b2e.yaml releasenotes/notes/continue-del-next-node-8827e67e1c41a0a5.yaml releasenotes/notes/deploy-templates-df354ce825b00430.yaml releasenotes/notes/deprecate-http-client-8d664e5ec50ec403.yaml releasenotes/notes/deprecate-ironic-cli-686b7a238ddf3e25.yaml releasenotes/notes/display-empty-string-for-chassis-uuid-if-it-is-empty-a5471c3aa740a27d.yaml releasenotes/notes/driver-properties-for-osc-07a99d2d4e166436.yaml releasenotes/notes/drop-py-2-7-b0b950c0c2b6a667.yaml releasenotes/notes/endpoint-plus-version-4248f4f229dbc7dd.yaml releasenotes/notes/endpoint-strip-dea59ccb05628a35.yaml releasenotes/notes/extend-vif-attach-commands-ef3a931413ddcee7.yaml releasenotes/notes/feature-parity-osc-cli-7606eed15f1c124f.yaml releasenotes/notes/fix-negotiate-version-503-c3cb8d1d4901541a.yaml releasenotes/notes/fix-owner-feature-2f3f0163ff307727.yaml releasenotes/notes/fix-python3-compatibility-993ace45fefcba34.yaml releasenotes/notes/fix-token-with-vhosts-5d0a6d53e807fa5e.yaml releasenotes/notes/implicit-version-warning-d34b99727b50d519.yaml releasenotes/notes/implicit-version-warning-old-cli-fe34d423ae63544a.yaml releasenotes/notes/index-error-no-endpoint-eb281187f80a9aa4.yaml releasenotes/notes/instance-crash-dump-d845a31e72b5a9f7.yaml releasenotes/notes/ironic-cli-version-a5cdec73d585444d.yaml releasenotes/notes/ironic-create-files-fix-c31e40e566ff86b8.yaml releasenotes/notes/keystone-token-auth-661a0c0d53c1b4de.yaml releasenotes/notes/latest-baremetal-api-version-a20e3099e3b97a1b.yaml releasenotes/notes/latest-default-41fdcc49701c4d70.yaml releasenotes/notes/latest-renegotiation-55daa01b3fc261be.yaml releasenotes/notes/list-nodes-by-driver-b1e1e1018077089b.yaml releasenotes/notes/manual-clean-09f6b49df7d2513f.yaml releasenotes/notes/missing-session-cc11e62dc966b4e0.yaml releasenotes/notes/negative-wrap-fix-4197e91b2ecfb722.yaml releasenotes/notes/no-osc-requirement-411f25fd10f18caa.yaml releasenotes/notes/no-resource-attributeerror-d0cb327abab7dcc0.yaml releasenotes/notes/node-deploy-step-061e8925dfee3918.yaml releasenotes/notes/node-driver-support-storage-interface-e93fc8d4de5d24d6.yaml releasenotes/notes/node-fault-adbe74fd600063ee.yaml releasenotes/notes/not-ignore-delete-failtures-0783d33a606ed6f1.yaml releasenotes/notes/osc-baremetal-driver-raid-properties-159bd57058c0fc0e.yaml releasenotes/notes/osc-baremetal-node-bios-setting-list-b062b31d0d4de337.yaml releasenotes/notes/osc-commands-1-7-d531960472a11ac2.yaml releasenotes/notes/osc-default-microver-172d6e69316e70c1.yaml releasenotes/notes/osc-instance-crash-dump-22634a57104561a5.yaml releasenotes/notes/osc-max-microver-22-dc0d91a62f03a2e6.yaml releasenotes/notes/osc-node-list-chassis-091d080684cdccf8.yaml releasenotes/notes/osc-node-list-no-maintenance-ff1cef7cfbe60fb9.yaml releasenotes/notes/osc-node-list-option-driver-a2901ba6b4e1d3b5.yaml releasenotes/notes/osc-node-list-provisionstate-cd98dbddaad93e96.yaml releasenotes/notes/osc-node-list-unassociated-60e46958a0abc3e5.yaml releasenotes/notes/osc-node-power-on-off-c269980e3b9c79ca.yaml releasenotes/notes/osc-node-rebuild-configdrive-8979d5b1373e8d5f.yaml releasenotes/notes/osc-node-set-chassis-aae3413489b66b9b.yaml releasenotes/notes/osc-plugin-9b5344aceb886cc1.yaml releasenotes/notes/osc-plugin-chassis-create-show-fix-ee276d707c5a5bdf.yaml releasenotes/notes/osc-plugin-f87e0fbb472261dd.yaml releasenotes/notes/osc-plugin-ff0d897d8441a9e1.yaml releasenotes/notes/osc-plugin-node-create-show-fix-283148c86fbccce2.yaml releasenotes/notes/osc-plugin-node-set-target-raid-config-5d538d6253902ecb.yaml releasenotes/notes/osc-plugin-set-unset-target-raid-config-9a1cecb5620eafda.yaml releasenotes/notes/osc-port-create-uuid-5da551b154540ef7.yaml releasenotes/notes/osc-port-set-llc-pxeenabled-21fd8ea1982af17e.yaml releasenotes/notes/osc-soft-reboot-poweroff-121b8043567f54a9.yaml releasenotes/notes/osc-versioned-endpoint-fix-08f6b7af2f47a5d6.yaml releasenotes/notes/osc-wait-option-for-provisioning-commands-b6f5b875d573c9c8.yaml releasenotes/notes/oslo-i18n-optional-ff28821441a0807c.yaml releasenotes/notes/oslo.config-f67bf37ea35dd7fe.yaml releasenotes/notes/pass-interface-argument-deb92e3feb0bf051.yaml releasenotes/notes/port-physical-network-6ea8860d773e473c.yaml releasenotes/notes/prelude-2-0-release-ee44150902d3d399.yaml releasenotes/notes/protected-72d7419245a4f6c3.yaml releasenotes/notes/provision-state-adopt-d07b838813cecfb1.yaml releasenotes/notes/provision-state-wait-e7ff919ce8e13703.yaml releasenotes/notes/raid_CLI_support-7e816ccd0fb31d2b.yaml releasenotes/notes/remove-deprecated-endpoint-argument-fc0bd8099067e4ca.yaml releasenotes/notes/remove-deprecated-http-client-c969f583573251e9.yaml releasenotes/notes/remove-deprecated-keystone-args-925ac5f3607a89a3.yaml releasenotes/notes/remove-deprecated-osc-cmd-6dc980299d2fbde4.yaml releasenotes/notes/remove-ironic-command-5c9f7bc4946996e0.yaml releasenotes/notes/remove-llc-short-arg-89c7443acc6c54a4.yaml releasenotes/notes/remove-states-field-0242960d121a09a7.yaml releasenotes/notes/reset-interface-bbd7a612242db399.yaml releasenotes/notes/reset-interfaces-bec227bf933fea59.yaml releasenotes/notes/retry-on-keystone-auth-retriable-failures-91c08b9f8bdab7f3.yaml releasenotes/notes/session-client-endpoint-override-20f1d822b4430afa.yaml releasenotes/notes/session-create-092172964afdb71b.yaml releasenotes/notes/show-required-arguments-in-help-commands-of-node-create-port-create-b213bb28bcc94743.yaml releasenotes/notes/soft-reboot-poweroff-e33d078a05db3894.yaml releasenotes/notes/standalone-cli-f07834585909334a.yaml releasenotes/notes/start-using-reno-ccd220efa2c7022a.yaml releasenotes/notes/strip-prefix-when-paginating-6140465b1488828e.yaml releasenotes/notes/switch-requests-8304d4465a8976b1.yaml releasenotes/notes/traits-support-8864f6816abecdb2.yaml releasenotes/notes/typerror-132801fe4541fdb4.yaml releasenotes/notes/version-overrides-4e9ba1266a238c6a.yaml releasenotes/notes/wait-for-prov-last-error-5f49b1c488879775.yaml releasenotes/source/conf.py releasenotes/source/index.rst releasenotes/source/mitaka.rst releasenotes/source/newton.rst releasenotes/source/ocata.rst releasenotes/source/pike.rst releasenotes/source/queens.rst releasenotes/source/rocky.rst releasenotes/source/stein.rst releasenotes/source/train.rst releasenotes/source/unreleased.rst releasenotes/source/_static/.placeholder releasenotes/source/_templates/.placeholder tools/__init__.py tools/install_venv_common.py tools/with_venv.sh zuul.d/ironicclient-jobs.yaml zuul.d/project.yamlpython-ironicclient-4.1.0/python_ironicclient.egg-info/PKG-INFO0000664000175000017500000001011313643706510024412 0ustar zuulzuul00000000000000Metadata-Version: 2.1 Name: python-ironicclient Version: 4.1.0 Summary: OpenStack Bare Metal Provisioning API Client Library Home-page: https://docs.openstack.org/python-ironicclient/latest/ Author: OpenStack Author-email: openstack-discuss@lists.openstack.org License: UNKNOWN Description: ================================== Python bindings for the Ironic API ================================== Team and repository tags ------------------------ .. image:: https://governance.openstack.org/tc/badges/python-ironicclient.svg :target: https://governance.openstack.org/tc/reference/tags/index.html Overview -------- This is a client for the OpenStack `Bare Metal API `_. It provides: * a Python API: the ``ironicclient`` module, and * a command-line interfaces: ``openstack baremetal`` Development takes place via the usual OpenStack processes as outlined in the `developer guide `_. The master repository is on `opendev.org `_. ``python-ironicclient`` is licensed under the Apache License, Version 2.0, like the rest of OpenStack. .. contents:: Contents: :local: Project resources ----------------- * Documentation: https://docs.openstack.org/python-ironicclient/latest/ * Source: https://opendev.org/openstack/python-ironicclient * Bugs: https://storyboard.openstack.org/#!/project/959 * Release notes: https://docs.openstack.org/releasenotes/python-ironicclient/ Python API ---------- Quick-start Example:: >>> from ironicclient import client >>> >>> kwargs = {'os_auth_token': '3bcc3d3a03f44e3d8377f9247b0ad155', >>> 'ironic_url': 'http://ironic.example.org:6385/'} >>> ironic = client.get_client(1, **kwargs) ``openstack baremetal`` CLI --------------------------- The ``openstack baremetal`` command line interface is available when the bare metal plugin (included in this package) is used with the `OpenStackClient `_. There are two ways to install the OpenStackClient (python-openstackclient) package: * along with this python-ironicclient package:: # pip install python-ironicclient[cli] * directly:: # pip install python-openstackclient An example of creating a basic node with the ``ipmi`` driver:: $ openstack baremetal node create --driver ipmi An example of creating a port on a node:: $ openstack baremetal port create --node AA:BB:CC:DD:EE:FF An example of updating driver properties for a node:: $ openstack baremetal node set --driver-info ipmi_address= For more information about the ``openstack baremetal`` command and the subcommands available, run:: $ openstack help baremetal Platform: UNKNOWN Classifier: Environment :: OpenStack Classifier: Intended Audience :: Information Technology Classifier: Intended Audience :: System Administrators Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Requires-Python: >=3.6 Provides-Extra: cli Provides-Extra: test python-ironicclient-4.1.0/python_ironicclient.egg-info/dependency_links.txt0000664000175000017500000000000113643706510027367 0ustar zuulzuul00000000000000 python-ironicclient-4.1.0/python_ironicclient.egg-info/top_level.txt0000664000175000017500000000001513643706510026047 0ustar zuulzuul00000000000000ironicclient python-ironicclient-4.1.0/python_ironicclient.egg-info/not-zip-safe0000664000175000017500000000000113643706510025547 0ustar zuulzuul00000000000000 python-ironicclient-4.1.0/python_ironicclient.egg-info/requires.txt0000664000175000017500000000104213643706510025716 0ustar zuulzuul00000000000000pbr!=2.1.0,>=2.0.0 appdirs>=1.3.0 cliff!=2.9.0,>=2.8.0 dogpile.cache>=0.6.2 jsonschema>=2.6.0 keystoneauth1>=3.4.0 openstacksdk>=0.18.0 osc-lib>=1.10.0 oslo.serialization!=2.19.1,>=2.18.0 oslo.utils>=3.33.0 PyYAML>=3.12 requests>=2.14.2 stevedore>=1.20.0 [cli] python-openstackclient>=3.12.0 [test] hacking<3.1.0,>=3.0.0 coverage!=4.4,>=4.0 doc8>=0.6.0 fixtures>=3.0.0 requests-mock>=1.2.0 mock>=2.0.0 Babel!=2.4.0,>=2.3.4 oslotest>=3.2.0 testtools>=2.2.0 tempest>=17.1.0 stestr>=1.0.0 ddt>=1.0.1 python-openstackclient>=3.12.0 Pygments>=2.2.0 python-ironicclient-4.1.0/README.rst0000664000175000017500000000475313643706361017250 0ustar zuulzuul00000000000000================================== Python bindings for the Ironic API ================================== Team and repository tags ------------------------ .. image:: https://governance.openstack.org/tc/badges/python-ironicclient.svg :target: https://governance.openstack.org/tc/reference/tags/index.html Overview -------- This is a client for the OpenStack `Bare Metal API `_. It provides: * a Python API: the ``ironicclient`` module, and * a command-line interfaces: ``openstack baremetal`` Development takes place via the usual OpenStack processes as outlined in the `developer guide `_. The master repository is on `opendev.org `_. ``python-ironicclient`` is licensed under the Apache License, Version 2.0, like the rest of OpenStack. .. contents:: Contents: :local: Project resources ----------------- * Documentation: https://docs.openstack.org/python-ironicclient/latest/ * Source: https://opendev.org/openstack/python-ironicclient * Bugs: https://storyboard.openstack.org/#!/project/959 * Release notes: https://docs.openstack.org/releasenotes/python-ironicclient/ Python API ---------- Quick-start Example:: >>> from ironicclient import client >>> >>> kwargs = {'os_auth_token': '3bcc3d3a03f44e3d8377f9247b0ad155', >>> 'ironic_url': 'http://ironic.example.org:6385/'} >>> ironic = client.get_client(1, **kwargs) ``openstack baremetal`` CLI --------------------------- The ``openstack baremetal`` command line interface is available when the bare metal plugin (included in this package) is used with the `OpenStackClient `_. There are two ways to install the OpenStackClient (python-openstackclient) package: * along with this python-ironicclient package:: # pip install python-ironicclient[cli] * directly:: # pip install python-openstackclient An example of creating a basic node with the ``ipmi`` driver:: $ openstack baremetal node create --driver ipmi An example of creating a port on a node:: $ openstack baremetal port create --node AA:BB:CC:DD:EE:FF An example of updating driver properties for a node:: $ openstack baremetal node set --driver-info ipmi_address= For more information about the ``openstack baremetal`` command and the subcommands available, run:: $ openstack help baremetal python-ironicclient-4.1.0/.stestr.conf0000664000175000017500000000010713643706361020017 0ustar zuulzuul00000000000000[DEFAULT] test_path=${TESTS_DIR:-./ironicclient/tests/unit} top_dir=./ python-ironicclient-4.1.0/test-requirements.txt0000664000175000017500000000120713643706361022011 0ustar zuulzuul00000000000000# 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.0,<3.1.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 doc8>=0.6.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD requests-mock>=1.2.0 # Apache-2.0 mock>=2.0.0 # BSD Babel!=2.4.0,>=2.3.4 # BSD oslotest>=3.2.0 # Apache-2.0 testtools>=2.2.0 # MIT tempest>=17.1.0 # Apache-2.0 stestr>=1.0.0 # Apache-2.0 ddt>=1.0.1 # MIT python-openstackclient>=3.12.0 # Apache-2.0 # Required for syntax highlighting check Pygments>=2.2.0 # BSD python-ironicclient-4.1.0/tox.ini0000664000175000017500000000532413643706361017067 0ustar zuulzuul00000000000000[tox] minversion = 3.1.0 envlist = py3,pep8,pypy skipsdist = True ignore_basepython_conflict=true [testenv] basepython = python3 setenv = VIRTUAL_ENV={envdir} PYTHONDONTWRITEBYTECODE = 1 LANGUAGE=en_US # .stestr.conf uses TESTS_DIR TESTS_DIR=./ironicclient/tests/unit usedevelop = True install_command = pip install {opts} {packages} deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = stestr run {posargs} [testenv:releasenotes] deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:pep8] commands = flake8 {posargs} doc8 doc/source CONTRIBUTING.rst README.rst [testenv:cover] setenv = {[testenv]setenv} PYTHON=coverage run --source ironicclient --omit='*tests*' --parallel-mode commands = coverage erase stestr run {posargs} coverage combine coverage report --omit='*tests*' coverage html -d ./cover --omit='*tests*' [testenv:venv] deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = {posargs} [testenv:functionalpy3] passenv = * setenv = TESTS_DIR=./ironicclient/tests/functional LANGUAGE=en_US OS_TESTENV_NAME = {envname} [testenv:docs] deps = -c{env:UPPER_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:pdf-docs] whitelist_externals = make deps = {[testenv:docs]deps} commands = sphinx-build -W -b latex doc/source doc/build/pdf make -C doc/build/pdf [flake8] ignore = W503 exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools # [H106] Don't put vim configuration in source files. # [H203] Use assertIs(Not)None to check for None. # [H204] Use assert(Not)Equal to check for equality. # [H205] Use assert(Greater|Less)(Equal) for comparison. # [H210] Require 'autospec', 'spec', or 'spec_set' in mock.patch/mock.patch.object calls # [H904] Delay string interpolations at logging calls. enable-extensions=H106,H203,H204,H205,H210,H904 [hacking] import_exceptions = testtools.matchers, ironicclient.common.i18n [testenv:lower-constraints] deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt python-ironicclient-4.1.0/.coveragerc0000664000175000017500000000011113643706361017662 0ustar zuulzuul00000000000000[report] include = ironicclient/* omit = ironicclient/tests/functional/* python-ironicclient-4.1.0/zuul.d/0000775000175000017500000000000013643706510016765 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/zuul.d/ironicclient-jobs.yaml0000664000175000017500000000227513643706361023300 0ustar zuulzuul00000000000000- job: name: ironicclient-functional parent: devstack-minimal irrelevant-files: - ^.*\.rst$ - ^doc/.*$ - ^ironicclient/locale/.*$ - ^ironicclient/tests/.*$ - ^releasenotes/.*$ - ^setup.cfg$ - ^tools/.*$ - ^tox.ini$ required-projects: - openstack/ironic - openstack/python-ironicclient - openstack/keystone - openstack/tempest timeout: 4800 post-run: playbooks/functional/run.yaml vars: tox_environment: PYTHONUNBUFFERED: 'true' tox_envlist: functionalpy3 devstack_plugins: ironic: https://opendev.org/openstack/ironic devstack_localrc: USE_PYTHON3: True EBTABLES_RACE_FIX: True IRONIC_ENABLED_NETWORK_INTERFACES: noop IRONIC_DHCP_PROVIDER: none IRONIC_DEPLOY_DRIVER: fake INSTALL_TEMPEST: False devstack_services: key: True mysql: True rabbit: True - job: name: ironicclient-tempest parent: ironic-base required-projects: - openstack/python-ironicclient timeout: 10800 vars: devstack_localrc: IRONIC_RAMDISK_TYPE: tinyipa EBTABLES_RACE_FIX: True python-ironicclient-4.1.0/zuul.d/project.yaml0000664000175000017500000000071613643706361021327 0ustar zuulzuul00000000000000- project: templates: - check-requirements - openstack-cover-jobs - openstack-lower-constraints-jobs - openstack-python3-ussuri-jobs - openstackclient-plugin-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 check: jobs: - ironicclient-functional - ironicclient-tempest gate: queue: ironic jobs: - ironicclient-functional - ironicclient-tempest python-ironicclient-4.1.0/ironicclient/0000775000175000017500000000000013643706510020226 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/ironicclient/osc/0000775000175000017500000000000013643706510021012 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/ironicclient/osc/plugin.py0000664000175000017500000001162013643706361022666 0ustar zuulzuul00000000000000# # Copyright 2015 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # """OpenStackClient plugin for Bare Metal service.""" import argparse import logging from ironicclient.common import http from osc_lib import utils LOG = logging.getLogger(__name__) CLIENT_CLASS = 'ironicclient.v1.client.Client' API_VERSION_OPTION = 'os_baremetal_api_version' API_NAME = 'baremetal' # NOTE(TheJulia) Latest known version tracking has been moved # to the ironicclient/common/http.py file as the OSC committment # is latest known, and we should only store it in one location. LAST_KNOWN_API_VERSION = http.LAST_KNOWN_API_VERSION LATEST_VERSION = http.LATEST_VERSION API_VERSIONS = { '1.%d' % i: CLIENT_CLASS for i in range(1, LAST_KNOWN_API_VERSION + 1) } API_VERSIONS['1'] = CLIENT_CLASS # NOTE(dtantsur): flag to indicate that the requested version was "latest". # Due to how OSC works we cannot just add "latest" to the list of supported # versions - it breaks the major version detection. OS_BAREMETAL_API_LATEST = True def make_client(instance): """Returns a baremetal service client.""" requested_api_version = instance._api_version[API_NAME] baremetal_client_class = utils.get_client_class( API_NAME, requested_api_version, API_VERSIONS) LOG.debug('Instantiating baremetal client: %s', baremetal_client_class) LOG.debug('Baremetal API version: %s', requested_api_version if not OS_BAREMETAL_API_LATEST else "latest") if requested_api_version == '1': # NOTE(dtantsur): '1' means 'the latest v1 API version'. Since we don't # have other major versions, it's identical to 'latest'. requested_api_version = LATEST_VERSION allow_api_version_downgrade = True else: allow_api_version_downgrade = OS_BAREMETAL_API_LATEST client = baremetal_client_class( os_ironic_api_version=requested_api_version, # NOTE(dtantsur): enable re-negotiation of the latest version, if CLI # latest is too high for the server we're talking to. allow_api_version_downgrade=allow_api_version_downgrade, session=instance.session, region_name=instance._region_name, # NOTE(vdrok): This will be set as endpoint_override, and the Client # class will be able to do the version stripping if needed endpoint_override=instance.get_endpoint_for_service_type( API_NAME, interface=instance.interface, region_name=instance._region_name ) ) return client def build_option_parser(parser): """Hook to add global options.""" parser.add_argument( '--os-baremetal-api-version', metavar='', default=_get_environment_version("latest"), choices=sorted( API_VERSIONS, key=lambda k: [int(x) for x in k.split('.')]) + ['latest'], action=ReplaceLatestVersion, help='Bare metal API version, default="latest" (the maximum version ' 'supported by both the client and the server). ' '(Env: OS_BAREMETAL_API_VERSION)', ) return parser def _get_environment_version(default): global OS_BAREMETAL_API_LATEST env_value = utils.env('OS_BAREMETAL_API_VERSION') if not env_value: env_value = default if env_value == 'latest': env_value = LATEST_VERSION else: OS_BAREMETAL_API_LATEST = False return env_value class ReplaceLatestVersion(argparse.Action): """Replaces `latest` keyword by last known version. OSC cannot accept the literal "latest" as a supported API version as it breaks the major version detection (OSC tries to load configuration options from setuptools entrypoint openstack.baremetal.vlatest). This action replaces "latest" with the latest known version, and sets the global OS_BAREMETAL_API_LATEST flag appropriately. """ def __call__(self, parser, namespace, values, option_string=None): global OS_BAREMETAL_API_LATEST if values == 'latest': values = LATEST_VERSION # The default value of "True" may have been overridden due to # non-empty OS_BAREMETAL_API_VERSION env variable. If a user # explicitly requests "latest", we need to correct it. OS_BAREMETAL_API_LATEST = True else: OS_BAREMETAL_API_LATEST = False setattr(namespace, self.dest, values) python-ironicclient-4.1.0/ironicclient/osc/v1/0000775000175000017500000000000013643706510021340 5ustar zuulzuul00000000000000python-ironicclient-4.1.0/ironicclient/osc/v1/baremetal_volume_target.py0000664000175000017500000003564413643706361026623 0ustar zuulzuul00000000000000# Copyright 2017 FUJITSU LIMITED # # 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 itertools import logging from osc_lib.command import command from osc_lib import utils as oscutils from ironicclient.common.i18n import _ from ironicclient.common import utils from ironicclient import exc from ironicclient.v1 import resource_fields as res_fields class CreateBaremetalVolumeTarget(command.ShowOne): """Create a new baremetal volume target.""" log = logging.getLogger(__name__ + ".CreateBaremetalVolumeTarget") def get_parser(self, prog_name): parser = super(CreateBaremetalVolumeTarget, self).get_parser(prog_name) parser.add_argument( '--node', dest='node_uuid', metavar='', required=True, help=_('UUID of the node that this volume target belongs to.')) parser.add_argument( '--type', dest='volume_type', metavar="", required=True, help=_("Type of the volume target, e.g. 'iscsi', " "'fibre_channel'.")) parser.add_argument( '--property', dest='properties', metavar="", action='append', help=_("Key/value property related to the type of this volume " "target. Can be specified multiple times." )) parser.add_argument( '--boot-index', dest='boot_index', metavar="", type=int, required=True, help=_("Boot index of the volume target.")) parser.add_argument( '--volume-id', dest='volume_id', metavar="", required=True, help=_("ID of the volume associated with this target.")) parser.add_argument( '--uuid', dest='uuid', metavar='', help=_("UUID of the volume target.")) parser.add_argument( '--extra', dest='extra', metavar="", action='append', help=_("Record arbitrary key/value metadata. " "Can be specified multiple times.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args) baremetal_client = self.app.client_manager.baremetal if parsed_args.boot_index < 0: raise exc.CommandError( _('Expected non-negative --boot-index, got %s') % parsed_args.boot_index) field_list = ['extra', 'volume_type', 'properties', 'boot_index', 'node_uuid', 'volume_id', 'uuid'] fields = dict((k, v) for (k, v) in vars(parsed_args).items() if k in field_list and v is not None) fields = utils.args_array_to_dict(fields, 'properties') fields = utils.args_array_to_dict(fields, 'extra') volume_target = baremetal_client.volume_target.create(**fields) data = dict([(f, getattr(volume_target, f, '')) for f in res_fields.VOLUME_TARGET_DETAILED_RESOURCE.fields]) return self.dict2columns(data) class ShowBaremetalVolumeTarget(command.ShowOne): """Show baremetal volume target details.""" log = logging.getLogger(__name__ + ".ShowBaremetalVolumeTarget") def get_parser(self, prog_name): parser = super(ShowBaremetalVolumeTarget, self).get_parser(prog_name) parser.add_argument( 'volume_target', metavar='', help=_("UUID of the volume target.")) parser.add_argument( '--fields', nargs='+', dest='fields', metavar='', action='append', default=[], choices=res_fields.VOLUME_TARGET_DETAILED_RESOURCE.fields, help=_("One or more volume target fields. Only these fields will " "be fetched from the server.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal fields = list(itertools.chain.from_iterable(parsed_args.fields)) fields = fields if fields else None volume_target = baremetal_client.volume_target.get( parsed_args.volume_target, fields=fields)._info volume_target.pop("links", None) return zip(*sorted(volume_target.items())) class ListBaremetalVolumeTarget(command.Lister): """List baremetal volume targets.""" log = logging.getLogger(__name__ + ".ListBaremetalVolumeTarget") def get_parser(self, prog_name): parser = super(ListBaremetalVolumeTarget, self).get_parser(prog_name) parser.add_argument( '--node', dest='node', metavar='', help=_("Only list volume targets of this node (name or UUID).")) parser.add_argument( '--limit', dest='limit', metavar='', type=int, help=_('Maximum number of volume targets to return per request, ' '0 for no limit. Default is the maximum number used ' 'by the Baremetal API Service.')) parser.add_argument( '--marker', dest='marker', metavar='', help=_('Volume target UUID (for example, of the last ' 'volume target in the list from a previous request). ' 'Returns the list of volume targets after this UUID.')) parser.add_argument( '--sort', dest='sort', metavar='[:]', help=_('Sort output by specified volume target fields and ' 'directions (asc or desc) (default:asc). Multiple fields ' 'and directions can be specified, separated by comma.')) display_group = parser.add_mutually_exclusive_group(required=False) display_group.add_argument( '--long', dest='detail', action='store_true', default=False, help=_("Show detailed information about volume targets.")) display_group.add_argument( '--fields', nargs='+', dest='fields', metavar='', action='append', default=[], choices=res_fields.VOLUME_TARGET_DETAILED_RESOURCE.fields, help=_("One or more volume target fields. Only these fields will " "be fetched from the server. Can not be used when " "'--long' is specified.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args) client = self.app.client_manager.baremetal columns = res_fields.VOLUME_TARGET_RESOURCE.fields labels = res_fields.VOLUME_TARGET_RESOURCE.labels params = {} if parsed_args.limit is not None and parsed_args.limit < 0: raise exc.CommandError( _('Expected non-negative --limit, got %s') % parsed_args.limit) params['limit'] = parsed_args.limit params['marker'] = parsed_args.marker if parsed_args.node is not None: params['node'] = parsed_args.node if parsed_args.detail: params['detail'] = parsed_args.detail columns = res_fields.VOLUME_TARGET_DETAILED_RESOURCE.fields labels = res_fields.VOLUME_TARGET_DETAILED_RESOURCE.labels elif parsed_args.fields: params['detail'] = False fields = itertools.chain.from_iterable(parsed_args.fields) resource = res_fields.Resource(list(fields)) columns = resource.fields labels = resource.labels params['fields'] = columns self.log.debug("params(%s)" % params) data = client.volume_target.list(**params) data = oscutils.sort_items(data, parsed_args.sort) return (labels, (oscutils.get_item_properties(s, columns, formatters={ 'Properties': oscutils.format_dict},) for s in data)) class DeleteBaremetalVolumeTarget(command.Command): """Unregister baremetal volume target(s).""" log = logging.getLogger(__name__ + ".DeleteBaremetalVolumeTarget") def get_parser(self, prog_name): parser = ( super(DeleteBaremetalVolumeTarget, self).get_parser(prog_name)) parser.add_argument( 'volume_targets', metavar='', nargs='+', help=_("UUID(s) of the volume target(s) to delete.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal failures = [] for volume_target in parsed_args.volume_targets: try: baremetal_client.volume_target.delete(volume_target) print(_('Deleted volume target %s') % volume_target) except exc.ClientException as e: failures.append(_("Failed to delete volume target " "%(volume_target)s: %(error)s") % {'volume_target': volume_target, 'error': e}) if failures: raise exc.ClientException("\n".join(failures)) class SetBaremetalVolumeTarget(command.Command): """Set baremetal volume target properties.""" log = logging.getLogger(__name__ + ".SetBaremetalVolumeTarget") def get_parser(self, prog_name): parser = ( super(SetBaremetalVolumeTarget, self).get_parser(prog_name)) parser.add_argument( 'volume_target', metavar='', help=_("UUID of the volume target.")) parser.add_argument( '--node', dest='node_uuid', metavar='', help=_('UUID of the node that this volume target belongs to.')) parser.add_argument( '--type', dest='volume_type', metavar="", help=_("Type of the volume target, e.g. 'iscsi', " "'fibre_channel'.")) parser.add_argument( '--property', dest='properties', metavar="", action='append', help=_("Key/value property related to the type of this volume " "target. Can be specified multiple times.")) parser.add_argument( '--boot-index', dest='boot_index', metavar="", type=int, help=_("Boot index of the volume target.")) parser.add_argument( '--volume-id', dest='volume_id', metavar="", help=_("ID of the volume associated with this target.")) parser.add_argument( '--extra', dest='extra', metavar="", action='append', help=_("Record arbitrary key/value metadata. " "Can be specified multiple times.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal if parsed_args.boot_index is not None and parsed_args.boot_index < 0: raise exc.CommandError( _('Expected non-negative --boot-index, got %s') % parsed_args.boot_index) properties = [] if parsed_args.node_uuid: properties.extend(utils.args_array_to_patch( 'add', ["node_uuid=%s" % parsed_args.node_uuid])) if parsed_args.volume_type: properties.extend(utils.args_array_to_patch( 'add', ["volume_type=%s" % parsed_args.volume_type])) if parsed_args.boot_index: properties.extend(utils.args_array_to_patch( 'add', ["boot_index=%s" % parsed_args.boot_index])) if parsed_args.volume_id: properties.extend(utils.args_array_to_patch( 'add', ["volume_id=%s" % parsed_args.volume_id])) if parsed_args.properties: properties.extend(utils.args_array_to_patch( 'add', ["properties/" + x for x in parsed_args.properties])) if parsed_args.extra: properties.extend(utils.args_array_to_patch( 'add', ["extra/" + x for x in parsed_args.extra])) if properties: baremetal_client.volume_target.update( parsed_args.volume_target, properties) else: self.log.warning("Please specify what to set.") class UnsetBaremetalVolumeTarget(command.Command): """Unset baremetal volume target properties.""" log = logging.getLogger(__name__ + "UnsetBaremetalVolumeTarget") def get_parser(self, prog_name): parser = ( super(UnsetBaremetalVolumeTarget, self).get_parser(prog_name)) parser.add_argument( 'volume_target', metavar='', help=_("UUID of the volume target.")) parser.add_argument( '--extra', dest='extra', metavar="", action='append', help=_('Extra to unset (repeat option to unset multiple extras)')) parser.add_argument( "--property", dest='properties', metavar="", action='append', help='Property to unset on this baremetal volume target ' '(repeat option to unset multiple properties).', ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal properties = [] if parsed_args.extra: properties.extend(utils.args_array_to_patch('remove', ['extra/' + x for x in parsed_args.extra])) if parsed_args.properties: properties.extend(utils.args_array_to_patch( 'remove', ['properties/' + x for x in parsed_args.properties])) if properties: baremetal_client.volume_target.update( parsed_args.volume_target, properties) else: self.log.warning("Please specify what to unset.") python-ironicclient-4.1.0/ironicclient/osc/v1/baremetal_create.py0000664000175000017500000000256613643706361025206 0ustar zuulzuul00000000000000# 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 osc_lib.command import command from ironicclient.common.i18n import _ from ironicclient.v1 import create_resources class CreateBaremetal(command.Command): """Create resources from files""" log = logging.getLogger(__name__ + ".CreateBaremetal") def get_parser(self, prog_name): parser = super(CreateBaremetal, self).get_parser(prog_name) parser.add_argument( "resource_files", metavar="", nargs="+", help=_("File (.yaml or .json) containing descriptions of the " "resources to create. Can be specified multiple times.")) return parser def take_action(self, parsed_args): create_resources.create_resources(self.app.client_manager.baremetal, parsed_args.resource_files) python-ironicclient-4.1.0/ironicclient/osc/v1/baremetal_chassis.py0000664000175000017500000002557613643706361025406 0ustar zuulzuul00000000000000# # Copyright 2016 Intel 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 itertools import logging from osc_lib.command import command from osc_lib import utils as oscutils from ironicclient.common.i18n import _ from ironicclient.common import utils from ironicclient import exc from ironicclient.v1 import resource_fields as res_fields class CreateBaremetalChassis(command.ShowOne): """Create a new chassis.""" log = logging.getLogger(__name__ + ".CreateBaremetalChassis") def get_parser(self, prog_name): parser = super(CreateBaremetalChassis, self).get_parser(prog_name) parser.add_argument( '--description', dest='description', metavar='', help=_('Description for the chassis') ) parser.add_argument( '--extra', metavar='', action='append', help=_("Record arbitrary key/value metadata. " "Can be specified multiple times.") ) parser.add_argument( '--uuid', metavar='', help=_("Unique UUID of the chassis") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal field_list = ['description', 'extra', 'uuid'] fields = dict((k, v) for (k, v) in vars(parsed_args).items() if k in field_list and not (v is None)) fields = utils.args_array_to_dict(fields, 'extra') chassis = baremetal_client.chassis.create(**fields)._info chassis.pop('links', None) chassis.pop('nodes', None) return self.dict2columns(chassis) class DeleteBaremetalChassis(command.Command): """Delete a chassis.""" log = logging.getLogger(__name__ + ".DeleteBaremetalChassis") def get_parser(self, prog_name): parser = super(DeleteBaremetalChassis, self).get_parser(prog_name) parser.add_argument( "chassis", metavar="", nargs="+", help=_("UUIDs of chassis to delete") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal failures = [] for chassis in parsed_args.chassis: try: baremetal_client.chassis.delete(chassis) print(_('Deleted chassis %s') % chassis) except exc.ClientException as e: failures.append(_("Failed to delete chassis %(chassis)s: " "%(error)s") % {'chassis': chassis, 'error': e}) if failures: raise exc.ClientException("\n".join(failures)) class ListBaremetalChassis(command.Lister): """List the chassis.""" log = logging.getLogger(__name__ + ".ListBaremetalChassis") def get_parser(self, prog_name): parser = super(ListBaremetalChassis, self).get_parser(prog_name) display_group = parser.add_mutually_exclusive_group(required=False) display_group.add_argument( '--fields', nargs='+', dest='fields', metavar='', action='append', default=[], choices=res_fields.CHASSIS_DETAILED_RESOURCE.fields, help=_("One or more chassis fields. Only these fields will be " "fetched from the server. Cannot be used when '--long' is " "specified.") ) parser.add_argument( '--limit', metavar='', type=int, help=_('Maximum number of chassis to return per request, ' '0 for no limit. Default is the maximum number used ' 'by the Baremetal API Service.') ) display_group.add_argument( '--long', default=False, action='store_true', help=_("Show detailed information about the chassis") ) parser.add_argument( '--marker', metavar='', help=_('Chassis UUID (for example, of the last chassis in the ' 'list from a previous request). Returns the list of ' 'chassis after this UUID.') ) parser.add_argument( '--sort', metavar="[:]", help=_('Sort output by specified chassis fields and directions ' '(asc or desc) (default: asc). Multiple fields and ' 'directions can be specified, separated by comma.') ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) client = self.app.client_manager.baremetal columns = res_fields.CHASSIS_RESOURCE.fields labels = res_fields.CHASSIS_RESOURCE.labels params = {} if parsed_args.limit is not None and parsed_args.limit < 0: raise exc.CommandError( _('Expected non-negative --limit, got %s') % parsed_args.limit) params['limit'] = parsed_args.limit params['marker'] = parsed_args.marker if parsed_args.long: params['detail'] = parsed_args.long columns = res_fields.CHASSIS_DETAILED_RESOURCE.fields labels = res_fields.CHASSIS_DETAILED_RESOURCE.labels elif parsed_args.fields: params['detail'] = False fields = itertools.chain.from_iterable(parsed_args.fields) resource = res_fields.Resource(list(fields)) columns = resource.fields labels = resource.labels params['fields'] = columns self.log.debug("params(%s)", params) data = client.chassis.list(**params) data = oscutils.sort_items(data, parsed_args.sort) return (labels, (oscutils.get_item_properties(s, columns, formatters={ 'Properties': oscutils.format_dict},) for s in data)) class SetBaremetalChassis(command.Command): """Set chassis properties.""" log = logging.getLogger(__name__ + ".SetBaremetalChassis") def get_parser(self, prog_name): parser = super(SetBaremetalChassis, self).get_parser(prog_name) parser.add_argument( 'chassis', metavar='', help=_("UUID of the chassis") ) parser.add_argument( "--description", metavar="", help=_("Set the description of the chassis") ) parser.add_argument( "--extra", metavar="", action='append', help=_('Extra to set on this chassis ' '(repeat option to set multiple extras)') ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal properties = [] if parsed_args.description: description = ["description=%s" % parsed_args.description] properties.extend(utils.args_array_to_patch( 'add', description)) if parsed_args.extra: properties.extend(utils.args_array_to_patch( 'add', ['extra/' + x for x in parsed_args.extra])) if properties: baremetal_client.chassis.update(parsed_args.chassis, properties) else: self.log.warning("Please specify what to set.") class ShowBaremetalChassis(command.ShowOne): """Show chassis details.""" log = logging.getLogger(__name__ + ".ShowBaremetalChassis") def get_parser(self, prog_name): parser = super(ShowBaremetalChassis, self).get_parser(prog_name) parser.add_argument( "chassis", metavar="", help=_("UUID of the chassis") ) parser.add_argument( '--fields', nargs='+', dest='fields', metavar='', action='append', choices=res_fields.CHASSIS_DETAILED_RESOURCE.fields, default=[], help=_("One or more chassis fields. Only these fields will be " "fetched from the server.") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal fields = list(itertools.chain.from_iterable(parsed_args.fields)) fields = fields if fields else None chassis = baremetal_client.chassis.get(parsed_args.chassis, fields=fields)._info chassis.pop("links", None) chassis.pop("nodes", None) return zip(*sorted(chassis.items())) class UnsetBaremetalChassis(command.Command): """Unset chassis properties.""" log = logging.getLogger(__name__ + ".UnsetBaremetalChassis") def get_parser(self, prog_name): parser = super(UnsetBaremetalChassis, self).get_parser(prog_name) parser.add_argument( 'chassis', metavar='', help=_("UUID of the chassis") ) parser.add_argument( '--description', action='store_true', default=False, help=_('Clear the chassis description') ) parser.add_argument( "--extra", metavar="", action='append', help=_('Extra to unset on this chassis ' '(repeat option to unset multiple extras)') ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal properties = [] if parsed_args.description: properties.extend(utils.args_array_to_patch('remove', ['description'])) if parsed_args.extra: properties.extend(utils.args_array_to_patch('remove', ['extra/' + x for x in parsed_args.extra])) if properties: baremetal_client.chassis.update(parsed_args.chassis, properties) else: self.log.warning("Please specify what to unset.") python-ironicclient-4.1.0/ironicclient/osc/v1/baremetal_portgroup.py0000664000175000017500000004200513643706361025774 0ustar zuulzuul00000000000000# # Copyright 2016 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # import itertools import logging from osc_lib.command import command from osc_lib import utils as oscutils from ironicclient.common.i18n import _ from ironicclient.common import utils from ironicclient import exc from ironicclient.v1 import resource_fields as res_fields class CreateBaremetalPortGroup(command.ShowOne): """Create a new baremetal port group.""" log = logging.getLogger(__name__ + ".CreateBaremetalPortGroup") def get_parser(self, prog_name): parser = super(CreateBaremetalPortGroup, self).get_parser(prog_name) parser.add_argument( '--node', dest='node_uuid', metavar='', required=True, help=_('UUID of the node that this port group belongs to.')) parser.add_argument( '--address', metavar='', help=_('MAC address for this port group.')) parser.add_argument( '--name', dest='name', help=_('Name of the port group.')) parser.add_argument( '--uuid', dest='uuid', help=_('UUID of the port group.')) parser.add_argument( '--extra', metavar="", action='append', help=_("Record arbitrary key/value metadata. " "Can be specified multiple times.")) parser.add_argument( '--mode', help=_('Mode of the port group. For possible values, refer to ' 'https://www.kernel.org/doc/Documentation/networking' '/bonding.txt.')) parser.add_argument( '--property', dest='properties', metavar="", action='append', help=_("Key/value property related to this port group's " "configuration. Can be specified multiple times.")) standalone_ports_group = parser.add_mutually_exclusive_group() standalone_ports_group.add_argument( '--support-standalone-ports', action='store_true', help=_("Ports that are members of this port group " "can be used as stand-alone ports. (default)")) standalone_ports_group.add_argument( '--unsupport-standalone-ports', action='store_true', help=_("Ports that are members of this port group " "cannot be used as stand-alone ports.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal field_list = ['node_uuid', 'address', 'name', 'uuid', 'extra', 'mode', 'properties'] fields = dict((k, v) for (k, v) in vars(parsed_args).items() if k in field_list and v is not None) if parsed_args.support_standalone_ports: fields['standalone_ports_supported'] = True if parsed_args.unsupport_standalone_ports: fields['standalone_ports_supported'] = False fields = utils.args_array_to_dict(fields, 'extra') fields = utils.args_array_to_dict(fields, 'properties') portgroup = baremetal_client.portgroup.create(**fields) data = dict([(f, getattr(portgroup, f, '')) for f in res_fields.PORTGROUP_DETAILED_RESOURCE.fields]) return self.dict2columns(data) class ShowBaremetalPortGroup(command.ShowOne): """Show baremetal port group details.""" log = logging.getLogger(__name__ + ".ShowBaremetalPortGroup") def get_parser(self, prog_name): parser = super(ShowBaremetalPortGroup, self).get_parser(prog_name) parser.add_argument( "portgroup", metavar="", help=_("UUID or name of the port group " "(or MAC address if --address is specified).")) parser.add_argument( '--address', dest='address', action='store_true', default=False, help=_(' is the MAC address (instead of UUID or name) ' 'of the port group.')) parser.add_argument( '--fields', nargs='+', dest='fields', metavar='', action='append', choices=res_fields.PORTGROUP_DETAILED_RESOURCE.fields, default=[], help=_("One or more port group fields. Only these fields will be " "fetched from the server.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal fields = list(itertools.chain.from_iterable(parsed_args.fields)) fields = fields if fields else None if parsed_args.address: portgroup = baremetal_client.portgroup.get_by_address( parsed_args.portgroup, fields=fields)._info else: portgroup = baremetal_client.portgroup.get( parsed_args.portgroup, fields=fields)._info portgroup.pop("links", None) portgroup.pop("ports", None) return zip(*sorted(portgroup.items())) class ListBaremetalPortGroup(command.Lister): """List baremetal port groups.""" log = logging.getLogger(__name__ + ".ListBaremetalPortGroup") def get_parser(self, prog_name): parser = super(ListBaremetalPortGroup, self).get_parser(prog_name) parser.add_argument( '--limit', metavar='', type=int, help=_('Maximum number of port groups to return per request, ' '0 for no limit. Default is the maximum number used ' 'by the Baremetal API Service.')) parser.add_argument( '--marker', metavar='', help=_('Port group UUID (for example, of the last port group in ' 'the list from a previous request). Returns the list of ' 'port groups after this UUID.')) parser.add_argument( '--sort', metavar="[:]", help=_('Sort output by specified port group fields and directions ' '(asc or desc) (default: asc). Multiple fields and ' 'directions can be specified, separated by comma.')) parser.add_argument( '--address', metavar='', help=_("Only show information for the port group with this MAC " "address.")) parser.add_argument( '--node', dest='node', metavar='', help=_("Only list port groups of this node (name or UUID).")) display_group = parser.add_mutually_exclusive_group(required=False) display_group.add_argument( '--long', default=False, dest='detail', help=_("Show detailed information about the port groups."), action='store_true') display_group.add_argument( '--fields', nargs='+', dest='fields', metavar='', action='append', default=[], choices=res_fields.PORTGROUP_DETAILED_RESOURCE.fields, help=_("One or more port group fields. Only these fields will be " "fetched from the server. Can not be used when '--long' is " "specified.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) client = self.app.client_manager.baremetal columns = res_fields.PORTGROUP_RESOURCE.fields labels = res_fields.PORTGROUP_RESOURCE.labels params = {} if parsed_args.limit is not None and parsed_args.limit < 0: raise exc.CommandError( _('Expected non-negative --limit, got %s') % parsed_args.limit) params['limit'] = parsed_args.limit params['marker'] = parsed_args.marker if parsed_args.address is not None: params['address'] = parsed_args.address if parsed_args.node is not None: params['node'] = parsed_args.node if parsed_args.detail: params['detail'] = parsed_args.detail columns = res_fields.PORTGROUP_DETAILED_RESOURCE.fields labels = res_fields.PORTGROUP_DETAILED_RESOURCE.labels elif parsed_args.fields: params['detail'] = False fields = itertools.chain.from_iterable(parsed_args.fields) resource = res_fields.Resource(list(fields)) columns = resource.fields labels = resource.labels params['fields'] = columns self.log.debug("params(%s)", params) data = client.portgroup.list(**params) data = oscutils.sort_items(data, parsed_args.sort) return (labels, (oscutils.get_item_properties(s, columns, formatters={ 'Properties': oscutils.format_dict},) for s in data)) class DeleteBaremetalPortGroup(command.Command): """Unregister baremetal port group(s).""" log = logging.getLogger(__name__ + ".DeleteBaremetalPortGroup") def get_parser(self, prog_name): parser = super(DeleteBaremetalPortGroup, self).get_parser(prog_name) parser.add_argument( "portgroups", metavar="", nargs="+", help=_("Port group(s) to delete (name or UUID).")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal failures = [] for portgroup in parsed_args.portgroups: try: baremetal_client.portgroup.delete(portgroup) print(_('Deleted port group %s') % portgroup) except exc.ClientException as e: failures.append(_("Failed to delete port group %(portgroup)s: " " %(error)s") % {'portgroup': portgroup, 'error': e}) if failures: raise exc.ClientException("\n".join(failures)) class SetBaremetalPortGroup(command.Command): """Set baremetal port group properties.""" log = logging.getLogger(__name__ + ".SetBaremetalPortGroup") def get_parser(self, prog_name): parser = super(SetBaremetalPortGroup, self).get_parser(prog_name) parser.add_argument( 'portgroup', metavar='', help=_("Name or UUID of the port group."), ) parser.add_argument( '--node', dest='node_uuid', metavar='', help=_('Update UUID of the node that this port group belongs to.') ) parser.add_argument( "--address", metavar="", help=_("MAC address for this port group."), ) parser.add_argument( "--name", metavar="", help=_("Name of the port group."), ) parser.add_argument( "--extra", metavar="", action='append', help=_('Extra to set on this baremetal port group ' '(repeat option to set multiple extras).'), ) parser.add_argument( '--mode', help=_('Mode of the port group. For possible values, refer to ' 'https://www.kernel.org/doc/Documentation/networking' '/bonding.txt.')) parser.add_argument( '--property', dest='properties', metavar="", action='append', help=_("Key/value property related to this port group's " "configuration (repeat option to set multiple " "properties).")) standalone_ports_group = parser.add_mutually_exclusive_group() standalone_ports_group.add_argument( '--support-standalone-ports', action='store_true', default=None, help=_("Ports that are members of this port group " "can be used as stand-alone ports.") ) standalone_ports_group.add_argument( '--unsupport-standalone-ports', action='store_true', help=_("Ports that are members of this port group " "cannot be used as stand-alone ports.") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal properties = [] if parsed_args.node_uuid: properties.extend(utils.args_array_to_patch( 'add', ["node_uuid=%s" % parsed_args.node_uuid])) if parsed_args.address: properties.extend(utils.args_array_to_patch( 'add', ["address=%s" % parsed_args.address])) if parsed_args.name: name = ["name=%s" % parsed_args.name] properties.extend(utils.args_array_to_patch( 'add', name)) if parsed_args.support_standalone_ports: properties.extend(utils.args_array_to_patch( 'add', ["standalone_ports_supported=True"])) if parsed_args.unsupport_standalone_ports: properties.extend(utils.args_array_to_patch( 'add', ["standalone_ports_supported=False"])) if parsed_args.mode: properties.extend(utils.args_array_to_patch( 'add', ["mode=\"%s\"" % parsed_args.mode])) if parsed_args.extra: properties.extend(utils.args_array_to_patch( 'add', ['extra/' + x for x in parsed_args.extra])) if parsed_args.properties: properties.extend(utils.args_array_to_patch( 'add', ['properties/' + x for x in parsed_args.properties])) if properties: baremetal_client.portgroup.update(parsed_args.portgroup, properties) else: self.log.warning("Please specify what to set.") class UnsetBaremetalPortGroup(command.Command): """Unset baremetal port group properties.""" log = logging.getLogger(__name__ + ".UnsetBaremetalPortGroup") def get_parser(self, prog_name): parser = super(UnsetBaremetalPortGroup, self).get_parser(prog_name) parser.add_argument( 'portgroup', metavar='', help=_("Name or UUID of the port group.") ) parser.add_argument( "--name", action='store_true', help=_("Unset the name of the port group."), ) parser.add_argument( "--address", action='store_true', help=_("Unset the address of the port group."), ) parser.add_argument( "--extra", metavar="", action='append', help=_('Extra to unset on this baremetal port group ' '(repeat option to unset multiple extras).'), ) parser.add_argument( "--property", dest='properties', metavar="", action='append', help=_('Property to unset on this baremetal port group ' '(repeat option to unset multiple properties).'), ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal properties = [] if parsed_args.name: properties.extend(utils.args_array_to_patch('remove', ['name'])) if parsed_args.address: properties.extend(utils.args_array_to_patch('remove', ['address'])) if parsed_args.extra: properties.extend(utils.args_array_to_patch('remove', ['extra/' + x for x in parsed_args.extra])) if parsed_args.properties: properties.extend(utils.args_array_to_patch( 'remove', ['properties/' + x for x in parsed_args.properties])) if properties: baremetal_client.portgroup.update(parsed_args.portgroup, properties) else: self.log.warning("Please specify what to unset.") python-ironicclient-4.1.0/ironicclient/osc/v1/baremetal_port.py0000664000175000017500000004566213643706361024733 0ustar zuulzuul00000000000000# # Copyright 2015 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # import itertools import logging from osc_lib.command import command from osc_lib import utils as oscutils from ironicclient.common.i18n import _ from ironicclient.common import utils from ironicclient import exc from ironicclient.v1 import resource_fields as res_fields class CreateBaremetalPort(command.ShowOne): """Create a new port""" log = logging.getLogger(__name__ + ".CreateBaremetalPort") def get_parser(self, prog_name): parser = super(CreateBaremetalPort, self).get_parser(prog_name) parser.add_argument( 'address', metavar='
', help=_('MAC address for this port.') ) parser.add_argument( '--node', dest='node_uuid', metavar='', required=True, help=_('UUID of the node that this port belongs to.') ) parser.add_argument( '--uuid', dest='uuid', metavar='', help=_('UUID of the port.')) parser.add_argument( '--extra', metavar="", action='append', help=_("Record arbitrary key/value metadata. " "Argument can be specified multiple times.") ) parser.add_argument( '--local-link-connection', metavar="", action='append', help=_("Key/value metadata describing Local link connection " "information. Valid keys are 'switch_info', 'switch_id', " "'port_id' and 'hostname'. The keys 'switch_id' and " "'port_id' are required. In case of a Smart NIC port, " "the required keys are 'port_id' and 'hostname'. " "Argument can be specified multiple times.") ) parser.add_argument( '-l', dest='local_link_connection_deprecated', metavar="", action='append', help=_("DEPRECATED. Please use --local-link-connection instead. " "Key/value metadata describing Local link connection " "information. Valid keys are 'switch_info', 'switch_id', " "and 'port_id'. The keys 'switch_id' and 'port_id' are " "required. Can be specified multiple times.") ) parser.add_argument( '--pxe-enabled', metavar='', help=_('Indicates whether this Port should be used when ' 'PXE booting this Node.') ) parser.add_argument( '--port-group', dest='portgroup_uuid', metavar='', help=_("UUID of the port group that this port belongs to.")) parser.add_argument( '--physical-network', dest='physical_network', metavar='', help=_("Name of the physical network to which this port is " "connected.")) parser.add_argument( '--is-smartnic', dest='is_smartnic', action='store_true', help=_("Indicates whether this Port is a Smart NIC port")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal if parsed_args.local_link_connection_deprecated: self.log.warning("Please use --local-link-connection instead " "of -l, as it is deprecated and will be " "removed in future releases.") # It is parsed to either None, or to an array if parsed_args.local_link_connection: parsed_args.local_link_connection.extend( parsed_args.local_link_connection_deprecated) else: parsed_args.local_link_connection = ( parsed_args.local_link_connection_deprecated) field_list = ['address', 'uuid', 'extra', 'node_uuid', 'pxe_enabled', 'local_link_connection', 'portgroup_uuid', 'physical_network'] fields = dict((k, v) for (k, v) in vars(parsed_args).items() if k in field_list and v is not None) fields = utils.args_array_to_dict(fields, 'extra') fields = utils.args_array_to_dict(fields, 'local_link_connection') if parsed_args.is_smartnic: fields['is_smartnic'] = parsed_args.is_smartnic port = baremetal_client.port.create(**fields) data = dict([(f, getattr(port, f, '')) for f in res_fields.PORT_DETAILED_RESOURCE.fields]) return self.dict2columns(data) class ShowBaremetalPort(command.ShowOne): """Show baremetal port details.""" log = logging.getLogger(__name__ + ".ShowBaremetalPort") def get_parser(self, prog_name): parser = super(ShowBaremetalPort, self).get_parser(prog_name) parser.add_argument( "port", metavar="", help=_("UUID of the port (or MAC address if --address is " "specified).") ) parser.add_argument( '--address', dest='address', action='store_true', default=False, help=_(' is the MAC address (instead of the UUID) of the ' 'port.') ) parser.add_argument( '--fields', nargs='+', dest='fields', metavar='', action='append', choices=res_fields.PORT_DETAILED_RESOURCE.fields, default=[], help=_("One or more port fields. Only these fields will be " "fetched from the server.") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal fields = list(itertools.chain.from_iterable(parsed_args.fields)) fields = fields if fields else None if parsed_args.address: port = baremetal_client.port.get_by_address( parsed_args.port, fields=fields)._info else: port = baremetal_client.port.get( parsed_args.port, fields=fields)._info port.pop("links", None) return zip(*sorted(port.items())) class UnsetBaremetalPort(command.Command): """Unset baremetal port properties.""" log = logging.getLogger(__name__ + ".UnsetBaremetalPort") def get_parser(self, prog_name): parser = super(UnsetBaremetalPort, self).get_parser(prog_name) parser.add_argument( 'port', metavar='', help=_("UUID of the port.") ) parser.add_argument( "--extra", metavar="", action='append', help=_('Extra to unset on this baremetal port ' '(repeat option to unset multiple extras)') ) parser.add_argument( '--port-group', action='store_true', dest='portgroup', help=_("Remove port from the port group")) parser.add_argument( '--physical-network', action='store_true', dest='physical_network', help=_("Unset the physical network on this baremetal port.")) parser.add_argument( '--is-smartnic', dest='is_smartnic', action='store_true', help=_("Set Port as not Smart NIC port")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal properties = [] if parsed_args.extra: properties.extend(utils.args_array_to_patch( 'remove', ['extra/' + x for x in parsed_args.extra])) if parsed_args.portgroup: properties.extend(utils.args_array_to_patch('remove', ['portgroup_uuid'])) if parsed_args.physical_network: properties.extend(utils.args_array_to_patch('remove', ['physical_network'])) if parsed_args.is_smartnic: properties.extend(utils.args_array_to_patch( 'add', ["is_smartnic=False"])) if properties: baremetal_client.port.update(parsed_args.port, properties) else: self.log.warning("Please specify what to unset.") class SetBaremetalPort(command.Command): """Set baremetal port properties.""" log = logging.getLogger(__name__ + ".SetBaremetalPort") def get_parser(self, prog_name): parser = super(SetBaremetalPort, self).get_parser(prog_name) parser.add_argument( 'port', metavar='', help=_("UUID of the port") ) parser.add_argument( '--node', dest='node_uuid', metavar='', help=_('Set UUID of the node that this port belongs to') ) parser.add_argument( "--address", metavar="
", dest='address', help=_("Set MAC address for this port") ) parser.add_argument( "--extra", metavar="", action='append', help=_('Extra to set on this baremetal port ' '(repeat option to set multiple extras)') ) parser.add_argument( "--port-group", metavar="", dest='portgroup_uuid', help=_('Set UUID of the port group that this port belongs to.')) parser.add_argument( "--local-link-connection", metavar="", action='append', help=_("Key/value metadata describing local link connection " "information. Valid keys are 'switch_info', 'switch_id', " "'port_id' and 'hostname'. The keys 'switch_id' and " "'port_id' are required. In case of a Smart NIC port, " "the required keys are 'port_id' and 'hostname'. " "Argument can be specified multiple times.") ) pxe_enabled_group = parser.add_mutually_exclusive_group(required=False) pxe_enabled_group.add_argument( "--pxe-enabled", dest='pxe_enabled', default=None, action='store_true', help=_("Indicates that this port should be used when " "PXE booting this node (default)") ) pxe_enabled_group.add_argument( "--pxe-disabled", dest='pxe_enabled', default=None, action='store_false', help=_("Indicates that this port should not be used when " "PXE booting this node") ) parser.add_argument( '--physical-network', metavar='', dest='physical_network', help=_("Set the name of the physical network to which this port " "is connected.")) parser.add_argument( '--is-smartnic', dest='is_smartnic', action='store_true', help=_("Set port to be Smart NIC port")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal properties = [] if parsed_args.node_uuid: node_uuid = ["node_uuid=%s" % parsed_args.node_uuid] properties.extend(utils.args_array_to_patch( 'add', node_uuid)) if parsed_args.address: address = ["address=%s" % parsed_args.address] properties.extend(utils.args_array_to_patch('add', address)) if parsed_args.extra: properties.extend(utils.args_array_to_patch( 'add', ['extra/' + x for x in parsed_args.extra])) if parsed_args.portgroup_uuid: portgroup_uuid = ["portgroup_uuid=%s" % parsed_args.portgroup_uuid] properties.extend(utils.args_array_to_patch('add', portgroup_uuid)) if parsed_args.local_link_connection: properties.extend(utils.args_array_to_patch( 'add', ['local_link_connection/' + x for x in parsed_args.local_link_connection])) if parsed_args.pxe_enabled is not None: properties.extend(utils.args_array_to_patch( 'add', ['pxe_enabled=%s' % parsed_args.pxe_enabled])) if parsed_args.physical_network: physical_network = ["physical_network=%s" % parsed_args.physical_network] properties.extend(utils.args_array_to_patch('add', physical_network)) if parsed_args.is_smartnic: is_smartnic = ["is_smartnic=%s" % parsed_args.is_smartnic] properties.extend(utils.args_array_to_patch('add', is_smartnic)) if properties: baremetal_client.port.update(parsed_args.port, properties) else: self.log.warning("Please specify what to set.") class DeleteBaremetalPort(command.Command): """Delete port(s).""" log = logging.getLogger(__name__ + ".DeleteBaremetalPort") def get_parser(self, prog_name): parser = super(DeleteBaremetalPort, self).get_parser(prog_name) parser.add_argument( "ports", metavar="", nargs="+", help=_("UUID(s) of the port(s) to delete.") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal failures = [] for port in parsed_args.ports: try: baremetal_client.port.delete(port) print(_('Deleted port %s') % port) except exc.ClientException as e: failures.append(_("Failed to delete port %(port)s: %(error)s") % {'port': port, 'error': e}) if failures: raise exc.ClientException("\n".join(failures)) class ListBaremetalPort(command.Lister): """List baremetal ports.""" log = logging.getLogger(__name__ + ".ListBaremetalPort") def get_parser(self, prog_name): parser = super(ListBaremetalPort, self).get_parser(prog_name) parser.add_argument( '--address', dest='address', metavar='', help=_("Only show information for the port with this MAC address.") ) parser.add_argument( '--node', dest='node', metavar='', help=_("Only list ports of this node (name or UUID).") ) parser.add_argument( "--port-group", metavar="", dest='portgroup', help=_('Only list ports of this port group (name or UUID).')) parser.add_argument( '--limit', metavar='', type=int, help=_('Maximum number of ports to return per request, ' '0 for no limit. Default is the maximum number used ' 'by the Baremetal API Service.') ) parser.add_argument( '--marker', metavar='', help=_('Port UUID (for example, of the last port in the list ' 'from a previous request). Returns the list of ports ' 'after this UUID.') ) parser.add_argument( '--sort', metavar="[:]", help=_('Sort output by specified port fields and directions ' '(asc or desc) (default: asc). Multiple fields and ' 'directions can be specified, separated by comma.') ) display_group = parser.add_mutually_exclusive_group() display_group.add_argument( '--long', dest='detail', action='store_true', default=False, help=_("Show detailed information about ports.") ) display_group.add_argument( '--fields', nargs='+', dest='fields', metavar='', action='append', default=[], choices=res_fields.PORT_DETAILED_RESOURCE.fields, help=_("One or more port fields. Only these fields will be " "fetched from the server. Can not be used when " "'--long' is specified.") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) client = self.app.client_manager.baremetal columns = res_fields.PORT_RESOURCE.fields labels = res_fields.PORT_RESOURCE.labels params = {} if parsed_args.limit is not None and parsed_args.limit < 0: raise exc.CommandError( _('Expected non-negative --limit, got %s') % parsed_args.limit) params['limit'] = parsed_args.limit params['marker'] = parsed_args.marker if parsed_args.address is not None: params['address'] = parsed_args.address if parsed_args.node is not None: params['node'] = parsed_args.node if parsed_args.portgroup is not None: params['portgroup'] = parsed_args.portgroup if parsed_args.detail: params['detail'] = parsed_args.detail columns = res_fields.PORT_DETAILED_RESOURCE.fields labels = res_fields.PORT_DETAILED_RESOURCE.labels elif parsed_args.fields: params['detail'] = False fields = itertools.chain.from_iterable(parsed_args.fields) resource = res_fields.Resource(list(fields)) columns = resource.fields labels = resource.labels params['fields'] = columns self.log.debug("params(%s)", params) data = client.port.list(**params) data = oscutils.sort_items(data, parsed_args.sort) return (labels, (oscutils.get_item_properties(s, columns, formatters={ 'extra': oscutils.format_dict},) for s in data)) python-ironicclient-4.1.0/ironicclient/osc/v1/baremetal_allocation.py0000664000175000017500000003352713643706361026071 0ustar zuulzuul00000000000000# 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 itertools import logging from osc_lib.command import command from osc_lib import utils as oscutils from ironicclient.common.i18n import _ from ironicclient.common import utils from ironicclient import exc from ironicclient.v1 import resource_fields as res_fields class CreateBaremetalAllocation(command.ShowOne): """Create a new baremetal allocation.""" log = logging.getLogger(__name__ + ".CreateBaremetalAllocation") def get_parser(self, prog_name): parser = super(CreateBaremetalAllocation, self).get_parser(prog_name) parser.add_argument( '--resource-class', dest='resource_class', help=_('Resource class to request.')) parser.add_argument( '--trait', action='append', dest='traits', help=_('A trait to request. Can be specified multiple times.')) parser.add_argument( '--candidate-node', action='append', dest='candidate_nodes', help=_('A candidate node for this allocation. Can be specified ' 'multiple times. If at least one is specified, only the ' 'provided candidate nodes are considered for the ' 'allocation.')) parser.add_argument( '--name', dest='name', help=_('Unique name of the allocation.')) parser.add_argument( '--uuid', dest='uuid', help=_('UUID of the allocation.')) parser.add_argument( '--owner', dest='owner', help=_('Owner of the allocation.')) parser.add_argument( '--extra', metavar="", action='append', help=_("Record arbitrary key/value metadata. " "Can be specified multiple times.")) parser.add_argument( '--wait', type=int, dest='wait_timeout', default=None, metavar='', const=0, nargs='?', help=_("Wait for the new allocation to become active. An error " "is returned if allocation fails and --wait is used. " "Optionally takes a timeout value (in seconds). The " "default value is 0, meaning it will wait indefinitely.")) parser.add_argument( '--node', help=_("Backfill this allocation from the provided node that has " "already been deployed. Bypasses the normal allocation " "process.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal if not parsed_args.node and not parsed_args.resource_class: raise exc.ClientException( _('--resource-class is required except when --node is used')) field_list = ['name', 'uuid', 'extra', 'resource_class', 'traits', 'candidate_nodes', 'node', 'owner'] fields = dict((k, v) for (k, v) in vars(parsed_args).items() if k in field_list and v is not None) fields = utils.args_array_to_dict(fields, 'extra') allocation = baremetal_client.allocation.create(**fields) if parsed_args.wait_timeout is not None: allocation = baremetal_client.allocation.wait( allocation.uuid, timeout=parsed_args.wait_timeout) data = dict([(f, getattr(allocation, f, '')) for f in res_fields.ALLOCATION_DETAILED_RESOURCE.fields]) return self.dict2columns(data) class ShowBaremetalAllocation(command.ShowOne): """Show baremetal allocation details.""" log = logging.getLogger(__name__ + ".ShowBaremetalAllocation") def get_parser(self, prog_name): parser = super(ShowBaremetalAllocation, self).get_parser(prog_name) parser.add_argument( "allocation", metavar="", help=_("UUID or name of the allocation")) parser.add_argument( '--fields', nargs='+', dest='fields', metavar='', action='append', choices=res_fields.ALLOCATION_DETAILED_RESOURCE.fields, default=[], help=_("One or more allocation fields. Only these fields will be " "fetched from the server.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal fields = list(itertools.chain.from_iterable(parsed_args.fields)) fields = fields if fields else None allocation = baremetal_client.allocation.get( parsed_args.allocation, fields=fields)._info allocation.pop("links", None) return zip(*sorted(allocation.items())) class ListBaremetalAllocation(command.Lister): """List baremetal allocations.""" log = logging.getLogger(__name__ + ".ListBaremetalAllocation") def get_parser(self, prog_name): parser = super(ListBaremetalAllocation, self).get_parser(prog_name) parser.add_argument( '--limit', metavar='', type=int, help=_('Maximum number of allocations to return per request, ' '0 for no limit. Default is the maximum number used ' 'by the Baremetal API Service.')) parser.add_argument( '--marker', metavar='', help=_('Allocation UUID (for example, of the last allocation in ' 'the list from a previous request). Returns the list of ' 'allocations after this UUID.')) parser.add_argument( '--sort', metavar="[:]", help=_('Sort output by specified allocation fields and directions ' '(asc or desc) (default: asc). Multiple fields and ' 'directions can be specified, separated by comma.')) parser.add_argument( '--node', metavar='', help=_("Only list allocations of this node (name or UUID).")) parser.add_argument( '--resource-class', metavar='', help=_("Only list allocations with this resource class.")) parser.add_argument( '--state', metavar='', help=_("Only list allocations in this state.")) parser.add_argument( '--owner', metavar='', help=_("Only list allocations with this owner.")) # NOTE(dtantsur): the allocation API does not expose the 'detail' flag, # but some fields are inconvenient to display in a table, so we emulate # it on the client side. display_group = parser.add_mutually_exclusive_group(required=False) display_group.add_argument( '--long', default=False, help=_("Show detailed information about the allocations."), action='store_true') display_group.add_argument( '--fields', nargs='+', dest='fields', metavar='', action='append', default=[], choices=res_fields.ALLOCATION_DETAILED_RESOURCE.fields, help=_("One or more allocation fields. Only these fields will be " "fetched from the server. Can not be used when '--long' " "is specified.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) client = self.app.client_manager.baremetal params = {} if parsed_args.limit is not None and parsed_args.limit < 0: raise exc.CommandError( _('Expected non-negative --limit, got %s') % parsed_args.limit) params['limit'] = parsed_args.limit params['marker'] = parsed_args.marker for field in ('node', 'resource_class', 'state', 'owner'): value = getattr(parsed_args, field) if value is not None: params[field] = value if parsed_args.long: columns = res_fields.ALLOCATION_DETAILED_RESOURCE.fields labels = res_fields.ALLOCATION_DETAILED_RESOURCE.labels elif parsed_args.fields: fields = itertools.chain.from_iterable(parsed_args.fields) resource = res_fields.Resource(list(fields)) columns = resource.fields labels = resource.labels params['fields'] = columns else: columns = res_fields.ALLOCATION_RESOURCE.fields labels = res_fields.ALLOCATION_RESOURCE.labels self.log.debug("params(%s)", params) data = client.allocation.list(**params) data = oscutils.sort_items(data, parsed_args.sort) return (labels, (oscutils.get_item_properties(s, columns) for s in data)) class DeleteBaremetalAllocation(command.Command): """Unregister baremetal allocation(s).""" log = logging.getLogger(__name__ + ".DeleteBaremetalAllocation") def get_parser(self, prog_name): parser = super(DeleteBaremetalAllocation, self).get_parser(prog_name) parser.add_argument( "allocations", metavar="", nargs="+", help=_("Allocations(s) to delete (name or UUID).")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal failures = [] for allocation in parsed_args.allocations: try: baremetal_client.allocation.delete(allocation) print(_('Deleted allocation %s') % allocation) except exc.ClientException as e: failures.append(_("Failed to delete allocation " "%(allocation)s: %(error)s") % {'allocation': allocation, 'error': e}) if failures: raise exc.ClientException("\n".join(failures)) class SetBaremetalAllocation(command.Command): """Set baremetal allocation properties.""" log = logging.getLogger(__name__ + ".SetBaremetalAllocation") def get_parser(self, prog_name): parser = super(SetBaremetalAllocation, self).get_parser(prog_name) parser.add_argument( "allocation", metavar="", help=_("Name or UUID of the allocation") ) parser.add_argument( "--name", metavar="", help=_("Set the name of the allocation") ) parser.add_argument( "--extra", metavar="", action="append", help=_("Extra property to set on this allocation " "(repeat option to set multiple extra properties)") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal properties = [] if parsed_args.name: properties.extend(utils.args_array_to_patch( 'add', ["name=%s" % parsed_args.name])) if parsed_args.extra: properties.extend(utils.args_array_to_patch( 'add', ["extra/" + x for x in parsed_args.extra])) if properties: baremetal_client.allocation.update( parsed_args.allocation, properties) else: self.log.warning("Please specify what to set.") class UnsetBaremetalAllocation(command.Command): """Unset baremetal allocation properties.""" log = logging.getLogger(__name__ + ".UnsetBaremetalAllocation") def get_parser(self, prog_name): parser = super(UnsetBaremetalAllocation, self).get_parser( prog_name) parser.add_argument( "allocation", metavar="", help=_("Name or UUID of the allocation") ) parser.add_argument( "--name", action="store_true", default=False, help=_("Unset the name of the allocation") ) parser.add_argument( "--extra", metavar="", action='append', help=_('Extra property to unset on this baremetal allocation ' '(repeat option to unset multiple extra property).'), ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal properties = [] if parsed_args.name: properties.extend(utils.args_array_to_patch('remove', ['name'])) if parsed_args.extra: properties.extend(utils.args_array_to_patch('remove', ['extra/' + x for x in parsed_args.extra])) if properties: baremetal_client.allocation.update(parsed_args.allocation, properties) else: self.log.warning("Please specify what to unset.") python-ironicclient-4.1.0/ironicclient/osc/v1/baremetal_driver.py0000664000175000017500000001760613643706361025237 0ustar zuulzuul00000000000000# Copyright (c) 2016 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # import logging from osc_lib.command import command from osc_lib import utils as oscutils from ironicclient.common.i18n import _ from ironicclient.common import utils from ironicclient.v1 import resource_fields as res_fields from ironicclient.v1 import utils as v1_utils class ListBaremetalDriver(command.Lister): """List the enabled drivers.""" log = logging.getLogger(__name__ + ".ListBaremetalDriver") def get_parser(self, prog_name): parser = super(ListBaremetalDriver, self).get_parser(prog_name) parser.add_argument( '--type', metavar='', choices=["classic", "dynamic"], help='Type of driver ("classic" or "dynamic"). ' 'The default is to list all of them.' ) parser.add_argument( '--long', action='store_true', default=None, help="Show detailed information about the drivers.") return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) client = self.app.client_manager.baremetal params = {'driver_type': parsed_args.type, 'detail': parsed_args.long} if parsed_args.long: labels = res_fields.DRIVER_DETAILED_RESOURCE.labels columns = res_fields.DRIVER_DETAILED_RESOURCE.fields else: labels = res_fields.DRIVER_RESOURCE.labels columns = res_fields.DRIVER_RESOURCE.fields drivers = client.driver.list(**params) drivers = oscutils.sort_items(drivers, 'name') # For list-type properties, show the values as comma separated # strings. It's easier to read. data = [utils.convert_list_props_to_comma_separated(d._info) for d in drivers] return (labels, (oscutils.get_dict_properties(s, columns) for s in data)) class ListBaremetalDriverProperty(command.Lister): """List the driver properties.""" log = logging.getLogger(__name__ + ".ListBaremetalDriverProperty") def get_parser(self, prog_name): parser = super(ListBaremetalDriverProperty, self).get_parser(prog_name) parser.add_argument( 'driver', metavar='', help='Name of the driver.') return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal driver_properties = baremetal_client.driver.properties( parsed_args.driver) labels = ['Property', 'Description'] return labels, sorted(driver_properties.items()) class ListBaremetalDriverRaidProperty(command.Lister): """List a driver's RAID logical disk properties.""" log = logging.getLogger(__name__ + ".ListBaremetalDriverRaidProperty") def get_parser(self, prog_name): parser = super(ListBaremetalDriverRaidProperty, self).get_parser( prog_name) parser.add_argument( 'driver', metavar='', help='Name of the driver.') return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal raid_props = baremetal_client.driver.raid_logical_disk_properties( parsed_args.driver) labels = ['Property', 'Description'] return labels, sorted(raid_props.items()) class PassthruCallBaremetalDriver(command.ShowOne): """Call a vendor passthru method for a driver.""" log = logging.getLogger(__name__ + ".PassthruCallBaremetalDriver") def get_parser(self, prog_name): parser = super(PassthruCallBaremetalDriver, self).get_parser(prog_name) parser.add_argument( 'driver', metavar='', help=_('Name of the driver.') ) parser.add_argument( 'method', metavar='', help=_("Vendor passthru method to be called.") ) parser.add_argument( '--arg', metavar='', action='append', help=_("Argument to pass to the passthru method (repeat option " "to specify multiple arguments).") ) parser.add_argument( '--http-method', dest='http_method', metavar='', choices=v1_utils.HTTP_METHODS, default='POST', help=_("The HTTP method to use in the passthru request. One of " "%s. Defaults to 'POST'.") % oscutils.format_list(v1_utils.HTTP_METHODS) ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal arguments = utils.key_value_pairs_to_dict(parsed_args.arg) response = (baremetal_client.driver. vendor_passthru(parsed_args.driver, parsed_args.method, http_method=parsed_args.http_method, args=arguments)) return self.dict2columns(response) class PassthruListBaremetalDriver(command.Lister): """List available vendor passthru methods for a driver.""" log = logging.getLogger(__name__ + ".PassthruListBaremetalDriver") def get_parser(self, prog_name): parser = super(PassthruListBaremetalDriver, self).get_parser(prog_name) parser.add_argument( 'driver', metavar='', help=_('Name of the driver.')) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal columns = res_fields.VENDOR_PASSTHRU_METHOD_RESOURCE.fields labels = res_fields.VENDOR_PASSTHRU_METHOD_RESOURCE.labels methods = baremetal_client.driver.get_vendor_passthru_methods( parsed_args.driver) params = [] for method, response in methods.items(): response['name'] = method http_methods = ', '.join(response['http_methods']) response['http_methods'] = http_methods params.append(response) return (labels, (oscutils.get_dict_properties(s, columns) for s in params)) class ShowBaremetalDriver(command.ShowOne): """Show information about a driver.""" log = logging.getLogger(__name__ + ".ShowBaremetalDriver") def get_parser(self, prog_name): parser = super(ShowBaremetalDriver, self).get_parser(prog_name) parser.add_argument( 'driver', metavar='', help=_('Name of the driver.')) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal driver = baremetal_client.driver.get(parsed_args.driver)._info driver.pop("links", None) driver.pop("properties", None) # For list-type properties, show the values as comma separated # strings. It's easier to read. driver = utils.convert_list_props_to_comma_separated(driver) return zip(*sorted(driver.items())) python-ironicclient-4.1.0/ironicclient/osc/v1/baremetal_conductor.py0000775000175000017500000001255613643706361025746 0ustar zuulzuul00000000000000# # Copyright 2015 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # import itertools import logging from osc_lib.command import command from osc_lib import utils as oscutils from ironicclient.common.i18n import _ from ironicclient import exc from ironicclient.v1 import resource_fields as res_fields class ListBaremetalConductor(command.Lister): """List baremetal conductors""" log = logging.getLogger(__name__ + ".ListBaremetalNode") def get_parser(self, prog_name): parser = super(ListBaremetalConductor, self).get_parser(prog_name) parser.add_argument( '--limit', metavar='', type=int, help=_('Maximum number of conductors to return per request, ' '0 for no limit. Default is the maximum number used ' 'by the Baremetal API Service.') ) parser.add_argument( '--marker', metavar='', help=_('Hostname of the conductor (for example, of the last ' 'conductor in the list from a previous request). Returns ' 'the list of conductors after this conductor.') ) parser.add_argument( '--sort', metavar="[:]", help=_('Sort output by specified conductor fields and directions ' '(asc or desc) (default: asc). Multiple fields and ' 'directions can be specified, separated by comma.'), ) display_group = parser.add_mutually_exclusive_group(required=False) display_group.add_argument( '--long', default=False, help=_("Show detailed information about the conductors."), action='store_true') display_group.add_argument( '--fields', nargs='+', dest='fields', metavar='', action='append', default=[], choices=res_fields.CONDUCTOR_DETAILED_RESOURCE.fields, help=_("One or more conductor fields. Only these fields will be " "fetched from the server. Can not be used when '--long' " "is specified.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) client = self.app.client_manager.baremetal columns = res_fields.CONDUCTOR_RESOURCE.fields labels = res_fields.CONDUCTOR_RESOURCE.labels params = {} if parsed_args.limit is not None and parsed_args.limit < 0: raise exc.CommandError( _('Expected non-negative --limit, got %s') % parsed_args.limit) params['limit'] = parsed_args.limit params['marker'] = parsed_args.marker if parsed_args.long: params['detail'] = parsed_args.long columns = res_fields.CONDUCTOR_DETAILED_RESOURCE.fields labels = res_fields.CONDUCTOR_DETAILED_RESOURCE.labels elif parsed_args.fields: params['detail'] = False fields = itertools.chain.from_iterable(parsed_args.fields) resource = res_fields.Resource(list(fields)) columns = resource.fields labels = resource.labels params['fields'] = columns self.log.debug("params(%s)", params) data = client.conductor.list(**params) data = oscutils.sort_items(data, parsed_args.sort) return (labels, (oscutils.get_item_properties(s, columns, formatters={ 'Properties': oscutils.format_dict},) for s in data)) class ShowBaremetalConductor(command.ShowOne): """Show baremetal conductor details""" log = logging.getLogger(__name__ + ".ShowBaremetalConductor") def get_parser(self, prog_name): parser = super(ShowBaremetalConductor, self).get_parser(prog_name) parser.add_argument( "conductor", metavar="", help=_("Hostname of the conductor")) parser.add_argument( '--fields', nargs='+', dest='fields', metavar='', action='append', choices=res_fields.CONDUCTOR_DETAILED_RESOURCE.fields, default=[], help=_("One or more conductor fields. Only these fields will be " "fetched from the server.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal fields = list(itertools.chain.from_iterable(parsed_args.fields)) fields = fields if fields else None conductor = baremetal_client.conductor.get( parsed_args.conductor, fields=fields)._info conductor.pop("links", None) return self.dict2columns(conductor) python-ironicclient-4.1.0/ironicclient/osc/v1/baremetal_node.py0000775000175000017500000020565013643706361024672 0ustar zuulzuul00000000000000# # Copyright 2015 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # import argparse import itertools import json import logging from osc_lib.command import command from osc_lib import utils as oscutils from ironicclient.common.i18n import _ from ironicclient.common import utils from ironicclient import exc from ironicclient.v1 import resource_fields as res_fields from ironicclient.v1 import utils as v1_utils CONFIG_DRIVE_ARG_HELP = _( "A gzipped, base64-encoded configuration drive string OR " "the path to the configuration drive file OR the path to a " "directory containing the config drive files OR a JSON object to build " "config drive from. In case it's a directory, a config drive will be " "generated from it. In case it's a JSON object with optional keys " "`meta_data`, `user_data` and `network_data`, a config drive will " "be generated on the server side (see the bare metal API reference for " "more details).") SUPPORTED_INTERFACES = ['bios', 'boot', 'console', 'deploy', 'inspect', 'management', 'network', 'power', 'raid', 'rescue', 'storage', 'vendor'] class ProvisionStateBaremetalNode(command.Command): """Base provision state class""" log = logging.getLogger(__name__ + ".ProvisionStateBaremetalNode") def get_parser(self, prog_name): parser = super(ProvisionStateBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node.") ) parser.add_argument( '--provision-state', default=self.PROVISION_STATE, required=False, choices=[self.PROVISION_STATE], help=argparse.SUPPRESS) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal clean_steps = getattr(parsed_args, 'clean_steps', None) clean_steps = utils.handle_json_arg(clean_steps, 'clean steps') config_drive = getattr(parsed_args, 'config_drive', None) if config_drive: try: config_drive_dict = json.loads(config_drive) except (ValueError, TypeError): pass else: if isinstance(config_drive_dict, dict): config_drive = config_drive_dict rescue_password = getattr(parsed_args, 'rescue_password', None) baremetal_client.node.set_provision_state( parsed_args.node, parsed_args.provision_state, configdrive=config_drive, cleansteps=clean_steps, rescue_password=rescue_password) class ProvisionStateWithWait(ProvisionStateBaremetalNode): """Provision state class adding --wait flag.""" log = logging.getLogger(__name__ + ".ProvisionStateWithWait") def get_parser(self, prog_name): parser = super(ProvisionStateWithWait, self).get_parser(prog_name) desired_state = v1_utils.PROVISION_ACTIONS.get( self.PROVISION_STATE)['expected_state'] parser.add_argument( '--wait', type=int, dest='wait_timeout', default=None, metavar='', const=0, nargs='?', help=_("Wait for a node to reach the desired state, %(state)s. " "Optionally takes a timeout value (in seconds). The " "default value is 0, meaning it will wait indefinitely.") % {'state': desired_state}) return parser def take_action(self, parsed_args): super(ProvisionStateWithWait, self).take_action(parsed_args) self.log.debug("take_action(%s)", parsed_args) if (parsed_args.wait_timeout is None): return baremetal_client = self.app.client_manager.baremetal wait_args = v1_utils.PROVISION_ACTIONS.get( parsed_args.provision_state) if wait_args is None: # This should never happen in reality, but checking just in case raise exc.CommandError( _("'--wait is not supported for provision state '%s'") % parsed_args.provision_state) print(_('Waiting for provision state %(state)s on node %(node)s') % {'state': wait_args['expected_state'], 'node': parsed_args.node}) baremetal_client.node.wait_for_provision_state( parsed_args.node, timeout=parsed_args.wait_timeout, **wait_args) class AbortBaremetalNode(ProvisionStateBaremetalNode): """Set provision state of baremetal node to 'abort'""" log = logging.getLogger(__name__ + ".AbortBaremetalNode") PROVISION_STATE = 'abort' class AdoptBaremetalNode(ProvisionStateWithWait): """Set provision state of baremetal node to 'adopt'""" log = logging.getLogger(__name__ + ".AdoptBaremetalNode") PROVISION_STATE = 'adopt' class BootdeviceSetBaremetalNode(command.Command): """Set the boot device for a node""" log = logging.getLogger(__name__ + ".BootdeviceSetBaremetalNode") def get_parser(self, prog_name): parser = super(BootdeviceSetBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node") ) parser.add_argument( 'device', metavar='', choices=v1_utils.BOOT_DEVICES, help=_("One of %s") % (oscutils.format_list(v1_utils.BOOT_DEVICES)) ) parser.add_argument( '--persistent', dest='persistent', action='store_true', default=False, help=_("Make changes persistent for all future boots") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal baremetal_client.node.set_boot_device( parsed_args.node, parsed_args.device, parsed_args.persistent) class BootdeviceShowBaremetalNode(command.ShowOne): """Show the boot device information for a node""" log = logging.getLogger(__name__ + ".BootdeviceShowBaremetalNode") def get_parser(self, prog_name): parser = super(BootdeviceShowBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node") ) parser.add_argument( '--supported', dest='supported', action='store_true', default=False, help=_("Show the supported boot devices") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal if parsed_args.supported: info = baremetal_client.node.get_supported_boot_devices( parsed_args.node) boot_device_list = info.get('supported_boot_devices', []) info['supported_boot_devices'] = ', '.join(boot_device_list) else: info = baremetal_client.node.get_boot_device(parsed_args.node) return zip(*sorted(info.items())) class CleanBaremetalNode(ProvisionStateWithWait): """Set provision state of baremetal node to 'clean'""" log = logging.getLogger(__name__ + ".CleanBaremetalNode") PROVISION_STATE = 'clean' def get_parser(self, prog_name): parser = super(CleanBaremetalNode, self).get_parser(prog_name) parser.add_argument( '--clean-steps', metavar='', required=True, default=None, help=_("The clean steps in JSON format. May be the path to a file " "containing the clean steps; OR '-', with the clean steps " "being read from standard input; OR a string. The value " "should be a list of clean-step dictionaries; each " "dictionary should have keys 'interface' and 'step', and " "optional key 'args'.")) return parser class ConsoleDisableBaremetalNode(command.Command): """Disable console access for a node""" log = logging.getLogger(__name__ + ".ConsoleDisableBaremetalNode") def get_parser(self, prog_name): parser = super(ConsoleDisableBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal baremetal_client.node.set_console_mode(parsed_args.node, False) class ConsoleEnableBaremetalNode(command.Command): """Enable console access for a node""" log = logging.getLogger(__name__ + ".ConsoleEnableBaremetalNode") def get_parser(self, prog_name): parser = super(ConsoleEnableBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal baremetal_client.node.set_console_mode(parsed_args.node, True) class ConsoleShowBaremetalNode(command.ShowOne): """Show console information for a node""" log = logging.getLogger(__name__ + ".ConsoleShowBaremetalNode") def get_parser(self, prog_name): parser = super(ConsoleShowBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal info = baremetal_client.node.get_console(parsed_args.node) return zip(*sorted(info.items())) class CreateBaremetalNode(command.ShowOne): """Register a new node with the baremetal service""" log = logging.getLogger(__name__ + ".CreateBaremetalNode") def get_parser(self, prog_name): parser = super(CreateBaremetalNode, self).get_parser(prog_name) parser.add_argument( '--chassis-uuid', dest='chassis_uuid', metavar='', help=_('UUID of the chassis that this node belongs to.')) parser.add_argument( '--driver', metavar='', required=True, help=_('Driver used to control the node [REQUIRED].')) parser.add_argument( '--driver-info', metavar='', action='append', help=_('Key/value pair used by the driver, such as out-of-band ' 'management credentials. Can be specified multiple times.')) parser.add_argument( '--property', dest='properties', metavar='', action='append', help=_('Key/value pair describing the physical characteristics of ' 'the node. This is exported to Nova and used by the ' 'scheduler. Can be specified multiple times.')) parser.add_argument( '--extra', metavar='', action='append', help=_("Record arbitrary key/value metadata. " "Can be specified multiple times.")) parser.add_argument( '--uuid', metavar='', help=_("Unique UUID for the node.")) parser.add_argument( '--name', metavar='', help=_("Unique name for the node.")) parser.add_argument( '--bios-interface', metavar='', help=_('BIOS interface used by the node\'s driver. This is ' 'only applicable when the specified --driver is a ' 'hardware type.')) parser.add_argument( '--boot-interface', metavar='', help=_('Boot interface used by the node\'s driver. This is ' 'only applicable when the specified --driver is a ' 'hardware type.')) parser.add_argument( '--console-interface', metavar='', help=_('Console interface used by the node\'s driver. This is ' 'only applicable when the specified --driver is a ' 'hardware type.')) parser.add_argument( '--deploy-interface', metavar='', help=_('Deploy interface used by the node\'s driver. This is ' 'only applicable when the specified --driver is a ' 'hardware type.')) parser.add_argument( '--inspect-interface', metavar='', help=_('Inspect interface used by the node\'s driver. This is ' 'only applicable when the specified --driver is a ' 'hardware type.')) parser.add_argument( '--management-interface', metavar='', help=_('Management interface used by the node\'s driver. This is ' 'only applicable when the specified --driver is a ' 'hardware type.')) parser.add_argument( '--network-interface', metavar='', help=_('Network interface used for switching node to ' 'cleaning/provisioning networks.')) parser.add_argument( '--power-interface', metavar='', help=_('Power interface used by the node\'s driver. This is ' 'only applicable when the specified --driver is a ' 'hardware type.')) parser.add_argument( '--raid-interface', metavar='', help=_('RAID interface used by the node\'s driver. This is ' 'only applicable when the specified --driver is a ' 'hardware type.')) parser.add_argument( '--rescue-interface', metavar='', help=_('Rescue interface used by the node\'s driver. This is ' 'only applicable when the specified --driver is a ' 'hardware type.')) parser.add_argument( '--storage-interface', metavar='', help=_('Storage interface used by the node\'s driver.')) parser.add_argument( '--vendor-interface', metavar='', help=_('Vendor interface used by the node\'s driver. This is ' 'only applicable when the specified --driver is a ' 'hardware type.')) parser.add_argument( '--resource-class', metavar='', help=_('Resource class for mapping nodes to Nova flavors')) parser.add_argument( '--conductor-group', metavar='', help=_('Conductor group the node will belong to')) parser.add_argument( '--automated-clean', action='store_true', default=None, help=_('Enable automated cleaning for the node')) parser.add_argument( '--owner', metavar='', help=_('Owner of the node.')) parser.add_argument( '--lessee', metavar='', help=_('Lessee of the node.')) parser.add_argument( '--description', metavar='', help=_("Description for the node.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal field_list = ['automated_clean', 'chassis_uuid', 'driver', 'driver_info', 'properties', 'extra', 'uuid', 'name', 'conductor_group', 'owner', 'description', 'lessee', 'resource_class'] + ['%s_interface' % iface for iface in SUPPORTED_INTERFACES] fields = dict((k, v) for (k, v) in vars(parsed_args).items() if k in field_list and not (v is None)) fields = utils.args_array_to_dict(fields, 'driver_info') fields = utils.args_array_to_dict(fields, 'extra') fields = utils.args_array_to_dict(fields, 'properties') node = baremetal_client.node.create(**fields)._info node.pop('links', None) node.pop('ports', None) node.pop('portgroups', None) node.pop('states', None) node.pop('volume', None) node.setdefault('chassis_uuid', '') return self.dict2columns(node) class DeleteBaremetalNode(command.Command): """Unregister baremetal node(s)""" log = logging.getLogger(__name__ + ".DeleteBaremetalNode") def get_parser(self, prog_name): parser = super(DeleteBaremetalNode, self).get_parser(prog_name) parser.add_argument( "nodes", metavar="", nargs="+", help=_("Node(s) to delete (name or UUID)")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal failures = [] for node in parsed_args.nodes: try: baremetal_client.node.delete(node) print(_('Deleted node %s') % node) except exc.ClientException as e: failures.append(_("Failed to delete node %(node)s: %(error)s") % {'node': node, 'error': e}) if failures: raise exc.ClientException("\n".join(failures)) class DeployBaremetalNode(ProvisionStateWithWait): """Set provision state of baremetal node to 'deploy'""" log = logging.getLogger(__name__ + ".DeployBaremetalNode") PROVISION_STATE = 'active' def get_parser(self, prog_name): parser = super(DeployBaremetalNode, self).get_parser(prog_name) parser.add_argument( '--config-drive', metavar='', default=None, help=CONFIG_DRIVE_ARG_HELP) return parser class InspectBaremetalNode(ProvisionStateWithWait): """Set provision state of baremetal node to 'inspect'""" log = logging.getLogger(__name__ + ".InspectBaremetalNode") PROVISION_STATE = 'inspect' class ListBaremetalNode(command.Lister): """List baremetal nodes""" log = logging.getLogger(__name__ + ".ListBaremetalNode") PROVISION_STATES = ['active', 'deleted', 'rebuild', 'inspect', 'provide', 'manage', 'clean', 'adopt', 'abort'] def get_parser(self, prog_name): parser = super(ListBaremetalNode, self).get_parser(prog_name) parser.add_argument( '--limit', metavar='', type=int, help=_('Maximum number of nodes to return per request, ' '0 for no limit. Default is the maximum number used ' 'by the Baremetal API Service.') ) parser.add_argument( '--marker', metavar='', help=_('Node UUID (for example, of the last node in the list from ' 'a previous request). Returns the list of nodes after this ' 'UUID.') ) parser.add_argument( '--sort', metavar="[:]", help=_('Sort output by specified node fields and directions ' '(asc or desc) (default: asc). Multiple fields and ' 'directions can be specified, separated by comma.'), ) maint_group = parser.add_mutually_exclusive_group(required=False) maint_group.add_argument( '--maintenance', dest='maintenance', action='store_true', default=None, help=_("Limit list to nodes in maintenance mode"), ) maint_group.add_argument( '--no-maintenance', dest='maintenance', action='store_false', default=None, help=_("Limit list to nodes not in maintenance mode"), ) retired_group = parser.add_mutually_exclusive_group(required=False) retired_group.add_argument( '--retired', dest='retired', action='store_true', default=None, help=_("Limit list to retired nodes.") ) retired_group.add_argument( '--no-retired', dest='retired', action='store_false', default=None, help=_("Limit list to not retired nodes.") ) parser.add_argument( '--fault', dest='fault', metavar='', help=_("List nodes in specified fault.")) associated_group = parser.add_mutually_exclusive_group() associated_group.add_argument( '--associated', action='store_true', help=_("List only nodes associated with an instance."), ) associated_group.add_argument( '--unassociated', action='store_true', help=_('List only nodes not associated with an instance.'), ) parser.add_argument( '--provision-state', dest='provision_state', metavar='', help=_("List nodes in specified provision state.")) parser.add_argument( '--driver', dest='driver', metavar='', help=_("Limit list to nodes with driver ")) parser.add_argument( '--resource-class', dest='resource_class', metavar='', help=_("Limit list to nodes with resource class ")) parser.add_argument( '--conductor-group', metavar='', help=_("Limit list to nodes with conductor group ")) parser.add_argument( '--conductor', metavar='', help=_("Limit list to nodes with conductor ")) parser.add_argument( '--chassis', dest='chassis', metavar='', help=_("Limit list to nodes of this chassis")) parser.add_argument( '--owner', metavar='', help=_("Limit list to nodes with owner " "")) parser.add_argument( '--lessee', metavar='', help=_("Limit list to nodes with lessee " "")) parser.add_argument( '--description-contains', metavar='', help=_("Limit list to nodes with description contains " "")) display_group = parser.add_mutually_exclusive_group(required=False) display_group.add_argument( '--long', default=False, help=_("Show detailed information about the nodes."), action='store_true') display_group.add_argument( '--fields', nargs='+', dest='fields', metavar='', action='append', default=[], choices=res_fields.NODE_DETAILED_RESOURCE.fields, help=_("One or more node fields. Only these fields will be " "fetched from the server. Can not be used when '--long' " "is specified.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) client = self.app.client_manager.baremetal columns = res_fields.NODE_RESOURCE.fields labels = res_fields.NODE_RESOURCE.labels params = {} if parsed_args.limit is not None and parsed_args.limit < 0: raise exc.CommandError( _('Expected non-negative --limit, got %s') % parsed_args.limit) params['limit'] = parsed_args.limit params['marker'] = parsed_args.marker if parsed_args.associated: params['associated'] = True if parsed_args.unassociated: params['associated'] = False for field in ['maintenance', 'fault', 'conductor_group', 'retired']: if getattr(parsed_args, field) is not None: params[field] = getattr(parsed_args, field) for field in ['provision_state', 'driver', 'resource_class', 'chassis', 'conductor', 'owner', 'lessee', 'description_contains']: if getattr(parsed_args, field): params[field] = getattr(parsed_args, field) if parsed_args.long: params['detail'] = parsed_args.long columns = res_fields.NODE_DETAILED_RESOURCE.fields labels = res_fields.NODE_DETAILED_RESOURCE.labels elif parsed_args.fields: params['detail'] = False fields = itertools.chain.from_iterable(parsed_args.fields) resource = res_fields.Resource(list(fields)) columns = resource.fields labels = resource.labels params['fields'] = columns self.log.debug("params(%s)", params) data = client.node.list(**params) data = oscutils.sort_items(data, parsed_args.sort) return (labels, (oscutils.get_item_properties(s, columns, formatters={ 'Properties': oscutils.format_dict},) for s in data)) class MaintenanceSetBaremetalNode(command.Command): """Set baremetal node to maintenance mode""" log = logging.getLogger(__name__ + ".MaintenanceSetBaremetalNode") def get_parser(self, prog_name): parser = super(MaintenanceSetBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node.") ) parser.add_argument( '--reason', metavar='', default=None, help=_("Reason for setting maintenance mode.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal baremetal_client.node.set_maintenance( parsed_args.node, True, maint_reason=parsed_args.reason) class MaintenanceUnsetBaremetalNode(command.Command): """Unset baremetal node from maintenance mode""" log = logging.getLogger(__name__ + ".MaintenanceUnsetBaremetalNode") def get_parser(self, prog_name): parser = super(MaintenanceUnsetBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node.") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal baremetal_client.node.set_maintenance( parsed_args.node, False) class ManageBaremetalNode(ProvisionStateWithWait): """Set provision state of baremetal node to 'manage'""" log = logging.getLogger(__name__ + ".ManageBaremetalNode") PROVISION_STATE = 'manage' class PassthruCallBaremetalNode(command.Command): """Call a vendor passthu method for a node""" log = logging.getLogger(__name__ + ".PassthuCallBaremetalNode") def get_parser(self, prog_name): parser = super(PassthruCallBaremetalNode, self).get_parser( prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node") ) parser.add_argument( 'method', metavar='', help=_("Vendor passthru method to be executed") ) parser.add_argument( '--arg', metavar='', action='append', help=_("Argument to pass to the passthru method (repeat option " "to specify multiple arguments)") ) parser.add_argument( '--http-method', metavar='', choices=v1_utils.HTTP_METHODS, default='POST', help=(_("The HTTP method to use in the passthru request. One of " "%s. Defaults to POST.") % oscutils.format_list(v1_utils.HTTP_METHODS)) ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal arguments = utils.key_value_pairs_to_dict(parsed_args.arg) resp = baremetal_client.node.vendor_passthru( parsed_args.node, parsed_args.method, http_method=parsed_args.http_method, args=arguments) if resp: # Print the raw response; we don't know how it should be formatted print(str(resp.to_dict())) class PassthruListBaremetalNode(command.Lister): """List vendor passthru methods for a node""" log = logging.getLogger(__name__ + ".PassthruListBaremetalNode") def get_parser(self, prog_name): parser = super(PassthruListBaremetalNode, self).get_parser( prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal methods = baremetal_client.node.get_vendor_passthru_methods( parsed_args.node) data = [] for method, response in methods.items(): response['name'] = method response['http_methods'] = oscutils.format_list( response['http_methods']) data.append(response) return ( res_fields.VENDOR_PASSTHRU_METHOD_RESOURCE.labels, (oscutils.get_dict_properties( s, res_fields.VENDOR_PASSTHRU_METHOD_RESOURCE.fields) for s in data)) class PowerBaremetalNode(command.Command): """Base power state class, for setting the power of a node""" log = logging.getLogger(__name__ + ".PowerBaremetalNode") def get_parser(self, prog_name): parser = super(PowerBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node.") ) parser.add_argument( '--power-timeout', metavar='', default=None, type=int, help=_("Timeout (in seconds, positive integer) to wait for the " "target power state before erroring out.") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal soft = getattr(parsed_args, 'soft', False) baremetal_client.node.set_power_state( parsed_args.node, self.POWER_STATE, soft, timeout=parsed_args.power_timeout) class PowerOffBaremetalNode(PowerBaremetalNode): """Power off a node""" log = logging.getLogger(__name__ + ".PowerOffBaremetalNode") POWER_STATE = 'off' def get_parser(self, prog_name): parser = super(PowerOffBaremetalNode, self).get_parser(prog_name) parser.add_argument( '--soft', dest='soft', action='store_true', default=False, help=_("Request graceful power-off.") ) return parser class PowerOnBaremetalNode(PowerBaremetalNode): """Power on a node""" log = logging.getLogger(__name__ + ".PowerOnBaremetalNode") POWER_STATE = 'on' class ProvideBaremetalNode(ProvisionStateWithWait): """Set provision state of baremetal node to 'provide'""" log = logging.getLogger(__name__ + ".ProvideBaremetalNode") PROVISION_STATE = 'provide' class RebootBaremetalNode(command.Command): """Reboot baremetal node""" log = logging.getLogger(__name__ + ".RebootBaremetalNode") def get_parser(self, prog_name): parser = super(RebootBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node.") ) parser.add_argument( '--soft', dest='soft', action='store_true', default=False, help=_("Request Graceful reboot.") ) parser.add_argument( '--power-timeout', metavar='', default=None, type=int, help=_("Timeout (in seconds, positive integer) to wait for the " "target power state before erroring out.") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal baremetal_client.node.set_power_state( parsed_args.node, 'reboot', parsed_args.soft, timeout=parsed_args.power_timeout) class RebuildBaremetalNode(ProvisionStateWithWait): """Set provision state of baremetal node to 'rebuild'""" log = logging.getLogger(__name__ + ".RebuildBaremetalNode") PROVISION_STATE = 'rebuild' def get_parser(self, prog_name): parser = super(RebuildBaremetalNode, self).get_parser(prog_name) parser.add_argument( '--config-drive', metavar='', default=None, help=CONFIG_DRIVE_ARG_HELP) return parser class RescueBaremetalNode(ProvisionStateWithWait): """Set provision state of baremetal node to 'rescue'""" log = logging.getLogger(__name__ + ".RescueBaremetalNode") PROVISION_STATE = 'rescue' def get_parser(self, prog_name): parser = super(RescueBaremetalNode, self).get_parser(prog_name) parser.add_argument( '--rescue-password', metavar='', required=True, default=None, help=("The password that will be used to login to the rescue " "ramdisk. The value should be a non-empty string.")) return parser class SetBaremetalNode(command.Command): """Set baremetal properties""" log = logging.getLogger(__name__ + ".SetBaremetalNode") def _add_interface_args(self, parser, iface, set_help, reset_help): grp = parser.add_mutually_exclusive_group() grp.add_argument( '--%s-interface' % iface, metavar='<%s_interface>' % iface, help=set_help ) grp.add_argument( '--reset-%s-interface' % iface, action='store_true', help=reset_help ) def get_parser(self, prog_name): parser = super(SetBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node."), ) parser.add_argument( "--instance-uuid", metavar="", help=_("Set instance UUID of node to "), ) parser.add_argument( "--name", metavar="", help=_("Set the name of the node"), ) parser.add_argument( "--chassis-uuid", metavar="", help=_("Set the chassis for the node"), ) parser.add_argument( "--driver", metavar="", help=_("Set the driver for the node"), ) self._add_interface_args( parser, 'bios', set_help=_('Set the BIOS interface for the node'), reset_help=_('Reset the BIOS interface to its hardware type ' 'default'), ) self._add_interface_args( parser, 'boot', set_help=_('Set the boot interface for the node'), reset_help=_('Reset the boot interface to its hardware type ' 'default'), ) self._add_interface_args( parser, 'console', set_help=_('Set the console interface for the node'), reset_help=_('Reset the console interface to its hardware type ' 'default'), ) self._add_interface_args( parser, 'deploy', set_help=_('Set the deploy interface for the node'), reset_help=_('Reset the deploy interface to its hardware type ' 'default'), ) self._add_interface_args( parser, 'inspect', set_help=_('Set the inspect interface for the node'), reset_help=_('Reset the inspect interface to its hardware type ' 'default'), ) self._add_interface_args( parser, 'management', set_help=_('Set the management interface for the node'), reset_help=_('Reset the management interface to its hardware type ' 'default'), ) self._add_interface_args( parser, 'network', set_help=_('Set the network interface for the node'), reset_help=_('Reset the network interface to its hardware type ' 'default'), ) self._add_interface_args( parser, 'power', set_help=_('Set the power interface for the node'), reset_help=_('Reset the power interface to its hardware type ' 'default'), ) self._add_interface_args( parser, 'raid', set_help=_('Set the RAID interface for the node'), reset_help=_('Reset the RAID interface to its hardware type ' 'default'), ) self._add_interface_args( parser, 'rescue', set_help=_('Set the rescue interface for the node'), reset_help=_('Reset the rescue interface to its hardware type ' 'default'), ) self._add_interface_args( parser, 'storage', set_help=_('Set the storage interface for the node'), reset_help=_('Reset the storage interface to its hardware type ' 'default'), ) self._add_interface_args( parser, 'vendor', set_help=_('Set the vendor interface for the node'), reset_help=_('Reset the vendor interface to its hardware type ' 'default'), ) parser.add_argument( '--reset-interfaces', action='store_true', default=None, help=_('Reset all interfaces not specified explicitly to their ' 'default implementations. Only valid with --driver.'), ) parser.add_argument( '--resource-class', metavar='', help=_('Set the resource class for the node'), ) parser.add_argument( '--conductor-group', metavar='', help=_('Set the conductor group for the node'), ) parser.add_argument( '--automated-clean', action='store_true', help=_('Enable automated cleaning for the node'), ) parser.add_argument( '--protected', action='store_true', help=_('Mark the node as protected'), ) parser.add_argument( '--protected-reason', metavar='', help=_('Set the reason of marking the node as protected'), ) parser.add_argument( '--retired', action='store_true', help=_('Mark the node as retired'), ) parser.add_argument( '--retired-reason', metavar='', help=_('Set the reason of marking the node as retired'), ) parser.add_argument( '--target-raid-config', metavar='', help=_('Set the target RAID configuration (JSON) for the node. ' 'This can be one of: 1. a file containing JSON data of the ' 'RAID configuration; 2. "-" to read the contents from ' 'standard input; or 3. a valid JSON string.'), ) parser.add_argument( "--property", metavar="", action='append', help=_('Property to set on this baremetal node ' '(repeat option to set multiple properties)'), ) parser.add_argument( "--extra", metavar="", action='append', help=_('Extra to set on this baremetal node ' '(repeat option to set multiple extras)'), ) parser.add_argument( "--driver-info", metavar="", action='append', help=_('Driver information to set on this baremetal node ' '(repeat option to set multiple driver infos)'), ) parser.add_argument( "--instance-info", metavar="", action='append', help=_('Instance information to set on this baremetal node ' '(repeat option to set multiple instance infos)'), ) parser.add_argument( "--owner", metavar='', help=_('Set the owner for the node')), parser.add_argument( "--lessee", metavar='', help=_('Set the lessee for the node')), parser.add_argument( "--description", metavar='', help=_('Set the description for the node'), ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal # NOTE(rloo): Do this before updating the rest. Otherwise, it won't # work if parsed_args.node is the name and the name is # also being modified. if parsed_args.target_raid_config: raid_config = parsed_args.target_raid_config raid_config = utils.handle_json_arg(raid_config, 'target_raid_config') baremetal_client.node.set_target_raid_config(parsed_args.node, raid_config) properties = [] for field in ['automated_clean', 'instance_uuid', 'name', 'chassis_uuid', 'driver', 'resource_class', 'conductor_group', 'protected', 'protected_reason', 'retired', 'retired_reason', 'owner', 'lessee', 'description']: value = getattr(parsed_args, field) if value: properties.extend(utils.args_array_to_patch( 'add', ["%s=%s" % (field, value)])) if parsed_args.reset_interfaces and not parsed_args.driver: raise exc.CommandError( _("--reset-interfaces can only be specified with --driver")) for iface in SUPPORTED_INTERFACES: field = '%s_interface' % iface if getattr(parsed_args, field): properties.extend(utils.args_array_to_patch( 'add', ["%s_interface=%s" % (iface, getattr(parsed_args, field))])) elif getattr(parsed_args, 'reset_%s_interface' % iface): properties.extend(utils.args_array_to_patch( 'remove', ['%s_interface' % iface])) if parsed_args.property: properties.extend(utils.args_array_to_patch( 'add', ['properties/' + x for x in parsed_args.property])) if parsed_args.extra: properties.extend(utils.args_array_to_patch( 'add', ['extra/' + x for x in parsed_args.extra])) if parsed_args.driver_info: properties.extend(utils.args_array_to_patch( 'add', ['driver_info/' + x for x in parsed_args.driver_info])) if parsed_args.instance_info: properties.extend(utils.args_array_to_patch( 'add', ['instance_info/' + x for x in parsed_args.instance_info])) if properties: baremetal_client.node.update( parsed_args.node, properties, reset_interfaces=parsed_args.reset_interfaces) elif not parsed_args.target_raid_config: self.log.warning("Please specify what to set.") class ShowBaremetalNode(command.ShowOne): """Show baremetal node details""" log = logging.getLogger(__name__ + ".ShowBaremetalNode") def get_parser(self, prog_name): parser = super(ShowBaremetalNode, self).get_parser(prog_name) parser.add_argument( "node", metavar="", help=_("Name or UUID of the node (or instance UUID if --instance " "is specified)")) parser.add_argument( '--instance', dest='instance_uuid', action='store_true', default=False, help=_(' is an instance UUID.')) parser.add_argument( '--fields', nargs='+', dest='fields', metavar='', action='append', choices=res_fields.NODE_DETAILED_RESOURCE.fields, default=[], help=_("One or more node fields. Only these fields will be " "fetched from the server.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal fields = list(itertools.chain.from_iterable(parsed_args.fields)) fields = fields if fields else None if parsed_args.instance_uuid: node = baremetal_client.node.get_by_instance_uuid( parsed_args.node, fields=fields)._info else: node = baremetal_client.node.get( parsed_args.node, fields=fields)._info node.pop("links", None) node.pop("ports", None) node.pop('portgroups', None) node.pop('states', None) node.pop('volume', None) if not fields or 'chassis_uuid' in fields: node.setdefault('chassis_uuid', '') return self.dict2columns(node) class UndeployBaremetalNode(ProvisionStateWithWait): """Set provision state of baremetal node to 'deleted'""" log = logging.getLogger(__name__ + ".UndeployBaremetalNode") PROVISION_STATE = 'deleted' class UnrescueBaremetalNode(ProvisionStateWithWait): """Set provision state of baremetal node to 'unrescue'""" log = logging.getLogger(__name__ + ".UnrescueBaremetalNode") PROVISION_STATE = 'unrescue' class UnsetBaremetalNode(command.Command): """Unset baremetal properties""" log = logging.getLogger(__name__ + ".UnsetBaremetalNode") def get_parser(self, prog_name): parser = super(UnsetBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node.") ) parser.add_argument( '--instance-uuid', action='store_true', default=False, help=_('Unset instance UUID on this baremetal node') ) parser.add_argument( "--name", action='store_true', help=_("Unset the name of the node"), ) parser.add_argument( "--resource-class", dest='resource_class', action='store_true', help=_("Unset the resource class of the node"), ) parser.add_argument( "--target-raid-config", action='store_true', help=_("Unset the target RAID configuration of the node"), ) parser.add_argument( '--property', metavar='', action='append', help=_('Property to unset on this baremetal node ' '(repeat option to unset multiple properties)'), ) parser.add_argument( "--extra", metavar="", action='append', help=_('Extra to unset on this baremetal node ' '(repeat option to unset multiple extras)'), ) parser.add_argument( "--driver-info", metavar="", action='append', help=_('Driver information to unset on this baremetal node ' '(repeat option to unset multiple driver informations)'), ) parser.add_argument( "--instance-info", metavar="", action='append', help=_('Instance information to unset on this baremetal node ' '(repeat option to unset multiple instance informations)'), ) parser.add_argument( "--chassis-uuid", dest='chassis_uuid', action='store_true', help=_('Unset chassis UUID on this baremetal node'), ) parser.add_argument( "--bios-interface", dest='bios_interface', action='store_true', help=_('Unset BIOS interface on this baremetal node'), ) parser.add_argument( "--boot-interface", dest='boot_interface', action='store_true', help=_('Unset boot interface on this baremetal node'), ) parser.add_argument( "--console-interface", dest='console_interface', action='store_true', help=_('Unset console interface on this baremetal node'), ) parser.add_argument( "--deploy-interface", dest='deploy_interface', action='store_true', help=_('Unset deploy interface on this baremetal node'), ) parser.add_argument( "--inspect-interface", dest='inspect_interface', action='store_true', help=_('Unset inspect interface on this baremetal node'), ) parser.add_argument( "--management-interface", dest='management_interface', action='store_true', help=_('Unset management interface on this baremetal node'), ) parser.add_argument( "--network-interface", dest='network_interface', action='store_true', help=_('Unset network interface on this baremetal node'), ) parser.add_argument( "--power-interface", dest='power_interface', action='store_true', help=_('Unset power interface on this baremetal node'), ) parser.add_argument( "--raid-interface", dest='raid_interface', action='store_true', help=_('Unset RAID interface on this baremetal node'), ) parser.add_argument( "--rescue-interface", dest='rescue_interface', action='store_true', help=_('Unset rescue interface on this baremetal node'), ) parser.add_argument( "--storage-interface", dest='storage_interface', action='store_true', help=_('Unset storage interface on this baremetal node'), ) parser.add_argument( "--vendor-interface", dest='vendor_interface', action='store_true', help=_('Unset vendor interface on this baremetal node'), ) parser.add_argument( "--conductor-group", action="store_true", help=_('Unset conductor group for this baremetal node (the ' 'default group will be used)'), ) parser.add_argument( "--automated-clean", action="store_true", help=_('Unset automated clean option on this baremetal node ' '(the value from configuration will be used)'), ) parser.add_argument( "--protected", action="store_true", help=_('Unset the protected flag on the node'), ) parser.add_argument( "--protected-reason", action="store_true", help=_('Unset the protected reason (gets unset automatically when ' 'protected is unset)'), ) parser.add_argument( "--retired", action="store_true", help=_('Unset the retired flag on the node'), ) parser.add_argument( "--retired-reason", action="store_true", help=_('Unset the retired reason (gets unset automatically when ' 'retired is unset)'), ) parser.add_argument( "--owner", action="store_true", help=_('Unset the owner field of the node'), ) parser.add_argument( "--lessee", action="store_true", help=_('Unset the lessee field of the node'), ) parser.add_argument( "--description", action="store_true", help=_('Unset the description field of the node'), ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal # NOTE(rloo): Do this before removing the rest. Otherwise, it won't # work if parsed_args.node is the name and the name is # also being removed. if parsed_args.target_raid_config: baremetal_client.node.set_target_raid_config(parsed_args.node, {}) properties = [] for field in ['instance_uuid', 'name', 'chassis_uuid', 'resource_class', 'conductor_group', 'automated_clean', 'bios_interface', 'boot_interface', 'console_interface', 'deploy_interface', 'inspect_interface', 'management_interface', 'network_interface', 'power_interface', 'raid_interface', 'rescue_interface', 'storage_interface', 'vendor_interface', 'protected', 'protected_reason', 'retired', 'retired_reason', 'owner', 'lessee', 'description']: if getattr(parsed_args, field): properties.extend(utils.args_array_to_patch('remove', [field])) if parsed_args.property: properties.extend(utils.args_array_to_patch('remove', ['properties/' + x for x in parsed_args.property])) if parsed_args.extra: properties.extend(utils.args_array_to_patch('remove', ['extra/' + x for x in parsed_args.extra])) if parsed_args.driver_info: properties.extend(utils.args_array_to_patch('remove', ['driver_info/' + x for x in parsed_args.driver_info])) if parsed_args.instance_info: properties.extend(utils.args_array_to_patch('remove', ['instance_info/' + x for x in parsed_args.instance_info])) if properties: baremetal_client.node.update(parsed_args.node, properties) elif not parsed_args.target_raid_config: self.log.warning("Please specify what to unset.") class ValidateBaremetalNode(command.Lister): """Validate a node's driver interfaces""" log = logging.getLogger(__name__ + ".ValidateBaremetalNode") def get_parser(self, prog_name): parser = super(ValidateBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal interfaces = baremetal_client.node.validate(parsed_args.node)._info data = [] for key, value in interfaces.items(): interface = {'interface': key} interface.update(value) data.append(interface) field_labels = ['Interface', 'Result', 'Reason'] fields = ['interface', 'result', 'reason'] data = oscutils.sort_items(data, 'interface') return (field_labels, (oscutils.get_dict_properties(s, fields) for s in data)) class VifListBaremetalNode(command.Lister): """Show attached VIFs for a node""" log = logging.getLogger(__name__ + ".VifListBaremetalNode") def get_parser(self, prog_name): parser = super(VifListBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) columns = res_fields.VIF_RESOURCE.fields labels = res_fields.VIF_RESOURCE.labels baremetal_client = self.app.client_manager.baremetal data = baremetal_client.node.vif_list(parsed_args.node) return (labels, (oscutils.get_item_properties(s, columns) for s in data)) class VifAttachBaremetalNode(command.Command): """Attach VIF to a given node""" log = logging.getLogger(__name__ + ".VifAttachBaremetalNode") def get_parser(self, prog_name): parser = super(VifAttachBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node") ) parser.add_argument( 'vif_id', metavar='', help=_("Name or UUID of the VIF to attach to a node.") ) parser.add_argument( '--vif-info', metavar='', action='append', help=_("Record arbitrary key/value metadata. " "Can be specified multiple times. The mandatory 'id' " "parameter cannot be specified as a key.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal fields = utils.key_value_pairs_to_dict(parsed_args.vif_info or []) baremetal_client.node.vif_attach(parsed_args.node, parsed_args.vif_id, **fields) class VifDetachBaremetalNode(command.Command): """Detach VIF from a given node""" log = logging.getLogger(__name__ + ".VifDetachBaremetalNode") def get_parser(self, prog_name): parser = super(VifDetachBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node") ) parser.add_argument( 'vif_id', metavar='', help=_("Name or UUID of the VIF to detach from a node.") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal baremetal_client.node.vif_detach(parsed_args.node, parsed_args.vif_id) class InjectNmiBaremetalNode(command.Command): """Inject NMI to baremetal node""" log = logging.getLogger(__name__ + ".InjectNmiBaremetalNode") def get_parser(self, prog_name): parser = super(InjectNmiBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node.") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal baremetal_client.node.inject_nmi(parsed_args.node) class ListTraitsBaremetalNode(command.Lister): """List a node's traits.""" log = logging.getLogger(__name__ + ".ListTraitsBaremetalNode") def get_parser(self, prog_name): parser = super(ListTraitsBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) labels = res_fields.TRAIT_RESOURCE.labels baremetal_client = self.app.client_manager.baremetal traits = baremetal_client.node.get_traits(parsed_args.node) return (labels, [[trait] for trait in traits]) class AddTraitBaremetalNode(command.Command): """Add traits to a node.""" log = logging.getLogger(__name__ + ".AddTraitBaremetalNode") def get_parser(self, prog_name): parser = super(AddTraitBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node")) parser.add_argument( 'traits', nargs='+', metavar='', help=_("Trait(s) to add")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal failures = [] for trait in parsed_args.traits: try: baremetal_client.node.add_trait(parsed_args.node, trait) print(_('Added trait %s') % trait) except exc.ClientException as e: failures.append(_("Failed to add trait %(trait)s: %(error)s") % {'trait': trait, 'error': e}) if failures: raise exc.ClientException("\n".join(failures)) class RemoveTraitBaremetalNode(command.Command): """Remove trait(s) from a node.""" log = logging.getLogger(__name__ + ".RemoveTraitBaremetalNode") def get_parser(self, prog_name): parser = super(RemoveTraitBaremetalNode, self).get_parser(prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node")) all_or_trait = parser.add_mutually_exclusive_group(required=True) all_or_trait.add_argument( '--all', dest='remove_all', action='store_true', help=_("Remove all traits")) all_or_trait.add_argument( 'traits', metavar='', nargs='*', default=[], help=_("Trait(s) to remove")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal failures = [] if parsed_args.remove_all: baremetal_client.node.remove_all_traits(parsed_args.node) else: for trait in parsed_args.traits: try: baremetal_client.node.remove_trait(parsed_args.node, trait) print(_('Removed trait %s') % trait) except exc.ClientException as e: failures.append(_("Failed to remove trait %(trait)s: " "%(error)s") % {'trait': trait, 'error': e}) if failures: raise exc.ClientException("\n".join(failures)) class ListBIOSSettingBaremetalNode(command.Lister): """List a node's BIOS settings.""" log = logging.getLogger(__name__ + ".ListBIOSSettingBaremetalNode") def get_parser(self, prog_name): parser = super(ListBIOSSettingBaremetalNode, self).get_parser( prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) labels = res_fields.BIOS_RESOURCE.labels baremetal_client = self.app.client_manager.baremetal settings = baremetal_client.node.list_bios_settings(parsed_args.node) return (labels, [[s['name'], s['value']] for s in settings]) class BIOSSettingShowBaremetalNode(command.ShowOne): """Show a specific BIOS setting for a node.""" log = logging.getLogger(__name__ + ".BIOSSettingShowBaremetalNode") def get_parser(self, prog_name): parser = super(BIOSSettingShowBaremetalNode, self).get_parser( prog_name) parser.add_argument( 'node', metavar='', help=_("Name or UUID of the node") ) parser.add_argument( 'setting_name', metavar='', help=_("Setting name to show") ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal setting = baremetal_client.node.get_bios_setting( parsed_args.node, parsed_args.setting_name) setting.pop("links", None) return self.dict2columns(setting) python-ironicclient-4.1.0/ironicclient/osc/v1/__init__.py0000664000175000017500000000000013643706361023443 0ustar zuulzuul00000000000000python-ironicclient-4.1.0/ironicclient/osc/v1/baremetal_deploy_template.py0000664000175000017500000003016213643706361027123 0ustar zuulzuul00000000000000# 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 itertools import json import logging from osc_lib.command import command from osc_lib import utils as oscutils from ironicclient.common.i18n import _ from ironicclient.common import utils from ironicclient import exc from ironicclient.v1 import resource_fields as res_fields _DEPLOY_STEPS_HELP = _( "The deploy steps in JSON format. May be the path to a file containing " "the deploy steps; OR '-', with the deploy steps being read from standard " "input; OR a string. The value should be a list of deploy-step " "dictionaries; each dictionary should have keys 'interface', 'step', " "'args' and 'priority'.") class CreateBaremetalDeployTemplate(command.ShowOne): """Create a new deploy template""" log = logging.getLogger(__name__ + ".CreateBaremetalDeployTemplate") def get_parser(self, prog_name): parser = super(CreateBaremetalDeployTemplate, self).get_parser( prog_name) parser.add_argument( 'name', metavar='', help=_('Unique name for this deploy template. Must be a valid ' 'trait name') ) parser.add_argument( '--uuid', dest='uuid', metavar='', help=_('UUID of the deploy template.')) parser.add_argument( '--extra', metavar="", action='append', help=_("Record arbitrary key/value metadata. " "Can be specified multiple times.")) parser.add_argument( '--steps', metavar="", required=True, help=_DEPLOY_STEPS_HELP ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal steps = utils.handle_json_arg(parsed_args.steps, 'deploy steps') field_list = ['name', 'uuid', 'extra'] fields = dict((k, v) for (k, v) in vars(parsed_args).items() if k in field_list and v is not None) fields = utils.args_array_to_dict(fields, 'extra') template = baremetal_client.deploy_template.create(steps=steps, **fields) data = dict([(f, getattr(template, f, '')) for f in res_fields.DEPLOY_TEMPLATE_DETAILED_RESOURCE.fields]) return self.dict2columns(data) class ShowBaremetalDeployTemplate(command.ShowOne): """Show baremetal deploy template details.""" log = logging.getLogger(__name__ + ".ShowBaremetalDeployTemplate") def get_parser(self, prog_name): parser = super(ShowBaremetalDeployTemplate, self).get_parser(prog_name) parser.add_argument( "template", metavar="