././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2746649 proliantutils-2.16.0/0000775000175000017500000000000000000000000014534 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/.stestr.conf0000664000175000017500000000010400000000000017000 0ustar00zuulzuul00000000000000[DEFAULT] test_path=${TESTS_DIR:-./proliantutils/tests/} top_dir=./ ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/.zuul.yaml0000664000175000017500000000012600000000000016474 0ustar00zuulzuul00000000000000- project: templates: - openstack-python3-jobs - openstack-cover-jobs ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997949.0 proliantutils-2.16.0/AUTHORS0000664000175000017500000000223100000000000015602 0ustar00zuulzuul00000000000000Anshul Jain Anton Antonov Antony Messerli Anusha Ramineni Aparna AparnaVikraman Debayan Ray Dirk Mueller Dmitry Tantsur Ilya Etingof Jim Mankovich Julia Kreger Mallikarjuna Reddy Kolagatla Mark Goddard Nisha Agarwal Nisha Agarwal Pratyusha Ramakrishnan G Riccardo Pittau Shivanand Tendulker Shivanand Tendulker ankit hpproliant kesper kesper mallikarjuna.kolagatla melissaml mvpnitesh paresh-sao root vmud213 wangqi ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997948.0 proliantutils-2.16.0/ChangeLog0000664000175000017500000003351200000000000016312 0ustar00zuulzuul00000000000000CHANGES ======= 2.16.0 ------ * Adds a retry workaround for power ON failure * Migrate to pysnmp lextudio ecosystem * Update Sushy version to latest * Fixes for tox 4 * Use tests from antelope * Fix etag header test 2.14.0 ------ * Fix create\_csr to create csr with node-uuid as name * Update testing to zed and fix the broken test cases * Fix the method create\_csr * Remove deprecation from create\_csr and add\_https\_certificate 2.13.0 ------ * Making changes to csr and https certificate * Fix test cases for sushy 4.1.0 * Fix few bugs in inspection * Fix virtual media insertion of invalid url * Update testing to yoga 2.12.2 ------ * Update for sushy 4.0.0 2.12.1 ------ * Fix the test cases for latest sushy 2.12.0 ------ * Add support to exclude finger prints of certs * Adding changes for HTTPS Cert 2.11.0 ------ * Adds changes for security\_dasboard clean\_step * Adds more gpu capabilities * Support to clear certificates when no certificates 2.10.0 ------ * Follow-up patch for proliantutils docs * [Redfish] Enhance removing TLS certificates * Adds documentation for proliantutils * Add security dashboard attributes * Adds support for one button secure erase 2.9.5 ----- * [Redfish] Provides APIs to add/remove TLS certificate * Redfish: Adds APIs to support boot from http url * Adds steps 'apply\_configuration' and 'flash\_firmware\_sum' * Enable check import order * Adds py3 to tox environment * Bump hacking to 3.0.0 2.9.4 ----- * Updates mimimum version of sushy in requirements 2.9.3 ----- * Decode output of fru print * The \_op method has changed in sushy 3.10 * Strip whitespace from cookie in firmware update 2.9.2 ----- * Fixes caching of ilo instances to use admin credentials * Fixes testcases that are broken due to change in sushy 2.9.1 ----- * Follow-up patch for UEFI iSCSI boot nic adapter fix * Fixed problem with UEFI iSCSI boot for adapters * Enable session based authentication used by sushy * Fixes the storage capabilities * Cache the IloClient object creation * Updated README file 2.9.0 ----- * Adds support to get disk types * Removes filter on the bios settings * OOB disk-erase for ilo5 based Proliant Servers * iLO firmware update fails with 'update\_firmware\_sum' * Remove checked in copy of the ChangeLog * Changing warning to debug * Switch to the new tox constraints file usage and location * Use six.moves for reloading a module * Add unit tests for python 3.6/3.7 * Remove checked in version of AUTHORS * Finish conversion to stestr * Add a .gitreview file to point to the gerrit instance 2.8.4 ----- * Updates ChangeLog for proliantutils release 2.8.4 * Adding changes for tox failure 2.8.3 ----- * Adding fix for nic\_capacity calculation * jsonschema3.0.1: Uncap jsonschema * Jsonschema 3.0.1: Binds the raid schema to draft-04 2.8.2 ----- * Updates ChangeLog for proliantutils release 2.8.2 * Adding changes to support sushy virtual media 2.8.1 ----- * Updates ChangeLog for proliantutils release 2.8.1 * Revert "Add NIC inspection for Gen9" 2.8.0 ----- * Updates ChangeLog for proliantutils release 2.8.0 * Added support for IPv6 network * Inband disk erase support for SSD disk drives * Add NIC inspection for Gen9 * Use Sushy caching decorators * Adds changes in hpssa validator to support '10','50,'60' raid level 2.7.0 ----- * Change impending version to 2.7.0 (and not 2.6.1) * Update ChangeLog for proliantutils release 2.6.1 * Adds API to get the results of the BIOS settings * Follow-up for commit 0e9f3d1b4620b0ad9ff6370132ba5a8d5f3cc21e * Validates the BIOS settings before applying * Redfish: Adds 'read\_raid\_configuration' API to get current raid config * Fix ssacli output parsing. New untitest for the fixed issue added * Redfish: Adds \`create\_raid\_configuration\` API to create raid 2.6.0 ----- * Update ChangeLog for proliantutils release 2.6.0 * iLO Redfish: Adds support to manage BIOS settings * Redfish: Adds 'delete\_raid\_configuration' API to clear raid * iLO RIS: Add support to manage BIOS settings * Add support for retrieving system POST state * Add support for NMI(Non Maskable Interrupt) * Exclude pysnmp\_mibs from search path 2.5.2 ----- * Updated ChangeLog for proliantutils release 2.5.2 * Make case-insensitive search for Blade server model string * Using assertIsNone() instead of assertEqual(None) * Fixes session issue for Gen10 servers * Minor fix in test case 2.5.1 ----- * Updated ChangeLog for proliantutils release 2.5.1 Also updated the AUTHORS file * Remove the disk erase timeout * Fixes secure\_boot capability 2.5.0 ----- * Updated ChangeLog for proliantutils 2.5.0 release * Retain "mac" argument for backward compatibility * Changes to support Sushy 1.3.0 * Redfish: Adding the ability to get and set iSCSI initiator * Redfish: Adding the ability to set and unset iSCSI boot info * Redfish: Changed 'update\_persistent\_boot' to set 'UefiTarget' boot device. Also removed 'mac' from 'set\_one\_time\_boot' * Remove 'mac' argument for [un]set\_iscsi\_boot\_info() * Changed '\_update\_persistent\_boot' to set 'UefiTarget' boot device also removed 'mac' from 'set\_one\_time\_boot' * Add support to set iSCSI initiator information * Retry power on operation for Blade servers * Updates 'set\_one\_time\_boot' to accept MAC address * Add support to get iscsi initiator information 2.4.1 ----- * Updated ChangeLog for proliantutils 2.4.1 release * Redfish: Adds HPEConnector to proliantutils * Add firmware update support using SUM * Redfish: fix for model number string for Gen9 and above 2.4.0 ----- * Updated ChangeLog for proliantutils 2.4.0 release * Redfish: followup patch for properties * Allow local\_gb to be 0 * Renaming clean step 'update\_firmware' to 'update\_firmware\_sum' * Redfish: Adds drive\_rotational\_\_rpm attribute to server capabilities * Redfish: Adds logical\_raid\_level\_ attributes to server capabilities * Redfish: Add has\_nvme\_ssd to server capabilities * Redfish: Add has\_rotational attribute to server capabilities * Redfish: Add has\_ssd attribute to proliantutils * Redfish: Follow up patch for storage related resources * Redfish: Add local\_gb attribute to get\_essential\_properties * Change server capability 'raid\_support' to 'hardware\_supports\_raid' * Redfish: Adds memory attributes to server capabilities * Redfish: Adds SimpleStorage URI for local\_gb discovery * Redfish: Add the Storage and its related URIs for local\_gb discovery * Add client tests for redfish calls * Redfish: Adds capability to get hardware raid support * Redfish: Adds SmartStorage and its related URIs for local\_gb discovery * Support to get hardware raid support * Discover Storage details * Redfish: Add 'iscsi\_boot' capability * Discover iscsi\_boot attribute * Redfish: Adds test case for 'get\_supported\_boot\_mode' * Redfish: Adds get\_essential\_properties() * Redfish: Adds macs discovery * Redfish: Adds support for boot mode capabilities * Add supported boot modes to server capabilities * Add test cases parity for RIS init * Add cpu virtualisation capability * Redfish: [Fix] Set pending boot mode json payload * Remove sushy manager hack 2.3.1 ----- * Updated ChangeLog for proliantutils 2.3.1 release * Redfish: Adds secure\_boot to server capabilities * Redfish: Add trusted\_boot capability * Redfish: Add the nic\_capacity attributes * Redfish: Adds server capabilities * Redfish: Add secure boot API support * Add 'sriov\_enabled' capability * Redfish: Adds 'reset\_bios\_to\_default' API * Redfish: Add the get\_server\_capabilities() and pci\_gpu\_device attribute * Redfish: Adds 'reset\_ilo\_credential' for redfish systems * Redfish: Follow-up patch for update persistent device * Redfish: Add 'refresh' method for HPEManager * Redfish: Adding the ability to set boot mode and devices * Restructing redfish resource test files * Redfish: Adding the ability to get persistent boot device * Redfish: Adds 'update\_firmware' API support through redfish * Redfish: Add support for Virtual Media Operations * Redfish: Adds 'activate\_license' for redfish systems * Redfish: Adding the ability to get current boot mode * Redfish: Adding the ability to get pending boot mode * Replace assertTrue(isinstance()) with assertIsInstance() * Using assertIsNone() instead of assertEqual(None) * Redfish: Adds manager support for redfish API's 2.3.0 ----- * Change Logs for proliantutils 2.3.0 release * Redfish: Adding the ability to get one time boot * Support to perform erase on all the disks(volumes and drives) * Redfish: Add system push power button operations * Add HPE extensions support to redfish connection lib * Redfish: Add system power operations * Aligning redfish calls to new framework * Support to return logs for hpsum firmware update * Set 'trusted\_boot' capability only when TPM chip is present * Instrumenting redfish into proliantutils' client * Adding capability to check NVDIMM\_N availability * Add support to get cpu virtualization capability * Initial redfish commit * Stop hosting coverage results in htmlcov dir * Separate out rest infra from ris * Refactor ris-rest infrastructure * Add upper-constraints to testenv setup 2.2.1 ----- * Updated ChangeLog for proliantutils 2.2.1 release * Updating requirements.txt based on ironic * [Fix gate] Update pbr requirement * Add HPSUM firmware update support 2.2.0 ----- * Change Log as part of proliantutils 2.2.0 release * Add trusted\_boot to server capabilities * snmp inspection for disk size * Add \`erase\_devices\` into \`get\_clean\_step\` method * Update hpssacli to ssacli * Adds 'UefiTarget' as a boot option * Add Sanitize disk erase support using SSA * Support to disable iscsi boot option in iLO * Change to disable target DHCP in iLO * Add py35 to tox environments 2.1.11 ------ * Change log added for 2.1.11 release * Fix Inspection failure in Gen7 * Adds support in hpssa for SDD interface 'Solid State SATA' * Fix log message for exception in Gen7 * Raise exception when HPSSA controller not available * Add hpssa support only in raid mode * RIBCL calls fails with 'requests' library version 2.11.0 2.1.10 ------ * Change log added for 2.1.10 release * Modify error message of InvalidInputException in hpssa * Adds constructor for InvalidInputError * Fix 'raid\_config' validation error message * Fix to accommodate very quick firmware update 2.1.9 ----- * Change log added for 2.1.9 release * Sort values of raid\_config for 'share\_physical\_disks' * Fix the logic for fetching the gpu device count 2.1.8 ----- * Passing 'process\_input' to the running hpssacli process * Add RIS support for power operations * Adds support in hpssa for SDD interface 'Solid State SAS' * Add proper error message for extraction failure * Modify minimum disk for RAID 0 in hpssa * Add \`.flash\` extn to supported raw firmware files * Adds test coverage in tox.ini * Switch tox unit test command to use ostestr 2.1.7 ----- * Added changelog to account for nic\_capacity changes * Add support to get NIC info for any version 2.1.6 ----- * Added changelog and authors * Changes to NIC info retrieving logic * Support for iLO based firmware update * Reduce logical disk size returned by 1 2.1.5 ----- * Add logging for RIS and RIBCL modules * HPSSA: Support 'MAX' as size\_gb for logical disks * Fix slow test test\_wait\_for\_ilo\_after\_reset\_ribcl\_ok * Fix ribcl to return correct number of processors * Make proliantutils return 1 size less than actual disk size * Providing logging infrastructure in proliantutils 2.1.4 ----- * Fixes tox Warning issue * Fix to allow Secure Boot API calls only in UEFI boot mode 2.1.3 ----- * Update documentation * IPA: Update proliant hardware manager * Add RIS support for updating boot device 2.1.2 ----- * RIS: Check if virtual media is attached before ejecting 2.1.1 ----- * Check if virtual media is attached before ejecting * Change dict() to {} * Adding RIS support for virtual media interfaces * Add support for certificate based authentication * Add iSCSI boot support in RIS * Activate iLO license * Fix gate failures * parsing storage data fails in some scenarios * test cases for get\_nic\_capacity and ipmi.py * Python 3 compatibility * Missing argument in set\_http\_boot\_url * update\_persistent\_boot to 'NETWORK' fails on Gen9 2.1.0 ----- * ILO: Add nic\_capacity to capabilities * Bug Fixes 2.0.2 ----- * Adding functionality required by ilo-inspection * RIS:Add get\_pending\_boot\_mode * Fallback to RIBCL * Refactor code in RIS * Fix exceptions * ILO: (PART-1) Test cases for RIS Operations * ILO:Check if iLO is up after reset\_ilo * ILO: Add unit tests for ris.RISOperations.\_rest\_op * ILO: Support for configuring httpboot through RIS * ILO: Add empty unit test files for ris * ILO: Add support for GET\_EMBEDDED\_HEALTH * HPSSA: Add support for sharing physical disks * HPSSA: create and get should return physical disks info * HPSSA: Handle all storage units * HPSSA: Add support for nested RAID levels * Support CDROM in get/set persistent boot methods * HPSSA: Add disk allocator * HPSSA: RAID creation should return current config * ILO: Update get\_persistent\_boot for UEFI * HPSSA: Move test outputs to a single file * HPSSA: Fix the disk sorting issue on create * Add Proliant Hardware Manager for IPA * Update ris module to be consistent with operations 2.0.1 ----- * Add hpssa module to proliantutils * Add cleaning operations 2.0.0 ----- * Fix broken backward compatibility * Fix boot mode exceptions for Gen 7 servers * Initial Support to RIS * Add hacking and fix pep8 issues * Fix pep8 errors in ribcl and its test module * Add tox for proliantutils module * Fix update\_persistent\_boot for Gen9 servers * Backout changes from 18bbcad * Add system health methods to ribcl module * Remove unused variable * Fix minor space issues in ribcl module * Add update\_persistent\_boot to ribcl module * Add boot mode commands to ribcl module * Add support for pbr * Add documentation to ribcl module * HPSSA: Add functional tests for create * HPSSA: Fixes for issue found during functional testing * Submit ribcl ilo module * Initial commit ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/LICENSE0000664000175000017500000002607300000000000015551 0ustar00zuulzuul00000000000000Apache 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. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} 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.././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2746649 proliantutils-2.16.0/PKG-INFO0000664000175000017500000000444400000000000015637 0ustar00zuulzuul00000000000000Metadata-Version: 1.2 Name: proliantutils Version: 2.16.0 Summary: Client Library for interfacing with various devices in HP Proliant Servers. Home-page: https://opendev.org/x/proliantutils Author: Hewlett Packard Enterprise Author-email: proliantutils@gmail.com License: Apache License, Version 2.0 Description: proliantutils ============= **proliantutils** is a set of utility libraries for interfacing and managing various components (like iLO, HPSSA) for HPE Proliant Servers. This library is used by iLO drivers in Ironic for managing Proliant Servers (though the library can be used by anyone who wants to manage HPE Proliant servers). Please use launchpad_ to report bugs and ask questions. .. _launchpad: https://bugs.launchpad.net/proliantutils Installation ------------ Install the module from PyPI_. If you are using Ironic, install the module on Ironic conductor node:: pip install proliantutils .. _PyPI: https://pypi.python.org/pypi/proliantutils Some GNU/Linux distributions provide *python-proliantutils* package. Usage ----- iLO ~~~ For interfacing with the iLO, use *IloClient* object:: >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_power_status() 'OFF' >>> For operations supported on the client object, please refer *proliantutils.ilo.operations*. Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Environment :: Console Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Information Technology Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Requires-Python: >=3.6 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/README.md0000664000175000017500000013504600000000000016024 0ustar00zuulzuul00000000000000# Proliantutils documentation Introduction ============ **Proliantutils** is a set of python utility libraries for interfacing and managing various components (like iLO, HPSSA) for HPE iLO-based Servers. This library uses Redfish to interact with Gen10 servers and RIBCL/RIS to interact with Gen8 and Gen9 servers. A subset of proliantutils can be used to discover server properties (aka **Discovery Engine**). Please use [launchpad](https://bugs.launchpad.net/proliantutils) to report bugs and ask questions. Installation ============ Install the module from [PyPI](https://pypi.python.org/pypi/proliantutils). If you are using Ironic, install the module on Ironic conductor node: ```$ pip install proliantutils``` **Some GNU/Linux distributions provide *python-proliantutils* package.** Supported Operations ==================== Creating an IloClient object for interfacing with the iLO, use *IloClient* object: ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_power_status() 'OFF' ``` **For operations supported on the client object, please refer *proliantutils.ilo.operations*.** get_all_licenses() ------------------ Retrieves license type, key, installation date, etc. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_all_licenses() {'LICENSE_TIER': 'ADV', 'LICENSE_INSTALL_DATE': '10 May 2019', 'LICENSE_CLASS': 'FQL', 'LICENSE_TYPE': 'iLO Advanced', 'LICENSE_KEY': 'YOUR_LICENSE_KEY', 'LICENSE_STATE': 'unconfirmed'} ``` get_product_name() ------------------ Retrieves the model name of the queried server. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_product_name() u'ProLiant DL360 Gen10' ``` get_host_power_status() ---------------------- Retrieves the power status of the server. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_power_status() 'ON' ``` get_http_boot_url() ------------------- Retrieves the http boot url. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_http_boot_url() u'http://10.10.1.30:8081/startup.nsh' ``` set_http_boot_url(url) ---------------------- Set the url to the UefiShellStartupUrl. Takes url for http boot as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.set_http_boot_url("http://10.10.1.30:8081/startup.nsh") ``` set_iscsi_info(target_name, lun, ip_address, port='3260', auth_method=None, username=None, password=None, macs=[]) ------------------------------------------------------------------------------------------------------------------ Sets iscsi details of the system in uefi boot mode. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.set_iscsi_info('iqn.2011-07.com:example:123', '1', '10.10.1.23', '3260', 'CHAP', 'user', 'password') ``` unset_iscsi_info(macs=[]) ------------------------- Disable iscsi boot option of the system in uefi boot mode. Takes a list of target MAC addresses as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.unset_iscsi_info(['98:f2:b3:ee:f4:00']) ``` get_iscsi_initiator_info() -------------------------- Retrieves iSCSI initiator information of iLO. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_iscsi_initiator_info() 'iqn.2015-02.com.hpe:uefi-U32-G393NR9113' ``` set_iscsi_initiator_info(initiator_iqn) --------------------------------------- Sets iSCSI initiator information of iLO. Takes an initiator iqn for iLO as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.set_iscsi_initiator_info('iqn.2015-02.com.hpe:uefi-U32-G393NR9113') ``` get_one_time_boot() ------------------- Retrieves the current setting for the one time boot. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_one_time_boot() 'Normal' ``` get_vm_status(device='FLOPPY') ------------------------------ Retrieves the virtual media drive status like url, is connected, etc. Takes virtual media *device* as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_vm_status('FLOPPY') {'WRITE_PROTECT': 'NO', 'VM_APPLET': 'DISCONNECTED', 'IMAGE_URL': u'', 'BOOT_OPTION': 'NO_BOOT', 'DEVICE': 'FLOPPY', 'IMAGE_INSERTED': 'NO'} ``` reset_server() -------------- Resets the server. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.reset_server() ``` press_pwr_btn() --------------- Simulates a physical press of the server power button. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_power_status() u'ON' >>> ilo_client.press_pwr_btn() >>> ilo_client.get_host_power_status() u'OFF' ``` hold_pwr_btn() -------------- Simulate a physical press and hold of the server power button. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_power_status() u'ON' >>> ilo_client.hold_pwr_btn() >>> ilo_client.get_host_power_status() u'OFF' ``` set_host_power(power) --------------------- Toggles the power button of the server. Takes power status as argument. The power status values can be ‘ON’ or ‘OFF’. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.set_host_power('ON') >>> ilo_client.get_host_power_status() u'ON' >>> ilo_client.set_host_power('OFF') >>> ilo_client.get_host_power_status() u'OFF' ``` set_one_time_boot(value) ------------------------ Configures the server for a single boot from a specific device. Takes a boot device value as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_one_time_boot() 'Normal' >>> ilo_client.set_one_time_boot('CDROM') >>> ilo_client.get_one_time_boot() 'CDROM' ``` insert_virtual_media(url, device=’FLOPPY’) ------------------------------------------ Notifies iLO of the location of a virtual media diskette image. Takes the virtual media url and device as arguments. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.insert_virtual_media(url='http://172.17.1.41:8001/rhel_8_1.iso', device='FLOPPY') >>> ilo_client.get_vm_status('FLOPPY') {'WRITE_PROTECT': 'YES', 'VM_APPLET': 'CONNECTED', 'IMAGE_URL': u'http://172.17.1.41:8001/rhel_8_1.iso', 'BOOT_OPTION': 'BOOT_ALWAYS', 'DEVICE': 'FLOPPY', 'IMAGE_INSERTED': 'YES'} ``` eject_virtual_media(device=’FLOPPY’) ------------------------------------ Ejects the Virtual Media image if one is inserted. Takes virtual media device as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.eject_virtual_media(device='FLOPPY') >>> ilo_client.get_vm_status('FLOPPY') {'WRITE_PROTECT': 'YES', 'VM_APPLET': 'DISCONNECTED', 'IMAGE_URL': u'', 'BOOT_OPTION': 'NO_BOOT', 'DEVICE': 'FLOPPY', 'IMAGE_INSERTED': 'NO'} ``` set_vm_status(device=’FLOPPY’, boot_option=’BOOT_ONCE’, write_protect=’YES’) ---------------------------------------------------------------------------- Sets the Virtual Media drive status and allows the boot options for booting from the virtual media. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.set_vm_status(device='FLOPPY', boot_option='BOOT_ONCE', write_protect='YES') ``` get_current_boot_mode() ----------------------- Retrieves the current boot mode settings. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_current_boot_mode() u'UEFI' ``` get_pending_boot_mode() ----------------------- Retrieves the pending boot mode settings ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_pending_boot_mode() u'UEFI' ``` get_supported_boot_mode() ------------------------- Lists all supported boot modes ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_supported_boot_mode() 'legacy bios and uefi' ``` set_pending_boot_mode(value) ---------------------------- Sets the boot mode of the system for next boot. Takes boot mode as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.set_pending_boot_mode('UEFI') >>> ilo_client.get_pending_boot_mode() u'UEFI' ``` get_persistent_boot_device() ---------------------------- Retrieves the current persistent boot device set for the host ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_persistent_boot_device() 'CDROM' ``` update_persistent_boot(device_type=[]) -------------------------------------- Updates persistent boot based on the boot mode. Takes list of boot devices as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.update_persistent_boot(['cdrom']) ``` get_secure_boot_mode() ---------------------- Retrieves whether secure boot is enabled or not. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_secure_boot_mode() False ``` set_secure_boot_mode(secure_boot_enable) ---------------------------------------- Enables/Disables secure boot on the server. Takes boolean value as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_secure_boot_mode() False >>> ilo_client.set_secure_boot_mode(True) >>> ilo_client.get_secure_boot_mode() True ``` reset_secure_boot_keys() ------------------------ Resets secure boot keys to manufacturing defaults. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.reset_secure_boot_keys() ``` clear_secure_boot_keys() ------------------------ Resets all keys. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.clear_secure_boot_keys() ``` reset_ilo_credential(password) ------------------------------ Resets the iLO password. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.reset_ilo_credential('Pa5sword') ``` reset_ilo() ----------- Resets the server iLO. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.reset_ilo() ``` reset_bios_to_default() ----------------------- Resets the BIOS settings to default values. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.reset_bios_to_default() ``` get_host_uuid() --------------- Retrieves the host UUID of the server ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_uuid() ('ProLiant DL180 Gen9', '35343537-3432-4753-4836-34305752394B') ``` get_host_health_data(data=None) ------------------------------- Returns the dictionary containing the embedded health data. Takes *data* to be retrieved as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_health_data() {'VERSION': '2.23', 'RESPONSE': {'STATUS': '0x0000', 'MESSAGE': 'No error'}, ...... } ``` get_host_health_present_power_reading(data=None) ------------------------------------------------ Returns the power consumption of the server. Takes *data* to be retrieved as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_health_present_power_reading() '0 Watts' ``` get_host_health_power_supplies(data=None) ----------------------------------------- Returns the health information of power supplies. Takes *data* to be retrieved as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_health_power_supplies() [{'STATUS': {'VALUE': 'Unknown'}, 'CAPACITY': {'VALUE': 'N/A'}, 'PDS': {'VALUE': 'Other'}, 'LABEL': {'VALUE': 'Power Supply 1'}, 'HOTPLUG_CAPABLE': {'VALUE': 'No'}, 'SPARE': {'VALUE': 'N/A'}, 'SERIAL_NUMBER': {'VALUE': 'N/A'}, 'MODEL': {'VALUE': 'N/A'}, 'FIRMWARE_VERSION': {'VALUE': 'N/A'}, 'PRESENT': {'VALUE': 'No'}}] ``` get_host_health_fan_sensors(data=None) -------------------------------------- Returns the health information from Fan Sensors. Takes *data* to be retrieved as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_health_fan_sensors() [{'STATUS': {'VALUE': 'Other'}, 'SPEED': {'UNIT': 'Percentage', 'VALUE': '0'}, 'ZONE': {'VALUE': 'System'}, 'LABEL': {'VALUE': 'Fan 1'}}, {'STATUS': {'VALUE': 'Other'}, 'SPEED': {'UNIT': 'Percentage', 'VALUE': '0'}, 'ZONE': {'VALUE': 'System'}, 'LABEL': {'VALUE': 'Fan 2'}}, {'STATUS': {'VALUE': 'Other'}, 'SPEED': {'UNIT': 'Percentage', 'VALUE': '0'}, 'ZONE': {'VALUE': 'System'}, 'LABEL': {'VALUE': 'Fan 3'}}, {'STATUS': {'VALUE': 'Other'}, 'SPEED': {'UNIT': 'Percentage', 'VALUE': '0'}, 'ZONE': {'VALUE': 'System'}, 'LABEL': {'VALUE': 'Fan 4'}}, {'STATUS': {'VALUE': 'Other'}, 'SPEED': {'UNIT': 'Percentage', 'VALUE': '0'}, 'ZONE': {'VALUE': 'System'}, 'LABEL': {'VALUE': 'Fan 5'}}] ``` get_host_health_temperature_sensors(data=None) ---------------------------------------------- Returns the health information from Temperature Sensors. Takes *data* to be retrieved as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_health_temperature_sensors() [{'LABEL': {'VALUE': '01-CPU 1'}, 'LOCATION': {'VALUE': 'CPU'}, 'STATUS': {'VALUE': 'Not Installed'}, 'CURRENTREADING': {'VALUE': 'N/A'}, 'CAUTION': {'VALUE': 'N/A'}, 'CRITICAL': {'VALUE': 'N/A'}},, {'LABEL': {'VALUE': '02-CPU 1'}, 'LOCATION': {'VALUE': 'CPU'}, 'STATUS': {'VALUE': 'OK'}, 'CURRENTREADING': {'VALUE': '40', 'UNIT': 'Celsius'}, 'CAUTION': {'VALUE': '70', 'UNIT': 'Celsius'}, 'CRITICAL': {'VALUE': 'N/A'}}, {'LABEL': {'VALUE': '03-CPU 2'}, 'LOCATION': {'VALUE': 'CPU'}, 'STATUS': {'VALUE': 'Not Installed'}, 'CURRENTREADING': {'VALUE': 'N/A'}, 'CAUTION': {'VALUE': 'N/A'}, 'CRITICAL': {'VALUE': 'N/A'}}, {'LABEL': {'VALUE': '04-CPU 2'}, 'LOCATION': {'VALUE': 'CPU'}, 'STATUS': {'VALUE': 'Not Installed'}, 'CURRENTREADING': {'VALUE': 'N/A'}, 'CAUTION': {'VALUE': 'N/A'}, 'CRITICAL': {'VALUE': 'N/A'}}] ``` get_host_health_at_a_glance(data=None) -------------------------------------- Returns health at a glance report. Takes *data* to be retrieved as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_health_at_a_glance() {'TEMPERATURE': {'STATUS': 'Not Installed'}, 'BATTERY': {'STATUS': 'Not Installed'}, 'STORAGE': {'STATUS': 'OK'}, 'FANS': {'STATUS': 'Not Installed'}, 'BIOS_HARDWARE': {'STATUS': 'OK'}, 'MEMORY': {'STATUS': 'Other'}, 'POWER_SUPPLIES': {'STATUS': 'Not Installed'}, 'PROCESSOR': {'STATUS': 'OK'}, 'NETWORK': {'STATUS': 'OK'}} ``` get_host_power_readings() ------------------------- Returns the host power reading. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_power_readings() {'MAXIMUM_POWER_READING': {'UNIT': 'Watts', 'VALUE': '243'}, 'MINIMUM_POWER_READING': {'UNIT': 'Watts', 'VALUE': '136'}, 'PRESENT_POWER_READING': {'UNIT': 'Watts', 'VALUE': '224'}, 'AVERAGE_POWER_READING': {'UNIT': 'Watts', 'VALUE': '162'}} ``` get_essential_properties() -------------------------- Returns the essential scheduling properties. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_essential_properties() {'macs': {u'Port 6': u'80:30:e0:2d:3f:31', u'Port 5': u'80:30:e0:2d:3f:30'}, 'properties': {'memory_mb': 65536, 'cpu_arch': 'x86', 'local_gb': 278, 'cpus': 48}} ``` get_server_capabilities() ------------------------- Returns hardware properties which can be used for scheduling. This method can discover the following properties: * **ilo_firmware_version**: iLO firmware version * **rom_firmware_version**: ROM firmware version * **secure_boot**: secure boot is supported or not. The possible values are ‘true’ or ‘false’. The value is returned as ‘true’ if secure boot is supported by the server. * **server_model**: server model * **pci_gpu_devices**: number of gpu devices connected to the bare metal. * **nic_capacity**: the max speed of the embedded NIC adapter. * **sriov_enabled**: true, if server has the SRIOV supporting NIC. * **has_rotational**: true, if server has HDD disk. * **has_ssd**: true, if server has SSD disk. * **has_nvme_ssd**: true, if server has NVME SSD disk. * **cpu_vt**: true, if server supports cpu virtualization. * **hardware_supports_raid**: true, if RAID can be configured on the server using RAID controller. * **nvdimm_n**: true, if server has NVDIMM_N type of persistent memory. * **persistent_memory**: true, if server has persistent memory. * **logical_nvdimm_n**: true, if server has logical NVDIMM_N configured. * **boot_mode_bios**: true, if server boot mode is BIOS. * **boot_mode_uefi**: true, if server boot mode is UEFI. * **iscsi_boot**: true, if server supported UEFI iSCSI boot. * **rotational_drive__rpm**: The capabilities *rotational_drive_4800_rpm*, *rotational_drive_5400_rpm*, *rotational_drive_7200_rpm*, *rotational_drive_10000_rpm* and *rotational_drive_15000_rpm* are set to true if the server has HDD drives with speed of 4800, 5400, 7200, 10000 and 15000 rpm respectively. * **logical_raid_level_**: The capabilities *logical_raid_level_0*, *logical_raid_level_1*, *logical_raid_level_2*, *logical_raid_level_5*, *logical_raid_level_6*, *logical_raid_level_10*, *logical_raid_level_50* and *logical_raid_level_60* are set to true if any of the raid levels among 0, 1, 2, 5, 6, 10, 50 and 60 are configured on the system. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_server_capabilities() {'logical_raid_level_0': 'true', 'has_rotational': 'true', 'rom_firmware_version': u'U32 v2.02 (03/19/2019)', 'hardware_supports_raid': 'true', 'cpu_vt': 'true', 'sriov_enabled': 'true', 'boot_mode_bios': 'true', 'trusted_boot': 'true', 'boot_mode_uefi': 'true', 'server_model': u'ProLiant DL360 Gen10', 'nic_capacity': '16Gb', 'pci_gpu_devices': 1, 'ilo_firmware_version': u'iLO 5 v1.40', 'secure_boot': 'true', 'drive_rotational_10000_rpm': 'true', 'iscsi_boot': 'true'} ``` activate_license(key) --------------------- Activates iLO license. Takes license key as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.activate_license('YOUR_LICENSE_KEY') ``` update_firmware(firmware_url, component_type) --------------------------------------------- Updates the given firmware on the server. Takes location of firmware file and the component to be applied to as arguments. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.update_firmware('http://172.17.1.41/ilo_firmware', 'ilo') ``` inject_nmi() ------------ Injects an NMI (Non Maskable Interrupt) for a node immediately. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.inject_nmi() ``` get_host_post_state() --------------------- Returns the current state of system POST. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_post_state() 'InPostDiscoveryComplete' ``` get_current_bios_settings(only_allowed_settings=False) ------------------------------------------------------ Returns current BIOS settings. When *only_allowed_settings* is set to True, only allowed BIOS settings are returned. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_current_bios_settings(only_allowed_settings=True) {'PowerRegulator': u'DynamicPowerSavings', 'AdvancedMemProtection': u'FastFaultTolerantADDDC', 'DynamicPowerCapping': u'Disabled', 'BootOrderPolicy': u'RetryIndefinitely', 'Sriov': u'Enabled', 'AutoPowerOn': u'RestoreLastState', 'IntelProcVtd': u'Enabled', 'ProcVirtualization': u'Enabled', 'ThermalShutdown': u'Enabled', 'IntelTxt': u'Disabled', 'SecureBootStatus': u'Disabled', 'WorkloadProfile': u'GeneralPowerEfficientCompute', 'IntelPerfMonitoring': u'Disabled', 'TpmType': u'Tpm20', 'UefiOptimizedBoot': u'Enabled', 'ThermalConfig': u'OptimalCooling', 'ProcAes': u'Enabled', 'BootMode': u'Uefi', 'ProcTurbo': u'Enabled', 'IntelligentProvisioning': u'Enabled', 'ProcHyperthreading': u'Enabled', 'TpmState': u'PresentEnabled', 'CollabPowerControl': u'Enabled'} ``` When *only_allowed_settings* is set to False, all the BIOS settings supported by iLO are returned. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_current_bios_settings(only_allowed_settings=False) {'AcpiHpet': 'Enabled', 'AcpiRootBridgePxm': 'Enabled', 'AcpiSlit': 'Enabled', 'AdjSecPrefetch': 'Enabled', 'AdminEmail': '', 'AdminName': '', 'AdminOtherInfo': '', 'AdminPhone': '', 'AdvCrashDumpMode': 'Disabled', 'AdvancedMemProtection': 'FastFaultTolerantADDDC', 'AsrStatus': 'Enabled', 'AsrTimeoutMinutes': 'Timeout10', 'AssetTagProtection': 'Unlocked', 'AutoPowerOn': 'RestoreLastState', 'BootMode': 'LegacyBios', 'BootOrderPolicy': 'RetryIndefinitely', 'ChannelInterleaving': 'Enabled', 'CollabPowerControl': 'Enabled', 'ConsistentDevNaming': 'LomsAndSlots', 'CustomPostMessage': '', 'DaylightSavingsTime': 'Disabled', 'DcuIpPrefetcher': 'Enabled', 'DcuStreamPrefetcher': 'Enabled', 'Dhcpv4': 'Enabled', 'DynamicPowerCapping': 'Disabled', 'EmbNicEnable': 'Auto', 'EmbNicLinkSpeed': 'Auto', 'EmbNicPCIeOptionROM': 'Enabled', 'EmbSas1Aspm': 'Disabled', 'EmbSas1Boot': 'TwentyFourTargets', 'EmbSas1Enable': 'Auto', 'EmbSas1LinkSpeed': 'Auto', 'EmbSas1PcieOptionROM': 'Enabled', 'EmbSata1Aspm': 'Disabled', 'EmbSata2Aspm': 'Disabled', 'EmbVideoConnection': 'Auto', 'EmbeddedDiagnostics': 'Enabled', 'EmbeddedSata': 'Ahci', 'EmbeddedSerialPort': 'Com2Irq3', 'EmbeddedUefiShell': 'Enabled', 'EmsConsole': 'Disabled', 'EnabledCoresPerProc': 0, 'EnergyEfficientTurbo': 'Enabled', 'EnergyPerfBias': 'BalancedPerf', 'EraseUserDefaults': 'No', 'ExtendedAmbientTemp': 'Disabled', 'ExtendedMemTest': 'Disabled', 'F11BootMenu': 'Enabled', 'FCScanPolicy': 'CardConfig', 'FanFailPolicy': 'Shutdown', 'FanInstallReq': 'EnableMessaging', 'FlexLom1Aspm': 'Disabled', 'HttpSupport': 'Auto', 'HwPrefetcher': 'Enabled', 'IODCConfiguration': 'Auto', 'IntelDmiLinkFreq': 'Auto', 'IntelNicDmaChannels': 'Enabled', 'IntelPerfMonitoring': 'Disabled', 'IntelProcVtd': 'Enabled', 'IntelligentProvisioning': 'Enabled', 'InternalSDCardSlot': 'Enabled', 'Ipv4Address': '0.0.0.0', 'Ipv4Gateway': '0.0.0.0', 'Ipv4PrimaryDNS': '0.0.0.0', 'Ipv4SecondaryDNS': '0.0.0.0', 'Ipv4SubnetMask': '0.0.0.0', 'Ipv6Address': '::', 'Ipv6ConfigPolicy': 'Automatic', 'Ipv6Duid': 'Auto', 'Ipv6Gateway': '::', 'Ipv6PrimaryDNS': '::', 'Ipv6SecondaryDNS': '::', 'LLCDeadLineAllocation': 'Enabled', 'LlcPrefetch': 'Disabled', 'LocalRemoteThreshold': 'Auto', 'MaxMemBusFreqMHz': 'Auto', 'MaxPcieSpeed': 'PerPortCtrl', 'MemClearWarmReset': 'Disabled', 'MemFastTraining': 'Enabled', 'MemMirrorMode': 'Full', 'MemPatrolScrubbing': 'Enabled', 'MemRefreshRate': 'Refreshx1', 'MemoryControllerInterleaving': 'Auto', 'MemoryRemap': 'NoAction', 'MinProcIdlePkgState': 'C6Retention', 'MinProcIdlePower': 'C6', 'MixedPowerSupplyReporting': 'Enabled', 'NetworkBootRetry': 'Enabled', 'NetworkBootRetryCount': 20, 'NicBoot1': 'NetworkBoot', 'NicBoot2': 'Disabled', 'NicBoot3': 'Disabled', 'NicBoot4': 'Disabled', 'NodeInterleaving': 'Disabled', 'NumaGroupSizeOpt': 'Flat', 'NvmeOptionRom': 'Enabled', 'OpportunisticSelfRefresh': 'Disabled', 'PciPeerToPeerSerialization': 'Disabled', 'PciResourcePadding': 'Normal', 'PersistentMemBackupPowerPolicy': 'WaitForBackupPower', 'PostBootProgress': 'Disabled', 'PostDiscoveryMode': 'Auto', 'PostF1Prompt': 'Delayed20Sec', 'PostVideoSupport': 'DisplayAll', 'PowerButton': 'Enabled', 'PowerOnDelay': 'NoDelay', 'PowerRegulator': 'DynamicPowerSavings', 'PreBootNetwork': 'Auto', 'PrebootNetworkEnvPolicy': 'Auto', 'PrebootNetworkProxy': '', 'ProcAes': 'Enabled', 'ProcHyperthreading': 'Enabled', 'ProcTurbo': 'Enabled', 'ProcVirtualization': 'Enabled', 'ProcX2Apic': 'Enabled', 'ProcessorConfigTDPLevel': 'Normal', 'ProcessorJitterControl': 'Disabled', 'ProcessorJitterControlFrequency': 0, 'ProcessorJitterControlOptimization': 'ZeroLatency', 'ProductId': '868703-B21', 'RedundantPowerSupply': 'BalancedMode', 'RemovableFlashBootSeq': 'ExternalKeysFirst', 'RestoreDefaults': 'No', 'RestoreManufacturingDefaults': 'No', 'RomSelection': 'CurrentRom', 'SataSecureErase': 'Disabled', 'SaveUserDefaults': 'No', 'SecStartBackupImage': 'Disabled', 'SecureBootStatus': 'Disabled', 'SerialConsoleBaudRate': 'BaudRate115200', 'SerialConsoleEmulation': 'Vt100Plus', 'SerialConsolePort': 'Auto', 'SerialNumber': 'SGH744YPVS', 'ServerAssetTag': '', 'ServerConfigLockStatus': 'Disabled', 'ServerName': 'localhost', 'ServerOtherInfo': '', 'ServerPrimaryOs': '', 'ServiceEmail': '', 'ServiceName': '', 'ServiceOtherInfo': '', 'ServicePhone': '', 'SetupBrowserSelection': 'Auto', 'Sriov': 'Enabled', 'StaleAtoS': 'Disabled', 'SubNumaClustering': 'Disabled', 'ThermalConfig': 'OptimalCooling', 'ThermalShutdown': 'Enabled', 'TimeFormat': 'Utc', 'TimeZone': 'Utc0', 'TpmChipId': 'None', 'TpmFips': 'NotSpecified', 'TpmState': 'NotPresent', 'TpmType': 'NoTpm', 'UefiOptimizedBoot': 'Disabled', 'UefiSerialDebugLevel': 'Disabled', 'UefiShellBootOrder': 'Disabled', 'UefiShellScriptVerification': 'Disabled', 'UefiShellStartup': 'Disabled', 'UefiShellStartupLocation': 'Auto', 'UefiShellStartupUrl': '', 'UefiShellStartupUrlFromDhcp': 'Disabled', 'UncoreFreqScaling': 'Auto', 'UrlBootFile': '', 'UrlBootFile2': '', 'UrlBootFile3': '', 'UrlBootFile4': '', 'UsbBoot': 'Enabled', 'UsbControl': 'UsbEnabled', 'UserDefaultsState': 'Disabled', 'UtilityLang': 'English', 'VirtualInstallDisk': 'Disabled', 'VirtualSerialPort': 'Com1Irq4', 'VlanControl': 'Disabled', 'VlanId': 0, 'VlanPriority': 0, 'WakeOnLan': 'Enabled', 'WorkloadProfile': 'GeneralPowerEfficientCompute', 'XptPrefetcher': 'Auto', 'iSCSIPolicy': 'SoftwareInitiator'} ``` get_pending_bios_settings(only_allowed_settings=False) ------------------------------------------------------ Returns pending BIOS settings. When *only_allowed_settings* is set to True, only allowed BIOS settings are returned. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_pending_bios_settings(True) {'PowerRegulator': u'DynamicPowerSavings', 'AdvancedMemProtection': u'FastFaultTolerantADDDC', 'DynamicPowerCapping': u'Disabled', 'BootOrderPolicy': u'RetryIndefinitely', 'Sriov': u'Enabled', 'AutoPowerOn': u'RestoreLastState', 'IntelProcVtd': u'Enabled', 'ProcVirtualization': u'Enabled', 'ThermalShutdown': u'Enabled', 'IntelTxt': u'Disabled', 'SecureBootStatus': u'Disabled', 'WorkloadProfile': u'GeneralPowerEfficientCompute', 'IntelPerfMonitoring': u'Disabled', 'TpmType': u'Tpm20', 'UefiOptimizedBoot': u'Enabled', 'ThermalConfig': u'OptimalCooling', 'ProcAes': u'Enabled', 'BootMode': u'Uefi', 'ProcTurbo': u'Enabled', 'IntelligentProvisioning': u'Enabled', 'ProcHyperthreading': u'Enabled', 'TpmState': u'PresentEnabled', 'CollabPowerControl': u'Enabled'} ``` When *only_allowed_settings* is set to False, all the BIOS settings supported by iLO are returned. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_pending_bios_settings(False) {'AcpiHpet': 'Enabled', 'AcpiRootBridgePxm': 'Enabled', 'AcpiSlit': 'Enabled', 'AdjSecPrefetch': 'Enabled', 'AdminEmail': '', 'AdminName': '', 'AdminOtherInfo': '', 'AdminPhone': '', 'AdvCrashDumpMode': 'Disabled', 'AdvancedMemProtection': 'FastFaultTolerantADDDC', 'AsrStatus': 'Enabled', 'AsrTimeoutMinutes': 'Timeout10', 'AssetTagProtection': 'Unlocked', 'AutoPowerOn': 'RestoreLastState', 'BootMode': 'LegacyBios', 'BootOrderPolicy': 'RetryIndefinitely', 'ChannelInterleaving': 'Enabled', 'CollabPowerControl': 'Enabled', 'ConsistentDevNaming': 'LomsAndSlots', 'CustomPostMessage': '', 'DaylightSavingsTime': 'Disabled', 'DcuIpPrefetcher': 'Enabled', 'DcuStreamPrefetcher': 'Enabled', 'Dhcpv4': 'Enabled', 'DynamicPowerCapping': 'Disabled', 'EmbNicEnable': 'Auto', 'EmbNicLinkSpeed': 'Auto', 'EmbNicPCIeOptionROM': 'Enabled', 'EmbSas1Aspm': 'Disabled', 'EmbSas1Boot': 'TwentyFourTargets', 'EmbSas1Enable': 'Auto', 'EmbSas1LinkSpeed': 'Auto', 'EmbSas1PcieOptionROM': 'Enabled', 'EmbSata1Aspm': 'Disabled', 'EmbSata2Aspm': 'Disabled', 'EmbVideoConnection': 'Auto', 'EmbeddedDiagnostics': 'Enabled', 'EmbeddedSata': 'Ahci', 'EmbeddedSerialPort': 'Com2Irq3', 'EmbeddedUefiShell': 'Enabled', 'EmsConsole': 'Disabled', 'EnabledCoresPerProc': 0, 'EnergyEfficientTurbo': 'Enabled', 'EnergyPerfBias': 'BalancedPerf', 'EraseUserDefaults': 'No', 'ExtendedAmbientTemp': 'Disabled', 'ExtendedMemTest': 'Disabled', 'F11BootMenu': 'Enabled', 'FCScanPolicy': 'CardConfig', 'FanFailPolicy': 'Shutdown', 'FanInstallReq': 'EnableMessaging', 'FlexLom1Aspm': 'Disabled', 'HttpSupport': 'Auto', 'HwPrefetcher': 'Enabled', 'IODCConfiguration': 'Auto', 'IntelDmiLinkFreq': 'Auto', 'IntelNicDmaChannels': 'Enabled', 'IntelPerfMonitoring': 'Disabled', 'IntelProcVtd': 'Enabled', 'IntelligentProvisioning': 'Enabled', 'InternalSDCardSlot': 'Enabled', 'Ipv4Address': '0.0.0.0', 'Ipv4Gateway': '0.0.0.0', 'Ipv4PrimaryDNS': '0.0.0.0', 'Ipv4SecondaryDNS': '0.0.0.0', 'Ipv4SubnetMask': '0.0.0.0', 'Ipv6Address': '::', 'Ipv6ConfigPolicy': 'Automatic', 'Ipv6Duid': 'Auto', 'Ipv6Gateway': '::', 'Ipv6PrimaryDNS': '::', 'Ipv6SecondaryDNS': '::', 'LLCDeadLineAllocation': 'Enabled', 'LlcPrefetch': 'Disabled', 'LocalRemoteThreshold': 'Auto', 'MaxMemBusFreqMHz': 'Auto', 'MaxPcieSpeed': 'PerPortCtrl', 'MemClearWarmReset': 'Disabled', 'MemFastTraining': 'Enabled', 'MemMirrorMode': 'Full', 'MemPatrolScrubbing': 'Enabled', 'MemRefreshRate': 'Refreshx1', 'MemoryControllerInterleaving': 'Auto', 'MemoryRemap': 'NoAction', 'MinProcIdlePkgState': 'C6Retention', 'MinProcIdlePower': 'C6', 'MixedPowerSupplyReporting': 'Enabled', 'NetworkBootRetry': 'Enabled', 'NetworkBootRetryCount': 20, 'NicBoot1': 'NetworkBoot', 'NicBoot2': 'Disabled', 'NicBoot3': 'Disabled', 'NicBoot4': 'Disabled', 'NodeInterleaving': 'Disabled', 'NumaGroupSizeOpt': 'Flat', 'NvmeOptionRom': 'Enabled', 'OpportunisticSelfRefresh': 'Disabled', 'PciPeerToPeerSerialization': 'Disabled', 'PciResourcePadding': 'Normal', 'PersistentMemBackupPowerPolicy': 'WaitForBackupPower', 'PostBootProgress': 'Disabled', 'PostDiscoveryMode': 'Auto', 'PostF1Prompt': 'Delayed20Sec', 'PostVideoSupport': 'DisplayAll', 'PowerButton': 'Enabled', 'PowerOnDelay': 'NoDelay', 'PowerRegulator': 'DynamicPowerSavings', 'PreBootNetwork': 'Auto', 'PrebootNetworkEnvPolicy': 'Auto', 'PrebootNetworkProxy': '', 'ProcAes': 'Enabled', 'ProcHyperthreading': 'Enabled', 'ProcTurbo': 'Enabled', 'ProcVirtualization': 'Enabled', 'ProcX2Apic': 'Enabled', 'ProcessorConfigTDPLevel': 'Normal', 'ProcessorJitterControl': 'Disabled', 'ProcessorJitterControlFrequency': 0, 'ProcessorJitterControlOptimization': 'ZeroLatency', 'ProductId': '868703-B21', 'RedundantPowerSupply': 'BalancedMode', 'RemovableFlashBootSeq': 'ExternalKeysFirst', 'RestoreDefaults': 'No', 'RestoreManufacturingDefaults': 'No', 'RomSelection': 'CurrentRom', 'SataSecureErase': 'Disabled', 'SaveUserDefaults': 'No', 'SecStartBackupImage': 'Disabled', 'SecureBootStatus': 'Disabled', 'SerialConsoleBaudRate': 'BaudRate115200', 'SerialConsoleEmulation': 'Vt100Plus', 'SerialConsolePort': 'Auto', 'SerialNumber': 'SGH744YPVS', 'ServerAssetTag': '', 'ServerConfigLockStatus': 'Disabled', 'ServerName': 'localhost', 'ServerOtherInfo': '', 'ServerPrimaryOs': '', 'ServiceEmail': '', 'ServiceName': '', 'ServiceOtherInfo': '', 'ServicePhone': '', 'SetupBrowserSelection': 'Auto', 'Sriov': 'Enabled', 'StaleAtoS': 'Disabled', 'SubNumaClustering': 'Disabled', 'ThermalConfig': 'OptimalCooling', 'ThermalShutdown': 'Enabled', 'TimeFormat': 'Utc', 'TimeZone': 'Utc0', 'TpmChipId': 'None', 'TpmFips': 'NotSpecified', 'TpmState': 'NotPresent', 'TpmType': 'NoTpm', 'UefiOptimizedBoot': 'Disabled', 'UefiSerialDebugLevel': 'Disabled', 'UefiShellBootOrder': 'Disabled', 'UefiShellScriptVerification': 'Disabled', 'UefiShellStartup': 'Disabled', 'UefiShellStartupLocation': 'Auto', 'UefiShellStartupUrl': '', 'UefiShellStartupUrlFromDhcp': 'Disabled', 'UncoreFreqScaling': 'Auto', 'UrlBootFile': '', 'UrlBootFile2': '', 'UrlBootFile3': '', 'UrlBootFile4': '', 'UsbBoot': 'Enabled', 'UsbControl': 'UsbEnabled', 'UserDefaultsState': 'Disabled', 'UtilityLang': 'English', 'VirtualInstallDisk': 'Disabled', 'VirtualSerialPort': 'Com1Irq4', 'VlanControl': 'Disabled', 'VlanId': 0, 'VlanPriority': 0, 'WakeOnLan': 'Enabled', 'WorkloadProfile': 'GeneralPowerEfficientCompute', 'XptPrefetcher': 'Auto', 'iSCSIPolicy': 'SoftwareInitiator'} ``` set_bios_settings(data=None, only_allowed_settings=False) --------------------------------------------------------- Sets current BIOS settings to the provided data. Takes a dictionary of BIOS settings to be appplied as argument. When *only_allowed_settings* is set to True, only allowed BIOS settings are returned ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> data = { "BootOrderPolicy": "AttemptOnce", "IntelPerfMonitoring": "Enabled", "IntelProcVtd": "Disabled", "UefiOptimizedBoot": "Disabled", "PowerProfile": "MaxPerf"} >>> apply_filter = True >>> ilo_client.set_bios_settings(data = data, only_allowed_settings= apply_filter) ``` When *only_allowed_settings* is set to False, all the BIOS settings supported by iLO are returned ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> apply_filter = False >>> ilo_client.set_bios_settings(data, apply_filter) ``` get_default_bios_settings(only_allowed_settings=False) ------------------------------------------------------ Returns default BIOS settings. When *only_allowed_settings* is set to True, only allowed BIOS settings are returned ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_default_bios_settings(True) {'PowerRegulator': u'DynamicPowerSavings', 'AdvancedMemProtection': u'AdvancedEcc', 'DynamicPowerCapping': u'Disabled', 'BootOrderPolicy': u'RetryIndefinitely', 'Sriov': u'Enabled', 'AutoPowerOn': u'RestoreLastState', 'IntelProcVtd': u'Enabled', 'ProcVirtualization': u'Enabled', 'ThermalShutdown': u'Enabled', 'IntelTxt': u'Disabled', 'SecureBootStatus': u'Disabled', 'WorkloadProfile': u'GeneralPowerEfficientCompute', 'IntelPerfMonitoring': u'Disabled', 'TpmType': u'NoTpm', 'UefiOptimizedBoot': u'Enabled', 'ThermalConfig': u'OptimalCooling', 'ProcAes': u'Enabled', 'BootMode': u'Uefi', 'ProcTurbo': u'Enabled', 'IntelligentProvisioning': u'Enabled', 'ProcHyperthreading': u'Enabled', 'TpmState': u'NotPresent', 'CollabPowerControl': u'Enabled'} ``` When *only_allowed_settings* is set to False, all the BIOS settings supported by iLO are returned ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_default_bios_settings(False) {'AcpiHpet': 'Enabled', 'AcpiRootBridgePxm': 'Enabled', 'AcpiSlit': 'Enabled', 'AdjSecPrefetch': 'Enabled', 'AdminEmail': '', 'AdminName': '', 'AdminOtherInfo': '', 'AdminPhone': '', 'AdvCrashDumpMode': 'Disabled', 'AdvancedMemProtection': 'AdvancedEcc', 'AsrStatus': 'Enabled', 'AsrTimeoutMinutes': 'Timeout10', 'AssetTagProtection': 'Unlocked', 'AutoPowerOn': 'RestoreLastState', 'BootMode': 'Uefi', 'BootOrderPolicy': 'RetryIndefinitely', 'ChannelInterleaving': 'Enabled', 'CollabPowerControl': 'Enabled', 'ConsistentDevNaming': 'LomsAndSlots', 'CustomPostMessage': '', 'DaylightSavingsTime': 'Disabled', 'DcuIpPrefetcher': 'Enabled', 'DcuStreamPrefetcher': 'Enabled', 'Dhcpv4': 'Enabled', 'DynamicPowerCapping': 'Disabled', 'EmbNicEnable': 'Auto', 'EmbNicLinkSpeed': 'Auto', 'EmbNicPCIeOptionROM': 'Enabled', 'EmbSas1Aspm': 'Disabled', 'EmbSas1Boot': 'TwentyFourTargets', 'EmbSas1Enable': 'Auto', 'EmbSas1LinkSpeed': 'Auto', 'EmbSas1PcieOptionROM': 'Enabled', 'EmbSata1Aspm': 'Disabled', 'EmbSata2Aspm': 'Disabled', 'EmbVideoConnection': 'Auto', 'EmbeddedDiagnostics': 'Enabled', 'EmbeddedSata': 'Ahci', 'EmbeddedSerialPort': 'Com2Irq3', 'EmbeddedUefiShell': 'Enabled', 'EmsConsole': 'Disabled', 'EnabledCoresPerProc': 0, 'EnergyEfficientTurbo': 'Enabled', 'EnergyPerfBias': 'BalancedPerf', 'EraseUserDefaults': 'No', 'ExtendedAmbientTemp': 'Disabled', 'ExtendedMemTest': 'Disabled', 'F11BootMenu': 'Enabled', 'FCScanPolicy': 'CardConfig', 'FanFailPolicy': 'Shutdown', 'FanInstallReq': 'EnableMessaging', 'FlexLom1Aspm': 'Disabled', 'HttpSupport': 'Auto', 'HwPrefetcher': 'Enabled', 'IODCConfiguration': 'Auto', 'IntelDmiLinkFreq': 'Auto', 'IntelNicDmaChannels': 'Enabled', 'IntelPerfMonitoring': 'Disabled', 'IntelProcVtd': 'Enabled', 'IntelligentProvisioning': 'Enabled', 'InternalSDCardSlot': 'Enabled', 'Ipv4Address': '0.0.0.0', 'Ipv4Gateway': '0.0.0.0', 'Ipv4PrimaryDNS': '0.0.0.0', 'Ipv4SecondaryDNS': '0.0.0.0', 'Ipv4SubnetMask': '0.0.0.0', 'Ipv6Address': '::', 'Ipv6ConfigPolicy': 'Automatic', 'Ipv6Duid': 'Auto', 'Ipv6Gateway': '::', 'Ipv6PrimaryDNS': '::', 'Ipv6SecondaryDNS': '::', 'LLCDeadLineAllocation': 'Enabled', 'LlcPrefetch': 'Disabled', 'LocalRemoteThreshold': 'Auto', 'MaxMemBusFreqMHz': 'Auto', 'MaxPcieSpeed': 'PerPortCtrl', 'MemClearWarmReset': 'Disabled', 'MemFastTraining': 'Enabled', 'MemMirrorMode': 'Full', 'MemPatrolScrubbing': 'Enabled', 'MemRefreshRate': 'Refreshx1', 'MemoryControllerInterleaving': 'Auto', 'MemoryRemap': 'NoAction', 'MinProcIdlePkgState': 'C6Retention', 'MinProcIdlePower': 'C6', 'MixedPowerSupplyReporting': 'Enabled', 'NetworkBootRetry': 'Enabled', 'NetworkBootRetryCount': 20, 'NicBoot1': 'NetworkBoot', 'NicBoot2': 'Disabled', 'NicBoot3': 'Disabled', 'NicBoot4': 'Disabled', 'NodeInterleaving': 'Disabled', 'NumaGroupSizeOpt': 'Flat', 'NvmeOptionRom': 'Enabled', 'OpportunisticSelfRefresh': 'Disabled', 'PciPeerToPeerSerialization': 'Disabled', 'PciResourcePadding': 'Normal', 'PersistentMemBackupPowerPolicy': 'WaitForBackupPower', 'PostBootProgress': 'Disabled', 'PostDiscoveryMode': 'Auto', 'PostF1Prompt': 'Delayed20Sec', 'PostVideoSupport': 'DisplayAll', 'PowerButton': 'Enabled', 'PowerOnDelay': 'NoDelay', 'PowerRegulator': 'DynamicPowerSavings', 'PreBootNetwork': 'Auto', 'PrebootNetworkEnvPolicy': 'Auto', 'PrebootNetworkProxy': '', 'ProcAes': 'Enabled', 'ProcHyperthreading': 'Enabled', 'ProcTurbo': 'Enabled', 'ProcVirtualization': 'Enabled', 'ProcX2Apic': 'Enabled', 'ProcessorConfigTDPLevel': 'Normal', 'ProcessorJitterControl': 'Disabled', 'ProcessorJitterControlFrequency': 0, 'ProcessorJitterControlOptimization': 'ZeroLatency', 'RedundantPowerSupply': 'BalancedMode', 'RemovableFlashBootSeq': 'ExternalKeysFirst', 'RestoreDefaults': 'No', 'RestoreManufacturingDefaults': 'No', 'SataSecureErase': 'Disabled', 'SaveUserDefaults': 'No', 'SecStartBackupImage': 'Disabled', 'SecureBootStatus': 'Disabled', 'SerialConsoleBaudRate': 'BaudRate115200', 'SerialConsoleEmulation': 'Vt100Plus', 'SerialConsolePort': 'Auto', 'ServerAssetTag': '', 'ServerConfigLockStatus': 'Disabled', 'ServerName': '', 'ServerOtherInfo': '', 'ServerPrimaryOs': '', 'ServiceEmail': '', 'ServiceName': '', 'ServiceOtherInfo': '', 'ServicePhone': '', 'SetupBrowserSelection': 'Auto', 'Sriov': 'Enabled', 'StaleAtoS': 'Disabled', 'SubNumaClustering': 'Disabled', 'ThermalConfig': 'OptimalCooling', 'ThermalShutdown': 'Enabled', 'TimeFormat': 'Utc', 'TimeZone': 'Utc0', 'TpmChipId': 'None', 'TpmFips': 'NotSpecified', 'TpmState': 'NotPresent', 'TpmType': 'NoTpm', 'UefiOptimizedBoot': 'Enabled', 'UefiSerialDebugLevel': 'Disabled', 'UefiShellBootOrder': 'Disabled', 'UefiShellScriptVerification': 'Disabled', 'UefiShellStartup': 'Disabled', 'UefiShellStartupLocation': 'Auto', 'UefiShellStartupUrl': '', 'UefiShellStartupUrlFromDhcp': 'Disabled', 'UncoreFreqScaling': 'Auto', 'UrlBootFile': '', 'UrlBootFile2': '', 'UrlBootFile3': '', 'UrlBootFile4': '', 'UsbBoot': 'Enabled', 'UsbControl': 'UsbEnabled', 'UserDefaultsState': 'Disabled', 'UtilityLang': 'English', 'VirtualInstallDisk': 'Disabled', 'VirtualSerialPort': 'Com1Irq4', 'VlanControl': 'Disabled', 'VlanId': 0, 'VlanPriority': 0, 'WakeOnLan': 'Enabled', 'WorkloadProfile': 'GeneralPowerEfficientCompute', 'XptPrefetcher': 'Auto', 'iSCSIPolicy': 'SoftwareInitiator'} ``` delete_raid_configuration() --------------------------- Deletes all logical drives from the system. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.delete_raid_configuration() ``` create_raid_configuration(raid_config) -------------------------------------- Creates raid configuration on the hardware. Takes a dictionary containing target raid configuration data as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> raid_config = { 'logical_disks': [{'size_gb': 279, 'physical_disks': [u'1I:1:2'], 'raid_level': u'0'}]} >>> ilo_client.create_raid_configuration(raid_config) ``` read_raid_configuration(raid_config=None) ----------------------------------------- Reads the raid configuration of the hardware. In case of post-delete read the *raid_config* value is None. In case of post-create, *raid_config* is a dictionary containing target raid configuration data. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.read_raid_configuration() {'logical_disks': [{'size_gb': 279, 'physical_disks': [u'1I:1:2'], 'raid_level': u'0', 'root_device_hint': {'wwn': u'0x600508B1001C99DF1EAFA712BAFECD59'}, 'controller': None, 'volume_name': u'd625fcce-6750-4b5a-93e1-a08abf7f6060'}]} ``` get_bios_settings_result() -------------------------- Returns the result of bios settings applied ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_bios_settings_result() {'status': 'success', 'results': [{u'MessageId': u'Base.1.0.Success'}]} ``` add_tls_certificate(cert_file_list) ----------------------------------- Adds the TLS certificate to the iLO ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.add_tls_certificate(['/xyz/ilo.crt']) ``` remove_tls_certificate(fp_list) ----------------------------------- Removes the TLS certificate from the iLO ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> fp = 'FA:3A:68:C7:7E:ED:90:21:D2:FA:3E:54:6B:0C:14:D3:2F:8D:43:50:F7:05:A7:0F:1C:68:35:DB:5C:D2:53:28' >>> ilo_client.remove_tls_certificate([fp]) ``` ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/README.rst0000664000175000017500000000206600000000000016227 0ustar00zuulzuul00000000000000proliantutils ============= **proliantutils** is a set of utility libraries for interfacing and managing various components (like iLO, HPSSA) for HPE Proliant Servers. This library is used by iLO drivers in Ironic for managing Proliant Servers (though the library can be used by anyone who wants to manage HPE Proliant servers). Please use launchpad_ to report bugs and ask questions. .. _launchpad: https://bugs.launchpad.net/proliantutils Installation ------------ Install the module from PyPI_. If you are using Ironic, install the module on Ironic conductor node:: pip install proliantutils .. _PyPI: https://pypi.python.org/pypi/proliantutils Some GNU/Linux distributions provide *python-proliantutils* package. Usage ----- iLO ~~~ For interfacing with the iLO, use *IloClient* object:: >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_power_status() 'OFF' >>> For operations supported on the client object, please refer *proliantutils.ilo.operations*. ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2226644 proliantutils-2.16.0/doc/0000775000175000017500000000000000000000000015301 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/doc/Makefile0000664000175000017500000001521700000000000016747 0ustar00zuulzuul00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ProliantUtils.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ProliantUtils.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/ProliantUtils" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ProliantUtils" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2226644 proliantutils-2.16.0/doc/hpssa/0000775000175000017500000000000000000000000016417 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/doc/hpssa/index.rst0000664000175000017500000000425000000000000020261 0ustar00zuulzuul00000000000000hpssa module ============ Example:: # cat raid_configuration.json { "logical_disks": [ { "size_gb": 100, "raid_level": "1", "controller": "Smart Array P822 in Slot 2", "physical_disks": [ "5I:1:1", "5I:1:2" ] }, { "size_gb": 100, "raid_level": "5", "controller": "Smart Array P822 in Slot 2", "physical_disks": [ "5I:1:3", "5I:1:4", "6I:1:5" ] } ] } # python Python 2.7.5 (default, Nov 3 2014, 14:26:24) [GCC 4.8.3 20140911 (Red Hat 4.8.3-7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import json >>> raid_config = json.loads(open('raid_configuration.json', 'r').read()) >>> from proliantutils.hpssa import manager >>> manager.get_configuration() {'logical_disks': []} >>> manager.create_configuration(raid_config) >>> manager.get_configuration() {'logical_disks': [{'size_gb': 100, 'physical_disks': ['5I:1:3', '6I:1:5', '5I:1:4'], 'raid_level': '5', 'root_device_hint': {'wwn': '600508B1001C9F62EB256593E19BBA30'}, 'controller': 'Smart Array P822 in Slot 2', 'volume_name': '061D6735PDVTF0BRH5T0MO4682'}, {'size_gb': 100, 'physical_disks': ['5I:1:1', '5I:1:2'], 'raid_level': '1', 'root_device_hint': {'wwn': '600508B1001C59DB9584108610B04BB0'}, 'controller': 'Smart Array P822 in Slot 2', 'volume_name': '021D672FPDVTF0BRH5T0MO287A'}]} >>> exit Use exit() or Ctrl-D (i.e. EOF) to exit >>> exit() # ls /dev/sd* /dev/sda /dev/sdb # python Python 2.7.5 (default, Nov 3 2014, 14:26:24) [GCC 4.8.3 20140911 (Red Hat 4.8.3-7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from proliantutils.hpssa import manager >>> manager.delete_configuration() >>> manager.get_configuration() {'logical_disks': []} >>> # ls /dev/sd* ls: cannot access /dev/sd*: No such file or directory # ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/doc/make.bat0000664000175000017500000001510400000000000016707 0ustar00zuulzuul00000000000000@ECHO OFF REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set BUILDDIR=build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source set I18NSPHINXOPTS=%SPHINXOPTS% source if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% ) if "%1" == "" goto help if "%1" == "help" ( :help echo.Please use `make ^` where ^ is one of echo. html to make standalone HTML files echo. dirhtml to make HTML files named index.html in directories echo. singlehtml to make a single large HTML file echo. pickle to make pickle files echo. json to make JSON files echo. htmlhelp to make HTML files and a HTML help project echo. qthelp to make HTML files and a qthelp project echo. devhelp to make HTML files and a Devhelp project echo. epub to make an epub echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter echo. text to make text files echo. man to make manual pages echo. texinfo to make Texinfo files echo. gettext to make PO message catalogs echo. changes to make an overview over all changed/added/deprecated items echo. xml to make Docutils-native XML files echo. pseudoxml to make pseudoxml-XML files for display purposes echo. linkcheck to check all external links for integrity echo. doctest to run all doctests embedded in the documentation if enabled goto end ) if "%1" == "clean" ( for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i del /q /s %BUILDDIR%\* goto end ) %SPHINXBUILD% 2> nul if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.installed, then set the SPHINXBUILD environment variable to point echo.to the full path of the 'sphinx-build' executable. Alternatively you echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) if "%1" == "html" ( %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/html. goto end ) if "%1" == "dirhtml" ( %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. goto end ) if "%1" == "singlehtml" ( %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. goto end ) if "%1" == "pickle" ( %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the pickle files. goto end ) if "%1" == "json" ( %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the JSON files. goto end ) if "%1" == "htmlhelp" ( %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run HTML Help Workshop with the ^ .hhp project file in %BUILDDIR%/htmlhelp. goto end ) if "%1" == "qthelp" ( %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: echo.^> qcollectiongenerator %BUILDDIR%\qthelp\ProliantUtils.qhcp echo.To view the help file: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\ProliantUtils.ghc goto end ) if "%1" == "devhelp" ( %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp if errorlevel 1 exit /b 1 echo. echo.Build finished. goto end ) if "%1" == "epub" ( %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub if errorlevel 1 exit /b 1 echo. echo.Build finished. The epub file is in %BUILDDIR%/epub. goto end ) if "%1" == "latex" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex if errorlevel 1 exit /b 1 echo. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. goto end ) if "%1" == "latexpdf" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex cd %BUILDDIR%/latex make all-pdf cd %BUILDDIR%/.. echo. echo.Build finished; the PDF files are in %BUILDDIR%/latex. goto end ) if "%1" == "latexpdfja" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex cd %BUILDDIR%/latex make all-pdf-ja cd %BUILDDIR%/.. echo. echo.Build finished; the PDF files are in %BUILDDIR%/latex. goto end ) if "%1" == "text" ( %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text if errorlevel 1 exit /b 1 echo. echo.Build finished. The text files are in %BUILDDIR%/text. goto end ) if "%1" == "man" ( %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man if errorlevel 1 exit /b 1 echo. echo.Build finished. The manual pages are in %BUILDDIR%/man. goto end ) if "%1" == "texinfo" ( %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo if errorlevel 1 exit /b 1 echo. echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. goto end ) if "%1" == "gettext" ( %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale if errorlevel 1 exit /b 1 echo. echo.Build finished. The message catalogs are in %BUILDDIR%/locale. goto end ) if "%1" == "changes" ( %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes if errorlevel 1 exit /b 1 echo. echo.The overview file is in %BUILDDIR%/changes. goto end ) if "%1" == "linkcheck" ( %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck if errorlevel 1 exit /b 1 echo. echo.Link check complete; look for any errors in the above output ^ or in %BUILDDIR%/linkcheck/output.txt. goto end ) if "%1" == "doctest" ( %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest if errorlevel 1 exit /b 1 echo. echo.Testing of doctests in the sources finished, look at the ^ results in %BUILDDIR%/doctest/output.txt. goto end ) if "%1" == "xml" ( %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml if errorlevel 1 exit /b 1 echo. echo.Build finished. The XML files are in %BUILDDIR%/xml. goto end ) if "%1" == "pseudoxml" ( %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml if errorlevel 1 exit /b 1 echo. echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. goto end ) :end ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/doc/proliantutils_api_reference.md0000664000175000017500000013504600000000000023414 0ustar00zuulzuul00000000000000# Proliantutils documentation Introduction ============ **Proliantutils** is a set of python utility libraries for interfacing and managing various components (like iLO, HPSSA) for HPE iLO-based Servers. This library uses Redfish to interact with Gen10 servers and RIBCL/RIS to interact with Gen8 and Gen9 servers. A subset of proliantutils can be used to discover server properties (aka **Discovery Engine**). Please use [launchpad](https://bugs.launchpad.net/proliantutils) to report bugs and ask questions. Installation ============ Install the module from [PyPI](https://pypi.python.org/pypi/proliantutils). If you are using Ironic, install the module on Ironic conductor node: ```$ pip install proliantutils``` **Some GNU/Linux distributions provide *python-proliantutils* package.** Supported Operations ==================== Creating an IloClient object for interfacing with the iLO, use *IloClient* object: ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_power_status() 'OFF' ``` **For operations supported on the client object, please refer *proliantutils.ilo.operations*.** get_all_licenses() ------------------ Retrieves license type, key, installation date, etc. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_all_licenses() {'LICENSE_TIER': 'ADV', 'LICENSE_INSTALL_DATE': '10 May 2019', 'LICENSE_CLASS': 'FQL', 'LICENSE_TYPE': 'iLO Advanced', 'LICENSE_KEY': 'YOUR_LICENSE_KEY', 'LICENSE_STATE': 'unconfirmed'} ``` get_product_name() ------------------ Retrieves the model name of the queried server. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_product_name() u'ProLiant DL360 Gen10' ``` get_host_power_status() ---------------------- Retrieves the power status of the server. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_power_status() 'ON' ``` get_http_boot_url() ------------------- Retrieves the http boot url. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_http_boot_url() u'http://10.10.1.30:8081/startup.nsh' ``` set_http_boot_url(url) ---------------------- Set the url to the UefiShellStartupUrl. Takes url for http boot as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.set_http_boot_url("http://10.10.1.30:8081/startup.nsh") ``` set_iscsi_info(target_name, lun, ip_address, port='3260', auth_method=None, username=None, password=None, macs=[]) ------------------------------------------------------------------------------------------------------------------ Sets iscsi details of the system in uefi boot mode. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.set_iscsi_info('iqn.2011-07.com:example:123', '1', '10.10.1.23', '3260', 'CHAP', 'user', 'password') ``` unset_iscsi_info(macs=[]) ------------------------- Disable iscsi boot option of the system in uefi boot mode. Takes a list of target MAC addresses as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.unset_iscsi_info(['98:f2:b3:ee:f4:00']) ``` get_iscsi_initiator_info() -------------------------- Retrieves iSCSI initiator information of iLO. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_iscsi_initiator_info() 'iqn.2015-02.com.hpe:uefi-U32-G393NR9113' ``` set_iscsi_initiator_info(initiator_iqn) --------------------------------------- Sets iSCSI initiator information of iLO. Takes an initiator iqn for iLO as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.set_iscsi_initiator_info('iqn.2015-02.com.hpe:uefi-U32-G393NR9113') ``` get_one_time_boot() ------------------- Retrieves the current setting for the one time boot. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_one_time_boot() 'Normal' ``` get_vm_status(device='FLOPPY') ------------------------------ Retrieves the virtual media drive status like url, is connected, etc. Takes virtual media *device* as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_vm_status('FLOPPY') {'WRITE_PROTECT': 'NO', 'VM_APPLET': 'DISCONNECTED', 'IMAGE_URL': u'', 'BOOT_OPTION': 'NO_BOOT', 'DEVICE': 'FLOPPY', 'IMAGE_INSERTED': 'NO'} ``` reset_server() -------------- Resets the server. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.reset_server() ``` press_pwr_btn() --------------- Simulates a physical press of the server power button. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_power_status() u'ON' >>> ilo_client.press_pwr_btn() >>> ilo_client.get_host_power_status() u'OFF' ``` hold_pwr_btn() -------------- Simulate a physical press and hold of the server power button. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_power_status() u'ON' >>> ilo_client.hold_pwr_btn() >>> ilo_client.get_host_power_status() u'OFF' ``` set_host_power(power) --------------------- Toggles the power button of the server. Takes power status as argument. The power status values can be ‘ON’ or ‘OFF’. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.set_host_power('ON') >>> ilo_client.get_host_power_status() u'ON' >>> ilo_client.set_host_power('OFF') >>> ilo_client.get_host_power_status() u'OFF' ``` set_one_time_boot(value) ------------------------ Configures the server for a single boot from a specific device. Takes a boot device value as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_one_time_boot() 'Normal' >>> ilo_client.set_one_time_boot('CDROM') >>> ilo_client.get_one_time_boot() 'CDROM' ``` insert_virtual_media(url, device=’FLOPPY’) ------------------------------------------ Notifies iLO of the location of a virtual media diskette image. Takes the virtual media url and device as arguments. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.insert_virtual_media(url='http://172.17.1.41:8001/rhel_8_1.iso', device='FLOPPY') >>> ilo_client.get_vm_status('FLOPPY') {'WRITE_PROTECT': 'YES', 'VM_APPLET': 'CONNECTED', 'IMAGE_URL': u'http://172.17.1.41:8001/rhel_8_1.iso', 'BOOT_OPTION': 'BOOT_ALWAYS', 'DEVICE': 'FLOPPY', 'IMAGE_INSERTED': 'YES'} ``` eject_virtual_media(device=’FLOPPY’) ------------------------------------ Ejects the Virtual Media image if one is inserted. Takes virtual media device as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.eject_virtual_media(device='FLOPPY') >>> ilo_client.get_vm_status('FLOPPY') {'WRITE_PROTECT': 'YES', 'VM_APPLET': 'DISCONNECTED', 'IMAGE_URL': u'', 'BOOT_OPTION': 'NO_BOOT', 'DEVICE': 'FLOPPY', 'IMAGE_INSERTED': 'NO'} ``` set_vm_status(device=’FLOPPY’, boot_option=’BOOT_ONCE’, write_protect=’YES’) ---------------------------------------------------------------------------- Sets the Virtual Media drive status and allows the boot options for booting from the virtual media. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.set_vm_status(device='FLOPPY', boot_option='BOOT_ONCE', write_protect='YES') ``` get_current_boot_mode() ----------------------- Retrieves the current boot mode settings. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_current_boot_mode() u'UEFI' ``` get_pending_boot_mode() ----------------------- Retrieves the pending boot mode settings ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_pending_boot_mode() u'UEFI' ``` get_supported_boot_mode() ------------------------- Lists all supported boot modes ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_supported_boot_mode() 'legacy bios and uefi' ``` set_pending_boot_mode(value) ---------------------------- Sets the boot mode of the system for next boot. Takes boot mode as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.set_pending_boot_mode('UEFI') >>> ilo_client.get_pending_boot_mode() u'UEFI' ``` get_persistent_boot_device() ---------------------------- Retrieves the current persistent boot device set for the host ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_persistent_boot_device() 'CDROM' ``` update_persistent_boot(device_type=[]) -------------------------------------- Updates persistent boot based on the boot mode. Takes list of boot devices as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.update_persistent_boot(['cdrom']) ``` get_secure_boot_mode() ---------------------- Retrieves whether secure boot is enabled or not. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_secure_boot_mode() False ``` set_secure_boot_mode(secure_boot_enable) ---------------------------------------- Enables/Disables secure boot on the server. Takes boolean value as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_secure_boot_mode() False >>> ilo_client.set_secure_boot_mode(True) >>> ilo_client.get_secure_boot_mode() True ``` reset_secure_boot_keys() ------------------------ Resets secure boot keys to manufacturing defaults. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.reset_secure_boot_keys() ``` clear_secure_boot_keys() ------------------------ Resets all keys. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.clear_secure_boot_keys() ``` reset_ilo_credential(password) ------------------------------ Resets the iLO password. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.reset_ilo_credential('Pa5sword') ``` reset_ilo() ----------- Resets the server iLO. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.reset_ilo() ``` reset_bios_to_default() ----------------------- Resets the BIOS settings to default values. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.reset_bios_to_default() ``` get_host_uuid() --------------- Retrieves the host UUID of the server ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_uuid() ('ProLiant DL180 Gen9', '35343537-3432-4753-4836-34305752394B') ``` get_host_health_data(data=None) ------------------------------- Returns the dictionary containing the embedded health data. Takes *data* to be retrieved as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_health_data() {'VERSION': '2.23', 'RESPONSE': {'STATUS': '0x0000', 'MESSAGE': 'No error'}, ...... } ``` get_host_health_present_power_reading(data=None) ------------------------------------------------ Returns the power consumption of the server. Takes *data* to be retrieved as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_health_present_power_reading() '0 Watts' ``` get_host_health_power_supplies(data=None) ----------------------------------------- Returns the health information of power supplies. Takes *data* to be retrieved as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_health_power_supplies() [{'STATUS': {'VALUE': 'Unknown'}, 'CAPACITY': {'VALUE': 'N/A'}, 'PDS': {'VALUE': 'Other'}, 'LABEL': {'VALUE': 'Power Supply 1'}, 'HOTPLUG_CAPABLE': {'VALUE': 'No'}, 'SPARE': {'VALUE': 'N/A'}, 'SERIAL_NUMBER': {'VALUE': 'N/A'}, 'MODEL': {'VALUE': 'N/A'}, 'FIRMWARE_VERSION': {'VALUE': 'N/A'}, 'PRESENT': {'VALUE': 'No'}}] ``` get_host_health_fan_sensors(data=None) -------------------------------------- Returns the health information from Fan Sensors. Takes *data* to be retrieved as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_health_fan_sensors() [{'STATUS': {'VALUE': 'Other'}, 'SPEED': {'UNIT': 'Percentage', 'VALUE': '0'}, 'ZONE': {'VALUE': 'System'}, 'LABEL': {'VALUE': 'Fan 1'}}, {'STATUS': {'VALUE': 'Other'}, 'SPEED': {'UNIT': 'Percentage', 'VALUE': '0'}, 'ZONE': {'VALUE': 'System'}, 'LABEL': {'VALUE': 'Fan 2'}}, {'STATUS': {'VALUE': 'Other'}, 'SPEED': {'UNIT': 'Percentage', 'VALUE': '0'}, 'ZONE': {'VALUE': 'System'}, 'LABEL': {'VALUE': 'Fan 3'}}, {'STATUS': {'VALUE': 'Other'}, 'SPEED': {'UNIT': 'Percentage', 'VALUE': '0'}, 'ZONE': {'VALUE': 'System'}, 'LABEL': {'VALUE': 'Fan 4'}}, {'STATUS': {'VALUE': 'Other'}, 'SPEED': {'UNIT': 'Percentage', 'VALUE': '0'}, 'ZONE': {'VALUE': 'System'}, 'LABEL': {'VALUE': 'Fan 5'}}] ``` get_host_health_temperature_sensors(data=None) ---------------------------------------------- Returns the health information from Temperature Sensors. Takes *data* to be retrieved as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_health_temperature_sensors() [{'LABEL': {'VALUE': '01-CPU 1'}, 'LOCATION': {'VALUE': 'CPU'}, 'STATUS': {'VALUE': 'Not Installed'}, 'CURRENTREADING': {'VALUE': 'N/A'}, 'CAUTION': {'VALUE': 'N/A'}, 'CRITICAL': {'VALUE': 'N/A'}},, {'LABEL': {'VALUE': '02-CPU 1'}, 'LOCATION': {'VALUE': 'CPU'}, 'STATUS': {'VALUE': 'OK'}, 'CURRENTREADING': {'VALUE': '40', 'UNIT': 'Celsius'}, 'CAUTION': {'VALUE': '70', 'UNIT': 'Celsius'}, 'CRITICAL': {'VALUE': 'N/A'}}, {'LABEL': {'VALUE': '03-CPU 2'}, 'LOCATION': {'VALUE': 'CPU'}, 'STATUS': {'VALUE': 'Not Installed'}, 'CURRENTREADING': {'VALUE': 'N/A'}, 'CAUTION': {'VALUE': 'N/A'}, 'CRITICAL': {'VALUE': 'N/A'}}, {'LABEL': {'VALUE': '04-CPU 2'}, 'LOCATION': {'VALUE': 'CPU'}, 'STATUS': {'VALUE': 'Not Installed'}, 'CURRENTREADING': {'VALUE': 'N/A'}, 'CAUTION': {'VALUE': 'N/A'}, 'CRITICAL': {'VALUE': 'N/A'}}] ``` get_host_health_at_a_glance(data=None) -------------------------------------- Returns health at a glance report. Takes *data* to be retrieved as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_health_at_a_glance() {'TEMPERATURE': {'STATUS': 'Not Installed'}, 'BATTERY': {'STATUS': 'Not Installed'}, 'STORAGE': {'STATUS': 'OK'}, 'FANS': {'STATUS': 'Not Installed'}, 'BIOS_HARDWARE': {'STATUS': 'OK'}, 'MEMORY': {'STATUS': 'Other'}, 'POWER_SUPPLIES': {'STATUS': 'Not Installed'}, 'PROCESSOR': {'STATUS': 'OK'}, 'NETWORK': {'STATUS': 'OK'}} ``` get_host_power_readings() ------------------------- Returns the host power reading. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_power_readings() {'MAXIMUM_POWER_READING': {'UNIT': 'Watts', 'VALUE': '243'}, 'MINIMUM_POWER_READING': {'UNIT': 'Watts', 'VALUE': '136'}, 'PRESENT_POWER_READING': {'UNIT': 'Watts', 'VALUE': '224'}, 'AVERAGE_POWER_READING': {'UNIT': 'Watts', 'VALUE': '162'}} ``` get_essential_properties() -------------------------- Returns the essential scheduling properties. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_essential_properties() {'macs': {u'Port 6': u'80:30:e0:2d:3f:31', u'Port 5': u'80:30:e0:2d:3f:30'}, 'properties': {'memory_mb': 65536, 'cpu_arch': 'x86', 'local_gb': 278, 'cpus': 48}} ``` get_server_capabilities() ------------------------- Returns hardware properties which can be used for scheduling. This method can discover the following properties: * **ilo_firmware_version**: iLO firmware version * **rom_firmware_version**: ROM firmware version * **secure_boot**: secure boot is supported or not. The possible values are ‘true’ or ‘false’. The value is returned as ‘true’ if secure boot is supported by the server. * **server_model**: server model * **pci_gpu_devices**: number of gpu devices connected to the bare metal. * **nic_capacity**: the max speed of the embedded NIC adapter. * **sriov_enabled**: true, if server has the SRIOV supporting NIC. * **has_rotational**: true, if server has HDD disk. * **has_ssd**: true, if server has SSD disk. * **has_nvme_ssd**: true, if server has NVME SSD disk. * **cpu_vt**: true, if server supports cpu virtualization. * **hardware_supports_raid**: true, if RAID can be configured on the server using RAID controller. * **nvdimm_n**: true, if server has NVDIMM_N type of persistent memory. * **persistent_memory**: true, if server has persistent memory. * **logical_nvdimm_n**: true, if server has logical NVDIMM_N configured. * **boot_mode_bios**: true, if server boot mode is BIOS. * **boot_mode_uefi**: true, if server boot mode is UEFI. * **iscsi_boot**: true, if server supported UEFI iSCSI boot. * **rotational_drive__rpm**: The capabilities *rotational_drive_4800_rpm*, *rotational_drive_5400_rpm*, *rotational_drive_7200_rpm*, *rotational_drive_10000_rpm* and *rotational_drive_15000_rpm* are set to true if the server has HDD drives with speed of 4800, 5400, 7200, 10000 and 15000 rpm respectively. * **logical_raid_level_**: The capabilities *logical_raid_level_0*, *logical_raid_level_1*, *logical_raid_level_2*, *logical_raid_level_5*, *logical_raid_level_6*, *logical_raid_level_10*, *logical_raid_level_50* and *logical_raid_level_60* are set to true if any of the raid levels among 0, 1, 2, 5, 6, 10, 50 and 60 are configured on the system. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_server_capabilities() {'logical_raid_level_0': 'true', 'has_rotational': 'true', 'rom_firmware_version': u'U32 v2.02 (03/19/2019)', 'hardware_supports_raid': 'true', 'cpu_vt': 'true', 'sriov_enabled': 'true', 'boot_mode_bios': 'true', 'trusted_boot': 'true', 'boot_mode_uefi': 'true', 'server_model': u'ProLiant DL360 Gen10', 'nic_capacity': '16Gb', 'pci_gpu_devices': 1, 'ilo_firmware_version': u'iLO 5 v1.40', 'secure_boot': 'true', 'drive_rotational_10000_rpm': 'true', 'iscsi_boot': 'true'} ``` activate_license(key) --------------------- Activates iLO license. Takes license key as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.activate_license('YOUR_LICENSE_KEY') ``` update_firmware(firmware_url, component_type) --------------------------------------------- Updates the given firmware on the server. Takes location of firmware file and the component to be applied to as arguments. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.update_firmware('http://172.17.1.41/ilo_firmware', 'ilo') ``` inject_nmi() ------------ Injects an NMI (Non Maskable Interrupt) for a node immediately. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.inject_nmi() ``` get_host_post_state() --------------------- Returns the current state of system POST. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_post_state() 'InPostDiscoveryComplete' ``` get_current_bios_settings(only_allowed_settings=False) ------------------------------------------------------ Returns current BIOS settings. When *only_allowed_settings* is set to True, only allowed BIOS settings are returned. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_current_bios_settings(only_allowed_settings=True) {'PowerRegulator': u'DynamicPowerSavings', 'AdvancedMemProtection': u'FastFaultTolerantADDDC', 'DynamicPowerCapping': u'Disabled', 'BootOrderPolicy': u'RetryIndefinitely', 'Sriov': u'Enabled', 'AutoPowerOn': u'RestoreLastState', 'IntelProcVtd': u'Enabled', 'ProcVirtualization': u'Enabled', 'ThermalShutdown': u'Enabled', 'IntelTxt': u'Disabled', 'SecureBootStatus': u'Disabled', 'WorkloadProfile': u'GeneralPowerEfficientCompute', 'IntelPerfMonitoring': u'Disabled', 'TpmType': u'Tpm20', 'UefiOptimizedBoot': u'Enabled', 'ThermalConfig': u'OptimalCooling', 'ProcAes': u'Enabled', 'BootMode': u'Uefi', 'ProcTurbo': u'Enabled', 'IntelligentProvisioning': u'Enabled', 'ProcHyperthreading': u'Enabled', 'TpmState': u'PresentEnabled', 'CollabPowerControl': u'Enabled'} ``` When *only_allowed_settings* is set to False, all the BIOS settings supported by iLO are returned. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_current_bios_settings(only_allowed_settings=False) {'AcpiHpet': 'Enabled', 'AcpiRootBridgePxm': 'Enabled', 'AcpiSlit': 'Enabled', 'AdjSecPrefetch': 'Enabled', 'AdminEmail': '', 'AdminName': '', 'AdminOtherInfo': '', 'AdminPhone': '', 'AdvCrashDumpMode': 'Disabled', 'AdvancedMemProtection': 'FastFaultTolerantADDDC', 'AsrStatus': 'Enabled', 'AsrTimeoutMinutes': 'Timeout10', 'AssetTagProtection': 'Unlocked', 'AutoPowerOn': 'RestoreLastState', 'BootMode': 'LegacyBios', 'BootOrderPolicy': 'RetryIndefinitely', 'ChannelInterleaving': 'Enabled', 'CollabPowerControl': 'Enabled', 'ConsistentDevNaming': 'LomsAndSlots', 'CustomPostMessage': '', 'DaylightSavingsTime': 'Disabled', 'DcuIpPrefetcher': 'Enabled', 'DcuStreamPrefetcher': 'Enabled', 'Dhcpv4': 'Enabled', 'DynamicPowerCapping': 'Disabled', 'EmbNicEnable': 'Auto', 'EmbNicLinkSpeed': 'Auto', 'EmbNicPCIeOptionROM': 'Enabled', 'EmbSas1Aspm': 'Disabled', 'EmbSas1Boot': 'TwentyFourTargets', 'EmbSas1Enable': 'Auto', 'EmbSas1LinkSpeed': 'Auto', 'EmbSas1PcieOptionROM': 'Enabled', 'EmbSata1Aspm': 'Disabled', 'EmbSata2Aspm': 'Disabled', 'EmbVideoConnection': 'Auto', 'EmbeddedDiagnostics': 'Enabled', 'EmbeddedSata': 'Ahci', 'EmbeddedSerialPort': 'Com2Irq3', 'EmbeddedUefiShell': 'Enabled', 'EmsConsole': 'Disabled', 'EnabledCoresPerProc': 0, 'EnergyEfficientTurbo': 'Enabled', 'EnergyPerfBias': 'BalancedPerf', 'EraseUserDefaults': 'No', 'ExtendedAmbientTemp': 'Disabled', 'ExtendedMemTest': 'Disabled', 'F11BootMenu': 'Enabled', 'FCScanPolicy': 'CardConfig', 'FanFailPolicy': 'Shutdown', 'FanInstallReq': 'EnableMessaging', 'FlexLom1Aspm': 'Disabled', 'HttpSupport': 'Auto', 'HwPrefetcher': 'Enabled', 'IODCConfiguration': 'Auto', 'IntelDmiLinkFreq': 'Auto', 'IntelNicDmaChannels': 'Enabled', 'IntelPerfMonitoring': 'Disabled', 'IntelProcVtd': 'Enabled', 'IntelligentProvisioning': 'Enabled', 'InternalSDCardSlot': 'Enabled', 'Ipv4Address': '0.0.0.0', 'Ipv4Gateway': '0.0.0.0', 'Ipv4PrimaryDNS': '0.0.0.0', 'Ipv4SecondaryDNS': '0.0.0.0', 'Ipv4SubnetMask': '0.0.0.0', 'Ipv6Address': '::', 'Ipv6ConfigPolicy': 'Automatic', 'Ipv6Duid': 'Auto', 'Ipv6Gateway': '::', 'Ipv6PrimaryDNS': '::', 'Ipv6SecondaryDNS': '::', 'LLCDeadLineAllocation': 'Enabled', 'LlcPrefetch': 'Disabled', 'LocalRemoteThreshold': 'Auto', 'MaxMemBusFreqMHz': 'Auto', 'MaxPcieSpeed': 'PerPortCtrl', 'MemClearWarmReset': 'Disabled', 'MemFastTraining': 'Enabled', 'MemMirrorMode': 'Full', 'MemPatrolScrubbing': 'Enabled', 'MemRefreshRate': 'Refreshx1', 'MemoryControllerInterleaving': 'Auto', 'MemoryRemap': 'NoAction', 'MinProcIdlePkgState': 'C6Retention', 'MinProcIdlePower': 'C6', 'MixedPowerSupplyReporting': 'Enabled', 'NetworkBootRetry': 'Enabled', 'NetworkBootRetryCount': 20, 'NicBoot1': 'NetworkBoot', 'NicBoot2': 'Disabled', 'NicBoot3': 'Disabled', 'NicBoot4': 'Disabled', 'NodeInterleaving': 'Disabled', 'NumaGroupSizeOpt': 'Flat', 'NvmeOptionRom': 'Enabled', 'OpportunisticSelfRefresh': 'Disabled', 'PciPeerToPeerSerialization': 'Disabled', 'PciResourcePadding': 'Normal', 'PersistentMemBackupPowerPolicy': 'WaitForBackupPower', 'PostBootProgress': 'Disabled', 'PostDiscoveryMode': 'Auto', 'PostF1Prompt': 'Delayed20Sec', 'PostVideoSupport': 'DisplayAll', 'PowerButton': 'Enabled', 'PowerOnDelay': 'NoDelay', 'PowerRegulator': 'DynamicPowerSavings', 'PreBootNetwork': 'Auto', 'PrebootNetworkEnvPolicy': 'Auto', 'PrebootNetworkProxy': '', 'ProcAes': 'Enabled', 'ProcHyperthreading': 'Enabled', 'ProcTurbo': 'Enabled', 'ProcVirtualization': 'Enabled', 'ProcX2Apic': 'Enabled', 'ProcessorConfigTDPLevel': 'Normal', 'ProcessorJitterControl': 'Disabled', 'ProcessorJitterControlFrequency': 0, 'ProcessorJitterControlOptimization': 'ZeroLatency', 'ProductId': '868703-B21', 'RedundantPowerSupply': 'BalancedMode', 'RemovableFlashBootSeq': 'ExternalKeysFirst', 'RestoreDefaults': 'No', 'RestoreManufacturingDefaults': 'No', 'RomSelection': 'CurrentRom', 'SataSecureErase': 'Disabled', 'SaveUserDefaults': 'No', 'SecStartBackupImage': 'Disabled', 'SecureBootStatus': 'Disabled', 'SerialConsoleBaudRate': 'BaudRate115200', 'SerialConsoleEmulation': 'Vt100Plus', 'SerialConsolePort': 'Auto', 'SerialNumber': 'SGH744YPVS', 'ServerAssetTag': '', 'ServerConfigLockStatus': 'Disabled', 'ServerName': 'localhost', 'ServerOtherInfo': '', 'ServerPrimaryOs': '', 'ServiceEmail': '', 'ServiceName': '', 'ServiceOtherInfo': '', 'ServicePhone': '', 'SetupBrowserSelection': 'Auto', 'Sriov': 'Enabled', 'StaleAtoS': 'Disabled', 'SubNumaClustering': 'Disabled', 'ThermalConfig': 'OptimalCooling', 'ThermalShutdown': 'Enabled', 'TimeFormat': 'Utc', 'TimeZone': 'Utc0', 'TpmChipId': 'None', 'TpmFips': 'NotSpecified', 'TpmState': 'NotPresent', 'TpmType': 'NoTpm', 'UefiOptimizedBoot': 'Disabled', 'UefiSerialDebugLevel': 'Disabled', 'UefiShellBootOrder': 'Disabled', 'UefiShellScriptVerification': 'Disabled', 'UefiShellStartup': 'Disabled', 'UefiShellStartupLocation': 'Auto', 'UefiShellStartupUrl': '', 'UefiShellStartupUrlFromDhcp': 'Disabled', 'UncoreFreqScaling': 'Auto', 'UrlBootFile': '', 'UrlBootFile2': '', 'UrlBootFile3': '', 'UrlBootFile4': '', 'UsbBoot': 'Enabled', 'UsbControl': 'UsbEnabled', 'UserDefaultsState': 'Disabled', 'UtilityLang': 'English', 'VirtualInstallDisk': 'Disabled', 'VirtualSerialPort': 'Com1Irq4', 'VlanControl': 'Disabled', 'VlanId': 0, 'VlanPriority': 0, 'WakeOnLan': 'Enabled', 'WorkloadProfile': 'GeneralPowerEfficientCompute', 'XptPrefetcher': 'Auto', 'iSCSIPolicy': 'SoftwareInitiator'} ``` get_pending_bios_settings(only_allowed_settings=False) ------------------------------------------------------ Returns pending BIOS settings. When *only_allowed_settings* is set to True, only allowed BIOS settings are returned. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_pending_bios_settings(True) {'PowerRegulator': u'DynamicPowerSavings', 'AdvancedMemProtection': u'FastFaultTolerantADDDC', 'DynamicPowerCapping': u'Disabled', 'BootOrderPolicy': u'RetryIndefinitely', 'Sriov': u'Enabled', 'AutoPowerOn': u'RestoreLastState', 'IntelProcVtd': u'Enabled', 'ProcVirtualization': u'Enabled', 'ThermalShutdown': u'Enabled', 'IntelTxt': u'Disabled', 'SecureBootStatus': u'Disabled', 'WorkloadProfile': u'GeneralPowerEfficientCompute', 'IntelPerfMonitoring': u'Disabled', 'TpmType': u'Tpm20', 'UefiOptimizedBoot': u'Enabled', 'ThermalConfig': u'OptimalCooling', 'ProcAes': u'Enabled', 'BootMode': u'Uefi', 'ProcTurbo': u'Enabled', 'IntelligentProvisioning': u'Enabled', 'ProcHyperthreading': u'Enabled', 'TpmState': u'PresentEnabled', 'CollabPowerControl': u'Enabled'} ``` When *only_allowed_settings* is set to False, all the BIOS settings supported by iLO are returned. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_pending_bios_settings(False) {'AcpiHpet': 'Enabled', 'AcpiRootBridgePxm': 'Enabled', 'AcpiSlit': 'Enabled', 'AdjSecPrefetch': 'Enabled', 'AdminEmail': '', 'AdminName': '', 'AdminOtherInfo': '', 'AdminPhone': '', 'AdvCrashDumpMode': 'Disabled', 'AdvancedMemProtection': 'FastFaultTolerantADDDC', 'AsrStatus': 'Enabled', 'AsrTimeoutMinutes': 'Timeout10', 'AssetTagProtection': 'Unlocked', 'AutoPowerOn': 'RestoreLastState', 'BootMode': 'LegacyBios', 'BootOrderPolicy': 'RetryIndefinitely', 'ChannelInterleaving': 'Enabled', 'CollabPowerControl': 'Enabled', 'ConsistentDevNaming': 'LomsAndSlots', 'CustomPostMessage': '', 'DaylightSavingsTime': 'Disabled', 'DcuIpPrefetcher': 'Enabled', 'DcuStreamPrefetcher': 'Enabled', 'Dhcpv4': 'Enabled', 'DynamicPowerCapping': 'Disabled', 'EmbNicEnable': 'Auto', 'EmbNicLinkSpeed': 'Auto', 'EmbNicPCIeOptionROM': 'Enabled', 'EmbSas1Aspm': 'Disabled', 'EmbSas1Boot': 'TwentyFourTargets', 'EmbSas1Enable': 'Auto', 'EmbSas1LinkSpeed': 'Auto', 'EmbSas1PcieOptionROM': 'Enabled', 'EmbSata1Aspm': 'Disabled', 'EmbSata2Aspm': 'Disabled', 'EmbVideoConnection': 'Auto', 'EmbeddedDiagnostics': 'Enabled', 'EmbeddedSata': 'Ahci', 'EmbeddedSerialPort': 'Com2Irq3', 'EmbeddedUefiShell': 'Enabled', 'EmsConsole': 'Disabled', 'EnabledCoresPerProc': 0, 'EnergyEfficientTurbo': 'Enabled', 'EnergyPerfBias': 'BalancedPerf', 'EraseUserDefaults': 'No', 'ExtendedAmbientTemp': 'Disabled', 'ExtendedMemTest': 'Disabled', 'F11BootMenu': 'Enabled', 'FCScanPolicy': 'CardConfig', 'FanFailPolicy': 'Shutdown', 'FanInstallReq': 'EnableMessaging', 'FlexLom1Aspm': 'Disabled', 'HttpSupport': 'Auto', 'HwPrefetcher': 'Enabled', 'IODCConfiguration': 'Auto', 'IntelDmiLinkFreq': 'Auto', 'IntelNicDmaChannels': 'Enabled', 'IntelPerfMonitoring': 'Disabled', 'IntelProcVtd': 'Enabled', 'IntelligentProvisioning': 'Enabled', 'InternalSDCardSlot': 'Enabled', 'Ipv4Address': '0.0.0.0', 'Ipv4Gateway': '0.0.0.0', 'Ipv4PrimaryDNS': '0.0.0.0', 'Ipv4SecondaryDNS': '0.0.0.0', 'Ipv4SubnetMask': '0.0.0.0', 'Ipv6Address': '::', 'Ipv6ConfigPolicy': 'Automatic', 'Ipv6Duid': 'Auto', 'Ipv6Gateway': '::', 'Ipv6PrimaryDNS': '::', 'Ipv6SecondaryDNS': '::', 'LLCDeadLineAllocation': 'Enabled', 'LlcPrefetch': 'Disabled', 'LocalRemoteThreshold': 'Auto', 'MaxMemBusFreqMHz': 'Auto', 'MaxPcieSpeed': 'PerPortCtrl', 'MemClearWarmReset': 'Disabled', 'MemFastTraining': 'Enabled', 'MemMirrorMode': 'Full', 'MemPatrolScrubbing': 'Enabled', 'MemRefreshRate': 'Refreshx1', 'MemoryControllerInterleaving': 'Auto', 'MemoryRemap': 'NoAction', 'MinProcIdlePkgState': 'C6Retention', 'MinProcIdlePower': 'C6', 'MixedPowerSupplyReporting': 'Enabled', 'NetworkBootRetry': 'Enabled', 'NetworkBootRetryCount': 20, 'NicBoot1': 'NetworkBoot', 'NicBoot2': 'Disabled', 'NicBoot3': 'Disabled', 'NicBoot4': 'Disabled', 'NodeInterleaving': 'Disabled', 'NumaGroupSizeOpt': 'Flat', 'NvmeOptionRom': 'Enabled', 'OpportunisticSelfRefresh': 'Disabled', 'PciPeerToPeerSerialization': 'Disabled', 'PciResourcePadding': 'Normal', 'PersistentMemBackupPowerPolicy': 'WaitForBackupPower', 'PostBootProgress': 'Disabled', 'PostDiscoveryMode': 'Auto', 'PostF1Prompt': 'Delayed20Sec', 'PostVideoSupport': 'DisplayAll', 'PowerButton': 'Enabled', 'PowerOnDelay': 'NoDelay', 'PowerRegulator': 'DynamicPowerSavings', 'PreBootNetwork': 'Auto', 'PrebootNetworkEnvPolicy': 'Auto', 'PrebootNetworkProxy': '', 'ProcAes': 'Enabled', 'ProcHyperthreading': 'Enabled', 'ProcTurbo': 'Enabled', 'ProcVirtualization': 'Enabled', 'ProcX2Apic': 'Enabled', 'ProcessorConfigTDPLevel': 'Normal', 'ProcessorJitterControl': 'Disabled', 'ProcessorJitterControlFrequency': 0, 'ProcessorJitterControlOptimization': 'ZeroLatency', 'ProductId': '868703-B21', 'RedundantPowerSupply': 'BalancedMode', 'RemovableFlashBootSeq': 'ExternalKeysFirst', 'RestoreDefaults': 'No', 'RestoreManufacturingDefaults': 'No', 'RomSelection': 'CurrentRom', 'SataSecureErase': 'Disabled', 'SaveUserDefaults': 'No', 'SecStartBackupImage': 'Disabled', 'SecureBootStatus': 'Disabled', 'SerialConsoleBaudRate': 'BaudRate115200', 'SerialConsoleEmulation': 'Vt100Plus', 'SerialConsolePort': 'Auto', 'SerialNumber': 'SGH744YPVS', 'ServerAssetTag': '', 'ServerConfigLockStatus': 'Disabled', 'ServerName': 'localhost', 'ServerOtherInfo': '', 'ServerPrimaryOs': '', 'ServiceEmail': '', 'ServiceName': '', 'ServiceOtherInfo': '', 'ServicePhone': '', 'SetupBrowserSelection': 'Auto', 'Sriov': 'Enabled', 'StaleAtoS': 'Disabled', 'SubNumaClustering': 'Disabled', 'ThermalConfig': 'OptimalCooling', 'ThermalShutdown': 'Enabled', 'TimeFormat': 'Utc', 'TimeZone': 'Utc0', 'TpmChipId': 'None', 'TpmFips': 'NotSpecified', 'TpmState': 'NotPresent', 'TpmType': 'NoTpm', 'UefiOptimizedBoot': 'Disabled', 'UefiSerialDebugLevel': 'Disabled', 'UefiShellBootOrder': 'Disabled', 'UefiShellScriptVerification': 'Disabled', 'UefiShellStartup': 'Disabled', 'UefiShellStartupLocation': 'Auto', 'UefiShellStartupUrl': '', 'UefiShellStartupUrlFromDhcp': 'Disabled', 'UncoreFreqScaling': 'Auto', 'UrlBootFile': '', 'UrlBootFile2': '', 'UrlBootFile3': '', 'UrlBootFile4': '', 'UsbBoot': 'Enabled', 'UsbControl': 'UsbEnabled', 'UserDefaultsState': 'Disabled', 'UtilityLang': 'English', 'VirtualInstallDisk': 'Disabled', 'VirtualSerialPort': 'Com1Irq4', 'VlanControl': 'Disabled', 'VlanId': 0, 'VlanPriority': 0, 'WakeOnLan': 'Enabled', 'WorkloadProfile': 'GeneralPowerEfficientCompute', 'XptPrefetcher': 'Auto', 'iSCSIPolicy': 'SoftwareInitiator'} ``` set_bios_settings(data=None, only_allowed_settings=False) --------------------------------------------------------- Sets current BIOS settings to the provided data. Takes a dictionary of BIOS settings to be appplied as argument. When *only_allowed_settings* is set to True, only allowed BIOS settings are returned ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> data = { "BootOrderPolicy": "AttemptOnce", "IntelPerfMonitoring": "Enabled", "IntelProcVtd": "Disabled", "UefiOptimizedBoot": "Disabled", "PowerProfile": "MaxPerf"} >>> apply_filter = True >>> ilo_client.set_bios_settings(data = data, only_allowed_settings= apply_filter) ``` When *only_allowed_settings* is set to False, all the BIOS settings supported by iLO are returned ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> apply_filter = False >>> ilo_client.set_bios_settings(data, apply_filter) ``` get_default_bios_settings(only_allowed_settings=False) ------------------------------------------------------ Returns default BIOS settings. When *only_allowed_settings* is set to True, only allowed BIOS settings are returned ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_default_bios_settings(True) {'PowerRegulator': u'DynamicPowerSavings', 'AdvancedMemProtection': u'AdvancedEcc', 'DynamicPowerCapping': u'Disabled', 'BootOrderPolicy': u'RetryIndefinitely', 'Sriov': u'Enabled', 'AutoPowerOn': u'RestoreLastState', 'IntelProcVtd': u'Enabled', 'ProcVirtualization': u'Enabled', 'ThermalShutdown': u'Enabled', 'IntelTxt': u'Disabled', 'SecureBootStatus': u'Disabled', 'WorkloadProfile': u'GeneralPowerEfficientCompute', 'IntelPerfMonitoring': u'Disabled', 'TpmType': u'NoTpm', 'UefiOptimizedBoot': u'Enabled', 'ThermalConfig': u'OptimalCooling', 'ProcAes': u'Enabled', 'BootMode': u'Uefi', 'ProcTurbo': u'Enabled', 'IntelligentProvisioning': u'Enabled', 'ProcHyperthreading': u'Enabled', 'TpmState': u'NotPresent', 'CollabPowerControl': u'Enabled'} ``` When *only_allowed_settings* is set to False, all the BIOS settings supported by iLO are returned ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_default_bios_settings(False) {'AcpiHpet': 'Enabled', 'AcpiRootBridgePxm': 'Enabled', 'AcpiSlit': 'Enabled', 'AdjSecPrefetch': 'Enabled', 'AdminEmail': '', 'AdminName': '', 'AdminOtherInfo': '', 'AdminPhone': '', 'AdvCrashDumpMode': 'Disabled', 'AdvancedMemProtection': 'AdvancedEcc', 'AsrStatus': 'Enabled', 'AsrTimeoutMinutes': 'Timeout10', 'AssetTagProtection': 'Unlocked', 'AutoPowerOn': 'RestoreLastState', 'BootMode': 'Uefi', 'BootOrderPolicy': 'RetryIndefinitely', 'ChannelInterleaving': 'Enabled', 'CollabPowerControl': 'Enabled', 'ConsistentDevNaming': 'LomsAndSlots', 'CustomPostMessage': '', 'DaylightSavingsTime': 'Disabled', 'DcuIpPrefetcher': 'Enabled', 'DcuStreamPrefetcher': 'Enabled', 'Dhcpv4': 'Enabled', 'DynamicPowerCapping': 'Disabled', 'EmbNicEnable': 'Auto', 'EmbNicLinkSpeed': 'Auto', 'EmbNicPCIeOptionROM': 'Enabled', 'EmbSas1Aspm': 'Disabled', 'EmbSas1Boot': 'TwentyFourTargets', 'EmbSas1Enable': 'Auto', 'EmbSas1LinkSpeed': 'Auto', 'EmbSas1PcieOptionROM': 'Enabled', 'EmbSata1Aspm': 'Disabled', 'EmbSata2Aspm': 'Disabled', 'EmbVideoConnection': 'Auto', 'EmbeddedDiagnostics': 'Enabled', 'EmbeddedSata': 'Ahci', 'EmbeddedSerialPort': 'Com2Irq3', 'EmbeddedUefiShell': 'Enabled', 'EmsConsole': 'Disabled', 'EnabledCoresPerProc': 0, 'EnergyEfficientTurbo': 'Enabled', 'EnergyPerfBias': 'BalancedPerf', 'EraseUserDefaults': 'No', 'ExtendedAmbientTemp': 'Disabled', 'ExtendedMemTest': 'Disabled', 'F11BootMenu': 'Enabled', 'FCScanPolicy': 'CardConfig', 'FanFailPolicy': 'Shutdown', 'FanInstallReq': 'EnableMessaging', 'FlexLom1Aspm': 'Disabled', 'HttpSupport': 'Auto', 'HwPrefetcher': 'Enabled', 'IODCConfiguration': 'Auto', 'IntelDmiLinkFreq': 'Auto', 'IntelNicDmaChannels': 'Enabled', 'IntelPerfMonitoring': 'Disabled', 'IntelProcVtd': 'Enabled', 'IntelligentProvisioning': 'Enabled', 'InternalSDCardSlot': 'Enabled', 'Ipv4Address': '0.0.0.0', 'Ipv4Gateway': '0.0.0.0', 'Ipv4PrimaryDNS': '0.0.0.0', 'Ipv4SecondaryDNS': '0.0.0.0', 'Ipv4SubnetMask': '0.0.0.0', 'Ipv6Address': '::', 'Ipv6ConfigPolicy': 'Automatic', 'Ipv6Duid': 'Auto', 'Ipv6Gateway': '::', 'Ipv6PrimaryDNS': '::', 'Ipv6SecondaryDNS': '::', 'LLCDeadLineAllocation': 'Enabled', 'LlcPrefetch': 'Disabled', 'LocalRemoteThreshold': 'Auto', 'MaxMemBusFreqMHz': 'Auto', 'MaxPcieSpeed': 'PerPortCtrl', 'MemClearWarmReset': 'Disabled', 'MemFastTraining': 'Enabled', 'MemMirrorMode': 'Full', 'MemPatrolScrubbing': 'Enabled', 'MemRefreshRate': 'Refreshx1', 'MemoryControllerInterleaving': 'Auto', 'MemoryRemap': 'NoAction', 'MinProcIdlePkgState': 'C6Retention', 'MinProcIdlePower': 'C6', 'MixedPowerSupplyReporting': 'Enabled', 'NetworkBootRetry': 'Enabled', 'NetworkBootRetryCount': 20, 'NicBoot1': 'NetworkBoot', 'NicBoot2': 'Disabled', 'NicBoot3': 'Disabled', 'NicBoot4': 'Disabled', 'NodeInterleaving': 'Disabled', 'NumaGroupSizeOpt': 'Flat', 'NvmeOptionRom': 'Enabled', 'OpportunisticSelfRefresh': 'Disabled', 'PciPeerToPeerSerialization': 'Disabled', 'PciResourcePadding': 'Normal', 'PersistentMemBackupPowerPolicy': 'WaitForBackupPower', 'PostBootProgress': 'Disabled', 'PostDiscoveryMode': 'Auto', 'PostF1Prompt': 'Delayed20Sec', 'PostVideoSupport': 'DisplayAll', 'PowerButton': 'Enabled', 'PowerOnDelay': 'NoDelay', 'PowerRegulator': 'DynamicPowerSavings', 'PreBootNetwork': 'Auto', 'PrebootNetworkEnvPolicy': 'Auto', 'PrebootNetworkProxy': '', 'ProcAes': 'Enabled', 'ProcHyperthreading': 'Enabled', 'ProcTurbo': 'Enabled', 'ProcVirtualization': 'Enabled', 'ProcX2Apic': 'Enabled', 'ProcessorConfigTDPLevel': 'Normal', 'ProcessorJitterControl': 'Disabled', 'ProcessorJitterControlFrequency': 0, 'ProcessorJitterControlOptimization': 'ZeroLatency', 'RedundantPowerSupply': 'BalancedMode', 'RemovableFlashBootSeq': 'ExternalKeysFirst', 'RestoreDefaults': 'No', 'RestoreManufacturingDefaults': 'No', 'SataSecureErase': 'Disabled', 'SaveUserDefaults': 'No', 'SecStartBackupImage': 'Disabled', 'SecureBootStatus': 'Disabled', 'SerialConsoleBaudRate': 'BaudRate115200', 'SerialConsoleEmulation': 'Vt100Plus', 'SerialConsolePort': 'Auto', 'ServerAssetTag': '', 'ServerConfigLockStatus': 'Disabled', 'ServerName': '', 'ServerOtherInfo': '', 'ServerPrimaryOs': '', 'ServiceEmail': '', 'ServiceName': '', 'ServiceOtherInfo': '', 'ServicePhone': '', 'SetupBrowserSelection': 'Auto', 'Sriov': 'Enabled', 'StaleAtoS': 'Disabled', 'SubNumaClustering': 'Disabled', 'ThermalConfig': 'OptimalCooling', 'ThermalShutdown': 'Enabled', 'TimeFormat': 'Utc', 'TimeZone': 'Utc0', 'TpmChipId': 'None', 'TpmFips': 'NotSpecified', 'TpmState': 'NotPresent', 'TpmType': 'NoTpm', 'UefiOptimizedBoot': 'Enabled', 'UefiSerialDebugLevel': 'Disabled', 'UefiShellBootOrder': 'Disabled', 'UefiShellScriptVerification': 'Disabled', 'UefiShellStartup': 'Disabled', 'UefiShellStartupLocation': 'Auto', 'UefiShellStartupUrl': '', 'UefiShellStartupUrlFromDhcp': 'Disabled', 'UncoreFreqScaling': 'Auto', 'UrlBootFile': '', 'UrlBootFile2': '', 'UrlBootFile3': '', 'UrlBootFile4': '', 'UsbBoot': 'Enabled', 'UsbControl': 'UsbEnabled', 'UserDefaultsState': 'Disabled', 'UtilityLang': 'English', 'VirtualInstallDisk': 'Disabled', 'VirtualSerialPort': 'Com1Irq4', 'VlanControl': 'Disabled', 'VlanId': 0, 'VlanPriority': 0, 'WakeOnLan': 'Enabled', 'WorkloadProfile': 'GeneralPowerEfficientCompute', 'XptPrefetcher': 'Auto', 'iSCSIPolicy': 'SoftwareInitiator'} ``` delete_raid_configuration() --------------------------- Deletes all logical drives from the system. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.delete_raid_configuration() ``` create_raid_configuration(raid_config) -------------------------------------- Creates raid configuration on the hardware. Takes a dictionary containing target raid configuration data as argument. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> raid_config = { 'logical_disks': [{'size_gb': 279, 'physical_disks': [u'1I:1:2'], 'raid_level': u'0'}]} >>> ilo_client.create_raid_configuration(raid_config) ``` read_raid_configuration(raid_config=None) ----------------------------------------- Reads the raid configuration of the hardware. In case of post-delete read the *raid_config* value is None. In case of post-create, *raid_config* is a dictionary containing target raid configuration data. ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.read_raid_configuration() {'logical_disks': [{'size_gb': 279, 'physical_disks': [u'1I:1:2'], 'raid_level': u'0', 'root_device_hint': {'wwn': u'0x600508B1001C99DF1EAFA712BAFECD59'}, 'controller': None, 'volume_name': u'd625fcce-6750-4b5a-93e1-a08abf7f6060'}]} ``` get_bios_settings_result() -------------------------- Returns the result of bios settings applied ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_bios_settings_result() {'status': 'success', 'results': [{u'MessageId': u'Base.1.0.Success'}]} ``` add_tls_certificate(cert_file_list) ----------------------------------- Adds the TLS certificate to the iLO ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.add_tls_certificate(['/xyz/ilo.crt']) ``` remove_tls_certificate(fp_list) ----------------------------------- Removes the TLS certificate from the iLO ``` >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> fp = 'FA:3A:68:C7:7E:ED:90:21:D2:FA:3E:54:6B:0C:14:D3:2F:8D:43:50:F7:05:A7:0F:1C:68:35:DB:5C:D2:53:28' >>> ilo_client.remove_tls_certificate([fp]) ``` ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2226644 proliantutils-2.16.0/doc/source/0000775000175000017500000000000000000000000016601 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/doc/source/conf.py0000664000175000017500000002000000000000000020070 0ustar00zuulzuul00000000000000# -*- coding: utf-8 -*- # # Proliant Utils documentation build configuration file, created by # sphinx-quickstart on Thu Jun 19 15:36:25 2014. # # 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. import sys import os # 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 = [ 'sphinx.ext.autodoc', ] # 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'Proliant Utils' copyright = u'2014, HP' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = 'v0.1.0' # The full version, including alpha/beta/rc tags. release = 'v0.1.0' # 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 = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. #html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'ProliantUtilsdoc' # -- 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', 'ProliantUtils.tex', u'Proliant Utils Documentation', u'HP', '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', 'proliantutils', u'Proliant Utils Documentation', [u'HP'], 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', 'ProliantUtils', u'Proliant Utils Documentation', u'HP', 'ProliantUtils', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/doc/source/index.rst0000664000175000017500000000101500000000000020437 0ustar00zuulzuul00000000000000.. Proliant Utils documentation master file, created by sphinx-quickstart on Thu Jun 19 15:36:25 2014. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to Proliant Utils's documentation! ========================================== Contents: .. toctree:: :maxdepth: 3 .. automodule:: proliantutils.ilo.ribcl .. autoclass:: IloClient :members: Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2266643 proliantutils-2.16.0/proliantutils/0000775000175000017500000000000000000000000017445 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/__init__.py0000664000175000017500000000000000000000000021544 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/exception.py0000664000175000017500000001654300000000000022026 0ustar00zuulzuul00000000000000# Copyright 2022 Hewlett Packard Enterprise Development LP # Copyright 2014 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. """Exception Class for proliantutils module.""" class ProliantUtilsException(Exception): """Parent class for all Proliantutils exceptions.""" pass class InvalidInputError(Exception): message = "Invalid Input: %(reason)s" # Note(deray): Not mandating the user to provide the ``reason`` attribute # parameter while raising InvalidInputError exception. This is because of # backward-compatibility reasons. See its unit test file to know about its # different ways of usage. def __init__(self, message=None, **kwargs): if not message: message = self.message if 'reason' not in kwargs: kwargs['reason'] = 'Unknown' message = message % kwargs super(InvalidInputError, self).__init__(message) class IloError(ProliantUtilsException): """Base Exception. This exception is used when a problem is encountered in executing an operation on the iLO. """ def __init__(self, message, errorcode=None): super(IloError, self).__init__(message) class IloClientInternalError(IloError): """Internal Error from IloClient. This exception is raised when iLO client library fails to communicate properly with the iLO. """ def __init__(self, message, errorcode=None): super(IloClientInternalError, self).__init__(message) class IloCommandNotSupportedError(IloError): """Command not supported on the platform. This exception is raised when iLO client library fails to communicate properly with the iLO """ def __init__(self, message, errorcode=None): super(IloCommandNotSupportedError, self).__init__(message) class IloCommandNotSupportedInBiosError(IloCommandNotSupportedError): """Command not supported on the bios boot mode. This exception is raised when iLO client library fails to communicate properly with the iLO """ def __init__(self, message, errorcode=None): super(IloCommandNotSupportedInBiosError, self).__init__(message) class IloLogicalDriveNotFoundError(IloError): """Logical drive not found error. This exception is raised when iLO client library unable to find any logical drive on storage controller """ def __init__(self, message, errorcode=None): super(IloLogicalDriveNotFoundError, self).__init__(message) class IloLoginFailError(IloError): """iLO Login Failed. This exception is used to communicate a login failure to the caller. """ messages = ['User login name was not found', 'Login failed', 'Login credentials rejected'] statuses = [0x005f, 0x000a] message = 'Authorization Failed' def __init__(self, message, errorcode=None): super(IloLoginFailError, self).__init__(message) class IloConnectionError(IloError): """Cannot connect to iLO. This exception is used to communicate an HTTP connection error from the iLO to the caller. """ def __init__(self, message): super(IloConnectionError, self).__init__(message) # This is not merged with generic InvalidInputError because # of backward-compatibility reasons. If we changed this, # use-cases of excepting 'IloError' to catch 'IloInvalidInputError' # will be broken. class IloInvalidInputError(IloError): """Invalid Input passed. This exception is used when invalid inputs are passed to the APIs exposed by this module. """ def __init__(self, message): super(IloInvalidInputError, self).__init__(message) class HPSSAException(ProliantUtilsException): message = "An exception occured in ssa module" def __init__(self, message=None, **kwargs): if not message: message = self.message message = message % kwargs super(HPSSAException, self).__init__(message) class PhysicalDisksNotFoundError(HPSSAException): message = ("Not enough physical disks were found to create logical disk " "of size %(size_gb)s GB and raid level %(raid_level)s") class HPSSAOperationError(HPSSAException): message = ("An error was encountered while doing ssa configuration: " "%(reason)s.") class ImageExtractionFailed(ProliantUtilsException): message = "Failed to extract image %(image_ref)s, reason: %(reason)s" def __init__(self, message=None, **kwargs): if not message: message = self.message % kwargs super(ImageExtractionFailed, self).__init__(message) class IloSNMPInvalidInputFailure(IloError): message = "Failed to do SNMP retreival %(reason)s" def __init__(self, message=None, **kwargs): if not message: message = self.message % kwargs super(IloSNMPInvalidInputFailure, self).__init__(message) class IloSNMPExceptionFailure(IloError): message = "SNMP library failed %(reason)s" def __init__(self, message=None, **kwargs): if not message: message = self.message % kwargs super(IloSNMPExceptionFailure, self).__init__(message) class ImageRefValidationFailed(ProliantUtilsException): message = ("Validation of image href %(image_href)s failed, " "reason: %(reason)s") def __init__(self, message=None, **kwargs): if not message: message = self.message % kwargs super(ImageRefValidationFailed, self).__init__(message) class SUMOperationError(ProliantUtilsException): """SUM based firmware update operation error. This exception is used when a problem is encountered in executing a SUM operation. """ message = ("An error occurred while performing SUM based firmware " "update, reason: %(reason)s") def __init__(self, message=None, **kwargs): if not message: message = self.message % kwargs super(SUMOperationError, self).__init__(message) class RedfishError(ProliantUtilsException): """Basic exception for errors raised by Redfish operations.""" message = None def __init__(self, **kwargs): if self.message and kwargs: self.message = self.message % kwargs super(RedfishError, self).__init__(self.message) class MissingAttributeError(RedfishError): message = ('The attribute %(attribute)s is missing from the ' 'resource %(resource)s') class InvalidParameterValueError(RedfishError): message = ('The parameter "%(parameter)s" value "%(value)s" is invalid. ' 'Valid values are: %(valid_values)s') class CertificateCreationError(ProliantUtilsException): message = ("Failed to create HTTPS certificate" "reason: %(reason)s") def __init__(self, message=None, **kwargs): if not message: message = self.message % kwargs super(CertificateCreationError, self).__init__(message) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2266643 proliantutils-2.16.0/proliantutils/functests/0000775000175000017500000000000000000000000021463 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/functests/__init__.py0000664000175000017500000000000000000000000023562 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/functests/test_hpssa.py0000664000175000017500000001140300000000000024211 0ustar00zuulzuul00000000000000# Copyright 2015 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 glob import os import stat from oslo_concurrency import processutils import testtools from proliantutils.hpssa import constants from proliantutils.hpssa import manager from proliantutils.hpssa import objects class HPSSATestCase(testtools.TestCase): def tearDown(self): super(HPSSATestCase, self).tearDown() manager.delete_configuration() def _get_server(self): server = objects.Server() return server def _get_physical_drives(self, server, no_of_physical_drives_required, size_gb_required): for controller in server.controllers: physical_drives = [x for x in controller.unassigned_physical_drives if x.size_gb >= size_gb_required] if len(physical_drives) >= no_of_physical_drives_required: break else: self.fail("This test requires a controller with atleast %d " "physical drives on the server" % no_of_physical_drives_required) return physical_drives[:no_of_physical_drives_required] def _test_create_configuration_single_logical_drive(self, raid_level): server = self._get_server() size_gb = 100 manager.delete_configuration() devices_before_create = set(glob.glob('/dev/sd[a-z]')) minimum_disks_required = constants.RAID_LEVEL_MIN_DISKS[raid_level] self._get_physical_drives(server, minimum_disks_required, size_gb) raid_config = { 'logical_disks': [{'size_gb': size_gb, 'raid_level': raid_level}]} current_config = manager.create_configuration(raid_config) logical_disk = current_config['logical_disks'][0] self.assertIsNotNone(logical_disk['root_device_hint']) self.assertIsNotNone(logical_disk['volume_name']) devices_after_create = set(glob.glob('/dev/sd[a-z]')) new_device = devices_after_create - devices_before_create # Make sure only one new device appeared now. if len(new_device) != 1: self.fail("More than 1 block devices were found after " "creating RAID volume") new_device_file = new_device.pop() s = os.stat(new_device_file) if not stat.S_ISBLK(s.st_mode): self.fail("Newly created disk %s is not a block device" % new_device_file) # SCSI disk devices have major number 8 # https://www.kernel.org/doc/Documentation/devices.txt # TODO(rameshg87: Need to check if any more assetions need to be # done on the newly created disk device. self.assertEqual(8, os.major(s.st_rdev)) stdout, stderr = processutils.execute("lsblk", "-Pio", "SIZE", new_device_file) # Output is like (two times printed): # SIZE="8G" # SIZE="8G" created_disk_size = stdout.split("\n")[0].split('"')[1][:-1] self.assertEqual(size_gb, int(created_disk_size)) stdout, stderr = processutils.execute("lsblk", "-Pio", "WWN", new_device_file) # Output is like: # WWN="0x600508b1001cca7f" # TODO(rameshg87: Check with hpssa team whether this can be # assumed. wwn = stdout.split("\n")[0].split('"')[1] self.assertEqual(logical_disk['root_device_hint']['wwn'], wwn) manager.delete_configuration() def test_raid_0_single_drive(self): self._test_create_configuration_single_logical_drive('0') def test_raid_1_single_drive(self): self._test_create_configuration_single_logical_drive('1') def test_raid_5_single_drive(self): self._test_create_configuration_single_logical_drive('5') def test_raid_6_single_drive(self): self._test_create_configuration_single_logical_drive('6') def test_raid_10_single_drive(self): self._test_create_configuration_single_logical_drive('1+0') def test_raid_50_single_drive(self): self._test_create_configuration_single_logical_drive('5+0') def test_raid_60_single_drive(self): self._test_create_configuration_single_logical_drive('6+0') ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2266643 proliantutils-2.16.0/proliantutils/hpssa/0000775000175000017500000000000000000000000020563 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/hpssa/__init__.py0000664000175000017500000000000000000000000022662 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/hpssa/constants.py0000664000175000017500000000455600000000000023163 0ustar00zuulzuul00000000000000# Copyright 2015 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. INTERFACE_TYPE_SAS = 'sas' INTERFACE_TYPE_SCSI = 'scsi' INTERFACE_TYPE_SATA = 'sata' DISK_TYPE_HDD = 'hdd' DISK_TYPE_SSD = 'ssd' RAID_0 = '0' RAID_1 = '1' RAID_10 = '1+0' RAID_5 = '5' RAID_6 = '6' RAID_50 = '5+0' RAID_60 = '6+0' RAID_1_0 = '10' RAID_5_0 = '50' RAID_6_0 = '60' # Below are not supported in Ironic now. RAID_1_ADM = '1ADM' RAID_10_ADM = '10ADM' RAID_LEVEL_INPUT_TO_HPSSA_MAPPING = {RAID_50: '50', RAID_60: '60'} RAID_LEVEL_HPSSA_TO_INPUT_MAPPING = { v: k for k, v in RAID_LEVEL_INPUT_TO_HPSSA_MAPPING.items()} INTERFACE_TYPE_MAP = {'SCSI': INTERFACE_TYPE_SCSI, 'SAS': INTERFACE_TYPE_SAS, 'SATA': INTERFACE_TYPE_SATA, 'SATASSD': INTERFACE_TYPE_SATA, 'SASSSD': INTERFACE_TYPE_SAS, 'Solid State SAS': INTERFACE_TYPE_SAS, 'Solid State SATA': INTERFACE_TYPE_SATA} DISK_TYPE_MAP = {'SCSI': DISK_TYPE_HDD, 'SAS': DISK_TYPE_HDD, 'SATA': DISK_TYPE_HDD, 'SATASSD': DISK_TYPE_SSD, 'SASSSD': DISK_TYPE_SSD, 'Solid State SAS': DISK_TYPE_SSD, 'Solid State SATA': DISK_TYPE_SSD} RAID_LEVEL_MIN_DISKS = {RAID_0: 1, RAID_1: 2, RAID_1_ADM: 3, RAID_5: 3, RAID_6: 4, RAID_10: 4, RAID_1_0: 4, RAID_50: 6, RAID_5_0: 6, RAID_60: 8, RAID_6_0: 8} MINIMUM_DISK_SIZE = 1 def get_interface_type(ssa_interface): return INTERFACE_TYPE_MAP[ssa_interface] def get_disk_type(ssa_interface): return DISK_TYPE_MAP[ssa_interface] ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/hpssa/disk_allocator.py0000664000175000017500000001301000000000000024122 0ustar00zuulzuul00000000000000# Copyright 2015 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from proliantutils import exception from proliantutils.hpssa import constants FILTER_CRITERIA = ['disk_type', 'interface_type', 'model', 'firmware'] def _get_criteria_matching_disks(logical_disk, physical_drives): """Finds the physical drives matching the criteria of logical disk. This method finds the physical drives matching the criteria of the logical disk passed. :param logical_disk: The logical disk dictionary from raid config :param physical_drives: The physical drives to consider. :returns: A list of physical drives which match the criteria """ matching_physical_drives = [] criteria_to_consider = [x for x in FILTER_CRITERIA if x in logical_disk] for physical_drive_object in physical_drives: for criteria in criteria_to_consider: logical_drive_value = logical_disk.get(criteria) physical_drive_value = getattr(physical_drive_object, criteria) if logical_drive_value != physical_drive_value: break else: matching_physical_drives.append(physical_drive_object) return matching_physical_drives def allocate_disks(logical_disk, server, raid_config): """Allocate physical disks to a logical disk. This method allocated physical disks to a logical disk based on the current state of the server and criteria mentioned in the logical disk. :param logical_disk: a dictionary of a logical disk from the RAID configuration input to the module. :param server: An objects.Server object :param raid_config: The target RAID configuration requested. :raises: PhysicalDisksNotFoundError, if cannot find physical disks for the request. """ size_gb = logical_disk['size_gb'] raid_level = logical_disk['raid_level'] number_of_physical_disks = logical_disk.get( 'number_of_physical_disks', constants.RAID_LEVEL_MIN_DISKS[raid_level]) share_physical_disks = logical_disk.get('share_physical_disks', False) # Try to create a new independent array for this request. for controller in server.controllers: physical_drives = controller.unassigned_physical_drives physical_drives = _get_criteria_matching_disks(logical_disk, physical_drives) if size_gb != "MAX": # If we want to allocate for a logical disk for which size_gb is # mentioned, we take the smallest physical drives which is required # to match the criteria. reverse_sort = False physical_drives = [x for x in physical_drives if x.size_gb >= size_gb] else: # If we want to allocate for a logical disk for which size_gb is # MAX, we take the largest physical drives available. reverse_sort = True if len(physical_drives) >= number_of_physical_disks: selected_drives = sorted(physical_drives, key=lambda x: x.size_gb, reverse=reverse_sort) selected_drive_ids = [x.id for x in selected_drives] logical_disk['controller'] = controller.id physical_disks = selected_drive_ids[:number_of_physical_disks] logical_disk['physical_disks'] = physical_disks return # We didn't find physical disks to create an independent array. # Check if we can get some shared arrays. if share_physical_disks: sharable_disk_wwns = [] for sharable_logical_disk in raid_config['logical_disks']: if (sharable_logical_disk.get('share_physical_disks', False) and 'root_device_hint' in sharable_logical_disk): wwn = sharable_logical_disk['root_device_hint']['wwn'] sharable_disk_wwns.append(wwn) for controller in server.controllers: sharable_arrays = [x for x in controller.raid_arrays if x.logical_drives[0].wwn in sharable_disk_wwns] for array in sharable_arrays: # Check if criterias for the logical disk match the ones with # physical disks in the raid array. criteria_matched_disks = _get_criteria_matching_disks( logical_disk, array.physical_drives) # Check if all disks in the array don't match the criteria if len(criteria_matched_disks) != len(array.physical_drives): continue # Check if raid array can accomodate the logical disk. if array.can_accomodate(logical_disk): logical_disk['controller'] = controller.id logical_disk['array'] = array.id return # We check both options and couldn't get any physical disks. raise exception.PhysicalDisksNotFoundError(size_gb=size_gb, raid_level=raid_level) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/hpssa/manager.py0000664000175000017500000003741000000000000022554 0ustar00zuulzuul00000000000000# Copyright 2015 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 json import os import time import jsonschema from jsonschema import exceptions as json_schema_exc from proliantutils import exception from proliantutils.hpssa import constants from proliantutils.hpssa import disk_allocator from proliantutils.hpssa import objects CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) RAID_CONFIG_SCHEMA = os.path.join(CURRENT_DIR, "raid_config_schema.json") def _update_physical_disk_details(raid_config, server): """Adds the physical disk details to the RAID configuration passed.""" raid_config['physical_disks'] = [] physical_drives = server.get_physical_drives() for physical_drive in physical_drives: physical_drive_dict = physical_drive.get_physical_drive_dict() raid_config['physical_disks'].append(physical_drive_dict) def validate(raid_config): """Validates the RAID configuration provided. This method validates the RAID configuration provided against a JSON schema. :param raid_config: The RAID configuration to be validated. :raises: InvalidInputError, if validation of the input fails. """ raid_schema_fobj = open(RAID_CONFIG_SCHEMA, 'r') raid_config_schema = json.load(raid_schema_fobj) try: jsonschema.validate(raid_config, raid_config_schema) except json_schema_exc.ValidationError as e: raise exception.InvalidInputError(e.message) for logical_disk in raid_config['logical_disks']: # If user has provided 'number_of_physical_disks' or # 'physical_disks', validate that they have mentioned at least # minimum number of physical disks required for that RAID level. raid_level = logical_disk['raid_level'] min_disks_reqd = constants.RAID_LEVEL_MIN_DISKS[raid_level] no_of_disks_specified = None if 'number_of_physical_disks' in logical_disk: no_of_disks_specified = logical_disk['number_of_physical_disks'] elif 'physical_disks' in logical_disk: no_of_disks_specified = len(logical_disk['physical_disks']) if (no_of_disks_specified and no_of_disks_specified < min_disks_reqd): msg = ("RAID level %(raid_level)s requires at least %(number)s " "disks." % {'raid_level': raid_level, 'number': min_disks_reqd}) raise exception.InvalidInputError(msg) def _select_controllers_by(server, select_condition, msg): """Filters out the hpssa controllers based on the condition. This method updates the server with only the controller which satisfies the condition. The controllers which doesn't satisfies the selection condition will be removed from the list. :param server: The object containing all the supported hpssa controllers details. :param select_condition: A lambda function to select the controllers based on requirement. :param msg: A String which describes the controller selection. :raises exception.HPSSAOperationError, if all the controller are in HBA mode. """ all_controllers = server.controllers supported_controllers = [c for c in all_controllers if select_condition(c)] if not supported_controllers: reason = ("None of the available SSA controllers %(controllers)s " "have %(msg)s" % {'controllers': ', '.join([c.id for c in all_controllers]), 'msg': msg}) raise exception.HPSSAOperationError(reason=reason) server.controllers = supported_controllers def create_configuration(raid_config): """Create a RAID configuration on this server. This method creates the given RAID configuration on the server based on the input passed. :param raid_config: The dictionary containing the requested RAID configuration. This data structure should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100}, ]} :returns: the current raid configuration. This is same as raid_config with some extra properties like root_device_hint, volume_name, controller, physical_disks, etc filled for each logical disk after its creation. :raises exception.InvalidInputError, if input is invalid. :raises exception.HPSSAOperationError, if all the controllers are in HBA mode. """ server = objects.Server() select_controllers = lambda x: not x.properties.get('HBA Mode Enabled', False) _select_controllers_by(server, select_controllers, 'RAID enabled') validate(raid_config) # Make sure we create the large disks first. This is avoid the # situation that we avoid giving large disks to smaller requests. # For example, consider this: # - two logical disks - LD1(50), LD(100) # - have 4 physical disks - PD1(50), PD2(50), PD3(100), PD4(100) # # In this case, for RAID1 configuration, if we were to consider # LD1 first and allocate PD3 and PD4 for it, then allocation would # fail. So follow a particular order for allocation. # # Also make sure we create the MAX logical_disks the last to make sure # we allot only the remaining space available. logical_disks_sorted = ( sorted((x for x in raid_config['logical_disks'] if x['size_gb'] != "MAX"), reverse=True, key=lambda x: x['size_gb']) + [x for x in raid_config['logical_disks'] if x['size_gb'] == "MAX"]) if any(logical_disk['share_physical_disks'] for logical_disk in logical_disks_sorted if 'share_physical_disks' in logical_disk): logical_disks_sorted = _sort_shared_logical_disks(logical_disks_sorted) # We figure out the new disk created by recording the wwns # before and after the create, and then figuring out the # newly found wwn from it. wwns_before_create = set([x.wwn for x in server.get_logical_drives()]) for logical_disk in logical_disks_sorted: if 'physical_disks' not in logical_disk: disk_allocator.allocate_disks(logical_disk, server, raid_config) controller_id = logical_disk['controller'] controller = server.get_controller_by_id(controller_id) if not controller: msg = ("Unable to find controller named '%(controller)s'." " The available controllers are '%(ctrl_list)s'." % {'controller': controller_id, 'ctrl_list': ', '.join( [c.id for c in server.controllers])}) raise exception.InvalidInputError(reason=msg) if 'physical_disks' in logical_disk: for physical_disk in logical_disk['physical_disks']: disk_obj = controller.get_physical_drive_by_id(physical_disk) if not disk_obj: msg = ("Unable to find physical disk '%(physical_disk)s' " "on '%(controller)s'" % {'physical_disk': physical_disk, 'controller': controller_id}) raise exception.InvalidInputError(msg) controller.create_logical_drive(logical_disk) # Now find the new logical drive created. server.refresh() wwns_after_create = set([x.wwn for x in server.get_logical_drives()]) new_wwn = wwns_after_create - wwns_before_create if not new_wwn: reason = ("Newly created logical disk with raid_level " "'%(raid_level)s' and size %(size_gb)s GB not " "found." % {'raid_level': logical_disk['raid_level'], 'size_gb': logical_disk['size_gb']}) raise exception.HPSSAOperationError(reason=reason) new_logical_disk = server.get_logical_drive_by_wwn(new_wwn.pop()) new_log_drive_properties = new_logical_disk.get_logical_drive_dict() logical_disk.update(new_log_drive_properties) wwns_before_create = wwns_after_create.copy() _update_physical_disk_details(raid_config, server) return raid_config def _sort_shared_logical_disks(logical_disks): """Sort the logical disks based on the following conditions. When the share_physical_disks is True make sure we create the volume which needs more disks first. This avoids the situation of insufficient disks for some logical volume request. For example, - two logical disk with number of disks - LD1(3), LD2(4) - have 4 physical disks In this case, if we consider LD1 first then LD2 will fail since not enough disks available to create LD2. So follow a order for allocation when share_physical_disks is True. Also RAID1 can share only when there is logical volume with only 2 disks. So make sure we create RAID 1 first when share_physical_disks is True. And RAID 1+0 can share only when the logical volume with even number of disks. :param logical_disks: 'logical_disks' to be sorted for shared logical disks. :returns: the logical disks sorted based the above conditions. """ is_shared = (lambda x: True if ('share_physical_disks' in x and x['share_physical_disks']) else False) num_of_disks = (lambda x: x['number_of_physical_disks'] if 'number_of_physical_disks' in x else constants.RAID_LEVEL_MIN_DISKS[x['raid_level']]) # Separate logical disks based on share_physical_disks value. # 'logical_disks_shared' when share_physical_disks is True and # 'logical_disks_nonshared' when share_physical_disks is False logical_disks_shared = [] logical_disks_nonshared = [] for x in logical_disks: target = (logical_disks_shared if is_shared(x) else logical_disks_nonshared) target.append(x) # Separete logical disks with raid 1 from the 'logical_disks_shared' into # 'logical_disks_shared_raid1' and remaining as # 'logical_disks_shared_excl_raid1'. logical_disks_shared_raid1 = [] logical_disks_shared_excl_raid1 = [] for x in logical_disks_shared: target = (logical_disks_shared_raid1 if x['raid_level'] == '1' else logical_disks_shared_excl_raid1) target.append(x) # Sort the 'logical_disks_shared' in reverse order based on # 'number_of_physical_disks' attribute, if provided, otherwise minimum # disks required to create the logical volume. logical_disks_shared = sorted(logical_disks_shared_excl_raid1, reverse=True, key=num_of_disks) # Move RAID 1+0 to first in 'logical_disks_shared' when number of physical # disks needed to create logical volume cannot be shared with odd number of # disks and disks higher than that of RAID 1+0. check = True for x in logical_disks_shared: if x['raid_level'] == "1+0": x_num = num_of_disks(x) for y in logical_disks_shared: if y['raid_level'] != "1+0": y_num = num_of_disks(y) if x_num < y_num: check = (True if y_num % 2 == 0 else False) if check: break if not check: logical_disks_shared.remove(x) logical_disks_shared.insert(0, x) check = True # Final 'logical_disks_sorted' list should have non shared logical disks # first, followed by shared logical disks with RAID 1, and finally by the # shared logical disks sorted based on number of disks and RAID 1+0 # condition. logical_disks_sorted = (logical_disks_nonshared + logical_disks_shared_raid1 + logical_disks_shared) return logical_disks_sorted def delete_configuration(): """Delete a RAID configuration on this server. :returns: the current RAID configuration after deleting all the logical disks. """ server = objects.Server() select_controllers = lambda x: not x.properties.get('HBA Mode Enabled', False) _select_controllers_by(server, select_controllers, 'RAID enabled') for controller in server.controllers: # Trigger delete only if there is some RAID array, otherwise # hpssacli/ssacli will fail saying "no logical drives found.". if controller.raid_arrays: controller.delete_all_logical_drives() return get_configuration() def get_configuration(): """Get the current RAID configuration. Get the RAID configuration from the server and return it as a dictionary. :returns: A dictionary of the below format. raid_config = { 'logical_disks': [{ 'size_gb': 100, 'raid_level': 1, 'physical_disks': [ '5I:0:1', '5I:0:2'], 'controller': 'Smart array controller' }, ] } """ server = objects.Server() logical_drives = server.get_logical_drives() raid_config = {} raid_config['logical_disks'] = [] for logical_drive in logical_drives: logical_drive_dict = logical_drive.get_logical_drive_dict() raid_config['logical_disks'].append(logical_drive_dict) _update_physical_disk_details(raid_config, server) return raid_config def has_erase_completed(): server = objects.Server() drives = server.get_physical_drives() if any((drive.erase_status == 'Erase In Progress') for drive in drives): return False else: return True def erase_devices(): """Erase all the drives on this server. This method performs sanitize erase on all the supported physical drives in this server. This erase cannot be performed on logical drives. :returns: a dictionary of controllers with drives and the erase status. :raises exception.HPSSAException, if none of the drives support sanitize erase. """ server = objects.Server() for controller in server.controllers: drives = [x for x in controller.unassigned_physical_drives if (x.get_physical_drive_dict().get('erase_status', '') == 'OK')] if drives: controller.erase_devices(drives) while not has_erase_completed(): time.sleep(300) server.refresh() status = {} for controller in server.controllers: drive_status = {x.id: x.erase_status for x in controller.unassigned_physical_drives} sanitize_supported = controller.properties.get( 'Sanitize Erase Supported', 'False') if sanitize_supported == 'False': msg = ("Drives overwritten with zeros because sanitize erase " "is not supported on the controller.") else: msg = ("Sanitize Erase performed on the disks attached to " "the controller.") drive_status.update({'Summary': msg}) status[controller.id] = drive_status return status ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/hpssa/objects.py0000664000175000017500000006475700000000000022611 0ustar00zuulzuul00000000000000# Copyright 2015 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 os import re import time from oslo_concurrency import processutils from oslo_utils import strutils from proliantutils import exception from proliantutils.hpssa import constants from proliantutils import log LOG = log.get_logger(__name__) def _get_indentation(string): """Return the number of spaces before the current line.""" return len(string) - len(string.lstrip(' ')) def _get_key_value(string): """Return the (key, value) as a tuple from a string.""" # Normally all properties look like this: # Unique Identifier: 600508B1001CE4ACF473EE9C826230FF # Disk Name: /dev/sda # Mount Points: None key = '' value = '' try: key, value = string.split(': ') except ValueError: # This handles the case when the property of a logical drive # returned is as follows. Here we cannot split by ':' because # the disk id has colon in it. So if this is about disk, # then strip it accordingly. # Mirror Group 0: physicaldrive 6I:1:5 string = string.lstrip(' ') if string.startswith('physicaldrive'): fields = string.split(' ') # Include fields[1] to key to avoid duplicate pairs # with the same 'physicaldrive' key key = fields[0] + " " + fields[1] value = fields[1] else: # TODO(rameshg87): Check if this ever occurs. return string.strip(' '), None return key.strip(' '), value.strip(' ') def _get_dict(lines, start_index, indentation, deep): """Recursive function for parsing hpssacli/ssacli output.""" info = {} current_item = None i = start_index while i < len(lines): current_line = lines[i] current_line_indentation = _get_indentation(current_line) # Check for multi-level returns if current_line_indentation < indentation: return info, i - 1 if current_line_indentation == indentation: current_item = current_line.lstrip(' ') info[current_item] = {} i = i + 1 continue if i < len(lines) - 1: next_line_indentation = _get_indentation(lines[i + 1]) else: next_line_indentation = current_line_indentation if next_line_indentation > current_line_indentation: ret_dict, i = _get_dict(lines, i, current_line_indentation, deep + 1) for key in ret_dict.keys(): if key in info[current_item]: info[current_item][key].update(ret_dict[key]) else: info[current_item][key] = ret_dict[key] else: key, value = _get_key_value(current_line) if key: info[current_item][key] = value # Do not return if it's the top level of recursion if next_line_indentation < current_line_indentation and deep > 0: return info, i i = i + 1 return info, i def _convert_to_dict(stdout): """Wrapper function for parsing hpssacli/ssacli command. This function gets the output from hpssacli/ssacli command and calls the recursive function _get_dict to return the complete dictionary containing the RAID information. """ lines = stdout.split("\n") lines = list(filter(None, lines)) info_dict, j = _get_dict(lines, 0, 0, 0) return info_dict def _ssacli(*args, **kwargs): """Wrapper function for executing hpssacli/ssacli command. This function executes ssacli command if it exists, else it falls back to hpssacli. :param args: args to be provided to hpssacli/ssacli command :param kwargs: kwargs to be sent to processutils except the following: - dont_transform_to_hpssa_exception - Set to True if this method shouldn't transform other exceptions to hpssa exceptions only when hpssa controller is available. This is useful when the return code from hpssacli/ssacli is useful for analysis. :returns: a tuple containing the stdout and stderr after running the process. :raises: HPSSAOperationError, if some error was encountered and dont_dont_transform_to_hpssa_exception was set to False. :raises: OSError or processutils.ProcessExecutionError if execution failed and dont_transform_to_hpssa_exception was set to True. """ dont_transform_to_hpssa_exception = kwargs.get( 'dont_transform_to_hpssa_exception', False) kwargs.pop('dont_transform_to_hpssa_exception', None) try: if os.path.exists("/usr/sbin/ssacli"): stdout, stderr = processutils.execute("ssacli", *args, **kwargs) else: stdout, stderr = processutils.execute("hpssacli", *args, **kwargs) except (OSError, processutils.ProcessExecutionError) as e: if 'No controllers detected' in str(e): msg = ("SSA controller not found. Enable ssa controller" " to continue with the desired operation") raise exception.HPSSAOperationError(reason=msg) elif not dont_transform_to_hpssa_exception: raise exception.HPSSAOperationError(reason=e) else: raise return stdout, stderr class Server(object): """Class for Server object This can consists of many RAID controllers - both internal and external. """ def __init__(self): """Constructor for Server object.""" self.last_updated = None self.controllers = [] self.refresh() def _get_all_details(self): """Gets the current RAID configuration on the server. This methods gets the current RAID configuration on the server using hpssacli/ssacli command and returns the output. :returns: stdout after running the hpssacli/ssacli command. The output looks as follows: Smart Array P822 in Slot 2 Bus Interface: PCI Slot: 2 Serial Number: PDVTF0BRH5T0MO . . . Array: A Interface Type: SAS Unused Space: 0 MB Status: OK Logical Drive: 1 Size: 2.7 TB Fault Tolerance: 6 Heads: 255 Unique Identifier: 600508B1001C45441D106BDFAAEBA41E Disk Name: /dev/sda . . physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Interface Type: SAS Drive Type: Data Drive . . . physicaldrive 5I:1:2 Port: 5I Box: 1 Bay: 2 Status: OK Interface Type: SAS Drive Type: Data Drive :raises: HPSSAOperationError, if hpssacli/ssacli operation failed. """ stdout, stderr = _ssacli("controller", "all", "show", "config", "detail") return stdout def refresh(self): """Refresh the server and it's child objects. This method removes all the cache information in the server and it's child objects, and fetches the information again from the server using hpssacli/ssacli command. :raises: HPSSAOperationError, if hpssacli/ssacli operation failed. """ config = self._get_all_details() raid_info = _convert_to_dict(config) self.controllers = [] for key, value in raid_info.items(): self.controllers.append(Controller(key, value, self)) self.last_updated = time.time() def get_controller_by_id(self, id): """Get the controller object given the id. This method returns the controller object for given id. :param id: id of the controller, for example 'Smart Array P822 in Slot 2' :returns: Controller object which has the id or None if the controller is not found. """ for controller in self.controllers: if controller.id == id: return controller return None def get_logical_drives(self): """Get all the RAID logical drives in the Server. This method returns all the RAID logical drives on the server by examining all the controllers. :returns: a list of LogicalDrive objects. """ logical_drives = [] for controller in self.controllers: for array in controller.raid_arrays: for logical_drive in array.logical_drives: logical_drives.append(logical_drive) return logical_drives def get_physical_drives(self): """Get all the RAID physical drives on the Server. This method returns all the physical drives on the server by examining all the controllers. :returns: a list of PhysicalDrive objects. """ physical_drives = [] for controller in self.controllers: # First add unassigned physical drives. for physical_drive in controller.unassigned_physical_drives: physical_drives.append(physical_drive) # Now add physical drives part of RAID arrays. for array in controller.raid_arrays: for physical_drive in array.physical_drives: physical_drives.append(physical_drive) return physical_drives def get_logical_drive_by_wwn(self, wwn): """Get the logical drive object given the wwn. This method returns the logical drive object with the given wwn. :param wwn: wwn of the logical drive :returns: LogicalDrive object which has the wwn or None if logical drive is not found. """ disk = [x for x in self.get_logical_drives() if x.wwn == wwn] if disk: return disk[0] return None class Controller(object): """This is the class for RAID controller.""" def __init__(self, id, properties, parent): """Constructor for Controller object.""" self.parent = parent self.properties = properties self.id = id self.unassigned_physical_drives = [] self.raid_arrays = [] # This step is needed because of the mismatch in the data returned by # hpssacli and ssacli. attr = ''.join(x for x in properties if x == 'Unassigned' or x == 'unassigned') unassigned_drives = properties.get(attr, {}) for key, value in unassigned_drives.items(): self.unassigned_physical_drives.append(PhysicalDrive(key, value, self)) raid_arrays = filter(lambda x: x.startswith('Array'), properties.keys()) for array in raid_arrays: self.raid_arrays.append(RaidArray(array, properties[array], self)) def get_physical_drive_by_id(self, id): """Get a PhysicalDrive object for given id. This method examines both assigned and unassigned physical drives of the controller and returns the physical drive. :param id: id of physical drive, for example '5I:1:1'. :returns: PhysicalDrive object having the id, or None if physical drive is not found. """ for phy_drive in self.unassigned_physical_drives: if phy_drive.id == id: return phy_drive for array in self.raid_arrays: for phy_drive in array.physical_drives: if phy_drive.id == id: return phy_drive return None def execute_cmd(self, *args, **kwargs): """Execute a given hpssacli/ssacli command on the controller. This method executes a given command on the controller. :params args: a tuple consisting of sub-commands to be appended after specifying the controller in hpssacli/ssacli command. :param kwargs: kwargs to be passed to execute() in processutils :raises: HPSSAOperationError, if hpssacli/ssacli operation failed. """ slot = self.properties['Slot'] base_cmd = ("controller", "slot=%s" % slot) cmd = base_cmd + args return _ssacli(*cmd, **kwargs) def create_logical_drive(self, logical_drive_info): """Create a logical drive on the controller. This method creates a logical drive on the controller when the logical drive details and physical drive ids are passed to it. :param logical_drive_info: a dictionary containing the details of the logical drive as specified in raid config. :raises: HPSSAOperationError, if hpssacli/ssacli operation failed. """ cmd_args = [] if 'array' in logical_drive_info: cmd_args.extend(['array', logical_drive_info['array']]) cmd_args.extend(['create', "type=logicaldrive"]) if 'physical_disks' in logical_drive_info: phy_drive_ids = ','.join(logical_drive_info['physical_disks']) cmd_args.append("drives=%s" % phy_drive_ids) raid_level = logical_drive_info['raid_level'] # For RAID levels (like 5+0 and 6+0), HPSSA names them differently. # Check if we have mapping stored, otherwise use the same. raid_level = constants.RAID_LEVEL_INPUT_TO_HPSSA_MAPPING.get( raid_level, raid_level) cmd_args.append("raid=%s" % raid_level) # If size_gb is MAX, then don't pass size argument. HPSSA will # automatically allocate the maximum # disks size possible to the # logical disk. if logical_drive_info['size_gb'] != "MAX": size_mb = logical_drive_info['size_gb'] * 1024 cmd_args.append("size=%s" % size_mb) self.execute_cmd(*cmd_args, process_input='y') def delete_all_logical_drives(self): """Deletes all logical drives on trh controller. This method deletes all logical drives on trh controller. :raises: HPSSAOperationError, if hpssacli/ssacli operation failed. """ self.execute_cmd("logicaldrive", "all", "delete", "forced") def _get_erase_command(self, drive, pattern): """Return the command arguments based on the pattern. Erase command examples: 1) Sanitize: "ssacli ctrl slot=0 pd 1I:1:1 modify erase erasepattern=overwrite unrestricted=off forced" 2) Zeros: "ssacli ctrl slot=0 pd 1I:1:1 modify erase erasepattern=zero forced" :param drive: A string with comma separated list of drives. :param pattern: A string which defines the type of erase. :returns: A list of ssacli command arguments. """ cmd_args = [] cmd_args.append("pd %s" % drive) cmd_args.extend(['modify', 'erase', pattern]) if pattern != 'erasepattern=zero': cmd_args.append('unrestricted=off') cmd_args.append('forced') return cmd_args def erase_devices(self, drives): """Perform Erase on all the drives in the controller. This method erases all the hdd and ssd drives in the controller by overwriting the drives with patterns for hdd and erasing storage blocks for ssd drives. The drives would be unavailable until successful completion or failure of erase operation. If the sanitize erase is not supported on any disk it will try to populate zeros on disk drives. :param drives: A list of drive objects in the controller. :raises: HPSSAOperationError, if sanitize erase is not supported. """ for drive in drives: pattern = 'overwrite' if ( drive.disk_type == constants.DISK_TYPE_HDD) else 'block' cmd_args = self._get_erase_command( drive.id, 'erasepattern=%s' % pattern) stdout = self.execute_cmd(*cmd_args) LOG.debug("Sanitize disk erase invoked with erase pattern as " "'%(pattern)s' on disk type: %(disk_type)s." % {'pattern': pattern, 'disk_type': drive.disk_type}) if "not supported" in str(stdout): new_pattern = 'zero' cmd_args = self._get_erase_command(drive.id, 'erasepattern=zero') self.execute_cmd(*cmd_args) LOG.debug("Sanitize disk erase invoked with erase pattern as " "'%(pattern)s' is not supported on disk type: " "%(disk_type)s. Now its invoked with erase pattern " "as %(new_pattern)s." % {'pattern': pattern, 'disk_type': drive.disk_type, 'new_pattern': new_pattern}) class RaidArray(object): """Class for a RAID Array. RAID array consists of many logical drives and many physical drives. """ def __init__(self, id, properties, parent): """Constructor for a RAID Array object.""" self.parent = parent self.properties = properties self.id = id[7:] self.logical_drives = [] self.physical_drives = [] logical_drives = filter(lambda x: x.startswith('Logical Drive'), properties.keys()) for logical_drive in logical_drives: self.logical_drives.append(LogicalDrive(logical_drive, properties[logical_drive], self)) physical_drives = filter(lambda x: x.startswith('physicaldrive'), properties.keys()) for physical_drive in physical_drives: self.physical_drives.append(PhysicalDrive(physical_drive, properties[physical_drive], self)) def can_accomodate(self, logical_disk): """Check if this RAID array can accomodate the logical disk. This method uses hpssacli/ssacli command's option to check if the logical disk with desired size and RAID level can be created on this RAID array. :param logical_disk: Dictionary of logical disk to be created. :returns: True, if logical disk can be created on the RAID array False, otherwise. """ raid_level = constants.RAID_LEVEL_INPUT_TO_HPSSA_MAPPING.get( logical_disk['raid_level'], logical_disk['raid_level']) args = ("array", self.id, "create", "type=logicaldrive", "raid=%s" % raid_level, "size=?") if logical_disk['size_gb'] != "MAX": desired_disk_size = logical_disk['size_gb'] else: desired_disk_size = constants.MINIMUM_DISK_SIZE try: stdout, stderr = self.parent.execute_cmd( *args, dont_transform_to_hpssa_exception=True) except processutils.ProcessExecutionError as ex: # hpssacli/ssacli returns error code 1 when RAID level of the # logical disk is not supported on the array. # If that's the case, just return saying the logical disk # cannot be accomodated in the array. # If exist_code is not 1, then it's some other error that we # don't expect to appear and hence raise it back. if ex.exit_code == 1: return False else: raise exception.HPSSAOperationError(reason=ex) except Exception as ex: raise exception.HPSSAOperationError(reason=ex) # TODO(rameshg87): This always returns in MB, but confirm with # HPSSA folks. match = re.search(r"Max: (\d+)", stdout) if not match: return False max_size_gb = int(match.group(1)) / 1024 return desired_disk_size <= max_size_gb class LogicalDrive(object): """Class for LogicalDrive object.""" def __init__(self, id, properties, parent): """Constructor for a LogicalDrive object.""" # Strip off 'Logical Drive' before storing it in id self.id = id[15:] self.parent = parent self.properties = properties # 'string_to_bytes' takes care of converting any returned # (like 500MB, 25GB) unit of storage space to bytes (Integer value). # It requires space to be stripped. try: size = self.properties['Size'].replace(' ', '') # TODO(rameshg87): Reduce the disk size by 1 to make sure Ironic # has enough space to write a config drive. Remove this when # Ironic doesn't need it. self.size_gb = int(strutils.string_to_bytes( size, return_int=True) / (1024 * 1024 * 1024)) - 1 except KeyError: msg = ("Can't get 'Size' parameter from ssacli output for logical " "disk '%(logical_disk)s' of RAID array '%(array)s' in " "controller '%(controller)s'." % {'logical_disk': self.id, 'array': self.parent.id, 'controller': self.parent.parent.id}) raise exception.HPSSAOperationError(reason=msg) except ValueError: msg = ("ssacli returned unknown size '%(size)s' for logical " "disk '%(logical_disk)s' of RAID array '%(array)s' in " "controller '%(controller)s'." % {'size': size, 'logical_disk': self.id, 'array': self.parent.id, 'controller': self.parent.parent.id}) raise exception.HPSSAOperationError(reason=msg) self.raid_level = self.properties.get('Fault Tolerance') # For RAID levels (like 5+0 and 6+0), HPSSA names them differently. # Check if we have mapping stored, otherwise use the same. raid_level_mapping = constants.RAID_LEVEL_HPSSA_TO_INPUT_MAPPING self.raid_level = raid_level_mapping.get(self.raid_level, self.raid_level) self.volume_name = self.properties.get('Logical Drive Label') # Trim down the WWN to 16 digits (8 bytes) so that it matches # lsblk output in Linux. wwn = self.properties.get('Unique Identifier') if wwn: wwn = '0x' + wwn[:16].lower() self.wwn = wwn def get_property(self, prop): if not self.properties: return None return self.properties.get(prop) def get_logical_drive_dict(self): physical_disk_ids = [x.id for x in self.parent.physical_drives] return {'size_gb': self.size_gb, 'raid_level': self.raid_level, 'root_device_hint': {'wwn': self.wwn}, 'controller': self.parent.parent.id, 'physical_disks': physical_disk_ids, 'volume_name': self.volume_name} class PhysicalDrive(object): """Class for PhysicalDrive object.""" def __init__(self, id, properties, parent): """Constructor for a PhysicalDrive object.""" self.parent = parent self.properties = properties # Strip off physicaldrive before storing it in id self.id = id[14:] # 'string_to_bytes' takes care of converting any returned # (like 500MB, 25GB) unit of storage space to bytes (Integer value). # It requires space to be stripped. try: size = self.properties['Size'].replace(' ', '') self.size_gb = int(strutils.string_to_bytes( size, return_int=True) / (1024 * 1024 * 1024)) except KeyError: msg = ("Can't get 'Size' parameter from ssacli output for " "physical disk '%(physical_disk)s' of controller " "'%(controller)s'." % {'physical_disk': self.id, 'controller': self.parent.parent.id}) raise exception.HPSSAOperationError(reason=msg) except ValueError: msg = ("ssacli returned unknown size '%(size)s' for physical " "disk '%(physical_disk)s' of controller " "'%(controller)s'." % {'size': size, 'physical_disk': self.id, 'controller': self.parent.id}) raise exception.HPSSAOperationError(reason=msg) try: ssa_interface = self.properties['Interface Type'] except KeyError: msg = ("Can't get 'Interface Type' parameter from ssacli output " "for physical disk '%(physical_disk)s' of controller " "'%(controller)s'." % {'physical_disk': self.id, 'controller': self.parent.parent.id}) raise exception.HPSSAOperationError(reason=msg) self.interface_type = constants.get_interface_type(ssa_interface) self.disk_type = constants.get_disk_type(ssa_interface) self.model = self.properties.get('Model') self.firmware = self.properties.get('Firmware Revision') self.erase_status = self.properties.get('Status') def get_physical_drive_dict(self): """Returns a dictionary of with the details of the physical drive.""" if isinstance(self.parent, RaidArray): controller = self.parent.parent.id status = 'active' else: controller = self.parent.id status = 'ready' return {'size_gb': self.size_gb, 'controller': controller, 'id': self.id, 'disk_type': self.disk_type, 'interface_type': self.interface_type, 'model': self.model, 'firmware': self.firmware, 'status': status, 'erase_status': self.erase_status} ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/hpssa/raid_config_schema.json0000664000175000017500000000657500000000000025257 0ustar00zuulzuul00000000000000{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "raid configuration json schema", "type": "object", "properties": { "logical_disks": { "type": "array", "items": { "type": "object", "properties": { "raid_level": { "type": "string", "enum": [ "0", "1", "5", "6", "10", "50", "60", "1+0", "5+0", "6+0" ], "description": "RAID level for the logical disk. Required." }, "size_gb": { "anyOf": [{ "type": "integer", "minimum": 0, "exclusiveMinimum": true }, { "type": "string", "enum": [ "MAX" ] }], "description": "Size in GiB (Integer) for the logical disk. Use 'MAX' as size_gb if this logical disk is supposed to use the rest of the space available. Required." }, "volume_name": { "type": "string", "description": "Name of the volume to be created. Optional." }, "is_root_volume": { "type": "boolean", "description": "Specifies whether this disk is a root volume. Optional." }, "share_physical_disks": { "type": "boolean", "description": "Specifies whether other logical disks can share physical disks with this logical disk. Optional." }, "disk_type": { "type": "string", "enum": [ "hdd", "ssd" ], "description": "Specifies the type of disk preferred. Valid values are 'hdd' and 'ssd'. Optional." }, "interface_type": { "type": "string", "enum": [ "sata", "scsi", "sas" ], "description": "Specifies the interface type of disk. Valid values are 'sata', 'scsi' and 'sas'. Optional." }, "number_of_physical_disks": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "description": "Number of physical disks to use for this logical disk. Optional." }, "controller": { "type": "string", "description": "Controller to use for this logical disk. Optional." }, "physical_disks": { "type": "array", "items": { "type": "string" }, "description": "The physical disks to use for this logical disk. Optional" } }, "required": ["raid_level", "size_gb"], "additionalProperties": false }, "minItems": 1 } }, "required": ["logical_disks"], "additionalProperties": false } ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2306645 proliantutils-2.16.0/proliantutils/ilo/0000775000175000017500000000000000000000000020230 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/__init__.py0000664000175000017500000000000000000000000022327 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/client.py0000664000175000017500000012736400000000000022075 0ustar00zuulzuul00000000000000# Copyright 2018-2022 Hewlett Packard Enterprise Development LP # # 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. """IloClient module""" import collections import netaddr from proliantutils import exception from proliantutils.ilo import ipmi from proliantutils.ilo import operations from proliantutils.ilo import ribcl from proliantutils.ilo import ris from proliantutils.ilo.snmp import snmp_cpqdisk_sizes as snmp from proliantutils import log from proliantutils.redfish import redfish SUPPORTED_RIS_METHODS = [ 'activate_license', 'clear_secure_boot_keys', 'create_raid_configuration', 'delete_raid_configuration', 'eject_virtual_media', 'get_bios_settings_result', 'get_current_bios_settings', 'get_current_boot_mode', 'get_host_post_state', 'get_default_bios_settings', 'get_host_power_status', 'get_http_boot_url', 'get_ilo_firmware_version_as_major_minor', 'get_one_time_boot', 'get_pending_bios_settings', 'get_pending_boot_mode', 'get_persistent_boot_device', 'get_product_name', 'get_secure_boot_mode', 'get_server_capabilities', 'get_supported_boot_mode', 'get_vm_status', 'hold_pwr_btn', 'inject_nmi', 'insert_virtual_media', 'press_pwr_btn', 'read_raid_configuration', 'reset_bios_to_default', 'reset_ilo_credential', 'reset_secure_boot_keys', 'reset_server', 'set_bios_settings', 'set_host_power', 'set_http_boot_url', 'set_one_time_boot', 'set_pending_boot_mode', 'set_secure_boot_mode', 'set_iscsi_info', 'unset_iscsi_info', 'get_iscsi_initiator_info', 'set_iscsi_initiator_info', 'set_vm_status', 'update_firmware', 'update_persistent_boot', ] SUPPORTED_REDFISH_METHODS = [ 'create_raid_configuration', 'delete_raid_configuration', 'do_disk_erase', 'do_one_button_secure_erase', 'has_disk_erase_completed', 'get_product_name', 'get_host_post_state', 'get_host_power_status', 'set_host_power', 'reset_server', 'press_pwr_btn', 'hold_pwr_btn', 'get_bios_settings_result', 'get_current_bios_settings', 'get_available_disk_types', 'get_default_bios_settings', 'get_pending_bios_settings', 'set_bios_settings', 'get_one_time_boot', 'get_pending_boot_mode', 'get_current_boot_mode', 'activate_license', 'eject_virtual_media', 'inject_nmi', 'insert_virtual_media', 'set_vm_status', 'update_firmware', 'get_persistent_boot_device', 'set_one_time_boot', 'update_persistent_boot', 'set_pending_boot_mode', 'read_raid_configuration', 'reset_ilo_credential', 'reset_bios_to_default', 'get_secure_boot_mode', 'set_secure_boot_mode', 'reset_secure_boot_keys', 'clear_secure_boot_keys', 'get_server_capabilities', 'get_supported_boot_mode', 'get_essential_properties', 'set_iscsi_info', 'unset_iscsi_info', 'get_iscsi_initiator_info', 'set_iscsi_initiator_info', 'set_http_boot_url', 'get_http_boot_url', 'add_tls_certificate', 'remove_tls_certificate', 'get_security_dashboard_values', 'update_password_complexity', 'update_require_login_for_ilo_rbsu', 'update_require_host_authentication', 'update_minimum_password_length', 'update_ipmi_over_lan', 'update_authentication_failure_logging', 'update_secure_boot', 'create_csr', 'add_https_certificate', 'add_ssl_certificate' ] LOG = log.get_logger(__name__) def cache_node(cache=True): def wrapper(cls): if not cache: return cls else: class IloClientWrapper(object): MAX_CACHE_SIZE = 1024 def __init__(self, cls): self.cls = cls self._instances = collections.OrderedDict() def _if_not_exists(self, ilo_info): return (ilo_info not in self._instances) def _create_instance(self, *args, **kwargs): address = args[0] admin = args[1] admin_pass = args[2] self._instances[(address, admin, admin_pass)] = ( self.cls(*args, **kwargs)) # Check for max_cache_size if len(self._instances) > self.MAX_CACHE_SIZE: LOG.debug("Node cache hit the maximum size of %d." % ( self.MAX_CACHE_SIZE)) self._pop_oldest_node() def __call__(self, *args, **kwargs): if not args: LOG.error("Error creating iLO object.") address = args[0] admin = args[1] admin_pass = args[2] if self._if_not_exists((address, admin, admin_pass)): LOG.debug("Creating iLO object for node %(address)s.", {'address': address}) self._create_instance(*args, **kwargs) else: LOG.debug("Using existing object for node " "%(address)s.", {'address': address}) return self._instances[(address, admin, admin_pass)] def _pop_oldest_node(self): node_keys = list(self._instances) node_key = next(iter(node_keys)) LOG.debug("Removed oldest node {} from " "cache".format(node_key)) rnode = self._instances.pop(node_key, None) if rnode: del rnode return IloClientWrapper(cls) return wrapper @cache_node() class IloClient(operations.IloOperations): def __init__(self, host, login, password, timeout=60, port=443, bios_password=None, cacert=None, snmp_credentials=None, use_redfish_only=False): # IPv6 Check # TODO(paresh) Need to test with Global IPv6 address # IPMI supports IPv6 without square brackets self.ipmi_host_info = {'address': host, 'username': login, 'password': password} if netaddr.valid_ipv6(host.split('%')[0]): host = '[' + host + ']' self.ribcl = ribcl.RIBCLOperations(host, login, password, timeout, port, cacert=cacert) self.host = host self.use_redfish_only = use_redfish_only if use_redfish_only: self._init_redfish_object(None, host, login, password, bios_password=bios_password, cacert=cacert) LOG.debug(self._("Forced to use 'redfish' way to interact " "with iLO. Model: %(model)s"), {'model': self.model}) else: try: self.model = self.ribcl.get_product_name() except exception.IloError: # Note(deray): This can be a potential scenario where # RIBCL is disabled on a Gen10 (iLO 5) hardware. # So, trying out the redfish operation object instantiation. # If that passes we know that our assumption is right. # If that errors out, then alas! we are left with no other # choice. self._init_redfish_object(False, host, login, password, bios_password=bios_password, cacert=cacert) else: self.ribcl.init_model_based_tags(self.model) if ('Gen10' in self.model): self._init_redfish_object(True, host, login, password, bios_password=bios_password, cacert=cacert, should_set_model=False) else: # Gen9 self.ris = ris.RISOperations( host, login, password, bios_password=bios_password, cacert=cacert) self.snmp_credentials = snmp_credentials self._validate_snmp() LOG.debug(self._("IloClient object created. " "Model: %(model)s"), {'model': self.model}) def __del__(self): try: if self.redfish: del self.redfish except AttributeError: pass def _init_redfish_object(self, is_ribcl_enabled, redfish_controller_ip, username, password, bios_password=None, cacert=None, should_set_model=True): self.redfish = redfish.RedfishOperations( redfish_controller_ip, username, password, bios_password=bios_password, cacert=cacert) self.is_ribcl_enabled = is_ribcl_enabled if should_set_model: self.model = self.redfish.get_product_name() def _validate_snmp(self): """Validates SNMP credentials. :raises exception.IloInvalidInputError """ cred = self.snmp_credentials if cred is not None: if cred.get('snmp_inspection') is True: if not all([cred.get('auth_user'), cred.get('auth_prot_pp'), cred.get('auth_priv_pp')]): msg = self._('Either few or all mandatory ' 'SNMP credentials ' 'are missing.') LOG.error(msg) raise exception.IloInvalidInputError(msg) try: auth_protocol = cred['auth_protocol'] if auth_protocol not in ["SHA", "MD5"]: msg = self._('Invalid SNMP auth protocol ' 'provided. ' 'Valid values are SHA or MD5') LOG.error(msg) raise exception.IloInvalidInputError(msg) except KeyError: msg = self._('Auth protocol not provided by user. ' 'The default value of MD5 will ' 'be considered.') LOG.debug(msg) pass try: priv_protocol = cred['priv_protocol'] if priv_protocol not in ["AES", "DES"]: msg = self._('Invalid SNMP privacy protocol ' 'provided. ' 'Valid values are AES or DES') LOG.error(msg) raise exception.IloInvalidInputError(msg) except KeyError: msg = self._('Privacy protocol not provided ' 'by user. ' 'The default value of DES will ' 'be considered.') LOG.debug(msg) pass else: LOG.debug(self._('snmp_inspection set to False. SNMP' 'inspection will not be performed.')) else: LOG.debug(self._('SNMP credentials not provided. SNMP ' 'inspection will not be performed.')) def _call_method(self, method_name, *args, **kwargs): """Call the corresponding method using RIBCL, RIS or REDFISH Make the decision to invoke the corresponding method using RIBCL, RIS or REDFISH way. In case of none, throw out ``NotImplementedError`` """ if self.use_redfish_only: if method_name in SUPPORTED_REDFISH_METHODS: the_operation_object = self.redfish else: raise NotImplementedError() else: the_operation_object = self.ribcl if 'Gen10' in self.model: if method_name in SUPPORTED_REDFISH_METHODS: the_operation_object = self.redfish else: if (self.is_ribcl_enabled is not None and not self.is_ribcl_enabled): raise NotImplementedError() elif ('Gen9' in self.model) and (method_name in SUPPORTED_RIS_METHODS): the_operation_object = self.ris method = getattr(the_operation_object, method_name) LOG.debug(self._("Using %(class)s for method %(method)s."), {'class': type(the_operation_object).__name__, 'method': method_name}) return method(*args, **kwargs) def get_all_licenses(self): """Retrieve license type, key, installation date, etc.""" return self._call_method('get_all_licenses') def get_product_name(self): """Get the model name of the queried server.""" return self._call_method('get_product_name') def get_host_power_status(self): """Request the power state of the server.""" return self._call_method('get_host_power_status') def get_http_boot_url(self): """Request the http boot url. :returns: URL for http boot. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ return self._call_method('get_http_boot_url') def set_http_boot_url(self, url): """Set the url to the UefiShellStartupUrl. :param url: URL for http boot. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ return self._call_method('set_http_boot_url', url) def set_iscsi_info(self, target_name, lun, ip_address, port='3260', auth_method=None, username=None, password=None, macs=[]): """Set iscsi details of the system in uefi boot mode. The initiator system is set with the target details like IQN, LUN, IP, Port etc. :param target_name: Target Name for iscsi. :param lun: logical unit number. :param ip_address: IP address of the target. :param port: port of the target. :param auth_method : either None or CHAP. :param username: CHAP Username for authentication. :param password: CHAP secret. :param mac: List of target mac for iSCSI. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedInBiosError, if the system is in the bios boot mode. """ return self._call_method('set_iscsi_info', target_name, lun, ip_address, port, auth_method, username, password, macs) def unset_iscsi_info(self, macs=[]): """Disable iscsi boot option of the system in uefi boot mode. :param mac: List of target mac for iSCSI. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedInBiosError, if the system is in the bios boot mode. """ return self._call_method('unset_iscsi_info', macs) def get_iscsi_initiator_info(self): """Returns iSCSI initiator information of iLO. :returns: iSCSI initiator information. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedInBiosError, if the system is in the bios boot mode. """ return self._call_method('get_iscsi_initiator_info') def set_iscsi_initiator_info(self, initiator_iqn): """Set iSCSI initiator information in iLO. :param initiator_iqn: Initiator iqn for iLO. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedInBiosError, if the system is in the bios boot mode. """ return self._call_method('set_iscsi_initiator_info', initiator_iqn) def get_one_time_boot(self): """Retrieves the current setting for the one time boot.""" return self._call_method('get_one_time_boot') def get_vm_status(self, device='FLOPPY'): """Returns the virtual media drive status like url, is connected, etc. """ return self._call_method('get_vm_status', device) def reset_server(self): """Resets the server.""" return self._call_method('reset_server') def press_pwr_btn(self): """Simulates a physical press of the server power button.""" return self._call_method('press_pwr_btn') def hold_pwr_btn(self): """Simulate a physical press and hold of the server power button.""" return self._call_method('hold_pwr_btn') def set_host_power(self, power): """Toggle the power button of server. :param power: 'ON' or 'OFF' """ return self._call_method('set_host_power', power) def set_one_time_boot(self, value): """Configures a single boot from a specific device.""" return self._call_method('set_one_time_boot', value) def insert_virtual_media(self, url, device='FLOPPY'): """Notifies iLO of the location of a virtual media diskette image.""" return self._call_method('insert_virtual_media', url, device) def eject_virtual_media(self, device='FLOPPY'): """Ejects the Virtual Media image if one is inserted.""" return self._call_method('eject_virtual_media', device) def set_vm_status(self, device='FLOPPY', boot_option='BOOT_ONCE', write_protect='YES'): """Sets the Virtual Media drive status and allows the boot options for booting from the virtual media. """ return self._call_method('set_vm_status', device, boot_option, write_protect) def get_current_boot_mode(self): """Retrieves the current boot mode settings.""" return self._call_method('get_current_boot_mode') def get_pending_boot_mode(self): """Retrieves the pending boot mode settings.""" return self._call_method('get_pending_boot_mode') def get_supported_boot_mode(self): """Retrieves the supported boot mode.""" return self._call_method('get_supported_boot_mode') def set_pending_boot_mode(self, value): """Sets the boot mode of the system for next boot.""" return self._call_method('set_pending_boot_mode', value) def get_persistent_boot_device(self): """Get the current persistent boot device set for the host.""" return self._call_method('get_persistent_boot_device') def update_persistent_boot(self, device_type=[]): """Updates persistent boot based on the boot mode.""" return self._call_method('update_persistent_boot', device_type) def get_secure_boot_mode(self): """Get the status if secure boot is enabled or not.""" return self._call_method('get_secure_boot_mode') def set_secure_boot_mode(self, secure_boot_enable): """Enable/Disable secure boot on the server.""" return self._call_method('set_secure_boot_mode', secure_boot_enable) def reset_secure_boot_keys(self): """Reset secure boot keys to manufacturing defaults.""" return self._call_method('reset_secure_boot_keys') def clear_secure_boot_keys(self): """Reset all keys.""" return self._call_method('clear_secure_boot_keys') def reset_ilo_credential(self, password): """Resets the iLO password. :param password: The password to be set. :raises: IloError, if account not found or on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ return self._call_method('reset_ilo_credential', password) def reset_ilo(self): """Resets the iLO. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ return self._call_method('reset_ilo') def reset_bios_to_default(self): """Resets the BIOS settings to default values. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ return self._call_method('reset_bios_to_default') def get_host_uuid(self): """Request host UUID of the server. :returns: the host UUID of the server :raises: IloConnectionError if failed connecting to the iLO. """ return self._call_method('get_host_uuid') def get_host_health_data(self, data=None): """Request host health data of the server. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the embedded health data. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ return self._call_method('get_host_health_data', data) def get_host_health_present_power_reading(self, data=None): """Request the power consumption of the server. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the power readings. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ return self._call_method('get_host_health_present_power_reading', data) def get_host_health_power_supplies(self, data=None): """Request the health power supply information. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the power supply information. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ return self._call_method('get_host_health_power_supplies', data) def get_host_health_fan_sensors(self, data=None): """Get the health Fan Sensor Report. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the fan sensor information. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ return self._call_method('get_host_health_fan_sensors', data) def get_host_health_temperature_sensors(self, data=None): """Get the health Temp Sensor report. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the temperature sensors information. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ return self._call_method('get_host_health_temperature_sensors', data) def get_host_health_at_a_glance(self, data=None): """Get the health at a glance Report. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the health at a glance information. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ return self._call_method('get_host_health_at_a_glance', data) def get_host_power_readings(self): """Retrieves the host power readings. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the power readings. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ return self._call_method('get_host_power_readings') def get_essential_properties(self): """Get the essential scheduling properties :returns: a dictionary containing memory size, disk size, number of cpus, cpu arch, port numbers and mac addresses. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ data = self._call_method('get_essential_properties') if (data['properties']['local_gb'] == 0): cred = self.snmp_credentials if cred and cred.get('snmp_inspection'): disksize = snmp.get_local_gb(self.host, cred) if disksize: data['properties']['local_gb'] = disksize else: msg = self._('SNMP inspection failed to ' 'get the disk size. Returning ' 'local_gb as 0.') LOG.debug(msg) else: msg = self._("SNMP credentials were not set and " "RIBCL/Redfish failed to get the disk size. " "Returning local_gb as 0.") LOG.debug(msg) return data def get_server_capabilities(self): """Get hardware properties which can be used for scheduling :return: a dictionary of server capabilities. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ capabilities = self._call_method('get_server_capabilities') # TODO(nisha): Assumption is that Redfish always see the pci_device # member name field populated similarly to IPMI. # If redfish is not able to get nic_capacity, we can fall back to # IPMI way of retrieving nic_capacity in the future. As of now # the IPMI is not tested on Gen10, hence assuming that # Redfish will always be able to give the data. if ('Gen10' not in self.model): major_minor = ( self._call_method('get_ilo_firmware_version_as_major_minor')) # NOTE(vmud213): Even if it is None, pass it on to get_nic_capacity # as we still want to try getting nic capacity through ipmitool # irrespective of what firmware we are using. nic_capacity = ipmi.get_nic_capacity(self.ipmi_host_info, major_minor) if nic_capacity: capabilities.update({'nic_capacity': nic_capacity}) if capabilities: return capabilities def activate_license(self, key): """Activates iLO license. :param key: iLO license key. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ return self._call_method('activate_license', key) def delete_raid_configuration(self): """Deletes the logical drives from the system :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ return self._call_method('delete_raid_configuration') def create_raid_configuration(self, raid_config): """Create the raid configuration on the hardware. :param raid_config: A dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100, 'physical_disks': ['6I:1:5'], 'controller': 'HPE Smart Array P408i-a SR Gen10'}, ]} :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server """ return self._call_method('create_raid_configuration', raid_config) def read_raid_configuration(self, raid_config=None): """Read the logical drives from the system. :param raid_config: None in case of post-delete read or in case of post-create a dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100, 'physical_disks': ['6I:1:5'], 'controller': 'HPE Smart Array P408i-a SR Gen10'}, ]} :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. :returns: A dictionary containing list of logical disks """ return self._call_method('read_raid_configuration', raid_config) def update_firmware(self, firmware_url, component_type): """Updates the given firmware on the server :param firmware_url: location of the firmware :param component_type: Type of component to be applied to. :raises: InvalidInputError, if the validation of the input fails :raises: IloError, on an error from iLO :raises: IloCommandNotSupportedError, if the command is not supported on the server """ return self._call_method( 'update_firmware', firmware_url, component_type) def inject_nmi(self): """Inject NMI, Non Maskable Interrupt. Inject NMI (Non Maskable Interrupt) for a node immediately. :raises: IloError, on an error from iLO :raises: IloConnectionError, if not able to reach iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server """ return self._call_method('inject_nmi') def get_host_post_state(self): """Request the current state of system POST. Retrieves current state of system POST. :raises: IloError, on an error from iLO :raises: IloCommandNotSupportedError, if the command is not supported on the server """ return self._call_method('get_host_post_state') def get_current_bios_settings(self, only_allowed_settings=False): """Get current BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictionary of current BIOS settings is returned. Depending on the 'only_allowed_settings', either only the allowed settings are returned or all the supported settings are returned. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ return self._call_method('get_current_bios_settings', only_allowed_settings) def get_pending_bios_settings(self, only_allowed_settings=False): """Get current BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictionary of pending BIOS settings. Depending on the 'only_allowed_settings', either only the allowed settings are returned or all the supported settings are returned. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ return self._call_method('get_pending_bios_settings', only_allowed_settings) def set_bios_settings(self, data=None, only_allowed_settings=False): """Sets current BIOS settings to the provided data. :param: only_allowed_settings: True when only allowed BIOS settings are to be set. If False, all the BIOS settings supported by iLO and present in the 'data' are set. :param: data: a dictionary of BIOS settings to be applied. Depending on the 'only_allowed_settings', either only the allowed settings are set or all the supported settings that are in the 'data' are set. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ return self._call_method('set_bios_settings', data, only_allowed_settings) def get_default_bios_settings(self, only_allowed_settings=False): """Get default BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictionary of default BIOS settings(factory settings). Depending on the 'only_allowed_settings', either only the allowed settings are returned or all the supported settings are returned. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ return self._call_method('get_default_bios_settings', only_allowed_settings) def get_bios_settings_result(self): """Gets the result of the bios settings applied :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ return self._call_method('get_bios_settings_result') def has_disk_erase_completed(self): """Get out-of-band sanitize disk erase status. :returns: True if disk erase completed on all controllers otherwise False :raises: IloError, on an error from iLO. """ return self._call_method('has_disk_erase_completed') def do_disk_erase(self, disk_type, pattern=None): """Perform the out-of-band sanitize disk erase on the hardware. :param disk_type: Media type of disk drives. :param pattern: Erase pattern, if nothing passed default ('overwrite' for 'HDD', and 'block' for 'SSD') will be used. :raises: IloError, on an error from iLO. """ return self._call_method('do_disk_erase', disk_type, pattern) def do_one_button_secure_erase(self): """Perform the one button secure erase on the hardware. The One-button secure erase process resets iLO and deletes all licenses stored there, resets BIOS settings, and deletes all AHS and warranty data stored on the system. It also erases supported non-volatile storage data and deletes any deployment settings profiles. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ return self._call_method('do_one_button_secure_erase') def get_available_disk_types(self): """Get the list of all disk type available in server :returns: A list containing disk types. :raises: IloError, on an error from iLO. """ return self._call_method('get_available_disk_types') def add_tls_certificate(self, cert_file_list): """Adds the TLS certificate to the iLO :param cert_file_list: List of TLS certificate files :raises: IloError, on an error from iLO. """ return self._call_method('add_tls_certificate', cert_file_list) def remove_tls_certificate(self, cert_file_list=[], excl_cert_file_list=[]): """Removes the TLS certificate from the iLO :param cert_file_list: List of TLS certificate files :raises: IloError, on an error from iLO. """ return self._call_method('remove_tls_certificate', cert_file_list) def get_security_dashboard_values(self): """Gets all the parameters related to security dashboard. :return: a dictionary of the security dashboard values with their security status and security parameters with their complete details and security status. :raises: IloError, if security dashboard or their params not found or on an error from iLO. """ return self._call_method('get_security_dashboard_values') def update_password_complexity(self, enable=True, ignore=False): """Update the Password_Complexity security param. :param enable: A boolean param, True when Password_Complexity needs to be enabled. If passed False, Password_Complexity security param will be disabled. If nothing passed default will be True. :param ignore : A boolean param, True when Password_Complexity needs to be ignored. If passed False, Password_Complexity security param will not be ignored. If nothing passed default will be False. :raises: IloError, on an error from iLO. """ return self._call_method('update_password_complexity', enable, ignore) def update_require_login_for_ilo_rbsu(self, enable=True, ignore=False): """Update the RequiredLoginForiLORBSU security param. :param enable: A boolean param, True when RequiredLoginForiLORBSU needs to be enabled. If passed False, RequiredLoginForiLORBSU security param will be disabled. If nothing passed default will be True. :param ignore : A boolean param, True when RequiredLoginForiLORBSU needs to be ignored. If passed False, RequiredLoginForiLORBSU security param will not be ignored. If nothing passed default will be False. :raises: IloError, on an error from iLO. """ return self._call_method('update_require_login_for_ilo_rbsu', enable, ignore) def update_require_host_authentication(self, enable=True, ignore=False): """Update the RequireHostAuthentication security param. :param enable: A boolean param, True when RequireHostAuthentication needs to be enabled. If passed False, RequireHostAuthentication security param will be disabled. If nothing passed default will be True. :param ignore : A boolean param, True when RequireHostAuthentication needs to be ignored. If passed False, RequireHostAuthentication security param will not be ignored. If nothing passed default will be False. :raises: IloError, on an error from iLO. """ return self._call_method('update_require_host_authentication', enable, ignore) def update_minimum_password_length(self, passwd_length=None, ignore=False): """Update the MinPasswordLength security param. :param passwd_length: Minimum length of password used. If nothing passed default will be None. :param ignore : A boolean param, True when MinPasswordLength needs to be ignored. If passed False, MinPasswordLength security param will not be ignored. If nothing passed default will be False. """ return self._call_method('update_minimum_password_length', passwd_length, ignore) def update_ipmi_over_lan(self, enable=False, ignore=False): """Update the IPMI/DCMI_Over_LAN security param. :param enable: A boolean param, True when IPMI/DCMI_Over_LAN needs to be enabled. If passed False, IPMI/DCMI_Over_LAN security param will be disabled. If nothing passed default will be False. :param ignore : A boolean param, True when IPMI/DCMI_Over_LAN needs to be ignored. If passed False, IPMI/DCMI_Over_LAN security param will not be ignored. If nothing passed default will be False. :raises: IloError, on an error from iLO. """ return self._call_method('update_ipmi_over_lan', enable, ignore) def update_authentication_failure_logging(self, logging_threshold=None, ignore=False): """Update the Authentication_failure_Logging security param. :param logging_threshold: Value of authenication failure logging threshold. If nothing passed default will be None. :param ignore : A boolean param, True when Authentication_failure_Logging needs to be ignored. If passed False, Authentication_failure_Logging security param will not be ignored. If nothing passed default will be False. :raises: IloError, on an error from iLO. """ return self._call_method('update_authentication_failure_logging', logging_threshold, ignore) def update_secure_boot(self, enable=True, ignore=False): """Update Secure_Boot security param on the server. :param enable: A boolean param, True when Secure_Boot needs to be enabled. If passed False, Secure_Boot security param will be disabled. If nothing passed default will be True. :param ignore : A boolean param, True when Secure_boot needs to be ignored. If passed False, Secure_boot security param will not be ignored. If nothing passed default will be False. """ return self._call_method('update_secure_boot', enable, ignore) def create_csr(self, path, csr_params): """Creates the Certificate Signing Request. :param path: directory to store csr file. :param csr_params: A dictionary containing all the necessary information required to create CSR. :raises: IloError, on an error from iLO. """ return self._call_method('create_csr', path, csr_params) def add_https_certificate(self, cert_file): """Adds the signed https certificate to the iLO. :param cert_file: Signed HTTPS certificate file. :raises: IloError, on an error from iLO. """ return self._call_method('add_https_certificate', cert_file) # This method is deprecated, and will be removed in future release. def add_ssl_certificate(self, csr_params, signed_cert, private_key, pass_phrase): """Creates CSR and adds the signed SSL certificate to the iLO. :param csr_params: A dictionary containing all the necessary information required to create CSR. :param signed_cert: Signed certificate which will be used to sign the created CSR. :param private_key: private key. :param pass_phrase: Pass phrase for the private key. :raises: IloError, on an error from iLO. """ return self._call_method('add_ssl_certificate', csr_params=csr_params, signed_cert=signed_cert, private_key=private_key, pass_phrase=pass_phrase) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/common.py0000664000175000017500000002315100000000000022074 0ustar00zuulzuul00000000000000# Copyright 2014 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. """Common functionalities used by both RIBCL and RIS.""" import collections import os import re import stat import time from proliantutils import exception from proliantutils.ilo import constants from proliantutils import log LOG = log.get_logger(__name__) ILO_VER_STR_PATTERN = r"\d+\.\d+" # Representation of supported boot modes SupportedBootModes = collections.namedtuple( 'SupportedBootModes', ['boot_mode_bios', 'boot_mode_uefi']) def wait_for_operation_to_complete( has_operation_completed, retries=10, delay_bw_retries=5, delay_before_attempts=10, failover_exc=exception.IloError, failover_msg=("Operation did not complete even after multiple " "attempts."), is_silent_loop_exit=False): """Attempts the provided operation for a specified number of times. If it runs out of attempts, then it raises an exception. On success, it breaks out of the loop. :param has_operation_completed: the method to retry and it needs to return a boolean to indicate success or failure. :param retries: number of times the operation to be (re)tried, default 10 :param delay_bw_retries: delay in seconds before attempting after each failure, default 5. :param delay_before_attempts: delay in seconds before beginning any operation attempt, default 10. :param failover_exc: the exception which gets raised in case of failure upon exhausting all the attempts, default IloError. :param failover_msg: the msg with which the exception gets raised in case of failure upon exhausting all the attempts. :param is_silent_loop_exit: decides if exception has to be raised (in case of failure upon exhausting all the attempts) or not, default False (will be raised). :raises: failover_exc, if failure happens even after all the attempts, default IloError. """ retry_count = retries # Delay for ``delay_before_attempts`` secs, before beginning any attempt time.sleep(delay_before_attempts) while retry_count: try: LOG.debug("Calling '%s', retries left: %d", has_operation_completed.__name__, retry_count) if has_operation_completed(): break except exception.IloError: pass time.sleep(delay_bw_retries) retry_count -= 1 else: LOG.debug("Max retries exceeded with: '%s'", has_operation_completed.__name__) if not is_silent_loop_exit: raise failover_exc(failover_msg) def wait_for_ilo_after_reset(ilo_object): """Continuously polls for iLO to come up after reset.""" is_ilo_up_after_reset = lambda: ilo_object.get_product_name() is not None is_ilo_up_after_reset.__name__ = 'is_ilo_up_after_reset' wait_for_operation_to_complete( is_ilo_up_after_reset, failover_exc=exception.IloConnectionError, failover_msg='iLO is not up after reset.' ) def wait_for_ris_firmware_update_to_complete(ris_object): """Continuously polls for iLO firmware update to complete.""" p_state = ['IDLE'] c_state = ['IDLE'] def has_firmware_flash_completed(): """Checks for completion status of firmware update operation The below table shows the conditions for which the firmware update will be considered as DONE (be it success or error):: +---------------------+--------------------+ | Previous state | Current state | +=====================+====================+ | IDLE | ERROR | +---------------------+--------------------+ | IDLE | COMPLETED | +---------------------+--------------------+ | PROGRESSING | ERROR | +---------------------+--------------------+ | PROGRESSING | COMPLETED | +---------------------+--------------------+ | PROGRESSING | UNKNOWN | +---------------------+--------------------+ | PROGRESSING | IDLE | +---------------------+--------------------+ """ curr_state, curr_percent = ris_object.get_firmware_update_progress() p_state[0] = c_state[0] c_state[0] = curr_state if (((p_state[0] == 'PROGRESSING') and (c_state[0] in ['COMPLETED', 'ERROR', 'UNKNOWN', 'IDLE'])) or (p_state[0] == 'IDLE' and (c_state[0] in ['COMPLETED', 'ERROR']))): return True return False wait_for_operation_to_complete( has_firmware_flash_completed, delay_bw_retries=30, failover_msg='iLO firmware update has failed.' ) wait_for_ilo_after_reset(ris_object) def wait_for_ribcl_firmware_update_to_complete(ribcl_object): """Continuously checks for iLO firmware update to complete.""" def is_ilo_reset_initiated(): """Checks for initiation of iLO reset Invokes the ``get_product_name`` api and returns i) True, if exception gets raised as that marks the iLO reset initiation. ii) False, if the call gets through without any failure, marking that iLO is yet to be reset. """ try: LOG.debug(ribcl_object._('Checking for iLO reset...')) ribcl_object.get_product_name() return False except exception.IloError: LOG.debug(ribcl_object._('iLO is being reset...')) return True # Note(deray): wait for 5 secs, before checking if iLO reset got triggered # at every interval of 6 secs. This looping call happens for 10 times. # Once it comes out of the wait of iLO reset trigger, then it starts # waiting for iLO to be up again after reset. wait_for_operation_to_complete( is_ilo_reset_initiated, delay_bw_retries=6, delay_before_attempts=5, is_silent_loop_exit=True ) wait_for_ilo_after_reset(ribcl_object) def isDisk(result): """Checks if result has a disk related strings.""" disk_identifier = ["Logical Drive", "HDD", "Storage", "LogVol"] return any(e in result for e in disk_identifier) def get_filename_and_extension_of(target_file): """Gets the base filename and extension of the target file. :param target_file: the complete path of the target file :returns: base filename and extension """ base_target_filename = os.path.basename(target_file) file_name, file_ext_with_dot = os.path.splitext(base_target_filename) return file_name, file_ext_with_dot def add_exec_permission_to(target_file): """Add executable permissions to the file :param target_file: the target file whose permission to be changed """ mode = os.stat(target_file).st_mode os.chmod(target_file, mode | stat.S_IXUSR) def get_major_minor(ilo_ver_str): """Extract the major and minor number from the passed string :param ilo_ver_str: the string that contains the version information :returns: String of the form "." or None """ if not ilo_ver_str: return None try: # Note(vmud213):This logic works for all strings # that contain the version info as . # Formats of the strings: # Release version -> "2.50 Feb 18 2016" # Debug version -> "iLO 4 v2.50" # random version -> "XYZ ABC 2.30" pattern = re.search(ILO_VER_STR_PATTERN, ilo_ver_str) if pattern: matched = pattern.group(0) if matched: return matched return None except Exception: return None def get_supported_boot_modes(supported_boot_mode_constant): """Retrieves the server supported boot modes It retrieves the server supported boot modes as a namedtuple containing 'boot_mode_bios' as 'true'/'false' (in string format) and 'boot_mode_uefi' again as true'/'false'. :param supported_boot_mode_constant: supported boot_mode constant :returns: A namedtuple containing ``boot_mode_bios`` and ``boot_mode_uefi`` with 'true'/'false' set accordingly for legacy BIOS and UEFI boot modes. """ boot_mode_bios = 'false' boot_mode_uefi = 'false' if (supported_boot_mode_constant == constants.SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY): boot_mode_bios = 'true' elif (supported_boot_mode_constant == constants.SUPPORTED_BOOT_MODE_UEFI_ONLY): boot_mode_uefi = 'true' elif (supported_boot_mode_constant == constants.SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI): boot_mode_bios = 'true' boot_mode_uefi = 'true' return SupportedBootModes(boot_mode_bios=boot_mode_bios, boot_mode_uefi=boot_mode_uefi) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/constants.py0000664000175000017500000000304000000000000022613 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # 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. # SUPPORTED_BOOT_MODE constants SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY = 'legacy bios only' SUPPORTED_BOOT_MODE_UEFI_ONLY = 'uefi only' SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI = 'legacy bios and uefi' SUPPORTED_BIOS_PROPERTIES = [ "AdvancedMemProtection", "AutoPowerOn", "BootMode", "BootOrderPolicy", "CollabPowerControl", "DynamicPowerCapping", "DynamicPowerResponse", "IntelligentProvisioning", "IntelPerfMonitoring", "IntelProcVtd", "IntelQpiFreq", "IntelTxt", "PowerProfile", "PowerRegulator", "ProcAes", "ProcCoreDisable", "ProcHyperthreading", "ProcNoExecute", "ProcTurbo", "ProcVirtualization", "SecureBootStatus", "Sriov", "ThermalConfig", "ThermalShutdown", "TpmState", "TpmType", "UefiOptimizedBoot" ] SUPPORTED_REDFISH_BIOS_PROPERTIES = SUPPORTED_BIOS_PROPERTIES + [ "WorkloadProfile" ] ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/firmware_controller.py0000664000175000017500000003672100000000000024672 0ustar00zuulzuul00000000000000# Copyright 2016 Hewlett Packard Enterprise 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. """ Firmware related utilities and helper functions. """ import abc import os import random import re import shutil import socket import ssl import subprocess import sys import tempfile import types import uuid from oslo_concurrency import processutils as utils import six from proliantutils import exception from proliantutils.ilo import common from proliantutils import log if six.PY3: def b(x): return bytes(x, 'ascii') else: def b(x): return x LOG = log.get_logger(__name__) # Supported components for firmware update SUPPORTED_FIRMWARE_UPDATE_COMPONENTS = ['ilo', 'cpld', 'power_pic', 'bios', 'chassis'] # Supported raw firmware file extensions RAW_FIRMWARE_EXTNS = ['.hex', '.bin', '.vme', '.flash'] def find_executable(executable_name): """Tries to find executable in PATH environment It uses ``shutil.which`` method in Python3 and ``distutils.spawn.find_executable`` method in Python2.7 to find the absolute path to the 'name' executable. :param executable_name: name of the executable :returns: Returns the absolute path to the executable or None if not found. """ if six.PY3: executable_abs = shutil.which(executable_name) else: import distutils.spawn executable_abs = distutils.spawn.find_executable(executable_name) return executable_abs def check_firmware_update_component(func): """Checks the firmware update component.""" @six.wraps(func) def wrapper(self, filename, component_type): """Wrapper around ``update_firmware`` call. :param filename: location of the raw firmware file. :param component_type: Type of component to be applied to. """ component_type = component_type and component_type.lower() if (component_type not in SUPPORTED_FIRMWARE_UPDATE_COMPONENTS): msg = ("Got invalid component type for firmware update: " "``update_firmware`` is not supported on %(component)s" % {'component': component_type}) LOG.error(self._(msg)) # noqa raise exception.InvalidInputError(msg) return func(self, filename, component_type) return wrapper @six.add_metaclass(abc.ABCMeta) class FirmwareImageControllerBase(object): """Base class for firmware file related operations.""" def __init__(self, fw_file): self.fw_file = fw_file file_name, file_ext_with_dot = common.get_filename_and_extension_of( fw_file) self.fw_filename = file_name self.fw_file_ext = file_ext_with_dot class FirmwareImageUploader(FirmwareImageControllerBase): """Helper class to upload the firmware image file This class acts as a helper class in uploading the firmware file to iLO. """ HTTP_UPLOAD_HEADER = ("POST /cgi-bin/uploadRibclFiles HTTP/1.1\r\n" "Host: localhost\r\nConnection: Close\r\n" "Content-Length: %d\r\n" "Content-Type: multipart/form-data; " "boundary=%s\r\n\r\n") def upload_file_to(self, addressinfo, timeout): """Uploads the raw firmware file to iLO Uploads the raw firmware file (already set as attribute in FirmwareImageControllerBase constructor) to iLO, whose address information is passed to this method. :param addressinfo: tuple of hostname and port of the iLO :param timeout: timeout in secs, used for connecting to iLO :raises: IloInvalidInputError, if raw firmware file not found :raises: IloError, for other internal problems :returns: the cookie so sent back from iLO on successful upload """ self.hostname, self.port = addressinfo self.timeout = timeout filename = self.fw_file firmware = open(filename, 'rb').read() # generate boundary boundary = b('------hpiLO3t' + str(random.randint(100000, 1000000)) + 'z') while boundary in firmware: boundary = b('------hpiLO3t' + str(random.randint(100000, 1000000)) + 'z') # generate body parts parts = [ # body1 b("--") + boundary + b("""\r\nContent-Disposition: form-data; """ """name="fileType"\r\n\r\n"""), # body2 b("\r\n--") + boundary + b('''\r\nContent-Disposition: form-data; name="fwimgfile"; ''' '''filename="''') + b(filename) + b('''"\r\nContent-Type: application/octet-stream\r\n\r\n'''), # firmware image firmware, # body3 b("\r\n--") + boundary + b("--\r\n"), ] total_bytes = sum([len(x) for x in parts]) sock = self._get_socket() # send the firmware image sock.write(b(self.HTTP_UPLOAD_HEADER % (total_bytes, boundary.decode('ascii')))) for part in parts: sock.write(part) data = '' try: while True: d = sock.read() data += d.decode('latin-1') if not d: break except socket.sslerror: # Connection closed e = sys.exc_info()[1] if not data: raise exception.IloConnectionError( "Communication with %(hostname)s:%(port)d failed: " "%(error)s" % {'hostname': self.hostname, 'port': self.port, 'error': str(e)}) # Received len(data) bytes cookie_match = re.search('Set-Cookie: *(.*)', data) if not cookie_match: raise exception.IloError("Uploading of file: %s failed due " "to unknown reason." % filename) # return the cookie return cookie_match.group(1) def _get_socket(self, sslversion=ssl.PROTOCOL_TLSv1): """Sets up an https connection and do an HTTP/raw socket request :param sslversion: version of ssl session :raises: IloConnectionError, for connection failures :returns: ssl wrapped socket object """ err = None sock = None try: for res in socket.getaddrinfo( self.hostname, self.port, 0, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res try: sock = socket.socket(af, socktype, proto) sock.settimeout(self.timeout) # Connecting to {self.hostname} at port {self.port} sock.connect(sa) except socket.timeout: if sock is not None: sock.close() err = exception.IloConnectionError( "Timeout connecting to %(hostname)s:%(port)d" % {'hostname': self.hostname, 'port': self.port}) except socket.error: if sock is not None: sock.close() e = sys.exc_info()[1] err = exception.IloConnectionError( "Error connecting to %(hostname)s:%(port)d : %(error)s" % {'hostname': self.hostname, 'port': self.port, 'error': str(e)}) except Exception: raise exception.IloConnectionError( "Unable to resolve %s" % self.hostname) if err is not None: raise err # wrapping the socket over ssl session try: return ssl.wrap_socket(sock, ssl_version=sslversion) except socket.sslerror: e = sys.exc_info()[1] msg = (getattr(e, 'reason', None) or getattr(e, 'message', None)) # Some older iLO s don't support TLSv1, retry with SSLv3 if ('wrong version number' in msg) and ( sslversion == ssl.PROTOCOL_TLSv1): return self._get_socket(ssl.PROTOCOL_SSLv3) raise exception.IloConnectionError( "Cannot establish ssl session with %(hostname)s:%(port)d : " "%(error)s" % {'hostname': self.hostname, 'port': self.port, 'error': str(e)}) class FirmwareImageExtractor(FirmwareImageControllerBase): """Helper class to extract the raw file from compact firmware image file This class acts as a helper class in extracting the raw firmware file from the compact firmware file. """ def extract(self): """Extracts the raw firmware file from its compact format Extracts the raw firmware file from its compact file format (already set as attribute in FirmwareImageControllerBase constructor). :raises: InvalidInputError, if raw firmware file not found :raises: ImageExtractionFailed, for extraction related issues :returns: the raw firmware file with the complete path :returns: boolean(True) to indicate that a new file got generated after successful extraction. """ target_file = self.fw_file common.add_exec_permission_to(target_file) # create a temp directory where the extraction will occur temp_dir = tempfile.mkdtemp() extract_path = os.path.join(temp_dir, self.fw_filename) try: self._do_extract(target_file, extract_path) except exception.ImageExtractionFailed: # clean up the partial extracted content, if any, # along with temp dir and re-raise the exception shutil.rmtree(temp_dir, ignore_errors=True) raise # creating a new hard link to the core firmware file firmware_file_path = _get_firmware_file_in_new_path(extract_path) # delete the entire extracted content along with temp dir. shutil.rmtree(temp_dir, ignore_errors=True) if not firmware_file_path: raise exception.InvalidInputError( "Raw firmware file not found in: '%s'" % target_file) return firmware_file_path, True def get_fw_extractor(fw_file): """Gets the firmware extractor object fine-tuned for specified type :param fw_file: compact firmware file to be extracted from :raises: InvalidInputError, for unsupported file types :returns: FirmwareImageExtractor object """ fw_img_extractor = FirmwareImageExtractor(fw_file) extension = fw_img_extractor.fw_file_ext.lower() if extension == '.scexe': # assign _do_extract attribute to refer to _extract_scexe_file fw_img_extractor._do_extract = types.MethodType( _extract_scexe_file, fw_img_extractor) elif extension == '.rpm': # assign _do_extract attribute to refer to _extract_rpm_file fw_img_extractor._do_extract = types.MethodType( _extract_rpm_file, fw_img_extractor) elif extension in RAW_FIRMWARE_EXTNS: # Note(deray): Assigning ``extract`` attribute to return # 1. the firmware file itself # 2. boolean (False) to indicate firmware file is not extracted def dummy_extract(self): """Dummy (no-op) extract method :returns: the same firmware file with the complete path :returns: boolean(False) to indicate that a new file is not generated. """ return fw_img_extractor.fw_file, False fw_img_extractor.extract = types.MethodType( dummy_extract, fw_img_extractor) else: raise exception.InvalidInputError( 'Unexpected compact firmware file type: %s' % fw_file) return fw_img_extractor def _extract_scexe_file(self, target_file, extract_path): """Extracts the scexe file. :param target_file: the firmware file to be extracted from :param extract_path: the path where extraction is supposed to happen """ # Command to extract the smart component file. unpack_cmd = '--unpack=' + extract_path # os.path.isfile(target_file) cmd = [target_file, unpack_cmd] out, err = utils.trycmd(*cmd) def _extract_rpm_file(self, target_file, extract_path): """Extracts the rpm file. :param target_file: the firmware file to be extracted from :param extract_path: the path where extraction is supposed to happen :raises: ImageExtractionFailed, if any issue with extraction """ if not os.path.exists(extract_path): os.makedirs(extract_path) os.chdir(extract_path) if find_executable('rpm2cpio') is None: raise exception.ImageExtractionFailed( image_ref=target_file, reason='Command `rpm2cpio` not found.') if find_executable('cpio') is None: raise exception.ImageExtractionFailed( image_ref=target_file, reason='Command `cpio` not found.') try: rpm2cpio = subprocess.Popen('rpm2cpio ' + target_file, shell=True, stdout=subprocess.PIPE) cpio = subprocess.Popen('cpio -idm', shell=True, stdin=rpm2cpio.stdout) out, err = cpio.communicate() except (OSError, ValueError) as e: raise exception.ImageExtractionFailed( image_ref=target_file, reason='Unexpected error in extracting file. ' + str(e)) def _get_firmware_file(path): """Gets the raw firmware file Gets the raw firmware file from the extracted directory structure :param path: the directory structure to search for :returns: the raw firmware file with the complete path """ for dirpath, dirnames, filenames in os.walk(path): for filename in filenames: file_name, file_ext = os.path.splitext(os.path.basename(filename)) if file_ext in RAW_FIRMWARE_EXTNS: # return filename return os.path.join(dirpath, filename) def _get_firmware_file_in_new_path(searching_path): """Gets the raw firmware file in a new path Gets the raw firmware file from the extracted directory structure and creates a hard link to that in a file path and cleans up the lookup extract path. :param searching_path: the directory structure to search for :returns: the raw firmware file with the complete new path """ firmware_file_path = _get_firmware_file(searching_path) if not firmware_file_path: return None # Note(deray): the path of the new firmware file will be of the form: # # [TEMP_DIR]/xxx-xxx_actual_firmware_filename # # e.g. /tmp/77e8f689-f32c-4727-9fc3-a7dacefe67e4_ilo4_210.bin file_name, file_ext_with_dot = common.get_filename_and_extension_of( firmware_file_path) new_firmware_file_path = os.path.join( tempfile.gettempdir(), str(uuid.uuid4()) + '_' + file_name + file_ext_with_dot) # create a hard link to the raw firmware file os.link(firmware_file_path, new_firmware_file_path) return new_firmware_file_path ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/ipmi.py0000664000175000017500000001277000000000000021547 0ustar00zuulzuul00000000000000# coding=utf-8 # Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 NTT DOCOMO, INC. # Copyright 2014 International Business Machines Corporation # All Rights Reserved. # # 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. """ NOTE THAT CERTAIN DISTROS MAY INSTALL openipmi BY DEFAULT, INSTEAD OF ipmitool, WHICH PROVIDES DIFFERENT COMMAND-LINE OPTIONS AND *IS NOT SUPPORTED* BY THIS DRIVER. """ import subprocess from proliantutils import log LOG = log.get_logger(__name__) MIN_SUGGESTED_FW_REV = 2.3 DEFAULT_FW_REV = 2.1 def _exec_ipmitool(driver_info, command): """Execute the ipmitool command. This uses the lanplus interface to communicate with the BMC device driver. :param driver_info: the ipmitool parameters for accessing a node. :param command: the ipmitool command to be executed. """ ipmi_cmd = ("ipmitool -H %(address)s" " -I lanplus -U %(user)s -P %(passwd)s %(cmd)s" % {'address': driver_info['address'], 'user': driver_info['username'], 'passwd': driver_info['password'], 'cmd': command}) out = None try: process = subprocess.Popen(ipmi_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) out, err = process.communicate() LOG.debug(("IPMI Command output: %(out)s and " "IPMI Command error: %(err)s and returncode: (code)s"), {'out': out, 'err': err, 'code': process.returncode}) except Exception: pass if out: return out.decode() else: return out def get_ilo_version(ilo_fw_str): """Gets the float value of the firmware version Converts a string with major and minor numbers to a float value. :param ilo_fw_tup: String containing the major and minor versions of the form . :returns: float value constructed from major and minor numbers. """ if not ilo_fw_str: return None try: major_minor_val = float(ilo_fw_str) except Exception: return None return major_minor_val def get_nic_capacity(driver_info, ilo_fw): """Gets the FRU data to see if it is NIC data Gets the FRU data in loop from 0-255 FRU Ids and check if the returned data is NIC data. Couldn't find any easy way to detect if it is NIC data. We should't be hardcoding the FRU Id. :param driver_info: Contains the access credentials to access the BMC. :param ilo_fw: a tuple containing major and minor versions of firmware :returns: the max capacity supported by the NIC adapter. """ i = 0x0 value = None ilo_fw_rev = get_ilo_version(ilo_fw) or DEFAULT_FW_REV # Note(vmud213): iLO firmware versions >= 2.3 support reading the FRU # information in a single call instead of iterating over each FRU id. if ilo_fw_rev < MIN_SUGGESTED_FW_REV: for i in range(0xff): # Note(vmud213): We can discard FRU ID's between 0x6e and 0xee # as they don't contain any NIC related information if (i < 0x6e) or (i > 0xee): cmd = "fru print %s" % hex(i) out = _exec_ipmitool(driver_info, cmd) if out and 'port' in out and 'Adapter' in out: value = _parse_ipmi_nic_capacity(out) if value is not None: break else: continue else: cmd = "fru print" out = _exec_ipmitool(driver_info, cmd) if out: for line in out.split('\n'): if line and 'port' in line and 'Adapter' in line: value = _parse_ipmi_nic_capacity(line) if value is not None: break return value def _parse_ipmi_nic_capacity(nic_out): """Parse the FRU output for NIC capacity Parses the FRU output. Seraches for the key "Product Name" in FRU output and greps for maximum speed supported by the NIC adapter. :param nic_out: the FRU output for NIC adapter. :returns: the max capacity supported by the NIC adapter. """ if (("Device not present" in nic_out) or ("Unknown FRU header" in nic_out) or not nic_out): return None capacity = None product_name = None data = nic_out.split('\n') for item in data: fields = item.split(':') if len(fields) > 1: first_field = fields[0].strip() if first_field == "Product Name": # Join the string back if the Product Name had some # ':' by any chance product_name = ':'.join(fields[1:]) break if product_name: product_name_array = product_name.split(' ') for item in product_name_array: if 'Gb' in item: capacity_int = item.strip('Gb') if capacity_int.isdigit(): capacity = item return capacity ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/mappings.py0000664000175000017500000000221700000000000022422 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from proliantutils.ilo import constants # Supported boot mode mappings GET_SUPPORTED_BOOT_MODE_RIBCL_MAP = { 'LEGACY_ONLY': constants.SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY, 'UEFI_ONLY': constants.SUPPORTED_BOOT_MODE_UEFI_ONLY, 'LEGACY_UEFI': constants.SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI, } GET_SUPPORTED_BOOT_MODE_RIS_MAP = { 0: constants.SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY, 3: constants.SUPPORTED_BOOT_MODE_UEFI_ONLY, 2: constants.SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI, } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/operations.py0000664000175000017500000006073700000000000023002 0ustar00zuulzuul00000000000000# Copyright 2022 Hewlett Packard Enterprise Development LP # Copyright 2014 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from proliantutils import exception ERRMSG = "The specified operation is not supported on current platform." class IloOperations(object): """iLO class for performing iLO Operations. This class provides an OO interface for retrieving information and managing iLO. It implements the same interface in python as described in HP iLO 4 Scripting and Command Line Guide. """ def _(self, msg): """Prepends host information if available to msg and returns it.""" try: return "[iLO %s] %s" % (self.host.replace('%', '%%'), msg) except AttributeError: return "[iLO ] %s" % msg def get_all_licenses(self): """Retrieve license type, key, installation date, etc.""" raise exception.IloCommandNotSupportedError(ERRMSG) def get_product_name(self): """Get the model name of the queried server.""" raise exception.IloCommandNotSupportedError(ERRMSG) def get_host_power_status(self): """Request the power state of the server.""" raise exception.IloCommandNotSupportedError(ERRMSG) def get_http_boot_url(self): """Request the http boot url. :returns: URL for http boot. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def set_http_boot_url(self, url): """Set the url to the UefiShellStartupUrl. :param url: URL for http boot. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def set_iscsi_info(self, target_name, lun, ip_address, port='3260', auth_method=None, username=None, password=None, macs=[]): """Set iscsi details of the system in uefi boot mode. The initiator system is set with the target details like IQN, LUN, IP, Port etc. :param target_name: Target Name for iscsi. :param lun: logical unit number. :param ip_address: IP address of the target. :param port: port of the target. :param auth_method : either None or CHAP. :param username: CHAP Username for authentication. :param password: CHAP secret. :param mac: List of target macs for iSCSI. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedInBiosError, if the system is in the bios boot mode. """ raise exception.IloCommandNotSupportedError(ERRMSG) def unset_iscsi_info(self, macs=[]): """Disable iscsi boot option of the system in uefi boot mode. :param mac: List of target macs for iSCSI. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the system is in the bios boot mode. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_iscsi_initiator_info(self): """Give iSCSI initiator information of iLO. :returns: iSCSI initiator information. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the system is in the bios boot mode. """ raise exception.IloCommandNotSupportedError(ERRMSG) def set_iscsi_initiator_info(self, initiator_iqn): """Set iSCSI initiator information in iLO. :param initiator_iqn: Initiator iqn for iLO. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the system is in the bios boot mode. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_one_time_boot(self): """Retrieves the current setting for the one time boot.""" raise exception.IloCommandNotSupportedError(ERRMSG) def get_vm_status(self, device='FLOPPY'): """Returns the virtual media drive status like url, is connected, etc. """ raise exception.IloCommandNotSupportedError(ERRMSG) def reset_server(self): """Resets the server.""" raise exception.IloCommandNotSupportedError(ERRMSG) def press_pwr_btn(self): """Simulates a physical press of the server power button.""" raise exception.IloCommandNotSupportedError(ERRMSG) def hold_pwr_btn(self): """Simulate a physical press and hold of the server power button.""" raise exception.IloCommandNotSupportedError(ERRMSG) def set_host_power(self, power): """Toggle the power button of server. :param power: 'ON' or 'OFF' """ raise exception.IloCommandNotSupportedError(ERRMSG) def set_one_time_boot(self, value): """Configures a single boot from a specific device.""" raise exception.IloCommandNotSupportedError(ERRMSG) def insert_virtual_media(self, url, device='FLOPPY'): """Notifies iLO of the location of a virtual media diskette image.""" raise exception.IloCommandNotSupportedError(ERRMSG) def eject_virtual_media(self, device='FLOPPY'): """Ejects the Virtual Media image if one is inserted.""" raise exception.IloCommandNotSupportedError(ERRMSG) def set_vm_status(self, device='FLOPPY', boot_option='BOOT_ONCE', write_protect='YES'): """Sets the Virtual Media drive status and allows the boot options for booting from the virtual media. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_current_boot_mode(self): """Retrieves the current boot mode settings.""" raise exception.IloCommandNotSupportedError(ERRMSG) def get_pending_boot_mode(self): """Retrieves the pending boot mode settings.""" raise exception.IloCommandNotSupportedError(ERRMSG) def get_supported_boot_mode(self): """Retrieves the supported boot mode.""" raise exception.IloCommandNotSupportedError(ERRMSG) def set_pending_boot_mode(self, value): """Sets the boot mode of the system for next boot.""" raise exception.IloCommandNotSupportedError(ERRMSG) def get_persistent_boot(self): """Retrieves the boot order of the host.""" raise exception.IloCommandNotSupportedError(ERRMSG) def get_persistent_boot_device(self): """Get the current persistent boot device set for the host.""" raise exception.IloCommandNotSupportedError(ERRMSG) def set_persistent_boot(self, values=[]): """Configures to boot from a specific device.""" raise exception.IloCommandNotSupportedError(ERRMSG) def update_persistent_boot(self, device_type=[]): """Updates persistent boot based on the boot mode.""" raise exception.IloCommandNotSupportedError(ERRMSG) def get_secure_boot_mode(self): """Get the status if secure boot is enabled or not.""" raise exception.IloCommandNotSupportedError(ERRMSG) def set_secure_boot_mode(self, secure_boot_enable): """Enable/Disable secure boot on the server.""" raise exception.IloCommandNotSupportedError(ERRMSG) def reset_secure_boot_keys(self): """Reset secure boot keys to manufacturing defaults.""" raise exception.IloCommandNotSupportedError(ERRMSG) def clear_secure_boot_keys(self): """Reset all keys.""" raise exception.IloCommandNotSupportedError(ERRMSG) def reset_ilo_credential(self, password): """Resets the iLO password. :param password: The password to be set. :raises: IloError, if account not found or on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def reset_ilo(self): """Resets the iLO. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def reset_bios_to_default(self): """Resets the BIOS settings to default values. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_host_uuid(self): """Request host UUID of the server. :returns: the host UUID of the server :raises: IloConnectionError if failed connecting to the iLO. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_host_health_data(self, data=None): """Request host health data of the server. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the embedded health data. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_host_health_present_power_reading(self, data=None): """Request the power consumption of the server. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the power readings. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_host_health_power_supplies(self, data=None): """Request the health power supply information. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the power supply information. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_host_health_fan_sensors(self, data=None): """Get the health Fan Sensor Report. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the fan sensor information. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ def get_host_health_temperature_sensors(self, data=None): """Get the health Temp Sensor report. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the temperature sensors information. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_host_health_at_a_glance(self, data=None): """Get the health at a glance Report. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the health at a glance information. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_host_power_readings(self): """Retrieves the host power readings. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the power readings. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_essential_properties(self): """Get the essential scheduling properties :returns: a dictionary containing memory size, disk size, number of cpus, cpu arch, port numbers and mac addresses. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_server_capabilities(self): """Get hardware properties which can be used for scheduling :return: a dictionary of server capabilities. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def activate_license(self, key): """Activates iLO license. :param key: iLO license key. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def update_firmware(self, firmware_url, component_type): """Updates the given firmware on the server :param firmware_url: location of the firmware file :param component_type: Type of component to be applied to. :raises: InvalidInputError, if the validation of the input fails :raises: IloError, on an error from iLO :raises: IloConnectionError, if not able to reach iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server """ raise exception.IloCommandNotSupportedError(ERRMSG) def inject_nmi(self): """Inject NMI, Non Maskable Interrupt. Inject NMI (Non Maskable Interrupt) for a node immediately. :raises: IloError, on an error from iLO :raises: IloConnectionError, if not able to reach iLO. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_host_post_state(self): """Request the current state of system POST Retrieves current state of system POST. :raises: IloError, on an error from iLO :raises: IloCommandNotSupportedError, if the command is not supported on the server """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_current_bios_settings(self, only_allowed_settings=False): """Get current BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictionary of current BIOS settings is returned. Depending on the 'only_allowed_settings', either only the allowed settings are returned or all the supported settings are returned. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_pending_bios_settings(self, only_allowed_settings=False): """Get current BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictionary of pending BIOS settings. Depending on the 'only_allowed_settings', either only the allowed settings are returned or all the supported settings are returned. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def set_bios_settings(self, data=None, only_allowed_settings=False): """Sets current BIOS settings to the provided data. :param: only_allowed_settings: True when only allowed BIOS settings are to be set. If False, all the BIOS settings supported by iLO and present in the 'data' are set. :param: data: a dictionary of BIOS settings to be applied. Depending on the 'only_allowed_settings', either only the allowed settings are set or all the supported settings that are in the 'data' are set. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_default_bios_settings(self, only_allowed_settings=False): """Get default BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictionary of default BIOS settings(factory settings). Depending on the 'only_allowed_settings', either only the allowed settings are returned or all the supported settings are returned. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def read_raid_configuration(self, raid_config=None): """Read the logical drives from the system Read raid configuration of the hardware. :param raid_config: None in case of post-delete read or in case of post-create a dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100, 'physical_disks': ['6I:1:5'], 'controller': 'HPE Smart Array P408i-a SR Gen10'}, ]} :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def delete_raid_configuration(self): """Deletes the logical drives from the system :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def create_raid_configuration(self, raid_config): """Create the raid configuration on the hardware. :param raid_config: A dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100, 'controller': 'HPE Smart Array P408i-p SR Gen10'}, ]} :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_bios_settings_result(self): """Gets the result of the bios settings applied :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def has_disk_erase_completed(self): """Get out of band sanitize disk erase status. :returns: True if disk erase completed on all controllers otherwise False :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def do_disk_erase(self, disk_type, pattern=None): """Perform the out of band sanitize disk erase on the hardware. :param disk_type: Media type of disk drives. :param pattern: Erase pattern, if nothing passed default ('overwrite' for 'HDD', and 'block' for 'SSD') will be used. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def do_one_button_secure_erase(self): """Perform the one button secure erase on the hardware. The One-button secure erase process resets iLO and deletes all licenses stored there, resets BIOS settings, and deletes all AHS and warranty data stored on the system. It also erases supported non-volatile storage data and deletes any deployment settings profiles. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def get_available_disk_types(self): """Get the list of all disk type available in server :returns: List of disk types available in the server. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def add_tls_certificate(self, cert_file_list): """Adds the TLS certificate to the iLO :param cert_file_list: List of TLS certificate files :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def remove_tls_certificate(self, cert_file_list=[], excl_cert_file_list=[]): """Removes the TLS certificate from the iLO :param cert_file_list: List of TLS certificate files :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) def create_csr(self, path, csr_params): """Creates the Certificate Signing Request. :param path: directory to store csr file. :param csr_params: A dictionary containing all the necessary information required to create CSR. :raises: IloError, on an error from iLO. """ raise exception.IloCommandNotSupportedError(ERRMSG) def add_https_certificate(self, cert_file): """Adds the signed https certificate to the iLO. :param cert_file: Signed HTTPS certificate file. :raises: IloError, on an error from iLO. """ raise exception.IloCommandNotSupportedError(ERRMSG) # This method is deprecated, and will be removed in future release. def add_ssl_certificate(self, csr_params, signed_cert, private_key, pass_phrase): """Creates CSR and adds the signed SSL certificate to the iLO. :param csr_params: A dictionary containing all the necessary information required to create CSR. :param signed_cert: Signed certificate which will be used to sign the created CSR. :param private_key: private key. :param pass_phrase: Pass phrase for the private key. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ raise exception.IloCommandNotSupportedError(ERRMSG) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/ribcl.py0000664000175000017500000014207000000000000021701 0ustar00zuulzuul00000000000000# Copyright 2022 Hewlett Packard Enterprise Development Company, L.P. # Copyright 2018 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. """Provides iLO management interface. Talks to the iLO management engine over RIBCL scripting language """ import copy import os import re import xml.etree.ElementTree as etree from oslo_utils import strutils import requests from requests.packages import urllib3 from requests.packages.urllib3 import exceptions as urllib3_exceptions import six from proliantutils import exception from proliantutils.ilo import common from proliantutils.ilo import firmware_controller from proliantutils.ilo import mappings from proliantutils.ilo import operations from proliantutils import log from proliantutils import utils POWER_STATE = { 'ON': 'Yes', 'OFF': 'No', } BOOT_MODE_CMDS = [ 'GET_CURRENT_BOOT_MODE', 'GET_PENDING_BOOT_MODE', 'GET_SUPPORTED_BOOT_MODE', 'SET_PENDING_BOOT_MODE' ] LOG = log.get_logger(__name__) class MaskedRequestData(object): def __init__(self, request_data): self.request_data = request_data def __str__(self): request_data_copy = copy.deepcopy(self.request_data) xml_data = request_data_copy.get('data') if xml_data: xml_data = re.sub(r'USER_LOGIN="(.*?)"', r'USER_LOGIN="*****"', xml_data) xml_data = re.sub(r'PASSWORD="(.*?)"', r'PASSWORD="*****"', xml_data) request_data_copy['data'] = xml_data return str(request_data_copy) class RIBCLOperations(operations.IloOperations): """iLO class for RIBCL interface for iLO. Implements the base class using RIBCL scripting language to talk to the iLO. """ def __init__(self, host, login, password, timeout=60, port=443, cacert=None): """Constructor for RIBCLOperations. """ self.host = host self.login = login self.password = password self.timeout = timeout self.port = port self.cacert = cacert # By default, requests logs following message if verify=False # InsecureRequestWarning: Unverified HTTPS request is # being made. Adding certificate verification is strongly advised. # Just disable the warning if user intentionally did this. if self.cacert is None: urllib3.disable_warnings(urllib3_exceptions.InsecureRequestWarning) def init_model_based_tags(self, model): """Initializing the model based memory and NIC information tags. It should be called just after instantiating a RIBCL object. ribcl = ribcl.RIBCLOperations(host, login, password, timeout, port, cacert=cacert) model = ribcl.get_product_name() ribcl.init_model_based_tags(model) Again, model attribute is also set here on the RIBCL object. :param model: the model string """ self.model = model if 'G7' in self.model: self.MEMORY_SIZE_TAG = "MEMORY_SIZE" self.MEMORY_SIZE_NOT_PRESENT_TAG = "Not Installed" self.NIC_INFORMATION_TAG = "NIC_INFOMATION" else: self.MEMORY_SIZE_TAG = "TOTAL_MEMORY_SIZE" self.MEMORY_SIZE_NOT_PRESENT_TAG = "N/A" self.NIC_INFORMATION_TAG = "NIC_INFORMATION" def _request_ilo(self, root, extra_headers=None): """Send RIBCL XML data to iLO. This function sends the XML request to the ILO and receives the output from ILO. :raises: IloConnectionError() if unable to send the request. """ if self.port: urlstr = 'https://%s:%d/ribcl' % (self.host, self.port) else: urlstr = 'https://%s/ribcl' % (self.host) xml = self._serialize_xml(root) headers = {"Content-length": str(len(xml))} if extra_headers: headers.update(extra_headers) kwargs = {'headers': headers, 'data': xml} if self.cacert is not None: kwargs['verify'] = self.cacert else: kwargs['verify'] = False try: LOG.debug(self._("POST %(url)s with request data: " "%(request_data)s"), {'url': urlstr, 'request_data': MaskedRequestData(kwargs)}) response = requests.post(urlstr, **kwargs) response.raise_for_status() except Exception as e: LOG.debug(self._("Unable to connect to iLO. %s"), e) raise exception.IloConnectionError(e) return response.text def _create_dynamic_xml(self, cmdname, tag_name, mode, subelements=None): """Create RIBCL XML to send to iLO. This function creates the dynamic xml required to be sent to the ILO for all the APIs. :param cmdname: the API which needs to be implemented. :param tag_name: the tag info under which ILO has defined the particular API. :param mode: 'read' or 'write' :param subelements: dictionary containing subelements of the particular API tree. :returns: the etree.Element for the root of the RIBCL XML """ root = etree.Element('RIBCL', VERSION="2.0") login = etree.SubElement( root, 'LOGIN', USER_LOGIN=self.login, PASSWORD=self.password) tagname = etree.SubElement(login, tag_name, MODE=mode) subelements = subelements or {} etree.SubElement(tagname, cmdname) if six.PY2: root_iterator = root.getiterator(cmdname) else: root_iterator = root.iter(cmdname) for cmd in root_iterator: for key, value in subelements.items(): cmd.set(key, value) return root def _serialize_xml(self, root): """Serialize XML data into string It serializes the dynamic xml created and converts it to a string. This is done before sending the xml to the ILO. :param root: root of the dynamic xml. """ if hasattr(etree, 'tostringlist'): if six.PY3: xml_content_list = [ x.decode("utf-8") for x in etree.tostringlist(root)] else: xml_content_list = etree.tostringlist(root) xml = '\r\n'.join(xml_content_list) + '\r\n' else: if six.PY3: xml_content = etree.tostring(root).decode("utf-8") else: xml_content = etree.tostring(root) xml = xml_content + '\r\n' return xml def _parse_output(self, xml_response): """Parse the response XML from iLO. This function parses the output received from ILO. As the output contains multiple XMLs, it extracts one xml at a time and loops over till all the xmls in the response are exhausted. It returns the data to APIs either in dictionary format or as the string. It creates the dictionary only if the Ilo response contains the data under the requested RIBCL command. If the Ilo response contains only the string, then the string is returned back. """ count = 0 xml_dict = {} resp_message = None xml_start_pos = [] for m in re.finditer(r"\<\?xml", xml_response): xml_start_pos.append(m.start()) while count < len(xml_start_pos): if (count == len(xml_start_pos) - 1): result = xml_response[xml_start_pos[count]:] else: start = xml_start_pos[count] end = xml_start_pos[count + 1] result = xml_response[start:end] result = result.strip() message = etree.fromstring(result) resp = self._validate_message(message) if hasattr(resp, 'tag'): xml_dict = self._elementtree_to_dict(resp) elif resp is not None: resp_message = resp count = count + 1 if xml_dict: return xml_dict elif resp_message is not None: return resp_message def _elementtree_to_dict(self, element): """Convert XML elementtree to dictionary. Converts the actual response from the ILO for an API to the dictionary. """ node = {} text = getattr(element, 'text') if text is not None: text = text.strip() if len(text) != 0: node['text'] = text node.update(element.items()) # element's attributes child_nodes = {} for child in element: # element's children child_nodes.setdefault(child.tag, []).append( self._elementtree_to_dict(child)) # convert all single-element lists into non-lists for key, value in child_nodes.items(): if len(value) == 1: child_nodes[key] = value[0] node.update(child_nodes.items()) return node def _validate_message(self, message): """Validate XML response from iLO. This function validates the XML response to see if the exit status is 0 or not in the response. If the status is non-zero it raises exception. """ if message.tag != 'RIBCL': # the true case shall be unreachable for response # XML from Ilo as all messages are tagged with RIBCL # but still raise an exception if any invalid # XML response is returned by Ilo. Set status to some # arbitary non-zero value. status = -1 raise exception.IloClientInternalError(message, status) for child in message: if child.tag != 'RESPONSE': return message status = int(child.get('STATUS'), 16) msg = child.get('MESSAGE') if status == 0 and msg != 'No error': return msg if status != 0: if 'syntax error' in msg or 'Feature not supported' in msg: for cmd in BOOT_MODE_CMDS: if cmd in msg: platform = self.get_product_name() msg = ("%(cmd)s is not supported on %(platform)s" % {'cmd': cmd, 'platform': platform}) LOG.debug(self._("Got invalid response with " "message: '%(message)s'"), {'message': msg}) raise (exception.IloCommandNotSupportedError (msg, status)) else: LOG.debug(self._("Got invalid response with " "message: '%(message)s'"), {'message': msg}) raise exception.IloClientInternalError(msg, status) if (status in exception.IloLoginFailError.statuses or msg in exception.IloLoginFailError.messages): LOG.debug(self._("Got invalid response with " "message: '%(message)s'"), {'message': msg}) raise exception.IloLoginFailError(msg, status) LOG.debug(self._("Got invalid response with " "message: '%(message)s'"), {'message': msg}) raise exception.IloError(msg, status) def _execute_command(self, create_command, tag_info, mode, dic={}): """Execute a command on the iLO. Common infrastructure used by all APIs to send/get response from ILO. """ xml = self._create_dynamic_xml( create_command, tag_info, mode, dic) d = self._request_ilo(xml) data = self._parse_output(d) LOG.debug(self._("Received response data: %s"), data) return data def get_all_licenses(self): """Retrieve license type, key, installation date, etc.""" data = self._execute_command('GET_ALL_LICENSES', 'RIB_INFO', 'read') d = {} for key, val in data['GET_ALL_LICENSES']['LICENSE'].items(): if isinstance(val, dict): d[key] = data['GET_ALL_LICENSES']['LICENSE'][key]['VALUE'] return d def get_product_name(self): """Get the model name of the queried server.""" data = self._execute_command( 'GET_PRODUCT_NAME', 'SERVER_INFO', 'read') return data['GET_PRODUCT_NAME']['PRODUCT_NAME']['VALUE'] def get_host_power_status(self): """Request the power state of the server.""" data = self._execute_command( 'GET_HOST_POWER_STATUS', 'SERVER_INFO', 'read') return data['GET_HOST_POWER']['HOST_POWER'] def get_one_time_boot(self): """Retrieves the current setting for the one time boot.""" data = self._execute_command( 'GET_ONE_TIME_BOOT', 'SERVER_INFO', 'read') return data['ONE_TIME_BOOT']['BOOT_TYPE']['VALUE'] def get_vm_status(self, device='FLOPPY'): """Returns the virtual media drive status.""" dic = {'DEVICE': device.upper()} data = self._execute_command( 'GET_VM_STATUS', 'RIB_INFO', 'read', dic) return data['GET_VM_STATUS'] def reset_server(self): """Resets the server.""" data = self._execute_command('RESET_SERVER', 'SERVER_INFO', 'write') return data def press_pwr_btn(self): """Simulates a physical press of the server power button.""" data = self._execute_command('PRESS_PWR_BTN', 'SERVER_INFO', 'write') return data def hold_pwr_btn(self): """Simulate a physical press and hold of the server power button.""" dic = {'TOGGLE': 'NO'} data = self._execute_command( 'HOLD_PWR_BTN', 'SERVER_INFO', 'write', dic) return data def set_host_power(self, power): """Toggle the power button of server. :param power: 'ON' or 'OFF' """ if power.upper() in POWER_STATE: dic = {'HOST_POWER': POWER_STATE[power.upper()]} data = self._execute_command( 'SET_HOST_POWER', 'SERVER_INFO', 'write', dic) return data else: raise exception.IloInvalidInputError( "Invalid input. The expected input is ON or OFF.") def set_one_time_boot(self, value): """Configures a single boot from a specific device. :param value: specific device to which the boot option is set """ dic = {'value': value} data = self._execute_command( 'SET_ONE_TIME_BOOT', 'SERVER_INFO', 'write', dic) return data def insert_virtual_media(self, url, device='FLOPPY'): """Notifies iLO of the location of a virtual media diskette image.""" dic = { 'DEVICE': device.upper(), 'IMAGE_URL': url, } # Validate url utils.validate_href(url) data = self._execute_command( 'INSERT_VIRTUAL_MEDIA', 'RIB_INFO', 'write', dic) return data def eject_virtual_media(self, device='FLOPPY'): """Ejects the Virtual Media image if one is inserted.""" vm_status = self.get_vm_status(device=device) if vm_status['IMAGE_INSERTED'] == 'NO': return dic = {'DEVICE': device.upper()} self._execute_command( 'EJECT_VIRTUAL_MEDIA', 'RIB_INFO', 'write', dic) def set_vm_status(self, device='FLOPPY', boot_option='BOOT_ONCE', write_protect='YES'): """Sets the Virtual Media drive status It also allows the boot options for booting from the virtual media. """ dic = {'DEVICE': device.upper()} xml = self._create_dynamic_xml( 'SET_VM_STATUS', 'RIB_INFO', 'write', dic) if six.PY2: child_iterator = xml.getiterator() else: child_iterator = xml.iter() for child in child_iterator: if child.tag == 'SET_VM_STATUS': etree.SubElement(child, 'VM_BOOT_OPTION', VALUE=boot_option.upper()) etree.SubElement(child, 'VM_WRITE_PROTECT', VALUE=write_protect.upper()) d = self._request_ilo(xml) data = self._parse_output(d) return data def get_current_boot_mode(self): """Retrieves the current boot mode settings.""" data = self._execute_command( 'GET_CURRENT_BOOT_MODE', 'SERVER_INFO', 'read') return data['GET_CURRENT_BOOT_MODE']['BOOT_MODE']['VALUE'] def get_pending_boot_mode(self): """Retrieves the pending boot mode settings.""" data = self._execute_command( 'GET_PENDING_BOOT_MODE', 'SERVER_INFO', 'read') return data['GET_PENDING_BOOT_MODE']['BOOT_MODE']['VALUE'] def get_supported_boot_mode(self): """Retrieves the supported boot mode. :returns: any one of the following proliantutils.ilo.constants: SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY, SUPPORTED_BOOT_MODE_UEFI_ONLY, SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI """ data = self._execute_command( 'GET_SUPPORTED_BOOT_MODE', 'SERVER_INFO', 'read') supported_boot_mode = ( data['GET_SUPPORTED_BOOT_MODE']['SUPPORTED_BOOT_MODE']['VALUE']) return mappings.GET_SUPPORTED_BOOT_MODE_RIBCL_MAP.get( supported_boot_mode) def set_pending_boot_mode(self, value): """Configures the boot mode of the system from a specific boot mode.""" dic = {'value': value} data = self._execute_command( 'SET_PENDING_BOOT_MODE', 'SERVER_INFO', 'write', dic) return data def _get_persistent_boot(self): """Retrieves the current boot mode settings.""" data = self._execute_command( 'GET_PERSISTENT_BOOT', 'SERVER_INFO', 'read') if data is not None: return data['PERSISTENT_BOOT']['DEVICE'] def get_persistent_boot_device(self): """Get the current persistent boot device set for the host.""" result = self._get_persistent_boot() boot_mode = self._check_boot_mode(result) if boot_mode == 'bios': return result[0]['value'] value = result[0]['DESCRIPTION'] if 'HP iLO Virtual USB CD' in value: return 'CDROM' elif 'NIC' in value or 'PXE' in value: return 'NETWORK' elif common.isDisk(value): return 'HDD' else: return None def _set_persistent_boot(self, values=[]): """Configures a boot from a specific device.""" xml = self._create_dynamic_xml( 'SET_PERSISTENT_BOOT', 'SERVER_INFO', 'write') if six.PY2: child_iterator = xml.getiterator() else: child_iterator = xml.iter() for child in child_iterator: for val in values: if child.tag == 'SET_PERSISTENT_BOOT': etree.SubElement(child, 'DEVICE', VALUE=val) d = self._request_ilo(xml) data = self._parse_output(d) return data def update_persistent_boot(self, device_type=[]): valid_devices = ['NETWORK', 'HDD', 'CDROM'] # Check if the input is valid for item in device_type: if item.upper() not in valid_devices: raise exception.IloInvalidInputError( "Invalid input. Valid devices: NETWORK, HDD or CDROM.") result = self._get_persistent_boot() boot_mode = self._check_boot_mode(result) if boot_mode == 'bios': self._set_persistent_boot(device_type) return device_list = [] for item in device_type: dev = item.upper() if dev == 'NETWORK': nic_list = self._get_nic_boot_devices(result) device_list.extend(nic_list) if dev == 'HDD': disk_list = self._get_disk_boot_devices(result) device_list.extend(disk_list) if dev == 'CDROM': virtual_list = self._get_virtual_boot_devices(result) device_list.extend(virtual_list) if not device_list: platform = self.get_product_name() msg = ("\'%(device)s\' is not configured as boot device on " "this system of type %(platform)s." % {'device': device_type[0], 'platform': platform}) raise (exception.IloInvalidInputError(msg)) self._set_persistent_boot(device_list) def _check_boot_mode(self, result): if 'DESCRIPTION' in result[0]: return 'uefi' else: return 'bios' def _get_nic_boot_devices(self, result): nw_identifier = "NIC" pxe_enabled = "PXE" iscsi_identifier = "iSCSI" nic_list = [] pxe_nic_list = [] iscsi_nic_list = [] try: for item in result: if pxe_enabled in item["DESCRIPTION"]: pxe_nic_list.append(item["value"]) elif iscsi_identifier in item["DESCRIPTION"]: iscsi_nic_list.append(item["value"]) elif nw_identifier in item["DESCRIPTION"]: nic_list.append(item["value"]) except KeyError as e: msg = "_get_nic_boot_devices failed with the KeyError:%s" raise exception.IloError((msg) % e) all_nics = pxe_nic_list + nic_list + iscsi_nic_list return all_nics def _get_disk_boot_devices(self, result): disk_list = [] try: for item in result: if common.isDisk(item["DESCRIPTION"]): disk_list.append(item["value"]) except KeyError as e: msg = "_get_disk_boot_devices failed with the KeyError:%s" raise exception.IloError((msg) % e) return disk_list def _request_host(self): """Request host info from the server.""" urlstr = 'https://%s/xmldata?item=all' % (self.host) kwargs = {} if self.cacert is not None: kwargs['verify'] = self.cacert else: kwargs['verify'] = False try: response = requests.get(urlstr, **kwargs) response.raise_for_status() except Exception as e: raise IloConnectionError(e) return response.text def get_host_uuid(self): """Request host UUID of the server. :returns: the host UUID of the server :raises: IloConnectionError if failed connecting to the iLO. """ xml = self._request_host() root = etree.fromstring(xml) data = self._elementtree_to_dict(root) return data['HSI']['SPN']['text'], data['HSI']['cUUID']['text'] def get_host_health_data(self, data=None): """Request host health data of the server. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the embedded health data. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ if not data or data and "GET_EMBEDDED_HEALTH_DATA" not in data: data = self._execute_command( 'GET_EMBEDDED_HEALTH', 'SERVER_INFO', 'read') return data def get_host_health_present_power_reading(self, data=None): """Request the power consumption of the server. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the power readings. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ data = self.get_host_health_data(data) return (data['GET_EMBEDDED_HEALTH_DATA']['POWER_SUPPLIES'] ['POWER_SUPPLY_SUMMARY'] ['PRESENT_POWER_READING']['VALUE']) def get_host_health_power_supplies(self, data=None): """Request the health power supply information. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the power supply information. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ data = self.get_host_health_data(data) d = (data['GET_EMBEDDED_HEALTH_DATA']['POWER_SUPPLIES']['SUPPLY']) if not isinstance(d, list): d = [d] return d def get_host_health_temperature_sensors(self, data=None): """Get the health Temp Sensor report. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the temperature sensors information. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ data = self.get_host_health_data(data) d = data['GET_EMBEDDED_HEALTH_DATA']['TEMPERATURE']['TEMP'] if not isinstance(d, list): d = [d] return d def get_host_health_fan_sensors(self, data=None): """Get the health Fan Sensor Report. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the fan sensor information. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ data = self.get_host_health_data(data) d = data['GET_EMBEDDED_HEALTH_DATA']['FANS']['FAN'] if not isinstance(d, list): d = [d] return d def get_host_health_at_a_glance(self, data=None): """Get the health at a glance Report. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the health at a glance information. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ data = self.get_host_health_data(data) return data['GET_EMBEDDED_HEALTH_DATA']['HEALTH_AT_A_GLANCE'] def get_host_power_readings(self): """Retrieves the host power readings. :param: the data to retrieve from the server, defaults to None. :returns: the dictionary containing the power readings. :raises: IloConnectionError if failed connecting to the iLO. :raises: IloError, on an error from iLO. """ data = self._execute_command( 'GET_POWER_READINGS', 'SERVER_INFO', 'read') return data['GET_POWER_READINGS'] def reset_ilo(self): """Resets the iLO. :raises: IloError, on an error from iLO. :raises: IloConnectionError, if iLO is not up after reset. """ self._execute_command('RESET_RIB', 'RIB_INFO', 'write') # Check if iLO is up again after reset. common.wait_for_ilo_after_reset(self) def reset_ilo_credential(self, password): """Resets the iLO password. :param password: The password to be set. :raises: IloError, if account not found or on an error from iLO. """ dic = {'USER_LOGIN': self.login} root = self._create_dynamic_xml( 'MOD_USER', 'USER_INFO', 'write', dic) element = root.find('LOGIN/USER_INFO/MOD_USER') etree.SubElement(element, 'PASSWORD', VALUE=password) d = self._request_ilo(root) self._parse_output(d) def _get_virtual_boot_devices(self, result): virtual_list = [] dev_desc = "HP iLO Virtual USB CD" try: for item in result: if dev_desc in item["DESCRIPTION"]: virtual_list.append(item["value"]) except KeyError as e: msg = "_get_virtual_boot_devices failed with the KeyError:%s" raise exception.IloError((msg) % e) return virtual_list def get_essential_properties(self): """Gets essential scheduling properties as required by ironic :returns: a dictionary of server properties like memory size, disk size, number of cpus, cpu arch, port numbers and mac addresses. :raises:IloError if iLO returns an error in command execution. """ data = self.get_host_health_data() properties = { 'memory_mb': self._parse_memory_embedded_health(data) } cpus, cpu_arch = self._parse_processor_embedded_health(data) properties['cpus'] = cpus properties['cpu_arch'] = cpu_arch properties['local_gb'] = self._parse_storage_embedded_health(data) macs = self._parse_nics_embedded_health(data) return_value = {'properties': properties, 'macs': macs} return return_value def get_server_capabilities(self): """Gets server properties which can be used for scheduling :returns: a dictionary of hardware properties like firmware versions, server model. :raises: IloError, if iLO returns an error in command execution. """ capabilities = {} data = self.get_host_health_data() ilo_firmware = self._get_ilo_firmware_version(data) if ilo_firmware: capabilities.update(ilo_firmware) rom_firmware = self._get_rom_firmware_version(data) if rom_firmware: capabilities.update(rom_firmware) capabilities.update({'server_model': self.get_product_name()}) capabilities.update(self._get_number_of_gpu_devices_connected(data)) boot_modes = common.get_supported_boot_modes( self.get_supported_boot_mode()) capabilities.update({ 'boot_mode_bios': boot_modes.boot_mode_bios, 'boot_mode_uefi': boot_modes.boot_mode_uefi}) return capabilities def _parse_memory_embedded_health(self, data): """Parse the get_host_health_data() for essential properties :param data: the output returned by get_host_health_data() :returns: memory size in MB. :raises IloError, if unable to get the memory details. """ memory_mb = 0 memory = self._get_memory_details_value_based_on_model(data) if memory is None: msg = "Unable to get memory data. Error: Data missing" raise exception.IloError(msg) total_memory_size = 0 for memory_item in memory: memsize = memory_item[self.MEMORY_SIZE_TAG]["VALUE"] if memsize != self.MEMORY_SIZE_NOT_PRESENT_TAG: memory_bytes = ( strutils.string_to_bytes( memsize.replace(' ', ''), return_int=True)) memory_mb = int(memory_bytes / (1024 * 1024)) total_memory_size = total_memory_size + memory_mb return total_memory_size def _parse_processor_embedded_health(self, data): """Parse the get_host_health_data() for essential properties :param data: the output returned by get_host_health_data() :returns: processor details like cpu arch and number of cpus. """ processor = self.get_value_as_list((data['GET_EMBEDDED_HEALTH_DATA'] ['PROCESSORS']), 'PROCESSOR') if processor is None: msg = "Unable to get cpu data. Error: Data missing" raise exception.IloError(msg) cpus = 0 for proc in processor: for val in proc.values(): processor_detail = val['VALUE'] proc_core_threads = processor_detail.split('; ') for x in proc_core_threads: if "thread" in x: v = x.split() try: cpus = cpus + int(v[0]) except ValueError: msg = ("Unable to get cpu data. " "The Value %s returned couldn't be " "manipulated to get number of " "actual processors" % processor_detail) raise exception.IloError(msg) cpu_arch = 'x86_64' return cpus, cpu_arch def _parse_storage_embedded_health(self, data): """Gets the storage data from get_embedded_health Parse the get_host_health_data() for essential properties :param data: the output returned by get_host_health_data() :returns: disk size in GB. """ local_gb = 0 storage = self.get_value_as_list(data['GET_EMBEDDED_HEALTH_DATA'], 'STORAGE') if storage is None: # We dont raise exception because this dictionary # is available only when RAID is configured. # If we raise error here then we will always fail # inspection where this module is consumed. Hence # as a workaround just return 0. return local_gb minimum = local_gb for item in storage: cntlr = self.get_value_as_list(item, 'CONTROLLER') if cntlr is None: continue for s in cntlr: drive = self.get_value_as_list(s, 'LOGICAL_DRIVE') if drive is None: continue for item in drive: for key, val in item.items(): if key == 'CAPACITY': capacity = val['VALUE'] local_bytes = (strutils.string_to_bytes( capacity.replace(' ', ''), return_int=True)) local_gb = int(local_bytes / (1024 * 1024 * 1024)) if minimum >= local_gb or minimum == 0: minimum = local_gb # Return disk size 1 less than the actual disk size. This prevents # the deploy to fail from Nova when root_gb is same as local_gb # in Ironic. When the disk size is used as root_device hints, # then it should be given as the actual size i.e. # ironic (node.properties['local_gb'] + 1) else root device # hint will fail. if minimum: minimum = minimum - 1 return minimum def get_value_as_list(self, dictionary, key): """Helper function to check and convert a value to list. Helper function to check and convert a value to json list. This helps the ribcl data to be generalized across the servers. :param dictionary: a dictionary to check in if key is present. :param key: key to be checked if thats present in the given dictionary. :returns the data converted to a list. """ if key not in dictionary: return None value = dictionary[key] if not isinstance(value, list): return [value] else: return value def _parse_nics_embedded_health(self, data): """Gets the NIC details from get_embedded_health data Parse the get_host_health_data() for essential properties :param data: the output returned by get_host_health_data() :returns: a dictionary of port numbers and their corresponding mac addresses. :raises IloError, if unable to get NIC data. """ nic_data = self.get_value_as_list((data['GET_EMBEDDED_HEALTH_DATA'] [self.NIC_INFORMATION_TAG]), 'NIC') if nic_data is None: msg = "Unable to get NIC details. Data missing" raise exception.IloError(msg) nic_dict = {} for item in nic_data: try: port = item['NETWORK_PORT']['VALUE'] mac = item['MAC_ADDRESS']['VALUE'] self._update_nic_data_from_nic_info_based_on_model(nic_dict, item, port, mac) except KeyError: msg = "Unable to get NIC details. Data missing" raise exception.IloError(msg) return nic_dict def _get_firmware_embedded_health(self, data): """Parse the get_host_health_data() for server capabilities :param data: the output returned by get_host_health_data() :returns: a dictionary of firmware name and firmware version. """ firmware = self.get_value_as_list(data['GET_EMBEDDED_HEALTH_DATA'], 'FIRMWARE_INFORMATION') if firmware is None: return None return dict((y['FIRMWARE_NAME']['VALUE'], y['FIRMWARE_VERSION']['VALUE']) for x in firmware for y in x.values()) def _get_rom_firmware_version(self, data): """Gets the rom firmware version for server capabilities Parse the get_host_health_data() to retreive the firmware details. :param data: the output returned by get_host_health_data() :returns: a dictionary of rom firmware version. """ firmware_details = self._get_firmware_embedded_health(data) if firmware_details: try: rom_firmware_version = ( firmware_details['HP ProLiant System ROM']) return {'rom_firmware_version': rom_firmware_version} except KeyError: return None def _get_ilo_firmware_version(self, data): """Gets the ilo firmware version for server capabilities Parse the get_host_health_data() to retreive the firmware details. :param data: the output returned by get_host_health_data() :returns: a dictionary of iLO firmware version. """ firmware_details = self._get_firmware_embedded_health(data) if firmware_details: try: return {'ilo_firmware_version': firmware_details['iLO']} except KeyError: return None def get_ilo_firmware_version_as_major_minor(self): """Gets the ilo firmware version for server capabilities Parse the get_host_health_data() to retreive the firmware details. :param data: the output returned by get_host_health_data() :returns: String with the format "." or None. """ data = self.get_host_health_data() firmware_details = self._get_firmware_embedded_health(data) if firmware_details: ilo_version_str = firmware_details.get('iLO', None) return common.get_major_minor(ilo_version_str) def _get_number_of_gpu_devices_connected(self, data): """Gets the number of GPU devices connected to the server Parse the get_host_health_data() and get the count of number of GPU devices connected to the server. :param data: the output returned by get_host_health_data() :returns: a dictionary of rom firmware version. """ temp = self.get_value_as_list((data['GET_EMBEDDED_HEALTH_DATA'] ['TEMPERATURE']), 'TEMP') count = 0 if temp is None: return {'pci_gpu_devices': count} for key in temp: for name, value in key.items(): if name == 'LABEL' and 'GPU' in value['VALUE']: count = count + 1 return {'pci_gpu_devices': count} def activate_license(self, key): """Activates iLO license. :param key: iLO license key. :raises: IloError, on an error from iLO. """ root = self._create_dynamic_xml('LICENSE', 'RIB_INFO', 'write') element = root.find('LOGIN/RIB_INFO/LICENSE') etree.SubElement(element, 'ACTIVATE', KEY=key) d = self._request_ilo(root) self._parse_output(d) @firmware_controller.check_firmware_update_component def update_firmware(self, filename, component_type): """Updates the given firmware on the server for the given component. :param filename: location of the raw firmware file. Extraction of the firmware file (if in compact format) is expected to happen prior to this invocation. :param component_type: Type of component to be applied to. :raises: InvalidInputError, if the validation of the input fails :raises: IloError, on an error from iLO :raises: IloConnectionError, if not able to reach iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server """ fw_img_processor = firmware_controller.FirmwareImageUploader(filename) LOG.debug(self._('Uploading firmware file: %s ...'), filename) cookie = fw_img_processor.upload_file_to((self.host, self.port), self.timeout) # NOTE(mgoddard): Some devices return a cookie with a newline. This # breaks header validation in the requests library, which causes the # update to fail. cookie = cookie.strip() LOG.debug(self._('Uploading firmware file: %s ... done'), filename) root = self._get_firmware_update_xml_for_file_and_component( filename, component_type) element = root.find('LOGIN/RIB_INFO') etree.SubElement(element, 'TPM_ENABLED', VALUE='Yes') extra_headers = {'Cookie': cookie} LOG.debug(self._('Flashing firmware file: %s ...'), filename) d = self._request_ilo(root, extra_headers=extra_headers) # wait till the firmware update completes. common.wait_for_ribcl_firmware_update_to_complete(self) self._parse_output(d) LOG.info(self._('Flashing firmware file: %s ... done'), filename) def _get_firmware_update_xml_for_file_and_component( self, filename, component): """Creates the dynamic xml for flashing the device firmware via iLO. This method creates the dynamic xml for flashing the firmware, based on the component type so passed. :param filename: location of the raw firmware file. :param component_type: Type of component to be applied to. :returns: the etree.Element for the root of the RIBCL XML for flashing the device (component) firmware. """ if component == 'ilo': cmd_name = 'UPDATE_RIB_FIRMWARE' else: # Note(deray): Not explicitly checking for all other supported # devices (components), as those checks have already happened # in the invoking methods and may seem redundant here. cmd_name = 'UPDATE_FIRMWARE' fwlen = os.path.getsize(filename) root = self._create_dynamic_xml(cmd_name, 'RIB_INFO', 'write', subelements={ 'IMAGE_LOCATION': filename, 'IMAGE_LENGTH': str(fwlen) }) return root def _get_memory_details_value_based_on_model(self, data): """This method gives memory details based on model. :param data: the output returned by get_host_health_data() :returns : a list of memory details. """ if 'G7' in self.model: return (data['GET_EMBEDDED_HEALTH_DATA']['MEMORY'] ['MEMORY_COMPONENTS']['MEMORY_COMPONENT']) else: return (data['GET_EMBEDDED_HEALTH_DATA']['MEMORY'] ['MEMORY_DETAILS_SUMMARY']).values() def _update_nic_data_from_nic_info_based_on_model(self, nic_dict, item, port, mac): """This method updates with port number and corresponding mac :param nic_dict: dictionary contains port number and corresponding mac :param item: dictionary containing nic details :param port: Port number :param mac: mac-address """ if 'G7' in self.model: nic_dict[port] = mac else: location = item['LOCATION']['VALUE'] if location == 'Embedded': nic_dict[port] = mac def _raise_command_not_supported(self, method): platform = self.get_product_name() msg = ("`%(method)s` is not supported on %(platform)s" % {'method': method, 'platform': platform}) raise (exception.IloCommandNotSupportedError(msg)) def inject_nmi(self): """Inject NMI, Non Maskable Interrupt. Inject NMI (Non Maskable Interrupt) for a node immediately. :raises: IloError, on an error from iLO :raises: IloCommandNotSupportedError """ self._raise_command_not_supported("inject_nmi") def get_host_post_state(self): """Request the current state of system POST. Retrieves current state of system POST. :raises: IloError, on an error from iLO :raises: IloCommandNotSupportedError, RIBCL do not support it. """ self._raise_command_not_supported("get_host_post_state") def read_raid_configuration(self, raid_config=None): """Read the logical drives from the system Read raid configuration of the hardware. :param raid_config: None in case of post-delete read or in case of post-create a dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100, 'physical_disks': ['6I:1:5'], 'controller': 'HPE Smart Array P408i-a SR Gen10'}, ]} :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ self._raise_command_not_supported("read_raid_configuration") def delete_raid_configuration(self): """Delete the raid configuration on the hardware. Loops through each SmartStorageConfig controller and clears the raid configuration. :raises: IloCommandNotSupportedError """ self._raise_command_not_supported("delete_raid_configuration") def create_raid_configuration(self, raid_config): """Create the raid configuration on the hardware. Based on user raid_config input, it will create raid :param raid_config: A dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100, 'physical_disks': ['6I:1:5'], 'controller': 'HPE Smart Array P408i-a SR Gen10'}, ]} :raises: IloCommandNotSupportedError """ self._raise_command_not_supported("create_raid_configuration") def get_bios_settings_result(self): """Gets the result of the bios settings applied :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ self._raise_command_not_supported("get_bios_settings_result") def create_csr(self, path, csr_params): """Creates the Certificate Signing Request. :param path: directory to store csr file. :param csr_params: A dictionary containing all the necessary information required to create CSR. :raises: IloError, on an error from iLO. """ self._raise_command_not_supported("create_csr") def add_https_certificate(self, cert_file): """Adds the signed https certificate to the iLO. :param cert_file: Signed HTTPS certificate file. :raises: IloError, on an error from iLO. """ self._raise_command_not_supported("add_https_certificate") # The below block of code is there only for backward-compatibility # reasons (before commit 47608b6 for ris-support). IloClient = RIBCLOperations IloError = exception.IloError IloClientInternalError = exception.IloClientInternalError IloCommandNotSupportedError = exception.IloCommandNotSupportedError IloLoginFailError = exception.IloLoginFailError IloConnectionError = exception.IloConnectionError IloInvalidInputError = exception.IloInvalidInputError ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/ris.py0000775000175000017500000024771100000000000021416 0ustar00zuulzuul00000000000000# Copyright 2018-2022 Hewlett Packard Enterprise 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. __author__ = 'HPE' import hashlib import retrying from proliantutils import exception from proliantutils.ilo import common from proliantutils.ilo import constants from proliantutils.ilo import firmware_controller from proliantutils.ilo import mappings from proliantutils.ilo import operations from proliantutils import log from proliantutils import rest from proliantutils import utils """ Currently this class supports only secure boot and firmware settings related API's . TODO : Add rest of the API's that exists in RIBCL. """ DEVICE_COMMON_TO_RIS = {'NETWORK': 'Pxe', 'CDROM': 'Cd', 'HDD': 'Hdd', 'ISCSI': 'UefiTarget'} DEVICE_RIS_TO_COMMON = dict( (v, k) for (k, v) in DEVICE_COMMON_TO_RIS.items()) POWER_STATE = { 'ON': 'On', 'OFF': 'ForceOff', } # The PCI standards mention following categories of PCI devices as # GPU devices. # Base Class Code 03 indicate VGA devices # Sub Class Code # 00h: VGA-compatible controller # 01h: XGA controller # 02h: 3D controller # 80h: Other display controller # RIS data reports the SubclassCode in integer rather than in hexadecimal form. CLASSCODE_FOR_GPU_DEVICES = [3] SUBCLASSCODE_FOR_GPU_DEVICES = [0, 1, 2, 128] MAX_RETRY_ATTEMPTS = 3 # Maximum number of attempts to be retried MAX_TIME_BEFORE_RETRY = 7 * 1000 # wait time in milliseconds before retry LOG = log.get_logger(__name__) class RISOperations(rest.RestConnectorBase, operations.IloOperations): """iLO class for RIS interface of iLO. Implements the class used for REST based RIS services to talk to the iLO. """ def __init__(self, host, login, password, bios_password=None, cacert=None): super(RISOperations, self).__init__(host, login, password, bios_password=bios_password, cacert=cacert) def _get_collection(self, collection_uri, request_headers=None): """Generator function that returns collection members.""" # get the collection status, headers, thecollection = self._rest_get(collection_uri) if status != 200: msg = self._get_extended_error(thecollection) raise exception.IloError(msg) while status < 300: # verify expected type # Don't limit to version 0 here as we will rev to 1.0 at some # point hopefully with minimal changes ctype = self._get_type(thecollection) if (ctype not in ['Collection.0', 'Collection.1']): raise exception.IloError("collection not found") # if this collection has inline items, return those # NOTE: Collections are very flexible in how the represent # members. They can be inline in the collection as members # of the 'Items' array, or they may be href links in the # links/Members array. The could actually be both. Typically, # iLO implements the inline (Items) for only when the collection # is read only. We have to render it with the href links when an # array contains PATCHable items because its complex to PATCH # inline collection members. if 'Items' in thecollection: # iterate items for item in thecollection['Items']: # if the item has a self uri pointer, # supply that for convenience. memberuri = None if 'links' in item and 'self' in item['links']: memberuri = item['links']['self']['href'] yield 200, None, item, memberuri # else walk the member links elif ('links' in thecollection and 'Member' in thecollection['links']): # iterate members for memberuri in thecollection['links']['Member']: # for each member return the resource indicated by the # member link status, headers, member = self._rest_get(memberuri['href']) yield status, headers, member, memberuri['href'] # page forward if there are more pages in the collection if ('links' in thecollection and 'NextPage' in thecollection['links']): next_link_uri = (collection_uri + '?page=' + str( thecollection['links']['NextPage']['page'])) status, headers, thecollection = self._rest_get(next_link_uri) # else we are finished iterating the collection else: break def _get_type(self, obj): """Return the type of an object.""" typever = obj['Type'] typesplit = typever.split('.') return typesplit[0] + '.' + typesplit[1] def _operation_allowed(self, headers_dict, operation): """Checks if specified operation is allowed on the resource.""" if 'allow' in headers_dict: if operation in headers_dict['allow']: return True return False def _render_extended_error_message_list(self, extended_error): """Parse the ExtendedError object and retruns the message. Build a list of decoded messages from the extended_error using the message registries. An ExtendedError JSON object is a response from the with its own schema. This function knows how to parse the ExtendedError object and, using any loaded message registries, render an array of plain language strings that represent the response. """ messages = [] if isinstance(extended_error, dict): if ('Type' in extended_error and extended_error['Type'].startswith('ExtendedError.')): for msg in extended_error['Messages']: message_id = msg['MessageID'] x = message_id.split('.') registry = x[0] msgkey = x[len(x) - 1] # if the correct message registry is loaded, # do string resolution if (registry in self.message_registries and msgkey in self.message_registries[registry]['Messages']): rmsgs = self.message_registries[registry]['Messages'] msg_dict = rmsgs[msgkey] msg_str = message_id + ': ' + msg_dict['Message'] for argn in range(0, msg_dict['NumberOfArgs']): subst = '%' + str(argn + 1) m = str(msg['MessageArgs'][argn]) msg_str = msg_str.replace(subst, m) if ('Resolution' in msg_dict and msg_dict['Resolution'] != 'None'): msg_str += ' ' + msg_dict['Resolution'] messages.append(msg_str) else: # no message registry, simply return the msg object # in string form messages.append(str(message_id)) return messages def _get_extended_error(self, extended_error): """Gets the list of decoded messages from the extended_error.""" return self._render_extended_error_message_list(extended_error) def _get_host_details(self): """Get the system details.""" # Assuming only one system present as part of collection, # as we are dealing with iLO's here. status, headers, system = self._rest_get('/rest/v1/Systems/1') if status < 300: stype = self._get_type(system) if stype not in ['ComputerSystem.0', 'ComputerSystem.1']: msg = "%s is not a valid system type " % stype raise exception.IloError(msg) else: msg = self._get_extended_error(system) raise exception.IloError(msg) return system def _check_bios_resource(self, properties=[]): """Check if the bios resource exists.""" system = self._get_host_details() if ('links' in system['Oem']['Hp'] and 'BIOS' in system['Oem']['Hp']['links']): # Get the BIOS URI and Settings bios_uri = system['Oem']['Hp']['links']['BIOS']['href'] status, headers, bios_settings = self._rest_get(bios_uri) if status >= 300: msg = self._get_extended_error(bios_settings) raise exception.IloError(msg) # If property is not None, check if the bios_property is supported for property in properties: if property not in bios_settings: # not supported on this platform msg = ('BIOS Property "' + property + '" is not' ' supported on this system.') raise exception.IloCommandNotSupportedError(msg) return headers, bios_uri, bios_settings else: msg = ('"links/BIOS" section in ComputerSystem/Oem/Hp' ' does not exist') raise exception.IloCommandNotSupportedError(msg) def _get_pci_devices(self): """Gets the PCI devices. :returns: PCI devices list if the pci resource exist. :raises: IloCommandNotSupportedError if the PCI resource doesn't exist. :raises: IloError, on an error from iLO. """ system = self._get_host_details() if ('links' in system['Oem']['Hp'] and 'PCIDevices' in system['Oem']['Hp']['links']): # Get the PCI URI and Settings pci_uri = system['Oem']['Hp']['links']['PCIDevices']['href'] status, headers, pci_device_list = self._rest_get(pci_uri) if status >= 300: msg = self._get_extended_error(pci_device_list) raise exception.IloError(msg) return pci_device_list else: msg = ('links/PCIDevices section in ComputerSystem/Oem/Hp' ' does not exist') raise exception.IloCommandNotSupportedError(msg) def _get_gpu_pci_devices(self): """Returns the list of gpu devices.""" pci_device_list = self._get_pci_devices() gpu_list = [] items = pci_device_list['Items'] for item in items: if item['ClassCode'] in CLASSCODE_FOR_GPU_DEVICES: if item['SubclassCode'] in SUBCLASSCODE_FOR_GPU_DEVICES: gpu_list.append(item) return gpu_list def _get_storage_resource(self): """Gets the SmartStorage resource if exists. :raises: IloCommandNotSupportedError if the resource SmartStorage doesn't exist. :returns the tuple of SmartStorage URI, Headers and settings. """ system = self._get_host_details() if ('links' in system['Oem']['Hp'] and 'SmartStorage' in system['Oem']['Hp']['links']): # Get the SmartStorage URI and Settings storage_uri = system['Oem']['Hp']['links']['SmartStorage']['href'] status, headers, storage_settings = self._rest_get(storage_uri) if status >= 300: msg = self._get_extended_error(storage_settings) raise exception.IloError(msg) return headers, storage_uri, storage_settings else: msg = ('"links/SmartStorage" section in ComputerSystem/Oem/Hp' ' does not exist') raise exception.IloCommandNotSupportedError(msg) def _get_array_controller_resource(self): """Gets the ArrayController resource if exists. :raises: IloCommandNotSupportedError if the resource ArrayController doesn't exist. :returns the tuple of SmartStorage URI, Headers and settings. """ headers, storage_uri, storage_settings = self._get_storage_resource() # Do not raise exception if there is no ArrayControllers # as Storage can be zero at any point and if we raise # exception it might fail get_server_capabilities(). if ('links' in storage_settings and 'ArrayControllers' in storage_settings['links']): # Get the ArrayCOntrollers URI and Settings array_uri = storage_settings['links']['ArrayControllers']['href'] status, headers, array_settings = self._rest_get(array_uri) if status >= 300: msg = self._get_extended_error(array_settings) raise exception.IloError(msg) return headers, array_uri, array_settings def _create_list_of_array_controllers(self): """Creates the list of Array Controller URIs. :returns list of ArrayControllers. """ headers, array_uri, array_settings = ( self._get_array_controller_resource()) array_uri_links = [] # Do not raise exception if there is no ArrayControllers # as Storage can be zero at any point and if we raise # exception it might fail get_server_capabilities(). if ('links' in array_settings and 'Member' in array_settings['links']): array_uri_links = array_settings['links']['Member'] return array_uri_links def _get_drive_type_and_speed(self): """Gets the disk drive type. :returns: A dictionary with the following keys: - has_rotational: True/False. It is True if atleast one rotational disk is attached. - has_ssd: True/False. It is True if at least one SSD disk is attached. - drive_rotational__rpm: These are set to true as per the speed of the rotational disks. :raises: IloCommandNotSupportedError if the PhysicalDrives resource doesn't exist. :raises: IloError, on an error from iLO. """ disk_details = self._get_physical_drive_resource() drive_hdd = False drive_ssd = False drive_details = {} speed_const_list = [4800, 5400, 7200, 10000, 15000] if disk_details: for item in disk_details: value = item['MediaType'] if value == "HDD": drive_hdd = True speed = item['RotationalSpeedRpm'] if speed in speed_const_list: var = 'rotational_drive_' + str(speed) + '_rpm' drive_details.update({var: 'true'}) # Note: RIS returns value as 'SDD' for SSD drives. else: drive_ssd = True if drive_hdd: drive_details.update({'has_rotational': 'true'}) if drive_ssd: drive_details.update({'has_ssd': 'true'}) return drive_details if len(drive_details.keys()) > 0 else None def _get_drive_resource(self, drive_name): """Gets the DiskDrive resource if exists. :param drive_name: can be either "PhysicalDrives" or "LogicalDrives". :returns the list of drives. :raises: IloCommandNotSupportedError if the given drive resource doesn't exist. :raises: IloError, on an error from iLO. """ disk_details_list = [] array_uri_links = self._create_list_of_array_controllers() # Do not raise exception if there is no disk/logical drive # as Storage can be zero at any point and if we raise # exception it might fail get_server_capabilities(). for array_link in array_uri_links: _, _, member_settings = ( self._rest_get(array_link['href'])) if ('links' in member_settings and drive_name in member_settings['links']): disk_uri = member_settings['links'][drive_name]['href'] headers, disk_member_uri, disk_mem = ( self._rest_get(disk_uri)) if ('links' in disk_mem and 'Member' in disk_mem['links']): for disk_link in disk_mem['links']['Member']: diskdrive_uri = disk_link['href'] _, _, disk_details = ( self._rest_get(diskdrive_uri)) disk_details_list.append(disk_details) if disk_details_list: return disk_details_list def _get_logical_drive_resource(self): """Returns the LogicalDrives data.""" return self._get_drive_resource('LogicalDrives') def _get_physical_drive_resource(self): """Returns the PhysicalDrives data.""" return self._get_drive_resource('PhysicalDrives') def _get_logical_raid_levels(self): """Gets the different raid levels configured on a server. :returns a dictionary of logical_raid_levels set to true. Example if raid level 1+0 and 6 are configured, it returns {'logical_raid_level_10': 'true', 'logical_raid_level_6': 'true'} """ logical_drive_details = self._get_logical_drive_resource() raid_level = {} if logical_drive_details: for item in logical_drive_details: if 'Raid' in item: raid_level_var = "logical_raid_level_" + item['Raid'] raid_level.update({raid_level_var: 'true'}) return raid_level if len(raid_level.keys()) > 0 else None def _is_raid_supported(self): """Get the RAID support on the server. This method returns the raid support on the physical server. It checks for the list of array controllers configured to the Smart Storage. If one or more array controllers available then raid is supported by the server. If none, raid is not supported. :return: Raid support as a dictionary with true/false as its value. """ header, uri, array_resource = self._get_array_controller_resource() return True if array_resource['Total'] > 0 else False def _get_bios_settings_resource(self, data): """Get the BIOS settings resource.""" try: bios_settings_uri = data['links']['Settings']['href'] except KeyError: msg = ('BIOS Settings resource not found.') raise exception.IloError(msg) status, headers, bios_settings = self._rest_get(bios_settings_uri) if status != 200: msg = self._get_extended_error(bios_settings) raise exception.IloError(msg) return headers, bios_settings_uri, bios_settings def _validate_if_patch_supported(self, headers, uri): """Check if the PATCH Operation is allowed on the resource.""" if not self._operation_allowed(headers, 'PATCH'): msg = ('PATCH Operation not supported on the resource "%s"' % uri) raise exception.IloError(msg) def _get_bios_setting(self, bios_property): """Retrieves bios settings of the server.""" headers, bios_uri, bios_settings = self._check_bios_resource([ bios_property]) return bios_settings[bios_property] def _get_bios_hash_password(self, bios_password): """Get the hashed BIOS password.""" request_headers = {} if bios_password: bios_password_hash = hashlib.sha256((bios_password.encode()). hexdigest().upper()) request_headers['X-HPRESTFULAPI-AuthToken'] = bios_password_hash return request_headers def _change_bios_setting(self, properties): """Change the bios settings to specified values.""" keys = properties.keys() # Check if the BIOS resource/property exists. headers, bios_uri, settings = self._check_bios_resource(keys) if not self._operation_allowed(headers, 'PATCH'): headers, bios_uri, _ = self._get_bios_settings_resource(settings) self._validate_if_patch_supported(headers, bios_uri) request_headers = self._get_bios_hash_password(self.bios_password) status, headers, response = self._rest_patch(bios_uri, request_headers, properties) if status >= 300: msg = self._get_extended_error(response) raise exception.IloError(msg) def _get_iscsi_settings_resource(self, data): """Get the iscsi settings resoure. :param data: Existing iscsi settings of the server. :returns: headers, iscsi_settings url and iscsi settings as a dictionary. :raises: IloCommandNotSupportedError, if resource is not found. :raises: IloError, on an error from iLO. """ try: iscsi_settings_uri = data['links']['Settings']['href'] except KeyError: msg = ('iscsi settings resource not found.') raise exception.IloCommandNotSupportedError(msg) status, headers, iscsi_settings = self._rest_get(iscsi_settings_uri) if status != 200: msg = self._get_extended_error(iscsi_settings) raise exception.IloError(msg) return headers, iscsi_settings_uri, iscsi_settings def _get_bios_boot_resource(self, data): """Get the Boot resource like BootSources. :param data: Existing Bios settings of the server. :returns: boot settings. :raises: IloCommandNotSupportedError, if resource is not found. :raises: IloError, on an error from iLO. """ try: boot_uri = data['links']['Boot']['href'] except KeyError: msg = ('Boot resource not found.') raise exception.IloCommandNotSupportedError(msg) status, headers, boot_settings = self._rest_get(boot_uri) if status != 200: msg = self._get_extended_error(boot_settings) raise exception.IloError(msg) return boot_settings def _get_bios_mappings_resource(self, data): """Get the Mappings resource. :param data: Existing Bios settings of the server. :returns: mappings settings. :raises: IloCommandNotSupportedError, if resource is not found. :raises: IloError, on an error from iLO. """ try: map_uri = data['links']['Mappings']['href'] except KeyError: msg = ('Mappings resource not found.') raise exception.IloCommandNotSupportedError(msg) status, headers, map_settings = self._rest_get(map_uri) if status != 200: msg = self._get_extended_error(map_settings) raise exception.IloError(msg) return map_settings def _check_iscsi_rest_patch_allowed(self): """Checks if patch is supported on iscsi. :returns: iscsi url. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ headers, bios_uri, bios_settings = self._check_bios_resource() # Check if the bios resource exists. if('links' in bios_settings and 'iScsi' in bios_settings['links']): iscsi_uri = bios_settings['links']['iScsi']['href'] status, headers, settings = self._rest_get(iscsi_uri) if status != 200: msg = self._get_extended_error(settings) raise exception.IloError(msg) if not self._operation_allowed(headers, 'PATCH'): headers, iscsi_uri, settings = ( self._get_iscsi_settings_resource(settings)) self._validate_if_patch_supported(headers, iscsi_uri) return iscsi_uri else: msg = ('"links/iScsi" section in bios' ' does not exist') raise exception.IloCommandNotSupportedError(msg) def _get_uefi_device_path_by_mac(self, mac): """Return uefi device path of mac. :param mac: Mac address. :returns: Uefi Device path. Ex. 'PciRoot(0x0)/Pci(0x2,0x3)/Pci(0x0,0x0)' """ adapter_uri = '/rest/v1/Systems/1/NetworkAdapters' for status, headers, member, memberuri in ( self._get_collection(adapter_uri)): if status < 300 and member.get('PhysicalPorts'): for port in member.get('PhysicalPorts'): if port['MacAddress'].lower() == mac.lower(): return port['UEFIDevicePath'] def _get_nic_association_name_by_mac(self, mac): """Return nic association name by mac address :param mac: Mac address. :returns: Nic association name. Ex. NicBoot1 """ headers, bios_uri, bios_settings = self._check_bios_resource() mappings = ( self._get_bios_mappings_resource( bios_settings).get('BiosPciSettingsMappings')) correlatable_id = self._get_uefi_device_path_by_mac(mac) for mapping in mappings: for subinstance in mapping['Subinstances']: for association in subinstance['Associations']: if subinstance.get('CorrelatableID') == correlatable_id: return [name for name in subinstance[ 'Associations'] if 'NicBoot' in name][0] def _get_all_macs(self): """Return list of macs available on system :returns: List of macs """ macs = [] adapter_uri = '/rest/v1/Systems/1/NetworkAdapters' for status, headers, member, memberuri in ( self._get_collection(adapter_uri)): if status < 300 and member.get('PhysicalPorts'): for port in member.get('PhysicalPorts'): macs.append(port['MacAddress'].lower()) return macs def _validate_macs(self, macs): """Validate given macs are there in system :param macs: List of macs :raises: InvalidInputError, if macs not valid """ macs_available = self._get_all_macs() if not set(macs).issubset(macs_available): msg = ("Given macs: %(macs)s not found in the system" % {'macs': list(set(macs) - set(macs_available))}) raise exception.InvalidInputError(msg) def _change_iscsi_settings(self, iscsi_info, macs=[]): """Change iSCSI settings. :param macs: List of target macs for iSCSI. :param iscsi_info: A dictionary that contains information of iSCSI target like target_name, lun, ip_address, port etc. :raises: IloError, on an error from iLO. """ iscsi_uri = self._check_iscsi_rest_patch_allowed() association_names = [] if macs: self._validate_macs(macs) association_names = [ self._get_nic_association_name_by_mac(mac) for mac in macs] else: # Get the Mappings resource. headers, bios_uri, bios_settings = self._check_bios_resource() map_settings = self._get_bios_mappings_resource(bios_settings) for mapping in map_settings['BiosPciSettingsMappings']: for subinstance in mapping['Subinstances']: for association in subinstance['Associations']: if 'NicBoot' in association: association_names.append(association) if not association_names: msg = ('No macs were found on the system') raise exception.IloError(msg) iscsi_infos = [] for association_name in association_names: data = iscsi_info.copy() data['iSCSIBootAttemptName'] = association_name data['iSCSINicSource'] = association_name data['iSCSIBootAttemptInstance'] = ( association_names.index(association_name) + 1) iscsi_infos.append(data) iscsi_data = {'iSCSIBootSources': iscsi_infos} status, headers, response = self._rest_patch(iscsi_uri, None, iscsi_data) if status >= 300: msg = self._get_extended_error(response) raise exception.IloError(msg) def _change_secure_boot_settings(self, property, value): """Change secure boot settings on the server.""" system = self._get_host_details() # find the BIOS URI if ('links' not in system['Oem']['Hp'] or 'SecureBoot' not in system['Oem']['Hp']['links']): msg = (' "SecureBoot" resource or feature is not ' 'supported on this system') raise exception.IloCommandNotSupportedError(msg) secure_boot_uri = system['Oem']['Hp']['links']['SecureBoot']['href'] # Change the property required new_secure_boot_settings = {} new_secure_boot_settings[property] = value # perform the patch status, headers, response = self._rest_patch( secure_boot_uri, None, new_secure_boot_settings) if status >= 300: msg = self._get_extended_error(response) raise exception.IloError(msg) # Change the bios setting as a workaround to enable secure boot # Can be removed when fixed for Gen9 snap2 val = self._get_bios_setting('CustomPostMessage') val = val.rstrip() if val.endswith(" ") else val + " " self._change_bios_setting({'CustomPostMessage': val}) def _is_boot_mode_uefi(self): """Checks if the system is in uefi boot mode. :return: 'True' if the boot mode is uefi else 'False' :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ boot_mode = self.get_current_boot_mode() if boot_mode == 'UEFI': return True else: return False def get_product_name(self): """Gets the product name of the server. :returns: server model name. :raises: IloError, on an error from iLO. """ system = self._get_host_details() return system['Model'] def get_secure_boot_mode(self): """Get the status of secure boot. :returns: True, if enabled, else False :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ system = self._get_host_details() if ('links' not in system['Oem']['Hp'] or 'SecureBoot' not in system['Oem']['Hp']['links']): msg = ('"SecureBoot" resource or feature is not supported' ' on this system') raise exception.IloCommandNotSupportedError(msg) secure_boot_uri = system['Oem']['Hp']['links']['SecureBoot']['href'] # get the Secure Boot object status, headers, secure_boot_settings = self._rest_get(secure_boot_uri) if status >= 300: msg = self._get_extended_error(secure_boot_settings) raise exception.IloError(msg) return secure_boot_settings['SecureBootCurrentState'] def set_secure_boot_mode(self, secure_boot_enable): """Enable/Disable secure boot on the server. :param secure_boot_enable: True, if secure boot needs to be enabled for next boot, else False. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ if self._is_boot_mode_uefi(): self._change_secure_boot_settings('SecureBootEnable', secure_boot_enable) else: msg = ('System is not in UEFI boot mode. "SecureBoot" related ' 'resources cannot be changed.') raise exception.IloCommandNotSupportedInBiosError(msg) def reset_secure_boot_keys(self): """Reset secure boot keys to manufacturing defaults. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ if self._is_boot_mode_uefi(): self._change_secure_boot_settings('ResetToDefaultKeys', True) else: msg = ('System is not in UEFI boot mode. "SecureBoot" related ' 'resources cannot be changed.') raise exception.IloCommandNotSupportedInBiosError(msg) def clear_secure_boot_keys(self): """Reset all keys. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ if self._is_boot_mode_uefi(): self._change_secure_boot_settings('ResetAllKeys', True) else: msg = ('System is not in UEFI boot mode. "SecureBoot" related ' 'resources cannot be changed.') raise exception.IloCommandNotSupportedInBiosError(msg) def get_host_power_status(self): """Request the power state of the server. :returns: Power State of the server, 'ON' or 'OFF' :raises: IloError, on an error from iLO. """ data = self._get_host_details() return data['Power'].upper() def _perform_power_op(self, oper): """Perform requested power operation. :param oper: Type of power button press to simulate. Supported values: 'ON', 'ForceOff', 'ForceRestart' and 'Nmi' :raises: IloError, on an error from iLO. """ power_settings = {"Action": "Reset", "ResetType": oper} systems_uri = "/rest/v1/Systems/1" status, headers, response = self._rest_post(systems_uri, None, power_settings) if status >= 300: msg = self._get_extended_error(response) raise exception.IloError(msg) def reset_server(self): """Resets the server. :raises: IloError, on an error from iLO. """ self._perform_power_op("ForceRestart") def _press_pwr_btn(self, pushType="Press"): """Simulates a physical press of the server power button. :param pushType: Type of power button press to simulate Supported values are: 'Press' and 'PressAndHold' :raises: IloError, on an error from iLO. """ power_settings = {"Action": "PowerButton", "Target": "/Oem/Hp", "PushType": pushType} systems_uri = "/rest/v1/Systems/1" status, headers, response = self._rest_post(systems_uri, None, power_settings) if status >= 300: msg = self._get_extended_error(response) raise exception.IloError(msg) def press_pwr_btn(self): """Simulates a physical press of the server power button. :raises: IloError, on an error from iLO. """ self._press_pwr_btn() def hold_pwr_btn(self): """Simulate a physical press and hold of the server power button. :raises: IloError, on an error from iLO. """ self._press_pwr_btn(pushType="PressAndHold") @retrying.retry( stop_max_attempt_number=MAX_RETRY_ATTEMPTS, retry_on_result=lambda state: state != 'ON', wait_fixed=MAX_TIME_BEFORE_RETRY ) def _retry_until_powered_on(self, power): """This method retries power on operation. :param: power : target power state """ # If the system is in the same power state as # requested by the user, it gives the error # InvalidOperationForSystemState. To avoid this error # the power state is checked before power on # operation is performed. status = self.get_host_power_status() if (status != power): self._perform_power_op(POWER_STATE[power]) return self.get_host_power_status() else: return status def set_host_power(self, power): """Toggle the power button of server. :param power: 'ON' or 'OFF' :raises: IloError, on an error from iLO. """ power = power.upper() if (power is not None) and (power not in POWER_STATE): msg = ("Invalid input '%(pow)s'. " "The expected input is ON or OFF." % {'pow': power}) raise exception.IloInvalidInputError(msg) # Check current power status, do not act if it's in requested state. cur_status = self.get_host_power_status() if cur_status == power: LOG.debug(self._("Node is already in '%(power)s' power state."), {'power': power}) return if power == 'ON' and 'PROLIANT BL' in self.get_product_name().upper(): self._retry_until_powered_on(power) else: self._perform_power_op(POWER_STATE[power]) def get_http_boot_url(self): """Request the http boot url from system in uefi boot mode. :returns: URL for http boot :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedInBiosError, if the system is in the bios boot mode. """ if(self._is_boot_mode_uefi() is True): return self._get_bios_setting('UefiShellStartupUrl') else: msg = 'get_http_boot_url is not supported in the BIOS boot mode' raise exception.IloCommandNotSupportedInBiosError(msg) def set_http_boot_url(self, url): """Set url to the UefiShellStartupUrl to the system in uefi boot mode. :param url: URL for http boot :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedInBiosError, if the system is in the bios boot mode. """ if(self._is_boot_mode_uefi() is True): self._change_bios_setting({'UefiShellStartupUrl': url}) else: msg = 'set_http_boot_url is not supported in the BIOS boot mode' raise exception.IloCommandNotSupportedInBiosError(msg) def set_iscsi_info(self, target_name, lun, ip_address, port='3260', auth_method=None, username=None, password=None, macs=[]): """Set iSCSI details of the system in UEFI boot mode. The initiator system is set with the target details like IQN, LUN, IP, Port etc. :param target_name: Target Name for iscsi. :param lun: logical unit number. :param ip_address: IP address of the target. :param port: port of the target. :param auth_method : either None or CHAP. :param username: CHAP Username for authentication. :param password: CHAP secret. :param macs: List of target macs for iSCSI. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedInBiosError, if the system is in the BIOS boot mode. """ if(self._is_boot_mode_uefi() is True): iscsi_info = {} iscsi_info['iSCSITargetName'] = target_name iscsi_info['iSCSIBootLUN'] = lun iscsi_info['iSCSITargetIpAddress'] = ip_address iscsi_info['iSCSITargetTcpPort'] = int(port) iscsi_info['iSCSITargetInfoViaDHCP'] = False iscsi_info['iSCSIBootEnable'] = 'Enabled' if (auth_method == 'CHAP'): iscsi_info['iSCSIAuthenticationMethod'] = 'Chap' iscsi_info['iSCSIChapUsername'] = username iscsi_info['iSCSIChapSecret'] = password self._change_iscsi_settings(iscsi_info, macs) else: msg = 'iSCSI boot is not supported in the BIOS boot mode' raise exception.IloCommandNotSupportedInBiosError(msg) def unset_iscsi_info(self, macs=[]): """Disable iSCSI boot option in UEFI boot mode. :param macs: List of target macs for iSCSI. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedInBiosError, if the system is in the BIOS boot mode. """ if(self._is_boot_mode_uefi() is True): iscsi_info = {'iSCSIBootEnable': 'Disabled'} self._change_iscsi_settings(iscsi_info, macs) else: msg = 'iSCSI boot is not supported in the BIOS boot mode' raise exception.IloCommandNotSupportedInBiosError(msg) def get_iscsi_initiator_info(self): """Give iSCSI initiator information of iLO. :returns: iSCSI initiator information. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the system is in the bios boot mode. """ headers, bios_uri, bios_settings = self._check_bios_resource() if('links' in bios_settings and 'iScsi' in bios_settings['links']): iscsi_uri = bios_settings['links']['iScsi']['href'] status, headers, iscsi_settings = self._rest_get(iscsi_uri) if status != 200: msg = self._get_extended_error(iscsi_settings) raise exception.IloError(msg) return iscsi_settings['iSCSIInitiatorName'] else: msg = ('"links/iScsi" section in bios ' 'does not exist') raise exception.IloCommandNotSupportedError(msg) def set_iscsi_initiator_info(self, initiator_iqn): """Set iSCSI initiator information in iLO. :param initiator_iqn: Initiator iqn for iLO. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the system is in the bios boot mode. """ if(self._is_boot_mode_uefi() is True): iscsi_uri = self._check_iscsi_rest_patch_allowed() initiator_info = {'iSCSIInitiatorName': initiator_iqn} status, headers, response = self._rest_patch(iscsi_uri, None, initiator_info) if status >= 300: msg = self._get_extended_error(response) raise exception.IloError(msg) else: msg = 'iSCSI initiator cannot be set in the BIOS boot mode' raise exception.IloCommandNotSupportedError(msg) def get_current_boot_mode(self): """Retrieves the current boot mode of the server. :returns: Current boot mode, LEGACY or UEFI. :raises: IloError, on an error from iLO. """ boot_mode = self._get_bios_setting('BootMode') if boot_mode == 'LegacyBios': boot_mode = 'legacy' return boot_mode.upper() def get_pending_boot_mode(self): """Retrieves the pending boot mode of the server. Gets the boot mode to be set on next reset. :returns: either LEGACY or UEFI. :raises: IloError, on an error from iLO. """ headers, uri, bios_settings = self._check_bios_resource(['BootMode']) _, _, settings = self._get_bios_settings_resource(bios_settings) boot_mode = settings.get('BootMode') if boot_mode == 'LegacyBios': boot_mode = 'legacy' return boot_mode.upper() def set_pending_boot_mode(self, boot_mode): """Sets the boot mode of the system for next boot. :param boot_mode: either 'uefi' or 'legacy'. :raises: IloInvalidInputError, on an invalid input. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ boot_mode = boot_mode.lower() if boot_mode not in ['uefi', 'legacy']: msg = 'Invalid Boot mode specified' raise exception.IloInvalidInputError(msg) boot_properties = {'BootMode': boot_mode} if boot_mode == 'legacy': boot_properties['BootMode'] = 'LegacyBios' else: # If Boot Mode is 'Uefi' set the UEFIOptimizedBoot first. boot_properties['UefiOptimizedBoot'] = "Enabled" # Change the Boot Mode self._change_bios_setting(boot_properties) def get_supported_boot_mode(self): """Retrieves the supported boot mode. :returns: any one of the following proliantutils.ilo.constants: SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY, SUPPORTED_BOOT_MODE_UEFI_ONLY, SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI """ system = self._get_host_details() bios_uefi_class_val = 0 # value for bios_only boot mode if ('Bios' in system['Oem']['Hp'] and 'UefiClass' in system['Oem']['Hp']['Bios']): bios_uefi_class_val = (system['Oem']['Hp'] ['Bios']['UefiClass']) return mappings.GET_SUPPORTED_BOOT_MODE_RIS_MAP.get( bios_uefi_class_val) def reset_ilo_credential(self, password): """Resets the iLO password. :param password: The password to be set. :raises: IloError, if account not found or on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ acc_uri = '/rest/v1/AccountService/Accounts' for status, hds, account, memberuri in self._get_collection(acc_uri): if account['UserName'] == self.login: mod_user = {} mod_user['Password'] = password status, headers, response = self._rest_patch(memberuri, None, mod_user) if status != 200: msg = self._get_extended_error(response) raise exception.IloError(msg) return msg = "iLO Account with specified username is not found." raise exception.IloError(msg) def _get_ilo_details(self): """Gets iLO details :raises: IloError, on an error from iLO. :raises: IloConnectionError, if iLO is not up after reset. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ manager_uri = '/rest/v1/Managers/1' status, headers, manager = self._rest_get(manager_uri) if status != 200: msg = self._get_extended_error(manager) raise exception.IloError(msg) # verify expected type mtype = self._get_type(manager) if (mtype not in ['Manager.0', 'Manager.1']): msg = "%s is not a valid Manager type " % mtype raise exception.IloError(msg) return manager, manager_uri def reset_ilo(self): """Resets the iLO. :raises: IloError, on an error from iLO. :raises: IloConnectionError, if iLO is not up after reset. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ manager, reset_uri = self._get_ilo_details() action = {'Action': 'Reset'} # perform the POST status, headers, response = self._rest_post(reset_uri, None, action) if(status != 200): msg = self._get_extended_error(response) raise exception.IloError(msg) # Check if the iLO is up again. common.wait_for_ilo_after_reset(self) def reset_bios_to_default(self): """Resets the BIOS settings to default values. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ # Check if the BIOS resource if exists. headers_bios, bios_uri, bios_settings = self._check_bios_resource() # Get the BaseConfig resource. try: base_config_uri = bios_settings['links']['BaseConfigs']['href'] except KeyError: msg = ("BaseConfigs resource not found. Couldn't apply the BIOS " "Settings.") raise exception.IloCommandNotSupportedError(msg) # Check if BIOS resource supports patch, else get the settings if not self._operation_allowed(headers_bios, 'PATCH'): headers, bios_uri, _ = self._get_bios_settings_resource( bios_settings) self._validate_if_patch_supported(headers, bios_uri) status, headers, config = self._rest_get(base_config_uri) if status != 200: msg = self._get_extended_error(config) raise exception.IloError(msg) new_bios_settings = {} for cfg in config['BaseConfigs']: default_settings = cfg.get('default', None) if default_settings is not None: new_bios_settings = default_settings break else: msg = ("Default Settings not found in 'BaseConfigs' resource.") raise exception.IloCommandNotSupportedError(msg) request_headers = self._get_bios_hash_password(self.bios_password) status, headers, response = self._rest_patch(bios_uri, request_headers, new_bios_settings) if status >= 300: msg = self._get_extended_error(response) raise exception.IloError(msg) def _get_ilo_firmware_version(self): """Gets the ilo firmware version for server capabilities :returns: a dictionary of iLO firmware version. """ manager, reset_uri = self._get_ilo_details() ilo_firmware_version = manager['Firmware']['Current']['VersionString'] return {'ilo_firmware_version': ilo_firmware_version} def get_ilo_firmware_version_as_major_minor(self): """Gets the ilo firmware version for server capabilities :returns: String with the format "." or None. """ try: manager, reset_uri = self._get_ilo_details() ilo_fw_ver_str = ( manager['Oem']['Hp']['Firmware']['Current']['VersionString'] ) return common.get_major_minor(ilo_fw_ver_str) except Exception: return None def _is_sriov_enabled(self): """Return sriov enabled or not""" return (self._get_bios_setting('Sriov') == 'Enabled') def get_server_capabilities(self): """Gets server properties which can be used for scheduling :returns: a dictionary of hardware properties like firmware versions, server model. :raises: IloError, if iLO returns an error in command execution. """ capabilities = {} system = self._get_host_details() capabilities['server_model'] = system['Model'] rom_firmware_version = ( system['Oem']['Hp']['Bios']['Current']['VersionString']) capabilities['rom_firmware_version'] = rom_firmware_version capabilities.update(self._get_ilo_firmware_version()) capabilities.update(self._get_number_of_gpu_devices_connected()) drive_details = self._get_drive_type_and_speed() if drive_details is not None: capabilities.update(drive_details) raid_details = self._get_logical_raid_levels() if raid_details is not None: capabilities.update(raid_details) if self._is_raid_supported(): capabilities['hardware_supports_raid'] = 'true' boot_modes = common.get_supported_boot_modes( self.get_supported_boot_mode()) capabilities.update({ 'boot_mode_bios': boot_modes.boot_mode_bios, 'boot_mode_uefi': boot_modes.boot_mode_uefi}) if self._get_tpm_capability(): capabilities['trusted_boot'] = 'true' if self._get_cpu_virtualization(): capabilities['cpu_vt'] = 'true' if self._get_nvdimm_n_status(): capabilities['nvdimm_n'] = 'true' try: self._check_iscsi_rest_patch_allowed() capabilities['iscsi_boot'] = 'true' except exception.IloError: # If an error is raised dont populate the capability # iscsi_boot pass try: self.get_secure_boot_mode() capabilities['secure_boot'] = 'true' except exception.IloCommandNotSupportedError: # If an error is raised dont populate the capability # secure_boot pass if self._is_sriov_enabled(): capabilities['sriov_enabled'] = 'true' return capabilities def activate_license(self, key): """Activates iLO license. :param key: iLO license key. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ manager, uri = self._get_ilo_details() try: lic_uri = manager['Oem']['Hp']['links']['LicenseService']['href'] except KeyError: msg = ('"LicenseService" section in Manager/Oem/Hp does not exist') raise exception.IloCommandNotSupportedError(msg) lic_key = {} lic_key['LicenseKey'] = key # Perform POST to activate license status, headers, response = self._rest_post(lic_uri, None, lic_key) if status >= 300: msg = self._get_extended_error(response) raise exception.IloError(msg) def _get_vm_device_status(self, device='FLOPPY'): """Returns the given virtual media device status and device URI :param device: virtual media device to be queried :returns json format virtual media device status and its URI :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ valid_devices = {'FLOPPY': 'floppy', 'CDROM': 'cd'} # Check if the input is valid if device not in valid_devices: raise exception.IloInvalidInputError( "Invalid device. Valid devices: FLOPPY or CDROM.") manager, uri = self._get_ilo_details() try: vmedia_uri = manager['links']['VirtualMedia']['href'] except KeyError: msg = '"VirtualMedia" section in Manager/links does not exist' raise exception.IloCommandNotSupportedError(msg) for status, hds, vmed, memberuri in self._get_collection(vmedia_uri): status, headers, response = self._rest_get(memberuri) if status != 200: msg = self._get_extended_error(response) raise exception.IloError(msg) if (valid_devices[device] in [item.lower() for item in response['MediaTypes']]): vm_device_uri = response['links']['self']['href'] return response, vm_device_uri # Requested device not found msg = ('Virtualmedia device "' + device + '" is not' ' found on this system.') raise exception.IloError(msg) def get_vm_status(self, device='FLOPPY'): """Returns the virtual media drive status. :param device: virtual media device to be queried :returns device status in dictionary form :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ response, vm_device_uri = self._get_vm_device_status(device) # Create RIBCL equivalent response # RIBCL provides this data in VM status # VM_APPLET = CONNECTED | DISCONNECTED # DEVICE = FLOPPY | CDROM # BOOT_OPTION = BOOT_ALWAYS | BOOT_ONCE | NO_BOOT # WRITE_PROTECT = YES | NO # IMAGE_INSERTED = YES | NO response_data = {} if response.get('WriteProtected', False): response_data['WRITE_PROTECT'] = 'YES' else: response_data['WRITE_PROTECT'] = 'NO' if response.get('BootOnNextServerReset', False): response_data['BOOT_OPTION'] = 'BOOT_ONCE' else: response_data['BOOT_OPTION'] = 'BOOT_ALWAYS' if response.get('Inserted', False): response_data['IMAGE_INSERTED'] = 'YES' else: response_data['IMAGE_INSERTED'] = 'NO' if response.get('ConnectedVia') == 'NotConnected': response_data['VM_APPLET'] = 'DISCONNECTED' # When media is not connected, it's NO_BOOT response_data['BOOT_OPTION'] = 'NO_BOOT' else: response_data['VM_APPLET'] = 'CONNECTED' response_data['IMAGE_URL'] = response['Image'] response_data['DEVICE'] = device # FLOPPY cannot be a boot device if ((response_data['BOOT_OPTION'] == 'BOOT_ONCE') and (response_data['DEVICE'] == 'FLOPPY')): response_data['BOOT_OPTION'] = 'NO_BOOT' return response_data def set_vm_status(self, device='FLOPPY', boot_option='BOOT_ONCE', write_protect='YES'): """Sets the Virtual Media drive status It sets the boot option for virtual media device. Note: boot option can be set only for CD device. :param device: virual media device :param boot_option: boot option to set on the virtual media device :param write_protect: set the write protect flag on the vmedia device Note: It's ignored. In RIS it is read-only. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ # CONNECT is a RIBCL call. There is no such property to set in RIS. if boot_option == 'CONNECT': return boot_option_map = {'BOOT_ONCE': True, 'BOOT_ALWAYS': False, 'NO_BOOT': False } if boot_option not in boot_option_map: msg = ('Virtualmedia boot option "' + boot_option + '" is ' 'invalid.') raise exception.IloInvalidInputError(msg) response, vm_device_uri = self._get_vm_device_status(device) # Update required property vm_settings = {} vm_settings['Oem'] = ( {'Hp': {'BootOnNextServerReset': boot_option_map[boot_option]}}) # perform the patch operation status, headers, response = self._rest_patch( vm_device_uri, None, vm_settings) if status >= 300: msg = self._get_extended_error(response) raise exception.IloError(msg) def insert_virtual_media(self, url, device='FLOPPY'): """Notifies iLO of the location of a virtual media diskette image. :param url: URL to image :param device: virual media device :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ # Validate url utils.validate_href(url) response, vm_device_uri = self._get_vm_device_status(device) # Eject media if there is one. RIBCL was tolerant enough to overwrite # existing media, RIS is not. This check is to take care of that # assumption. if response.get('Inserted', False): self.eject_virtual_media(device) # Update required property vm_settings = {} vm_settings['Image'] = url # Perform the patch operation status, headers, response = self._rest_patch( vm_device_uri, None, vm_settings) if status >= 300: msg = self._get_extended_error(response) raise exception.IloError(msg) def eject_virtual_media(self, device='FLOPPY'): """Ejects the Virtual Media image if one is inserted. :param device: virual media device :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ response, vm_device_uri = self._get_vm_device_status(device) # Check if virtual media is connected. if response.get('Inserted') is False: return # Update required property vm_settings = {} vm_settings['Image'] = None # perform the patch operation status, headers, response = self._rest_patch( vm_device_uri, None, vm_settings) if status >= 300: msg = self._get_extended_error(response) raise exception.IloError(msg) def _get_persistent_boot_devices(self): """Get details of persistent boot devices, its order :returns: List of dictionary of boot sources and list of boot device order :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ # Check if the BIOS resource if exists. headers_bios, bios_uri, bios_settings = self._check_bios_resource() # Get the Boot resource. boot_settings = self._get_bios_boot_resource(bios_settings) # Get the BootSources resource try: boot_sources = boot_settings['BootSources'] except KeyError: msg = ("BootSources resource not found.") raise exception.IloError(msg) try: boot_order = boot_settings['PersistentBootConfigOrder'] except KeyError: msg = ("PersistentBootConfigOrder resource not found.") raise exception.IloCommandNotSupportedError(msg) return boot_sources, boot_order def get_persistent_boot_device(self): """Get current persistent boot device set for the host :returns: persistent boot device for the system :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ system = self._get_host_details() try: # Return boot device if it is persistent. if system['Boot']['BootSourceOverrideEnabled'] == 'Continuous': device = system['Boot']['BootSourceOverrideTarget'] if device in DEVICE_RIS_TO_COMMON: return DEVICE_RIS_TO_COMMON[device] return device except KeyError as e: msg = "get_persistent_boot_device failed with the KeyError:%s" raise exception.IloError((msg) % e) # Check if we are in BIOS boot mode. # There is no resource to fetch boot device order for BIOS boot mode if not self._is_boot_mode_uefi(): return None # Get persistent boot device order for UEFI boot_sources, boot_devices = self._get_persistent_boot_devices() boot_string = "" try: for source in boot_sources: if (source["StructuredBootString"] == boot_devices[0]): boot_string = source["BootString"] break except KeyError as e: msg = "get_persistent_boot_device failed with the KeyError:%s" raise exception.IloError((msg) % e) if 'HP iLO Virtual USB CD' in boot_string: return 'CDROM' elif ('NIC' in boot_string or 'PXE' in boot_string or "iSCSI" in boot_string): return 'NETWORK' elif common.isDisk(boot_string): return 'HDD' else: return None def _update_persistent_boot(self, device_type=[], persistent=False): """Changes the persistent boot device order in BIOS boot mode for host Note: It uses first boot device from the device_type and ignores rest. :param device_type: ordered list of boot devices :param persistent: Boolean flag to indicate if the device to be set as a persistent boot device :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ tenure = 'Once' new_device = device_type[0] # If it is a standard device, we need to convert in RIS convention if device_type[0].upper() in DEVICE_COMMON_TO_RIS: new_device = DEVICE_COMMON_TO_RIS[device_type[0].upper()] if persistent: tenure = 'Continuous' systems_uri = "/rest/v1/Systems/1" # Need to set this option first if device is 'UefiTarget' if new_device == 'UefiTarget': system = self._get_host_details() uefi_devices = ( system['Boot']['UefiTargetBootSourceOverrideSupported']) iscsi_device = None for device in uefi_devices: if device is not None and 'iSCSI' in device: iscsi_device = device break if iscsi_device is None: msg = 'No UEFI iSCSI bootable device found' raise exception.IloError(msg) new_boot_settings = {} new_boot_settings['Boot'] = {'UefiTargetBootSourceOverride': iscsi_device} status, headers, response = self._rest_patch(systems_uri, None, new_boot_settings) if status >= 300: msg = self._get_extended_error(response) raise exception.IloError(msg) new_boot_settings = {} new_boot_settings['Boot'] = {'BootSourceOverrideEnabled': tenure, 'BootSourceOverrideTarget': new_device} status, headers, response = self._rest_patch(systems_uri, None, new_boot_settings) if status >= 300: msg = self._get_extended_error(response) raise exception.IloError(msg) def update_persistent_boot(self, device_type=[]): """Changes the persistent boot device order for the host :param device_type: ordered list of boot devices :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ # Check if the input is valid for item in device_type: if item.upper() not in DEVICE_COMMON_TO_RIS: raise exception.IloInvalidInputError("Invalid input. Valid " "devices: NETWORK, HDD," " ISCSI or CDROM.") self._update_persistent_boot(device_type, persistent=True) def set_one_time_boot(self, device): """Configures a single boot from a specific device. :param device: Device to be set as a one time boot device :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ self._update_persistent_boot([device], persistent=False) def get_one_time_boot(self): """Retrieves the current setting for the one time boot. :returns: Returns the first boot device that would be used in next boot. Returns 'Normal' is no device is set. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ system = self._get_host_details() try: if system['Boot']['BootSourceOverrideEnabled'] == 'Once': device = system['Boot']['BootSourceOverrideTarget'] if device in DEVICE_RIS_TO_COMMON: return DEVICE_RIS_TO_COMMON[device] return device else: # value returned by RIBCL if one-time boot setting are absent return 'Normal' except KeyError as e: msg = "get_one_time_boot failed with the KeyError:%s" raise exception.IloError((msg) % e) def _get_firmware_update_service_resource(self): """Gets the firmware update service uri. :returns: firmware update service uri :raises: IloError, on an error from iLO. :raises: IloConnectionError, if not able to reach iLO. :raises: IloCommandNotSupportedError, for not finding the uri """ manager, uri = self._get_ilo_details() try: fw_uri = manager['Oem']['Hp']['links']['UpdateService']['href'] except KeyError: msg = ("Firmware Update Service resource not found.") raise exception.IloCommandNotSupportedError(msg) return fw_uri @firmware_controller.check_firmware_update_component def update_firmware(self, file_url, component_type): """Updates the given firmware on the server for the given component. :param file_url: location of the raw firmware file. Extraction of the firmware file (if in compact format) is expected to happen prior to this invocation. :param component_type: Type of component to be applied to. :raises: InvalidInputError, if the validation of the input fails :raises: IloError, on an error from iLO :raises: IloConnectionError, if not able to reach iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server """ fw_update_uri = self._get_firmware_update_service_resource() action_data = { 'Action': 'InstallFromURI', 'FirmwareURI': file_url, } # perform the POST LOG.debug(self._('Flashing firmware file: %s ...'), file_url) status, headers, response = self._rest_post( fw_update_uri, None, action_data) if status != 200: msg = self._get_extended_error(response) raise exception.IloError(msg) # wait till the firmware update completes. common.wait_for_ris_firmware_update_to_complete(self) try: state, percent = self.get_firmware_update_progress() except exception.IloError: msg = 'Status of firmware update not known' LOG.debug(self._(msg)) # noqa return if state == "ERROR": msg = 'Unable to update firmware' LOG.debug(self._(msg)) # noqa raise exception.IloError(msg) elif state == "UNKNOWN": msg = 'Status of firmware update not known' LOG.debug(self._(msg)) # noqa else: # "COMPLETED" | "IDLE" LOG.info(self._('Flashing firmware file: %s ... done'), file_url) def get_firmware_update_progress(self): """Get the progress of the firmware update. :returns: firmware update state, one of the following values: "IDLE", "UPLOADING", "PROGRESSING", "COMPLETED", "ERROR". If the update resource is not found, then "UNKNOWN". :returns: firmware update progress percent :raises: IloError, on an error from iLO. :raises: IloConnectionError, if not able to reach iLO. """ try: fw_update_uri = self._get_firmware_update_service_resource() except exception.IloError as e: LOG.debug(self._('Progress of firmware update not known: %s'), str(e)) return "UNKNOWN", "UNKNOWN" # perform the GET status, headers, response = self._rest_get(fw_update_uri) if status != 200: msg = self._get_extended_error(response) raise exception.IloError(msg) fw_update_state = response.get('State') fw_update_progress_percent = response.get('ProgressPercent') LOG.debug(self._('Flashing firmware file ... in progress %d%%'), fw_update_progress_percent) return fw_update_state, fw_update_progress_percent def _get_number_of_gpu_devices_connected(self): """get the number of GPU devices connected.""" gpu_devices = self._get_gpu_pci_devices() gpu_devices_count = len(gpu_devices) return {'pci_gpu_devices': gpu_devices_count} def _get_tpm_capability(self): """Retrieves if server is TPM capable or not. :returns True if TPM is Present else False """ tpm_values = {"NotPresent": False, "PresentDisabled": True, "PresentEnabled": True} try: tpm_state = self._get_bios_setting('TpmState') except exception.IloCommandNotSupportedError: tpm_state = "NotPresent" tpm_result = tpm_values[tpm_state] return tpm_result def _get_cpu_virtualization(self): """get cpu virtualization status.""" try: cpu_vt = self._get_bios_setting('ProcVirtualization') except exception.IloCommandNotSupportedError: return False if cpu_vt == 'Enabled': vt_status = True else: vt_status = False return vt_status def _get_nvdimm_n_status(self): """Get status of NVDIMM_N. :returns: True if NVDIMM_N is present and enabled, False otherwise. """ try: nvdimm_n_status = self._get_bios_setting('NvDimmNMemFunctionality') if nvdimm_n_status == 'Enabled': nvn_status = True else: nvn_status = False except exception.IloCommandNotSupportedError: nvn_status = False return nvn_status def inject_nmi(self): """Inject NMI, Non Maskable Interrupt. Inject NMI (Non Maskable Interrupt) for a node immediately. :raises: IloError, on an error from iLO """ cur_status = self.get_host_power_status() if cur_status != 'ON': raise exception.IloError("Server is not in powered on state.") self._perform_power_op("Nmi") def get_host_post_state(self): """Get the current state of system POST. Retrieves current state of system POST. :returns: POST state of the server. The valida states are:- null, Unknown, Reset, PowerOff, InPost, InPostDiscoveryComplete and FinishedPost. :raises: IloError, on an error from iLO """ system = self._get_host_details() if 'PostState' in system['Oem']['Hp']: return system['Oem']['Hp']['PostState'] raise exception.IloError("Attribute 'Oem/Hp/PostState' " "not found on system.") def get_current_bios_settings(self, only_allowed_settings=False): """Get current BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictionary of current BIOS settings is returned. Depending on the 'only_allowed_settings', either only the allowed settings are returned or all the supported settings are returned. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ headers, bios_uri, bios_settings = self._check_bios_resource() # Remove the "links" section bios_settings.pop("links", None) if only_allowed_settings: return utils.apply_bios_properties_filter( bios_settings, constants.SUPPORTED_BIOS_PROPERTIES) return bios_settings def get_pending_bios_settings(self, only_allowed_settings=False): """Get current BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictionary of pending BIOS settings. Depending on the 'only_allowed_settings', either only the allowed settings are returned or all the supported settings are returned. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ headers, bios_uri, bios_settings = self._check_bios_resource() try: settings_config_uri = bios_settings['links']['Settings']['href'] except KeyError: msg = ("Settings resource not found. Couldn't get pending BIOS " "Settings.") raise exception.IloCommandNotSupportedError(msg) status, headers, config = self._rest_get(settings_config_uri) if status != 200: msg = self._get_extended_error(config) raise exception.IloError(msg) # Remove the "links" section config.pop("links", None) if only_allowed_settings: return utils.apply_bios_properties_filter( config, constants.SUPPORTED_BIOS_PROPERTIES) return config def set_bios_settings(self, data=None, only_allowed_settings=False): """Sets current BIOS settings to the provided data. :param: only_allowed_settings: True when only allowed BIOS settings are to be set. If False, all the BIOS settings supported by iLO and present in the 'data' are set. :param: data: a dictionary of BIOS settings to be applied. Depending on the 'only_allowed_settings', either only the allowed settings are set or all the supported settings that are in the 'data' are set. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ if not data: raise exception.IloError("Could not apply settings with" " empty data") if only_allowed_settings: unsupported_settings = [key for key in data if key not in ( constants.SUPPORTED_BIOS_PROPERTIES)] if unsupported_settings: msg = ("Could not apply settings as one or more settings are" " not supported. Unsupported settings are %s." " Supported settings are %s." % ( unsupported_settings, constants.SUPPORTED_BIOS_PROPERTIES)) raise exception.IloError(msg) self._change_bios_setting(data) def get_default_bios_settings(self, only_allowed_settings=False): """Get default BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictionary of default BIOS settings(factory settings). Depending on the 'only_allowed_settings', either only the allowed settings are returned or all the supported settings are returned. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ headers_bios, bios_uri, bios_settings = self._check_bios_resource() # Get the BaseConfig resource. try: base_config_uri = bios_settings['links']['BaseConfigs']['href'] except KeyError: msg = ("BaseConfigs resource not found. Couldn't apply the BIOS " "Settings.") raise exception.IloCommandNotSupportedError(msg) status, headers, config = self._rest_get(base_config_uri) if status != 200: msg = self._get_extended_error(config) raise exception.IloError(msg) for cfg in config['BaseConfigs']: default_settings = cfg.get('default') if default_settings: break else: msg = ("Default BIOS Settings not found in 'BaseConfigs' " "resource.") raise exception.IloCommandNotSupportedError(msg) if only_allowed_settings: return utils.apply_bios_properties_filter( default_settings, constants.SUPPORTED_BIOS_PROPERTIES) return default_settings def _raise_command_not_supported(self, method): platform = self.get_product_name() msg = ("`%(method)s` is not supported on %(platform)s" % {'method': method, 'platform': platform}) raise (exception.IloCommandNotSupportedError(msg)) def read_raid_configuration(self, raid_config=None): """Read the logical drives from the system Read raid configuration of the hardware. :param raid_config: None in case of post-delete read or in case of post-create a dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100, 'physical_disks': ['6I:1:5'], 'controller': 'HPE Smart Array P408i-a SR Gen10'}, ]} :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ self._raise_command_not_supported("read_raid_configuration") def delete_raid_configuration(self): """Delete the raid configuration on the hardware. Loops through each SmartStorageConfig controller and clears the raid configuration. :raises: IloCommandNotSupportedError """ self._raise_command_not_supported("delete_raid_configuration") def create_raid_configuration(self, raid_config): """Create the raid configuration on the hardware. Based on user raid_config input, it will create raid :param raid_config: A dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100, 'physical_disks': ['6I:1:5'], 'controller': 'HPE Smart Array P408i-a SR Gen10'}, ]} :raises: IloCommandNotSupportedError """ self._raise_command_not_supported("create_raid_configuration") def get_bios_settings_result(self): """Gets the result of the bios settings applied :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ headers, bios_uri, bios_settings = self._check_bios_resource() settings_result = bios_settings.get("SettingsResult").get("Messages") status = "failed" if len(settings_result) > 1 else "success" return {"status": status, "results": settings_result} def create_csr(self, path, csr_params): """Creates the Certificate Signing Request. :param path: directory to store csr file. :param csr_params: A dictionary containing all the necessary information required to create CSR. :raises: IloError, on an error from iLO. """ self._raise_command_not_supported("create_csr") def add_https_certificate(self, cert_file): """Adds the signed https certificate to the iLO. :param cert_file: Signed HTTPS certificate file. :raises: IloError, on an error from iLO. """ self._raise_command_not_supported("add_https_certificate") ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2306645 proliantutils-2.16.0/proliantutils/ilo/snmp/0000775000175000017500000000000000000000000021205 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/snmp/__init__.py0000664000175000017500000000000000000000000023304 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2346644 proliantutils-2.16.0/proliantutils/ilo/snmp/cpqdisk_mibs/0000775000175000017500000000000000000000000023655 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/snmp/cpqdisk_mibs/CPQHOST-MIB.py0000664000175000017500000011502400000000000025760 0ustar00zuulzuul00000000000000# # PySNMP MIB module CPQHOST-MIB (http://pysnmp.sf.net) # ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") ( NotificationGroup, ModuleCompliance, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") ( sysName, ) = mibBuilder.importSymbols("SNMPv2-MIB", "sysName") ( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, IpAddress, TimeTicks, Counter64, Unsigned32, enterprises, iso, Gauge32, NotificationType, ModuleIdentity, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "enterprises", "iso", "Gauge32", "NotificationType", "ModuleIdentity", "ObjectIdentity", "Bits", "Counter32") ( DisplayString, TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") compaq = MibIdentifier((1, 3, 6, 1, 4, 1, 232)) cpqHostOs = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11)) cpqHoMibRev = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 1)) cpqHoComponent = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2)) cpqHoInterface = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 1)) cpqHoInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 2)) cpqHoUtil = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 3)) cpqHoFileSys = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 4)) cpqHoIfPhysMap = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 5)) cpqHoSWRunning = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 6)) cpqHoSwVer = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 7)) cpqHoGeneric = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 8)) cpqHoSwPerf = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 9)) cpqHoSystemStatus = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 10)) cpqHoTrapInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 11)) cpqHoClients = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 12)) cpqHoMemory = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 13)) cpqHoFwVer = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 14)) cpqHoHWInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 15)) cpqPwrThreshold = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 16)) cpqHoOsCommon = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 11, 2, 1, 4)) cpqHoMibRevMajor = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1,65535))).setMaxAccess("readonly") cpqHoMibRevMinor = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqHoMibCondition = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("unknown", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqHoOsCommonPollFreq = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 1, 4, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite") cpqHoOsCommonModuleTable = MibTable((1, 3, 6, 1, 4, 1, 232, 11, 2, 1, 4, 2), ) cpqHoOsCommonModuleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 11, 2, 1, 4, 2, 1), ).setIndexNames((0, "CPQHOST-MIB", "cpqHoOsCommonModuleIndex")) cpqHoOsCommonModuleIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 1, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqHoOsCommonModuleName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 1, 4, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoOsCommonModuleVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 1, 4, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,5))).setMaxAccess("readonly") cpqHoOsCommonModuleDate = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 1, 4, 2, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(7,7)).setFixedLength(7)).setMaxAccess("readonly") cpqHoOsCommonModulePurpose = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 1, 4, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoName = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 2, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoVersion = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 2, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoDesc = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 2, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoOsType = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 2, 4), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,)).clone(namedValues=NamedValues(("other", 1), ("netware", 2), ("windowsnt", 3), ("sco-unix", 4), ("unixware", 5), ("os-2", 6), ("ms-dos", 7), ("dos-windows", 8), ("windows95", 9), ("windows98", 10), ("open-vms", 11), ("nsk", 12), ("windowsCE", 13), ("linux", 14), ("windows2000", 15), ("tru64UNIX", 16), ("windows2003", 17), ("windows2003-x64", 18), ("solaris", 19), ("windows2003-ia64", 20), ("windows2008", 21), ("windows2008-x64", 22), ("windows2008-ia64", 23), ("vmware-esx", 24), ("vmware-esxi", 25), ("windows2012", 26), ("windows7", 27), ("windows7-x64", 28), ("windows8", 29), ("windows8-x64", 30), ("windows81", 31), ("windows81-x64", 32), ("windowsxp", 33), ("windowsxp-x64", 34), ("windowsvista", 35), ("windowsvista-x64", 36), ("windows2008-r2", 37), ("windows2012-r2", 38), ("rhel", 39), ("rhel-64", 40), ("solaris-64", 41), ("sles", 42), ("sles-64", 43), ("ubuntu", 44), ("ubuntu-64", 45), ("debian", 46), ("debian-64", 47), ("linux-64-bit", 48), ("other-64-bit", 49), ("centos-32bit", 50), ("centos-64bit", 51), ("oracle-linux32", 52), ("oracle-linux64", 53), ("apple-osx", 54),))).setMaxAccess("readonly") cpqHoTelnet = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 2, 5), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("available", 2), ("notavailable", 3),))).setMaxAccess("readonly") cpqHoSystemRole = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 2, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,64))).setMaxAccess("readwrite") cpqHoSystemRoleDetail = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 2, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,512))).setMaxAccess("readwrite") cpqHoCrashDumpState = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 2, 8), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("completememorydump", 1), ("kernelmemorydump", 2), ("smallmemorydump", 3), ("none", 4),))).setMaxAccess("readonly") cpqHoCrashDumpCondition = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 2, 9), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqHoCrashDumpMonitoring = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 2, 10), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2,)).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2),))).setMaxAccess("readwrite") cpqHoMaxLogicalCPUSupported = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 2, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqHoSystemName = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 2, 12), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHosysDescr = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 2, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoCpuUtilTable = MibTable((1, 3, 6, 1, 4, 1, 232, 11, 2, 3, 1), ) cpqHoCpuUtilEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 11, 2, 3, 1, 1), ).setIndexNames((0, "CPQHOST-MIB", "cpqHoCpuUtilUnitIndex")) cpqHoCpuUtilUnitIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqHoCpuUtilMin = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 3, 1, 1, 2), Integer32()).setMaxAccess("readonly") cpqHoCpuUtilFiveMin = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 3, 1, 1, 3), Integer32()).setMaxAccess("readonly") cpqHoCpuUtilThirtyMin = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 3, 1, 1, 4), Integer32()).setMaxAccess("readonly") cpqHoCpuUtilHour = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 3, 1, 1, 5), Integer32()).setMaxAccess("readonly") cpqHoCpuUtilHwLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 3, 1, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoFileSysTable = MibTable((1, 3, 6, 1, 4, 1, 232, 11, 2, 4, 1), ) cpqHoFileSysEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 11, 2, 4, 1, 1), ).setIndexNames((0, "CPQHOST-MIB", "cpqHoFileSysIndex")) cpqHoFileSysIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqHoFileSysDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 4, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoFileSysSpaceTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 4, 1, 1, 3), Integer32()).setMaxAccess("readonly") cpqHoFileSysSpaceUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 4, 1, 1, 4), Integer32()).setMaxAccess("readonly") cpqHoFileSysPercentSpaceUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 4, 1, 1, 5), Integer32()).setMaxAccess("readonly") cpqHoFileSysAllocUnitsTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 4, 1, 1, 6), Integer32()).setMaxAccess("readonly") cpqHoFileSysAllocUnitsUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 4, 1, 1, 7), Integer32()).setMaxAccess("readonly") cpqHoFileSysStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 4, 1, 1, 8), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("unknown", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqHoFileSysShortDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 4, 1, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoFileSysCondition = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 4, 2), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("unknown", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqHoIfPhysMapTable = MibTable((1, 3, 6, 1, 4, 1, 232, 11, 2, 5, 1), ) cpqHoIfPhysMapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 11, 2, 5, 1, 1), ).setIndexNames((0, "CPQHOST-MIB", "cpqHoIfPhysMapIndex")) cpqHoIfPhysMapIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 5, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqHoIfPhysMapSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 5, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqHoIfPhysMapIoBaseAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 5, 1, 1, 3), Integer32()).setMaxAccess("readonly") cpqHoIfPhysMapIrq = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 5, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqHoIfPhysMapDma = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 5, 1, 1, 5), Integer32()).setMaxAccess("readonly") cpqHoIfPhysMapMemBaseAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 5, 1, 1, 6), Integer32()).setMaxAccess("readonly") cpqHoIfPhysMapPort = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 5, 1, 1, 7), Integer32()).setMaxAccess("readonly") cpqHoIfPhysMapDuplexState = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 5, 1, 1, 8), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("half", 2), ("full", 3),))).setMaxAccess("readonly") cpqHoIfPhysMapCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 5, 1, 1, 9), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqHoIfPhysMapOverallCondition = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 5, 2), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqHoSWRunningTable = MibTable((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1), ) cpqHoSWRunningEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1), ).setIndexNames((0, "CPQHOST-MIB", "cpqHoSWRunningIndex")) cpqHoSWRunningIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqHoSWRunningName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoSWRunningDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoSWRunningVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoSWRunningDate = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(7,7)).setFixedLength(7)).setMaxAccess("readonly") cpqHoSWRunningMonitor = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1, 6), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8,)).clone(namedValues=NamedValues(("other", 1), ("start", 2), ("stop", 3), ("startAndStop", 4), ("count", 5), ("startAndCount", 6), ("countAndStop", 7), ("startCountAndStop", 8),))).setMaxAccess("readonly") cpqHoSWRunningState = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1, 7), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("started", 2), ("stopped", 3),))).setMaxAccess("readonly") cpqHoSWRunningCount = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqHoSWRunningCountMin = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite") cpqHoSWRunningCountMax = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite") cpqHoSWRunningEventTime = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1, 11), OctetString().subtype(subtypeSpec=ValueSizeConstraint(7,7)).setFixedLength(7)).setMaxAccess("readonly") cpqHoSWRunningStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1, 12), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7,)).clone(namedValues=NamedValues(("unknown", 1), ("normal", 2), ("warning", 3), ("minor", 4), ("major", 5), ("critical", 6), ("disabled", 7),))).setMaxAccess("readonly") cpqHoSWRunningConfigStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1, 13), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("unknown", 1), ("starting", 2), ("initialized", 3), ("configured", 4), ("operational", 5),))).setMaxAccess("readonly") cpqHoSWRunningIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1, 14), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoSWRunningRedundancyMode = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 1, 1, 15), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("unknown", 1), ("master", 2), ("backup", 3), ("slave", 4),))).setMaxAccess("readonly") cpqHoSwRunningTrapDesc = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 6, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoSwVerNextIndex = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 7, 1), Integer32()).setMaxAccess("readonly") cpqHoSwVerTable = MibTable((1, 3, 6, 1, 4, 1, 232, 11, 2, 7, 2), ) cpqHoSwVerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 11, 2, 7, 2, 1), ).setIndexNames((0, "CPQHOST-MIB", "cpqHoSwVerIndex")) cpqHoSwVerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 7, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqHoSwVerStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 7, 2, 1, 2), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("loaded", 2), ("notloaded", 3),))).setMaxAccess("readonly") cpqHoSwVerType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 7, 2, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6,)).clone(namedValues=NamedValues(("other", 1), ("driver", 2), ("agent", 3), ("sysutil", 4), ("application", 5), ("keyfile", 6),))).setMaxAccess("readwrite") cpqHoSwVerName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 7, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,127))).setMaxAccess("readwrite") cpqHoSwVerDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 7, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,127))).setMaxAccess("readwrite") cpqHoSwVerDate = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 7, 2, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(7,7)).setFixedLength(7)).setMaxAccess("readonly") cpqHoSwVerLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 7, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readwrite") cpqHoSwVerVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 7, 2, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,50))).setMaxAccess("readonly") cpqHoSwVerVersionBinary = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 7, 2, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,50))).setMaxAccess("readonly") cpqHoSwVerAgentsVer = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 7, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,50))).setMaxAccess("readonly") cpqHoGenericData = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 8, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,254))).setMaxAccess("readwrite") cpqHoCriticalSoftwareUpdateData = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 8, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,512))).setMaxAccess("readwrite") cpqHoSwPerfAppErrorDesc = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 9, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,254))).setMaxAccess("readonly") cpqHoMibStatusArray = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 10, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4,256))).setMaxAccess("readonly") cpqHoConfigChangedDate = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 10, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(7,7)).setFixedLength(7)).setMaxAccess("readonly") cpqHoGUID = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 10, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(16,17))).setMaxAccess("readwrite") cpqHoCodeServer = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 10, 4), Integer32()).setMaxAccess("readonly") cpqHoWebMgmtPort = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 10, 5), Integer32()).setMaxAccess("readonly") cpqHoGUIDCanonical = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 10, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(32,36))).setMaxAccess("readwrite") cpqHoMibHealthStatusArray = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 10, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1,256))).setMaxAccess("readonly") cpqHoTrapFlags = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 11, 1), Integer32()).setMaxAccess("readonly") cpqHoClientLastModified = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 12, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(7,7)).setFixedLength(7)).setMaxAccess("readonly") cpqHoClientDelete = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 12, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,15))).setMaxAccess("readwrite") cpqHoClientTable = MibTable((1, 3, 6, 1, 4, 1, 232, 11, 2, 12, 3), ) cpqHoClientEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 11, 2, 12, 3, 1), ).setIndexNames((0, "CPQHOST-MIB", "cpqHoClientIndex")) cpqHoClientIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 12, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqHoClientName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 12, 3, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,15))).setMaxAccess("readonly") cpqHoClientIpxAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 12, 3, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(20,20)).setFixedLength(20)).setMaxAccess("readonly") cpqHoClientIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 12, 3, 1, 4), IpAddress()).setMaxAccess("readonly") cpqHoClientCommunity = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 12, 3, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,48))).setMaxAccess("readonly") cpqHoClientID = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 12, 3, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(16,16)).setFixedLength(16)).setMaxAccess("readonly") cpqHoPhysicalMemorySize = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 13, 1), Integer32()).setMaxAccess("readonly") cpqHoPhysicalMemoryFree = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 13, 2), Integer32()).setMaxAccess("readonly") cpqHoPagingMemorySize = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 13, 3), Integer32()).setMaxAccess("readonly") cpqHoPagingMemoryFree = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 13, 4), Integer32()).setMaxAccess("readonly") cpqHoBootPagingFileSize = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 13, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,10))).setMaxAccess("readonly") cpqHoBootPagingFileMinimumSize = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 13, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,10))).setMaxAccess("readonly") cpqHoBootPagingFileVolumeFreeSpace = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 13, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,10))).setMaxAccess("readonly") cpqHoFwVerTable = MibTable((1, 3, 6, 1, 4, 1, 232, 11, 2, 14, 1), ) cpqHoFwVerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 11, 2, 14, 1, 1), ).setIndexNames((0, "CPQHOST-MIB", "cpqHoFwVerIndex")) cpqHoFwVerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 14, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqHoFwVerCategory = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 14, 1, 1, 2), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("storage", 2), ("nic", 3), ("rib", 4), ("system", 5),))).setMaxAccess("readonly") cpqHoFwVerDeviceType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 14, 1, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,)).clone(namedValues=NamedValues(("other", 1), ("internalArrayController", 2), ("fibreArrayController", 3), ("scsiController", 4), ("fibreChannelTapeController", 5), ("modularDataRouter", 6), ("ideCdRomDrive", 7), ("ideDiskDrive", 8), ("scsiCdRom-ScsiAttached", 9), ("scsiDiskDrive-ScsiAttached", 10), ("scsiTapeDrive-ScsiAttached", 11), ("scsiTapeLibrary-ScsiAttached", 12), ("scsiDiskDrive-ArrayAttached", 13), ("scsiTapeDrive-ArrayAttached", 14), ("scsiTapeLibrary-ArrayAttached", 15), ("scsiDiskDrive-FibreAttached", 16), ("scsiTapeDrive-FibreAttached", 17), ("scsiTapeLibrary-FibreAttached", 18), ("scsiEnclosureBackplaneRom-ScsiAttached", 19), ("scsiEnclosureBackplaneRom-ArrayAttached", 20), ("scsiEnclosureBackplaneRom-FibreAttached", 21), ("scsiEnclosureBackplaneRom-ra4x00", 22), ("systemRom", 23), ("networkInterfaceController", 24), ("remoteInsightBoard", 25), ("sasDiskDrive-SasAttached", 26), ("sataDiskDrive-SataAttached", 27), ("usbController", 28), ("sasControllerAdapter", 29), ("sataControllerAdapter", 30), ("systemDevice", 31),))).setMaxAccess("readonly") cpqHoFwVerDisplayName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 14, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,127))).setMaxAccess("readonly") cpqHoFwVerVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 14, 1, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,31))).setMaxAccess("readonly") cpqHoFwVerLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 14, 1, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoFwVerXmlString = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 14, 1, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqHoFwVerKeyString = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 14, 1, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,127))).setMaxAccess("readonly") cpqHoFwVerUpdateMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 11, 2, 14, 1, 1, 9), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("noUpdate", 2), ("softwareflash", 3), ("replacePhysicalRom", 4),))).setMaxAccess("readonly") cpqHoHWInfoPlatform = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 15, 1), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("unknown", 1), ("cellular", 2), ("foundation", 3), ("virtualMachine", 4), ("serverBlade", 5),))).setMaxAccess("readonly") cpqPwrWarnType = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 16, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,254))).setMaxAccess("readwrite") cpqPwrWarnThreshold = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 16, 2), Integer32()).setMaxAccess("readwrite") cpqPwrWarnDuration = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 16, 3), Integer32()).setMaxAccess("readwrite") cpqSerialNum = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 16, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,254))).setMaxAccess("readwrite") cpqServerUUID = MibScalar((1, 3, 6, 1, 4, 1, 232, 11, 2, 16, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,254))).setMaxAccess("readwrite") cpqHoGenericTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11001)).setObjects(*(("CPQHOST-MIB", "cpqHoGenericData"),)) cpqHoAppErrorTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11002)).setObjects(*(("CPQHOST-MIB", "cpqHoSwPerfAppErrorDesc"),)) cpqHo2GenericTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11003)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoGenericData"),)) cpqHo2AppErrorTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11004)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoSwPerfAppErrorDesc"),)) cpqHo2NicStatusOk = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11005)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoIfPhysMapSlot"),)) cpqHo2NicStatusFailed = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11006)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoIfPhysMapSlot"),)) cpqHo2NicSwitchoverOccurred = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11007)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoIfPhysMapSlot"), ("CPQHOST-MIB", "cpqHoIfPhysMapSlot"),)) cpqHo2NicStatusOk2 = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11008)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoIfPhysMapSlot"), ("CPQHOST-MIB", "cpqHoIfPhysMapPort"),)) cpqHo2NicStatusFailed2 = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11009)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoIfPhysMapSlot"), ("CPQHOST-MIB", "cpqHoIfPhysMapPort"),)) cpqHo2NicSwitchoverOccurred2 = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11010)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoIfPhysMapSlot"), ("CPQHOST-MIB", "cpqHoIfPhysMapPort"), ("CPQHOST-MIB", "cpqHoIfPhysMapSlot"), ("CPQHOST-MIB", "cpqHoIfPhysMapPort"),)) cpqHoProcessEventTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11011)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoSwRunningTrapDesc"),)) cpqHoProcessCountWarning = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11012)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoSWRunningName"), ("CPQHOST-MIB", "cpqHoSWRunningCount"), ("CPQHOST-MIB", "cpqHoSWRunningCountMin"), ("CPQHOST-MIB", "cpqHoSWRunningCountMax"), ("CPQHOST-MIB", "cpqHoSWRunningEventTime"),)) cpqHoProcessCountNormal = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11013)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoSWRunningName"), ("CPQHOST-MIB", "cpqHoSWRunningCount"), ("CPQHOST-MIB", "cpqHoSWRunningCountMin"), ("CPQHOST-MIB", "cpqHoSWRunningCountMax"), ("CPQHOST-MIB", "cpqHoSWRunningEventTime"),)) cpqHoCriticalSoftwareUpdateTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11014)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoCriticalSoftwareUpdateData"),)) cpqHoCrashDumpNotEnabledTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11015)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoCrashDumpState"),)) cpqHoBootPagingFileTooSmallTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11016)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoCrashDumpState"), ("CPQHOST-MIB", "cpqHoBootPagingFileSize"), ("CPQHOST-MIB", "cpqHoBootPagingFileMinimumSize"),)) cpqHoSWRunningStatusChangeTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11017)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoSWRunningName"), ("CPQHOST-MIB", "cpqHoSWRunningDesc"), ("CPQHOST-MIB", "cpqHoSwRunningTrapDesc"), ("CPQHOST-MIB", "cpqHoSWRunningVersion"), ("CPQHOST-MIB", "cpqHoSWRunningStatus"), ("CPQHOST-MIB", "cpqHoSWRunningConfigStatus"), ("CPQHOST-MIB", "cpqHoSWRunningIdentifier"), ("CPQHOST-MIB", "cpqHoSWRunningRedundancyMode"),)) cpqHo2PowerThresholdTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11018)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqPwrWarnType"), ("CPQHOST-MIB", "cpqPwrWarnThreshold"), ("CPQHOST-MIB", "cpqPwrWarnDuration"), ("CPQHOST-MIB", "cpqSerialNum"), ("CPQHOST-MIB", "cpqServerUUID"),)) cpqHoBootPagingFileOrFreeSpaceTooSmallTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11019)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoCrashDumpState"), ("CPQHOST-MIB", "cpqHoBootPagingFileSize"), ("CPQHOST-MIB", "cpqHoBootPagingFileVolumeFreeSpace"), ("CPQHOST-MIB", "cpqHoBootPagingFileMinimumSize"),)) cpqHoMibHealthStatusArrayChangeTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,11020)).setObjects(*(("CPQHOST-MIB", "sysName"), ("CPQHOST-MIB", "cpqHoTrapFlags"), ("CPQHOST-MIB", "cpqHoMibHealthStatusArray"),)) mibBuilder.exportSymbols("CPQHOST-MIB", cpqHoUtil=cpqHoUtil, cpqHoFileSysTable=cpqHoFileSysTable, cpqHoFileSysDesc=cpqHoFileSysDesc, cpqHoFileSys=cpqHoFileSys, cpqHoClientIndex=cpqHoClientIndex, cpqHoOsCommonModuleDate=cpqHoOsCommonModuleDate, cpqHoProcessCountWarning=cpqHoProcessCountWarning, cpqHoAppErrorTrap=cpqHoAppErrorTrap, cpqHoCodeServer=cpqHoCodeServer, cpqHoMibRevMinor=cpqHoMibRevMinor, cpqHoTelnet=cpqHoTelnet, cpqHo2NicStatusFailed=cpqHo2NicStatusFailed, cpqHoIfPhysMapPort=cpqHoIfPhysMapPort, cpqHoMibHealthStatusArrayChangeTrap=cpqHoMibHealthStatusArrayChangeTrap, cpqHoFwVerXmlString=cpqHoFwVerXmlString, cpqHoSwVer=cpqHoSwVer, cpqHoPhysicalMemoryFree=cpqHoPhysicalMemoryFree, cpqHoInfo=cpqHoInfo, cpqHoCrashDumpCondition=cpqHoCrashDumpCondition, cpqHoOsCommonModulePurpose=cpqHoOsCommonModulePurpose, cpqHoSwPerfAppErrorDesc=cpqHoSwPerfAppErrorDesc, cpqHoComponent=cpqHoComponent, cpqHoSWRunningTable=cpqHoSWRunningTable, cpqHoGeneric=cpqHoGeneric, cpqHoSWRunningEventTime=cpqHoSWRunningEventTime, cpqHoSWRunningCount=cpqHoSWRunningCount, cpqHoSWRunningRedundancyMode=cpqHoSWRunningRedundancyMode, cpqHoSwVerDate=cpqHoSwVerDate, cpqHoTrapFlags=cpqHoTrapFlags, cpqHosysDescr=cpqHosysDescr, cpqHoCrashDumpMonitoring=cpqHoCrashDumpMonitoring, cpqPwrThreshold=cpqPwrThreshold, cpqHoOsCommonModuleIndex=cpqHoOsCommonModuleIndex, cpqHoCpuUtilHwLocation=cpqHoCpuUtilHwLocation, cpqHoIfPhysMapMemBaseAddr=cpqHoIfPhysMapMemBaseAddr, cpqSerialNum=cpqSerialNum, cpqHoSWRunningStatus=cpqHoSWRunningStatus, cpqHoSwVerVersionBinary=cpqHoSwVerVersionBinary, cpqHoOsCommonModuleVersion=cpqHoOsCommonModuleVersion, cpqHoMemory=cpqHoMemory, cpqHoBootPagingFileOrFreeSpaceTooSmallTrap=cpqHoBootPagingFileOrFreeSpaceTooSmallTrap, cpqHoBootPagingFileVolumeFreeSpace=cpqHoBootPagingFileVolumeFreeSpace, cpqHo2PowerThresholdTrap=cpqHo2PowerThresholdTrap, cpqHoFileSysAllocUnitsUsed=cpqHoFileSysAllocUnitsUsed, cpqHoSWRunning=cpqHoSWRunning, cpqHoSWRunningName=cpqHoSWRunningName, cpqHoOsCommonModuleName=cpqHoOsCommonModuleName, cpqHoSWRunningIdentifier=cpqHoSWRunningIdentifier, cpqHoPhysicalMemorySize=cpqHoPhysicalMemorySize, cpqHoCpuUtilUnitIndex=cpqHoCpuUtilUnitIndex, cpqHoMibRev=cpqHoMibRev, cpqHoFileSysPercentSpaceUsed=cpqHoFileSysPercentSpaceUsed, cpqHoCrashDumpNotEnabledTrap=cpqHoCrashDumpNotEnabledTrap, cpqHoCpuUtilFiveMin=cpqHoCpuUtilFiveMin, cpqHoIfPhysMapTable=cpqHoIfPhysMapTable, cpqHoMibHealthStatusArray=cpqHoMibHealthStatusArray, cpqHoSwVerDescription=cpqHoSwVerDescription, cpqHoSystemRoleDetail=cpqHoSystemRoleDetail, cpqHoFileSysSpaceTotal=cpqHoFileSysSpaceTotal, cpqPwrWarnDuration=cpqPwrWarnDuration, cpqHoSwVerType=cpqHoSwVerType, cpqHoIfPhysMapDuplexState=cpqHoIfPhysMapDuplexState, cpqHoFwVerCategory=cpqHoFwVerCategory, cpqHoIfPhysMapDma=cpqHoIfPhysMapDma, cpqHoGenericTrap=cpqHoGenericTrap, cpqHoSWRunningEntry=cpqHoSWRunningEntry, cpqHoHWInfo=cpqHoHWInfo, cpqHoClientCommunity=cpqHoClientCommunity, cpqHoSystemStatus=cpqHoSystemStatus, cpqHoInterface=cpqHoInterface, cpqHo2NicStatusOk2=cpqHo2NicStatusOk2, cpqHoClientDelete=cpqHoClientDelete, cpqHoSWRunningStatusChangeTrap=cpqHoSWRunningStatusChangeTrap, cpqHoVersion=cpqHoVersion, cpqHoIfPhysMapCondition=cpqHoIfPhysMapCondition, cpqHoConfigChangedDate=cpqHoConfigChangedDate, cpqHo2NicSwitchoverOccurred=cpqHo2NicSwitchoverOccurred, cpqHoFwVerDeviceType=cpqHoFwVerDeviceType, cpqHoFwVerKeyString=cpqHoFwVerKeyString, cpqHoProcessCountNormal=cpqHoProcessCountNormal, cpqHoIfPhysMapOverallCondition=cpqHoIfPhysMapOverallCondition, cpqHoClientName=cpqHoClientName, cpqHoClientTable=cpqHoClientTable, cpqHoMaxLogicalCPUSupported=cpqHoMaxLogicalCPUSupported, cpqHoClientLastModified=cpqHoClientLastModified, cpqHoFwVerLocation=cpqHoFwVerLocation, cpqHoMibCondition=cpqHoMibCondition, cpqHoClientEntry=cpqHoClientEntry, cpqHo2GenericTrap=cpqHo2GenericTrap, cpqHoCpuUtilHour=cpqHoCpuUtilHour, cpqHostOs=cpqHostOs, cpqHoCriticalSoftwareUpdateData=cpqHoCriticalSoftwareUpdateData, cpqServerUUID=cpqServerUUID, cpqHoIfPhysMapIrq=cpqHoIfPhysMapIrq, cpqHoSystemName=cpqHoSystemName, cpqHoClientIpAddress=cpqHoClientIpAddress, cpqPwrWarnThreshold=cpqPwrWarnThreshold, cpqHoSystemRole=cpqHoSystemRole, cpqHoHWInfoPlatform=cpqHoHWInfoPlatform, cpqHo2NicStatusOk=cpqHo2NicStatusOk, cpqHoIfPhysMapSlot=cpqHoIfPhysMapSlot, cpqHoTrapInfo=cpqHoTrapInfo, cpqHoFileSysShortDesc=cpqHoFileSysShortDesc, cpqHoCpuUtilTable=cpqHoCpuUtilTable, cpqHoOsCommon=cpqHoOsCommon, cpqHoIfPhysMapIndex=cpqHoIfPhysMapIndex, cpqHoPagingMemorySize=cpqHoPagingMemorySize, cpqHoBootPagingFileSize=cpqHoBootPagingFileSize, cpqHoFileSysEntry=cpqHoFileSysEntry, cpqHoOsType=cpqHoOsType, cpqHoClientIpxAddress=cpqHoClientIpxAddress, cpqHoSwVerEntry=cpqHoSwVerEntry, cpqHoMibRevMajor=cpqHoMibRevMajor, cpqHoOsCommonModuleEntry=cpqHoOsCommonModuleEntry, cpqHoPagingMemoryFree=cpqHoPagingMemoryFree, cpqHoCpuUtilMin=cpqHoCpuUtilMin, cpqHoFwVerTable=cpqHoFwVerTable, cpqHoSWRunningIndex=cpqHoSWRunningIndex, cpqHoMibStatusArray=cpqHoMibStatusArray, cpqHoSwVerNextIndex=cpqHoSwVerNextIndex, cpqHo2AppErrorTrap=cpqHo2AppErrorTrap, cpqHoOsCommonModuleTable=cpqHoOsCommonModuleTable, cpqHoSWRunningState=cpqHoSWRunningState, cpqHoGUIDCanonical=cpqHoGUIDCanonical, cpqHoProcessEventTrap=cpqHoProcessEventTrap, cpqHoSwVerTable=cpqHoSwVerTable, cpqHoSWRunningDesc=cpqHoSWRunningDesc, cpqHoIfPhysMapIoBaseAddr=cpqHoIfPhysMapIoBaseAddr, cpqHoSwVerAgentsVer=cpqHoSwVerAgentsVer, cpqHoSWRunningCountMin=cpqHoSWRunningCountMin, cpqHoOsCommonPollFreq=cpqHoOsCommonPollFreq, cpqHoFileSysCondition=cpqHoFileSysCondition, cpqHoCpuUtilEntry=cpqHoCpuUtilEntry, cpqHoSWRunningMonitor=cpqHoSWRunningMonitor, cpqHoGenericData=cpqHoGenericData, cpqHoSWRunningVersion=cpqHoSWRunningVersion, cpqHoFwVerEntry=cpqHoFwVerEntry, cpqHoSwVerName=cpqHoSwVerName, cpqHoFwVerIndex=cpqHoFwVerIndex, cpqHoClientID=cpqHoClientID, cpqHoSwVerLocation=cpqHoSwVerLocation, cpqHoBootPagingFileMinimumSize=cpqHoBootPagingFileMinimumSize, cpqHoFwVerUpdateMethod=cpqHoFwVerUpdateMethod, cpqHoSWRunningCountMax=cpqHoSWRunningCountMax, cpqHoSwVerIndex=cpqHoSwVerIndex, cpqHoDesc=cpqHoDesc, cpqHoFileSysIndex=cpqHoFileSysIndex, cpqHoGUID=cpqHoGUID, cpqHo2NicSwitchoverOccurred2=cpqHo2NicSwitchoverOccurred2, cpqHoSwVerStatus=cpqHoSwVerStatus, cpqHoFileSysStatus=cpqHoFileSysStatus, cpqHoSwPerf=cpqHoSwPerf, cpqHoFwVerVersion=cpqHoFwVerVersion, cpqHoFwVer=cpqHoFwVer, cpqHoCrashDumpState=cpqHoCrashDumpState, cpqHoCriticalSoftwareUpdateTrap=cpqHoCriticalSoftwareUpdateTrap, cpqHoIfPhysMapEntry=cpqHoIfPhysMapEntry, cpqHo2NicStatusFailed2=cpqHo2NicStatusFailed2, cpqHoCpuUtilThirtyMin=cpqHoCpuUtilThirtyMin, cpqHoFileSysSpaceUsed=cpqHoFileSysSpaceUsed, compaq=compaq, cpqHoWebMgmtPort=cpqHoWebMgmtPort, cpqHoSWRunningConfigStatus=cpqHoSWRunningConfigStatus, cpqHoSwVerVersion=cpqHoSwVerVersion, cpqHoName=cpqHoName, cpqHoFwVerDisplayName=cpqHoFwVerDisplayName, cpqHoSWRunningDate=cpqHoSWRunningDate, cpqPwrWarnType=cpqPwrWarnType, cpqHoIfPhysMap=cpqHoIfPhysMap, cpqHoBootPagingFileTooSmallTrap=cpqHoBootPagingFileTooSmallTrap, cpqHoClients=cpqHoClients, cpqHoFileSysAllocUnitsTotal=cpqHoFileSysAllocUnitsTotal, cpqHoSwRunningTrapDesc=cpqHoSwRunningTrapDesc) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/snmp/cpqdisk_mibs/CPQIDA-MIB.py0000664000175000017500000037073500000000000025614 0ustar00zuulzuul00000000000000# # PySNMP MIB module CPQIDA-MIB (http://pysnmp.sf.net) # ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") ( compaq, cpqHoTrapFlags, ) = mibBuilder.importSymbols("CPQHOST-MIB", "compaq", "cpqHoTrapFlags") ( NotificationGroup, ModuleCompliance, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") ( sysName, ) = mibBuilder.importSymbols("SNMPv2-MIB", "sysName") ( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, IpAddress, TimeTicks, Counter64, Unsigned32, iso, Gauge32, NotificationType, ModuleIdentity, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "iso", "Gauge32", "NotificationType", "ModuleIdentity", "ObjectIdentity", "Bits", "Counter32") ( DisplayString, TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") cpqDriveArray = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3)) cpqDaMibRev = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 1)) cpqDaComponent = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 2)) cpqDaTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 3)) cpqDaInterface = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 2, 1)) cpqDaCntlr = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 2, 2)) cpqDaLogDrv = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 2, 3)) cpqDaSpareDrv = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 2, 4)) cpqDaPhyDrv = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 2, 5)) cpqDaPhyDrvThr = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 2, 6)) cpqDaCntlrPerf = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 2, 7)) cpqDaLogDrvPerf = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 2, 8)) cpqDaTapeDrv = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 2, 9)) cpqDaTapeCounters = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 2, 10)) cpqDaTapeLibrary = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 2, 11)) cpqDaOsNetWare3x = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1)) cpqDaOsCommon = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 4)) cpqDaMibRevMajor = MibScalar((1, 3, 6, 1, 4, 1, 232, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1,65535))).setMaxAccess("readonly") cpqDaMibRevMinor = MibScalar((1, 3, 6, 1, 4, 1, 232, 3, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqDaMibCondition = MibScalar((1, 3, 6, 1, 4, 1, 232, 3, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqDaNw3xDriverName = MibScalar((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqDaNw3xDriverVer = MibScalar((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,5))).setMaxAccess("readonly") cpqDaNw3xPollType = MibScalar((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("polled", 2), ("demand", 3),))).setMaxAccess("readonly") cpqDaNw3xPollTime = MibScalar((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1,300))).setMaxAccess("readonly") cpqDaNw3xDriverStatTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 5), ) cpqDaNw3xDriverStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 5, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaNw3xCntlrIndex"), (0, "CPQIDA-MIB", "cpqDaNw3xLogDrvIndex")) cpqDaNw3xCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaNw3xLogDrvIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 5, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaNw3xTotalReads = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 5, 1, 3), Counter32()).setMaxAccess("readonly") cpqDaNw3xTotalWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 5, 1, 4), Counter32()).setMaxAccess("readonly") cpqDaNw3xCorrReads = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 5, 1, 5), Counter32()).setMaxAccess("readonly") cpqDaNw3xCorrWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 5, 1, 6), Counter32()).setMaxAccess("readonly") cpqDaNw3xFatalReads = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 5, 1, 7), Counter32()).setMaxAccess("readonly") cpqDaNw3xFatalWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 5, 1, 8), Counter32()).setMaxAccess("readonly") cpqDaNw3xVolMapTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 6), ) cpqDaNw3xVolMapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 6, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaNw3xVolCntlrIndex"), (0, "CPQIDA-MIB", "cpqDaNw3xVolLogDrvIndex")) cpqDaNw3xVolCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaNw3xVolLogDrvIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 6, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaNw3xVolMap = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 1, 6, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqDaOsCommonPollFreq = MibScalar((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 4, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite") cpqDaOsCommonModuleTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 4, 2), ) cpqDaOsCommonModuleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 4, 2, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaOsCommonModuleIndex")) cpqDaOsCommonModuleIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaOsCommonModuleName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 4, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqDaOsCommonModuleVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 4, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,5))).setMaxAccess("readonly") cpqDaOsCommonModuleDate = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 4, 2, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(7,7)).setFixedLength(7)).setMaxAccess("readonly") cpqDaOsCommonModulePurpose = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 4, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqDaOsCommonCollectionReset = MibScalar((1, 3, 6, 1, 4, 1, 232, 3, 2, 1, 4, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("resetSupported", 2), ("resetNotSupported", 3), ("doReset", 4),))).setMaxAccess("readwrite") cpqDaCntlrTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1), ) cpqDaCntlrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaCntlrIndex")) cpqDaCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqDaCntlrModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 88,)).clone(namedValues=NamedValues(("other", 1), ("ida", 2), ("idaExpansion", 3), ("ida-2", 4), ("smart", 5), ("smart-2e", 6), ("smart-2p", 7), ("smart-2sl", 8), ("smart-3100es", 9), ("smart-3200", 10), ("smart-2dh", 11), ("smart-221", 12), ("sa-4250es", 13), ("sa-4200", 14), ("sa-integrated", 15), ("sa-431", 16), ("sa-5300", 17), ("raidLc2", 18), ("sa-5i", 19), ("sa-532", 20), ("sa-5312", 21), ("sa-641", 22), ("sa-642", 23), ("sa-6400", 24), ("sa-6400em", 25), ("sa-6i", 26), ("sa-generic", 27), ("sa-p600", 29), ("sa-p400", 30), ("sa-e200", 31), ("sa-e200i", 32), ("sa-p400i", 33), ("sa-p800", 34), ("sa-e500", 35), ("sa-p700m", 36), ("sa-p212", 37), ("sa-p410", 38), ("sa-p410i", 39), ("sa-p411", 40), ("sa-b110i", 41), ("sa-p712m", 42), ("sa-p711m", 43), ("sa-p812", 44), ("sw-1210m", 45), ("sa-p220i", 46), ("sa-p222", 47), ("sa-p420", 48), ("sa-p420i", 49), ("sa-p421", 50), ("sa-b320i", 51), ("sa-p822", 52), ("sa-p721m", 53), ("sa-b120i", 54), ("hps-1224", 55), ("hps-1228", 56), ("hps-1228m", 57), ("sa-p822se", 58), ("hps-1224e", 59), ("hps-1228e", 60), ("hps-1228em", 61), ("sa-p230i", 62), ("sa-p430i", 63), ("sa-p430", 64), ("sa-p431", 65), ("sa-p731m", 66), ("sa-p830i", 67), ("sa-p830", 68), ("sa-p831", 69), ("sa-p530", 70), ("sa-p531", 71), ("sa-p244br", 72), ("sa-p246br", 73), ("sa-p440", 74), ("sa-p440ar", 75), ("sa-p441", 76), ("sa-p741m", 77), ("sa-p840", 78), ("sa-p841", 79), ("sh-h240ar", 80), ("sh-h244br", 81), ("sh-h240", 82), ("sh-h241", 83), ("sa-b140i", 84), ("sh-generic", 85), ("sa-p840ar", 88),))).setMaxAccess("readonly") cpqDaCntlrFWRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,5))).setMaxAccess("readonly") cpqDaCntlrStndIntr = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("primary", 2), ("secondary", 3), ("disabled", 4), ("unavailable", 5),))).setMaxAccess("readonly") cpqDaCntlrSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaCntlrCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqDaCntlrProductRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,1))).setMaxAccess("readonly") cpqDaCntlrPartnerSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 8), Integer32()).setMaxAccess("readonly") cpqDaCntlrCurrentRole = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 9), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("notDuplexed", 2), ("active", 3), ("backup", 4), ("asymActiveActive", 5),))).setMaxAccess("readonly") cpqDaCntlrBoardStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 10), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("generalFailure", 3), ("cableProblem", 4), ("poweredOff", 5), ("cacheModuleMissing", 6),))).setMaxAccess("readonly") cpqDaCntlrPartnerBoardStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 11), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("generalFailure", 3), ("cableProblem", 4), ("poweredOff", 5),))).setMaxAccess("readonly") cpqDaCntlrBoardCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 12), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqDaCntlrPartnerBoardCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 13), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqDaCntlrDriveOwnership = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 14), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("owner", 2), ("notOwner", 3),))).setMaxAccess("readonly") cpqDaCntlrSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 15), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,32))).setMaxAccess("readonly") cpqDaCntlrRedundancyType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 16), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6,)).clone(namedValues=NamedValues(("other", 1), ("notRedundant", 2), ("driverDuplexing", 3), ("fwActiveStandby", 4), ("fwPrimarySecondary", 5), ("fwActiveActive", 6),))).setMaxAccess("readonly") cpqDaCntlrRedundancyError = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 17), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,)).clone(namedValues=NamedValues(("other", 1), ("noFailure", 2), ("noRedundantController", 3), ("differentHardware", 4), ("noLink", 5), ("differentFirmware", 6), ("differentCache", 7), ("otherCacheFailure", 8), ("noDrives", 9), ("otherNoDrives", 10), ("unsupportedDrives", 11), ("expandInProgress", 12),))).setMaxAccess("readonly") cpqDaCntlrAccessModuleStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 18), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7,)).clone(namedValues=NamedValues(("other", 1), ("notSupported", 2), ("notPresent", 3), ("badSignature", 4), ("badChecksum", 5), ("fullyFunctional", 6), ("upgradeFirmware", 7),))).setMaxAccess("readonly") cpqDaCntlrDaughterBoardType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 19), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6,)).clone(namedValues=NamedValues(("other", 1), ("notSupported", 2), ("notPresent", 3), ("scsiBoardPresent", 4), ("fibreBoardPresent", 5), ("arrayExpansionModulePresent", 6),))).setMaxAccess("readonly") cpqDaCntlrHwLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 20), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqDaCntlrNumberOfBuses = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 21), Integer32()).setMaxAccess("readonly") cpqDaCntlrBlinkTime = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 22), Counter32()).setMaxAccess("readwrite") cpqDaCntlrRebuildPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 23), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("low", 2), ("medium", 3), ("high", 4), ("mediumHigh", 5),))).setMaxAccess("readonly") cpqDaCntlrExpandPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 24), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("low", 2), ("medium", 3), ("high", 4),))).setMaxAccess("readonly") cpqDaCntlrNumberOfInternalPorts = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 25), Integer32()).setMaxAccess("readonly") cpqDaCntlrNumberOfExternalPorts = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 26), Integer32()).setMaxAccess("readonly") cpqDaCntlrDriveWriteCacheState = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 27), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3),))).setMaxAccess("readonly") cpqDaCntlrPartnerSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 28), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,32))).setMaxAccess("readonly") cpqDaCntlrOptionRomRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 29), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,5))).setMaxAccess("readonly") cpqDaCntlrHbaFWRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 30), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,17))).setMaxAccess("readonly") cpqDaCntlrHBAModeOptionRomRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 31), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,17))).setMaxAccess("readonly") cpqDaCntlrCurrentTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 32), Integer32()).setMaxAccess("readonly") cpqDaCntlrLastLockupCode = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 33), Integer32()).setMaxAccess("readonly") cpqDaCntlrEncryptionStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 34), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("notEnabled", 2), ("enabledLocalKeyMode", 3), ("enabledRemoteKeyManagerMode", 4),))).setMaxAccess("readonly") cpqDaCntlrASICEncptSelfTestStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 35), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("selfTestsPass", 2), ("selfTestsFailed", 3),))).setMaxAccess("readonly") cpqDaCntlrEncryptCspNvramStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 36), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("detectionFailed", 3),))).setMaxAccess("readonly") cpqDaCntlrEncryptCryptoOfficerPwdSetStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 37), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("false", 2), ("true", 3),))).setMaxAccess("readonly") cpqDaCntlrEncryptCntlrPwdSetStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 38), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("false", 2), ("true", 3),))).setMaxAccess("readonly") cpqDaCntlrEncryptCntlrPwdAvailStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 39), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("passwordMissing", 2), ("passwordActive", 3),))).setMaxAccess("readonly") cpqDaCntlrUnencryptedLogDrvCreationPolicy = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 40), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("false", 2), ("true", 3),))).setMaxAccess("readonly") cpqDaCntlrEncryptedLogDrvCreationPolicy = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 41), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("false", 2), ("true", 3),))).setMaxAccess("readonly") cpqDaCntlrEncryptFWLockStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 42), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("false", 2), ("true", 3),))).setMaxAccess("readonly") cpqDaCntlrOperatingMode = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 1, 1, 43), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("smartArrayMode", 2), ("smartHbaMode", 3),))).setMaxAccess("readonly") cpqDaAccelTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2), ) cpqDaAccelEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaAccelCntlrIndex")) cpqDaAccelCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly") cpqDaAccelStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9,)).clone(namedValues=NamedValues(("other", 1), ("invalid", 2), ("enabled", 3), ("tmpDisabled", 4), ("permDisabled", 5), ("cacheModFlashMemNotAttached", 6), ("cacheModDegradedFailsafeSpeed", 7), ("cacheModCriticalFailure", 8), ("cacheReadCacheNotMapped", 9),))).setMaxAccess("readonly") cpqDaAccelMemory = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 3), Integer32()).setMaxAccess("readonly") cpqDaAccelBadData = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 4), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("none", 2), ("possible", 3),))).setMaxAccess("readonly") cpqDaAccelErrCode = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 5), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,)).clone(namedValues=NamedValues(("other", 1), ("invalid", 2), ("badConfig", 3), ("lowBattery", 4), ("disableCmd", 5), ("noResources", 6), ("notConnected", 7), ("badMirrorData", 8), ("readErr", 9), ("writeErr", 10), ("configCmd", 11), ("expandInProgress", 12), ("snapshotInProgress", 13), ("redundantLowBattery", 14), ("redundantSizeMismatch", 15), ("redundantCacheFailure", 16), ("excessiveEccErrors", 17), ("adgEnablerMissing", 18), ("postEccErrors", 19), ("batteryHotRemoved", 20), ("capacitorChargeLow", 21), ("notEnoughBatteries", 22), ("cacheModuleNotSupported", 23), ("batteryNotSupported", 24), ("noCapacitorAttached", 25), ("capBasedBackupFailed", 26), ("capBasedRestoreFailed", 27), ("capBasedModuleHWFailure", 28), ("capacitorFailedToCharge", 29), ("capacitorBasedHWMemBeingErased", 30), ("incompatibleCacheModule", 31), ("fbcmChargerCircuitFailure", 32),))).setMaxAccess("readonly") cpqDaAccelBattery = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 6), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("recharging", 3), ("failed", 4), ("degraded", 5), ("notPresent", 6), ("capacitorFailed", 7),))).setMaxAccess("readonly") cpqDaAccelReadErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 7), Counter32()).setMaxAccess("readonly") cpqDaAccelWriteErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 8), Counter32()).setMaxAccess("readonly") cpqDaAccelCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 9), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqDaAccelReadMemory = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 10), Integer32()).setMaxAccess("readonly") cpqDaAccelSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,32))).setMaxAccess("readonly") cpqDaAccelTotalMemory = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 12), Integer32()).setMaxAccess("readonly") cpqDaAccelReadCachePercent = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 13), Gauge32()).setMaxAccess("readonly") cpqDaAccelWriteCachePercent = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 14), Gauge32()).setMaxAccess("readonly") cpqDaAccelFailedBatteries = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 15), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,16))).setMaxAccess("readonly") cpqDaAccelBackupPowerSource = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 16), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("battery", 2), ("capacitor", 3),))).setMaxAccess("readonly") cpqDaAccelBoardCurrentTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 17), Integer32()).setMaxAccess("readonly") cpqDaAccelCapacitorCurrentTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 18), Integer32()).setMaxAccess("readonly") cpqDaAccelMemoryDataWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 19), Integer32()).setMaxAccess("readonly") cpqDaAccelMemoryTransferRate = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 2, 1, 20), Integer32()).setMaxAccess("readonly") cpqDaManagedCableTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 3), ) cpqDaManagedCableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 3, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaManagedCableCntlrIndex")) cpqDaManagedCableIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 3, 1, 1), Integer32()).setMaxAccess("readonly") cpqDaManagedCableCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 3, 1, 2), Integer32()).setMaxAccess("readonly") cpqDaManagedCableHostConnector = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 3, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,4))).setMaxAccess("readonly") cpqDaManagedCableStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 3, 1, 4), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("nonFatalFault", 3), ("fatalFault", 4),))).setMaxAccess("readonly") cpqDaManagedCableFaultCode = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 3, 1, 5), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("none", 2), ("linkFault", 3), ("noComWithCableMgmtInterface", 4), ("cannotConfigureCable", 5),))).setMaxAccess("readonly") cpqDaManagedCableVendorRevision = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 3, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,2))).setMaxAccess("readonly") cpqDaManagedCableVendorSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 3, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,16))).setMaxAccess("readonly") cpqDaManagedCableVendorPartNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 3, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,16))).setMaxAccess("readonly") cpqDaManagedCableLength = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 2, 3, 1, 9), Integer32()).setMaxAccess("readonly") cpqDaLogDrvTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1), ) cpqDaLogDrvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaLogDrvCntlrIndex"), (0, "CPQIDA-MIB", "cpqDaLogDrvIndex")) cpqDaLogDrvCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqDaLogDrvIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaLogDrvFaultTol = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 7, 8, 9, 10, 11,)).clone(namedValues=NamedValues(("other", 1), ("none", 2), ("mirroring", 3), ("dataGuard", 4), ("distribDataGuard", 5), ("advancedDataGuard", 7), ("raid50", 8), ("raid60", 9), ("raid1Adm", 10), ("raid10Adm", 11),))).setMaxAccess("readonly") cpqDaLogDrvStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("failed", 3), ("unconfigured", 4), ("recovering", 5), ("readyForRebuild", 6), ("rebuilding", 7), ("wrongDrive", 8), ("badConnect", 9), ("overheating", 10), ("shutdown", 11), ("expanding", 12), ("notAvailable", 13), ("queuedForExpansion", 14), ("multipathAccessDegraded", 15), ("erasing", 16), ("predictiveSpareRebuildReady", 17), ("rapidParityInitInProgress", 18), ("rapidParityInitPending", 19), ("noAccessEncryptedNoCntlrKey", 20), ("unencryptedToEncryptedInProgress", 21), ("newLogDrvKeyRekeyInProgress", 22), ("noAccessEncryptedCntlrEncryptnNotEnbld", 23), ("unencryptedToEncryptedNotStarted", 24), ("newLogDrvKeyRekeyRequestReceived", 25),))).setMaxAccess("readonly") cpqDaLogDrvAutoRel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readwrite") cpqDaLogDrvRebuildBlks = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 6), Counter32()).setMaxAccess("readonly") cpqDaLogDrvHasAccel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 7), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("unavailable", 2), ("enabled", 3), ("disabled", 4),))).setMaxAccess("readonly") cpqDaLogDrvAvailSpares = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 8), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqDaLogDrvSize = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readonly") cpqDaLogDrvPhyDrvIDs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqDaLogDrvCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 11), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqDaLogDrvPercentRebuild = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 12), Gauge32()).setMaxAccess("readonly") cpqDaLogDrvStripeSize = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 13), Integer32()).setMaxAccess("readonly") cpqDaLogDrvOsName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 14), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqDaLogDrvBlinkTime = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 15), Counter32()).setMaxAccess("readwrite") cpqDaLogDrvSpareReplaceMap = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 16), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,256))).setMaxAccess("readonly") cpqDaLogDrvRebuildingPhyDrv = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqDaLogDrvMultipathAccess = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 18), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("notSupported", 2), ("notConfigured", 3), ("pathRedundant", 4), ("noRedundantPath", 5),))).setMaxAccess("readonly") cpqDaLogDrvNmbrOfParityGroups = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readonly") cpqDaLogDrvSplitMirrorBackupLogDrv = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 20), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("isNotBackupLogicalDrive", 2), ("isBackupLogicalDrive", 3),))).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelAssocType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 21), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("nonMember", 2), ("logicalDriveMember", 3), ("cacheVolumeMember", 4),))).setMaxAccess("readonly") cpqDaLogDrvCacheVolIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 22), Integer32()).setMaxAccess("readonly") cpqDaLogDrvRPIPercentComplete = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 23), Gauge32()).setMaxAccess("readonly") cpqDaLogDrvSSDSmartPathStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 24), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("updateDriver", 2), ("ssdSmartPathDisabled", 3), ("ssdSmartPathEnabled", 4),))).setMaxAccess("readonly") cpqDaLogDrvEncryptionStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 1, 1, 25), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("encrypted", 2), ("notEncrypted", 3),))).setMaxAccess("readonly") cpqDaLogDrvPhyDrvExtAttachTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 2), ) cpqDaLogDrvPhyDrvExtAttachEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 2, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaLogDrvPhyDrvAttachExtIndex")) cpqDaLogDrvPhyDrvAttachExtIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqDaLogDrvCntlrExtended = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 2, 1, 2), Integer32()).setMaxAccess("readonly") cpqDaLogDrvLogDrvExtended = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaLogDrvPhyDrvExtended = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqDaLogDrvSprRplcExtAttachTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 3), ) cpqDaLogDrvSprRplcExtAttachEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 3, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaLogDrvSprRplcAttachExtIndex")) cpqDaLogDrvSprRplcAttachExtIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqDaLogDrvSprRplcCntlrExtended = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 3, 1, 2), Integer32()).setMaxAccess("readonly") cpqDaLogDrvSprRplcLogDrvExtended = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaLogDrvSprRplcReplacedPhysDrvExtended = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqDaLogDrvSprRplcSparePhysDrvExtended = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 3, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqDaLogDrvAvalSprExtAttachTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 4), ) cpqDaLogDrvAvalSprExtAttachEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 4, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaLogDrvAvailSprAttachExtIndex")) cpqDaLogDrvAvailSprAttachExtIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqDaLogDrvAvailSprCntlrExtended = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 4, 1, 2), Integer32()).setMaxAccess("readonly") cpqDaLogDrvAvailSprLogDrvExtended = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaLogDrvAvailSprAvailableSpareExtended = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 4, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqDaLogDrvCacheVolumeAccelTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5), ) cpqDaLogDrvCacheVolumeAccelEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaLogDrvCacheVolAccelCntlrIndex"), (0, "CPQIDA-MIB", "cpqDaLogDrvCacheVolAccelLogDrvIndex")) cpqDaLogDrvCacheVolAccelCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 1), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelLogDrvIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 2), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelCachingAlgorithm = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("multiSegment", 2), ("singleSegment", 3),))).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelCacheState = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 4), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("cacheVolOffline", 4), ("logDriveOffline", 5), ("neverConfigured", 6), ("flushing", 7), ("configuring", 8), ("cacheConfigurationFailed", 9),))).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelWritePolicy = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 5), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6,)).clone(namedValues=NamedValues(("other", 1), ("readOnly", 2), ("writeThrough", 3), ("writeBackSafe", 4), ("writeBackUnsafe", 5), ("writeThroughNoLoad", 6),))).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfReadHitsH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 6), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfReadHits = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 7), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfReadMissDoLoadH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 8), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfReadMissDoLoad = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 9), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfReadMissLoadingH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 10), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfReadMissLoading = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 11), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfReadMissSkipH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 12), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfReadMissSkip = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 13), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelReadCacheHitRate = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 14), Gauge32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfWriteHitsH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 15), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfWriteHits = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 16), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfWriteMissDoLoadH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 17), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfWriteMissDoLoad = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 18), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfWriteMissLoadingH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 19), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfWriteMissLoading = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 20), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfWriteMissSkipH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 21), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfWriteMissSkip = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 22), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelWriteCacheHitRate = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 23), Gauge32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelLoadFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 24), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelCacheLineSize = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 25), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfReadMissLockedH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 26), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfReadMissLocked = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 27), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfWriteMissLockedH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 28), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfWriteMissLocked = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 29), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfReadMissTotalH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 30), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfReadMissTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 31), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfWriteMissTotalH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 32), Integer32()).setMaxAccess("readonly") cpqDaLogDrvCacheVolAccelNoOfWriteMissTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 3, 5, 1, 33), Integer32()).setMaxAccess("readonly") cpqDaSpareTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 4, 1), ) cpqDaSpareEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 4, 1, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaSpareCntlrIndex"), (0, "CPQIDA-MIB", "cpqDaSparePhyDrvIndex")) cpqDaSpareCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 4, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqDaSparePhyDrvIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 4, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqDaSpareStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6,)).clone(namedValues=NamedValues(("other", 1), ("invalid", 2), ("failed", 3), ("inactive", 4), ("building", 5), ("active", 6),))).setMaxAccess("readonly") cpqDaSpareReplacedDrv = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 4, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqDaSpareRebuildBlks = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 4, 1, 1, 5), Counter32()).setMaxAccess("readonly") cpqDaSpareCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 4, 1, 1, 6), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqDaSpareBusNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 4, 1, 1, 7), Integer32()).setMaxAccess("readonly") cpqDaSpareBay = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 4, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaSpareReplacedDrvBusNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 4, 1, 1, 9), Integer32()).setMaxAccess("readonly") cpqDaSpareReplacedDrvBay = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 4, 1, 1, 10), Integer32()).setMaxAccess("readonly") cpqDaSparePercentRebuild = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 4, 1, 1, 11), Gauge32()).setMaxAccess("readonly") cpqDaSpareLocationString = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 4, 1, 1, 12), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqDaPhyDrvTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1), ) cpqDaPhyDrvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaPhyDrvCntlrIndex"), (0, "CPQIDA-MIB", "cpqDaPhyDrvIndex")) cpqDaPhyDrvCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqDaPhyDrvModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqDaPhyDrvFWRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,8))).setMaxAccess("readonly") cpqDaPhyDrvBay = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaPhyDrvStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 6), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("failed", 3), ("predictiveFailure", 4), ("erasing", 5), ("eraseDone", 6), ("eraseQueued", 7), ("ssdWearOut", 8), ("notAuthenticated", 9),))).setMaxAccess("readonly") cpqDaPhyDrvFactReallocs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 7), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvUsedReallocs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 8), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvRefHours = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 9), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvHReads = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 10), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvReads = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 11), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvHWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 12), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 13), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvHSeeks = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 14), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvSeeks = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 15), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvHardReadErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 16), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvRecvReadErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 17), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvHardWriteErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 18), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvRecvWriteErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 19), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvHSeekErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 20), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvSeekErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 21), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvSpinupTime = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 22), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvFunctTest1 = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 23), Gauge32()).setMaxAccess("readonly") cpqDaPhyDrvFunctTest2 = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 24), Gauge32()).setMaxAccess("readonly") cpqDaPhyDrvFunctTest3 = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 25), Gauge32()).setMaxAccess("readonly") cpqDaPhyDrvDrqTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 26), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvOtherTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 27), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvSpinupRetries = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 28), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvBadRecvReads = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 29), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvBadRecvWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 30), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvFormatErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 31), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvPostErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 32), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvNotReadyErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 33), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvReallocAborts = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 34), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvThreshPassed = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 35), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2,)).clone(namedValues=NamedValues(("false", 1), ("true", 2),))).setMaxAccess("readonly") cpqDaPhyDrvHasMonInfo = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 36), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2,)).clone(namedValues=NamedValues(("false", 1), ("true", 2),))).setMaxAccess("readonly") cpqDaPhyDrvCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 37), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqDaPhyDrvHotPlugs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 38), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvMediaErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 39), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvHardwareErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 40), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvAbortedCmds = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 41), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvSpinUpErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 42), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvBadTargetErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 43), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 44), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("internal", 2), ("external", 3), ("proLiant", 4),))).setMaxAccess("readonly") cpqDaPhyDrvSize = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 45), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvBusFaults = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 46), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvIrqDeglitches = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 47), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvHotPlug = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 48), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("hotPlug", 2), ("nonHotPlug", 3),))).setMaxAccess("readonly") cpqDaPhyDrvPlacement = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 49), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("internal", 2), ("external", 3),))).setMaxAccess("readonly") cpqDaPhyDrvBusNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 50), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvSerialNum = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 51), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,40))).setMaxAccess("readonly") cpqDaPhyDrvPreFailMonitoring = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 52), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("notAvailable", 2), ("available", 3),))).setMaxAccess("readonly") cpqDaPhyDrvCurrentWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 53), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("narrow", 2), ("wide16", 3),))).setMaxAccess("readonly") cpqDaPhyDrvCurrentSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 54), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7,)).clone(namedValues=NamedValues(("other", 1), ("asynchronous", 2), ("fast", 3), ("ultra", 4), ("ultra2", 5), ("ultra3", 6), ("ultra320", 7),))).setMaxAccess("readonly") cpqDaPhyDrvFailureCode = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 55), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvBlinkTime = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 56), Counter32()).setMaxAccess("readwrite") cpqDaPhyDrvSmartStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 57), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("replaceDrive", 3), ("replaceDriveSSDWearOut", 4),))).setMaxAccess("readonly") cpqDaPhyDrvConfigurationStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 58), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("configured", 2), ("notConfigured", 3),))).setMaxAccess("readonly") cpqDaPhyDrvRotationalSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 59), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("rpm7200", 2), ("rpm10K", 3), ("rpm15K", 4), ("rpmSsd", 5),))).setMaxAccess("readonly") cpqDaPhyDrvType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 60), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("parallelScsi", 2), ("sata", 3), ("sas", 4),))).setMaxAccess("readonly") cpqDaPhyDrvSataVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 61), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("sataOne", 2), ("sataTwo", 3),))).setMaxAccess("readonly") cpqDaPhyDrvHostConnector = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 62), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,4))).setMaxAccess("readonly") cpqDaPhyDrvBoxOnConnector = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 63), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvLocationString = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 64), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqDaPhyDrvNegotiatedLinkRate = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 65), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("rate-1-5", 2), ("rate-3-0", 3), ("rate-6-0", 4), ("rate-12-0", 5),))).setMaxAccess("readonly") cpqDaPhyDrvNcqSupport = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 66), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("noControllerSupport", 2), ("noDriveSupport", 3), ("ncqDisabled", 4), ("ncqEnabled", 5),))).setMaxAccess("readonly") cpqDaPhyDrvPhyCount = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 67), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvMultipathAccess = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 68), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6,)).clone(namedValues=NamedValues(("other", 1), ("notSupported", 2), ("notConfigured", 3), ("pathRedundant", 4), ("noRedundantPath", 5), ("driveFailed", 6),))).setMaxAccess("readonly") cpqDaPhyDrvMediaType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 69), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("rotatingPlatters", 2), ("solidState", 3),))).setMaxAccess("readonly") cpqDaPhyDrvCurrentTemperature = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 70), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvTemperatureThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 71), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvMaximumTemperature = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 72), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvSSDWearStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 73), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("fiftySixDayThreshold", 3), ("fivePercentThreshold", 4), ("twoPercentThreshold", 5), ("ssdWearOut", 6),))).setMaxAccess("readonly") cpqDaPhyDrvPowerOnHours = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 74), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvSSDPercntEndrnceUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 75), Gauge32()).setMaxAccess("readonly") cpqDaPhyDrvSSDEstTimeRemainingHours = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 76), Counter32()).setMaxAccess("readonly") cpqDaPhyDrvAuthenticationStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 77), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("notSupported", 2), ("authenticationFailed", 3), ("authenticationPassed", 4),))).setMaxAccess("readonly") cpqDaPhyDrvSmartCarrierAppFWRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 78), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvSmartCarrierBootldrFWRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 79), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvEncryptionStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 1, 1, 80), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("encrypted", 2), ("notEncrypted", 3),))).setMaxAccess("readonly") cpqDaPhyDrvErrTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2), ) cpqDaPhyDrvErrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaPhyDrvErrCntlrIndex"), (0, "CPQIDA-MIB", "cpqDaPhyDrvErrIDIndex"), (0, "CPQIDA-MIB", "cpqDaPhyDrvErrIndex")) cpqDaPhyDrvErrCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1, 1), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvErrIDIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaPhyDrvErrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readonly") cpqDaPhyDrvErrType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1, 4), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("noError", 2), ("scsiError", 3), ("camError", 4),))).setMaxAccess("readonly") cpqDaPhyDrvScsiOp = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaPhyDrvScsiStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaPhyDrvCamStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaPhyDrvSenseKey = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaPhyDrvQualifier = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaPhyDrvSenseCode = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaPhyDrvBlockValid = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1, 11), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2,)).clone(namedValues=NamedValues(("false", 1), ("true", 2),))).setMaxAccess("readonly") cpqDaPhyDrvBlock = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1, 12), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvTime = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readonly") cpqDaPhyDrvUserDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1, 14), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqDaPhyDrvErrDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 2, 1, 15), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,)).clone(namedValues=NamedValues(("driveFailure", 1), ("commFailure", 2), ("driveIOError", 3), ("scsiCommError", 4), ("compaqUpgradeRequired", 5), ("driveWriteProtected", 6), ("invalidRequest", 7), ("scsiMessageError", 8), ("controllerFailure", 9), ("internExternConflict", 10), ("internalDriveFailure", 11), ("scsiErrorOutOfRange", 12), ("camErrorOutOfRange", 13), ("errorTypeOutOfRange", 14),))).setMaxAccess("readonly") cpqDaPhyDrvPathTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 3), ) cpqDaPhyDrvPathEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 3, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaPhyDrvPathCntlrIndex"), (0, "CPQIDA-MIB", "cpqDaPhyDrvPathDrvIndex"), (0, "CPQIDA-MIB", "cpqDaPhyDrvPathIndex")) cpqDaPhyDrvPathCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 3, 1, 1), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvPathDrvIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 3, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqDaPhyDrvPathIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,3))).setMaxAccess("readonly") cpqDaPhyDrvPathStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 3, 1, 4), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("linkDown", 3),))).setMaxAccess("readonly") cpqDaPhyDrvPathCurrentRole = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 3, 1, 5), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("active", 2), ("alternate", 3),))).setMaxAccess("readonly") cpqDaPhyDrvPathHostConnector = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 3, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,4))).setMaxAccess("readonly") cpqDaPhyDrvPathBoxOnConnector = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 3, 1, 7), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvPathLocationString = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 5, 3, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqDaPhyDrvThrTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1), ) cpqDaPhyDrvThrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaPhyDrvThrCntlrIndex"), (0, "CPQIDA-MIB", "cpqDaPhyDrvThrIndex")) cpqDaPhyDrvThrCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqDaPhyDrvThrUsedReallocs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 3), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrRefHours = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 4), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrHardReadErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 5), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrRecvReadErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 6), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrHardWriteErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 7), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrRecvWriteErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 8), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrHSeekErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 9), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrSeekErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 10), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrSpinupTime = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 11), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrFunctTest1 = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 12), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrFunctTest2 = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 13), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrFunctTest3 = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 14), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrDrqTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 15), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrOtherTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 16), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrSpinupRetries = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 17), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrBadRecvReads = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 18), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrBadRecvWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 19), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrFormatErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 20), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrPostErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 21), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrNotReadyErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 22), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrReallocAborts = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 23), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrHotPlugs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 24), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrMediaErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 25), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrHardwareErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 26), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrAbortedCmds = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 27), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrSpinUpErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 28), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrBadTargetErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 29), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrViUsedReallocs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 30), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 4294967295,)).clone(namedValues=NamedValues(("false", 1), ("true", 2), ("unknown", 4294967295),))).setMaxAccess("readonly") cpqDaPhyDrvThrViSpinupTime = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 31), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 4294967295,)).clone(namedValues=NamedValues(("false", 1), ("true", 2), ("unknown", 4294967295),))).setMaxAccess("readonly") cpqDaPhyDrvThrViFunctTest1 = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 32), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 4294967295,)).clone(namedValues=NamedValues(("false", 1), ("true", 2), ("unknown", 4294967295),))).setMaxAccess("readonly") cpqDaPhyDrvThrViFunctTest2 = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 33), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 4294967295,)).clone(namedValues=NamedValues(("false", 1), ("true", 2), ("unknown", 4294967295),))).setMaxAccess("readonly") cpqDaPhyDrvThrViFunctTest3 = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 34), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 4294967295,)).clone(namedValues=NamedValues(("false", 1), ("true", 2), ("unknown", 4294967295),))).setMaxAccess("readonly") cpqDaPhyDrvThrBusFaults = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 35), Integer32()).setMaxAccess("readonly") cpqDaPhyDrvThrIrqDeglitches = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 6, 1, 1, 36), Integer32()).setMaxAccess("readonly") cpqDaCntlrPerfTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 7, 1), ) cpqDaCntlrPerfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 7, 1, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaCntlrPerfCntlrIndex"), (0, "CPQIDA-MIB", "cpqDaCntlrPerfInstance")) cpqDaCntlrPerfCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 7, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqDaCntlrPerfInstance = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 7, 1, 1, 2), Integer32()).setMaxAccess("readonly") cpqDaCntlrPerfSampleInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 7, 1, 1, 3), Integer32()).setMaxAccess("readonly") cpqDaCntlrPerfVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 7, 1, 1, 4), Integer32()).setMaxAccess("readonly") cpqDaCntlrPerfCpuPercentBusy = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 7, 1, 1, 5), Integer32()).setMaxAccess("readonly") cpqDaCntlrPerfCommandCount = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 7, 1, 1, 6), Integer32()).setMaxAccess("readonly") cpqDaCntlrPerfAvgLatency = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 7, 1, 1, 7), Integer32()).setMaxAccess("readonly") cpqDaLogDrvPerfTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 8, 1), ) cpqDaLogDrvPerfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 8, 1, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaLogDrvPerfCntlrIndex"), (0, "CPQIDA-MIB", "cpqDaLogDrvPerfIndex"), (0, "CPQIDA-MIB", "cpqDaLogDrvPerfInstance")) cpqDaLogDrvPerfCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 8, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqDaLogDrvPerfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 8, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaLogDrvPerfInstance = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 8, 1, 1, 3), Integer32()).setMaxAccess("readonly") cpqDaLogDrvPerfSampleInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 8, 1, 1, 4), Integer32()).setMaxAccess("readonly") cpqDaLogDrvPerfAvgQueueDepth = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 8, 1, 1, 5), Integer32()).setMaxAccess("readonly") cpqDaLogDrvPerfReads = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 8, 1, 1, 6), Integer32()).setMaxAccess("readonly") cpqDaLogDrvPerfWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 8, 1, 1, 7), Integer32()).setMaxAccess("readonly") cpqDaLogDrvPerfTotalIO = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 8, 1, 1, 8), Integer32()).setMaxAccess("readonly") cpqDaLogDrvPerfCacheHits = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 8, 1, 1, 9), Integer32()).setMaxAccess("readonly") cpqDaLogDrvPerfCacheMisses = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 8, 1, 1, 10), Integer32()).setMaxAccess("readonly") cpqDaLogDrvPerfReadAheadSectors = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 8, 1, 1, 11), Integer32()).setMaxAccess("readonly") cpqDaLogDrvPerfSectorsRead = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 8, 1, 1, 12), Integer32()).setMaxAccess("readonly") cpqDaLogDrvPerfSectorsWritten = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 8, 1, 1, 13), Integer32()).setMaxAccess("readonly") cpqDaTapeDrvTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1), ) cpqDaTapeDrvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaTapeDrvCntlrIndex"), (0, "CPQIDA-MIB", "cpqDaTapeDrvBusIndex"), (0, "CPQIDA-MIB", "cpqDaTapeDrvScsiIdIndex"), (0, "CPQIDA-MIB", "cpqDaTapeDrvLunIndex")) cpqDaTapeDrvCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqDaTapeDrvBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaTapeDrvScsiIdIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaTapeDrvLunIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaTapeDrvName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,128))).setMaxAccess("readonly") cpqDaTapeDrvSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,64))).setMaxAccess("readonly") cpqDaTapeDrvFwRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,8))).setMaxAccess("readonly") cpqDaTapeDrvStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 8), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4), ("offline", 5), ("missingWasOk", 6), ("missingWasOffline", 7),))).setMaxAccess("readonly") cpqDaTapeDrvCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 9), Integer32()).setMaxAccess("readonly") cpqDaTapeDrvFwSubtype = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaTapeDrvType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 11), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18,)).clone(namedValues=NamedValues(("other", 1), ("cpqDat4-16", 2), ("cpqDatAuto", 3), ("cpqDat2-8", 4), ("cpqDlt10-20", 5), ("cpqDlt20-40", 6), ("cpqDlt15-30", 7), ("cpqDlt35-70", 8), ("cpqDat4-8", 9), ("cpqSlr4-8", 10), ("cpqDat12-24", 11), ("cpqDatAuto12-24", 12), ("cpqAit35", 14), ("cpqAit50", 15), ("cpqDat20-40", 16), ("cpqDlt40-80", 17), ("cpqDatAuto20-40", 18),))).setMaxAccess("readonly") cpqDaTapeDrvCleanReq = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 12), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("true", 2), ("false", 3),))).setMaxAccess("readonly") cpqDaTapeDrvCleanTapeRepl = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 13), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("true", 2), ("false", 3),))).setMaxAccess("readonly") cpqDaTapeDrvCleanTapeCount = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 14), Integer32()).setMaxAccess("readonly") cpqDaTapeDrvLibraryDrive = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 15), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("true", 2), ("false", 3),))).setMaxAccess("readonly") cpqDaTapeDrvMagSize = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 16), Integer32()).setMaxAccess("readonly") cpqDaTapeDrvHotPlug = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 17), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("hotPlug", 2), ("nonHotPlug", 3),))).setMaxAccess("readonly") cpqDaTapeDrvPlacement = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 18), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("internal", 2), ("external", 3),))).setMaxAccess("readonly") cpqDaTapeDrvCurrentWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 19), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("narrow", 2), ("wide16", 3),))).setMaxAccess("readonly") cpqDaTapeDrvCurrentSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 20), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6,)).clone(namedValues=NamedValues(("other", 1), ("asynchronous", 2), ("fast", 3), ("ultra", 4), ("ultra2", 5), ("ultra3", 6),))).setMaxAccess("readonly") cpqDaTapeDrvProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 21), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("parallelScsi", 2), ("sata", 3), ("sas", 4),))).setMaxAccess("readonly") cpqDaTapeDrvNegotiatedLinkRate = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 9, 1, 1, 22), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("rate-1-5", 2), ("rate-3-0", 3), ("rate-6-0", 4), ("rate-12-0", 5),))).setMaxAccess("readonly") cpqDaTapeCountersTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 10, 1), ) cpqDaTapeCountersEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 10, 1, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaTapeCountersCntlrIndex"), (0, "CPQIDA-MIB", "cpqDaTapeCountersBusIndex"), (0, "CPQIDA-MIB", "cpqDaTapeCountersScsiIdIndex"), (0, "CPQIDA-MIB", "cpqDaTapeCountersLunIndex")) cpqDaTapeCountersCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 10, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqDaTapeCountersBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 10, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaTapeCountersScsiIdIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 10, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaTapeCountersLunIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 10, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaTapeCountersReWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 10, 1, 1, 5), Counter32()).setMaxAccess("readonly") cpqDaTapeCountersReReads = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 10, 1, 1, 6), Counter32()).setMaxAccess("readonly") cpqDaTapeCountersTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 10, 1, 1, 7), Counter32()).setMaxAccess("readonly") cpqDaTapeCountersTotalUncorrectable = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 10, 1, 1, 8), Counter32()).setMaxAccess("readonly") cpqDaTapeCountersTotalBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 10, 1, 1, 9), Counter32()).setMaxAccess("readonly") cpqDaTapeLibraryTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1), ) cpqDaTapeLibraryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaTapeLibraryCntlrIndex"), (0, "CPQIDA-MIB", "cpqDaTapeLibraryScsiBus"), (0, "CPQIDA-MIB", "cpqDaTapeLibraryScsiTarget"), (0, "CPQIDA-MIB", "cpqDaTapeLibraryScsiLun")) cpqDaTapeLibraryCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqDaTapeLibraryScsiBus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaTapeLibraryScsiTarget = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaTapeLibraryScsiLun = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqDaTapeLibrarySerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,64))).setMaxAccess("readonly") cpqDaTapeLibraryModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,128))).setMaxAccess("readonly") cpqDaTapeLibraryFWRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,8))).setMaxAccess("readonly") cpqDaTapeLibraryStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 8), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4), ("offline", 5),))).setMaxAccess("readonly") cpqDaTapeLibraryDoorStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 9), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("notSupported", 2), ("closed", 3), ("open", 4),))).setMaxAccess("readonly") cpqDaTapeLibraryCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 10), Integer32()).setMaxAccess("readonly") cpqDaTapeLibraryOverallCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 11), Integer32()).setMaxAccess("readonly") cpqDaTapeLibraryLastError = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqDaTapeLibraryStatHours = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 13), Counter32()).setMaxAccess("readonly") cpqDaTapeLibraryStatMoves = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 14), Counter32()).setMaxAccess("readonly") cpqDaTapeLibraryDriveList = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 15), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,60))).setMaxAccess("readonly") cpqDaTapeLibraryCurrentWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 16), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("narrow", 2), ("wide16", 3),))).setMaxAccess("readonly") cpqDaTapeLibraryCurrentSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 17), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6,)).clone(namedValues=NamedValues(("other", 1), ("asynchronous", 2), ("fast", 3), ("ultra", 4), ("ultra2", 5), ("ultra3", 6),))).setMaxAccess("readonly") cpqDaTapeLibraryDriveList2 = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 18), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqDaTapeLibraryProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 19), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("parallelScsi", 2), ("sata", 3), ("sas", 4),))).setMaxAccess("readonly") cpqDaTapeLibraryNegotiatedLinkRate = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 2, 11, 1, 1, 20), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("rate-1-5", 2), ("rate-3-0", 3), ("rate-6-0", 4), ("rate-12-0", 5),))).setMaxAccess("readonly") cpqDaTrapPkts = MibScalar((1, 3, 6, 1, 4, 1, 232, 3, 3, 1), Counter32()).setMaxAccess("readonly") cpqDaTrapLogMaxSize = MibScalar((1, 3, 6, 1, 4, 1, 232, 3, 3, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readonly") cpqDaTrapLogTable = MibTable((1, 3, 6, 1, 4, 1, 232, 3, 3, 3), ) cpqDaTrapLogEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 3, 3, 3, 1), ).setIndexNames((0, "CPQIDA-MIB", "cpqDaTrapLogIndex")) cpqDaTrapLogIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 3, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readonly") cpqDaTrapType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 3, 3, 1, 2), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 3001, 3002, 3003, 3004, 3005, 3006, 3007,)).clone(namedValues=NamedValues(("cpqDaLogDrvStatusChange", 1), ("cpqDaSpareStatusChange", 2), ("cpqDaPhyDrvStatusChange", 3), ("cpqDaPhyDrvThreshExceededTrap", 4), ("cpqDaAccelStatusChange", 5), ("cpqDaAccelBadDataTrap", 6), ("cpqDaAccelBatteryFailed", 7), ("cpqDa2LogDrvStatusChange", 3001), ("cpqDa2SpareStatusChange", 3002), ("cpqDa2PhyDrvStatusChange", 3003), ("cpqDa2PhyDrvThreshExceededTrap", 3004), ("cpqDa2AccelStatusChange", 3005), ("cpqDa2AccelBadDataTrap", 3006), ("cpqDa2AccelBatteryFailed", 3007),))).setMaxAccess("readonly") cpqDaTrapTime = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 3, 3, 3, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(6,6)).setFixedLength(6)).setMaxAccess("readonly") cpqDaLogDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232, 3) + (0,1)).setObjects(*(("CPQIDA-MIB", "cpqDaLogDrvStatus"),)) cpqDaSpareStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232, 3) + (0,2)).setObjects(*(("CPQIDA-MIB", "cpqDaSpareStatus"), ("CPQIDA-MIB", "cpqDaSpareBusNumber"),)) cpqDaPhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232, 3) + (0,3)).setObjects(*(("CPQIDA-MIB", "cpqDaPhyDrvStatus"), ("CPQIDA-MIB", "cpqDaPhyDrvBusNumber"),)) cpqDaPhyDrvThreshPassedTrap = NotificationType((1, 3, 6, 1, 4, 1, 232, 3) + (0,4)).setObjects(*(("CPQIDA-MIB", "cpqDaPhyDrvThreshPassed"), ("CPQIDA-MIB", "cpqDaPhyDrvBusNumber"),)) cpqDaAccelStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232, 3) + (0,5)).setObjects(*(("CPQIDA-MIB", "cpqDaAccelStatus"),)) cpqDaAccelBadDataTrap = NotificationType((1, 3, 6, 1, 4, 1, 232, 3) + (0,6)).setObjects(*(("CPQIDA-MIB", "cpqDaAccelBadData"),)) cpqDaAccelBatteryFailed = NotificationType((1, 3, 6, 1, 4, 1, 232, 3) + (0,7)).setObjects(*(("CPQIDA-MIB", "cpqDaAccelBattery"),)) cpqDa2LogDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3001)).setObjects(*(("CPQIDA-MIB", "cpqDaLogDrvStatus"),)) cpqDa2SpareStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3002)).setObjects(*(("CPQIDA-MIB", "cpqDaSpareStatus"), ("CPQIDA-MIB", "cpqDaSpareBusNumber"),)) cpqDa2PhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3003)).setObjects(*(("CPQIDA-MIB", "cpqDaPhyDrvStatus"), ("CPQIDA-MIB", "cpqDaPhyDrvBusNumber"),)) cpqDa2PhyDrvThreshPassedTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3004)).setObjects(*(("CPQIDA-MIB", "cpqDaPhyDrvThreshPassed"), ("CPQIDA-MIB", "cpqDaPhyDrvBusNumber"),)) cpqDa2AccelStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3005)).setObjects(*(("CPQIDA-MIB", "cpqDaAccelStatus"),)) cpqDa2AccelBadDataTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3006)).setObjects(*(("CPQIDA-MIB", "cpqDaAccelBadData"),)) cpqDa2AccelBatteryFailed = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3007)).setObjects(*(("CPQIDA-MIB", "cpqDaAccelBattery"),)) cpqDa3LogDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3008)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaLogDrvStatus"),)) cpqDa3SpareStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3009)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaSpareStatus"), ("CPQIDA-MIB", "cpqDaSpareBusNumber"),)) cpqDa3PhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3010)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaPhyDrvStatus"), ("CPQIDA-MIB", "cpqDaPhyDrvBusNumber"),)) cpqDa3PhyDrvThreshPassedTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3011)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaPhyDrvThreshPassed"), ("CPQIDA-MIB", "cpqDaPhyDrvBusNumber"),)) cpqDa3AccelStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3012)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaAccelStatus"),)) cpqDa3AccelBadDataTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3013)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaAccelBadData"),)) cpqDa3AccelBatteryFailed = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3014)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaAccelBattery"),)) cpqDaCntlrStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3015)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrSlot"), ("CPQIDA-MIB", "cpqDaCntlrBoardStatus"),)) cpqDaCntlrActive = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3016)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrSlot"), ("CPQIDA-MIB", "cpqDaCntlrPartnerSlot"),)) cpqDa4SpareStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3017)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaSpareStatus"), ("CPQIDA-MIB", "cpqDaSpareCntlrIndex"), ("CPQIDA-MIB", "cpqDaSpareBusNumber"), ("CPQIDA-MIB", "cpqDaSpareBay"),)) cpqDa4PhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3018)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaPhyDrvStatus"), ("CPQIDA-MIB", "cpqDaPhyDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaPhyDrvBusNumber"), ("CPQIDA-MIB", "cpqDaPhyDrvBay"),)) cpqDa4PhyDrvThreshPassedTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3019)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaPhyDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaPhyDrvBusNumber"), ("CPQIDA-MIB", "cpqDaPhyDrvBay"),)) cpqDaTapeLibraryStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3020)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaTapeLibraryCntlrIndex"), ("CPQIDA-MIB", "cpqDaTapeLibraryScsiBus"), ("CPQIDA-MIB", "cpqDaTapeLibraryScsiTarget"), ("CPQIDA-MIB", "cpqDaTapeLibraryScsiLun"), ("CPQIDA-MIB", "cpqDaTapeLibraryStatus"),)) cpqDaTapeLibraryDoorStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3021)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaTapeLibraryCntlrIndex"), ("CPQIDA-MIB", "cpqDaTapeLibraryScsiBus"), ("CPQIDA-MIB", "cpqDaTapeLibraryScsiTarget"), ("CPQIDA-MIB", "cpqDaTapeLibraryScsiLun"), ("CPQIDA-MIB", "cpqDaTapeLibraryDoorStatus"),)) cpqDaTapeDriveStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3022)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaTapeDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvBusIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvScsiIdIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvLunIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvStatus"),)) cpqDaTapeDriveCleaningRequired = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3023)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaTapeDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvBusIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvScsiIdIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvLunIndex"),)) cpqDaTapeDriveCleanTapeReplace = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3024)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaTapeDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvBusIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvScsiIdIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvLunIndex"),)) cpqDa5AccelStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3025)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrSlot"), ("CPQIDA-MIB", "cpqDaCntlrModel"), ("CPQIDA-MIB", "cpqDaAccelSerialNumber"), ("CPQIDA-MIB", "cpqDaAccelTotalMemory"), ("CPQIDA-MIB", "cpqDaAccelStatus"), ("CPQIDA-MIB", "cpqDaAccelErrCode"),)) cpqDa5AccelBadDataTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3026)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrSlot"), ("CPQIDA-MIB", "cpqDaCntlrModel"), ("CPQIDA-MIB", "cpqDaAccelSerialNumber"), ("CPQIDA-MIB", "cpqDaAccelTotalMemory"),)) cpqDa5AccelBatteryFailed = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3027)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrSlot"), ("CPQIDA-MIB", "cpqDaCntlrModel"), ("CPQIDA-MIB", "cpqDaAccelSerialNumber"), ("CPQIDA-MIB", "cpqDaAccelTotalMemory"),)) cpqDa5CntlrStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3028)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrSlot"), ("CPQIDA-MIB", "cpqDaCntlrBoardStatus"), ("CPQIDA-MIB", "cpqDaCntlrModel"), ("CPQIDA-MIB", "cpqDaCntlrSerialNumber"), ("CPQIDA-MIB", "cpqDaCntlrFWRev"), ("CPQIDA-MIB", "cpqDaAccelTotalMemory"),)) cpqDa5PhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3029)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaPhyDrvStatus"), ("CPQIDA-MIB", "cpqDaPhyDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaPhyDrvBusNumber"), ("CPQIDA-MIB", "cpqDaPhyDrvBay"), ("CPQIDA-MIB", "cpqDaPhyDrvModel"), ("CPQIDA-MIB", "cpqDaPhyDrvFWRev"), ("CPQIDA-MIB", "cpqDaPhyDrvSerialNum"), ("CPQIDA-MIB", "cpqDaPhyDrvFailureCode"),)) cpqDa5PhyDrvThreshPassedTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3030)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaPhyDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaPhyDrvBusNumber"), ("CPQIDA-MIB", "cpqDaPhyDrvBay"), ("CPQIDA-MIB", "cpqDaPhyDrvModel"), ("CPQIDA-MIB", "cpqDaPhyDrvFWRev"), ("CPQIDA-MIB", "cpqDaPhyDrvSerialNum"),)) cpqDa2TapeLibraryStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3031)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaTapeLibraryCntlrIndex"), ("CPQIDA-MIB", "cpqDaTapeLibraryScsiBus"), ("CPQIDA-MIB", "cpqDaTapeLibraryScsiTarget"), ("CPQIDA-MIB", "cpqDaTapeLibraryScsiLun"), ("CPQIDA-MIB", "cpqDaTapeLibraryModel"), ("CPQIDA-MIB", "cpqDaTapeLibraryFWRev"), ("CPQIDA-MIB", "cpqDaTapeLibrarySerialNumber"), ("CPQIDA-MIB", "cpqDaTapeLibraryStatus"),)) cpqDa2TapeDriveStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3032)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaTapeDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvBusIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvScsiIdIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvLunIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvName"), ("CPQIDA-MIB", "cpqDaTapeDrvFwRev"), ("CPQIDA-MIB", "cpqDaTapeDrvSerialNumber"), ("CPQIDA-MIB", "cpqDaTapeDrvStatus"),)) cpqDa6CntlrStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3033)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaCntlrIndex"), ("CPQIDA-MIB", "cpqDaCntlrBoardStatus"), ("CPQIDA-MIB", "cpqDaCntlrModel"), ("CPQIDA-MIB", "cpqDaCntlrSerialNumber"), ("CPQIDA-MIB", "cpqDaCntlrFWRev"), ("CPQIDA-MIB", "cpqDaAccelTotalMemory"),)) cpqDa6LogDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3034)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaLogDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaLogDrvIndex"), ("CPQIDA-MIB", "cpqDaLogDrvStatus"),)) cpqDa6SpareStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3035)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaSpareCntlrIndex"), ("CPQIDA-MIB", "cpqDaSparePhyDrvIndex"), ("CPQIDA-MIB", "cpqDaSpareStatus"), ("CPQIDA-MIB", "cpqDaSpareBusNumber"), ("CPQIDA-MIB", "cpqDaSpareBay"),)) cpqDa6PhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3036)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaPhyDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaPhyDrvIndex"), ("CPQIDA-MIB", "cpqDaPhyDrvBusNumber"), ("CPQIDA-MIB", "cpqDaPhyDrvBay"), ("CPQIDA-MIB", "cpqDaPhyDrvModel"), ("CPQIDA-MIB", "cpqDaPhyDrvFWRev"), ("CPQIDA-MIB", "cpqDaPhyDrvSerialNum"), ("CPQIDA-MIB", "cpqDaPhyDrvFailureCode"), ("CPQIDA-MIB", "cpqDaPhyDrvStatus"),)) cpqDa6PhyDrvThreshPassedTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3037)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaPhyDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaPhyDrvIndex"), ("CPQIDA-MIB", "cpqDaPhyDrvBusNumber"), ("CPQIDA-MIB", "cpqDaPhyDrvBay"), ("CPQIDA-MIB", "cpqDaPhyDrvModel"), ("CPQIDA-MIB", "cpqDaPhyDrvFWRev"), ("CPQIDA-MIB", "cpqDaPhyDrvSerialNum"),)) cpqDa6AccelStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3038)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaCntlrModel"), ("CPQIDA-MIB", "cpqDaAccelCntlrIndex"), ("CPQIDA-MIB", "cpqDaAccelSerialNumber"), ("CPQIDA-MIB", "cpqDaAccelTotalMemory"), ("CPQIDA-MIB", "cpqDaAccelStatus"), ("CPQIDA-MIB", "cpqDaAccelErrCode"),)) cpqDa6AccelBadDataTrap = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3039)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaCntlrModel"), ("CPQIDA-MIB", "cpqDaAccelCntlrIndex"), ("CPQIDA-MIB", "cpqDaAccelSerialNumber"), ("CPQIDA-MIB", "cpqDaAccelTotalMemory"),)) cpqDa6AccelBatteryFailed = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3040)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaCntlrModel"), ("CPQIDA-MIB", "cpqDaAccelCntlrIndex"), ("CPQIDA-MIB", "cpqDaAccelSerialNumber"), ("CPQIDA-MIB", "cpqDaAccelTotalMemory"),)) cpqDa6TapeLibraryStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3041)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaTapeLibraryCntlrIndex"), ("CPQIDA-MIB", "cpqDaTapeLibraryScsiBus"), ("CPQIDA-MIB", "cpqDaTapeLibraryScsiTarget"), ("CPQIDA-MIB", "cpqDaTapeLibraryScsiLun"), ("CPQIDA-MIB", "cpqDaTapeLibraryModel"), ("CPQIDA-MIB", "cpqDaTapeLibraryFWRev"), ("CPQIDA-MIB", "cpqDaTapeLibrarySerialNumber"), ("CPQIDA-MIB", "cpqDaTapeLibraryStatus"),)) cpqDa6TapeLibraryDoorStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3042)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaTapeLibraryCntlrIndex"), ("CPQIDA-MIB", "cpqDaTapeLibraryScsiBus"), ("CPQIDA-MIB", "cpqDaTapeLibraryScsiTarget"), ("CPQIDA-MIB", "cpqDaTapeLibraryScsiLun"), ("CPQIDA-MIB", "cpqDaTapeLibraryModel"), ("CPQIDA-MIB", "cpqDaTapeLibraryFWRev"), ("CPQIDA-MIB", "cpqDaTapeLibrarySerialNumber"), ("CPQIDA-MIB", "cpqDaTapeLibraryDoorStatus"),)) cpqDa6TapeDriveStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3043)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaTapeDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvBusIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvScsiIdIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvLunIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvName"), ("CPQIDA-MIB", "cpqDaTapeDrvFwRev"), ("CPQIDA-MIB", "cpqDaTapeDrvSerialNumber"), ("CPQIDA-MIB", "cpqDaTapeDrvStatus"),)) cpqDa6TapeDriveCleaningRequired = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3044)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaTapeDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvBusIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvScsiIdIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvLunIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvName"), ("CPQIDA-MIB", "cpqDaTapeDrvFwRev"), ("CPQIDA-MIB", "cpqDaTapeDrvSerialNumber"),)) cpqDa6TapeDriveCleanTapeReplace = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3045)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaTapeDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvBusIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvScsiIdIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvLunIndex"), ("CPQIDA-MIB", "cpqDaTapeDrvName"), ("CPQIDA-MIB", "cpqDaTapeDrvFwRev"), ("CPQIDA-MIB", "cpqDaTapeDrvSerialNumber"),)) cpqDa7PhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3046)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaPhyDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaPhyDrvIndex"), ("CPQIDA-MIB", "cpqDaPhyDrvLocationString"), ("CPQIDA-MIB", "cpqDaPhyDrvType"), ("CPQIDA-MIB", "cpqDaPhyDrvModel"), ("CPQIDA-MIB", "cpqDaPhyDrvFWRev"), ("CPQIDA-MIB", "cpqDaPhyDrvSerialNum"), ("CPQIDA-MIB", "cpqDaPhyDrvFailureCode"), ("CPQIDA-MIB", "cpqDaPhyDrvStatus"), ("CPQIDA-MIB", "cpqDaPhyDrvBusNumber"),)) cpqDa7SpareStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3047)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaSpareCntlrIndex"), ("CPQIDA-MIB", "cpqDaSparePhyDrvIndex"), ("CPQIDA-MIB", "cpqDaSpareStatus"), ("CPQIDA-MIB", "cpqDaSpareLocationString"), ("CPQIDA-MIB", "cpqDaSpareBusNumber"),)) cpqDaCntlrPartnerStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3048)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaCntlrIndex"), ("CPQIDA-MIB", "cpqDaCntlrModel"), ("CPQIDA-MIB", "cpqDaCntlrSerialNumber"), ("CPQIDA-MIB", "cpqDaCntlrPartnerSerialNumber"), ("CPQIDA-MIB", "cpqDaCntlrPartnerBoardStatus"),)) cpqDaPhyDrvSSDWearStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,3049)).setObjects(*(("CPQIDA-MIB", "sysName"), ("CPQIDA-MIB", "cpqHoTrapFlags"), ("CPQIDA-MIB", "cpqDaCntlrHwLocation"), ("CPQIDA-MIB", "cpqDaPhyDrvCntlrIndex"), ("CPQIDA-MIB", "cpqDaPhyDrvIndex"), ("CPQIDA-MIB", "cpqDaPhyDrvLocationString"), ("CPQIDA-MIB", "cpqDaPhyDrvType"), ("CPQIDA-MIB", "cpqDaPhyDrvModel"), ("CPQIDA-MIB", "cpqDaPhyDrvFWRev"), ("CPQIDA-MIB", "cpqDaPhyDrvSerialNum"), ("CPQIDA-MIB", "cpqDaPhyDrvSSDWearStatus"),)) mibBuilder.exportSymbols("CPQIDA-MIB", cpqDaPhyDrvFunctTest1=cpqDaPhyDrvFunctTest1, cpqDaTapeCountersTable=cpqDaTapeCountersTable, cpqDaCntlrOperatingMode=cpqDaCntlrOperatingMode, cpqDaPhyDrvCondition=cpqDaPhyDrvCondition, cpqDaPhyDrvHotPlugs=cpqDaPhyDrvHotPlugs, cpqDaPhyDrvQualifier=cpqDaPhyDrvQualifier, cpqDaPhyDrvThrFunctTest3=cpqDaPhyDrvThrFunctTest3, cpqDaPhyDrvPathBoxOnConnector=cpqDaPhyDrvPathBoxOnConnector, cpqDaOsNetWare3x=cpqDaOsNetWare3x, cpqDaCntlrEncryptCryptoOfficerPwdSetStatus=cpqDaCntlrEncryptCryptoOfficerPwdSetStatus, cpqDaSpareCntlrIndex=cpqDaSpareCntlrIndex, cpqDaLogDrvAvailSprAvailableSpareExtended=cpqDaLogDrvAvailSprAvailableSpareExtended, cpqDaPhyDrvUserDesc=cpqDaPhyDrvUserDesc, cpqDaPhyDrvPathCurrentRole=cpqDaPhyDrvPathCurrentRole, cpqDaPhyDrvRotationalSpeed=cpqDaPhyDrvRotationalSpeed, cpqDriveArray=cpqDriveArray, cpqDaTapeLibrary=cpqDaTapeLibrary, cpqDaTapeDrvCondition=cpqDaTapeDrvCondition, cpqDaLogDrvPerfWrites=cpqDaLogDrvPerfWrites, cpqDaLogDrvCondition=cpqDaLogDrvCondition, cpqDaCntlrProductRev=cpqDaCntlrProductRev, cpqDaSpareStatusChange=cpqDaSpareStatusChange, cpqDaCntlrEncryptionStatus=cpqDaCntlrEncryptionStatus, cpqDaPhyDrvHWrites=cpqDaPhyDrvHWrites, cpqDaPhyDrvPathTable=cpqDaPhyDrvPathTable, cpqDaLogDrvCacheVolAccelNoOfWriteHits=cpqDaLogDrvCacheVolAccelNoOfWriteHits, cpqDaAccelCntlrIndex=cpqDaAccelCntlrIndex, cpqDaPhyDrvThrRecvReadErrs=cpqDaPhyDrvThrRecvReadErrs, cpqDaNw3xFatalWrites=cpqDaNw3xFatalWrites, cpqDaPhyDrvNotReadyErrs=cpqDaPhyDrvNotReadyErrs, cpqDa5AccelBadDataTrap=cpqDa5AccelBadDataTrap, cpqDaTapeCountersTotalBytes=cpqDaTapeCountersTotalBytes, cpqDaSpareStatus=cpqDaSpareStatus, cpqDaMibRev=cpqDaMibRev, cpqDaPhyDrvStatus=cpqDaPhyDrvStatus, cpqDaPhyDrvTemperatureThreshold=cpqDaPhyDrvTemperatureThreshold, cpqDaSpareBusNumber=cpqDaSpareBusNumber, cpqDaAccelReadErrs=cpqDaAccelReadErrs, cpqDaPhyDrvHSeekErrs=cpqDaPhyDrvHSeekErrs, cpqDaCntlrSlot=cpqDaCntlrSlot, cpqDaPhyDrvStatusChange=cpqDaPhyDrvStatusChange, cpqDaPhyDrvCntlrIndex=cpqDaPhyDrvCntlrIndex, cpqDaMibRevMajor=cpqDaMibRevMajor, cpqDaCntlrTable=cpqDaCntlrTable, cpqDaTapeCountersBusIndex=cpqDaTapeCountersBusIndex, cpqDaManagedCableFaultCode=cpqDaManagedCableFaultCode, cpqDaLogDrvCacheVolAccelNoOfReadHits=cpqDaLogDrvCacheVolAccelNoOfReadHits, cpqDaPhyDrvPathCntlrIndex=cpqDaPhyDrvPathCntlrIndex, cpqDaLogDrvPerf=cpqDaLogDrvPerf, cpqDaPhyDrvCurrentTemperature=cpqDaPhyDrvCurrentTemperature, cpqDaPhyDrvMediaErrs=cpqDaPhyDrvMediaErrs, cpqDaLogDrvPhyDrvIDs=cpqDaLogDrvPhyDrvIDs, cpqDaPhyDrvSeeks=cpqDaPhyDrvSeeks, cpqDaCntlrUnencryptedLogDrvCreationPolicy=cpqDaCntlrUnencryptedLogDrvCreationPolicy, cpqDaAccelMemory=cpqDaAccelMemory, cpqDaTapeCountersScsiIdIndex=cpqDaTapeCountersScsiIdIndex, cpqDaCntlrStatusChange=cpqDaCntlrStatusChange, cpqDaLogDrvCacheVolAccelNoOfReadMissTotal=cpqDaLogDrvCacheVolAccelNoOfReadMissTotal, cpqDaLogDrvCacheVolumeAccelEntry=cpqDaLogDrvCacheVolumeAccelEntry, cpqDaNw3xTotalReads=cpqDaNw3xTotalReads, cpqDaNw3xCntlrIndex=cpqDaNw3xCntlrIndex, cpqDaPhyDrvThrEntry=cpqDaPhyDrvThrEntry, cpqDaTapeDrvLunIndex=cpqDaTapeDrvLunIndex, cpqDaTrapLogIndex=cpqDaTrapLogIndex, cpqDaPhyDrvSmartCarrierBootldrFWRev=cpqDaPhyDrvSmartCarrierBootldrFWRev, cpqDaPhyDrvThrOtherTimeouts=cpqDaPhyDrvThrOtherTimeouts, cpqDaPhyDrvPathEntry=cpqDaPhyDrvPathEntry, cpqDaNw3xPollType=cpqDaNw3xPollType, cpqDaPhyDrvThrCntlrIndex=cpqDaPhyDrvThrCntlrIndex, cpqDaPhyDrvThrIrqDeglitches=cpqDaPhyDrvThrIrqDeglitches, cpqDaCntlr=cpqDaCntlr, cpqDaTapeCountersTotalErrors=cpqDaTapeCountersTotalErrors, cpqDaTapeDrvEntry=cpqDaTapeDrvEntry, cpqDaLogDrvSSDSmartPathStatus=cpqDaLogDrvSSDSmartPathStatus, cpqDaLogDrvCacheVolAccelNoOfReadMissSkip=cpqDaLogDrvCacheVolAccelNoOfReadMissSkip, cpqDaPhyDrvThrMediaErrs=cpqDaPhyDrvThrMediaErrs, cpqDaPhyDrvThrIndex=cpqDaPhyDrvThrIndex, cpqDaPhyDrvSpinUpErrs=cpqDaPhyDrvSpinUpErrs, cpqDaLogDrvCacheVolAccelNoOfReadMissDoLoad=cpqDaLogDrvCacheVolAccelNoOfReadMissDoLoad, cpqDaPhyDrvFunctTest3=cpqDaPhyDrvFunctTest3, cpqDaPhyDrvThrFunctTest2=cpqDaPhyDrvThrFunctTest2, cpqDa2PhyDrvThreshPassedTrap=cpqDa2PhyDrvThreshPassedTrap, cpqDaManagedCableVendorSerialNumber=cpqDaManagedCableVendorSerialNumber, cpqDaCntlrFWRev=cpqDaCntlrFWRev, cpqDaPhyDrvErrEntry=cpqDaPhyDrvErrEntry, cpqDaLogDrvPerfTotalIO=cpqDaLogDrvPerfTotalIO, cpqDa3PhyDrvThreshPassedTrap=cpqDa3PhyDrvThreshPassedTrap, cpqDaPhyDrvThrHardWriteErrs=cpqDaPhyDrvThrHardWriteErrs, cpqDaAccelBatteryFailed=cpqDaAccelBatteryFailed, cpqDaPhyDrvThrTable=cpqDaPhyDrvThrTable, cpqDaCntlrPartnerBoardStatus=cpqDaCntlrPartnerBoardStatus, cpqDaTapeDrvType=cpqDaTapeDrvType, cpqDaTapeCountersReReads=cpqDaTapeCountersReReads, cpqDaAccelBattery=cpqDaAccelBattery, cpqDaCntlrPerfVersion=cpqDaCntlrPerfVersion, cpqDaPhyDrvThrViFunctTest2=cpqDaPhyDrvThrViFunctTest2, cpqDaPhyDrvConfigurationStatus=cpqDaPhyDrvConfigurationStatus, cpqDaComponent=cpqDaComponent, cpqDaCntlrEncryptCspNvramStatus=cpqDaCntlrEncryptCspNvramStatus, cpqDaCntlrSerialNumber=cpqDaCntlrSerialNumber, cpqDaNw3xVolLogDrvIndex=cpqDaNw3xVolLogDrvIndex, cpqDaLogDrvCacheVolAccelNoOfWriteMissSkip=cpqDaLogDrvCacheVolAccelNoOfWriteMissSkip, cpqDaNw3xCorrReads=cpqDaNw3xCorrReads, cpqDaManagedCableIndex=cpqDaManagedCableIndex, cpqDaLogDrvCacheVolAccelNoOfWriteMissDoLoadH=cpqDaLogDrvCacheVolAccelNoOfWriteMissDoLoadH, cpqDaLogDrv=cpqDaLogDrv, cpqDaTapeCountersCntlrIndex=cpqDaTapeCountersCntlrIndex, cpqDaManagedCableStatus=cpqDaManagedCableStatus, cpqDaTapeDrvNegotiatedLinkRate=cpqDaTapeDrvNegotiatedLinkRate, cpqDaPhyDrvOtherTimeouts=cpqDaPhyDrvOtherTimeouts, cpqDaPhyDrvSenseKey=cpqDaPhyDrvSenseKey, cpqDaLogDrvPhyDrvExtAttachEntry=cpqDaLogDrvPhyDrvExtAttachEntry, cpqDaPhyDrvErrType=cpqDaPhyDrvErrType, cpqDaTapeLibraryDriveList2=cpqDaTapeLibraryDriveList2, cpqDaPhyDrvRecvReadErrs=cpqDaPhyDrvRecvReadErrs, cpqDaLogDrvPerfAvgQueueDepth=cpqDaLogDrvPerfAvgQueueDepth, cpqDaLogDrvSplitMirrorBackupLogDrv=cpqDaLogDrvSplitMirrorBackupLogDrv, cpqDaPhyDrvThrHotPlugs=cpqDaPhyDrvThrHotPlugs, cpqDaLogDrvCacheVolAccelCacheLineSize=cpqDaLogDrvCacheVolAccelCacheLineSize, cpqDaTapeDrvCleanTapeRepl=cpqDaTapeDrvCleanTapeRepl, cpqDaPhyDrvThrHardReadErrs=cpqDaPhyDrvThrHardReadErrs, cpqDaManagedCableHostConnector=cpqDaManagedCableHostConnector, cpqDaCntlrPerfCntlrIndex=cpqDaCntlrPerfCntlrIndex, cpqDaPhyDrvScsiStatus=cpqDaPhyDrvScsiStatus, cpqDaNw3xLogDrvIndex=cpqDaNw3xLogDrvIndex, cpqDaTapeDrvHotPlug=cpqDaTapeDrvHotPlug, cpqDaAccelStatus=cpqDaAccelStatus, cpqDaPhyDrvMultipathAccess=cpqDaPhyDrvMultipathAccess, cpqDaLogDrvSprRplcAttachExtIndex=cpqDaLogDrvSprRplcAttachExtIndex, cpqDaLogDrvLogDrvExtended=cpqDaLogDrvLogDrvExtended, cpqDaPhyDrvThrSpinupTime=cpqDaPhyDrvThrSpinupTime, cpqDaTapeCounters=cpqDaTapeCounters, cpqDaCntlrRedundancyType=cpqDaCntlrRedundancyType, cpqDaTapeLibraryStatusChange=cpqDaTapeLibraryStatusChange, cpqDaPhyDrvThrBadRecvWrites=cpqDaPhyDrvThrBadRecvWrites, cpqDaTrapPkts=cpqDaTrapPkts, cpqDaPhyDrvPowerOnHours=cpqDaPhyDrvPowerOnHours, cpqDaPhyDrvType=cpqDaPhyDrvType, cpqDaLogDrvPerfEntry=cpqDaLogDrvPerfEntry, cpqDaCntlrEncryptCntlrPwdAvailStatus=cpqDaCntlrEncryptCntlrPwdAvailStatus, cpqDaPhyDrvFormatErrs=cpqDaPhyDrvFormatErrs, cpqDaAccelBadData=cpqDaAccelBadData, cpqDaLogDrvMultipathAccess=cpqDaLogDrvMultipathAccess, cpqDaPhyDrvHSeeks=cpqDaPhyDrvHSeeks, cpqDaSparePhyDrvIndex=cpqDaSparePhyDrvIndex, cpqDa6AccelBadDataTrap=cpqDa6AccelBadDataTrap, cpqDaPhyDrvUsedReallocs=cpqDaPhyDrvUsedReallocs, cpqDa5PhyDrvStatusChange=cpqDa5PhyDrvStatusChange, cpqDaCntlrCondition=cpqDaCntlrCondition, cpqDaLogDrvStripeSize=cpqDaLogDrvStripeSize, cpqDaTapeLibraryScsiBus=cpqDaTapeLibraryScsiBus, cpqDaPhyDrvAuthenticationStatus=cpqDaPhyDrvAuthenticationStatus, cpqDaLogDrvPerfCacheMisses=cpqDaLogDrvPerfCacheMisses, cpqDaLogDrvPhyDrvExtAttachTable=cpqDaLogDrvPhyDrvExtAttachTable, cpqDaAccelMemoryTransferRate=cpqDaAccelMemoryTransferRate, cpqDaPhyDrvErrDesc=cpqDaPhyDrvErrDesc, cpqDa2TapeDriveStatusChange=cpqDa2TapeDriveStatusChange, cpqDa2AccelBadDataTrap=cpqDa2AccelBadDataTrap, cpqDaTapeDrvCleanReq=cpqDaTapeDrvCleanReq, cpqDaLogDrvNmbrOfParityGroups=cpqDaLogDrvNmbrOfParityGroups, cpqDaAccelTable=cpqDaAccelTable, cpqDaCntlrBoardCondition=cpqDaCntlrBoardCondition, cpqDaMibCondition=cpqDaMibCondition, cpqDaTapeCountersLunIndex=cpqDaTapeCountersLunIndex, cpqDaLogDrvPerfReads=cpqDaLogDrvPerfReads, cpqDaPhyDrvCamStatus=cpqDaPhyDrvCamStatus, cpqDaPhyDrvFunctTest2=cpqDaPhyDrvFunctTest2, cpqDaLogDrvCacheVolAccelCacheState=cpqDaLogDrvCacheVolAccelCacheState, cpqDaCntlrHBAModeOptionRomRev=cpqDaCntlrHBAModeOptionRomRev, cpqDaCntlrOptionRomRev=cpqDaCntlrOptionRomRev, cpqDaTapeDrvPlacement=cpqDaTapeDrvPlacement, cpqDa6AccelStatusChange=cpqDa6AccelStatusChange, cpqDaAccelCondition=cpqDaAccelCondition, cpqDaCntlrHwLocation=cpqDaCntlrHwLocation, cpqDaCntlrPerfCommandCount=cpqDaCntlrPerfCommandCount, cpqDaPhyDrvCurrentWidth=cpqDaPhyDrvCurrentWidth, cpqDaPhyDrvHardReadErrs=cpqDaPhyDrvHardReadErrs, cpqDaTapeLibraryDoorStatusChange=cpqDaTapeLibraryDoorStatusChange, cpqDaLogDrvCacheVolAccelLogDrvIndex=cpqDaLogDrvCacheVolAccelLogDrvIndex, cpqDaNw3xTotalWrites=cpqDaNw3xTotalWrites, cpqDaCntlrPerfAvgLatency=cpqDaCntlrPerfAvgLatency, cpqDaPhyDrvErrIndex=cpqDaPhyDrvErrIndex, cpqDaAccelReadMemory=cpqDaAccelReadMemory, cpqDaPhyDrv=cpqDaPhyDrv, cpqDa2AccelBatteryFailed=cpqDa2AccelBatteryFailed, cpqDaSparePercentRebuild=cpqDaSparePercentRebuild, cpqDaPhyDrvMaximumTemperature=cpqDaPhyDrvMaximumTemperature, cpqDaPhyDrvPhyCount=cpqDaPhyDrvPhyCount, cpqDa7PhyDrvStatusChange=cpqDa7PhyDrvStatusChange, cpqDaPhyDrvBay=cpqDaPhyDrvBay, cpqDaManagedCableVendorPartNumber=cpqDaManagedCableVendorPartNumber, cpqDaPhyDrvHotPlug=cpqDaPhyDrvHotPlug, cpqDaPhyDrvThrViSpinupTime=cpqDaPhyDrvThrViSpinupTime, cpqDaPhyDrvNegotiatedLinkRate=cpqDaPhyDrvNegotiatedLinkRate, cpqDaOsCommonModuleEntry=cpqDaOsCommonModuleEntry, cpqDaTrapTime=cpqDaTrapTime, cpqDaPhyDrvIndex=cpqDaPhyDrvIndex, cpqDaLogDrvOsName=cpqDaLogDrvOsName, cpqDaLogDrvCacheVolAccelNoOfReadHitsH=cpqDaLogDrvCacheVolAccelNoOfReadHitsH, cpqDaTapeCountersReWrites=cpqDaTapeCountersReWrites, cpqDaLogDrvPhyDrvAttachExtIndex=cpqDaLogDrvPhyDrvAttachExtIndex, cpqDa2SpareStatusChange=cpqDa2SpareStatusChange, cpqDa6TapeLibraryDoorStatusChange=cpqDa6TapeLibraryDoorStatusChange, cpqDaCntlrNumberOfExternalPorts=cpqDaCntlrNumberOfExternalPorts, cpqDaCntlrEncryptedLogDrvCreationPolicy=cpqDaCntlrEncryptedLogDrvCreationPolicy, cpqDaInterface=cpqDaInterface, cpqDaTapeLibraryCntlrIndex=cpqDaTapeLibraryCntlrIndex, cpqDaLogDrvBlinkTime=cpqDaLogDrvBlinkTime, cpqDaTapeDrvSerialNumber=cpqDaTapeDrvSerialNumber, cpqDaLogDrvSprRplcExtAttachTable=cpqDaLogDrvSprRplcExtAttachTable, cpqDaPhyDrvThrRecvWriteErrs=cpqDaPhyDrvThrRecvWriteErrs, cpqDaAccelErrCode=cpqDaAccelErrCode, cpqDaTapeDrvTable=cpqDaTapeDrvTable, cpqDaPhyDrvSSDPercntEndrnceUsed=cpqDaPhyDrvSSDPercntEndrnceUsed, cpqDaLogDrvCacheVolAccelNoOfReadMissLocked=cpqDaLogDrvCacheVolAccelNoOfReadMissLocked, cpqDaTrapLogTable=cpqDaTrapLogTable, cpqDaCntlrIndex=cpqDaCntlrIndex, cpqDaPhyDrvBusFaults=cpqDaPhyDrvBusFaults, cpqDaPhyDrvThr=cpqDaPhyDrvThr, cpqDa6AccelBatteryFailed=cpqDa6AccelBatteryFailed, cpqDaPhyDrvEntry=cpqDaPhyDrvEntry, cpqDa6SpareStatusChange=cpqDa6SpareStatusChange, cpqDaOsCommonModuleIndex=cpqDaOsCommonModuleIndex, cpqDaPhyDrvRefHours=cpqDaPhyDrvRefHours, cpqDaSpareReplacedDrvBay=cpqDaSpareReplacedDrvBay, cpqDaPhyDrvPreFailMonitoring=cpqDaPhyDrvPreFailMonitoring, cpqDaCntlrPerfInstance=cpqDaCntlrPerfInstance, cpqDaCntlrExpandPriority=cpqDaCntlrExpandPriority, cpqDaLogDrvHasAccel=cpqDaLogDrvHasAccel, cpqDaPhyDrvSmartStatus=cpqDaPhyDrvSmartStatus, cpqDaPhyDrvThrViFunctTest1=cpqDaPhyDrvThrViFunctTest1, cpqDaPhyDrvThrHSeekErrs=cpqDaPhyDrvThrHSeekErrs, cpqDaCntlrRedundancyError=cpqDaCntlrRedundancyError, cpqDaPhyDrvPathHostConnector=cpqDaPhyDrvPathHostConnector, cpqDaLogDrvPerfCntlrIndex=cpqDaLogDrvPerfCntlrIndex, cpqDaPhyDrvTime=cpqDaPhyDrvTime, cpqDaPhyDrvSpinupTime=cpqDaPhyDrvSpinupTime, cpqDa6PhyDrvThreshPassedTrap=cpqDa6PhyDrvThreshPassedTrap, cpqDaLogDrvCacheVolAccelNoOfWriteMissSkipH=cpqDaLogDrvCacheVolAccelNoOfWriteMissSkipH, cpqDaPhyDrvModel=cpqDaPhyDrvModel, cpqDaTrapLogMaxSize=cpqDaTrapLogMaxSize, cpqDaTapeDrvBusIndex=cpqDaTapeDrvBusIndex, cpqDaNw3xPollTime=cpqDaNw3xPollTime, cpqDaAccelEntry=cpqDaAccelEntry, cpqDaTapeLibraryModel=cpqDaTapeLibraryModel, cpqDaPhyDrvThrDrqTimeouts=cpqDaPhyDrvThrDrqTimeouts, cpqDaPhyDrvBlinkTime=cpqDaPhyDrvBlinkTime, cpqDaPhyDrvHostConnector=cpqDaPhyDrvHostConnector, cpqDaLogDrvCacheVolAccelWritePolicy=cpqDaLogDrvCacheVolAccelWritePolicy, cpqDaNw3xFatalReads=cpqDaNw3xFatalReads, cpqDaSpareTable=cpqDaSpareTable, cpqDaLogDrvCacheVolAccelNoOfWriteMissLockedH=cpqDaLogDrvCacheVolAccelNoOfWriteMissLockedH, cpqDa6PhyDrvStatusChange=cpqDa6PhyDrvStatusChange, cpqDaTapeDrvProtocol=cpqDaTapeDrvProtocol) mibBuilder.exportSymbols("CPQIDA-MIB", cpqDaCntlrStndIntr=cpqDaCntlrStndIntr, cpqDaLogDrvAvailSpares=cpqDaLogDrvAvailSpares, cpqDaLogDrvSpareReplaceMap=cpqDaLogDrvSpareReplaceMap, cpqDaCntlrPartnerStatusChange=cpqDaCntlrPartnerStatusChange, cpqDaOsCommonModuleDate=cpqDaOsCommonModuleDate, cpqDaLogDrvPercentRebuild=cpqDaLogDrvPercentRebuild, cpqDaManagedCableEntry=cpqDaManagedCableEntry, cpqDaPhyDrvIrqDeglitches=cpqDaPhyDrvIrqDeglitches, cpqDaLogDrvCacheVolAccelWriteCacheHitRate=cpqDaLogDrvCacheVolAccelWriteCacheHitRate, cpqDa2LogDrvStatusChange=cpqDa2LogDrvStatusChange, cpqDaManagedCableVendorRevision=cpqDaManagedCableVendorRevision, cpqDaLogDrvCacheVolAccelReadCacheHitRate=cpqDaLogDrvCacheVolAccelReadCacheHitRate, cpqDaLogDrvStatusChange=cpqDaLogDrvStatusChange, cpqDaAccelStatusChange=cpqDaAccelStatusChange, cpqDaPhyDrvLocationString=cpqDaPhyDrvLocationString, cpqDa3AccelBatteryFailed=cpqDa3AccelBatteryFailed, cpqDaTapeLibraryDriveList=cpqDaTapeLibraryDriveList, cpqDaSpareReplacedDrvBusNumber=cpqDaSpareReplacedDrvBusNumber, cpqDaLogDrvCacheVolAccelNoOfWriteMissTotalH=cpqDaLogDrvCacheVolAccelNoOfWriteMissTotalH, cpqDaLogDrvRebuildBlks=cpqDaLogDrvRebuildBlks, cpqDaLogDrvAvailSprLogDrvExtended=cpqDaLogDrvAvailSprLogDrvExtended, cpqDaTapeDrvMagSize=cpqDaTapeDrvMagSize, cpqDaPhyDrvThrSpinUpErrs=cpqDaPhyDrvThrSpinUpErrs, cpqDaNw3xDriverStatTable=cpqDaNw3xDriverStatTable, cpqDaPhyDrvThrReallocAborts=cpqDaPhyDrvThrReallocAborts, cpqDaPhyDrvSerialNum=cpqDaPhyDrvSerialNum, cpqDaCntlrNumberOfBuses=cpqDaCntlrNumberOfBuses, cpqDaCntlrEncryptCntlrPwdSetStatus=cpqDaCntlrEncryptCntlrPwdSetStatus, cpqDaCntlrEntry=cpqDaCntlrEntry, cpqDaCntlrCurrentTemp=cpqDaCntlrCurrentTemp, cpqDaTapeDrvCleanTapeCount=cpqDaTapeDrvCleanTapeCount, cpqDaCntlrPartnerSlot=cpqDaCntlrPartnerSlot, cpqDaLogDrvCacheVolAccelCachingAlgorithm=cpqDaLogDrvCacheVolAccelCachingAlgorithm, cpqDaNw3xDriverVer=cpqDaNw3xDriverVer, cpqDaLogDrvPerfTable=cpqDaLogDrvPerfTable, cpqDaManagedCableLength=cpqDaManagedCableLength, cpqDaPhyDrvSSDWearStatusChange=cpqDaPhyDrvSSDWearStatusChange, cpqDaPhyDrvHasMonInfo=cpqDaPhyDrvHasMonInfo, cpqDaAccelBadDataTrap=cpqDaAccelBadDataTrap, cpqDaTapeLibraryCurrentSpeed=cpqDaTapeLibraryCurrentSpeed, cpqDaLogDrvAutoRel=cpqDaLogDrvAutoRel, cpqDa3PhyDrvStatusChange=cpqDa3PhyDrvStatusChange, cpqDaCntlrDriveWriteCacheState=cpqDaCntlrDriveWriteCacheState, cpqDaTapeDriveStatusChange=cpqDaTapeDriveStatusChange, cpqDaPhyDrvTable=cpqDaPhyDrvTable, cpqDaPhyDrvFactReallocs=cpqDaPhyDrvFactReallocs, cpqDa7SpareStatusChange=cpqDa7SpareStatusChange, cpqDaOsCommon=cpqDaOsCommon, cpqDaPhyDrvThrBusFaults=cpqDaPhyDrvThrBusFaults, cpqDaTapeLibraryOverallCondition=cpqDaTapeLibraryOverallCondition, cpqDaCntlrNumberOfInternalPorts=cpqDaCntlrNumberOfInternalPorts, cpqDaLogDrvCacheVolAccelNoOfWriteMissLocked=cpqDaLogDrvCacheVolAccelNoOfWriteMissLocked, cpqDa3LogDrvStatusChange=cpqDa3LogDrvStatusChange, cpqDa4SpareStatusChange=cpqDa4SpareStatusChange, cpqDaLogDrvSize=cpqDaLogDrvSize, cpqDaPhyDrvRecvWriteErrs=cpqDaPhyDrvRecvWriteErrs, cpqDaAccelBackupPowerSource=cpqDaAccelBackupPowerSource, cpqDaOsCommonModuleTable=cpqDaOsCommonModuleTable, cpqDaNw3xVolMapTable=cpqDaNw3xVolMapTable, cpqDa2AccelStatusChange=cpqDa2AccelStatusChange, cpqDa6TapeDriveCleaningRequired=cpqDa6TapeDriveCleaningRequired, cpqDaPhyDrvThrPostErrs=cpqDaPhyDrvThrPostErrs, cpqDaTapeLibraryScsiTarget=cpqDaTapeLibraryScsiTarget, cpqDaPhyDrvThrSeekErrs=cpqDaPhyDrvThrSeekErrs, cpqDaLogDrvFaultTol=cpqDaLogDrvFaultTol, cpqDaLogDrvPerfSampleInterval=cpqDaLogDrvPerfSampleInterval, cpqDaTapeLibraryCurrentWidth=cpqDaTapeLibraryCurrentWidth, cpqDaTapeDrvName=cpqDaTapeDrvName, cpqDaManagedCableTable=cpqDaManagedCableTable, cpqDaLogDrvSprRplcCntlrExtended=cpqDaLogDrvSprRplcCntlrExtended, cpqDaPhyDrvPathStatus=cpqDaPhyDrvPathStatus, cpqDaAccelReadCachePercent=cpqDaAccelReadCachePercent, cpqDaCntlrHbaFWRev=cpqDaCntlrHbaFWRev, cpqDaCntlrPerfSampleInterval=cpqDaCntlrPerfSampleInterval, cpqDaCntlrPerfCpuPercentBusy=cpqDaCntlrPerfCpuPercentBusy, cpqDaPhyDrvHReads=cpqDaPhyDrvHReads, cpqDaSpareBay=cpqDaSpareBay, cpqDaPhyDrvThrSpinupRetries=cpqDaPhyDrvThrSpinupRetries, cpqDaLogDrvEncryptionStatus=cpqDaLogDrvEncryptionStatus, cpqDaPhyDrvThrViUsedReallocs=cpqDaPhyDrvThrViUsedReallocs, cpqDaTapeDrvFwRev=cpqDaTapeDrvFwRev, cpqDaPhyDrvLocation=cpqDaPhyDrvLocation, cpqDaTapeDrvCntlrIndex=cpqDaTapeDrvCntlrIndex, cpqDaAccelWriteCachePercent=cpqDaAccelWriteCachePercent, cpqDaLogDrvCacheVolAccelLoadFailures=cpqDaLogDrvCacheVolAccelLoadFailures, cpqDa5CntlrStatusChange=cpqDa5CntlrStatusChange, cpqDaPhyDrvThrFunctTest1=cpqDaPhyDrvThrFunctTest1, cpqDaPhyDrvThrAbortedCmds=cpqDaPhyDrvThrAbortedCmds, cpqDaTapeDrvLibraryDrive=cpqDaTapeDrvLibraryDrive, cpqDa2PhyDrvStatusChange=cpqDa2PhyDrvStatusChange, cpqDaTapeDriveCleaningRequired=cpqDaTapeDriveCleaningRequired, cpqDaPhyDrvBadTargetErrs=cpqDaPhyDrvBadTargetErrs, cpqDaCntlrEncryptFWLockStatus=cpqDaCntlrEncryptFWLockStatus, cpqDaSpareEntry=cpqDaSpareEntry, cpqDaTapeDriveCleanTapeReplace=cpqDaTapeDriveCleanTapeReplace, cpqDa6TapeLibraryStatusChange=cpqDa6TapeLibraryStatusChange, cpqDaPhyDrvPathIndex=cpqDaPhyDrvPathIndex, cpqDaSpareReplacedDrv=cpqDaSpareReplacedDrv, cpqDaManagedCableCntlrIndex=cpqDaManagedCableCntlrIndex, cpqDa6LogDrvStatusChange=cpqDa6LogDrvStatusChange, cpqDaTrap=cpqDaTrap, cpqDaPhyDrvPathDrvIndex=cpqDaPhyDrvPathDrvIndex, cpqDaLogDrvAvailSprCntlrExtended=cpqDaLogDrvAvailSprCntlrExtended, cpqDaCntlrActive=cpqDaCntlrActive, cpqDaLogDrvCacheVolAccelNoOfReadMissLockedH=cpqDaLogDrvCacheVolAccelNoOfReadMissLockedH, cpqDa5AccelBatteryFailed=cpqDa5AccelBatteryFailed, cpqDaPhyDrvPlacement=cpqDaPhyDrvPlacement, cpqDaPhyDrvThrNotReadyErrs=cpqDaPhyDrvThrNotReadyErrs, cpqDaLogDrvCntlrExtended=cpqDaLogDrvCntlrExtended, cpqDaLogDrvCacheVolAccelNoOfReadMissTotalH=cpqDaLogDrvCacheVolAccelNoOfReadMissTotalH, cpqDaPhyDrvThrHardwareErrs=cpqDaPhyDrvThrHardwareErrs, cpqDaPhyDrvBadRecvReads=cpqDaPhyDrvBadRecvReads, cpqDaPhyDrvErrCntlrIndex=cpqDaPhyDrvErrCntlrIndex, cpqDaCntlrBlinkTime=cpqDaCntlrBlinkTime, cpqDaPhyDrvBadRecvWrites=cpqDaPhyDrvBadRecvWrites, cpqDaOsCommonModulePurpose=cpqDaOsCommonModulePurpose, cpqDaLogDrvCacheVolAccelNoOfReadMissSkipH=cpqDaLogDrvCacheVolAccelNoOfReadMissSkipH, cpqDaTapeLibraryTable=cpqDaTapeLibraryTable, cpqDaNw3xCorrWrites=cpqDaNw3xCorrWrites, cpqDaPhyDrvBoxOnConnector=cpqDaPhyDrvBoxOnConnector, cpqDaTapeCountersEntry=cpqDaTapeCountersEntry, cpqDaTapeDrvScsiIdIndex=cpqDaTapeDrvScsiIdIndex, cpqDaAccelFailedBatteries=cpqDaAccelFailedBatteries, cpqDaNw3xVolCntlrIndex=cpqDaNw3xVolCntlrIndex, cpqDaAccelMemoryDataWidth=cpqDaAccelMemoryDataWidth, cpqDaPhyDrvSpinupRetries=cpqDaPhyDrvSpinupRetries, cpqDaAccelWriteErrs=cpqDaAccelWriteErrs, cpqDaCntlrCurrentRole=cpqDaCntlrCurrentRole, cpqDaLogDrvTable=cpqDaLogDrvTable, cpqDaLogDrvSprRplcLogDrvExtended=cpqDaLogDrvSprRplcLogDrvExtended, cpqDaCntlrModel=cpqDaCntlrModel, cpqDa3AccelBadDataTrap=cpqDa3AccelBadDataTrap, cpqDaAccelSerialNumber=cpqDaAccelSerialNumber, cpqDaPhyDrvDrqTimeouts=cpqDaPhyDrvDrqTimeouts, cpqDaCntlrPartnerBoardCondition=cpqDaCntlrPartnerBoardCondition, cpqDaLogDrvStatus=cpqDaLogDrvStatus, cpqDaLogDrvCacheVolAccelNoOfWriteMissDoLoad=cpqDaLogDrvCacheVolAccelNoOfWriteMissDoLoad, cpqDaLogDrvCacheVolAccelNoOfWriteMissTotal=cpqDaLogDrvCacheVolAccelNoOfWriteMissTotal, cpqDaPhyDrvThreshPassedTrap=cpqDaPhyDrvThreshPassedTrap, cpqDaCntlrAccessModuleStatus=cpqDaCntlrAccessModuleStatus, cpqDaTapeDrv=cpqDaTapeDrv, cpqDaLogDrvPerfSectorsRead=cpqDaLogDrvPerfSectorsRead, cpqDaTapeLibraryEntry=cpqDaTapeLibraryEntry, cpqDaNw3xVolMapEntry=cpqDaNw3xVolMapEntry, cpqDa4PhyDrvStatusChange=cpqDa4PhyDrvStatusChange, cpqDa5AccelStatusChange=cpqDa5AccelStatusChange, cpqDa3AccelStatusChange=cpqDa3AccelStatusChange, cpqDaTapeLibraryStatMoves=cpqDaTapeLibraryStatMoves, cpqDaPhyDrvBlock=cpqDaPhyDrvBlock, cpqDaTrapLogEntry=cpqDaTrapLogEntry, cpqDaPhyDrvThrViFunctTest3=cpqDaPhyDrvThrViFunctTest3, cpqDaLogDrvSprRplcReplacedPhysDrvExtended=cpqDaLogDrvSprRplcReplacedPhysDrvExtended, cpqDaOsCommonModuleVersion=cpqDaOsCommonModuleVersion, cpqDaCntlrPerfTable=cpqDaCntlrPerfTable, cpqDa6CntlrStatusChange=cpqDa6CntlrStatusChange, cpqDaLogDrvAvailSprAttachExtIndex=cpqDaLogDrvAvailSprAttachExtIndex, cpqDaLogDrvCntlrIndex=cpqDaLogDrvCntlrIndex, cpqDaNw3xVolMap=cpqDaNw3xVolMap, cpqDaLogDrvCacheVolAccelNoOfReadMissLoadingH=cpqDaLogDrvCacheVolAccelNoOfReadMissLoadingH, cpqDaLogDrvCacheVolAccelAssocType=cpqDaLogDrvCacheVolAccelAssocType, cpqDaCntlrPerf=cpqDaCntlrPerf, cpqDaLogDrvPerfCacheHits=cpqDaLogDrvPerfCacheHits, cpqDaLogDrvSprRplcExtAttachEntry=cpqDaLogDrvSprRplcExtAttachEntry, cpqDaNw3xDriverStatEntry=cpqDaNw3xDriverStatEntry, cpqDaTapeDrvFwSubtype=cpqDaTapeDrvFwSubtype, cpqDaPhyDrvNcqSupport=cpqDaPhyDrvNcqSupport, cpqDaPhyDrvThrBadTargetErrs=cpqDaPhyDrvThrBadTargetErrs, cpqDaPhyDrvErrTable=cpqDaPhyDrvErrTable, cpqDaTapeLibraryProtocol=cpqDaTapeLibraryProtocol, cpqDaSpareDrv=cpqDaSpareDrv, cpqDaAccelCapacitorCurrentTemp=cpqDaAccelCapacitorCurrentTemp, cpqDaLogDrvPerfInstance=cpqDaLogDrvPerfInstance, cpqDaAccelTotalMemory=cpqDaAccelTotalMemory, cpqDaTapeDrvStatus=cpqDaTapeDrvStatus, cpqDaPhyDrvSSDEstTimeRemainingHours=cpqDaPhyDrvSSDEstTimeRemainingHours, cpqDaLogDrvCacheVolIndex=cpqDaLogDrvCacheVolIndex, cpqDaLogDrvCacheVolAccelNoOfWriteMissLoadingH=cpqDaLogDrvCacheVolAccelNoOfWriteMissLoadingH, cpqDaLogDrvCacheVolAccelNoOfReadMissDoLoadH=cpqDaLogDrvCacheVolAccelNoOfReadMissDoLoadH, cpqDaSpareLocationString=cpqDaSpareLocationString, cpqDaCntlrRebuildPriority=cpqDaCntlrRebuildPriority, cpqDaPhyDrvPostErrs=cpqDaPhyDrvPostErrs, cpqDaOsCommonCollectionReset=cpqDaOsCommonCollectionReset, cpqDaLogDrvCacheVolAccelNoOfReadMissLoading=cpqDaLogDrvCacheVolAccelNoOfReadMissLoading, cpqDaPhyDrvReallocAborts=cpqDaPhyDrvReallocAborts, cpqDaLogDrvPerfSectorsWritten=cpqDaLogDrvPerfSectorsWritten, cpqDaPhyDrvWrites=cpqDaPhyDrvWrites, cpqDaTapeCountersTotalUncorrectable=cpqDaTapeCountersTotalUncorrectable, cpqDaTapeLibraryStatHours=cpqDaTapeLibraryStatHours, cpqDaTapeLibraryStatus=cpqDaTapeLibraryStatus, cpqDaOsCommonModuleName=cpqDaOsCommonModuleName, cpqDaPhyDrvSeekErrs=cpqDaPhyDrvSeekErrs, cpqDaPhyDrvSenseCode=cpqDaPhyDrvSenseCode, cpqDaTapeLibraryLastError=cpqDaTapeLibraryLastError, cpqDaCntlrBoardStatus=cpqDaCntlrBoardStatus, cpqDaCntlrPerfEntry=cpqDaCntlrPerfEntry, cpqDaPhyDrvSmartCarrierAppFWRev=cpqDaPhyDrvSmartCarrierAppFWRev, cpqDaLogDrvRPIPercentComplete=cpqDaLogDrvRPIPercentComplete, cpqDaTapeLibraryNegotiatedLinkRate=cpqDaTapeLibraryNegotiatedLinkRate, cpqDaPhyDrvHardwareErrs=cpqDaPhyDrvHardwareErrs, cpqDaTapeLibrarySerialNumber=cpqDaTapeLibrarySerialNumber, cpqDaTapeLibraryCondition=cpqDaTapeLibraryCondition, cpqDaPhyDrvPathLocationString=cpqDaPhyDrvPathLocationString, cpqDaPhyDrvAbortedCmds=cpqDaPhyDrvAbortedCmds, cpqDaCntlrPartnerSerialNumber=cpqDaCntlrPartnerSerialNumber, cpqDaPhyDrvEncryptionStatus=cpqDaPhyDrvEncryptionStatus, cpqDaPhyDrvReads=cpqDaPhyDrvReads, cpqDaPhyDrvErrIDIndex=cpqDaPhyDrvErrIDIndex, cpqDaPhyDrvFailureCode=cpqDaPhyDrvFailureCode, cpqDaPhyDrvBusNumber=cpqDaPhyDrvBusNumber, cpqDaPhyDrvThrBadRecvReads=cpqDaPhyDrvThrBadRecvReads, cpqDa4PhyDrvThreshPassedTrap=cpqDa4PhyDrvThreshPassedTrap, cpqDaLogDrvAvalSprExtAttachTable=cpqDaLogDrvAvalSprExtAttachTable, cpqDaPhyDrvThreshPassed=cpqDaPhyDrvThreshPassed, cpqDaTapeDrvCurrentWidth=cpqDaTapeDrvCurrentWidth, cpqDaPhyDrvSataVersion=cpqDaPhyDrvSataVersion, cpqDaPhyDrvFWRev=cpqDaPhyDrvFWRev, cpqDaLogDrvPerfIndex=cpqDaLogDrvPerfIndex, cpqDaOsCommonPollFreq=cpqDaOsCommonPollFreq, cpqDaPhyDrvSSDWearStatus=cpqDaPhyDrvSSDWearStatus, cpqDaSpareRebuildBlks=cpqDaSpareRebuildBlks, cpqDa2TapeLibraryStatusChange=cpqDa2TapeLibraryStatusChange, cpqDaNw3xDriverName=cpqDaNw3xDriverName, cpqDaPhyDrvThrRefHours=cpqDaPhyDrvThrRefHours, cpqDaLogDrvSprRplcSparePhysDrvExtended=cpqDaLogDrvSprRplcSparePhysDrvExtended, cpqDaPhyDrvCurrentSpeed=cpqDaPhyDrvCurrentSpeed, cpqDaPhyDrvScsiOp=cpqDaPhyDrvScsiOp, cpqDa5PhyDrvThreshPassedTrap=cpqDa5PhyDrvThreshPassedTrap, cpqDaLogDrvCacheVolumeAccelTable=cpqDaLogDrvCacheVolumeAccelTable, cpqDaLogDrvPhyDrvExtended=cpqDaLogDrvPhyDrvExtended, cpqDaMibRevMinor=cpqDaMibRevMinor, cpqDa6TapeDriveCleanTapeReplace=cpqDa6TapeDriveCleanTapeReplace, cpqDaLogDrvCacheVolAccelNoOfWriteMissLoading=cpqDaLogDrvCacheVolAccelNoOfWriteMissLoading, cpqDaAccelBoardCurrentTemp=cpqDaAccelBoardCurrentTemp, cpqDaLogDrvPerfReadAheadSectors=cpqDaLogDrvPerfReadAheadSectors, cpqDaLogDrvRebuildingPhyDrv=cpqDaLogDrvRebuildingPhyDrv, cpqDaLogDrvCacheVolAccelNoOfWriteHitsH=cpqDaLogDrvCacheVolAccelNoOfWriteHitsH, cpqDaPhyDrvSize=cpqDaPhyDrvSize, cpqDa6TapeDriveStatusChange=cpqDa6TapeDriveStatusChange, cpqDaLogDrvCacheVolAccelCntlrIndex=cpqDaLogDrvCacheVolAccelCntlrIndex, cpqDaCntlrASICEncptSelfTestStatus=cpqDaCntlrASICEncptSelfTestStatus, cpqDaPhyDrvThrFormatErrs=cpqDaPhyDrvThrFormatErrs, cpqDaPhyDrvHardWriteErrs=cpqDaPhyDrvHardWriteErrs, cpqDaCntlrDriveOwnership=cpqDaCntlrDriveOwnership, cpqDaPhyDrvBlockValid=cpqDaPhyDrvBlockValid, cpqDaCntlrDaughterBoardType=cpqDaCntlrDaughterBoardType, cpqDaCntlrLastLockupCode=cpqDaCntlrLastLockupCode, cpqDaSpareCondition=cpqDaSpareCondition, cpqDaTapeDrvCurrentSpeed=cpqDaTapeDrvCurrentSpeed, cpqDaLogDrvAvalSprExtAttachEntry=cpqDaLogDrvAvalSprExtAttachEntry, cpqDaTrapType=cpqDaTrapType, cpqDaTapeLibraryScsiLun=cpqDaTapeLibraryScsiLun, cpqDaTapeLibraryFWRev=cpqDaTapeLibraryFWRev, cpqDaLogDrvEntry=cpqDaLogDrvEntry, cpqDa3SpareStatusChange=cpqDa3SpareStatusChange) mibBuilder.exportSymbols("CPQIDA-MIB", cpqDaTapeLibraryDoorStatus=cpqDaTapeLibraryDoorStatus, cpqDaPhyDrvThrUsedReallocs=cpqDaPhyDrvThrUsedReallocs, cpqDaPhyDrvMediaType=cpqDaPhyDrvMediaType, cpqDaLogDrvIndex=cpqDaLogDrvIndex) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/snmp/cpqdisk_mibs/CPQSCSI-MIB.py0000664000175000017500000023666100000000000025757 0ustar00zuulzuul00000000000000# # PySNMP MIB module CPQSCSI-MIB (http://pysnmp.sf.net) # ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") ( compaq, cpqHoTrapFlags, ) = mibBuilder.importSymbols("CPQHOST-MIB", "compaq", "cpqHoTrapFlags") ( NotificationGroup, ModuleCompliance, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") ( sysName, ) = mibBuilder.importSymbols("SNMPv2-MIB", "sysName") ( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, IpAddress, TimeTicks, Counter64, Unsigned32, enterprises, iso, Gauge32, NotificationType, ModuleIdentity, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "enterprises", "iso", "Gauge32", "NotificationType", "ModuleIdentity", "ObjectIdentity", "Bits", "Counter32") ( DisplayString, TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") cpqScsi = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5)) cpqScsiMibRev = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 1)) cpqScsiComponent = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 2)) cpqScsiTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 3)) cpqTapeComponent = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 4)) cpqSasComponent = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 5)) cpqScsiInterface = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 2, 1)) cpqScsiCntlr = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 2, 2)) cpqScsiLogDrv = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 2, 3)) cpqScsiPhyDrv = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 2, 4)) cpqScsiTarget = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 2, 5)) cpqScsiCd = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 2, 6)) cpqScsiOsNetWare = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1)) cpqScsiOsCommon = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 4)) cpqTapePhyDrv = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 4, 1)) cpqTapeCounters = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 4, 2)) cpqTapeLibrary = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 4, 3)) cpqSasHba = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 5, 1)) cpqSasPhyDrv = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 5, 2)) cpqSasLogDrv = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 5, 3)) cpqSasTapeDrv = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 5, 5, 4)) cpqSbScsiBus = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 7)) cpqSbScsiMibRev = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 7, 1)) cpqSbDevice = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 7, 2)) cpqScsiMibRevMajor = MibScalar((1, 3, 6, 1, 4, 1, 232, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1,65535))).setMaxAccess("readonly") cpqScsiMibRevMinor = MibScalar((1, 3, 6, 1, 4, 1, 232, 5, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqScsiMibCondition = MibScalar((1, 3, 6, 1, 4, 1, 232, 5, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqScsiNw3xDriverName = MibScalar((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,40))).setMaxAccess("readonly") cpqScsiNw3xDriverVers = MibScalar((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,5))).setMaxAccess("readonly") cpqScsiNw3xDriverPollType = MibScalar((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("polled", 2), ("demand", 3),))).setMaxAccess("readonly") cpqScsiNw3xDriverPollTime = MibScalar((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1,300))).setMaxAccess("readonly") cpqScsiNw3xCntlrInfoTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 5), ) cpqScsiNw3xCntlrInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 5, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqScsiNw3xCntlrIndex"), (0, "CPQSCSI-MIB", "cpqScsiNw3xBusIndex")) cpqScsiNw3xCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiNw3xBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 5, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiNw3xXptDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 5, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,40))).setMaxAccess("readonly") cpqScsiNw3xXptVers = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 5, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,5))).setMaxAccess("readonly") cpqScsiNw3xSimDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 5, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,40))).setMaxAccess("readonly") cpqScsiNw3xSimVers = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 5, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,5))).setMaxAccess("readonly") cpqScsiNw3xHbaDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 5, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,16))).setMaxAccess("readonly") cpqScsiLogDrvStatTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 6), ) cpqScsiLogDrvStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 6, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqScsiNw3xStatCntlrIndex"), (0, "CPQSCSI-MIB", "cpqScsiNw3xStatBusIndex"), (0, "CPQSCSI-MIB", "cpqScsiNw3xStatLogDrvIndex")) cpqScsiNw3xStatCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiNw3xStatBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 6, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,225))).setMaxAccess("readonly") cpqScsiNw3xStatLogDrvIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 6, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,225))).setMaxAccess("readonly") cpqScsiNw3xTotalReads = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 6, 1, 4), Counter32()).setMaxAccess("readonly") cpqScsiNw3xTotalWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 6, 1, 5), Counter32()).setMaxAccess("readonly") cpqScsiNw3xCorrReads = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 6, 1, 6), Counter32()).setMaxAccess("readonly") cpqScsiNw3xCorrWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 6, 1, 7), Counter32()).setMaxAccess("readonly") cpqScsiNw3xFatalReads = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 6, 1, 8), Counter32()).setMaxAccess("readonly") cpqScsiNw3xFatalWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 6, 1, 9), Counter32()).setMaxAccess("readonly") cpqScsiVolMapTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 7), ) cpqScsiVolMapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 7, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqScsiNw3xVolCntlrIndex"), (0, "CPQSCSI-MIB", "cpqScsiNw3xVolBusIndex"), (0, "CPQSCSI-MIB", "cpqScsiNw3xVolLogDrvIndex")) cpqScsiNw3xVolCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,225))).setMaxAccess("readonly") cpqScsiNw3xVolBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 7, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,225))).setMaxAccess("readonly") cpqScsiNw3xVolLogDrvIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 7, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,225))).setMaxAccess("readonly") cpqScsiNw3xVolMap = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 1, 7, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqScsiOsCommonPollFreq = MibScalar((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 4, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite") cpqScsiOsCommonModuleTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 4, 2), ) cpqScsiOsCommonModuleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 4, 2, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqScsiOsCommonModuleIndex")) cpqScsiOsCommonModuleIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiOsCommonModuleName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 4, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqScsiOsCommonModuleVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 4, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,5))).setMaxAccess("readonly") cpqScsiOsCommonModuleDate = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 4, 2, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(7,7)).setFixedLength(7)).setMaxAccess("readonly") cpqScsiOsCommonModulePurpose = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 1, 4, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqScsiCntlrTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1), ) cpqScsiCntlrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqScsiCntlrIndex"), (0, "CPQSCSI-MIB", "cpqScsiCntlrBusIndex")) cpqScsiCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqScsiCntlrBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiCntlrModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,)).clone(namedValues=NamedValues(("other", 1), ("cpqs710", 2), ("cpqs94", 3), ("cpqs810p", 4), ("cpqs825e", 5), ("cpqs825p", 6), ("cpqs974p", 7), ("cpqs875p", 8), ("extended", 9), ("cpqs895p", 10), ("cpqs896p", 11), ("cpqa789x", 12), ("cpqs876t", 13), ("hpu320", 14), ("hpu320r", 15), ("generic", 16), ("hp1u320g2", 17), ("hp1u320g1", 18), ("hpSc11Xe", 19),))).setMaxAccess("readonly") cpqScsiCntlrFWVers = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 4), DisplayString()).setMaxAccess("readonly") cpqScsiCntlrSWVers = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,5))).setMaxAccess("readonly") cpqScsiCntlrSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiCntlrStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("failed", 3),))).setMaxAccess("readonly") cpqScsiCntlrHardResets = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly") cpqScsiCntlrSoftResets = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly") cpqScsiCntlrTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly") cpqScsiCntlrBaseIOAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 11), Integer32()).setMaxAccess("readonly") cpqScsiCntlrCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 12), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqScsiCntlrSerialNum = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,16))).setMaxAccess("readonly") cpqScsiCntlrBusWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 14), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("narrow", 2), ("wide16", 3),))).setMaxAccess("readonly") cpqScsiCntlrModelExtended = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 15), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,80))).setMaxAccess("readonly") cpqScsiCntlrHwLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 2, 1, 1, 16), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqScsiLogDrvTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 2, 3, 1), ) cpqScsiLogDrvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 2, 3, 1, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqScsiLogDrvCntlrIndex"), (0, "CPQSCSI-MIB", "cpqScsiLogDrvBusIndex"), (0, "CPQSCSI-MIB", "cpqScsiLogDrvIndex")) cpqScsiLogDrvCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 3, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqScsiLogDrvBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiLogDrvIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 3, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiLogDrvFaultTol = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6,)).clone(namedValues=NamedValues(("other", 1), ("none", 2), ("mirroring", 3), ("dataGuard", 4), ("distribDataGuard", 5), ("enhancedMirroring", 6),))).setMaxAccess("readonly") cpqScsiLogDrvStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 3, 1, 1, 5), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("failed", 3), ("unconfigured", 4), ("recovering", 5), ("readyForRebuild", 6), ("rebuilding", 7), ("wrongDrive", 8), ("badConnect", 9), ("degraded", 10), ("disabled", 11),))).setMaxAccess("readonly") cpqScsiLogDrvSize = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 3, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readonly") cpqScsiLogDrvPhyDrvIDs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 3, 1, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqScsiLogDrvCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 3, 1, 1, 8), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqScsiLogDrvStripeSize = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 3, 1, 1, 9), Integer32()).setMaxAccess("readonly") cpqScsiLogDrvAvailSpares = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 3, 1, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqScsiLogDrvPercentRebuild = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 3, 1, 1, 11), Gauge32()).setMaxAccess("readonly") cpqScsiLogDrvOsName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 3, 1, 1, 12), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqScsiPhyDrvTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1), ) cpqScsiPhyDrvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqScsiPhyDrvCntlrIndex"), (0, "CPQSCSI-MIB", "cpqScsiPhyDrvBusIndex"), (0, "CPQSCSI-MIB", "cpqScsiPhyDrvIndex")) cpqScsiPhyDrvCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqScsiPhyDrvBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiPhyDrvIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiPhyDrvModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,17))).setMaxAccess("readonly") cpqScsiPhyDrvFWRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,8))).setMaxAccess("readonly") cpqScsiPhyDrvVendor = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,9))).setMaxAccess("readonly") cpqScsiPhyDrvSize = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readonly") cpqScsiPhyDrvScsiID = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiPhyDrvStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 9), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("failed", 3), ("notConfigured", 4), ("badCable", 5), ("missingWasOk", 6), ("missingWasFailed", 7), ("predictiveFailure", 8), ("missingWasPredictiveFailure", 9), ("offline", 10), ("missingWasOffline", 11), ("hardError", 12),))).setMaxAccess("readonly") cpqScsiPhyDrvServiceHours = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 10), Counter32()).setMaxAccess("readonly") cpqScsiPhyDrvHighReadSectors = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 11), Counter32()).setMaxAccess("readonly") cpqScsiPhyDrvLowReadSectors = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 12), Counter32()).setMaxAccess("readonly") cpqScsiPhyDrvHighWriteSectors = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 13), Counter32()).setMaxAccess("readonly") cpqScsiPhyDrvLowWriteSectors = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 14), Counter32()).setMaxAccess("readonly") cpqScsiPhyDrvHardReadErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 15), Counter32()).setMaxAccess("readonly") cpqScsiPhyDrvHardWriteErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 16), Counter32()).setMaxAccess("readonly") cpqScsiPhyDrvEccCorrReads = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 17), Counter32()).setMaxAccess("readonly") cpqScsiPhyDrvRecvReadErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 18), Counter32()).setMaxAccess("readonly") cpqScsiPhyDrvRecvWriteErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 19), Counter32()).setMaxAccess("readonly") cpqScsiPhyDrvSeekErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 20), Counter32()).setMaxAccess("readonly") cpqScsiPhyDrvSpinupTime = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 21), Integer32()).setMaxAccess("readonly") cpqScsiPhyDrvUsedReallocs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 22), Counter32()).setMaxAccess("readonly") cpqScsiPhyDrvTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 23), Counter32()).setMaxAccess("readonly") cpqScsiPhyDrvPostErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 24), Counter32()).setMaxAccess("readonly") cpqScsiPhyDrvPostErrCode = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 25), Integer32()).setMaxAccess("readonly") cpqScsiPhyDrvCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 26), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqScsiPhyDrvFuncTest1 = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 27), Gauge32()).setMaxAccess("readonly") cpqScsiPhyDrvFuncTest2 = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 28), Gauge32()).setMaxAccess("readonly") cpqScsiPhyDrvStatsPreserved = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 29), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8,)).clone(namedValues=NamedValues(("other", 1), ("inNVRAM", 2), ("onDisk", 3), ("noCPUSupport", 4), ("noFreeNVRAM", 5), ("noDrvSupport", 6), ("noSoftwareSupport", 7), ("statsNotSupported", 8),))).setMaxAccess("readonly") cpqScsiPhyDrvSerialNum = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 30), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,40))).setMaxAccess("readonly") cpqScsiPhyDrvLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 31), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2,)).clone(namedValues=NamedValues(("other", 1), ("proliant", 2),))).setMaxAccess("readonly") cpqScsiPhyDrvParent = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 32), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiPhyDrvSectorSize = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 33), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readonly") cpqScsiPhyDrvHotPlug = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 34), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("hotPlug", 2), ("nonHotPlug", 3),))).setMaxAccess("readonly") cpqScsiPhyDrvPlacement = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 35), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("internal", 2), ("external", 3),))).setMaxAccess("readonly") cpqScsiPhyDrvPreFailMonitoring = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 36), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("notAvailable", 2), ("available", 3),))).setMaxAccess("readonly") cpqScsiPhyDrvOsName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 37), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqScsiPhyDrvRotationalSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 38), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("rpm7200", 2), ("rpm10K", 3), ("rpm15K", 4),))).setMaxAccess("readonly") cpqScsiPhyDrvMemberLogDrv = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 4, 1, 1, 39), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("member", 2), ("spare", 3), ("nonMember", 4),))).setMaxAccess("readonly") cpqScsiTargetTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1), ) cpqScsiTargetEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqScsiTargetCntlrIndex"), (0, "CPQSCSI-MIB", "cpqScsiTargetBusIndex"), (0, "CPQSCSI-MIB", "cpqScsiTargetScsiIdIndex")) cpqScsiTargetCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqScsiTargetBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiTargetScsiIdIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiTargetType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 4), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,)).clone(namedValues=NamedValues(("other", 1), ("disk", 2), ("tape", 3), ("printer", 4), ("processor", 5), ("wormDrive", 6), ("cd-rom", 7), ("scanner", 8), ("optical", 9), ("jukeBox", 10), ("commDev", 11),))).setMaxAccess("readonly") cpqScsiTargetModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,17))).setMaxAccess("readonly") cpqScsiTargetFWRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,8))).setMaxAccess("readonly") cpqScsiTargetVendor = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,9))).setMaxAccess("readonly") cpqScsiTargetParityErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 8), Counter32()).setMaxAccess("readonly") cpqScsiTargetPhaseErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 9), Counter32()).setMaxAccess("readonly") cpqScsiTargetSelectTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 10), Counter32()).setMaxAccess("readonly") cpqScsiTargetMsgRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 11), Counter32()).setMaxAccess("readonly") cpqScsiTargetNegPeriod = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readonly") cpqScsiTargetLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 13), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2,)).clone(namedValues=NamedValues(("other", 1), ("proliant", 2),))).setMaxAccess("readonly") cpqScsiTargetNegSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 14), Integer32()).setMaxAccess("readonly") cpqScsiTargetPhysWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 15), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("narrow", 2), ("wide16", 3),))).setMaxAccess("readonly") cpqScsiTargetNegWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 16), Integer32()).setMaxAccess("readonly") cpqScsiTargetTypeExtended = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 17), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7,)).clone(namedValues=NamedValues(("other", 1), ("pdcd", 2), ("removableDisk", 3), ("dltAutoloader", 4), ("cdJukebox", 5), ("cr3500", 6), ("autoloader", 7),))).setMaxAccess("readonly") cpqScsiTargetCurrentSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 5, 1, 1, 18), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8,)).clone(namedValues=NamedValues(("other", 1), ("asynchronous", 2), ("fast", 3), ("ultra", 4), ("ultra2", 5), ("ultra3", 6), ("scsi1", 7), ("ultra4", 8),))).setMaxAccess("readonly") cpqScsiCdDrvTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 1), ) cpqScsiCdDrvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 1, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqScsiCdDrvCntlrIndex"), (0, "CPQSCSI-MIB", "cpqScsiCdDrvBusIndex"), (0, "CPQSCSI-MIB", "cpqScsiCdDrvScsiIdIndex"), (0, "CPQSCSI-MIB", "cpqScsiCdDrvLunIndex")) cpqScsiCdDrvCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqScsiCdDrvBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiCdDrvScsiIdIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiCdDrvLunIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiCdDrvModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 1, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,17))).setMaxAccess("readonly") cpqScsiCdDrvVendor = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 1, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,9))).setMaxAccess("readonly") cpqScsiCdDrvFwRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 1, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,8))).setMaxAccess("readonly") cpqCdLibraryTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 2), ) cpqCdLibraryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 2, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqCdLibraryCntlrIndex"), (0, "CPQSCSI-MIB", "cpqCdLibraryBusIndex"), (0, "CPQSCSI-MIB", "cpqCdLibraryScsiIdIndex"), (0, "CPQSCSI-MIB", "cpqCdLibraryLunIndex")) cpqCdLibraryCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 2, 1, 1), Integer32()).setMaxAccess("readonly") cpqCdLibraryBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqCdLibraryScsiIdIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqCdLibraryLunIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqCdLibraryCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 2, 1, 5), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqCdLibraryStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 2, 1, 6), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("failed", 3), ("offline", 4),))).setMaxAccess("readonly") cpqCdLibraryModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,17))).setMaxAccess("readonly") cpqCdLibraryVendor = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 2, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,9))).setMaxAccess("readonly") cpqCdLibrarySerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 2, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,64))).setMaxAccess("readonly") cpqCdLibraryDriveList = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 2, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,64))).setMaxAccess("readonly") cpqCdLibraryFwRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 2, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,8))).setMaxAccess("readonly") cpqCdLibraryFwSubtype = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 2, 6, 2, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqScsiTrapPkts = MibScalar((1, 3, 6, 1, 4, 1, 232, 5, 3, 1), Counter32()).setMaxAccess("readonly") cpqScsiTrapLogMaxSize = MibScalar((1, 3, 6, 1, 4, 1, 232, 5, 3, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readonly") cpqScsiTrapLogTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 3, 3), ) cpqScsiTrapLogEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 3, 3, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqScsiTrapLogIndex")) cpqScsiTrapLogIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 3, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readonly") cpqScsiTrapType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 3, 3, 1, 2), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 5001, 5002, 5003,)).clone(namedValues=NamedValues(("cpqScsiCntlrStatusChange", 1), ("cpqScsiLogDrvStatusChange", 2), ("cpqScsiPhyDrvStatusChange", 3), ("cpqScsi2CntlrStatusChange", 5001), ("cpqScsi2LogDrvStatusChange", 5002), ("cpqScsi2PhyDrvStatusChange", 5003),))).setMaxAccess("readonly") cpqScsiTrapTime = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 3, 3, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(6,6)).setFixedLength(6)).setMaxAccess("readonly") cpqSbMibRevMajor = MibScalar((1, 3, 6, 1, 4, 1, 232, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1,65535))).setMaxAccess("readonly") cpqSbMibRevMinor = MibScalar((1, 3, 6, 1, 4, 1, 232, 7, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") cpqSbDeviceTable = MibTable((1, 3, 6, 1, 4, 1, 232, 7, 2, 2), ) cpqSbDeviceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 7, 2, 2, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqSbDevCntlrIndex"), (0, "CPQSCSI-MIB", "cpqSbDevBusIndex"), (0, "CPQSCSI-MIB", "cpqSbDevScsiIdIndex")) cpqSbDevCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 7, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqSbDevBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 7, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqSbDevScsiIdIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 7, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqSbDevType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 7, 2, 2, 1, 4), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,)).clone(namedValues=NamedValues(("other", 1), ("disk", 2), ("tape", 3), ("printer", 4), ("processor", 5), ("wormDrive", 6), ("cd-rom", 7), ("scanner", 8), ("optical", 9), ("jukeBox", 10), ("commDev", 11),))).setMaxAccess("readonly") cpqSbDevModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 7, 2, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,17))).setMaxAccess("readonly") cpqSbDevFWRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 7, 2, 2, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,8))).setMaxAccess("readonly") cpqSbDevVendor = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 7, 2, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,9))).setMaxAccess("readonly") cpqSbDevParityErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 7, 2, 2, 1, 8), Counter32()).setMaxAccess("readonly") cpqSbDevPhaseErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 7, 2, 2, 1, 9), Counter32()).setMaxAccess("readonly") cpqSbDevSelectTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 7, 2, 2, 1, 10), Counter32()).setMaxAccess("readonly") cpqSbDevMsgRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 7, 2, 2, 1, 11), Counter32()).setMaxAccess("readonly") cpqSbDevNegPeriod = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 7, 2, 2, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readonly") cpqSbDevLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 7, 2, 2, 1, 13), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2,)).clone(namedValues=NamedValues(("other", 1), ("proliant", 2),))).setMaxAccess("readonly") cpqTapePhyDrvTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1), ) cpqTapePhyDrvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqTapePhyDrvCntlrIndex"), (0, "CPQSCSI-MIB", "cpqTapePhyDrvBusIndex"), (0, "CPQSCSI-MIB", "cpqTapePhyDrvScsiIdIndex"), (0, "CPQSCSI-MIB", "cpqTapePhyDrvLunIndex")) cpqTapePhyDrvCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqTapePhyDrvBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqTapePhyDrvScsiIdIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqTapePhyDrvLunIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqTapePhyDrvType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,)).clone(namedValues=NamedValues(("other", 1), ("cpqDat4-16", 2), ("cpqDatAuto", 3), ("cpqDat2-8", 4), ("cpqDlt10-20", 5), ("cpqDlt20-40", 6), ("cpqDlt15-30", 7), ("cpqDlt35-70", 8), ("cpqDat4-8", 9), ("cpqSlr4-8", 10), ("cpqDat12-24", 11), ("cpqDatAuto12-24", 12), ("cpqMlr16-32", 13), ("cpqAit35", 14), ("cpqAit50", 15), ("cpqDat20-40", 16), ("cpqDlt40-80", 17), ("cpqDatAuto20-40", 18), ("cpqSuperDlt1", 19), ("cpqAit35Lvd", 20), ("cpqCompaq", 21),))).setMaxAccess("readonly") cpqTapePhyDrvCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqTapePhyDrvMagSize = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1,255))).setMaxAccess("readonly") cpqTapePhyDrvSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,64))).setMaxAccess("readonly") cpqTapePhyDrvCleanReq = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("true", 2), ("false", 3),))).setMaxAccess("readonly") cpqTapePhyDrvCleanTapeRepl = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("true", 2), ("false", 3),))).setMaxAccess("readonly") cpqTapePhyDrvFwSubtype = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqTapePhyDrvName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 12), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,128))).setMaxAccess("readonly") cpqTapePhyDrvCleanTapeCount = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 13), Integer32()).setMaxAccess("readonly") cpqTapePhyDrvFwRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 14), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,8))).setMaxAccess("readonly") cpqTapePhyDrvStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 15), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 4, 5, 6, 7, 8,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("failed", 4), ("offline", 5), ("missingWasOk", 6), ("missingWasFailed", 7), ("missingWasOffline", 8),))).setMaxAccess("readonly") cpqTapePhyDrvHotPlug = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 16), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("hotPlug", 2), ("nonHotPlug", 3),))).setMaxAccess("readonly") cpqTapePhyDrvPlacement = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 17), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("internal", 2), ("external", 3),))).setMaxAccess("readonly") cpqTapePhyDrvLibraryDrive = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 18), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("true", 2), ("false", 3),))).setMaxAccess("readonly") cpqTapePhyDrvLoaderName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 19), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,128))).setMaxAccess("readonly") cpqTapePhyDrvLoaderFwRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 20), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,8))).setMaxAccess("readonly") cpqTapePhyDrvLoaderSerialNum = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 1, 1, 1, 21), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,64))).setMaxAccess("readonly") cpqTapeCountersTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 4, 2, 1), ) cpqTapeCountersEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 4, 2, 1, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqTapeCountersCntlrIndex"), (0, "CPQSCSI-MIB", "cpqTapeCountersBusIndex"), (0, "CPQSCSI-MIB", "cpqTapeCountersScsiIdIndex"), (0, "CPQSCSI-MIB", "cpqTapeCountersLunIndex")) cpqTapeCountersCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqTapeCountersBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqTapeCountersScsiIdIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqTapeCountersLunIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqTapeCountersReWrites = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly") cpqTapeCountersReReads = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly") cpqTapeCountersTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly") cpqTapeCountersTotalUncorrectable = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly") cpqTapeCountersTotalBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly") cpqTapeLibraryTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1), ) cpqTapeLibraryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqTapeLibraryCntlrIndex"), (0, "CPQSCSI-MIB", "cpqTapeLibraryBusIndex"), (0, "CPQSCSI-MIB", "cpqTapeLibraryScsiIdIndex"), (0, "CPQSCSI-MIB", "cpqTapeLibraryLunIndex")) cpqTapeLibraryCntlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqTapeLibraryBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqTapeLibraryScsiIdIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqTapeLibraryLunIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly") cpqTapeLibraryCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 5), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqTapeLibraryStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,64535))).setMaxAccess("readonly") cpqTapeLibraryDoorStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 7), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("closed", 2), ("open", 3), ("notSupported", 4),))).setMaxAccess("readonly") cpqTapeLibraryStatHours = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 8), Counter32()).setMaxAccess("readonly") cpqTapeLibraryStatMoves = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 9), Counter32()).setMaxAccess("readonly") cpqTapeLibraryName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,128))).setMaxAccess("readonly") cpqTapeLibrarySerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,64))).setMaxAccess("readonly") cpqTapeLibraryDriveList = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 12), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,320))).setMaxAccess("readonly") cpqTapeLibraryState = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 13), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4), ("offline", 5),))).setMaxAccess("readonly") cpqTapeLibraryTemperature = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 14), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("notSupported", 2), ("ok", 3), ("safeTempExceeded", 4), ("maxTempExceeded", 5),))).setMaxAccess("readonly") cpqTapeLibraryRedundancy = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 15), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("notSupported", 2), ("capable", 3), ("notCapable", 4), ("active", 5),))).setMaxAccess("readonly") cpqTapeLibraryHotSwap = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 16), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("notSupported", 2), ("capable", 3), ("notCapable", 4),))).setMaxAccess("readonly") cpqTapeLibraryFwRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 17), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,8))).setMaxAccess("readonly") cpqTapeLibraryTapeList = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 4, 3, 1, 1, 18), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,560))).setMaxAccess("readonly") cpqSasHbaTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 5, 1, 1), ) cpqSasHbaEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 5, 1, 1, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqSasHbaIndex")) cpqSasHbaIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqSasHbaHwLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 1, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqSasHbaModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,)).clone(namedValues=NamedValues(("other", 1), ("generic", 2), ("sas8int", 3), ("sas4int", 4), ("sasSc44Ge", 5), ("sasSc40Ge", 6), ("sasSc08Ge", 7), ("sasSc08e", 8), ("sasH220i", 9), ("sasH221", 10), ("sasH210i", 11), ("sasH220", 12), ("sasH222", 13),))).setMaxAccess("readonly") cpqSasHbaStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("failed", 3),))).setMaxAccess("readonly") cpqSasHbaCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqSasHbaOverallCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqSasHbaSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 1, 1, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,80))).setMaxAccess("readonly") cpqSasHbaFwVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 1, 1, 1, 8), DisplayString()).setMaxAccess("readonly") cpqSasHbaBiosVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 1, 1, 1, 9), DisplayString()).setMaxAccess("readonly") cpqSasPhyDrvTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1), ) cpqSasPhyDrvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqSasPhyDrvHbaIndex"), (0, "CPQSCSI-MIB", "cpqSasPhyDrvIndex")) cpqSasPhyDrvHbaIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqSasPhyDrvIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 2), Integer32()).setMaxAccess("readonly") cpqSasPhyDrvLocationString = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqSasPhyDrvModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,40))).setMaxAccess("readonly") cpqSasPhyDrvStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("predictiveFailure", 3), ("offline", 4), ("failed", 5), ("missingWasOk", 6), ("missingWasPredictiveFailure", 7), ("missingWasOffline", 8), ("missingWasFailed", 9), ("ssdWearOut", 10), ("missingWasSSDWearOut", 11), ("notAuthenticated", 12), ("missingWasNotAuthenticated", 13),))).setMaxAccess("readonly") cpqSasPhyDrvCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqSasPhyDrvFWRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,8))).setMaxAccess("readonly") cpqSasPhyDrvSize = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readonly") cpqSasPhyDrvUsedReallocs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly") cpqSasPhyDrvSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,40))).setMaxAccess("readonly") cpqSasPhyDrvMemberLogDrv = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 11), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("member", 2), ("spare", 3), ("nonMember", 4),))).setMaxAccess("readonly") cpqSasPhyDrvRotationalSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 12), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5,)).clone(namedValues=NamedValues(("other", 1), ("rpm7200", 2), ("rpm10K", 3), ("rpm15K", 4), ("rpmSsd", 5),))).setMaxAccess("readonly") cpqSasPhyDrvOsName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqSasPhyDrvPlacement = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 14), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("internal", 2), ("external", 3),))).setMaxAccess("readonly") cpqSasPhyDrvHotPlug = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 15), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("hotPlug", 2), ("nonHotPlug", 3),))).setMaxAccess("readonly") cpqSasPhyDrvType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 16), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("sas", 2), ("sata", 3),))).setMaxAccess("readonly") cpqSasPhyDrvSasAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 17), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,16))).setMaxAccess("readonly") cpqSasPhyDrvMediaType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 18), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("rotatingPlatters", 2), ("solidState", 3),))).setMaxAccess("readonly") cpqSasPhyDrvSSDWearStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 19), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("fiftySixDayThreshold", 3), ("fivePercentThreshold", 4), ("twoPercentThreshold", 5), ("ssdWearOut", 6),))).setMaxAccess("readonly") cpqSasPhyDrvPowerOnHours = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 20), Counter32()).setMaxAccess("readonly") cpqSasPhyDrvSSDPercntEndrnceUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 21), Gauge32()).setMaxAccess("readonly") cpqSasPhyDrvSSDEstTimeRemainingHours = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 22), Counter32()).setMaxAccess("readonly") cpqSasPhyDrvAuthenticationStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 23), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("notSupported", 2), ("authenticationFailed", 3), ("authenticationPassed", 4),))).setMaxAccess("readonly") cpqSasPhyDrvSmartCarrierAppFWRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 24), Integer32()).setMaxAccess("readonly") cpqSasPhyDrvSmartCarrierBootldrFWRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 25), Integer32()).setMaxAccess("readonly") cpqSasPhyDrvCurrTemperature = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 26), Gauge32()).setMaxAccess("readonly") cpqSasPhyDrvTemperatureThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 2, 1, 1, 27), Gauge32()).setMaxAccess("readonly") cpqSasLogDrvTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 5, 3, 1), ) cpqSasLogDrvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 5, 3, 1, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqSasLogDrvHbaIndex"), (0, "CPQSCSI-MIB", "cpqSasLogDrvIndex")) cpqSasLogDrvHbaIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 3, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqSasLogDrvIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 3, 1, 1, 2), Integer32()).setMaxAccess("readonly") cpqSasLogDrvRaidLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 3, 1, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7,)).clone(namedValues=NamedValues(("other", 1), ("raid0", 2), ("raid1", 3), ("raid0plus1", 4), ("raid5", 5), ("raid15", 6), ("volume", 7),))).setMaxAccess("readonly") cpqSasLogDrvStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("rebuilding", 4), ("failed", 5), ("offline", 6),))).setMaxAccess("readonly") cpqSasLogDrvCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 3, 1, 1, 5), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqSasLogDrvRebuildingDisk = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 3, 1, 1, 6), Integer32()).setMaxAccess("readonly") cpqSasLogDrvCapacity = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 3, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,2147483647))).setMaxAccess("readonly") cpqSasLogDrvStripeSize = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 3, 1, 1, 8), Integer32()).setMaxAccess("readonly") cpqSasLogDrvPhyDrvIds = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 3, 1, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,64))).setMaxAccess("readonly") cpqSasLogDrvSpareIds = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 3, 1, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,64))).setMaxAccess("readonly") cpqSasLogDrvOsName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 3, 1, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqSasLogDrvRebuildingPercent = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 3, 1, 1, 12), Gauge32()).setMaxAccess("readonly") cpqSasTapeDrvTable = MibTable((1, 3, 6, 1, 4, 1, 232, 5, 5, 4, 1), ) cpqSasTapeDrvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 5, 5, 4, 1, 1), ).setIndexNames((0, "CPQSCSI-MIB", "cpqSasTapeDrvHbaIndex"), (0, "CPQSCSI-MIB", "cpqSasTapeDrvIndex")) cpqSasTapeDrvHbaIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 4, 1, 1, 1), Integer32()).setMaxAccess("readonly") cpqSasTapeDrvIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 4, 1, 1, 2), Integer32()).setMaxAccess("readonly") cpqSasTapeDrvLocationString = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 4, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") cpqSasTapeDrvName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 4, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,40))).setMaxAccess("readonly") cpqSasTapeDrvStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 4, 1, 1, 5), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("offline", 3),))).setMaxAccess("readonly") cpqSasTapeDrvCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 4, 1, 1, 6), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4,)).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4),))).setMaxAccess("readonly") cpqSasTapeDrvFWRev = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 4, 1, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,8))).setMaxAccess("readonly") cpqSasTapeDrvSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 4, 1, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,40))).setMaxAccess("readonly") cpqSasTapeDrvSasAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 5, 5, 4, 1, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,16))).setMaxAccess("readonly") cpqScsiCntlrStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232, 5) + (0,1)).setObjects(*(("CPQSCSI-MIB", "cpqScsiCntlrStatus"),)) cpqScsiLogDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232, 5) + (0,2)).setObjects(*(("CPQSCSI-MIB", "cpqScsiLogDrvStatus"),)) cpqScsiPhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232, 5) + (0,3)).setObjects(*(("CPQSCSI-MIB", "cpqScsiPhyDrvStatus"),)) cpqScsi2CntlrStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5001)).setObjects(*(("CPQSCSI-MIB", "cpqScsiCntlrStatus"),)) cpqScsi2LogDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5002)).setObjects(*(("CPQSCSI-MIB", "cpqScsiLogDrvStatus"),)) cpqScsi2PhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5003)).setObjects(*(("CPQSCSI-MIB", "cpqScsiPhyDrvStatus"),)) cpqTapePhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5004)).setObjects(*(("CPQSCSI-MIB", "cpqTapePhyDrvCondition"),)) cpqScsi3CntlrStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5005)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqScsiCntlrStatus"),)) cpqScsi3PhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5006)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqScsiPhyDrvStatus"),)) cpqTape3PhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5007)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqTapePhyDrvCondition"),)) cpqTape3PhyDrvCleaningRequired = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5008)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqTapePhyDrvCondition"),)) cpqTape3PhyDrvCleanTapeReplace = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5009)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqTapePhyDrvCondition"),)) cpqTape3LibraryFailed = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5010)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqTapeLibrarySerialNumber"),)) cpqTape3LibraryOkay = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5011)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqTapeLibrarySerialNumber"),)) cpqTape3LibraryDegraded = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5012)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqTapeLibrarySerialNumber"),)) cpqTape3LibraryDoorOpen = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5013)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqTapeLibrarySerialNumber"),)) cpqTape3LibraryDoorClosed = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5014)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqTapeLibrarySerialNumber"),)) cpqScsiCdLibraryStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5015)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqCdLibraryCntlrIndex"), ("CPQSCSI-MIB", "cpqCdLibraryBusIndex"), ("CPQSCSI-MIB", "cpqCdLibraryScsiIdIndex"), ("CPQSCSI-MIB", "cpqCdLibraryStatus"),)) cpqTape4PhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5016)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqTapePhyDrvCntlrIndex"), ("CPQSCSI-MIB", "cpqTapePhyDrvBusIndex"), ("CPQSCSI-MIB", "cpqTapePhyDrvScsiIdIndex"), ("CPQSCSI-MIB", "cpqTapePhyDrvStatus"),)) cpqScsi4PhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5017)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqScsiPhyDrvStatus"), ("CPQSCSI-MIB", "cpqScsiPhyDrvCntlrIndex"), ("CPQSCSI-MIB", "cpqScsiPhyDrvBusIndex"), ("CPQSCSI-MIB", "cpqScsiPhyDrvIndex"), ("CPQSCSI-MIB", "cpqScsiPhyDrvVendor"), ("CPQSCSI-MIB", "cpqScsiPhyDrvModel"), ("CPQSCSI-MIB", "cpqScsiPhyDrvFWRev"), ("CPQSCSI-MIB", "cpqScsiPhyDrvSerialNum"),)) cpqTapeLibraryStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5018)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqTapeLibraryCntlrIndex"), ("CPQSCSI-MIB", "cpqTapeLibraryBusIndex"), ("CPQSCSI-MIB", "cpqTapeLibraryScsiIdIndex"), ("CPQSCSI-MIB", "cpqTapeLibraryLunIndex"), ("CPQSCSI-MIB", "cpqTapeLibraryName"), ("CPQSCSI-MIB", "cpqTapeLibraryFwRev"), ("CPQSCSI-MIB", "cpqTapeLibrarySerialNumber"), ("CPQSCSI-MIB", "cpqTapeLibraryState"),)) cpqTape5PhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5019)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqTapePhyDrvCntlrIndex"), ("CPQSCSI-MIB", "cpqTapePhyDrvBusIndex"), ("CPQSCSI-MIB", "cpqTapePhyDrvScsiIdIndex"), ("CPQSCSI-MIB", "cpqTapePhyDrvLunIndex"), ("CPQSCSI-MIB", "cpqTapePhyDrvName"), ("CPQSCSI-MIB", "cpqTapePhyDrvFwRev"), ("CPQSCSI-MIB", "cpqTapePhyDrvSerialNumber"), ("CPQSCSI-MIB", "cpqTapePhyDrvStatus"),)) cpqScsi5PhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5020)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqScsiPhyDrvStatus"), ("CPQSCSI-MIB", "cpqScsiPhyDrvCntlrIndex"), ("CPQSCSI-MIB", "cpqScsiPhyDrvBusIndex"), ("CPQSCSI-MIB", "cpqScsiPhyDrvIndex"), ("CPQSCSI-MIB", "cpqScsiPhyDrvVendor"), ("CPQSCSI-MIB", "cpqScsiPhyDrvModel"), ("CPQSCSI-MIB", "cpqScsiPhyDrvFWRev"), ("CPQSCSI-MIB", "cpqScsiPhyDrvSerialNum"), ("CPQSCSI-MIB", "cpqScsiPhyDrvOsName"),)) cpqScsi3LogDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5021)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqScsiLogDrvStatus"), ("CPQSCSI-MIB", "cpqScsiLogDrvCntlrIndex"), ("CPQSCSI-MIB", "cpqScsiLogDrvBusIndex"), ("CPQSCSI-MIB", "cpqScsiLogDrvIndex"), ("CPQSCSI-MIB", "cpqScsiLogDrvOsName"),)) cpqSasPhyDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5022)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqSasHbaHwLocation"), ("CPQSCSI-MIB", "cpqSasPhyDrvLocationString"), ("CPQSCSI-MIB", "cpqSasPhyDrvHbaIndex"), ("CPQSCSI-MIB", "cpqSasPhyDrvIndex"), ("CPQSCSI-MIB", "cpqSasPhyDrvStatus"), ("CPQSCSI-MIB", "cpqSasPhyDrvType"), ("CPQSCSI-MIB", "cpqSasPhyDrvModel"), ("CPQSCSI-MIB", "cpqSasPhyDrvFWRev"), ("CPQSCSI-MIB", "cpqSasPhyDrvSerialNumber"), ("CPQSCSI-MIB", "cpqSasPhyDrvSasAddress"),)) cpqSasLogDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5023)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqSasHbaHwLocation"), ("CPQSCSI-MIB", "cpqSasLogDrvHbaIndex"), ("CPQSCSI-MIB", "cpqSasLogDrvIndex"), ("CPQSCSI-MIB", "cpqSasLogDrvStatus"), ("CPQSCSI-MIB", "cpqSasLogDrvOsName"),)) cpqSas2TapeDrvStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5025)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqSasHbaHwLocation"), ("CPQSCSI-MIB", "cpqSasTapeDrvLocationString"), ("CPQSCSI-MIB", "cpqSasTapeDrvHbaIndex"), ("CPQSCSI-MIB", "cpqSasTapeDrvIndex"), ("CPQSCSI-MIB", "cpqSasTapeDrvName"), ("CPQSCSI-MIB", "cpqSasTapeDrvFWRev"), ("CPQSCSI-MIB", "cpqSasTapeDrvSerialNumber"), ("CPQSCSI-MIB", "cpqSasTapeDrvSasAddress"), ("CPQSCSI-MIB", "cpqSasTapeDrvStatus"),)) cpqSasPhyDrvSSDWearStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 232) + (0,5026)).setObjects(*(("CPQSCSI-MIB", "sysName"), ("CPQSCSI-MIB", "cpqHoTrapFlags"), ("CPQSCSI-MIB", "cpqSasHbaHwLocation"), ("CPQSCSI-MIB", "cpqSasPhyDrvLocationString"), ("CPQSCSI-MIB", "cpqSasPhyDrvHbaIndex"), ("CPQSCSI-MIB", "cpqSasPhyDrvIndex"), ("CPQSCSI-MIB", "cpqSasPhyDrvType"), ("CPQSCSI-MIB", "cpqSasPhyDrvModel"), ("CPQSCSI-MIB", "cpqSasPhyDrvFWRev"), ("CPQSCSI-MIB", "cpqSasPhyDrvSerialNumber"), ("CPQSCSI-MIB", "cpqSasPhyDrvSasAddress"), ("CPQSCSI-MIB", "cpqSasPhyDrvSSDWearStatus"),)) mibBuilder.exportSymbols("CPQSCSI-MIB", cpqScsiPhyDrvHighWriteSectors=cpqScsiPhyDrvHighWriteSectors, cpqTapeCountersReReads=cpqTapeCountersReReads, cpqTapePhyDrvCntlrIndex=cpqTapePhyDrvCntlrIndex, cpqTapeCountersTotalUncorrectable=cpqTapeCountersTotalUncorrectable, cpqSasLogDrvCondition=cpqSasLogDrvCondition, cpqSbDevModel=cpqSbDevModel, cpqSasLogDrvCapacity=cpqSasLogDrvCapacity, cpqScsiNw3xStatBusIndex=cpqScsiNw3xStatBusIndex, cpqSasPhyDrvSasAddress=cpqSasPhyDrvSasAddress, cpqScsiTrapTime=cpqScsiTrapTime, cpqScsiLogDrvOsName=cpqScsiLogDrvOsName, cpqSasLogDrvEntry=cpqSasLogDrvEntry, cpqSasTapeDrvName=cpqSasTapeDrvName, cpqSasTapeDrvSerialNumber=cpqSasTapeDrvSerialNumber, cpqScsiPhyDrvSectorSize=cpqScsiPhyDrvSectorSize, cpqScsiCdDrvFwRev=cpqScsiCdDrvFwRev, cpqSasLogDrv=cpqSasLogDrv, cpqScsiNw3xVolMap=cpqScsiNw3xVolMap, cpqSasPhyDrvSSDWearStatusChange=cpqSasPhyDrvSSDWearStatusChange, cpqSasTapeDrvHbaIndex=cpqSasTapeDrvHbaIndex, cpqTapeLibraryStatus=cpqTapeLibraryStatus, cpqSbDevScsiIdIndex=cpqSbDevScsiIdIndex, cpqSbScsiMibRev=cpqSbScsiMibRev, cpqSasPhyDrvTemperatureThreshold=cpqSasPhyDrvTemperatureThreshold, cpqScsiTrapLogEntry=cpqScsiTrapLogEntry, cpqTape3LibraryFailed=cpqTape3LibraryFailed, cpqSasHbaOverallCondition=cpqSasHbaOverallCondition, cpqScsiPhyDrvScsiID=cpqScsiPhyDrvScsiID, cpqSbDevType=cpqSbDevType, cpqScsiVolMapTable=cpqScsiVolMapTable, cpqScsiNw3xCorrWrites=cpqScsiNw3xCorrWrites, cpqTapeLibrarySerialNumber=cpqTapeLibrarySerialNumber, cpqScsiTargetMsgRejects=cpqScsiTargetMsgRejects, cpqScsiMibRevMajor=cpqScsiMibRevMajor, cpqScsiOsCommonModulePurpose=cpqScsiOsCommonModulePurpose, cpqTapeLibraryStatMoves=cpqTapeLibraryStatMoves, cpqScsiVolMapEntry=cpqScsiVolMapEntry, cpqScsiCdDrvBusIndex=cpqScsiCdDrvBusIndex, cpqScsiNw3xCntlrInfoTable=cpqScsiNw3xCntlrInfoTable, cpqTapePhyDrvLibraryDrive=cpqTapePhyDrvLibraryDrive, cpqScsi=cpqScsi, cpqScsiMibRev=cpqScsiMibRev, cpqSasPhyDrvSSDEstTimeRemainingHours=cpqSasPhyDrvSSDEstTimeRemainingHours, cpqSbDevNegPeriod=cpqSbDevNegPeriod, cpqSasPhyDrvHotPlug=cpqSasPhyDrvHotPlug, cpqSbDevPhaseErrs=cpqSbDevPhaseErrs, cpqSasHbaHwLocation=cpqSasHbaHwLocation, cpqScsiCntlrBusWidth=cpqScsiCntlrBusWidth, cpqSasHba=cpqSasHba, cpqScsiPhyDrvServiceHours=cpqScsiPhyDrvServiceHours, cpqTapePhyDrvLoaderFwRev=cpqTapePhyDrvLoaderFwRev, cpqSasLogDrvStatusChange=cpqSasLogDrvStatusChange, cpqScsiCntlrFWVers=cpqScsiCntlrFWVers, cpqSasPhyDrvFWRev=cpqSasPhyDrvFWRev, cpqSbDevVendor=cpqSbDevVendor, cpqScsiPhyDrvMemberLogDrv=cpqScsiPhyDrvMemberLogDrv, cpqTapePhyDrvCleanReq=cpqTapePhyDrvCleanReq, cpqScsiLogDrvBusIndex=cpqScsiLogDrvBusIndex, cpqTape3PhyDrvStatusChange=cpqTape3PhyDrvStatusChange, cpqScsiCdDrvEntry=cpqScsiCdDrvEntry, cpqScsi4PhyDrvStatusChange=cpqScsi4PhyDrvStatusChange, cpqScsiPhyDrvLowWriteSectors=cpqScsiPhyDrvLowWriteSectors, cpqSasPhyDrvMemberLogDrv=cpqSasPhyDrvMemberLogDrv, cpqScsiPhyDrvOsName=cpqScsiPhyDrvOsName, cpqScsiPhyDrvCondition=cpqScsiPhyDrvCondition, cpqTapeLibraryDoorStatus=cpqTapeLibraryDoorStatus, cpqTapeLibraryRedundancy=cpqTapeLibraryRedundancy, cpqSasHbaEntry=cpqSasHbaEntry, cpqScsiNw3xXptDesc=cpqScsiNw3xXptDesc, cpqScsiMibCondition=cpqScsiMibCondition, cpqScsiOsNetWare=cpqScsiOsNetWare, cpqTape4PhyDrvStatusChange=cpqTape4PhyDrvStatusChange, cpqTapePhyDrvName=cpqTapePhyDrvName, cpqScsiLogDrvFaultTol=cpqScsiLogDrvFaultTol, cpqScsiTargetNegWidth=cpqScsiTargetNegWidth, cpqTapePhyDrvBusIndex=cpqTapePhyDrvBusIndex, cpqScsiCntlrTimeouts=cpqScsiCntlrTimeouts, cpqSasPhyDrvSmartCarrierAppFWRev=cpqSasPhyDrvSmartCarrierAppFWRev, cpqScsiCntlrCondition=cpqScsiCntlrCondition, cpqSasPhyDrvSerialNumber=cpqSasPhyDrvSerialNumber, cpqTapeLibraryCondition=cpqTapeLibraryCondition, cpqScsiCntlrStatus=cpqScsiCntlrStatus, cpqScsiTargetLocation=cpqScsiTargetLocation, cpqScsiLogDrvPhyDrvIDs=cpqScsiLogDrvPhyDrvIDs, cpqScsiCntlrTable=cpqScsiCntlrTable, cpqTapePhyDrvSerialNumber=cpqTapePhyDrvSerialNumber, cpqScsiPhyDrvHotPlug=cpqScsiPhyDrvHotPlug, cpqScsiCntlrIndex=cpqScsiCntlrIndex, cpqSasPhyDrvPowerOnHours=cpqSasPhyDrvPowerOnHours, cpqTapeLibraryScsiIdIndex=cpqTapeLibraryScsiIdIndex, cpqTapeCountersTotalErrors=cpqTapeCountersTotalErrors, cpqCdLibraryStatus=cpqCdLibraryStatus, cpqScsiPhyDrvPostErrCode=cpqScsiPhyDrvPostErrCode, cpqScsiTrap=cpqScsiTrap, cpqSasLogDrvIndex=cpqSasLogDrvIndex, cpqSasTapeDrvTable=cpqSasTapeDrvTable, cpqCdLibraryFwRev=cpqCdLibraryFwRev, cpqScsiPhyDrvHardReadErrs=cpqScsiPhyDrvHardReadErrs, cpqTapeLibraryLunIndex=cpqTapeLibraryLunIndex, cpqTapeLibraryTemperature=cpqTapeLibraryTemperature, cpqScsiNw3xCntlrInfoEntry=cpqScsiNw3xCntlrInfoEntry, cpqSasHbaBiosVersion=cpqSasHbaBiosVersion, cpqScsiPhyDrvFWRev=cpqScsiPhyDrvFWRev, cpqScsiPhyDrvVendor=cpqScsiPhyDrvVendor, cpqSasComponent=cpqSasComponent, cpqSasPhyDrvAuthenticationStatus=cpqSasPhyDrvAuthenticationStatus, cpqTapeLibraryHotSwap=cpqTapeLibraryHotSwap, cpqCdLibraryCntlrIndex=cpqCdLibraryCntlrIndex, cpqTapeLibraryCntlrIndex=cpqTapeLibraryCntlrIndex, cpqScsiPhyDrv=cpqScsiPhyDrv, cpqScsiLogDrvAvailSpares=cpqScsiLogDrvAvailSpares, cpqScsiCdDrvVendor=cpqScsiCdDrvVendor, cpqTapePhyDrvCleanTapeCount=cpqTapePhyDrvCleanTapeCount, cpqSasLogDrvStatus=cpqSasLogDrvStatus, cpqSasPhyDrvSSDWearStatus=cpqSasPhyDrvSSDWearStatus, cpqTapePhyDrvCleanTapeRepl=cpqTapePhyDrvCleanTapeRepl, cpqScsiNw3xDriverVers=cpqScsiNw3xDriverVers, cpqSasPhyDrvCurrTemperature=cpqSasPhyDrvCurrTemperature, cpqScsiTargetEntry=cpqScsiTargetEntry, cpqCdLibraryCondition=cpqCdLibraryCondition, cpqSbMibRevMinor=cpqSbMibRevMinor, cpqScsiPhyDrvSpinupTime=cpqScsiPhyDrvSpinupTime, cpqScsiCntlrEntry=cpqScsiCntlrEntry, cpqScsiNw3xXptVers=cpqScsiNw3xXptVers, cpqSasPhyDrvPlacement=cpqSasPhyDrvPlacement, cpqTapeCountersCntlrIndex=cpqTapeCountersCntlrIndex, cpqScsiCdDrvLunIndex=cpqScsiCdDrvLunIndex, cpqScsiNw3xCntlrIndex=cpqScsiNw3xCntlrIndex, cpqScsiOsCommonModuleDate=cpqScsiOsCommonModuleDate, cpqTapeCountersBusIndex=cpqTapeCountersBusIndex, cpqTapePhyDrvCondition=cpqTapePhyDrvCondition, cpqSasTapeDrvCondition=cpqSasTapeDrvCondition, cpqScsiPhyDrvRotationalSpeed=cpqScsiPhyDrvRotationalSpeed, cpqScsiPhyDrvLowReadSectors=cpqScsiPhyDrvLowReadSectors, cpqSasLogDrvRaidLevel=cpqSasLogDrvRaidLevel, cpqScsiLogDrvCntlrIndex=cpqScsiLogDrvCntlrIndex, cpqTapePhyDrvHotPlug=cpqTapePhyDrvHotPlug, cpqTape3PhyDrvCleanTapeReplace=cpqTape3PhyDrvCleanTapeReplace, cpqTapeCounters=cpqTapeCounters, cpqSasPhyDrvStatus=cpqSasPhyDrvStatus, cpqTapeLibraryFwRev=cpqTapeLibraryFwRev, cpqScsi2LogDrvStatusChange=cpqScsi2LogDrvStatusChange, cpqScsiNw3xSimDesc=cpqScsiNw3xSimDesc, cpqSbMibRevMajor=cpqSbMibRevMajor, cpqCdLibraryEntry=cpqCdLibraryEntry, cpqScsiTargetCurrentSpeed=cpqScsiTargetCurrentSpeed, cpqTapeLibraryTapeList=cpqTapeLibraryTapeList, cpqScsiLogDrvStripeSize=cpqScsiLogDrvStripeSize, cpqScsiTargetCntlrIndex=cpqScsiTargetCntlrIndex, cpqSasTapeDrv=cpqSasTapeDrv, cpqCdLibraryFwSubtype=cpqCdLibraryFwSubtype, cpqScsiTargetPhysWidth=cpqScsiTargetPhysWidth, cpqScsiPhyDrvRecvWriteErrs=cpqScsiPhyDrvRecvWriteErrs, cpqTapePhyDrvFwRev=cpqTapePhyDrvFwRev, cpqScsiTargetModel=cpqScsiTargetModel, cpqScsiTrapLogTable=cpqScsiTrapLogTable, cpqScsiCdDrvScsiIdIndex=cpqScsiCdDrvScsiIdIndex, cpqSasTapeDrvSasAddress=cpqSasTapeDrvSasAddress, cpqScsiTrapLogIndex=cpqScsiTrapLogIndex, cpqSasPhyDrvSmartCarrierBootldrFWRev=cpqSasPhyDrvSmartCarrierBootldrFWRev, cpqSasLogDrvSpareIds=cpqSasLogDrvSpareIds, cpqScsiPhyDrvHighReadSectors=cpqScsiPhyDrvHighReadSectors, cpqScsiNw3xDriverPollType=cpqScsiNw3xDriverPollType, cpqTape3PhyDrvCleaningRequired=cpqTape3PhyDrvCleaningRequired, cpqScsiCdLibraryStatusChange=cpqScsiCdLibraryStatusChange, cpqScsiPhyDrvEccCorrReads=cpqScsiPhyDrvEccCorrReads, cpqScsiCntlrSWVers=cpqScsiCntlrSWVers, cpqTapePhyDrvLunIndex=cpqTapePhyDrvLunIndex, cpqTapeCountersScsiIdIndex=cpqTapeCountersScsiIdIndex, cpqScsiPhyDrvRecvReadErrs=cpqScsiPhyDrvRecvReadErrs, cpqScsiLogDrvCondition=cpqScsiLogDrvCondition, cpqSasHbaTable=cpqSasHbaTable, cpqSasHbaStatus=cpqSasHbaStatus, cpqCdLibraryTable=cpqCdLibraryTable, cpqSasPhyDrvType=cpqSasPhyDrvType, cpqSasPhyDrvSize=cpqSasPhyDrvSize, cpqSasLogDrvTable=cpqSasLogDrvTable, cpqScsi5PhyDrvStatusChange=cpqScsi5PhyDrvStatusChange, cpqTapeLibraryStatusChange=cpqTapeLibraryStatusChange, cpqTapeCountersReWrites=cpqTapeCountersReWrites, cpqScsiCntlrHwLocation=cpqScsiCntlrHwLocation, cpqScsiTrapLogMaxSize=cpqScsiTrapLogMaxSize, cpqScsiCdDrvModel=cpqScsiCdDrvModel, cpqScsiTargetFWRev=cpqScsiTargetFWRev, cpqScsiOsCommon=cpqScsiOsCommon, cpqScsiMibRevMinor=cpqScsiMibRevMinor, cpqScsiTargetParityErrs=cpqScsiTargetParityErrs, cpqScsiLogDrvStatEntry=cpqScsiLogDrvStatEntry, cpqScsiTrapType=cpqScsiTrapType, cpqSbDevBusIndex=cpqSbDevBusIndex, cpqSas2TapeDrvStatusChange=cpqSas2TapeDrvStatusChange, cpqSasHbaCondition=cpqSasHbaCondition, cpqTape3LibraryDoorOpen=cpqTape3LibraryDoorOpen, cpqScsiNw3xVolBusIndex=cpqScsiNw3xVolBusIndex, cpqScsiPhyDrvPreFailMonitoring=cpqScsiPhyDrvPreFailMonitoring, cpqScsiNw3xHbaDesc=cpqScsiNw3xHbaDesc, cpqScsiNw3xVolLogDrvIndex=cpqScsiNw3xVolLogDrvIndex, cpqCdLibraryDriveList=cpqCdLibraryDriveList, cpqScsiLogDrvStatus=cpqScsiLogDrvStatus, cpqScsiTargetNegSpeed=cpqScsiTargetNegSpeed, cpqScsiLogDrvEntry=cpqScsiLogDrvEntry, cpqScsiPhyDrvBusIndex=cpqScsiPhyDrvBusIndex, cpqScsiCntlr=cpqScsiCntlr, cpqTapeLibraryBusIndex=cpqTapeLibraryBusIndex, cpqSbDevCntlrIndex=cpqSbDevCntlrIndex, cpqScsiLogDrvPercentRebuild=cpqScsiLogDrvPercentRebuild, cpqTapePhyDrvLoaderSerialNum=cpqTapePhyDrvLoaderSerialNum, cpqSasHbaSerialNumber=cpqSasHbaSerialNumber, cpqScsiPhyDrvSerialNum=cpqScsiPhyDrvSerialNum, cpqScsiCdDrvTable=cpqScsiCdDrvTable, cpqScsi3PhyDrvStatusChange=cpqScsi3PhyDrvStatusChange, cpqScsiLogDrvSize=cpqScsiLogDrvSize, cpqScsiCd=cpqScsiCd, cpqSasLogDrvOsName=cpqSasLogDrvOsName, cpqTapeLibrary=cpqTapeLibrary, cpqScsiTarget=cpqScsiTarget, cpqSasPhyDrvModel=cpqSasPhyDrvModel, cpqTapePhyDrvPlacement=cpqTapePhyDrvPlacement, cpqSasPhyDrvIndex=cpqSasPhyDrvIndex, cpqScsiComponent=cpqScsiComponent, cpqSasPhyDrvUsedReallocs=cpqSasPhyDrvUsedReallocs, cpqScsiCntlrBaseIOAddr=cpqScsiCntlrBaseIOAddr, cpqScsiTargetType=cpqScsiTargetType, cpqSasLogDrvRebuildingDisk=cpqSasLogDrvRebuildingDisk, cpqScsiCdDrvCntlrIndex=cpqScsiCdDrvCntlrIndex, cpqSasTapeDrvEntry=cpqSasTapeDrvEntry, cpqScsiCntlrHardResets=cpqScsiCntlrHardResets, cpqScsiLogDrvTable=cpqScsiLogDrvTable, cpqSasPhyDrvStatusChange=cpqSasPhyDrvStatusChange, cpqSbDevParityErrs=cpqSbDevParityErrs, cpqScsiNw3xTotalReads=cpqScsiNw3xTotalReads, cpqScsiCntlrStatusChange=cpqScsiCntlrStatusChange, cpqScsiCntlrSerialNum=cpqScsiCntlrSerialNum, cpqScsiOsCommonModuleEntry=cpqScsiOsCommonModuleEntry, cpqSbDeviceTable=cpqSbDeviceTable, cpqTapeCountersTotalBytes=cpqTapeCountersTotalBytes, cpqTapePhyDrvStatusChange=cpqTapePhyDrvStatusChange, cpqSasPhyDrvCondition=cpqSasPhyDrvCondition, cpqTapeLibraryName=cpqTapeLibraryName, cpqTape3LibraryDoorClosed=cpqTape3LibraryDoorClosed, cpqSasPhyDrvRotationalSpeed=cpqSasPhyDrvRotationalSpeed, cpqScsiTargetScsiIdIndex=cpqScsiTargetScsiIdIndex, cpqTapePhyDrvStatus=cpqTapePhyDrvStatus, cpqSasLogDrvRebuildingPercent=cpqSasLogDrvRebuildingPercent, cpqSasTapeDrvIndex=cpqSasTapeDrvIndex, cpqScsiPhyDrvModel=cpqScsiPhyDrvModel, cpqSbDevLocation=cpqSbDevLocation, cpqScsiNw3xVolCntlrIndex=cpqScsiNw3xVolCntlrIndex, cpqCdLibrarySerialNumber=cpqCdLibrarySerialNumber, cpqTapePhyDrvFwSubtype=cpqTapePhyDrvFwSubtype, cpqScsiPhyDrvEntry=cpqScsiPhyDrvEntry, cpqScsiPhyDrvPostErrs=cpqScsiPhyDrvPostErrs, cpqScsiCntlrSoftResets=cpqScsiCntlrSoftResets, cpqTapeLibraryStatHours=cpqTapeLibraryStatHours) mibBuilder.exportSymbols("CPQSCSI-MIB", cpqScsi3LogDrvStatusChange=cpqScsi3LogDrvStatusChange, cpqScsiCntlrSlot=cpqScsiCntlrSlot, cpqScsi3CntlrStatusChange=cpqScsi3CntlrStatusChange, cpqSasPhyDrvEntry=cpqSasPhyDrvEntry, cpqTapePhyDrvScsiIdIndex=cpqTapePhyDrvScsiIdIndex, cpqSbDevSelectTimeouts=cpqSbDevSelectTimeouts, cpqSasPhyDrvLocationString=cpqSasPhyDrvLocationString, cpqScsiOsCommonModuleName=cpqScsiOsCommonModuleName, cpqSasHbaIndex=cpqSasHbaIndex, cpqTapeCountersLunIndex=cpqTapeCountersLunIndex, cpqScsiTrapPkts=cpqScsiTrapPkts, cpqSbDevice=cpqSbDevice, cpqScsiPhyDrvSeekErrs=cpqScsiPhyDrvSeekErrs, cpqSbDeviceEntry=cpqSbDeviceEntry, cpqScsiLogDrvStatusChange=cpqScsiLogDrvStatusChange, cpqSasHbaFwVersion=cpqSasHbaFwVersion, cpqScsiTargetSelectTimeouts=cpqScsiTargetSelectTimeouts, cpqSasTapeDrvFWRev=cpqSasTapeDrvFWRev, cpqSasLogDrvPhyDrvIds=cpqSasLogDrvPhyDrvIds, cpqScsiNw3xCorrReads=cpqScsiNw3xCorrReads, cpqScsiPhyDrvStatsPreserved=cpqScsiPhyDrvStatsPreserved, cpqTape3LibraryOkay=cpqTape3LibraryOkay, cpqScsiTargetTable=cpqScsiTargetTable, cpqSasPhyDrvMediaType=cpqSasPhyDrvMediaType, cpqScsiOsCommonModuleVersion=cpqScsiOsCommonModuleVersion, cpqSasPhyDrvSSDPercntEndrnceUsed=cpqSasPhyDrvSSDPercntEndrnceUsed, cpqScsiNw3xFatalReads=cpqScsiNw3xFatalReads, cpqScsiTargetPhaseErrs=cpqScsiTargetPhaseErrs, cpqTapePhyDrvEntry=cpqTapePhyDrvEntry, cpqScsiPhyDrvStatusChange=cpqScsiPhyDrvStatusChange, cpqTape3LibraryDegraded=cpqTape3LibraryDegraded, cpqScsiNw3xBusIndex=cpqScsiNw3xBusIndex, cpqScsiPhyDrvFuncTest2=cpqScsiPhyDrvFuncTest2, cpqSasLogDrvHbaIndex=cpqSasLogDrvHbaIndex, cpqCdLibraryLunIndex=cpqCdLibraryLunIndex, cpqCdLibraryModel=cpqCdLibraryModel, cpqTapeCountersEntry=cpqTapeCountersEntry, cpqScsiInterface=cpqScsiInterface, cpqScsiPhyDrvSize=cpqScsiPhyDrvSize, cpqScsiTargetVendor=cpqScsiTargetVendor, cpqSasLogDrvStripeSize=cpqSasLogDrvStripeSize, cpqScsiCntlrModel=cpqScsiCntlrModel, cpqScsi2PhyDrvStatusChange=cpqScsi2PhyDrvStatusChange, cpqScsiPhyDrvStatus=cpqScsiPhyDrvStatus, cpqScsiNw3xDriverPollTime=cpqScsiNw3xDriverPollTime, cpqScsiNw3xStatLogDrvIndex=cpqScsiNw3xStatLogDrvIndex, cpqScsiNw3xTotalWrites=cpqScsiNw3xTotalWrites, cpqScsi2CntlrStatusChange=cpqScsi2CntlrStatusChange, cpqSasTapeDrvLocationString=cpqSasTapeDrvLocationString, cpqTapePhyDrvType=cpqTapePhyDrvType, cpqScsiNw3xSimVers=cpqScsiNw3xSimVers, cpqScsiPhyDrvLocation=cpqScsiPhyDrvLocation, cpqScsiLogDrv=cpqScsiLogDrv, cpqScsiLogDrvIndex=cpqScsiLogDrvIndex, cpqScsiPhyDrvCntlrIndex=cpqScsiPhyDrvCntlrIndex, cpqScsiTargetNegPeriod=cpqScsiTargetNegPeriod, cpqTapePhyDrvMagSize=cpqTapePhyDrvMagSize, cpqCdLibraryVendor=cpqCdLibraryVendor, cpqTapePhyDrvTable=cpqTapePhyDrvTable, cpqTapeLibraryEntry=cpqTapeLibraryEntry, cpqCdLibraryScsiIdIndex=cpqCdLibraryScsiIdIndex, cpqScsiCntlrBusIndex=cpqScsiCntlrBusIndex, cpqScsiPhyDrvParent=cpqScsiPhyDrvParent, cpqScsiPhyDrvUsedReallocs=cpqScsiPhyDrvUsedReallocs, cpqScsiOsCommonModuleTable=cpqScsiOsCommonModuleTable, cpqScsiLogDrvStatTable=cpqScsiLogDrvStatTable, cpqScsiCntlrModelExtended=cpqScsiCntlrModelExtended, cpqSasPhyDrvHbaIndex=cpqSasPhyDrvHbaIndex, cpqSasPhyDrv=cpqSasPhyDrv, cpqScsiOsCommonModuleIndex=cpqScsiOsCommonModuleIndex, cpqSasTapeDrvStatus=cpqSasTapeDrvStatus, cpqTape5PhyDrvStatusChange=cpqTape5PhyDrvStatusChange, cpqSbDevMsgRejects=cpqSbDevMsgRejects, cpqScsiNw3xDriverName=cpqScsiNw3xDriverName, cpqScsiPhyDrvTimeouts=cpqScsiPhyDrvTimeouts, cpqTapePhyDrvLoaderName=cpqTapePhyDrvLoaderName, cpqSasPhyDrvTable=cpqSasPhyDrvTable, cpqSbScsiBus=cpqSbScsiBus, cpqScsiNw3xStatCntlrIndex=cpqScsiNw3xStatCntlrIndex, cpqSasPhyDrvOsName=cpqSasPhyDrvOsName, cpqScsiPhyDrvIndex=cpqScsiPhyDrvIndex, cpqScsiOsCommonPollFreq=cpqScsiOsCommonPollFreq, cpqScsiPhyDrvTable=cpqScsiPhyDrvTable, cpqSbDevFWRev=cpqSbDevFWRev, cpqTapePhyDrv=cpqTapePhyDrv, cpqScsiNw3xFatalWrites=cpqScsiNw3xFatalWrites, cpqTapeLibraryTable=cpqTapeLibraryTable, cpqScsiTargetTypeExtended=cpqScsiTargetTypeExtended, cpqTapeComponent=cpqTapeComponent, cpqTapeLibraryDriveList=cpqTapeLibraryDriveList, cpqScsiTargetBusIndex=cpqScsiTargetBusIndex, cpqCdLibraryBusIndex=cpqCdLibraryBusIndex, cpqScsiPhyDrvPlacement=cpqScsiPhyDrvPlacement, cpqScsiPhyDrvHardWriteErrs=cpqScsiPhyDrvHardWriteErrs, cpqTapeCountersTable=cpqTapeCountersTable, cpqScsiPhyDrvFuncTest1=cpqScsiPhyDrvFuncTest1, cpqTapeLibraryState=cpqTapeLibraryState, cpqSasHbaModel=cpqSasHbaModel) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/snmp/cpqdisk_mibs/IANAifType-MIB.py0000664000175000017500000001704700000000000026536 0ustar00zuulzuul00000000000000# # PySNMP MIB module IANAifType-MIB (http://pysnmp.sf.net) # ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") ( NotificationGroup, ModuleCompliance, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") ( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, mib_2, IpAddress, TimeTicks, Counter64, Unsigned32, iso, Gauge32, ModuleIdentity, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "mib-2", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "iso", "Gauge32", "ModuleIdentity", "ObjectIdentity", "Bits", "Counter32") ( DisplayString, TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") ianaifType = ModuleIdentity((1, 3, 6, 1, 2, 1, 30)).setRevisions(("2004-11-22 00:00", "2004-06-17 00:00", "2004-05-12 00:00", "2004-05-07 00:00", "2003-08-25 00:00", "2003-08-18 00:00", "2003-08-07 00:00", "2003-03-18 00:00", "2003-01-13 00:00", "2002-10-17 00:00", "2002-07-16 00:00", "2002-07-10 00:00", "2002-06-19 00:00", "2002-01-04 00:00", "2001-12-20 00:00", "2001-11-15 00:00", "2001-11-06 00:00", "2001-11-02 00:00", "2001-10-16 00:00", "2001-09-19 00:00", "2001-05-11 00:00", "2001-01-12 00:00", "2000-12-19 00:00", "2000-12-07 00:00", "2000-12-04 00:00", "2000-10-17 00:00", "2000-10-02 00:00", "2000-09-01 00:00", "2000-08-24 00:00", "2000-08-23 00:00", "2000-08-22 00:00", "2000-04-25 00:00", "2000-03-06 00:00", "1999-10-08 14:30", "1994-01-31 00:00",)) class IANAifType(Integer32, TextualConvention): subtypeSpec = Integer32.subtypeSpec+SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,) namedValues = NamedValues(("other", 1), ("regular1822", 2), ("hdh1822", 3), ("ddnX25", 4), ("rfc877x25", 5), ("ethernetCsmacd", 6), ("iso88023Csmacd", 7), ("iso88024TokenBus", 8), ("iso88025TokenRing", 9), ("iso88026Man", 10), ("starLan", 11), ("proteon10Mbit", 12), ("proteon80Mbit", 13), ("hyperchannel", 14), ("fddi", 15), ("lapb", 16), ("sdlc", 17), ("ds1", 18), ("e1", 19), ("basicISDN", 20), ("primaryISDN", 21), ("propPointToPointSerial", 22), ("ppp", 23), ("softwareLoopback", 24), ("eon", 25), ("ethernet3Mbit", 26), ("nsip", 27), ("slip", 28), ("ultra", 29), ("ds3", 30), ("sip", 31), ("frameRelay", 32), ("rs232", 33), ("para", 34), ("arcnet", 35), ("arcnetPlus", 36), ("atm", 37), ("miox25", 38), ("sonet", 39), ("x25ple", 40), ("iso88022llc", 41), ("localTalk", 42), ("smdsDxi", 43), ("frameRelayService", 44), ("v35", 45), ("hssi", 46), ("hippi", 47), ("modem", 48), ("aal5", 49), ("sonetPath", 50), ("sonetVT", 51), ("smdsIcip", 52), ("propVirtual", 53), ("propMultiplexor", 54), ("ieee80212", 55), ("fibreChannel", 56), ("hippiInterface", 57), ("frameRelayInterconnect", 58), ("aflane8023", 59), ("aflane8025", 60), ("cctEmul", 61), ("fastEther", 62), ("isdn", 63), ("v11", 64), ("v36", 65), ("g703at64k", 66), ("g703at2mb", 67), ("qllc", 68), ("fastEtherFX", 69), ("channel", 70), ("ieee80211", 71), ("ibm370parChan", 72), ("escon", 73), ("dlsw", 74), ("isdns", 75), ("isdnu", 76), ("lapd", 77), ("ipSwitch", 78), ("rsrb", 79), ("atmLogical", 80), ("ds0", 81), ("ds0Bundle", 82), ("bsc", 83), ("async", 84), ("cnr", 85), ("iso88025Dtr", 86), ("eplrs", 87), ("arap", 88), ("propCnls", 89), ("hostPad", 90), ("termPad", 91), ("frameRelayMPI", 92), ("x213", 93), ("adsl", 94), ("radsl", 95), ("sdsl", 96), ("vdsl", 97), ("iso88025CRFPInt", 98), ("myrinet", 99), ("voiceEM", 100), ("voiceFXO", 101), ("voiceFXS", 102), ("voiceEncap", 103), ("voiceOverIp", 104), ("atmDxi", 105), ("atmFuni", 106), ("atmIma", 107), ("pppMultilinkBundle", 108), ("ipOverCdlc", 109), ("ipOverClaw", 110), ("stackToStack", 111), ("virtualIpAddress", 112), ("mpc", 113), ("ipOverAtm", 114), ("iso88025Fiber", 115), ("tdlc", 116), ("gigabitEthernet", 117), ("hdlc", 118), ("lapf", 119), ("v37", 120), ("x25mlp", 121), ("x25huntGroup", 122), ("trasnpHdlc", 123), ("interleave", 124), ("fast", 125), ("ip", 126), ("docsCableMaclayer", 127), ("docsCableDownstream", 128), ("docsCableUpstream", 129), ("a12MppSwitch", 130), ("tunnel", 131), ("coffee", 132), ("ces", 133), ("atmSubInterface", 134), ("l2vlan", 135), ("l3ipvlan", 136), ("l3ipxvlan", 137), ("digitalPowerline", 138), ("mediaMailOverIp", 139), ("dtm", 140), ("dcn", 141), ("ipForward", 142), ("msdsl", 143), ("ieee1394", 144), ("if-gsn", 145), ("dvbRccMacLayer", 146), ("dvbRccDownstream", 147), ("dvbRccUpstream", 148), ("atmVirtual", 149), ("mplsTunnel", 150), ("srp", 151), ("voiceOverAtm", 152), ("voiceOverFrameRelay", 153), ("idsl", 154), ("compositeLink", 155), ("ss7SigLink", 156), ("propWirelessP2P", 157), ("frForward", 158), ("rfc1483", 159), ("usb", 160), ("ieee8023adLag", 161), ("bgppolicyaccounting", 162), ("frf16MfrBundle", 163), ("h323Gatekeeper", 164), ("h323Proxy", 165), ("mpls", 166), ("mfSigLink", 167), ("hdsl2", 168), ("shdsl", 169), ("ds1FDL", 170), ("pos", 171), ("dvbAsiIn", 172), ("dvbAsiOut", 173), ("plc", 174), ("nfas", 175), ("tr008", 176), ("gr303RDT", 177), ("gr303IDT", 178), ("isup", 179), ("propDocsWirelessMaclayer", 180), ("propDocsWirelessDownstream", 181), ("propDocsWirelessUpstream", 182), ("hiperlan2", 183), ("propBWAp2Mp", 184), ("sonetOverheadChannel", 185), ("digitalWrapperOverheadChannel", 186), ("aal2", 187), ("radioMAC", 188), ("atmRadio", 189), ("imt", 190), ("mvl", 191), ("reachDSL", 192), ("frDlciEndPt", 193), ("atmVciEndPt", 194), ("opticalChannel", 195), ("opticalTransport", 196), ("propAtm", 197), ("voiceOverCable", 198), ("infiniband", 199), ("teLink", 200), ("q2931", 201), ("virtualTg", 202), ("sipTg", 203), ("sipSig", 204), ("docsCableUpstreamChannel", 205), ("econet", 206), ("pon155", 207), ("pon622", 208), ("bridge", 209), ("linegroup", 210), ("voiceEMFGD", 211), ("voiceFGDEANA", 212), ("voiceDID", 213), ("mpegTransport", 214), ("sixToFour", 215), ("gtp", 216), ("pdnEtherLoop1", 217), ("pdnEtherLoop2", 218), ("opticalChannelGroup", 219), ("homepna", 220), ("gfp", 221), ("ciscoISLvlan", 222), ("actelisMetaLOOP", 223), ("fcipLink", 224), ("rpr", 225), ("qam", 226), ("lmp", 227),) mibBuilder.exportSymbols("IANAifType-MIB", IANAifType=IANAifType, PYSNMP_MODULE_ID=ianaifType, ianaifType=ianaifType) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/snmp/cpqdisk_mibs/IF-MIB.py0000664000175000017500000004474600000000000025151 0ustar00zuulzuul00000000000000# # PySNMP MIB module IF-MIB (http://pysnmp.sf.net) # ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") ( IANAifType, ) = mibBuilder.importSymbols("IANAifType-MIB", "IANAifType") ( NotificationGroup, ModuleCompliance, ObjectGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") ( snmpTraps, ) = mibBuilder.importSymbols("SNMPv2-MIB", "snmpTraps") ( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, mib_2, IpAddress, TimeTicks, Counter64, Unsigned32, ModuleIdentity, Gauge32, iso, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "mib-2", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "ModuleIdentity", "Gauge32", "iso", "ObjectIdentity", "Bits", "Counter32") ( TextualConvention, AutonomousType, TruthValue, TimeStamp, TestAndIncr, RowStatus, DisplayString, PhysAddress, ) = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "AutonomousType", "TruthValue", "TimeStamp", "TestAndIncr", "RowStatus", "DisplayString", "PhysAddress") ifMIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 31)).setRevisions(("2000-06-14 00:00", "1996-02-28 21:55", "1993-11-08 21:55",)) ifMIBObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 31, 1)) interfaces = MibIdentifier((1, 3, 6, 1, 2, 1, 2)) class OwnerString(OctetString, TextualConvention): displayHint = '255a' subtypeSpec = OctetString.subtypeSpec+ValueSizeConstraint(0,255) class InterfaceIndex(Integer32, TextualConvention): displayHint = 'd' subtypeSpec = Integer32.subtypeSpec+ValueRangeConstraint(1,2147483647) class InterfaceIndexOrZero(Integer32, TextualConvention): displayHint = 'd' subtypeSpec = Integer32.subtypeSpec+ValueRangeConstraint(0,2147483647) ifNumber = MibScalar((1, 3, 6, 1, 2, 1, 2, 1), Integer32()).setMaxAccess("readonly") ifTableLastChange = MibScalar((1, 3, 6, 1, 2, 1, 31, 1, 5), TimeTicks()).setMaxAccess("readonly") ifTable = MibTable((1, 3, 6, 1, 2, 1, 2, 2), ) ifEntry = MibTableRow((1, 3, 6, 1, 2, 1, 2, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) ifIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 1), InterfaceIndex()).setMaxAccess("readonly") ifDescr = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255))).setMaxAccess("readonly") ifType = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 3), IANAifType()).setMaxAccess("readonly") ifMtu = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 4), Integer32()).setMaxAccess("readonly") ifSpeed = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 5), Gauge32()).setMaxAccess("readonly") ifPhysAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 6), PhysAddress()).setMaxAccess("readonly") ifAdminStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 7), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("testing", 3),))).setMaxAccess("readwrite") ifOperStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 8), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7,)).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("testing", 3), ("unknown", 4), ("dormant", 5), ("notPresent", 6), ("lowerLayerDown", 7),))).setMaxAccess("readonly") ifLastChange = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 9), TimeTicks()).setMaxAccess("readonly") ifInOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 10), Counter32()).setMaxAccess("readonly") ifInUcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 11), Counter32()).setMaxAccess("readonly") ifInNUcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 12), Counter32()).setMaxAccess("readonly") ifInDiscards = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 13), Counter32()).setMaxAccess("readonly") ifInErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 14), Counter32()).setMaxAccess("readonly") ifInUnknownProtos = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 15), Counter32()).setMaxAccess("readonly") ifOutOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 16), Counter32()).setMaxAccess("readonly") ifOutUcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 17), Counter32()).setMaxAccess("readonly") ifOutNUcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 18), Counter32()).setMaxAccess("readonly") ifOutDiscards = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 19), Counter32()).setMaxAccess("readonly") ifOutErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 20), Counter32()).setMaxAccess("readonly") ifOutQLen = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 21), Gauge32()).setMaxAccess("readonly") ifSpecific = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 22), ObjectIdentifier()).setMaxAccess("readonly") ifXTable = MibTable((1, 3, 6, 1, 2, 1, 31, 1, 1), ) ifXEntry = MibTableRow((1, 3, 6, 1, 2, 1, 31, 1, 1, 1), ) ifEntry.registerAugmentions(("IF-MIB", "ifXEntry")) ifXEntry.setIndexNames(*ifEntry.getIndexNames()) ifName = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 1), DisplayString()).setMaxAccess("readonly") ifInMulticastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 2), Counter32()).setMaxAccess("readonly") ifInBroadcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 3), Counter32()).setMaxAccess("readonly") ifOutMulticastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 4), Counter32()).setMaxAccess("readonly") ifOutBroadcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 5), Counter32()).setMaxAccess("readonly") ifHCInOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 6), Counter64()).setMaxAccess("readonly") ifHCInUcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 7), Counter64()).setMaxAccess("readonly") ifHCInMulticastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 8), Counter64()).setMaxAccess("readonly") ifHCInBroadcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 9), Counter64()).setMaxAccess("readonly") ifHCOutOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 10), Counter64()).setMaxAccess("readonly") ifHCOutUcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 11), Counter64()).setMaxAccess("readonly") ifHCOutMulticastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 12), Counter64()).setMaxAccess("readonly") ifHCOutBroadcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 13), Counter64()).setMaxAccess("readonly") ifLinkUpDownTrapEnable = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 14), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2,)).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2),))).setMaxAccess("readwrite") ifHighSpeed = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 15), Gauge32()).setMaxAccess("readonly") ifPromiscuousMode = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 16), TruthValue()).setMaxAccess("readwrite") ifConnectorPresent = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 17), TruthValue()).setMaxAccess("readonly") ifAlias = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 18), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,64))).setMaxAccess("readwrite") ifCounterDiscontinuityTime = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 19), TimeStamp()).setMaxAccess("readonly") ifStackTable = MibTable((1, 3, 6, 1, 2, 1, 31, 1, 2), ) ifStackEntry = MibTableRow((1, 3, 6, 1, 2, 1, 31, 1, 2, 1), ).setIndexNames((0, "IF-MIB", "ifStackHigherLayer"), (0, "IF-MIB", "ifStackLowerLayer")) ifStackHigherLayer = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 2, 1, 1), InterfaceIndexOrZero()) ifStackLowerLayer = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 2, 1, 2), InterfaceIndexOrZero()) ifStackStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 2, 1, 3), RowStatus()).setMaxAccess("readcreate") ifStackLastChange = MibScalar((1, 3, 6, 1, 2, 1, 31, 1, 6), TimeTicks()).setMaxAccess("readonly") ifRcvAddressTable = MibTable((1, 3, 6, 1, 2, 1, 31, 1, 4), ) ifRcvAddressEntry = MibTableRow((1, 3, 6, 1, 2, 1, 31, 1, 4, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "IF-MIB", "ifRcvAddressAddress")) ifRcvAddressAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 4, 1, 1), PhysAddress()) ifRcvAddressStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 4, 1, 2), RowStatus()).setMaxAccess("readcreate") ifRcvAddressType = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 4, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3,)).clone(namedValues=NamedValues(("other", 1), ("volatile", 2), ("nonVolatile", 3),)).clone('volatile')).setMaxAccess("readcreate") linkDown = NotificationType((1, 3, 6, 1, 6, 3, 1, 1, 5, 3)).setObjects(*(("IF-MIB", "ifIndex"), ("IF-MIB", "ifAdminStatus"), ("IF-MIB", "ifOperStatus"),)) linkUp = NotificationType((1, 3, 6, 1, 6, 3, 1, 1, 5, 4)).setObjects(*(("IF-MIB", "ifIndex"), ("IF-MIB", "ifAdminStatus"), ("IF-MIB", "ifOperStatus"),)) ifConformance = MibIdentifier((1, 3, 6, 1, 2, 1, 31, 2)) ifGroups = MibIdentifier((1, 3, 6, 1, 2, 1, 31, 2, 1)) ifCompliances = MibIdentifier((1, 3, 6, 1, 2, 1, 31, 2, 2)) ifCompliance3 = ModuleCompliance((1, 3, 6, 1, 2, 1, 31, 2, 2, 3)).setObjects(*(("IF-MIB", "ifGeneralInformationGroup"), ("IF-MIB", "linkUpDownNotificationsGroup"), ("IF-MIB", "ifFixedLengthGroup"), ("IF-MIB", "ifHCFixedLengthGroup"), ("IF-MIB", "ifPacketGroup"), ("IF-MIB", "ifHCPacketGroup"), ("IF-MIB", "ifVHCPacketGroup"), ("IF-MIB", "ifCounterDiscontinuityGroup"), ("IF-MIB", "ifRcvAddressGroup"),)) ifGeneralInformationGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 31, 2, 1, 10)).setObjects(*(("IF-MIB", "ifIndex"), ("IF-MIB", "ifDescr"), ("IF-MIB", "ifType"), ("IF-MIB", "ifSpeed"), ("IF-MIB", "ifPhysAddress"), ("IF-MIB", "ifAdminStatus"), ("IF-MIB", "ifOperStatus"), ("IF-MIB", "ifLastChange"), ("IF-MIB", "ifLinkUpDownTrapEnable"), ("IF-MIB", "ifConnectorPresent"), ("IF-MIB", "ifHighSpeed"), ("IF-MIB", "ifName"), ("IF-MIB", "ifNumber"), ("IF-MIB", "ifAlias"), ("IF-MIB", "ifTableLastChange"),)) ifFixedLengthGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 31, 2, 1, 2)).setObjects(*(("IF-MIB", "ifInOctets"), ("IF-MIB", "ifOutOctets"), ("IF-MIB", "ifInUnknownProtos"), ("IF-MIB", "ifInErrors"), ("IF-MIB", "ifOutErrors"),)) ifHCFixedLengthGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 31, 2, 1, 3)).setObjects(*(("IF-MIB", "ifHCInOctets"), ("IF-MIB", "ifHCOutOctets"), ("IF-MIB", "ifInOctets"), ("IF-MIB", "ifOutOctets"), ("IF-MIB", "ifInUnknownProtos"), ("IF-MIB", "ifInErrors"), ("IF-MIB", "ifOutErrors"),)) ifPacketGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 31, 2, 1, 4)).setObjects(*(("IF-MIB", "ifInOctets"), ("IF-MIB", "ifOutOctets"), ("IF-MIB", "ifInUnknownProtos"), ("IF-MIB", "ifInErrors"), ("IF-MIB", "ifOutErrors"), ("IF-MIB", "ifMtu"), ("IF-MIB", "ifInUcastPkts"), ("IF-MIB", "ifInMulticastPkts"), ("IF-MIB", "ifInBroadcastPkts"), ("IF-MIB", "ifInDiscards"), ("IF-MIB", "ifOutUcastPkts"), ("IF-MIB", "ifOutMulticastPkts"), ("IF-MIB", "ifOutBroadcastPkts"), ("IF-MIB", "ifOutDiscards"), ("IF-MIB", "ifPromiscuousMode"),)) ifHCPacketGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 31, 2, 1, 5)).setObjects(*(("IF-MIB", "ifHCInOctets"), ("IF-MIB", "ifHCOutOctets"), ("IF-MIB", "ifInOctets"), ("IF-MIB", "ifOutOctets"), ("IF-MIB", "ifInUnknownProtos"), ("IF-MIB", "ifInErrors"), ("IF-MIB", "ifOutErrors"), ("IF-MIB", "ifMtu"), ("IF-MIB", "ifInUcastPkts"), ("IF-MIB", "ifInMulticastPkts"), ("IF-MIB", "ifInBroadcastPkts"), ("IF-MIB", "ifInDiscards"), ("IF-MIB", "ifOutUcastPkts"), ("IF-MIB", "ifOutMulticastPkts"), ("IF-MIB", "ifOutBroadcastPkts"), ("IF-MIB", "ifOutDiscards"), ("IF-MIB", "ifPromiscuousMode"),)) ifVHCPacketGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 31, 2, 1, 6)).setObjects(*(("IF-MIB", "ifHCInUcastPkts"), ("IF-MIB", "ifHCInMulticastPkts"), ("IF-MIB", "ifHCInBroadcastPkts"), ("IF-MIB", "ifHCOutUcastPkts"), ("IF-MIB", "ifHCOutMulticastPkts"), ("IF-MIB", "ifHCOutBroadcastPkts"), ("IF-MIB", "ifHCInOctets"), ("IF-MIB", "ifHCOutOctets"), ("IF-MIB", "ifInOctets"), ("IF-MIB", "ifOutOctets"), ("IF-MIB", "ifInUnknownProtos"), ("IF-MIB", "ifInErrors"), ("IF-MIB", "ifOutErrors"), ("IF-MIB", "ifMtu"), ("IF-MIB", "ifInUcastPkts"), ("IF-MIB", "ifInMulticastPkts"), ("IF-MIB", "ifInBroadcastPkts"), ("IF-MIB", "ifInDiscards"), ("IF-MIB", "ifOutUcastPkts"), ("IF-MIB", "ifOutMulticastPkts"), ("IF-MIB", "ifOutBroadcastPkts"), ("IF-MIB", "ifOutDiscards"), ("IF-MIB", "ifPromiscuousMode"),)) ifRcvAddressGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 31, 2, 1, 7)).setObjects(*(("IF-MIB", "ifRcvAddressStatus"), ("IF-MIB", "ifRcvAddressType"),)) ifStackGroup2 = ObjectGroup((1, 3, 6, 1, 2, 1, 31, 2, 1, 11)).setObjects(*(("IF-MIB", "ifStackStatus"), ("IF-MIB", "ifStackLastChange"),)) ifCounterDiscontinuityGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 31, 2, 1, 13)).setObjects(*(("IF-MIB", "ifCounterDiscontinuityTime"),)) linkUpDownNotificationsGroup = NotificationGroup((1, 3, 6, 1, 2, 1, 31, 2, 1, 14)).setObjects(*(("IF-MIB", "linkUp"), ("IF-MIB", "linkDown"),)) ifTestTable = MibTable((1, 3, 6, 1, 2, 1, 31, 1, 3), ) ifTestEntry = MibTableRow((1, 3, 6, 1, 2, 1, 31, 1, 3, 1), ) ifEntry.registerAugmentions(("IF-MIB", "ifTestEntry")) ifTestEntry.setIndexNames(*ifEntry.getIndexNames()) ifTestId = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 3, 1, 1), TestAndIncr()).setMaxAccess("readwrite") ifTestStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 3, 1, 2), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2,)).clone(namedValues=NamedValues(("notInUse", 1), ("inUse", 2),))).setMaxAccess("readwrite") ifTestType = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 3, 1, 3), AutonomousType()).setMaxAccess("readwrite") ifTestResult = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 3, 1, 4), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2, 3, 4, 5, 6, 7,)).clone(namedValues=NamedValues(("none", 1), ("success", 2), ("inProgress", 3), ("notSupported", 4), ("unAbleToRun", 5), ("aborted", 6), ("failed", 7),))).setMaxAccess("readonly") ifTestCode = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 3, 1, 5), ObjectIdentifier()).setMaxAccess("readonly") ifTestOwner = MibTableColumn((1, 3, 6, 1, 2, 1, 31, 1, 3, 1, 6), OwnerString()).setMaxAccess("readwrite") ifGeneralGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 31, 2, 1, 1)).setObjects(*(("IF-MIB", "ifDescr"), ("IF-MIB", "ifType"), ("IF-MIB", "ifSpeed"), ("IF-MIB", "ifPhysAddress"), ("IF-MIB", "ifAdminStatus"), ("IF-MIB", "ifOperStatus"), ("IF-MIB", "ifLastChange"), ("IF-MIB", "ifLinkUpDownTrapEnable"), ("IF-MIB", "ifConnectorPresent"), ("IF-MIB", "ifHighSpeed"), ("IF-MIB", "ifName"),)) ifTestGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 31, 2, 1, 8)).setObjects(*(("IF-MIB", "ifTestId"), ("IF-MIB", "ifTestStatus"), ("IF-MIB", "ifTestType"), ("IF-MIB", "ifTestResult"), ("IF-MIB", "ifTestCode"), ("IF-MIB", "ifTestOwner"),)) ifStackGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 31, 2, 1, 9)).setObjects(*(("IF-MIB", "ifStackStatus"),)) ifOldObjectsGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 31, 2, 1, 12)).setObjects(*(("IF-MIB", "ifInNUcastPkts"), ("IF-MIB", "ifOutNUcastPkts"), ("IF-MIB", "ifOutQLen"), ("IF-MIB", "ifSpecific"),)) ifCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 31, 2, 2, 1)).setObjects(*(("IF-MIB", "ifGeneralGroup"), ("IF-MIB", "ifStackGroup"), ("IF-MIB", "ifFixedLengthGroup"), ("IF-MIB", "ifHCFixedLengthGroup"), ("IF-MIB", "ifPacketGroup"), ("IF-MIB", "ifHCPacketGroup"), ("IF-MIB", "ifTestGroup"), ("IF-MIB", "ifRcvAddressGroup"),)) ifCompliance2 = ModuleCompliance((1, 3, 6, 1, 2, 1, 31, 2, 2, 2)).setObjects(*(("IF-MIB", "ifGeneralInformationGroup"), ("IF-MIB", "ifStackGroup2"), ("IF-MIB", "ifCounterDiscontinuityGroup"), ("IF-MIB", "ifFixedLengthGroup"), ("IF-MIB", "ifHCFixedLengthGroup"), ("IF-MIB", "ifPacketGroup"), ("IF-MIB", "ifHCPacketGroup"), ("IF-MIB", "ifRcvAddressGroup"),)) mibBuilder.exportSymbols("IF-MIB", ifRcvAddressTable=ifRcvAddressTable, PYSNMP_MODULE_ID=ifMIB, ifVHCPacketGroup=ifVHCPacketGroup, ifGeneralInformationGroup=ifGeneralInformationGroup, ifHCOutBroadcastPkts=ifHCOutBroadcastPkts, ifOutNUcastPkts=ifOutNUcastPkts, ifInBroadcastPkts=ifInBroadcastPkts, ifStackLastChange=ifStackLastChange, ifHighSpeed=ifHighSpeed, ifRcvAddressAddress=ifRcvAddressAddress, ifOperStatus=ifOperStatus, ifCompliance=ifCompliance, ifRcvAddressEntry=ifRcvAddressEntry, ifStackGroup2=ifStackGroup2, ifStackEntry=ifStackEntry, ifOutQLen=ifOutQLen, ifXEntry=ifXEntry, ifStackTable=ifStackTable, ifType=ifType, ifMIBObjects=ifMIBObjects, ifInMulticastPkts=ifInMulticastPkts, ifNumber=ifNumber, ifHCInUcastPkts=ifHCInUcastPkts, ifFixedLengthGroup=ifFixedLengthGroup, ifHCInBroadcastPkts=ifHCInBroadcastPkts, ifOldObjectsGroup=ifOldObjectsGroup, ifGeneralGroup=ifGeneralGroup, ifStackHigherLayer=ifStackHigherLayer, ifStackStatus=ifStackStatus, ifAdminStatus=ifAdminStatus, ifOutMulticastPkts=ifOutMulticastPkts, ifSpeed=ifSpeed, ifInUnknownProtos=ifInUnknownProtos, interfaces=interfaces, ifPacketGroup=ifPacketGroup, ifXTable=ifXTable, ifHCInMulticastPkts=ifHCInMulticastPkts, ifLinkUpDownTrapEnable=ifLinkUpDownTrapEnable, ifTable=ifTable, ifInUcastPkts=ifInUcastPkts, OwnerString=OwnerString, ifConformance=ifConformance, ifPhysAddress=ifPhysAddress, ifInDiscards=ifInDiscards, ifTestType=ifTestType, ifHCOutUcastPkts=ifHCOutUcastPkts, ifCompliances=ifCompliances, ifTestEntry=ifTestEntry, ifGroups=ifGroups, ifTestCode=ifTestCode, ifOutErrors=ifOutErrors, ifTestId=ifTestId, ifHCPacketGroup=ifHCPacketGroup, ifOutUcastPkts=ifOutUcastPkts, linkUpDownNotificationsGroup=linkUpDownNotificationsGroup, ifStackGroup=ifStackGroup, InterfaceIndexOrZero=InterfaceIndexOrZero, ifInNUcastPkts=ifInNUcastPkts, ifLastChange=ifLastChange, ifTestStatus=ifTestStatus, ifEntry=ifEntry, ifTestOwner=ifTestOwner, ifTestResult=ifTestResult, ifHCOutMulticastPkts=ifHCOutMulticastPkts, ifName=ifName, ifRcvAddressStatus=ifRcvAddressStatus, ifTestGroup=ifTestGroup, ifHCFixedLengthGroup=ifHCFixedLengthGroup, ifIndex=ifIndex, ifOutOctets=ifOutOctets, ifCounterDiscontinuityGroup=ifCounterDiscontinuityGroup, ifAlias=ifAlias, ifMtu=ifMtu, ifStackLowerLayer=ifStackLowerLayer, ifConnectorPresent=ifConnectorPresent, ifRcvAddressGroup=ifRcvAddressGroup, ifHCInOctets=ifHCInOctets, ifDescr=ifDescr, ifRcvAddressType=ifRcvAddressType, ifOutDiscards=ifOutDiscards, ifInOctets=ifInOctets, InterfaceIndex=InterfaceIndex, ifOutBroadcastPkts=ifOutBroadcastPkts, linkDown=linkDown, ifPromiscuousMode=ifPromiscuousMode, ifMIB=ifMIB, ifHCOutOctets=ifHCOutOctets, ifCompliance2=ifCompliance2, ifCompliance3=ifCompliance3, ifSpecific=ifSpecific, ifTestTable=ifTestTable, ifTableLastChange=ifTableLastChange, ifCounterDiscontinuityTime=ifCounterDiscontinuityTime, linkUp=linkUp, ifInErrors=ifInErrors) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/snmp/cpqdisk_mibs/RFC1215-MIB.py0000664000175000017500000000426500000000000025566 0ustar00zuulzuul00000000000000# # PySNMP MIB module RFC1215-MIB (http://pysnmp.sf.net) # ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") ( ifIndex, ) = mibBuilder.importSymbols("IF-MIB", "ifIndex") ( egpNeighAddr, ) = mibBuilder.importSymbols("RFC1213-MIB", "egpNeighAddr") ( NotificationGroup, ModuleCompliance, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") ( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, mib_2, IpAddress, TimeTicks, Counter64, Unsigned32, iso, Gauge32, ModuleIdentity, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "mib-2", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "iso", "Gauge32", "ModuleIdentity", "ObjectIdentity", "Bits", "Counter32") ( DisplayString, TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") snmp = MibIdentifier((1, 3, 6, 1, 2, 1, 11)) coldStart = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,0)).setObjects(*()) warmStart = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,1)).setObjects(*()) linkDown = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,2)).setObjects(*(("RFC1215-MIB", "ifIndex"),)) linkUp = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,3)).setObjects(*(("RFC1215-MIB", "ifIndex"),)) authenticationFailure = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,4)).setObjects(*()) egpNeighborLoss = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,5)).setObjects(*(("RFC1215-MIB", "egpNeighAddr"),)) mibBuilder.exportSymbols("RFC1215-MIB", linkDown=linkDown, authenticationFailure=authenticationFailure, warmStart=warmStart, egpNeighborLoss=egpNeighborLoss, snmp=snmp, linkUp=linkUp, coldStart=coldStart) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ilo/snmp/snmp_cpqdisk_sizes.py0000775000175000017500000002177300000000000025504 0ustar00zuulzuul00000000000000#!/usr/bin/env python # Copyright 2017 Hewlett-Packard Enterprise 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. __author__ = 'HPE' import os from pysnmp import hlapi from pysnmp.smi import builder from pysnmp.smi import view from proliantutils import exception from proliantutils import log LOG = log.get_logger(__name__) class MibBuilder(builder.MibBuilder): # NOTE(etingof): disable searching in `pysnmp_mibs` because it can # cause permission problems when opening files at relative path defaultMiscMibs = '' cpq_mibs_path = os.path.dirname(os.path.abspath(__file__)) cpq_mibs_path = os.path.join(cpq_mibs_path, "cpqdisk_mibs") mBuilder = MibBuilder() mBuilder.addMibSources(builder.DirMibSource(cpq_mibs_path)) mibBuilder = mBuilder.loadModules('CPQIDA-MIB', 'CPQSCSI-MIB') mibViewController = view.MibViewController(mibBuilder) # A dictionary of supported mapped snmp attributes MAPPED_SNMP_ATTRIBUTES = { 'authProtocol': { 'SHA': hlapi.usmHMACSHAAuthProtocol, 'MD5': hlapi.usmHMACMD5AuthProtocol, }, 'privProtocol': { 'AES': hlapi.usmAesCfb128Protocol, 'DES': hlapi.usmDESPrivProtocol, }, } def _create_usm_user_obj(snmp_cred): """Creates the UsmUserData obj for the given credentials. This method creates an instance for the method hlapi.UsmUserData. The UsmUserData() allows the 'auth_protocol' and 'priv_protocol' to be undefined by user if their pass phrases are provided. :param snmp_cred: Dictionary of SNMP credentials. auth_user: SNMP user auth_protocol: Auth Protocol auth_prot_pp: Pass phrase value for AuthProtocol. priv_protocol:Privacy Protocol. auth_priv_pp: Pass phrase value for Privacy Protocol. :returns UsmUserData object as per given credentials. """ auth_protocol = snmp_cred.get('auth_protocol') priv_protocol = snmp_cred.get('priv_protocol') auth_user = snmp_cred.get('auth_user') auth_prot_pp = snmp_cred.get('auth_prot_pp') auth_priv_pp = snmp_cred.get('auth_priv_pp') if ((not auth_protocol) and priv_protocol): priv_protocol = ( MAPPED_SNMP_ATTRIBUTES['privProtocol'][priv_protocol]) usm_user_obj = hlapi.UsmUserData(auth_user, auth_prot_pp, auth_priv_pp, privProtocol=priv_protocol) elif ((not priv_protocol) and auth_protocol): auth_protocol = ( MAPPED_SNMP_ATTRIBUTES['authProtocol'][auth_protocol]) usm_user_obj = hlapi.UsmUserData(auth_user, auth_prot_pp, auth_priv_pp, authProtocol=auth_protocol) elif not all([priv_protocol and auth_protocol]): usm_user_obj = hlapi.UsmUserData(auth_user, auth_prot_pp, auth_priv_pp) else: auth_protocol = ( MAPPED_SNMP_ATTRIBUTES['authProtocol'][auth_protocol]) priv_protocol = ( MAPPED_SNMP_ATTRIBUTES['privProtocol'][priv_protocol]) usm_user_obj = hlapi.UsmUserData(auth_user, auth_prot_pp, auth_priv_pp, authProtocol=auth_protocol, privProtocol=priv_protocol) return usm_user_obj def _parse_mibs(iLOIP, snmp_credentials): """Parses the MIBs. :param iLOIP: IP address of the server on which SNMP discovery has to be executed. :param snmp_credentials: a Dictionary of SNMP credentials. auth_user: SNMP user auth_protocol: Auth Protocol auth_prot_pp: Pass phrase value for AuthProtocol. priv_protocol:Privacy Protocol. auth_priv_pp: Pass phrase value for Privacy Protocol. :returns the dictionary of parsed MIBs. :raises exception.InvalidInputError if pysnmp is unable to get SNMP data due to wrong inputs provided. :raises exception.IloError if pysnmp raises any exception. """ result = {} usm_user_obj = _create_usm_user_obj(snmp_credentials) try: for(errorIndication, errorStatus, errorIndex, varBinds) in hlapi.nextCmd( hlapi.SnmpEngine(), usm_user_obj, hlapi.UdpTransportTarget((iLOIP, 161), timeout=3, retries=3), hlapi.ContextData(), # cpqida cpqDaPhyDrvTable Drive Array Physical Drive Table hlapi.ObjectType( hlapi.ObjectIdentity('1.3.6.1.4.1.232.3.2.5.1')), # cpqscsi SCSI Physical Drive Table hlapi.ObjectType( hlapi.ObjectIdentity('1.3.6.1.4.1.232.5.2.4.1')), # cpqscsi SAS Physical Drive Table hlapi.ObjectType( hlapi.ObjectIdentity('1.3.6.1.4.1.232.5.5.2.1')), lexicographicMode=False, ignoreNonIncreasingOid=True): if errorIndication: LOG.error(errorIndication) msg = "SNMP failed to traverse MIBs %s", errorIndication raise exception.IloSNMPInvalidInputFailure(msg) else: if errorStatus: msg = ('Parsing MIBs failed. %s at %s' % (errorStatus.prettyPrint(), errorIndex and varBinds[-1][int(errorIndex) - 1] or '?')) LOG.error(msg) raise exception.IloSNMPInvalidInputFailure(msg) else: for varBindTableRow in varBinds: name, val = tuple(varBindTableRow) oid, label, suffix = ( mibViewController.getNodeName(name)) key = name.prettyPrint() # Don't traverse outside the tables we requested if not (key.find("SNMPv2-SMI::enterprises.232.3") >= 0 or (key.find( "SNMPv2-SMI::enterprises.232.5") >= 0)): break if key not in result: result[key] = {} result[key][label[-1]] = {} result[key][label[-1]][suffix] = val except Exception as e: msg = "SNMP library failed with error %s", e LOG.error(msg) raise exception.IloSNMPExceptionFailure(msg) return result def _get_disksize_MiB(iLOIP, cred): """Reads the dictionary of parsed MIBs and gets the disk size. :param iLOIP: IP address of the server on which SNMP discovery has to be executed. :param snmp_credentials in a dictionary having following mandatory keys. auth_user: SNMP user auth_protocol: Auth Protocol auth_prot_pp: Pass phrase value for AuthProtocol. priv_protocol:Privacy Protocol. auth_priv_pp: Pass phrase value for Privacy Protocol. :returns the dictionary of disk sizes of all physical drives. """ # '1.3.6.1.4.1.232.5.5.1.1', # cpqscsi SAS HBA Table # '1.3.6.1.4.1.232.3.2.3.1', # cpqida Drive Array Logical Drive Table result = _parse_mibs(iLOIP, cred) disksize = {} for uuid in sorted(result): for key in result[uuid]: # We only track the Physical Disk Size if key.find('PhyDrvSize') >= 0: disksize[uuid] = dict() for suffix in sorted(result[uuid][key]): size = result[uuid][key][suffix] disksize[uuid][key] = str(size) return disksize def get_local_gb(iLOIP, snmp_credentials): """Gets the maximum disk size among all disks. :param iLOIP: IP address of the server on which SNMP discovery has to be executed. :param snmp_credentials in a dictionary having following mandatory keys. auth_user: SNMP user auth_protocol: Auth Protocol auth_prot_pp: Pass phrase value for AuthProtocol. priv_protocol:Privacy Protocol. auth_priv_pp: Pass phrase value for Privacy Protocol. """ disk_sizes = _get_disksize_MiB(iLOIP, snmp_credentials) max_size = 0 for uuid in disk_sizes: for key in disk_sizes[uuid]: if int(disk_sizes[uuid][key]) > max_size: max_size = int(disk_sizes[uuid][key]) max_size_gb = max_size / 1024 return max_size_gb ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2346644 proliantutils-2.16.0/proliantutils/ipa_hw_manager/0000775000175000017500000000000000000000000022406 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ipa_hw_manager/__init__.py0000664000175000017500000000000000000000000024505 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/ipa_hw_manager/hardware_manager.py0000664000175000017500000002451400000000000026255 0ustar00zuulzuul00000000000000# Copyright 2015 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from ironic_python_agent import hardware from proliantutils.hpssa import manager as hpssa_manager from proliantutils import log from proliantutils.sum import sum_controller LOG = log.get_logger(__name__) _RAID_APPLY_CONFIGURATION_ARGSINFO = { "raid_config": { "description": "The RAID configuration to apply.", "required": True, }, "delete_existing": { "description": ( "Setting this to 'True' indicates to delete existing RAID " "configuration prior to creating the new configuration. " "Default value is 'True'." ), "required": False, } } _FIRMWARE_UPDATE_SUM_ARGSINFO = { 'url': { 'description': ( "The image location for SPP (Service Pack for Proliant) ISO." ), 'required': True, }, 'checksum': { 'description': ( "The md5 checksum of the SPP image file." ), 'required': True, }, 'components': { 'description': ( "The list of firmware component filenames. If not specified, " "SUM updates all the firmware components." ), 'required': False, } } class ProliantHardwareManager(hardware.GenericHardwareManager): HARDWARE_MANAGER_VERSION = "3" def get_clean_steps(self, node, ports): """Return the clean steps supported by this hardware manager. This method returns the clean steps that are supported by proliant hardware manager. This method is invoked on every hardware manager by Ironic Python Agent to give this information back to Ironic. :param node: A dictionary of the node object :param ports: A list of dictionaries containing information of ports for the node :returns: A list of dictionaries, each item containing the step name, interface and priority for the clean step. """ return [ { 'step': 'create_configuration', 'interface': 'raid', 'priority': 0, 'reboot_requested': False, }, { 'step': 'delete_configuration', 'interface': 'raid', 'priority': 0, 'reboot_requested': False, }, { 'step': 'erase_devices', 'interface': 'deploy', 'priority': 0, 'reboot_requested': False, }, { 'step': 'update_firmware_sum', 'interface': 'management', 'priority': 0, 'reboot_requested': False, }, ] def get_deploy_steps(self, node, ports): """Return the deploy steps supported by this hardware manager. This method returns the deploy steps that are supported by proliant hardware manager. This method is invoked on every hardware manager by Ironic Python Agent to give this information back to Ironic. :param node: A dictionary of the node object :param ports: A list of dictionaries containing information of ports for the node :returns: A list of dictionaries, each item containing the step name, interface, priority, reboot_requested and argsinfo for the deploy step. """ return [ { 'step': 'apply_configuration', 'interface': 'raid', 'priority': 0, 'reboot_requested': False, 'argsinfo': _RAID_APPLY_CONFIGURATION_ARGSINFO, }, { 'step': 'flash_firmware_sum', 'interface': 'management', 'priority': 0, 'reboot_requested': False, 'argsinfo': _FIRMWARE_UPDATE_SUM_ARGSINFO, }, ] def evaluate_hardware_support(cls): return hardware.HardwareSupport.SERVICE_PROVIDER def apply_configuration(self, node, ports, raid_config, delete_existing=True): """Apply RAID configuration. :param node: A dictionary of the node object. :param ports: A list of dictionaries containing information of ports for the node. :param raid_config: The configuration to apply. :param delete_existing: Whether to delete the existing configuration. :returns: The current RAID configuration of the below format. raid_config = { 'logical_disks': [{ 'size_gb': 100, 'raid_level': 1, 'physical_disks': [ '5I:0:1', '5I:0:2'], 'controller': 'Smart array controller' }, ] } """ if delete_existing: self.delete_configuration(node, ports) LOG.debug("Creating raid with configuration %(raid_config)s", {'raid_config': raid_config}) return hpssa_manager.create_configuration(raid_config=raid_config) def create_configuration(self, node, ports): """Create RAID configuration on the bare metal. This method creates the desired RAID configuration as read from node['target_raid_config']. :param node: A dictionary of the node object :param ports: A list of dictionaries containing information of ports for the node :returns: The current RAID configuration of the below format. raid_config = { 'logical_disks': [{ 'size_gb': 100, 'raid_level': 1, 'physical_disks': [ '5I:0:1', '5I:0:2'], 'controller': 'Smart array controller' }, ] } """ target_raid_config = node.get('target_raid_config', {}).copy() if not target_raid_config: LOG.debug("No target_raid_config found") return {} LOG.debug("Creating raid with configuration %(raid_config)s", {'raid_config': target_raid_config}) return hpssa_manager.create_configuration( raid_config=target_raid_config) def delete_configuration(self, node, ports): """Deletes RAID configuration on the bare metal. This method deletes all the RAID disks on the bare metal. :param node: A dictionary of the node object :param ports: A list of dictionaries containing information of ports for the node """ return hpssa_manager.delete_configuration() def erase_devices(self, node, port): """Erase the drives on the bare metal. This method erase all the drives which supports sanitize and the drives which are not part of any logical volume on the bare metal. It calls generic erase method after the success of Sanitize disk erase. :param node: A dictionary of the node object. :param port: A list of dictionaries containing information of ports for the node. :raises exception.HPSSAOperationError, if there is a failure on the erase operation on the controllers. :returns: The dictionary of controllers with the drives and erase status for each drive. """ result = {} result['Disk Erase Status'] = hpssa_manager.erase_devices() result.update(super(ProliantHardwareManager, self).erase_devices(node, port)) return result def update_firmware_sum(self, node, port): """Performs SUM based firmware update on the bare metal node. This method performs firmware update on all or some of the firmware components on the bare metal node. :param node: A dictionary of the node object. :param port: A list of dictionaries containing information of ports for the node. :returns: A string with return code and the statistics of updated/failed components. :raises: SUMOperationError, when the SUM based firmware update operation on the node fails. """ url = node['clean_step']['args'].get('url') checksum = node['clean_step']['args'].get('checksum') components = node['clean_step']['args'].get('components') return sum_controller.update_firmware(node, url, checksum, components=components) def flash_firmware_sum(self, node, port, url, checksum, components=None): """Performs SUM based firmware update on the bare metal node. This method performs firmware update on all or some of the firmware components on the bare metal node. :param node: A dictionary of the node object. :param port: A list of dictionaries containing information of ports for the node. :param url: URL of SPP (Service Pack for Proliant) ISO. :param checksum: MD5 checksum of SPP ISO to verify the image. :param components: List of filenames of the firmware components to be flashed. If not provided, the firmware update is performed on all the firmware components. :returns: A string with return code and the statistics of updated/failed components. :raises: SUMOperationError, when the SUM based firmware update operation on the node fails. """ LOG.debug("Flashing firmware from %(url)s for components %(comp)s", {'url': url, 'comp': components}) return sum_controller.update_firmware(node, url, checksum, components=components) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/log.py0000664000175000017500000000205100000000000020576 0ustar00zuulzuul00000000000000# Copyright 2015 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. """Logger utility for proliantutils""" import logging base_logger = logging.getLogger('proliantutils') base_logger.addHandler(logging.NullHandler()) def get_logger(name): """Return a logger with the specified name If no name is specified then it returns the base logger with the name, 'proliantutils'. :param name: logger name """ if not name: return base_logger logger = logging.getLogger(name) return logger ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2346644 proliantutils-2.16.0/proliantutils/redfish/0000775000175000017500000000000000000000000021071 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/__init__.py0000664000175000017500000000000000000000000023170 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/connector.py0000664000175000017500000000515300000000000023441 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' import retrying from six.moves.urllib.parse import urlparse from sushy import connector from sushy import exceptions class HPEConnector(connector.Connector): """Class that extends base Sushy Connector class This class extends the Sushy's Connector class to override certain methods required to customize the functionality of the http operations. """ MAX_RETRY_ATTEMPTS = 3 # Maximum number of attempts to be retried MAX_TIME_BEFORE_RETRY = 2 * 1000 # wait time in milliseconds before retry @retrying.retry( retry_on_exception=( lambda e: isinstance(e, exceptions.ConnectionError)), stop_max_attempt_number=MAX_RETRY_ATTEMPTS, wait_fixed=MAX_TIME_BEFORE_RETRY) def _op(self, method, path='', data=None, headers=None, blocking=False, timeout=60): """Overrides the base method to support retrying the operation. :param method: The HTTP method to be used, e.g: GET, POST, PUT, PATCH, etc... :param path: The sub-URI path to the resource. :param data: Optional JSON data. :param headers: Optional dictionary of headers. :param blocking: Whether to block for asynchronous operations. :param timeout: Max time in seconds to wait for blocking async call. :returns: The response from the connector.Connector's _op method. """ resp = super(HPEConnector, self)._op(method, path, data=data, headers=headers, blocking=blocking, timeout=timeout, allow_redirects=False) # With IPv6, Gen10 server gives redirection response with new path with # a prefix of '/' so this check is required if resp.status_code == 308: path = urlparse(resp.headers['Location']).path resp = super(HPEConnector, self)._op(method, path, data, headers) return resp ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/main.py0000664000175000017500000001202700000000000022371 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' import sushy from proliantutils.redfish import connector as prutils_connector from proliantutils.redfish.resources.account_service import account_service from proliantutils.redfish.resources.chassis import chassis from proliantutils.redfish.resources.manager import manager from proliantutils.redfish.resources.system import system from proliantutils.redfish.resources import update_service from proliantutils.redfish import utils class HPESushy(sushy.Sushy): """Class that extends base Sushy class This class extends the Sushy class to override certain methods required to customize the functionality of different resources. It bypasses the initialization of the Sushy class and initializes the ResourceBase class with customized HPE specific connector subtype. """ def __init__(self, base_url, username=None, password=None, root_prefix='/redfish/v1/', verify=True, auth=None, connector=None): """Initializes HPE specific sushy object. :param base_url: The base URL to the Redfish controller. It should include scheme and authority portion of the URL. For example: https://mgmt.vendor.com :param username: User account with admin/server-profile access privilege :param password: User account password :param root_prefix: The default URL prefix. This part includes the root service and version. Defaults to /redfish/v1 :param verify: Either a boolean value, a path to a CA_BUNDLE file or directory with certificates of trusted CAs. If set to True the driver will verify the host certificates; if False the driver will ignore verifying the SSL certificate; if it's a path the driver will use the specified certificate or one of the certificates in the directory. Defaults to True. :param auth: An authentication mechanism to utilize. :param connector: A user-defined connector object. Defaults to None. """ super(HPESushy, self).__init__( base_url, username, password, root_prefix=root_prefix, verify=verify, auth=auth, connector=prutils_connector.HPEConnector(base_url, verify=verify)) def close(self): if self._conn: self._conn.close() def get_system_collection_path(self): return utils.get_subresource_path_by(self, 'Systems') def get_system(self, identity): """Given the identity return a HPESystem object :param identity: The identity of the System resource :returns: The System object """ return system.HPESystem(self._conn, identity, redfish_version=self.redfish_version) def get_manager_collection_path(self): return utils.get_subresource_path_by(self, 'Managers') def get_manager(self, identity): """Given the identity return a HPEManager object :param identity: The identity of the Manager resource :returns: The Manager object """ return manager.HPEManager(self._conn, identity, redfish_version=self.redfish_version) def get_update_service(self): """Return a HPEUpdateService object :returns: The UpdateService object """ update_service_url = utils.get_subresource_path_by(self, 'UpdateService') return (update_service. HPEUpdateService(self._conn, update_service_url, redfish_version=self.redfish_version)) def get_account_service(self): """Return a HPEAccountService object""" account_service_url = utils.get_subresource_path_by(self, 'AccountService') return (account_service. HPEAccountService(self._conn, account_service_url, redfish_version=self.redfish_version)) def get_chassis_collection_path(self): return utils.get_subresource_path_by(self, 'Chassis') def get_chassis(self, identity): """Given the identity return a HPEChassis object :param identity: The identity of the Chassis resource :returns: The Chassis object """ return chassis.HPEChassis(self._conn, identity, redfish_version=self.redfish_version) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/redfish.py0000664000175000017500000025500100000000000023072 0ustar00zuulzuul00000000000000# Copyright 2018-2022 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' from base64 import b64decode import json import os import re import subprocess import tempfile from OpenSSL.crypto import FILETYPE_ASN1 from OpenSSL.crypto import load_certificate import retrying from six.moves.urllib import parse import sushy from sushy import utils from proliantutils import exception from proliantutils.ilo import common from proliantutils.ilo import constants as ilo_cons from proliantutils.ilo import firmware_controller from proliantutils.ilo import operations from proliantutils import log from proliantutils.redfish import main from proliantutils.redfish.resources import gpu_common from proliantutils.redfish.resources.manager import constants as mgr_cons from proliantutils.redfish.resources.system import constants as sys_cons from proliantutils.redfish.resources.system.storage \ import common as common_storage from proliantutils.redfish import utils as rf_utils from proliantutils import utils as common_utils """ Class specific for Redfish APIs. """ MAX_RETRY_ATTEMPTS = 3 # Maximum number of attempts to be retried MAX_TIME_BEFORE_RETRY = 7 * 1000 # wait time in milliseconds before retry GET_POWER_STATE_MAP = { sushy.SYSTEM_POWER_STATE_ON: 'ON', sushy.SYSTEM_POWER_STATE_POWERING_ON: 'PoweringOn', sushy.SYSTEM_POWER_STATE_OFF: 'OFF', sushy.SYSTEM_POWER_STATE_POWERING_OFF: 'PoweringOff' } POWER_RESET_MAP = { 'ON': sushy.RESET_ON, 'OFF': sushy.RESET_FORCE_OFF, } DEVICE_COMMON_TO_REDFISH = { 'NETWORK': sushy.BOOT_SOURCE_TARGET_PXE, 'HDD': sushy.BOOT_SOURCE_TARGET_HDD, 'CDROM': sushy.BOOT_SOURCE_TARGET_CD, 'ISCSI': sushy.BOOT_SOURCE_TARGET_UEFI_TARGET, 'UEFIHTTP': sushy.BOOT_SOURCE_TARGET_UEFI_HTTP, 'NONE': sushy.BOOT_SOURCE_TARGET_NONE } DEVICE_REDFISH_TO_COMMON = {v: k for k, v in DEVICE_COMMON_TO_REDFISH.items()} BOOT_MODE_MAP = { sys_cons.BIOS_BOOT_MODE_LEGACY_BIOS: 'LEGACY', sys_cons.BIOS_BOOT_MODE_UEFI: 'UEFI' } BOOT_MODE_MAP_REV = ( utils.revert_dictionary(BOOT_MODE_MAP)) PERSISTENT_BOOT_MAP = { sushy.BOOT_SOURCE_TARGET_PXE: 'NETWORK', sushy.BOOT_SOURCE_TARGET_HDD: 'HDD', sushy.BOOT_SOURCE_TARGET_CD: 'CDROM', sushy.BOOT_SOURCE_TARGET_UEFI_TARGET: 'NETWORK', sushy.BOOT_SOURCE_TARGET_UEFI_HTTP: 'UEFIHTTP', sushy.BOOT_SOURCE_TARGET_NONE: 'NONE' } GET_SECUREBOOT_CURRENT_BOOT_MAP = { sys_cons.SECUREBOOT_CURRENT_BOOT_ENABLED: True, sys_cons.SECUREBOOT_CURRENT_BOOT_DISABLED: False } GET_POST_STATE_MAP = { sys_cons.POST_STATE_NULL: 'Null', sys_cons.POST_STATE_UNKNOWN: 'Unknown', sys_cons.POST_STATE_RESET: 'Reset', sys_cons.POST_STATE_POWEROFF: 'PowerOff', sys_cons.POST_STATE_INPOST: 'InPost', sys_cons.POST_STATE_INPOSTDISCOVERY: 'InPostDiscoveryComplete', sys_cons.POST_STATE_FINISHEDPOST: 'FinishedPost' } # Assuming only one system and one manager present as part of # collection, as we are dealing with iLO's here. PROLIANT_MANAGER_ID = '1' PROLIANT_SYSTEM_ID = '1' PROLIANT_CHASSIS_ID = '1' BOOT_OPTION_MAP = {'BOOT_ONCE': True, 'BOOT_ALWAYS': False, 'NO_BOOT': False} VIRTUAL_MEDIA_MAP = {'FLOPPY': mgr_cons.VIRTUAL_MEDIA_FLOPPY, 'CDROM': mgr_cons.VIRTUAL_MEDIA_CD} SUPPORTED_BOOT_MODE_MAP = { sys_cons.SUPPORTED_LEGACY_BIOS_ONLY: ( ilo_cons.SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY), sys_cons.SUPPORTED_UEFI_ONLY: ilo_cons.SUPPORTED_BOOT_MODE_UEFI_ONLY, sys_cons.SUPPORTED_LEGACY_BIOS_AND_UEFI: ( ilo_cons.SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI) } _CERTIFICATE_PATTERN = ( r'-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----') LOG = log.get_logger(__name__) # Copied from ironic/drivers/modules/redfish/inspect.py CPU_ARCH_MAP = { sushy.PROCESSOR_ARCH_x86: 'x86_64', sushy.PROCESSOR_ARCH_IA_64: 'ia64', sushy.PROCESSOR_ARCH_ARM: 'arm', sushy.PROCESSOR_ARCH_MIPS: 'mips', sushy.PROCESSOR_ARCH_OEM: 'oem' } class RedfishOperations(operations.IloOperations): """Operations supported on redfish based hardware. This class holds APIs which are currently supported via Redfish mode of operation. This is a growing list which needs to be updated as and when the existing API/s (of its cousin RIS and RIBCL interfaces) are migrated. For operations currently supported on the client object, please refer: *proliantutils.ilo.client.SUPPORTED_REDFISH_METHODS* """ def __init__(self, redfish_controller_ip, username, password, bios_password=None, cacert=None, root_prefix='/redfish/v1/'): """A class representing supported RedfishOperations :param redfish_controller_ip: The ip address of the Redfish controller. :param username: User account with admin/server-profile access privilege :param password: User account password :param bios_password: bios password :param cacert: a path to a CA_BUNDLE file or directory with certificates of trusted CAs. If set to None, the driver will ignore verifying the SSL certificate; if it's a path the driver will use the specified certificate or one of the certificates in the directory. Defaults to None. :param root_prefix: The default URL prefix. This part includes the root service and version. Defaults to /redfish/v1 """ super(RedfishOperations, self).__init__() address = ('https://' + redfish_controller_ip) LOG.debug('Redfish address: %s', address) verify = False if cacert is None else cacert # for error reporting purpose self.host = redfish_controller_ip self._root_prefix = root_prefix self._username = username try: self._sushy = main.HPESushy( address, username=username, password=password, root_prefix=root_prefix, verify=verify) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller at "%(controller)s" has ' 'thrown error. Error %(error)s') % {'controller': address, 'error': str(e)}) LOG.debug(msg) raise exception.IloConnectionError(msg) def __del__(self): try: if self._sushy: self._sushy.close() except AttributeError: pass def _get_sushy_system(self, system_id): """Get the sushy system for system_id :param system_id: The identity of the System resource :returns: the Sushy system instance :raises: IloError """ system_url = parse.urljoin(self._sushy.get_system_collection_path(), system_id) try: return self._sushy.get_system(system_url) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish System "%(system)s" was not found. ' 'Error %(error)s') % {'system': system_id, 'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def _get_sushy_manager(self, manager_id): """Get the sushy Manager for manager_id :param manager_id: The identity of the Manager resource :returns: the Sushy Manager instance :raises: IloError """ manager_url = parse.urljoin(self._sushy.get_manager_collection_path(), manager_id) try: return self._sushy.get_manager(manager_url) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish Manager "%(manager)s" was not found. ' 'Error %(error)s') % {'manager': manager_id, 'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def _get_sushy_chassis(self, chassis_id): """Get the sushy chassis for chassis_id :param chassis_id: The identity of the Chassis resource :returns: the Sushy Chassis instance :raises: IloError """ chassis_url = parse.urljoin(self._sushy.get_chassis_collection_path(), chassis_id) try: return self._sushy.get_chassis(chassis_url) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish Chassis "%(chassis)s" was not found. ' 'Error %(error)s') % {'chassis': chassis_id, 'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def get_product_name(self): """Gets the product name of the server. :returns: server model name. :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) return sushy_system.model def get_host_power_status(self): """Request the power state of the server. :returns: Power State of the server, 'ON' or 'OFF' :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) return GET_POWER_STATE_MAP.get(sushy_system.power_state) def _perform_power_op(self, power): """This method performs power operation. :param: power : target power state """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: sushy_system.reset_system(POWER_RESET_MAP[power]) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to set power state ' 'of server to %(target_value)s. Error %(error)s') % {'target_value': power, 'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) @retrying.retry( stop_max_attempt_number=MAX_RETRY_ATTEMPTS, retry_on_result=lambda state: state != 'ON', wait_fixed=MAX_TIME_BEFORE_RETRY ) def _retry_until_powered_on(self, power): """This method retries power on operation. :param: power : target power state """ # If the system is in the same power state as # requested by the user, it gives the error # InvalidOperationForSystemState. To avoid this error # the power state is checked before power on # operation is performed. status = self.get_host_power_status() allowed_states = ['ON', 'PoweringOn'] if power == "OFF": allowed_states = ['OFF', 'PoweringOff'] if (status != power or status not in allowed_states or status is None): self._perform_power_op(power) return self.get_host_power_status() else: return status def reset_server(self): """Resets the server. :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: sushy_system.reset_system(sushy.RESET_FORCE_RESTART) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to reset server. ' 'Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def set_host_power(self, target_value): """Sets the power state of the system. :param target_value: The target value to be set. Value can be: 'ON' or 'OFF'. :raises: IloError, on an error from iLO. :raises: InvalidInputError, if the target value is not allowed. """ if target_value not in POWER_RESET_MAP: msg = ('The parameter "%(parameter)s" value "%(target_value)s" is ' 'invalid. Valid values are: %(valid_power_values)s' % {'parameter': 'target_value', 'target_value': target_value, 'valid_power_values': POWER_RESET_MAP.keys()}) raise exception.InvalidInputError(msg) # Check current power status, do not act if it's in requested state. current_power_status = self.get_host_power_status() if current_power_status == target_value: LOG.debug(self._("Node is already in '%(target_value)s' power " "state."), {'target_value': target_value}) return try: self._retry_until_powered_on(target_value) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to set power state ' 'of server to %(target_value)s. Error %(error)s') % {'target_value': target_value, 'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def press_pwr_btn(self): """Simulates a physical press of the server power button. :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: sushy_system.push_power_button(sys_cons.PUSH_POWER_BUTTON_PRESS) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to press power button' ' of server. Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def hold_pwr_btn(self): """Simulate a physical press and hold of the server power button. :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: sushy_system.push_power_button( sys_cons.PUSH_POWER_BUTTON_PRESS_AND_HOLD) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to press and hold ' 'power button of server. Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def activate_license(self, key): """Activates iLO license. :param key: iLO license key. :raises: IloError, on an error from iLO. """ sushy_manager = self._get_sushy_manager(PROLIANT_MANAGER_ID) try: sushy_manager.set_license(key) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to update ' 'the license. Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def get_one_time_boot(self): """Retrieves the current setting for the one time boot. :returns: Returns boot device that would be used in next boot. Returns 'Normal' if no device is set. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) if (sushy_system.boot.enabled == sushy.BOOT_SOURCE_ENABLED_ONCE): return DEVICE_REDFISH_TO_COMMON.get(sushy_system.boot.target) else: # value returned by RIBCL if one-time boot setting are absent return 'Normal' def get_pending_boot_mode(self): """Retrieves the pending boot mode of the server. Gets the boot mode to be set on next reset. :returns: either LEGACY or UEFI. :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: return BOOT_MODE_MAP.get( sushy_system.bios_settings.pending_settings.boot_mode) except sushy.exceptions.SushyError as e: msg = (self._('The pending BIOS Settings was not found. Error ' '%(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def get_current_boot_mode(self): """Retrieves the current boot mode of the server. :returns: Current boot mode, LEGACY or UEFI. :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: return BOOT_MODE_MAP.get(sushy_system.bios_settings.boot_mode) except sushy.exceptions.SushyError as e: msg = (self._('The current BIOS Settings was not found. Error ' '%(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def _validate_virtual_media(self, device): """Check if the device is valid device. :param device: virtual media device :raises: IloInvalidInputError, if the device is not valid. """ if device not in VIRTUAL_MEDIA_MAP: msg = (self._("Invalid device '%s'. Valid devices: FLOPPY or " "CDROM.") % device) LOG.debug(msg) raise exception.IloInvalidInputError(msg) def eject_virtual_media(self, device): """Ejects the Virtual Media image if one is inserted. :param device: virual media device :raises: IloError, on an error from iLO. :raises: IloInvalidInputError, if the device is not valid. """ self._validate_virtual_media(device) manager = self._get_sushy_manager(PROLIANT_MANAGER_ID) try: vmedia_device = ( manager.virtual_media.get_member_device( VIRTUAL_MEDIA_MAP[device])) if not vmedia_device.inserted: LOG.debug(self._("No media available in the device '%s' to " "perform eject operation.") % device) return LOG.debug(self._("Ejecting the media image '%(url)s' from the " "device %(device)s.") % {'url': vmedia_device.image, 'device': device}) vmedia_device.eject_media() except sushy.exceptions.SushyError as e: msg = (self._("The Redfish controller failed to eject the virtual" " media device '%(device)s'. Error %(error)s.") % {'device': device, 'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def insert_virtual_media(self, url, device): """Inserts the Virtual Media image to the device. :param url: URL to image :param device: virual media device :raises: IloError, on an error from iLO. :raises: IloInvalidInputError, if the device is not valid. """ # Validate url common_utils.validate_href(url) self._validate_virtual_media(device) manager = self._get_sushy_manager(PROLIANT_MANAGER_ID) try: vmedia_device = ( manager.virtual_media.get_member_device( VIRTUAL_MEDIA_MAP[device])) if vmedia_device.inserted: vmedia_device.eject_media() LOG.debug(self._("Inserting the image url '%(url)s' to the " "device %(device)s.") % {'url': url, 'device': device}) vmedia_device.insert_media(url) except sushy.exceptions.SushyError as e: msg = (self._("The Redfish controller failed to insert the media " "url %(url)s in the virtual media device " "'%(device)s'. Error %(error)s.") % {'url': url, 'device': device, 'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def set_vm_status(self, device='FLOPPY', boot_option='BOOT_ONCE', write_protect='YES'): """Sets the Virtual Media drive status It sets the boot option for virtual media device. Note: boot option can be set only for CD device. :param device: virual media device :param boot_option: boot option to set on the virtual media device :param write_protect: set the write protect flag on the vmedia device Note: It's ignored. In Redfish it is read-only. :raises: IloError, on an error from iLO. :raises: IloInvalidInputError, if the device is not valid. """ # CONNECT is a RIBCL call. There is no such property to set in Redfish. if boot_option == 'CONNECT': return self._validate_virtual_media(device) if boot_option not in BOOT_OPTION_MAP: msg = (self._("Virtual media boot option '%s' is invalid.") % boot_option) LOG.debug(msg) raise exception.IloInvalidInputError(msg) manager = self._get_sushy_manager(PROLIANT_MANAGER_ID) try: vmedia_device = ( manager.virtual_media.get_member_device( VIRTUAL_MEDIA_MAP[device])) vmedia_device.set_vm_status(BOOT_OPTION_MAP[boot_option]) except sushy.exceptions.SushyError as e: msg = (self._("The Redfish controller failed to set the virtual " "media status for '%(device)s'. Error %(error)s") % {'device': device, 'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) @firmware_controller.check_firmware_update_component def update_firmware(self, file_url, component_type): """Updates the given firmware on the server for the given component. :param file_url: location of the raw firmware file. Extraction of the firmware file (if in compact format) is expected to happen prior to this invocation. :param component_type: Type of component to be applied to. :raises: IloError, on an error from iLO. """ try: update_service_inst = self._sushy.get_update_service() update_service_inst.flash_firmware(self, file_url) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to update firmware ' 'with firmware %(file)s Error %(error)s') % {'file': file_url, 'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def _is_boot_mode_uefi(self): """Checks if the system is in uefi boot mode. :return: 'True' if the boot mode is uefi else 'False' """ boot_mode = self.get_current_boot_mode() return (boot_mode == BOOT_MODE_MAP.get(sys_cons.BIOS_BOOT_MODE_UEFI)) def get_persistent_boot_device(self): """Get current persistent boot device set for the host :returns: persistent boot device for the system :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) # Return boot device if it is persistent. if ((sushy_system. boot.enabled) == sushy.BOOT_SOURCE_ENABLED_CONTINUOUS): return PERSISTENT_BOOT_MAP.get(sushy_system.boot.target) # Check if we are in BIOS boot mode. # There is no resource to fetch boot device order for BIOS boot mode if not self._is_boot_mode_uefi(): return None try: boot_device = (sushy_system.bios_settings.boot_settings. get_persistent_boot_device()) return PERSISTENT_BOOT_MAP.get(boot_device) except sushy.exceptions.SushyError as e: msg = (self._("The Redfish controller is unable to get " "persistent boot device. Error %(error)s") % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def set_pending_boot_mode(self, boot_mode): """Sets the boot mode of the system for next boot. :param boot_mode: either 'uefi' or 'legacy'. :raises: IloInvalidInputError, on an invalid input. :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) if boot_mode.upper() not in BOOT_MODE_MAP_REV.keys(): msg = (('Invalid Boot mode: "%(boot_mode)s" specified, valid boot ' 'modes are either "uefi" or "legacy"') % {'boot_mode': boot_mode}) raise exception.IloInvalidInputError(msg) try: sushy_system.bios_settings.pending_settings.set_pending_boot_mode( BOOT_MODE_MAP_REV.get(boot_mode.upper())) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to set ' 'pending boot mode to %(boot_mode)s. ' 'Error: %(error)s') % {'boot_mode': boot_mode, 'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def update_persistent_boot(self, devices=[]): """Changes the persistent boot device order for the host :param devices: ordered list of boot devices :raises: IloError, on an error from iLO. :raises: IloInvalidInputError, if the given input is not valid. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) # Check if the input is valid for item in devices: if item.upper() not in DEVICE_COMMON_TO_REDFISH: msg = (self._('Invalid input "%(device)s". Valid devices: ' 'NETWORK, HDD, ISCSI, UEFIHTTP or CDROM.') % {'device': item}) raise exception.IloInvalidInputError(msg) try: sushy_system.update_persistent_boot( devices, persistent=True) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to update ' 'persistent boot device %(devices)s.' 'Error: %(error)s') % {'devices': devices, 'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def set_one_time_boot(self, device): """Configures a single boot from a specific device. :param device: Device to be set as a one time boot device :raises: IloError, on an error from iLO. :raises: IloInvalidInputError, if the given input is not valid. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) # Check if the input is valid if device.upper() not in DEVICE_COMMON_TO_REDFISH: msg = (self._('Invalid input "%(device)s". Valid devices: ' 'NETWORK, HDD, ISCSI, UEFIHTTP or CDROM.') % {'device': device}) raise exception.IloInvalidInputError(msg) try: sushy_system.update_persistent_boot( [device], persistent=False) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to set ' 'one time boot device %(device)s. ' 'Error: %(error)s') % {'device': device, 'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def reset_ilo_credential(self, password): """Resets the iLO password. :param password: The password to be set. :raises: IloError, if account not found or on an error from iLO. """ try: acc_service = self._sushy.get_account_service() member = acc_service.accounts.get_member_details(self._username) if member is None: msg = (self._("No account found with username: %s") % self._username) LOG.debug(msg) raise exception.IloError(msg) member.update_credentials(password) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to update ' 'credentials for %(username)s. Error %(error)s') % {'username': self._username, 'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def get_supported_boot_mode(self): """Get the system supported boot modes. :return: any one of the following proliantutils.ilo.constants: SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY, SUPPORTED_BOOT_MODE_UEFI_ONLY, SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI :raises: IloError, if account not found or on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: return SUPPORTED_BOOT_MODE_MAP.get( sushy_system.supported_boot_mode) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to get the ' 'supported boot modes. Error: %s') % e) LOG.debug(msg) raise exception.IloError(msg) def _update_security_parameter(self, sec_param, ignore=False): """Sets the ignore flag for the security parameter. :param sec_param: Name of the security parameter. :param ignore : True when security parameter needs to be ignored. If passed False, security param will not be ignored. If nothing passed default will be False. """ sushy_manager = self._get_sushy_manager(PROLIANT_MANAGER_ID) try: security_params = ( sushy_manager.securityservice.securityparamscollectionuri) param_members = security_params.get_members() for param in param_members: if sec_param in param.name: param.update_security_param_ignore_status(ignore) break else: msg = (self._('Specified parameter "%(param)s" is not ' 'a Security Dashboard Parameter.') % {'param': sec_param}) raise exception.IloInvalidInputError(msg) except sushy.exceptions.SushyError as e: msg = (self._("The Redfish controller is unable to update " "resource or its member. Error " "%(error)s)") % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def update_password_complexity(self, enable=True, ignore=False): """Update the Password_Complexity security param. :param enable: A boolean param, True when Password_Complexity needs to be enabled. If passed False, Password_Complexity security param will be disabled. If nothing passed default will be True. :param ignore : A boolean param, True when Password_Complexity needs to be ignored. If passed False, Password_Complexity security param will not be ignored. If nothing passed default will be False. :raises: IloError, on an error from iLO. """ acc_service = self._sushy.get_account_service() try: self._update_security_parameter(sec_param="Password Complexity", ignore=ignore) acc_service.update_enforce_passwd_complexity(enable) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to update the ' 'security dashboard parameter ' '``Password_Complexity``. ' 'Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def update_require_login_for_ilo_rbsu(self, enable=True, ignore=False): """Update the RequiredLoginForiLORBSU security param. :param enable: A boolean param, True when RequiredLoginForiLORBSU needs to be enabled. If passed False, RequiredLoginForiLORBSU security param will be disabled. If nothing passed default will be True. :param ignore : A boolean param, True when RequiredLoginForiLORBSU needs to be ignored. If passed False, RequiredLoginForiLORBSU security param will not be ignored. If nothing passed default will be False. :raises: IloError, on an error from iLO. """ sushy_manager = self._get_sushy_manager(PROLIANT_MANAGER_ID) try: self._update_security_parameter(sec_param="Require Login", ignore=ignore) sushy_manager.update_login_for_ilo_rbsu(enable) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to update the ' 'security dashboard parameter ' '``RequiredLoginForiLORBSU``. ' 'Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def update_require_host_authentication(self, enable=True, ignore=False): """Update the RequireHostAuthentication security param. :param enable: A boolean param, True when RequireHostAuthentication needs to be enabled. If passed False, RequireHostAuthentication security param will be disabled. If nothing passed default will be True. :param ignore : A boolean param, True when RequireHostAuthentication needs to be ignored. If passed False, RequireHostAuthentication security param will not be ignored. If nothing passed default will be False. :raises: IloError, on an error from iLO. """ sushy_manager = self._get_sushy_manager(PROLIANT_MANAGER_ID) try: self._update_security_parameter(sec_param="Host Authentication", ignore=ignore) sushy_manager.update_host_authentication(enable) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to update the ' 'security dashboard paramater ' '``RequireHostAuthentication``. ' 'Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def update_minimum_password_length(self, passwd_length=None, ignore=False): """Update the MinPasswordLength security param. :param passwd_length: Minimum lenght of password used. If nothing passed default will be None. :param ignore : A boolean param, True when MinPasswordLength needs to be ignored. If passed False, MinPasswordLength security param will not be ignored. If nothing passed default will be False. """ acc_service = self._sushy.get_account_service() try: self._update_security_parameter(sec_param="Minimum", ignore=ignore) acc_service.update_min_passwd_length(passwd_length) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to update the ' 'security dashboard paramater ' '``MinPasswordLength``. ' 'Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def update_ipmi_over_lan(self, enable=False, ignore=False): """Update the IPMI/DCMI_Over_LAN security param. :param enable: A boolean param, True when IPMI/DCMI_Over_LAN needs to be enabled. If passed False, IPMI/DCMI_Over_LAN security param will be disabled. If nothing passed default will be False. :param ignore : A boolean param, True when IPMI/DCMI_Over_LAN needs to be ignored. If passed False, IPMI/DCMI_Over_LAN security param will not be ignored. If nothing passed default will be False. :raises: IloError, on an error from iLO. """ sushy_manager = self._get_sushy_manager(PROLIANT_MANAGER_ID) try: self._update_security_parameter(sec_param="IPMI", ignore=ignore) sushy_manager.networkprotocol.update_ipmi_enabled(enable) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to update the ' 'security dashboard paramater ' '``IPMI/DCMI_Over_LAN``. ' 'Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def update_authentication_failure_logging(self, logging_threshold=None, ignore=False): """Update the Authentication_failure_Logging security param. :param logging_threshold: Value of authenication failure logging threshold. If nothing passed default will be None. :param ignore : A boolean param, True when Authentication_failure_Logging needs to be ignored. If passed False, Authentication_failure_Logging security param will not be ignored. If nothing passed default will be False. :raises: IloError, on an error from iLO. """ acc_service = self._sushy.get_account_service() try: self._update_security_parameter(sec_param="Failure Logging", ignore=ignore) acc_service.update_auth_failure_logging(logging_threshold) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to update the ' 'security dashboard paramater ' '``Authentication_failure_Logging``. ' 'Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def update_secure_boot(self, enable=True, ignore=False): """Update Secure_Boot security param on the server. :param enable: A boolean param, True when Secure_Boot needs to be enabled. If passed False, Secure_Boot security param will be disabled. If nothing passed default will be True. :param ignore : A boolean param, True when Secure_boot needs to be ignored. If passed False, Secure_boot security param will not be ignored. If nothing passed default will be False. :raises: IloError, on an error from iLO. """ try: self._update_security_parameter(sec_param="Secure Boot", ignore=ignore) self.set_secure_boot_mode(enable) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to update the ' 'security dashboard paramater ``Secure_boot``. ' 'Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def _create_csr(self, csr_params): """Creates the Certificate Signing Request. :param csr_params: A dictionary containing all the necessary information required to create CSR. :raises: IloError, on an error from iLO. """ sushy_man = self._get_sushy_manager(PROLIANT_MANAGER_ID) try: cert_request = ( sushy_man.securityservice.https_certificate_uri.generate_csr( csr_params)) (fd, temp_file) = tempfile.mkstemp(suffix='.csr') with open(temp_file, 'w') as f: f.write(cert_request) return temp_file except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to create the ' 'certificate signing request. ' 'Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def add_ssl_certificate(self, csr_params, signed_cert, private_key, pass_phrase): """Creates CSR and adds the signed SSL certificate to the iLO. :param csr_params: A dictionary containing all the necessary information required to create CSR. :param signed_cert: signed certificate which will be used to sign the created CSR. :param private_key: private key. :param pass_phrase: Pass phrase for the private key. :raises: IloError, on an error from iLO. """ csr_file = self._create_csr(csr_params) (fd, temp_file) = tempfile.mkstemp(suffix='.ext') (fd, https_cert_file) = tempfile.mkstemp(suffix='.crt') (fd, ss_cert_file) = tempfile.mkstemp(suffix='.crt') with open(signed_cert, 'r') as f: data = json.dumps(f.read()) p = re.sub(r"\"", "", data) q = re.sub(r"\\n", "\r\n", p).rstrip() c_list = re.findall(_CERTIFICATE_PATTERN, q, re.DOTALL) if len(c_list) == 0: msg = (self._("No valid certificate in %(cert_file)s.") % {"cert_file": signed_cert}) LOG.debug(msg) raise exception.InvalidParameterValueError(msg) ss_cert = c_list[0] with open(ss_cert_file, 'w') as f: f.write(ss_cert) content = [ "authorityKeyIdentifier = keyid,issuer\n", "basicConstraints = CA:true,pathlen:1\n", "keyUsage = digitalSignature,keyEncipherment,keyCertSign,cRLSign", "\nextendedKeyUsage = clientAuth,serverAuth\n", "subjectKeyIdentifier = hash"] with open(temp_file, 'w') as f: f.writelines(content) cert_cmd = ( "openssl x509 -req -days 365 -in %(csr_file)s -extfile" " %(tempfile)s -CA %(cert)s -CAkey %(p_key)s -passin " " pass:%(pphrase)s -CAcreateserial -out %(cert_file)s" % {'csr_file': csr_file, 'tempfile': temp_file, 'cert': ss_cert_file, 'p_key': private_key, 'pphrase': pass_phrase, 'cert_file': https_cert_file}) try: process = subprocess.Popen(cert_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) out, err = process.communicate() except Exception as e: msg = (self._("Failed to create HTTPS certificate. " "error: %(err)s") % {"err": e}) LOG.debug(msg) raise exception.CertificateCreationError(msg) self._add_https_certificate(https_cert_file) def _add_https_certificate(self, cert_file): """Adds the signed https certificate to the iLO. :param certificate: Signed HTTPS certificate file. :raises: IloError, on an error from iLO. """ sushy_man = self._get_sushy_manager(PROLIANT_MANAGER_ID) try: with open(cert_file, 'r') as f: data = json.dumps(f.read()) p = re.sub(r"\"", "", data) q = re.sub(r"\\n", "\r\n", p).rstrip() c_list = re.findall(_CERTIFICATE_PATTERN, q, re.DOTALL) if len(c_list) == 0: msg = (self._("No valid certificate in %(cert_file)s.") % {"cert_file": cert_file}) LOG.debug(msg) raise exception.IloError(msg) cert = c_list[0] sushy_man.securityservice.https_certificate_uri.import_certificate( cert) common.wait_for_ilo_after_reset(self) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to import the ' 'given certificate. ' 'Error: %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def create_csr(self, path, csr_params): """Creates the Certificate Signing Request. :param path: directory to store csr file. :param csr_params: A dictionary containing all the necessary information required to create CSR. :raises: IloError, on an error from iLO. """ sushy_man = self._get_sushy_manager(PROLIANT_MANAGER_ID) try: cert_request = ( sushy_man.securityservice.https_certificate_uri.generate_csr( csr_params)) if not os.path.exists(path): os.makedirs(path, 0o755) csr_file_name = os.path.basename(path) csr_file = os.path.join(path, csr_file_name + '.csr') with open(csr_file, 'w') as f: f.write(cert_request) os.chmod(csr_file, 0o755) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to create the ' 'certificate signing request. ' 'Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def add_https_certificate(self, cert_file): """Adds the signed https certificate to the iLO. :param certificate: Signed HTTPS certificate file. :raises: IloError, on an error from iLO. """ sushy_man = self._get_sushy_manager(PROLIANT_MANAGER_ID) try: with open(cert_file, 'r') as f: data = json.dumps(f.read()) p = re.sub(r"\"", "", data) q = re.sub(r"\\n", "\r\n", p).rstrip() c_list = re.findall(_CERTIFICATE_PATTERN, q, re.DOTALL) if len(c_list) == 0: msg = (self._("No valid certificate in %(cert_file)s.") % {"cert_file": cert_file}) LOG.debug(msg) raise exception.IloError(msg) cert = c_list[0] sushy_man.securityservice.https_certificate_uri.import_certificate( cert) common.wait_for_ilo_after_reset(self) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to import the ' 'given certificate. ' 'Error: %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def get_security_dashboard_values(self): """Gets all the parameters related to security dashboard. :return: a dictionary of the security dashboard values with their security status and security parameters with their complete details and security status. :raises: IloError, if security dashboard or their params not found or on an error from iLO. """ sec_capabilities = {} sushy_manager = self._get_sushy_manager(PROLIANT_MANAGER_ID) try: security_dashboard = ( sushy_manager.securityservice.securitydashboard) security_params = ( security_dashboard.securityparamscollectionuri) if security_dashboard.server_configuration_lock_status: sec_capabilities.update( {'server_configuration_lock_status': ( security_dashboard.server_configuration_lock_status)}) sec_capabilities.update( {'overall_security_status': ( security_dashboard.overall_status)}) security_parameters = {} param_members = security_params.get_members() for param in param_members: param_dict = {param.name: {'security_status': param.status, 'state': param.state, 'ignore': param.ignore}} if param.description: param_dict[param.name].update( {'description': param.description}) if param.recommended_action: param_dict[param.name].update( {'recommended_action': param.recommended_action}) security_parameters.update(param_dict) sec_capabilities.update( {'security_parameters': security_parameters}) except sushy.exceptions.SushyError as e: msg = (self._("The Redfish controller is unable to get " "resource or its members. Error " "%(error)s)") % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) return sec_capabilities def _parse_security_dashboard_values_for_capabilities(self): """Parses the security dashboard parameters. :returns: a dictionary of only those security parameters and their security status which are applicable for ironic. """ values = self.get_security_dashboard_values() ironic_sec_capabilities = {} ironic_sec_capabilities.update( {'overall_security_status': values.get('overall_security_status')}) param_values = values.get('security_parameters') p_map = {'Last Firmware Scan Result': 'last_firmware_scan_result', 'Security Override Switch': 'security_override_switch'} p_keys = p_map.keys() for p_key, p_val in param_values.items(): if p_key in p_keys: p_dict = {p_map.get(p_key): p_val.get('security_status')} ironic_sec_capabilities.update(p_dict) return ironic_sec_capabilities def get_server_capabilities(self): """Returns the server capabilities raises: IloError on an error from iLO. """ capabilities = {} sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) sushy_manager = self._get_sushy_manager(PROLIANT_MANAGER_ID) sushy_chassis = self._get_sushy_chassis(PROLIANT_CHASSIS_ID) try: count = len(sushy_system.pci_devices.gpu_devices) boot_mode = rf_utils.get_supported_boot_mode( sushy_system.supported_boot_mode) capabilities.update( {'pci_gpu_devices': count, 'ilo_firmware_version': sushy_manager.firmware_version, 'rom_firmware_version': sushy_system.rom_version, 'server_model': sushy_system.model, 'nic_capacity': sushy_system.pci_devices.max_nic_capacity, 'boot_mode_bios': boot_mode.boot_mode_bios, 'boot_mode_uefi': boot_mode.boot_mode_uefi}) tpm_state = sushy_system.bios_settings.tpm_state all_key_to_value_expression_tuples = [ ('sriov_enabled', sushy_system.bios_settings.sriov == sys_cons.SRIOV_ENABLED), ('cpu_vt', sushy_system.bios_settings.cpu_vt == ( sys_cons.CPUVT_ENABLED)), ('trusted_boot', (tpm_state == sys_cons.TPM_PRESENT_ENABLED or tpm_state == sys_cons.TPM_PRESENT_DISABLED)), ('secure_boot', self._has_secure_boot()), ('iscsi_boot', (sushy_system.bios_settings.iscsi_resource. is_iscsi_boot_supported())), ('hardware_supports_raid', len(sushy_system.smart_storage.array_controllers. members_identities) > 0), ('has_ssd', common_storage.has_ssd(sushy_system)), ('has_rotational', common_storage.has_rotational(sushy_system)), ('has_nvme_ssd', common_storage.has_nvme_ssd(sushy_system)) ] all_key_to_value_expression_tuples += ( [('logical_raid_level_' + x, True) for x in sushy_system.smart_storage.logical_raid_levels]) all_key_to_value_expression_tuples += ( [('drive_rotational_' + str(x) + '_rpm', True) for x in common_storage.get_drive_rotational_speed_rpm(sushy_system)]) capabilities.update( {key: 'true' for (key, value) in all_key_to_value_expression_tuples if value}) memory_data = sushy_system.memory.details() if memory_data.has_nvdimm_n: capabilities.update( {'persistent_memory': ( json.dumps(memory_data.has_persistent_memory)), 'nvdimm_n': ( json.dumps(memory_data.has_nvdimm_n)), 'logical_nvdimm_n': ( json.dumps(memory_data.has_logical_nvdimm_n))}) gpu_capabilities = gpu_common.gpu_capabilities(sushy_system, sushy_chassis) for member in gpu_capabilities: for key in member: capabilities.update(member.get(key)) capabilities.update( self._parse_security_dashboard_values_for_capabilities()) except sushy.exceptions.SushyError as e: msg = (self._("The Redfish controller is unable to get " "resource or its members. Error " "%(error)s)") % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) return capabilities def reset_bios_to_default(self): """Resets the BIOS settings to default values. :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: sushy_system.bios_settings.update_bios_to_default() except sushy.exceptions.SushyError as e: msg = (self._("The Redfish controller is unable to update bios " "settings to default Error %(error)s") % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def get_secure_boot_mode(self): """Get the status of secure boot. :returns: True, if enabled, else False :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: secure_boot_enabled = GET_SECUREBOOT_CURRENT_BOOT_MAP.get( sushy_system.secure_boot.current_boot) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to provide ' 'information about secure boot on the server. ' 'Error: %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloCommandNotSupportedError(msg) if secure_boot_enabled: LOG.debug(self._("Secure boot is Enabled")) else: LOG.debug(self._("Secure boot is Disabled")) return secure_boot_enabled def _has_secure_boot(self): try: self._get_sushy_system(PROLIANT_SYSTEM_ID).secure_boot except (exception.MissingAttributeError, sushy.exceptions.SushyError): return False return True def set_secure_boot_mode(self, secure_boot_enable): """Enable/Disable secure boot on the server. Resetting the server post updating this settings is needed from the caller side to make this into effect. :param secure_boot_enable: True, if secure boot needs to be enabled for next boot, else False. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ if self._is_boot_mode_uefi(): sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: sushy_system.secure_boot.enable_secure_boot(secure_boot_enable) except exception.InvalidInputError as e: msg = (self._('Invalid input. Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to set secure ' 'boot settings on the server. Error: %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) else: msg = (self._('System is not in UEFI boot mode. "SecureBoot" ' 'related resources cannot be changed.')) raise exception.IloCommandNotSupportedInBiosError(msg) def reset_secure_boot_keys(self): """Reset secure boot keys to manufacturing defaults. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ if self._is_boot_mode_uefi(): sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: sushy_system.secure_boot.reset_keys( sys_cons.SECUREBOOT_RESET_KEYS_DEFAULT) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to reset secure ' 'boot keys on the server. Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) else: msg = (self._('System is not in UEFI boot mode. "SecureBoot" ' 'related resources cannot be changed.')) raise exception.IloCommandNotSupportedInBiosError(msg) def clear_secure_boot_keys(self): """Reset all keys. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ if self._is_boot_mode_uefi(): sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: sushy_system.secure_boot.reset_keys( sys_cons.SECUREBOOT_RESET_KEYS_DELETE_ALL) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to clear secure ' 'boot keys on the server. Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) else: msg = (self._('System is not in UEFI boot mode. "SecureBoot" ' 'related resources cannot be changed.')) raise exception.IloCommandNotSupportedInBiosError(msg) def get_essential_properties(self): """Constructs the dictionary of essential properties Constructs the dictionary of essential properties, named cpu, cpu_arch, local_gb, memory_mb. The MACs are also returned as part of this method. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: # TODO(nisha): Add local_gb here and return after # local_gb changes are merged. # local_gb = sushy_system.storage_summary prop = {'memory_mb': (sushy_system.memory_summary.size_gib * 1024), 'cpus': sushy_system.processors.summary.count, 'cpu_arch': CPU_ARCH_MAP.get( sushy_system.processors.summary.architecture), 'local_gb': common_storage.get_local_gb(sushy_system)} return {'properties': prop, 'macs': sushy_system.ethernet_interfaces.summary} except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to get the ' 'resource data. Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def _change_iscsi_target_settings(self, iscsi_info, macs=[]): """Change iSCSI target settings. :param macs: List of target mac for iSCSI. :param iscsi_info: A dictionary that contains information of iSCSI target like target_name, lun, ip_address, port etc. :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) association_names = [] try: if macs: sushy_system.validate_macs(macs) association_names = [ sushy_system.get_nic_association_name_by_mac( mac) for mac in macs] else: pci_settings_map = ( sushy_system.bios_settings. bios_mappings.pci_settings_mappings) for mapping in pci_settings_map: for subinstance in mapping['Subinstances']: for association in subinstance['Associations']: if 'NicBoot' in association: association_names.append(association) if not association_names: msg = ('No macs were found on the system') raise exception.IloError(msg) # Set iSCSI info to all nics iscsi_infos = [] for association_name in association_names: data = iscsi_info.copy() data['iSCSIAttemptName'] = association_name data['iSCSINicSource'] = association_name data['iSCSIAttemptInstance'] = ( association_names.index(association_name) + 1) iscsi_infos.append(data) iscsi_data = {'iSCSISources': iscsi_infos} except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to get the ' 'bios mappings. Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) try: (sushy_system.bios_settings.iscsi_resource. iscsi_settings.update_iscsi_settings(iscsi_data)) except sushy.exceptions.SushyError as e: msg = (self._("The Redfish controller is failed to update iSCSI " "settings. Error %(error)s") % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def set_iscsi_info(self, target_name, lun, ip_address, port='3260', auth_method=None, username=None, password=None, macs=[]): """Set iSCSI details of the system in UEFI boot mode. The initiator system is set with the target details like IQN, LUN, IP, Port etc. :param target_name: Target Name for iSCSI. :param lun: logical unit number. :param ip_address: IP address of the target. :param port: port of the target. :param auth_method : either None or CHAP. :param username: CHAP Username for authentication. :param password: CHAP secret. :param macs: List of target macs for iSCSI. :raises: IloCommandNotSupportedInBiosError, if the system is in the bios boot mode. """ if(self._is_boot_mode_uefi()): iscsi_info = {} iscsi_info['iSCSITargetName'] = target_name iscsi_info['iSCSILUN'] = lun iscsi_info['iSCSITargetIpAddress'] = ip_address iscsi_info['iSCSITargetTcpPort'] = int(port) iscsi_info['iSCSITargetInfoViaDHCP'] = False iscsi_info['iSCSIConnection'] = 'Enabled' if (auth_method == 'CHAP'): iscsi_info['iSCSIAuthenticationMethod'] = 'Chap' iscsi_info['iSCSIChapUsername'] = username iscsi_info['iSCSIChapSecret'] = password self._change_iscsi_target_settings(iscsi_info, macs) else: msg = 'iSCSI boot is not supported in the BIOS boot mode' raise exception.IloCommandNotSupportedInBiosError(msg) def unset_iscsi_info(self, macs=[]): """Disable iSCSI boot option in UEFI boot mode. :param macs: List of target macs for iSCSI. :raises: IloCommandNotSupportedInBiosError, if the system is in the BIOS boot mode. """ if(self._is_boot_mode_uefi()): iscsi_info = {'iSCSIConnection': 'Disabled'} self._change_iscsi_target_settings(iscsi_info, macs) else: msg = 'iSCSI boot is not supported in the BIOS boot mode' raise exception.IloCommandNotSupportedInBiosError(msg) def set_iscsi_initiator_info(self, initiator_iqn): """Set iSCSI initiator information in iLO. :param initiator_iqn: Initiator iqn for iLO. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedInBiosError, if the system is in the BIOS boot mode. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) if(self._is_boot_mode_uefi()): iscsi_data = {'iSCSIInitiatorName': initiator_iqn} try: (sushy_system.bios_settings.iscsi_resource. iscsi_settings.update_iscsi_settings(iscsi_data)) except sushy.exceptions.SushyError as e: msg = (self._("The Redfish controller has failed to update " "iSCSI settings. Error %(error)s") % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) else: msg = 'iSCSI initiator cannot be updated in BIOS boot mode' raise exception.IloCommandNotSupportedInBiosError(msg) def get_iscsi_initiator_info(self): """Give iSCSI initiator information of iLO. :returns: iSCSI initiator information. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedInBiosError, if the system is in the BIOS boot mode. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) if(self._is_boot_mode_uefi()): try: iscsi_initiator = ( sushy_system.bios_settings.iscsi_resource.iscsi_initiator) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller has failed to get the ' 'iSCSI initiator. Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) return iscsi_initiator else: msg = 'iSCSI initiator cannot be retrieved in BIOS boot mode' raise exception.IloCommandNotSupportedInBiosError(msg) def inject_nmi(self): """Inject NMI, Non Maskable Interrupt. Inject NMI (Non Maskable Interrupt) for a node immediately. :raises: IloError, on an error from iLO """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) if sushy_system.power_state != sushy.SYSTEM_POWER_STATE_ON: raise exception.IloError("Server is not in powered on state.") try: sushy_system.reset_system(sushy.RESET_NMI) except sushy.exceptions.SushyError as e: msg = (self._('The Redfish controller failed to inject nmi to ' 'server. Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def get_host_post_state(self): """Get the current state of system POST. Retrieves current state of system POST. :returns: POST state of the server. The valida states are:- null, Unknown, Reset, PowerOff, InPost, InPostDiscoveryComplete and FinishedPost. :raises: IloError, on an error from iLO """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) return GET_POST_STATE_MAP.get(sushy_system.post_state) def read_raid_configuration(self, raid_config=None): """Read the logical drives from the system :param raid_config: None in case of post-delete read or in case of post-create a dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100, 'physical_disks': ['6I:1:5'], 'controller': 'HPE Smart Array P408i-a SR Gen10'}, ]} :raises: IloError, on an error from iLO. :returns: A dictionary containing list of logical disks """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) return sushy_system.read_raid(raid_config=raid_config) def delete_raid_configuration(self): """Delete the raid configuration on the hardware.""" sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) sushy_system.delete_raid() def do_disk_erase(self, disk_type, pattern=None): """Perform the out-of-band sanitize disk erase on the hardware. :param disk_type: Media type of disk drives either 'HDD' or 'SSD'. :param pattern: Erase pattern, if nothing passed default ('overwrite' for 'HDD', and 'block' for 'SSD') will be used. :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) sushy_system.do_disk_erase(disk_type, pattern) def has_disk_erase_completed(self): """Get out-of-band sanitize disk erase status. :returns: True if disk erase completed on all controllers otherwise False """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) return sushy_system.has_disk_erase_completed() def do_one_button_secure_erase(self): """Perform the one button secure erase on the hardware. The One-button secure erase process resets iLO and deletes all licenses stored there, resets BIOS settings, and deletes all AHS and warranty data stored on the system. It also erases supported non-volatile storage data and deletes any deployment settings profiles. :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) sushy_system.do_one_button_secure_erase() def get_current_bios_settings(self, only_allowed_settings=False): """Get current BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictionary of current BIOS settings is returned. Depending on the 'only_allowed_settings', either only the allowed settings are returned or all the supported settings are returned. :raises: IloError, on an error from iLO """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: current_settings = sushy_system.bios_settings.json except sushy.exceptions.SushyError as e: msg = (self._('The current BIOS Settings were not found. Error ' '%(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) attributes = current_settings.get("Attributes") if only_allowed_settings and attributes: return common_utils.apply_bios_properties_filter( attributes, ilo_cons.SUPPORTED_REDFISH_BIOS_PROPERTIES) return attributes def get_pending_bios_settings(self, only_allowed_settings=False): """Get pending BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictionary of pending BIOS settings is returned. Depending on the 'only_allowed_settings', either only the allowed settings are returned or all the supported settings are returned. :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: settings = sushy_system.bios_settings.pending_settings.json except sushy.exceptions.SushyError as e: msg = (self._('The pending BIOS Settings were not found. Error ' '%(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) attributes = settings.get("Attributes") if only_allowed_settings and attributes: return common_utils.apply_bios_properties_filter( attributes, ilo_cons.SUPPORTED_REDFISH_BIOS_PROPERTIES) return attributes def set_bios_settings(self, data=None, only_allowed_settings=False): """Sets current BIOS settings to the provided data. :param: only_allowed_settings: True when only allowed BIOS settings are to be set. If False, all the BIOS settings supported by iLO and present in the 'data' are set. :param: data: a dictionary of BIOS settings to be applied. Depending on the 'only_allowed_settings', either only the allowed settings are set or all the supported settings that are in the 'data' are set. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ if not data: raise exception.IloError("Could not apply settings with" " empty data") sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) if only_allowed_settings: unsupported_settings = [key for key in data if key not in ( ilo_cons.SUPPORTED_REDFISH_BIOS_PROPERTIES)] if unsupported_settings: msg = ("Could not apply settings as one or more settings are" " not supported. Unsupported settings are %s." " Supported settings are %s." % ( unsupported_settings, ilo_cons.SUPPORTED_REDFISH_BIOS_PROPERTIES)) raise exception.IloError(msg) try: settings_required = sushy_system.bios_settings.pending_settings settings_required.update_bios_data_by_patch(data) except sushy.exceptions.SushyError as e: msg = (self._('The pending BIOS Settings resource not found.' ' Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def get_default_bios_settings(self, only_allowed_settings=False): """Get default BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictionary of default BIOS settings(factory settings). Depending on the 'only_allowed_settings', either only the allowed settings are returned or all the supported settings are returned. :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: settings = sushy_system.bios_settings.default_settings except sushy.exceptions.SushyError as e: msg = (self._('The default BIOS Settings were not found. Error ' '%(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) if only_allowed_settings: return common_utils.apply_bios_properties_filter( settings, ilo_cons.SUPPORTED_REDFISH_BIOS_PROPERTIES) return settings def create_raid_configuration(self, raid_config): """Create the raid configuration on the hardware. Based on user raid_config input, it will create raid :param raid_config: A dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100, 'physical_disks': ['6I:1:5'], 'controller': 'HPE Smart Array P408i-a SR Gen10'}, ]} :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) sushy_system.create_raid(raid_config) def get_bios_settings_result(self): """Gets the result of the bios settings applied :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: settings_result = sushy_system.bios_settings.messages except sushy.exceptions.SushyError as e: msg = (self._('The BIOS Settings results were not found. Error ' '%(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) status = "failed" if len(settings_result) > 1 else "success" return {"status": status, "results": settings_result} def get_available_disk_types(self): """Get the list of all disk type available in server :returns: A list containing disk types :raises: IloError, on an error from iLO. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) return sushy_system.get_disk_types() def get_http_boot_url(self): """Sets current BIOS settings to the provided data. :raises: IloError, on an error from iLO. :return: Returns the setting 'UrlBootFile' if set previously. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) url = None try: settings = sushy_system.bios_settings.json attributes = settings.get('Attributes') url = attributes.get('UrlBootFile') except sushy.exceptions.SushyError as e: msg = (self._('The attribute "UrlBootFile" not found.' ' Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) return url def set_http_boot_url(self, url, is_dhcp_enabled=True): """Sets HTTP boot URL to boot from it. :param: url: HTTP URL of the image to be booted on the iLO. :param: is_dhcp_enabled: True if no static IP is set on the node and preferred to use DHCP service running in the network. If False, the MAC is expected to be configured with static IP. :raises: IloError, on an error from iLO. """ if not url: raise exception.IloError("Could not set http url with" " empty URL") data = { 'PreBootNetwork': 'Auto', 'UrlBootFile': url, 'Dhcpv4': 'Enabled' if is_dhcp_enabled else 'Disabled' } sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) try: settings_required = sushy_system.bios_settings.pending_settings settings_required.update_bios_data_by_post(data) except sushy.exceptions.SushyError as e: msg = (self._('Could not set HTTPS URL on the iLO.' ' Error %(error)s') % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) def add_tls_certificate(self, cert_file_list): """Adds the TLS certificates to the iLO. :param cert_file_list: List of TLS certificate files :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) if(self._is_boot_mode_uefi()): cert_list = [] for cert_file in cert_file_list: with open(cert_file, 'r') as f: data = json.dumps(f.read()) p = re.sub(r"\"", "", data) q = re.sub(r"\\n", "\r\n", p).rstrip() c_list = re.findall(_CERTIFICATE_PATTERN, q, re.DOTALL) if len(c_list) == 0: LOG.warning("Could not find any valid certificate in " "%(cert_file)s. Ignoring." % {"cert_file": cert_file}) continue for content in c_list: cert = {} cert['X509Certificate'] = content cert_list.append(cert) if len(cert_list) == 0: msg = (self._("No valid certificate in %(cert_file_list)s.") % {"cert_file_list": cert_file_list}) LOG.debug(msg) raise exception.IloError(msg) cert_dict = {} cert_dict['NewCertificates'] = cert_list try: (sushy_system.bios_settings.tls_config. tls_config_settings.add_tls_certificate(cert_dict)) except sushy.exceptions.SushyError as e: msg = (self._("The Redfish controller has failed to upload " "TLS certificate. Error %(error)s") % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) else: msg = 'TLS certificate cannot be upload in BIOS boot mode' raise exception.IloCommandNotSupportedInBiosError(msg) def _get_fps_from_file(self, cert_file): """Gets the finger prints from the certificate file. Parse the file passed in to get the certificates. For each certificate, find the fingerprint by calculating the digest of base64 decoded content. Finally return the list of the fingerprints. :param cert_file: TLS certificate file containing one or more certificates. :return: Returns the list of FPs for the certificates in the file. """ fp_list = [] with open(cert_file, 'r') as f: data = json.dumps(f.read()) p = re.sub(r"\"", "", data) q = re.sub(r"\\n", "\r\n", p).rstrip() c_list = re.findall(_CERTIFICATE_PATTERN, q, re.DOTALL) if len(c_list) == 0: LOG.warning("Could not find any valid certificate in " "%(cert_file)s. Ignoring." % {"cert_file": cert_file}) return fp_list for content in c_list: pem_lines = [line.strip() for line in ( content.strip().split('\n'))] try: der_data = b64decode(''.join(pem_lines[1:-1])) except ValueError: LOG.warning("Illegal base64 encountered " "in the certificate.") else: cert = load_certificate(FILETYPE_ASN1, der_data) fp = cert.digest('sha256').decode('ascii') fp_list.append(fp) return fp_list def remove_tls_certificate(self, cert_file_list=[], excl_cert_file_list=[]): """Removes the TLS CA certificates from the iLO. :param cert_file_list: List of TLS CA certificate files :param excl_cert_file_list: List of TLS CA certificate files to be retained on the iLO. These certificates will not be removed from the iLO. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID) if not self._is_boot_mode_uefi(): msg = 'TLS certificates cannot be removed in BIOS boot mode' raise exception.IloCommandNotSupportedInBiosError(msg) cert_dict = {} del_cert_list = [] exc_fp_list = [] for exc_cert_file in excl_cert_file_list: efp_list = self._get_fps_from_file(exc_cert_file) exc_fp_list.extend(efp_list) LOG.debug("Excluding certificates with FingerPrints: %(exc_fp_list)s", {'exc_fp_list': exc_fp_list}) if not cert_file_list: tls_certificates = (sushy_system.bios_settings.tls_config. tls_certificates) for cert in tls_certificates: fp = cert.get("FingerPrint") if fp not in exc_fp_list: cert_fp = { "FingerPrint": fp } del_cert_list.append(cert_fp) else: all_fp_list = [] for cert_file in cert_file_list: afp_list = self._get_fps_from_file(cert_file) all_fp_list.extend(afp_list) final_fp_set = set(all_fp_list) - set(exc_fp_list) for fp in final_fp_set: cert_fp = { "FingerPrint": fp } del_cert_list.append(cert_fp) if len(del_cert_list) == 0: msg = (self._("No valid certificate in %(cert_file_list)s.") % {"cert_file_list": cert_file_list}) raise exception.IloError(msg) cert_dict.update({"DeleteCertificates": del_cert_list}) try: (sushy_system.bios_settings.tls_config. tls_config_settings.remove_tls_certificate(cert_dict)) except sushy.exceptions.SushyError as e: msg = (self._("The Redfish controller has failed to remove " "TLS certificate. Error %(error)s") % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2346644 proliantutils-2.16.0/proliantutils/redfish/resources/0000775000175000017500000000000000000000000023103 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/__init__.py0000664000175000017500000000000000000000000025202 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2346644 proliantutils-2.16.0/proliantutils/redfish/resources/account_service/0000775000175000017500000000000000000000000026257 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/account_service/__init__.py0000664000175000017500000000000000000000000030356 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/account_service/account.py0000664000175000017500000000312500000000000030266 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' from sushy.resources import base class HPEAccount(base.ResourceBase): """Class that defines the functionality for Account.""" username = base.Field('UserName') def update_credentials(self, password): """Update credentials of a redfish system :param password: password to be updated """ data = { 'Password': password, } self._conn.patch(self.path, data=data) class HPEAccountCollection(base.ResourceCollectionBase): """Class that defines the functionality for AccountCollection.""" @property def _resource_type(self): return HPEAccount def get_member_details(self, username): """Returns the HPEAccount object :param username: username of account :returns: HPEAccount object if criterion matches, None otherwise """ members = self.get_members() for member in members: if member.username == username: return member ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/account_service/account_service.py0000664000175000017500000000607300000000000032013 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from sushy.resources import base from sushy import utils as sushy_utils from proliantutils import exception from proliantutils.redfish.resources.account_service import account from proliantutils.redfish import utils DEFAULT_PASSWORD_LENGTH = 8 DEFAULT_AUTH_FAIL_LOGGING = 1 class HPEAccountService(base.ResourceBase): """Class that extends the functionality of AccountService resource class This class extends the functionality of Account resource class from sushy """ min_passwd_length = base.Field(["Oem", "Hpe", "MinPasswordLength"]) enforce_passwd_complexity = base.Field( ["Oem", "Hpe", "EnforcePasswordComplexity"]) @property @sushy_utils.cache_it def accounts(self): """Property to provide instance of HPEAccountCollection""" return account.HPEAccountCollection( self._conn, utils.get_subresource_path_by(self, 'Accounts'), redfish_version=self.redfish_version) def update_min_passwd_length(self, passwd_length): if passwd_length is None: passwd_length = DEFAULT_PASSWORD_LENGTH valid_lengths = list(range(40)) if (passwd_length not in valid_lengths): raise exception.InvalidParameterValueError( parameter='MinPasswordLength', value=passwd_length, valid_values='0 to 39') p_data = {"Oem": {"Hpe": {"MinPasswordLength": passwd_length}}} self._conn.patch(self.path, data=p_data) def update_enforce_passwd_complexity(self, enable): if not isinstance(enable, bool): msg = ('The parameter "%(parameter)s" value "%(value)s" is ' 'invalid. Valid values are: True/False.' % {'parameter': 'enable', 'value': enable}) raise exception.InvalidInputError(msg) data = {"Oem": {"Hpe": {"EnforcePasswordComplexity": enable}}} self._conn.patch(self.path, data=data) def update_auth_failure_logging(self, logging_threshold): if logging_threshold is None: logging_threshold = DEFAULT_AUTH_FAIL_LOGGING valid_values = [0, 1, 2, 3, 5] if (logging_threshold not in valid_values): raise exception.InvalidParameterValueError( parameter='AuthFailureLoggingThreshold', value=logging_threshold, valid_values=valid_values) p_data = {"Oem": {"Hpe": { "AuthFailureLoggingThreshold": logging_threshold}}} self._conn.patch(self.path, data=p_data) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2386646 proliantutils-2.16.0/proliantutils/redfish/resources/chassis/0000775000175000017500000000000000000000000024540 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/chassis/__init__.py0000664000175000017500000000000000000000000026637 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/chassis/chassis.py0000664000175000017500000000237700000000000026560 0ustar00zuulzuul00000000000000# Copyright 2021 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' from sushy.resources.chassis import chassis from sushy import utils as sushy_utils from proliantutils.redfish.resources.chassis import devices from proliantutils.redfish import utils class HPEChassis(chassis.Chassis): """Class that extends the functionality of Chassis resource class This class extends the functionality of Chassis resource class from sushy """ @property @sushy_utils.cache_it def devices(self): return devices.DevicesCollection( self._conn, utils.get_subresource_path_by( self, ['Oem', 'Hpe', 'Links', 'Devices']), redfish_version=self.redfish_version) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/chassis/devices.py0000664000175000017500000000443600000000000026543 0ustar00zuulzuul00000000000000# Copyright 2021 Hewlett Packard Enterprise Development LP # # 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 sushy.resources import base from sushy import utils as sushy_utils LOG = logging.getLogger(__name__) class Devices(base.ResourceBase): identity = base.Field('Id', required=True) name = base.Field('Name') manufacturer = base.Field('Manufacturer') device_instances = base.Field('DeviceInstances') class DevicesCollection(base.ResourceCollectionBase): @property def _resource_type(self): return Devices @property @sushy_utils.cache_it def vendor_dict(self): """Gets the dictionary of identity and vendor names""" vendor_dict = {} for member in self.get_members(): vendor = member.manufacturer if vendor == '': vendor = 'NULL' vendor_dict.update({member.identity: vendor}) return vendor_dict @property @sushy_utils.cache_it def pci_devices_uris(self): """Gets the dictionary of pci_device_uris and identity""" pci_devices_uris = {} for member in self.get_members(): dev_list = [] dev_instances = member.device_instances if dev_instances is None: dev_instances = [] for m in dev_instances: dev_list.append(m.get('@odata.id')) pci_devices_uris.update({member.identity: dev_list}) return pci_devices_uris @property @sushy_utils.cache_it def vendor_devices_dict(self): """Gets the dictionary of identity and device names""" vendor_devices_dict = {} for member in self.get_members(): vendor_devices_dict.update( {member.identity: member.name}) return vendor_devices_dict ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/gpu_common.py0000664000175000017500000001407400000000000025626 0ustar00zuulzuul00000000000000# Copyright 2021 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' import os import sushy from proliantutils import exception from proliantutils import log LOG = log.get_logger(__name__) def _get_attribute_value_of(resource, attribute_name, default=None): """Gets the value of attribute_name from the resource It catches the exception, if any, while retrieving the value of attribute_name from resource and returns default. :param resource: The resource object :attribute_name: Property of the resource :returns the property value if no error encountered else return 0. """ try: return getattr(resource, attribute_name) except (sushy.exceptions.SushyError, exception.MissingAttributeError) as e: msg = (('The Redfish controller failed to get the ' 'attribute %(attribute)s from resource %(resource)s. ' 'Error %(error)s') % {'error': str(e), 'attribute': attribute_name, 'resource': resource.__class__.__name__}) LOG.debug(msg) return default def gpu_capabilities(system_obj, chassis_obj): """Gets the additional gpu capablities The PCIDevice URIs /redfish/v1/Systems/1/PCIDevices/ has the details for the device if it falls in GPU devices classification. The Devices URIs /redfish/v1/Chassis/1/Devices/ has the vendor name, vendor device names and the device_instances which has the list of PCIDevice URIs for the particular Device ID. The logic implemented is: 1. Get the Chassis Devices URIs data 2. Check if the PCIDevices given in 'device_instances' corresponds to GPU device classification i.e. they are there in the list returned by 'gpu_devices'. 3. If the given Chassis Devices URI is for GPU device, then create the capability variables with following: gpu__count - Numeric gpu__count - Numeric gpu_ - True/False :param system_obj: An instance of sushy system :param chassis_obj: An instance of sushy chassis :returns list of additional gpu_capabilities. """ gpu_cap = [{'gpu_vendor_count': {}}, {'gpu_ven_dev_count': {}}, {'gpu_ven_dev': {}}] # Get the list of PCIDevice URIs which are GPU devices pci_devices = _get_attribute_value_of(system_obj, 'pci_devices') gpu_device_list = _get_attribute_value_of(pci_devices, 'gpu_devices') devices = _get_attribute_value_of(chassis_obj, 'devices') # Get the dictionary of {: , : , ...} # from Chassis Devices URIs. vendor_dict = _get_attribute_value_of(devices, 'vendor_dict') # Get the dictionary of # {: [, ...], # : [, ...]} # from Chassis Devices URIs. pci_devices_uris = _get_attribute_value_of(devices, 'pci_devices_uris') # Get the dictionary of {: , ...} from # Chassis Devices URIs. vendor_devices_dict = _get_attribute_value_of(devices, 'vendor_devices_dict') # Get the dictionary of {: , ...} from the # PCI Device URIs but only for those devices which are GPU devices. vendor_id_dict = _get_attribute_value_of(pci_devices, 'vendor_id') for identity in pci_devices_uris: devices_list = pci_devices_uris[identity] for member in devices_list: if member in gpu_device_list: vendor_name = vendor_dict[identity] count_ven_var = 'gpu_' + vendor_name + '_count' # Sometimes there is no vendor name in the redfish output. # Hence creating the variable with the numeric vendor # ID for those gpu devices if vendor_name == 'NULL': pci_uri_id = os.path.basename(member) vendor_name = hex(vendor_id_dict[pci_uri_id]) count_ven_var = 'gpu_' + vendor_name + '_count' gpu_device_name = vendor_devices_dict[identity] # The data returned is like "Embedded Video Controller" # Replacing space with underscore to form the correct # capability name. gpu_dev_name = gpu_device_name.replace(" ", "_") count_ven_dev_var = 'gpu_' + gpu_dev_name + '_count' ven_dev_var = 'gpu_' + gpu_dev_name if count_ven_var not in gpu_cap[0]['gpu_vendor_count']: gpu_cap[0]['gpu_vendor_count'].update({count_ven_var: 1}) else: gpu_ven_count = ( gpu_cap[0]['gpu_vendor_count'].get(count_ven_var)) gpu_cap[0]['gpu_vendor_count'].update( {count_ven_var: gpu_ven_count + 1}) if count_ven_dev_var not in gpu_cap[1]['gpu_ven_dev_count']: gpu_cap[1]['gpu_ven_dev_count'].update( {count_ven_dev_var: 1}) gpu_cap[2]['gpu_ven_dev'].update({ven_dev_var: True}) else: dev_count = ( gpu_cap[1]['gpu_ven_dev_count'].get( count_ven_dev_var)) gpu_cap[1]['gpu_ven_dev_count'].update( {count_ven_dev_var: dev_count + 1}) return gpu_cap ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2386646 proliantutils-2.16.0/proliantutils/redfish/resources/manager/0000775000175000017500000000000000000000000024515 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/manager/__init__.py0000664000175000017500000000000000000000000026614 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/manager/constants.py0000664000175000017500000000136100000000000027104 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. # Virtual Media types VIRTUAL_MEDIA_CD = 'cd' VIRTUAL_MEDIA_FLOPPY = 'floppy' VIRTUAL_MEDIA_DVD = 'dvd' VIRTUAL_MEDIA_USB_STICK = 'usb stick' ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/manager/https_cert.py0000664000175000017500000001042300000000000027246 0ustar00zuulzuul00000000000000# Copyright 2020 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' import sushy from sushy.resources import base from sushy.resources import common as sushy_common from proliantutils import exception from proliantutils.ilo import common from proliantutils import log LOG = log.get_logger(__name__) class ActionsField(base.CompositeField): generate_csr = (sushy_common. ResetActionField('#HpeHttpsCert.GenerateCSR')) import_cert = (sushy_common. ResetActionField('#HpeHttpsCert.ImportCertificate')) class HttpsCert(base.ResourceBase): cert_sign_request = base.Field('CertificateSigningRequest', required=True) _actions = ActionsField(['Actions'], required=True) def _get_https_cert_uri(self, cert_func): """Get the url for generating CSR :returns: generate csr url :raises: Missing resource error on missing url """ url = self._actions[cert_func] if not url: if cert_func == 'generate_csr': missing_action = '#HpeHttpsCert.GenerateCSR' else: missing_action = '#HpeHttpsCert.ImportCertificate' raise (sushy.exceptions. MissingActionError(action=missing_action, resource=self._path)) return url def import_certificate(self, cert): """Adds the signed https certificate to the iLO. :param certificate: Signed HTTPS certificate. :raises: IloError, on an error from iLO. """ action_data = { "Certificate": cert } target_uri = self._get_https_cert_uri('import_cert').target_uri try: self._conn.post(target_uri, data=action_data) except sushy.exceptions.SushyError as e: msg = (('The Redfish controller failed to import ' 'certificate. Error: %(error)s') % {'error': str(e)}) LOG.debug(msg) # noqa raise exception.IloError(msg) def generate_csr(self, csr_params): """Generates the certificate signing request. :param csr_params: A dictionary containing all the necessary information required to create CSR. :returns: Created CSR. :raises: IloError, on an error from iLO. """ target_uri = self._get_https_cert_uri('generate_csr').target_uri try: self._conn.post(target_uri, data=csr_params) except sushy.exceptions.SushyError as e: msg = (('The Redfish controller failed to generate CSR ' 'with given information. Error: %(error)s') % {'error': str(e)}) LOG.debug(msg) # noqa raise exception.IloError(msg) self.wait_for_csr_to_create() csr = self.cert_sign_request return csr def wait_for_csr_to_create(self): """Continuosly polls for CSR to create. """ def has_csr_created(): """Check whether CSR is created. :returns: True upon successful creation of CSR otherwise False. """ self.get_generate_csr_refresh() csr = self.cert_sign_request if not csr: return False return True common.wait_for_operation_to_complete( has_csr_created, delay_bw_retries=30, failover_msg='Generating CSR has failed.' ) def get_generate_csr_refresh(self): # perform refresh try: self.refresh() except sushy.exceptions.SushyError as e: msg = (('Generating CSR progress not known. ' 'Error: %(error)s') % {'error': str(e)}) LOG.debug(msg) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/manager/manager.py0000664000175000017500000000714400000000000026507 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' from sushy.resources import base from sushy.resources.manager import manager from sushy import utils as sushy_utils from proliantutils import exception from proliantutils.redfish.resources.manager import network_protocol from proliantutils.redfish.resources.manager import security_service from proliantutils.redfish.resources.manager import virtual_media from proliantutils.redfish import utils class HPEManager(manager.Manager): """Class that extends the functionality of Manager resource class This class extends the functionality of Manager resource class from sushy """ required_login_foriLORBSU = base.Field( ["Oem", "Hpe", "RequiredLoginForiLORBSU"]) require_host_authentication = base.Field( ["Oem", "Hpe", "RequireHostAuthentication"]) def set_license(self, key): """Set the license on a redfish system :param key: license key """ data = {'LicenseKey': key} license_service_uri = (utils.get_subresource_path_by(self, ['Oem', 'Hpe', 'Links', 'LicenseService'])) self._conn.post(license_service_uri, data=data) @property @sushy_utils.cache_it def virtual_media(self): """Property to provide reference to `VirtualMediaCollection` instance. It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return virtual_media.VirtualMediaCollection( self._conn, utils.get_subresource_path_by(self, 'VirtualMedia'), redfish_version=self.redfish_version) @property @sushy_utils.cache_it def securityservice(self): return security_service.SecurityService( self._conn, utils.get_subresource_path_by( self, ['Oem', 'Hpe', 'Links', 'SecurityService']), redfish_version=self.redfish_version) @property @sushy_utils.cache_it def networkprotocol(self): return network_protocol.NetworkProtocol( self._conn, utils.get_subresource_path_by(self, 'NetworkProtocol'), redfish_version=self.redfish_version) def update_login_for_ilo_rbsu(self, enable): if not isinstance(enable, bool): msg = ('The parameter "%(parameter)s" value "%(value)s" is ' 'invalid. Valid values are: True/False.' % {'parameter': 'enable', 'value': enable}) raise exception.InvalidInputError(msg) data = {"Oem": {"Hpe": {"RequiredLoginForiLORBSU": enable}}} self._conn.patch(self.path, data=data) def update_host_authentication(self, enable): if not isinstance(enable, bool): msg = ('The parameter "%(parameter)s" value "%(value)s" is ' 'invalid. Valid values are: True/False.' % {'parameter': 'enable', 'value': enable}) raise exception.InvalidInputError(msg) data = {"Oem": {"Hpe": {"RequireHostAuthentication": enable}}} self._conn.patch(self.path, data=data) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/manager/mapping.py0000664000175000017500000000170700000000000026527 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from sushy import utils from proliantutils.redfish.resources.manager import constants as cons VIRTUAL_MEDIA_TYPES_MAP = { 'CD': cons.VIRTUAL_MEDIA_CD, 'DVD': cons.VIRTUAL_MEDIA_DVD, 'Floppy': cons.VIRTUAL_MEDIA_FLOPPY, 'USBStick': cons.VIRTUAL_MEDIA_USB_STICK } VIRTUAL_MEDIA_TYPES_MAP_REV = utils.revert_dictionary(VIRTUAL_MEDIA_TYPES_MAP) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/manager/network_protocol.py0000664000175000017500000000275700000000000030514 0ustar00zuulzuul00000000000000# Copyright 2021 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' from sushy.resources import base from proliantutils import exception from proliantutils import log LOG = log.get_logger(__name__) class NetworkProtocol(base.ResourceBase): identity = base.Field('Id', required=True) """The identity for the instance.""" name = base.Field("Name") """Name of the service""" ipmi_enabled = base.Field(["IPMI", "ProtocolEnabled"]) """True if IPMI network protocol is enabled else False""" def update_ipmi_enabled(self, enable): if not isinstance(enable, bool): msg = ('The parameter "%(parameter)s" value "%(value)s" is ' 'invalid. Valid values are: True/False.' % {'parameter': 'enable', 'value': enable}) raise exception.InvalidInputError(msg) ipmi_data = {"IPMI": {"ProtocolEnabled": enable}} self._conn.patch(self.path, data=ipmi_data) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/manager/security_dashboard.py0000664000175000017500000000312300000000000030744 0ustar00zuulzuul00000000000000# Copyright 2021-2022 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' from sushy.resources import base from sushy import utils as sushy_utils from proliantutils.redfish.resources.manager import security_params class SecurityDashboard(base.ResourceBase): identity = base.Field('Id', required=True) """The identity for the instance.""" overall_status = base.Field('OverallSecurityStatus', required=True) """Overall security status of the server""" server_configuration_lock_status = ( base.Field('ServerConfigurationLockStatus')) security_params_collection_uri = ( base.Field(["SecurityParameters", "@odata.id"], required=True)) @property @sushy_utils.cache_it def securityparamscollectionuri(self): """Gets the list of instances for security params :returns: the list of instances of security params. """ return security_params.SecurityParamsCollection( self._conn, self.security_params_collection_uri, redfish_version=self.redfish_version) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/manager/security_params.py0000664000175000017500000000340700000000000030305 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' from sushy.resources import base from proliantutils import exception from proliantutils import log LOG = log.get_logger(__name__) class SecurityParams(base.ResourceBase): identity = base.Field('Id', required=True) """The identity for the instance.""" status = base.Field('SecurityStatus', required=True) """Security status of the server""" name = base.Field('Name', required=True) state = base.Field('State', required=True) ignore = base.Field('Ignore', required=True) description = base.Field('Description') recommended_action = base.Field('RecommendedAction') def update_security_param_ignore_status(self, ignore): if not isinstance(ignore, bool): msg = ('The parameter "%(parameter)s" value "%(value)s" is ' 'invalid. Valid values are: True/False.' % {'parameter': 'ignore', 'value': ignore}) raise exception.InvalidInputError(msg) data = {"Ignore": ignore} self._conn.patch(self.path, data=data) class SecurityParamsCollection(base.ResourceCollectionBase): @property def _resource_type(self): return SecurityParams ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/manager/security_service.py0000664000175000017500000000367600000000000030472 0ustar00zuulzuul00000000000000# Copyright 2021-2022 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' from sushy.resources import base from sushy import utils as sushy_utils from proliantutils import log from proliantutils.redfish.resources.manager import https_cert from proliantutils.redfish.resources.manager import security_dashboard LOG = log.get_logger(__name__) class SecurityService(base.ResourceBase): identity = base.Field('Id', required=True) """The identity for the instance.""" security_dashboard_uri = ( base.Field(["Links", "SecurityDashboard", "@odata.id"], required=True)) https_cert_uri = ( base.Field(["Links", "HttpsCert", "@odata.id"], required=True)) @property @sushy_utils.cache_it def securitydashboard(self): """This property gets the instance for security dashboard :returns: an instance of security dashboard """ return security_dashboard.SecurityDashboard( self._conn, self.security_dashboard_uri, redfish_version=self.redfish_version) @property @sushy_utils.cache_it def https_certificate_uri(self): """Gets the instance of https certificate manager :returns: an instance of https certificate manager. """ return https_cert.HttpsCert( self._conn, self.https_cert_uri, redfish_version=self.redfish_version) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/manager/virtual_media.py0000664000175000017500000000771300000000000027724 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' from sushy import exceptions as sushy_exceptions from sushy.resources import base from sushy.resources import common from sushy.resources.manager import virtual_media from proliantutils import exception from proliantutils import log from proliantutils.redfish.resources.manager import mapping as maps LOG = log.get_logger(__name__) def _get_media(media_types): """Helper method to map the media types.""" get_mapped_media = (lambda x: maps.VIRTUAL_MEDIA_TYPES_MAP[x] if x in maps.VIRTUAL_MEDIA_TYPES_MAP else None) return list(map(get_mapped_media, media_types)) class ActionsField(base.CompositeField): insert_vmedia = common.ResetActionField( '#HpeiLOVirtualMedia.InsertVirtualMedia') eject_vmedia = common.ResetActionField( '#HpeiLOVirtualMedia.EjectVirtualMedia') class VirtualMedia(virtual_media.VirtualMedia): media_types = base.Field('MediaTypes', adapter=_get_media, required=True) """A list of allowed media types for the instance.""" _hpe_actions = ActionsField(['Oem', 'Hpe', 'Actions'], required=True) def _get_action_element(self, action_type): """Helper method to return the action object.""" action = eval("self._hpe_actions." + action_type + "_vmedia") if not action: if action_type == "insert": action_path = '#HpeiLOVirtualMedia.InsertVirtualMedia' else: action_path = '#HpeiLOVirtualMedia.EjectVirtualMedia' raise exception.MissingAttributeError( attribute=action_path, resource=self._path) return action def insert_media(self, url): """Inserts Virtual Media to the device :param url: URL to image. :raises: SushyError, on an error from iLO. """ try: super(VirtualMedia, self).insert_media(url, write_protected=True) except sushy_exceptions.SushyError: target_uri = self._get_action_element('insert').target_uri data = {'Image': url} self._conn.post(target_uri, data=data) def eject_media(self): """Ejects Virtual Media. :raises: SushyError, on an error from iLO. """ try: super(VirtualMedia, self).eject_media() except sushy_exceptions.SushyError: target_uri = self._get_action_element('eject').target_uri self._conn.post(target_uri, data={}) def set_vm_status(self, boot_on_next_reset): """Set the Virtual Media drive status. :param boot_on_next_reset: boolean value :raises: SushyError, on an error from iLO. """ data = { "Oem": { "Hpe": { "BootOnNextServerReset": boot_on_next_reset } } } self._conn.patch(self.path, data=data) class VirtualMediaCollection(base.ResourceCollectionBase): @property def _resource_type(self): return VirtualMedia def get_member_device(self, device): """Returns the given virtual media device object. :param device: virtual media device to be queried :returns virtual media device object. """ for vmedia_device in self.get_members(): if device in vmedia_device.media_types: return vmedia_device ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2426646 proliantutils-2.16.0/proliantutils/redfish/resources/system/0000775000175000017500000000000000000000000024427 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/__init__.py0000664000175000017500000000000000000000000026526 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/bios.py0000664000175000017500000002167200000000000025745 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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 sushy from sushy.resources import base from sushy import utils as sushy_utils from proliantutils import exception from proliantutils import log from proliantutils.redfish.resources.system import constants as sys_cons from proliantutils.redfish.resources.system import iscsi from proliantutils.redfish.resources.system import mappings from proliantutils.redfish.resources.system import tls_config from proliantutils.redfish import utils LOG = log.get_logger(__name__) BOOT_SOURCE_TARGET_TO_PARTIAL_STRING_MAP = { sushy.BOOT_SOURCE_TARGET_CD: ('HPE Virtual CD-ROM',), sushy.BOOT_SOURCE_TARGET_PXE: ('NIC', 'PXE'), sushy.BOOT_SOURCE_TARGET_UEFI_TARGET: ('ISCSI',), sushy.BOOT_SOURCE_TARGET_HDD: ('Logical Drive', 'HDD', 'Storage', 'LogVol') } class BIOSSettings(base.ResourceBase): """Class that defines the functionality for BIOS Resources.""" messages = base.Field(['@Redfish.Settings', 'Messages']) boot_mode = base.MappedField(["Attributes", "BootMode"], mappings.GET_BIOS_BOOT_MODE_MAP) sriov = base.MappedField(['Attributes', 'Sriov'], mappings.SRIOV_MAP) tpm_state = base.MappedField(["Attributes", "TpmState"], mappings.TPM_MAP) cpu_vt = base.MappedField(["Attributes", "ProcVirtualization"], mappings.CPUVT_MAP) @property @sushy_utils.cache_it def pending_settings(self): """Property to provide reference to bios_pending_settings instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return BIOSPendingSettings( self._conn, utils.get_subresource_path_by( self, ["@Redfish.Settings", "SettingsObject"]), redfish_version=self.redfish_version) @property def default_settings(self): """Property to provide default BIOS settings It gets the current default settings on the node. """ return self._get_base_configs().default_config @property @sushy_utils.cache_it def boot_settings(self): """Property to provide reference to bios boot instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return BIOSBootSettings( self._conn, utils.get_subresource_path_by( self, ["Oem", "Hpe", "Links", "Boot"]), redfish_version=self.redfish_version) @property @sushy_utils.cache_it def iscsi_resource(self): """Property to provide reference to bios iscsi resource instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return iscsi.ISCSIResource( self._conn, utils.get_subresource_path_by( self, ["Oem", "Hpe", "Links", "iScsi"]), redfish_version=self.redfish_version) @property @sushy_utils.cache_it def tls_config(self): """Property to provide reference to BIOS TLS configuration instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return tls_config.TLSConfig( self._conn, utils.get_subresource_path_by( self, ["Oem", "Hpe", "Links", "TlsConfig"]), redfish_version=self.redfish_version) @property @sushy_utils.cache_it def bios_mappings(self): """Property to provide reference to bios mappings instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return BIOSMappings( self._conn, utils.get_subresource_path_by( self, ["Oem", "Hpe", "Links", "Mappings"]), redfish_version=self.redfish_version) @sushy_utils.cache_it def _get_base_configs(self): """Method that returns object of bios base configs.""" return BIOSBaseConfigs( self._conn, utils.get_subresource_path_by( self, ["Oem", "Hpe", "Links", "BaseConfigs"]), redfish_version=self.redfish_version) def update_bios_to_default(self): """Updates bios default settings""" self.pending_settings.update_bios_data_by_post( self._get_base_configs().default_config) class BIOSBaseConfigs(base.ResourceBase): """Class that defines the functionality for BIOS base configuration.""" default_config = base.Field( "BaseConfigs", adapter=lambda base_configs: base_configs[0]['default']) class BIOSPendingSettings(base.ResourceBase): """Class that defines the functionality for BIOS pending settings.""" boot_mode = base.MappedField(["Attributes", "BootMode"], mappings.GET_BIOS_BOOT_MODE_MAP) def set_pending_boot_mode(self, boot_mode): """Sets the boot mode of the system for next boot. :param boot_mode: either sys_cons.BIOS_BOOT_MODE_LEGACY_BIOS, sys_cons.BIOS_BOOT_MODE_UEFI. """ bios_properties = { 'BootMode': mappings.GET_BIOS_BOOT_MODE_MAP_REV.get(boot_mode) } if boot_mode == sys_cons.BIOS_BOOT_MODE_UEFI: bios_properties['UefiOptimizedBoot'] = 'Enabled' self.update_bios_data_by_patch(bios_properties) def update_bios_data_by_post(self, data): """Update bios data by post :param data: default bios config data """ bios_settings_data = { 'Attributes': data } self._conn.post(self.path, data=bios_settings_data) def update_bios_data_by_patch(self, data): """Update bios data by patch :param data: default bios config data """ bios_settings_data = { 'Attributes': data } self._conn.patch(self.path, data=bios_settings_data) class BIOSBootSettings(base.ResourceBase): boot_sources = base.Field("BootSources", adapter=list) persistent_boot_config_order = base.Field("PersistentBootConfigOrder", adapter=list) def get_persistent_boot_device(self): """Get current persistent boot device set for the host :returns: persistent boot device for the system :raises: IloError, on an error from iLO. """ boot_string = None if not self.persistent_boot_config_order or not self.boot_sources: msg = ('Boot sources or persistent boot config order not found') LOG.debug(msg) raise exception.IloError(msg) preferred_boot_device = self.persistent_boot_config_order[0] for boot_source in self.boot_sources: if ((boot_source.get("StructuredBootString") is not None) and ( preferred_boot_device == boot_source.get("StructuredBootString"))): boot_string = boot_source["BootString"] break else: msg = (('Persistent boot device failed, as no matched boot ' 'sources found for device: %(persistent_boot_device)s') % {'persistent_boot_device': preferred_boot_device}) LOG.debug(msg) raise exception.IloError(msg) for key, value in BOOT_SOURCE_TARGET_TO_PARTIAL_STRING_MAP.items(): for val in value: if val in boot_string: return key return sushy.BOOT_SOURCE_TARGET_NONE def get_uefi_boot_string(self, mac): """Get uefi iscsi boot string for the host :returns: iscsi boot string for the system :raises: IloError, on an error from iLO. """ boot_sources = self.boot_sources if not boot_sources: msg = ('Boot sources are not found') LOG.debug(msg) raise exception.IloError(msg) for boot_source in boot_sources: if (mac.upper() in boot_source['UEFIDevicePath'] and 'iSCSI' in boot_source['UEFIDevicePath']): return boot_source['StructuredBootString'] else: msg = ('MAC provided "%s" is Invalid' % mac) raise exception.IloInvalidInputError(msg) class BIOSMappings(base.ResourceBase): """Class that defines the functionality for BIOS mappings.""" pci_settings_mappings = base.Field("BiosPciSettingsMappings", adapter=list) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/constants.py0000664000175000017500000000465500000000000027027 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # All Rights Reserved. # # 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. # Push power button action constants PUSH_POWER_BUTTON_PRESS = 'press' PUSH_POWER_BUTTON_PRESS_AND_HOLD = 'press and hold' # BIOS Settings boot mode constants BIOS_BOOT_MODE_LEGACY_BIOS = 'legacy bios' BIOS_BOOT_MODE_UEFI = 'uefi' # Persistent boot device for set BOOT_SOURCE_TARGET_CD = 'Cd' BOOT_SOURCE_TARGET_PXE = 'Pxe' BOOT_SOURCE_TARGET_UEFI_TARGET = 'UefiTarget' BOOT_SOURCE_TARGET_HDD = 'Hdd' # BIOS Sriov constants SRIOV_ENABLED = 'sriov enabled' SRIOV_DISABLED = 'sriov disabled' # Secure Boot current boot constants SECUREBOOT_CURRENT_BOOT_ENABLED = 'enabled' SECUREBOOT_CURRENT_BOOT_DISABLED = 'disabled' # Secure Boot reset keys constants SECUREBOOT_RESET_KEYS_DEFAULT = 'default' SECUREBOOT_RESET_KEYS_DELETE_ALL = 'delete all' SECUREBOOT_RESET_KEYS_DELETE_PK = 'delete pk' TPM_PRESENT_ENABLED = 'Tpm present enabled' TPM_PRESENT_DISABLED = 'Tpm present disabled' TPM_NOT_PRESENT = 'Tpm not present' # BIOS Cpu Virtualisation contants CPUVT_ENABLED = 'cpu_vt enabled' CPUVT_DISABLED = 'cpu_vt disabled' # System supported boot mode contants SUPPORTED_LEGACY_BIOS_ONLY = 'legacy bios only' SUPPORTED_UEFI_ONLY = 'uefi only' SUPPORTED_LEGACY_BIOS_AND_UEFI = 'legacy bios and uefi' # Health related constants HEALTH_STATE_ENABLED = 'enabled' HEALTH_STATE_DISABLED = 'disabled' HEALTH_OK = 'ok' HEALTH_WARNING = 'warning' HEALTH_CRITICAL = 'critical' # Memory related constants MEMORY_TYPE_NVDIMM_N = "nvdimm_n" MEMORY_TYPE_DRAM = "dram" MEMORY_DEVICE_TYPE_LOGICAL = "logical" MEMORY_DEVICE_TYPE_DDR4 = "ddr4" # System POST state related constants POST_STATE_NULL = "null" POST_STATE_UNKNOWN = "unknown" POST_STATE_RESET = "reset" POST_STATE_POWEROFF = "poweroff" POST_STATE_INPOST = "inpost" POST_STATE_INPOSTDISCOVERY = "inpostdiscoverycomplete" POST_STATE_FINISHEDPOST = "finishedpost" ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/ethernet_interface.py0000664000175000017500000000455100000000000030644 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # All Rights Reserved. # # 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 sushy from sushy.resources import base from sushy.resources.system import ethernet_interface from sushy import utils as sushy_utils class EthernetInterface(ethernet_interface.EthernetInterface): uefi_device_path = base.Field('UefiDevicePath') class EthernetInterfaceCollection(base.ResourceCollectionBase): @property def _resource_type(self): return EthernetInterface @property @sushy_utils.cache_it def summary(self): """property to return the summary MAC addresses and state This filters the MACs whose health is OK, and in 'Enabled' State would be returned. The returned format will be {: }. This is because RIBCL returns the data in format {'Port 1': 'aa:bb:cc:dd:ee:ff'} and ironic ilo drivers inspection consumes the data in this format. Note: 'Id' is referred to as "Port number". """ mac_dict = {} for eth in self.get_members(): if eth.mac_address is not None: if (eth.status is not None and eth.status.health == sushy.HEALTH_OK and eth.status.state == sushy.STATE_ENABLED): mac_dict.update( {'Port ' + eth.identity: eth.mac_address}) return mac_dict def get_uefi_device_path_by_mac(self, mac): """Return uefi device path of mac""" for nic in self.get_members(): if nic.mac_address.lower() == mac.lower(): return nic.uefi_device_path def get_all_macs(self): """Return list of macs available on system""" macs = [mac.mac_address.lower() for mac in self.get_members()] return macs ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/iscsi.py0000664000175000017500000000422600000000000026117 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from sushy.resources import base from sushy import utils as sushy_utils from proliantutils.redfish import utils class ISCSIResource(base.ResourceBase): """Class that represents the iSCSI resource. This class extends the functionality of base resource class from sushy. """ iscsi_initiator = base.Field("iSCSIInitiatorName") def is_iscsi_boot_supported(self): """Checks whether iscsi boot is supported or not. To find the iscsi boot support, check whether the PATCH operation is allowed on the iscsi 'settings' uri. :returns: True if it is supported else False """ return utils.is_operation_allowed( 'PATCH', self, ['@Redfish.Settings', 'SettingsObject']) @property @sushy_utils.cache_it def iscsi_settings(self): """Property to provide reference to iSCSI settings instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return ISCSISettings( self._conn, utils.get_subresource_path_by( self, ["@Redfish.Settings", "SettingsObject"]), redfish_version=self.redfish_version) class ISCSISettings(base.ResourceBase): """Class that represents the iSCSI settings. This class extends the functionality of base resource class from sushy. """ def update_iscsi_settings(self, iscsi_data): """Update iscsi data :param data: default iscsi config data """ self._conn.patch(self.path, data=iscsi_data) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/mappings.py0000664000175000017500000000654100000000000026625 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from sushy import utils from proliantutils.redfish.resources.system import constants PUSH_POWER_BUTTON_VALUE_MAP = { 'Press': constants.PUSH_POWER_BUTTON_PRESS, 'PressAndHold': constants.PUSH_POWER_BUTTON_PRESS_AND_HOLD, } PUSH_POWER_BUTTON_VALUE_MAP_REV = ( utils.revert_dictionary(PUSH_POWER_BUTTON_VALUE_MAP)) # BIOS Settings boot mode mappings GET_BIOS_BOOT_MODE_MAP = { 'LegacyBios': constants.BIOS_BOOT_MODE_LEGACY_BIOS, 'Uefi': constants.BIOS_BOOT_MODE_UEFI } GET_BIOS_BOOT_MODE_MAP_REV = ( utils.revert_dictionary(GET_BIOS_BOOT_MODE_MAP)) # BIOS Sriov mappings SRIOV_MAP = { 'Enabled': constants.SRIOV_ENABLED, 'Disabled': constants.SRIOV_DISABLED } SECUREBOOT_CURRENT_BOOT_MAP = { 'Enabled': constants.SECUREBOOT_CURRENT_BOOT_ENABLED, 'Disabled': constants.SECUREBOOT_CURRENT_BOOT_DISABLED, } SECUREBOOT_CURRENT_BOOT_MAP_REV = ( utils.revert_dictionary(SECUREBOOT_CURRENT_BOOT_MAP)) SECUREBOOT_RESET_KEYS_MAP = { 'ResetAllKeysToDefault': constants.SECUREBOOT_RESET_KEYS_DEFAULT, 'DeleteAllKeys': constants.SECUREBOOT_RESET_KEYS_DELETE_ALL, 'DeletePK': constants.SECUREBOOT_RESET_KEYS_DELETE_PK, } SECUREBOOT_RESET_KEYS_MAP_REV = ( utils.revert_dictionary(SECUREBOOT_RESET_KEYS_MAP)) TPM_MAP = { 'PresentEnabled': constants.TPM_PRESENT_ENABLED, 'PresentDisabled': constants.TPM_PRESENT_DISABLED, 'NotPresent': constants.TPM_NOT_PRESENT } CPUVT_MAP = { 'Enabled': constants.CPUVT_ENABLED, 'Disabled': constants.CPUVT_DISABLED } # Supported boot mode map SUPPORTED_BOOT_MODE = { 0: constants.SUPPORTED_LEGACY_BIOS_ONLY, 2: constants.SUPPORTED_LEGACY_BIOS_AND_UEFI, 3: constants.SUPPORTED_UEFI_ONLY } HEALTH_STATE_VALUE_MAP = { 'Enabled': constants.HEALTH_STATE_ENABLED, 'Disabled': constants.HEALTH_STATE_DISABLED, } HEALTH_STATE_VALUE_MAP_REV = ( utils.revert_dictionary(HEALTH_STATE_VALUE_MAP)) HEALTH_VALUE_MAP = { 'OK': constants.HEALTH_OK, 'Warning': constants.HEALTH_WARNING, 'Critical': constants.HEALTH_CRITICAL } HEALTH_VALUE_MAP_REV = ( utils.revert_dictionary(HEALTH_VALUE_MAP)) # Memory type related mapppings MEMORY_TYPE_MAP = { 'NVDIMM_N': constants.MEMORY_TYPE_NVDIMM_N, 'DRAM': constants.MEMORY_TYPE_DRAM } MEMORY_DEVICE_TYPE_MAP = { 'Logical': constants.MEMORY_DEVICE_TYPE_LOGICAL, 'DDR4': constants.MEMORY_DEVICE_TYPE_DDR4 } POST_STATE_MAP = { 'Null': constants.POST_STATE_NULL, 'Unknown': constants.POST_STATE_UNKNOWN, 'Reset': constants.POST_STATE_RESET, 'PowerOff': constants.POST_STATE_POWEROFF, 'InPost': constants.POST_STATE_INPOST, 'InPostDiscoveryComplete': constants.POST_STATE_INPOSTDISCOVERY, 'FinishedPost': constants.POST_STATE_FINISHEDPOST } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/memory.py0000664000175000017500000000427100000000000026315 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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 collections from sushy.resources import base from proliantutils.redfish.resources.system import constants as sys_cons from proliantutils.redfish.resources.system import mappings MemoryData = collections.namedtuple( 'MemoryData', ['has_persistent_memory', 'has_nvdimm_n', 'has_logical_nvdimm_n']) class Memory(base.ResourceBase): identity = base.Field('Id') """The memory identity string""" name = base.Field('Name') """The name of the resource or array element""" description = base.Field('Description') """Description""" memory_device_type = base.MappedField('MemoryDeviceType', mappings.MEMORY_DEVICE_TYPE_MAP) memory_type = base.MappedField('MemoryType', mappings.MEMORY_TYPE_MAP) class MemoryCollection(base.ResourceCollectionBase): @property def _resource_type(self): return Memory def details(self): persistent_memory = False nvdimm_n = False logical_nvdimm_n = False for mem in self.get_members(): if mem.memory_type == sys_cons.MEMORY_TYPE_NVDIMM_N: persistent_memory = True nvdimm_n = True if (mem.memory_device_type == sys_cons.MEMORY_DEVICE_TYPE_LOGICAL): logical_nvdimm_n = True break return MemoryData(has_persistent_memory=persistent_memory, has_nvdimm_n=nvdimm_n, has_logical_nvdimm_n=logical_nvdimm_n) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/pci_device.py0000664000175000017500000000462400000000000027101 0ustar00zuulzuul00000000000000# Copyright 2017-2022 Hewlett Packard Enterprise Development LP # # 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 sushy.resources import base from sushy import utils as sushy_utils LOG = logging.getLogger(__name__) CLASSCODE_FOR_GPU_DEVICES = [3] SUBCLASSCODE_FOR_GPU_DEVICES = [0, 1, 2, 128] class PCIDevice(base.ResourceBase): identity = base.Field('Id', required=True) name = base.Field('Name') class_code = base.Field('ClassCode') sub_class_code = base.Field('SubclassCode') odata_id = base.Field('@odata.id') vendor_id = base.Field('VendorID') @property @sushy_utils.cache_it def nic_capacity(self): if self.name: for item in self.name.split(): if 'Gb' in item: capacity = item.strip('Gb') return int(capacity) if capacity.isdigit() else 0 return 0 class PCIDeviceCollection(base.ResourceCollectionBase): @property def _resource_type(self): return PCIDevice @property @sushy_utils.cache_it def gpu_devices(self): """Returns the list of gpu devices uris""" gpu_devices = [] for member in self.get_members(): if member.class_code in CLASSCODE_FOR_GPU_DEVICES: if member.sub_class_code in SUBCLASSCODE_FOR_GPU_DEVICES: gpu_devices.append(member.odata_id) return gpu_devices @property @sushy_utils.cache_it def max_nic_capacity(self): """Gets the maximum NIC capacity""" return str(max([m.nic_capacity for m in self.get_members()])) + 'Gb' @property @sushy_utils.cache_it def vendor_id(self): """Returns the vendor_id dictionary""" vendor_id = {} for member in self.get_members(): if member.odata_id in self.gpu_devices: vendor_id.update({member.identity: member.vendor_id}) return vendor_id ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/secure_boot.py0000664000175000017500000001077600000000000027325 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' from sushy.resources import base from proliantutils import exception from proliantutils import log from proliantutils.redfish.resources.system import mappings LOG = log.get_logger(__name__) class ResetKeysActionField(base.CompositeField): allowed_values = base.Field('ResetKeysType@Redfish.AllowableValues', adapter=list) target_uri = base.Field('target', required=True) class ActionsField(base.CompositeField): reset_keys = ResetKeysActionField('#SecureBoot.ResetKeys') class SecureBoot(base.ResourceBase): """A class representing SecureBoot resource""" name = base.Field('Name') """secure boot resource name""" current_boot = base.MappedField( 'SecureBootCurrentBoot', mappings.SECUREBOOT_CURRENT_BOOT_MAP) """current secure boot""" enable = base.Field('SecureBootEnable', required=True) """secure boot enable""" # Note(deray): May need mapping if this gets used. mode = base.Field('SecureBootMode') """secure boot mode""" _actions = ActionsField('Actions', required=True) def enable_secure_boot(self, secure_boot_enable): """Enable/Disable secure boot on the server. Caller needs to reset the server after issuing this command to bring this into effect. :param secure_boot_enable: True, if secure boot needs to be enabled for next boot, else False. :raises: InvalidInputError, if the validation of the input fails :raises: SushyError, on an error from iLO. """ if not isinstance(secure_boot_enable, bool): msg = ('The parameter "%(parameter)s" value "%(value)s" is ' 'invalid. Valid values are: True/False.' % {'parameter': 'secure_boot_enable', 'value': secure_boot_enable}) raise exception.InvalidInputError(msg) self._conn.patch(self.path, data={'SecureBootEnable': secure_boot_enable}) def _get_reset_keys_action_element(self): reset_keys_action = self._actions.reset_keys if not reset_keys_action: raise exception.MissingAttributeError( attribute='Actions/#SecureBoot.ResetKeys', resource=self.path) return reset_keys_action def get_allowed_reset_keys_values(self): """Get the allowed values for resetting the system. :returns: A set with the allowed values. """ reset_keys_action = self._get_reset_keys_action_element() if not reset_keys_action.allowed_values: LOG.debug('Could not figure out the allowed values for the ' 'reset keys in secure boot %s', self.path) return set(mappings.SECUREBOOT_RESET_KEYS_MAP_REV) return set([mappings.SECUREBOOT_RESET_KEYS_MAP[v] for v in set(mappings.SECUREBOOT_RESET_KEYS_MAP). intersection(reset_keys_action.allowed_values)]) def reset_keys(self, target_value): """Resets the secure boot keys. :param target_value: The target value to be set. :raises: InvalidInputError, if the target value is not allowed. :raises: SushyError, on an error from iLO. """ valid_keys_resets = self.get_allowed_reset_keys_values() if target_value not in valid_keys_resets: msg = ('The parameter "%(parameter)s" value "%(target_value)s" is ' 'invalid. Valid values are: %(valid_keys_reset_values)s' % {'parameter': 'target_value', 'target_value': target_value, 'valid_keys_reset_values': valid_keys_resets}) raise exception.InvalidInputError(msg) value = mappings.SECUREBOOT_RESET_KEYS_MAP_REV[target_value] target_uri = ( self._get_reset_keys_action_element().target_uri) self._conn.post(target_uri, data={'ResetKeysType': value}) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/smart_storage_config.py0000664000175000017500000002077000000000000031206 0ustar00zuulzuul00000000000000# Copyright 2018 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from sushy.resources import base from proliantutils import exception from proliantutils.hpssa import constants from proliantutils.hpssa import manager from proliantutils import log from proliantutils.redfish.resources.system.storage import \ constants as storage_const from proliantutils.redfish.resources.system.storage import \ mappings as storage_map LOG = log.get_logger(__name__) class LogicalDriveListField(base.ListField): data_drives = base.Field("DataDrives", adapter=list, default=[]) volume_unique_identifier = base.Field('VolumeUniqueIdentifier', required=True) class HPESmartStorageConfig(base.ResourceBase): """Class that defines the functionality for SmartSorageConfig Resources.""" controller_id = base.Field("Id") smart_storage_config_message = base.Field(['@Redfish.Settings', 'Messages']) logical_drives = LogicalDriveListField("LogicalDrives", default=[]) location = base.Field("Location") physical_drives = base.Field("PhysicalDrives", adapter=list, default=None) settings_uri = base.Field(["@Redfish.Settings", "SettingsObject", "@odata.id"]) def _generic_format(self, raid_config, controller=None): """Convert redfish data of current raid config to generic format. :param raid_config: Raid configuration dictionary :param controller: Array controller model in post_create read else None :returns: current raid config. """ logical_drives = raid_config["LogicalDrives"] logical_disks = [] controller = controller for ld in logical_drives: prop = {'size_gb': ld['CapacityGiB'], 'raid_level': ld['Raid'].strip('Raid'), 'root_device_hint': { 'wwn': '0x' + ld['VolumeUniqueIdentifier']}, 'controller': controller, 'physical_disks': ld['DataDrives'], 'volume_name': ld['LogicalDriveName']} logical_disks.append(prop) return logical_disks def _check_smart_storage_message(self): """Check for smart storage message. :returns: result, raid_message """ ssc_mesg = self.smart_storage_config_message result = True raid_message = "" for element in ssc_mesg: if "Success" not in element['MessageId']: result = False raid_message = element['MessageId'] return result, raid_message def read_raid(self, controller=None): """Get the current RAID configuration from the system. :param controller: If controller model its post-create read else post-delete :returns: current raid config. """ if controller: if not self.logical_drives: msg = ('No logical drives found on the controller') LOG.debug(msg) raise exception.IloLogicalDriveNotFoundError(msg) raid_op = 'create_raid' else: raid_op = 'delete_raid' result, raid_message = self._check_smart_storage_message() if result: configured_raid_settings = self._conn.get(self.settings_uri) raid_data = { 'logical_disks': self._generic_format( configured_raid_settings.json(), controller=controller)} return raid_data else: if self.physical_drives is None or not raid_message: # This controller is not configured or controller # not used in raid operation return else: msg = ('Failed to perform the %(opr)s operation ' 'successfully. Error - %(error)s' % {'opr': raid_op, 'error': str(raid_message)}) raise exception.IloError(msg) def delete_raid(self): """Clears the RAID configuration from the system. """ if not self.logical_drives: msg = ('No logical drives found on the controller ' '%(controller)s' % {'controller': str(self.controller_id)}) LOG.debug(msg) raise exception.IloLogicalDriveNotFoundError(msg) lds = [{ 'Actions': [{"Action": "LogicalDriveDelete"}], 'VolumeUniqueIdentifier': logical_drive.volume_unique_identifier} for logical_drive in self.logical_drives] data = {'LogicalDrives': lds, 'DataGuard': 'Permissive'} self._conn.put(self.settings_uri, data=data) def create_raid(self, raid_config): """Create the raid configuration on the hardware. :param raid_config: A dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100, 'physical_disks': ['6I:1:5'], 'controller': 'HPE Smart Array P408i-a SR Gen10'}, ]} """ manager.validate(raid_config) logical_drives = raid_config['logical_disks'] redfish_logical_disk = [] for ld in logical_drives: ld_attr = {"Raid": "Raid" + ld["raid_level"]} ld_attr[ "CapacityGiB"] = -1 if ld[ "size_gb"] == "MAX" else int(ld["size_gb"]) if 'physical_disks' in ld: ld_attr["DataDrives"] = ld["physical_disks"] else: datadrives = {} if 'number_of_physical_disks' in ld: datadrives["DataDriveCount"] = ( ld["number_of_physical_disks"]) else: datadrives["DataDriveCount"] = (constants. RAID_LEVEL_MIN_DISKS [ld["raid_level"]]) if 'disk_type' in ld: datadrives["DataDriveMediaType"] = ld["disk_type"] if 'interface_type' in ld: datadrives["DataDriveInterfaceType"] = ld["interface_type"] ld_attr["DataDrives"] = datadrives if 'volume_name' in ld: ld_attr["LogicalDriveName"] = ld["volume_name"] redfish_logical_disk.append(ld_attr) data = { "DataGuard": "Disabled", "LogicalDrives": redfish_logical_disk } self._conn.put(self.settings_uri, data=data) def disk_erase(self, disks, disk_type, pattern): """Performs out of band sanitize disk erase on the hardware. :param disks: List of location of disk drives. :param disk_type: Media type of disk drives. :param pattern: Erase pattern, if nothing passed default ('overwrite' for 'HDD', and 'block' for 'SSD') will be used. """ hdd = storage_map.MEDIA_TYPE_MAP_REV[storage_const.MEDIA_TYPE_HDD] if not pattern: erase_pattern = storage_const.ERASE_PATTERN_OVERWRITE if ( disk_type == hdd) else storage_const.ERASE_PATTERN_BLOCK else: erase_pattern = storage_map.DISK_ERASE_PATTERN[pattern] data = {"Actions": [{"Action": "PhysicalDriveErase", "ErasePattern": erase_pattern, "PhysicalDriveList": disks}], "DataGuard": "Disabled"} self._conn.patch(self.settings_uri, data=data) def get_drives_has_raid(self): """Return the list of physical drives have raid :return: List of disk drives """ drives = [] for ld in self.logical_drives: drives.extend(ld.data_drives) return drives ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2426646 proliantutils-2.16.0/proliantutils/redfish/resources/system/storage/0000775000175000017500000000000000000000000026073 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/storage/__init__.py0000664000175000017500000000000000000000000030172 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/storage/array_controller.py0000664000175000017500000001233200000000000032027 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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 sushy.resources import base from sushy import utils as sushy_utils from proliantutils.redfish.resources.system.storage import logical_drive from proliantutils.redfish.resources.system.storage import physical_drive from proliantutils.redfish import utils LOG = logging.getLogger(__name__) class HPEArrayController(base.ResourceBase): """This class represents the HPEArrayControllers resource""" identity = base.Field('Id') """The identity string""" name = base.Field('Name') """The name of the resource or array element""" description = base.Field('Description') """Description""" model = base.Field('Model') """Controller model""" location = base.Field('Location') """Controller slot location""" @property @sushy_utils.cache_it def logical_drives(self): """Gets the resource HPELogicalDriveCollection of ArrayControllers""" return logical_drive.HPELogicalDriveCollection( self._conn, utils.get_subresource_path_by( self, ['Links', 'LogicalDrives']), redfish_version=self.redfish_version) @property @sushy_utils.cache_it def physical_drives(self): """Gets the resource HPEPhysicalDriveCollection of ArrayControllers""" return physical_drive.HPEPhysicalDriveCollection( self._conn, utils.get_subresource_path_by( self, ['Links', 'PhysicalDrives']), redfish_version=self.redfish_version) class HPEArrayControllerCollection(base.ResourceCollectionBase): """This class represents the collection of HPEArrayControllers""" @property def _resource_type(self): return HPEArrayController @property @sushy_utils.cache_it def logical_drives_maximum_size_mib(self): """Gets the biggest logical drive :returns the size in MiB. """ return utils.max_safe([member.logical_drives.maximum_size_mib for member in self.get_members()]) @property @sushy_utils.cache_it def physical_drives_maximum_size_mib(self): """Gets the biggest disk :returns the size in MiB. """ return utils.max_safe([member.physical_drives.maximum_size_mib for member in self.get_members()]) @property @sushy_utils.cache_it def has_ssd(self): """Return true if any of the drive under ArrayControllers is ssd""" for member in self.get_members(): if member.physical_drives.has_ssd: return True return False @property @sushy_utils.cache_it def has_rotational(self): """Return true if any of the drive under ArrayControllers is ssd""" for member in self.get_members(): if member.physical_drives.has_rotational: return True return False @property @sushy_utils.cache_it def logical_raid_levels(self): """Gets the raid level for each logical volume :returns the set of list of raid levels configured """ lg_raid_lvls = set() for member in self.get_members(): lg_raid_lvls.update(member.logical_drives.logical_raid_levels) return lg_raid_lvls @property @sushy_utils.cache_it def drive_rotational_speed_rpm(self): """Gets the set of rotational speed of the HDD drives""" drv_rot_speed_rpm = set() for member in self.get_members(): drv_rot_speed_rpm.update( member.physical_drives.drive_rotational_speed_rpm) return drv_rot_speed_rpm @property @sushy_utils.cache_it def get_default_controller(self): """Gets default array controller :returns default array controller """ return self.get_members()[0] def array_controller_by_location(self, location): """Returns array controller instance by location :returns Instance of array controller """ for member in self.get_members(): if member.location == location: return member def array_controller_by_model(self, model): """Returns array controller instance by model :returns Instance of array controller """ for member in self.get_members(): if member.model == model: return member def get_all_controllers_model(self): """Returns list of model of all array controllers :returns List of model of array controllers """ models = [] for member in self.get_members(): models.append(member.model) return models ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/storage/common.py0000664000175000017500000001616200000000000027743 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' import sushy from proliantutils import exception from proliantutils import log from proliantutils.redfish import utils LOG = log.get_logger(__name__) def _get_attribute_value_of(resource, attribute_name, default=None): """Gets the value of attribute_name from the resource It catches the exception, if any, while retrieving the value of attribute_name from resource and returns default. :param resource: The resource object :attribute_name: Property of the resource :returns the property value if no error encountered else return 0. """ try: return getattr(resource, attribute_name) except (sushy.exceptions.SushyError, exception.MissingAttributeError) as e: msg = (('The Redfish controller failed to get the ' 'attribute %(attribute)s from resource %(resource)s. ' 'Error %(error)s') % {'error': str(e), 'attribute': attribute_name, 'resource': resource.__class__.__name__}) LOG.debug(msg) return default def get_local_gb(system_obj): """Gets the largest volume or the largest disk :param system_obj: The HPESystem object. :returns the size in GB """ local_max_bytes = 0 logical_max_mib = 0 volume_max_bytes = 0 physical_max_mib = 0 drives_max_bytes = 0 simple_max_bytes = 0 # Gets the resources and properties # its quite possible for a system to lack the resource, hence its # URI may also be lacking. # Check if smart_storage resource exist at the system smart_resource = _get_attribute_value_of(system_obj, 'smart_storage') # Check if storage resource exist at the system storage_resource = _get_attribute_value_of(system_obj, 'storages') if smart_resource is not None: logical_max_mib = _get_attribute_value_of( smart_resource, 'logical_drives_maximum_size_mib', default=0) if storage_resource is not None: volume_max_bytes = _get_attribute_value_of( storage_resource, 'volumes_maximum_size_bytes', default=0) # Get the largest volume from the system. local_max_bytes = utils.max_safe([(logical_max_mib * 1024 * 1024), volume_max_bytes]) # if volume is not found, then traverse through the possible disk drives # and get the biggest disk. if local_max_bytes == 0: if smart_resource is not None: physical_max_mib = _get_attribute_value_of( smart_resource, 'physical_drives_maximum_size_mib', default=0) if storage_resource is not None: drives_max_bytes = _get_attribute_value_of( storage_resource, 'drives_maximum_size_bytes', default=0) # Check if the SimpleStorage resource exist at the system. simple_resource = _get_attribute_value_of(system_obj, 'simple_storages') if simple_resource is not None: simple_max_bytes = _get_attribute_value_of( simple_resource, 'maximum_size_bytes', default=0) local_max_bytes = utils.max_safe([(physical_max_mib * 1024 * 1024), drives_max_bytes, simple_max_bytes]) # Convert the received size to GB and reduce the value by 1 Gb as # ironic requires the local_gb to be returned 1 less than actual size. local_gb = 0 if local_max_bytes > 0: local_gb = int(local_max_bytes / (1024 * 1024 * 1024)) - 1 else: msg = ('The maximum size for the hard disk or logical ' 'volume could not be determined.') LOG.debug(msg) return local_gb def has_ssd(system_obj): """Gets if the system has any drive as SSD drive :param system_obj: The HPESystem object. :returns True if system has SSD drives. """ smart_value = False storage_value = False smart_resource = _get_attribute_value_of(system_obj, 'smart_storage') if smart_resource is not None: smart_value = _get_attribute_value_of( smart_resource, 'has_ssd', default=False) if smart_value: return smart_value # Its returned before just to avoid hitting BMC if we have # already got the SSD device above. storage_resource = _get_attribute_value_of(system_obj, 'storages') if storage_resource is not None: storage_value = _get_attribute_value_of( storage_resource, 'has_ssd', default=False) return storage_value def has_rotational(system_obj): """Gets if the system has any drive as HDD drive :param system_obj: The HPESystem object. :returns True if system has HDD drives. """ smart_value = False storage_value = False smart_resource = _get_attribute_value_of(system_obj, 'smart_storage') if smart_resource is not None: smart_value = _get_attribute_value_of( smart_resource, 'has_rotational', default=False) if smart_value: return smart_value # Its returned before just to avoid hitting BMC if we have # already got the HDD device above. storage_resource = _get_attribute_value_of(system_obj, 'storages') if storage_resource is not None: storage_value = _get_attribute_value_of( storage_resource, 'has_rotational', default=False) return storage_value def has_nvme_ssd(system_obj): """Gets if the system has any drive as NVMe SSD drive :param system_obj: The HPESystem object. :returns True if system has SSD drives and protocol is NVMe. """ storage_value = False storage_resource = _get_attribute_value_of(system_obj, 'storages') if storage_resource is not None: storage_value = _get_attribute_value_of( storage_resource, 'has_nvme_ssd', default=False) return storage_value def get_drive_rotational_speed_rpm(system_obj): """Gets the set of rotational speed rpms of the disks. :param system_obj: The HPESystem object. :returns the set of rotational speed rpms of the HDD devices. """ speed = set() smart_resource = _get_attribute_value_of(system_obj, 'smart_storage') if smart_resource is not None: speed.update(_get_attribute_value_of( smart_resource, 'drive_rotational_speed_rpm', default=set())) storage_resource = _get_attribute_value_of(system_obj, 'storages') if storage_resource is not None: speed.update(_get_attribute_value_of( storage_resource, 'drive_rotational_speed_rpm', default=set())) return speed ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/storage/constants.py0000664000175000017500000000424100000000000030462 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # All Rights Reserved. # # 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. # Supported device protocols # Taken from http://redfish.dmtf.org/schemas/Storage.v1_2_0.json PROTOCOL_PCIe = "PCI Express (Vendor Proprietary)." PROTOCOL_AHCI = "Advanced Host Controller Interface." PROTOCOL_UHCI = "Universal Host Controller Interface." PROTOCOL_SAS = "Serial Attached SCSI." PROTOCOL_SATA = "Serial AT Attachment." PROTOCOL_USB = "Universal Serial Bus." PROTOCOL_NVMe = "Non-Volatile Memory Express." PROTOCOL_FC = "Fibre Channel." PROTOCOL_iSCSI = "Internet SCSI." PROTOCOL_FCoE = "Fibre Channel over Ethernet." PROTOCOL_FCP = "Fibre Channel Protocol for SCSI." PROTOCOL_FICON = "FIbre CONnection (FICON)." PROTOCOL_NVMeOverFabrics = "NVMe over Fabrics." PROTOCOL_SMB = "Server Message Block (aka CIFS Common Internet File System)." PROTOCOL_NFSv3 = "Network File System version 3." PROTOCOL_NFSv4 = "Network File System version 4." PROTOCOL_HTTP = "Hypertext Transport Protocol." PROTOCOL_HTTPS = "Secure Hypertext Transport Protocol." PROTOCOL_FTP = "File Transfer Protocol." PROTOCOL_SFTP = "Secure File Transfer Protocol." # Media types MEDIA_TYPE_SSD = "SSD device" MEDIA_TYPE_HDD = "HDD device" # RAID level constants RAID_0 = 'raid 0' RAID_1 = 'raid 1' RAID_5 = 'raid 5' RAID_1_0 = 'raid 1+0' RAID_5_0 = 'raid 5+0' RAID_6 = 'raid 6' RAID_6_0 = 'raid 6+0' RAID_1ADM = 'raid 1adm' RAID_10ADM = 'raid_10adm' # Erase patterns ERASE_PATTERN_BLOCK = 'SanitizeRestrictedBlockErase' ERASE_PATTERN_OVERWRITE = 'SanitizeRestrictedOverwrite' ERASE_PATTERN_CRYPTO = 'SanitizeRestrictedCryptoScramble' ERASE_PATTERN_ZERO = 'OnePass' ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/storage/drive.py0000664000175000017500000000274100000000000027562 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. """ There is no explicit collection for Drives. That said, a URI link as "/redfish/v1/Systems/1/Storage/1/Drives" will be an invalid URI. """ from sushy.resources import base from proliantutils.redfish.resources.system.storage import mappings class Drive(base.ResourceBase): """This class represents the Drive resource""" capacity_bytes = base.Field('CapacityBytes', adapter=int) """The size in bytes of this Drive""" media_type = base.MappedField('MediaType', mappings.MEDIA_TYPE_MAP) """The type of media contained in this drive""" protocol = base.MappedField('Protocol', mappings.DEVICE_PROTOCOLS_MAP) """The protocol this drive is using to communicate to the storage controller.""" rotation_speed_rpm = base.Field('RotationSpeedRPM', adapter=int) """The rotation speed of this Drive in Revolutions per Minute (RPM).""" ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/storage/logical_drive.py0000664000175000017500000000373600000000000031261 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from sushy.resources import base from sushy import utils as sushy_utils from proliantutils.redfish.resources.system.storage import mappings from proliantutils.redfish import utils class HPELogicalDrive(base.ResourceBase): """This class represents the LogicalDrives resource""" identity = base.Field('Id') name = base.Field('Name') description = base.Field('Description') capacity_mib = base.Field('CapacityMiB', adapter=int) raid = base.MappedField('Raid', mappings.RAID_LEVEL_MAP) class HPELogicalDriveCollection(base.ResourceCollectionBase): """This class represents the collection of LogicalDrives resource""" @property def _resource_type(self): return HPELogicalDrive @property @sushy_utils.cache_it def maximum_size_mib(self): """Gets the biggest logical drive :returns size in MiB. """ return utils.max_safe([member.capacity_mib for member in self.get_members()]) @property @sushy_utils.cache_it def logical_raid_levels(self): """Gets the raid level for each logical volume :returns the set of list of raid levels configured. """ lg_raid_lvls = set() for member in self.get_members(): lg_raid_lvls.add(mappings.RAID_LEVEL_MAP_REV.get(member.raid)) return lg_raid_lvls ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/storage/mappings.py0000664000175000017500000000433400000000000030267 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from sushy import utils from proliantutils.redfish.resources.system.storage import constants DEVICE_PROTOCOLS_MAP = { 'PCIe': constants.PROTOCOL_PCIe, 'AHCI': constants.PROTOCOL_AHCI, 'UHCI': constants.PROTOCOL_UHCI, 'SAS': constants.PROTOCOL_SAS, 'SATA': constants.PROTOCOL_SATA, 'USB': constants.PROTOCOL_USB, 'NVMe': constants.PROTOCOL_NVMe, 'FC': constants.PROTOCOL_FC, 'iSCSI': constants.PROTOCOL_iSCSI, 'FCoE': constants.PROTOCOL_FCoE, 'FCP': constants.PROTOCOL_FCP, 'FICON': constants.PROTOCOL_FICON, 'NVMeOverFabrics': constants.PROTOCOL_NVMeOverFabrics, 'SMB': constants.PROTOCOL_SMB, 'NFSv3': constants.PROTOCOL_NFSv3, 'NFSv4': constants.PROTOCOL_NFSv4, 'HTTP': constants.PROTOCOL_HTTP, 'HTTPS': constants.PROTOCOL_HTTPS, 'FTP': constants.PROTOCOL_FTP, 'SFTP': constants.PROTOCOL_SFTP } MEDIA_TYPE_MAP = { 'SSD': constants.MEDIA_TYPE_SSD, 'HDD': constants.MEDIA_TYPE_HDD } MEDIA_TYPE_MAP_REV = ( utils.revert_dictionary(MEDIA_TYPE_MAP)) RAID_LEVEL_MAP = { '0': constants.RAID_0, '1': constants.RAID_1, '5': constants.RAID_5, '10': constants.RAID_1_0, '50': constants.RAID_5_0, '6': constants.RAID_6, '60': constants.RAID_6_0, '1ADM': constants.RAID_1ADM, '10ADM': constants.RAID_10ADM, } RAID_LEVEL_MAP_REV = ( utils.revert_dictionary(RAID_LEVEL_MAP)) DISK_ERASE_PATTERN = { 'block': constants.ERASE_PATTERN_BLOCK, 'overwrite': constants.ERASE_PATTERN_OVERWRITE, 'crypto': constants.ERASE_PATTERN_CRYPTO, 'zero': constants.ERASE_PATTERN_ZERO } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/storage/physical_drive.py0000664000175000017500000001057500000000000031462 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from sushy.resources import base from sushy import utils as sushy_utils from proliantutils.redfish.resources.system.storage import constants from proliantutils.redfish.resources.system.storage import mappings from proliantutils.redfish import utils class HPEPhysicalDrive(base.ResourceBase): """This class represents the HPEPhysicalDrives resource""" identity = base.Field('Id', required=True) name = base.Field('Name') description = base.Field('Description') disk_erase_reason = base.Field('DiskDriveStatusReasons', adapter=list) capacity_mib = base.Field('CapacityMiB', adapter=int) capacity_gb = base.Field('CapacityGB', adapter=int) location = base.Field('Location') media_type = base.MappedField('MediaType', mappings.MEDIA_TYPE_MAP) rotational_speed_rpm = base.Field('RotationalSpeedRpm', adapter=int) serial_number = base.Field('SerialNumber') class HPEPhysicalDriveCollection(base.ResourceCollectionBase): """This class represents the collection of HPEPhysicalDrives resource""" @property def _resource_type(self): return HPEPhysicalDrive @property @sushy_utils.cache_it def maximum_size_mib(self): """Gets the biggest physical drive :returns size in MiB. """ return utils.max_safe([member.capacity_mib for member in self.get_members()]) @property @sushy_utils.cache_it def has_ssd(self): """Return true if the drive is ssd""" for member in self.get_members(): if member.media_type == constants.MEDIA_TYPE_SSD: return True return False @property def has_disk_erase_completed(self): """Return true if disk erase completed in all drives""" for member in self.get_members(): if 'EraseCompleted' not in member.disk_erase_reason: return False return True @property @sushy_utils.cache_it def has_rotational(self): """Return true if the drive is HDD""" for member in self.get_members(): if member.media_type == constants.MEDIA_TYPE_HDD: return True return False @property @sushy_utils.cache_it def drive_rotational_speed_rpm(self): """Gets the set of rotational speed of the HDD drives""" drv_rot_speed_rpm = set() for member in self.get_members(): if member.rotational_speed_rpm is not None: drv_rot_speed_rpm.add(member.rotational_speed_rpm) return drv_rot_speed_rpm def get_all_hdd_drives_locations(self): """Returns a list of location of all HDD drives :returns: List of HDD drives """ hdds = [] for member in self.get_members(): if member.media_type == constants.MEDIA_TYPE_HDD: hdds.append(member.location) return hdds def get_all_ssd_drives_locations(self): """Returns a list of location of all SSD drives :returns: List of SSD drives """ ssds = [] for member in self.get_members(): if member.media_type == constants.MEDIA_TYPE_SSD: ssds.append(member.location) return ssds def get_disk_properties_by_drive_location(self, location): """Returns disk property of physical drive :returns: Disk property of drive. """ for member in self.get_members(): if member.location == location: prop = { 'Serial number': member.serial_number, 'Size(GB)': member.capacity_gb, 'Media type': mappings.MEDIA_TYPE_MAP_REV[ member.media_type], 'Location': member.location} return prop ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/storage/simple_storage.py0000664000175000017500000000360200000000000031463 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from sushy.resources import base from sushy import utils as sushy_utils from proliantutils.redfish import utils class SimpleStorage(base.ResourceBase): """This class represents the SimpleStorage resource""" identity = base.Field('Id', required=True) """The SimpleStorage identity string""" name = base.Field('Name') """The name of the resource or array element""" description = base.Field('Description') """Description""" devices = base.Field('Devices') """The storage devices associated with this resource""" @property @sushy_utils.cache_it def maximum_size_bytes(self): """Gets the biggest disk drive :returns size in bytes. """ return utils.max_safe( [device.get('CapacityBytes') for device in self.devices if device.get('CapacityBytes') is not None]) class SimpleStorageCollection(base.ResourceCollectionBase): @property def _resource_type(self): return SimpleStorage @property @sushy_utils.cache_it def maximum_size_bytes(self): """Gets the biggest disk drive :returns size in bytes. """ return utils.max_safe([member.maximum_size_bytes for member in self.get_members()]) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/storage/smart_storage.py0000664000175000017500000000567200000000000031331 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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 sushy.resources import base from sushy import utils as sushy_utils from proliantutils.redfish.resources.system.storage import array_controller from proliantutils.redfish import utils LOG = logging.getLogger(__name__) class HPESmartStorage(base.ResourceBase): """This class represents the HPE OEM SmartStorage resource""" name = base.Field('Name') """The name of the resource or array element""" description = base.Field('Description') """Description""" @property @sushy_utils.cache_it def array_controllers(self): """This property gets the list of instances for array controllers This property gets the list of instances for array controllers :returns: a list of instances of array controllers. """ return array_controller.HPEArrayControllerCollection( self._conn, utils.get_subresource_path_by( self, ['Links', 'ArrayControllers']), redfish_version=self.redfish_version) @property @sushy_utils.cache_it def logical_drives_maximum_size_mib(self): """Gets the biggest logical drive :Returns the size in MiB. """ return self.array_controllers.logical_drives_maximum_size_mib @property @sushy_utils.cache_it def physical_drives_maximum_size_mib(self): """Gets the biggest disk drive :Returns the size in MiB. """ return self.array_controllers.physical_drives_maximum_size_mib @property @sushy_utils.cache_it def has_ssd(self): """Return true if any of the drive under ArrayControllers is ssd""" return self.array_controllers.has_ssd @property @sushy_utils.cache_it def has_rotational(self): """Return true if any of the drive under ArrayControllers is HDD""" return self.array_controllers.has_rotational @property @sushy_utils.cache_it def logical_raid_levels(self): """Gets the raid level for each logical volume :returns the set of list of raid levels configured. """ return self.array_controllers.logical_raid_levels @property @sushy_utils.cache_it def drive_rotational_speed_rpm(self): """Gets the list of rotational speed of the HDD drives""" return self.array_controllers.drive_rotational_speed_rpm ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/storage/storage.py0000664000175000017500000001265400000000000030121 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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 sushy.resources import base from sushy import utils as sushy_utils from proliantutils.redfish.resources.system.storage import constants from proliantutils.redfish.resources.system.storage import drive as sys_drives from proliantutils.redfish.resources.system.storage \ import volume as sys_volumes from proliantutils.redfish import utils LOG = logging.getLogger(__name__) class Storage(base.ResourceBase): """This class represents the Storage resource""" identity = base.Field('Id', required=True) """The Storage identity string""" name = base.Field('Name') """The name of the resource or array element""" description = base.Field('Description') """Description""" drives = base.Field('Drives') """The set of drives attached to the storage controllers""" @property @sushy_utils.cache_it def volumes(self): """This property prepares the list of volumes :return a list of volumes. """ return sys_volumes.VolumeCollection( self._conn, utils.get_subresource_path_by(self, 'Volumes'), redfish_version=self.redfish_version) def _drives_list(self): """Gets the list of drives :return a list of drives. """ drives_list = [] for member in self.drives: drives_list.append(sys_drives.Drive( self._conn, member.get('@odata.id'), self.redfish_version)) return drives_list @property @sushy_utils.cache_it def drives_maximum_size_bytes(self): """Gets the biggest disk :returns the size in MiB. """ return utils.max_safe([member.capacity_bytes for member in self._drives_list()]) @property @sushy_utils.cache_it def has_ssd(self): """Return true if any of the drive is ssd""" for member in self._drives_list(): if member.media_type == constants.MEDIA_TYPE_SSD: return True return False @property @sushy_utils.cache_it def has_rotational(self): """Return true if any of the drive is HDD""" for member in self._drives_list(): if member.media_type == constants.MEDIA_TYPE_HDD: return True return False @property @sushy_utils.cache_it def has_nvme_ssd(self): """Return True if the drive is SSD and protocol is NVMe""" for member in self._drives_list(): if (member.media_type == constants.MEDIA_TYPE_SSD and member.protocol == constants.PROTOCOL_NVMe): return True return False @property @sushy_utils.cache_it def drive_rotational_speed_rpm(self): """Gets set of rotational speed of the disks""" drv_rot_speed_rpm = set() for member in self._drives_list(): if member.rotation_speed_rpm is not None: drv_rot_speed_rpm.add(member.rotation_speed_rpm) return drv_rot_speed_rpm class StorageCollection(base.ResourceCollectionBase): """This class represents the collection of Storage resource""" @property def _resource_type(self): return Storage @property @sushy_utils.cache_it def volumes_maximum_size_bytes(self): """Gets the biggest logical drive :returns the size in MiB. """ return utils.max_safe([member.volumes.maximum_size_bytes for member in self.get_members()]) @property @sushy_utils.cache_it def drives_maximum_size_bytes(self): """Gets the biggest disk :returns the size in MiB. """ return utils.max_safe([member.drives_maximum_size_bytes for member in self.get_members()]) @property @sushy_utils.cache_it def has_ssd(self): """Return true if Storage has any drive as ssd""" for member in self.get_members(): if member.has_ssd: return True return False @property @sushy_utils.cache_it def has_rotational(self): """Return true if Storage has any drive as HDD""" for member in self.get_members(): if member.has_rotational: return True return False @property @sushy_utils.cache_it def has_nvme_ssd(self): """Return True if Storage has SSD drive and protocol is NVMe""" for member in self.get_members(): if member.has_nvme_ssd: return True return False @property @sushy_utils.cache_it def drive_rotational_speed_rpm(self): """Gets set of rotational speed of the disks""" drv_rot_speed_rpm = set() for member in self.get_members(): drv_rot_speed_rpm.update(member.drive_rotational_speed_rpm) return drv_rot_speed_rpm ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/storage/volume.py0000664000175000017500000000272200000000000027757 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from sushy.resources import base from sushy import utils as sushy_utils from proliantutils.redfish import utils class Volume(base.ResourceBase): """This class represents the Volume resource""" identity = base.Field('Id', required=True) """The processor identity string""" capacity_bytes = base.Field('CapacityBytes', adapter=int) """The size in bytes of this Volume""" class VolumeCollection(base.ResourceCollectionBase): """This class represents the collection of Volume resource""" @property def _resource_type(self): return Volume @property @sushy_utils.cache_it def maximum_size_bytes(self): """Gets the biggest volume :returns size in bytes. """ return utils.max_safe([member.capacity_bytes for member in self.get_members()]) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/system.py0000664000175000017500000007253200000000000026336 0ustar00zuulzuul00000000000000# Copyright 2018 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' import re import sushy from sushy.resources import base from sushy.resources.system import system from sushy import utils as sushy_utils from proliantutils import exception from proliantutils import log from proliantutils.redfish.resources.system import bios from proliantutils.redfish.resources.system import constants from proliantutils.redfish.resources.system import ethernet_interface from proliantutils.redfish.resources.system import mappings from proliantutils.redfish.resources.system import memory from proliantutils.redfish.resources.system import pci_device from proliantutils.redfish.resources.system import secure_boot from proliantutils.redfish.resources.system import smart_storage_config from proliantutils.redfish.resources.system.storage import \ constants as storage_const from proliantutils.redfish.resources.system.storage import \ mappings as storage_map from proliantutils.redfish.resources.system.storage import simple_storage from proliantutils.redfish.resources.system.storage import \ smart_storage as hpe_smart_storage from proliantutils.redfish.resources.system.storage import storage from proliantutils.redfish import utils LOG = log.get_logger(__name__) PERSISTENT_BOOT_DEVICE_MAP = { 'CDROM': sushy.BOOT_SOURCE_TARGET_CD, 'NETWORK': sushy.BOOT_SOURCE_TARGET_PXE, 'ISCSI': sushy.BOOT_SOURCE_TARGET_UEFI_TARGET, 'HDD': sushy.BOOT_SOURCE_TARGET_HDD, 'UEFIHTTP': sushy.BOOT_SOURCE_TARGET_UEFI_HTTP } class PowerButtonActionField(base.CompositeField): allowed_values = base.Field('PushType@Redfish.AllowableValues', adapter=list) target_uri = base.Field('target', required=True) class OneButtonSecureEraseActionField(base.CompositeField): target_uri = base.Field('target', required=True) class HpeActionsField(base.CompositeField): computer_system_ext_powerbutton = ( PowerButtonActionField('#HpeComputerSystemExt.PowerButton')) computer_system_ext_one_button_secure_erase = ( OneButtonSecureEraseActionField( '#HpeComputerSystemExt.SecureSystemErase')) class HPESystem(system.System): """Class that extends the functionality of System resource class This class extends the functionality of System resource class from sushy """ model = base.Field(['Model']) rom_version = base.Field(['Oem', 'Hpe', 'Bios', 'Current', 'VersionString']) uefi_target_override_devices = (base.Field([ 'Boot', 'UefiTargetBootSourceOverride@Redfish.AllowableValues'], adapter=list)) smart_storage_config_identities = base.Field( ['Oem', 'Hpe', 'SmartStorageConfig'], adapter=sushy_utils.get_members_identities) supported_boot_mode = base.MappedField( ['Oem', 'Hpe', 'Bios', 'UefiClass'], mappings.SUPPORTED_BOOT_MODE, default=constants.SUPPORTED_LEGACY_BIOS_ONLY) """System supported boot mode.""" post_state = base.MappedField( ['Oem', 'Hpe', 'PostState'], mappings.POST_STATE_MAP, default=constants.POST_STATE_NULL) """System POST state""" _hpe_actions = HpeActionsField(['Oem', 'Hpe', 'Actions'], required=True) """Oem specific system extensibility actions""" def _get_hpe_push_power_button_action_element(self): push_action = self._hpe_actions.computer_system_ext_powerbutton if not push_action: raise exception.MissingAttributeError( attribute='Oem/Hpe/Actions/#HpeComputerSystemExt.PowerButton', resource=self.path) return push_action def _get_hpe_one_button_secure_erase_action_element(self): one_button_secure_erase_action = ( self._hpe_actions.computer_system_ext_one_button_secure_erase) if not one_button_secure_erase_action: raise exception.MissingAttributeError( attribute=( 'Oem/Hpe/Actions/#HpeComputerSystemExt.SecureSystemErase'), resource=self.path) return one_button_secure_erase_action def do_one_button_secure_erase(self): """Perform the one button secure erase on the hardware. The One-button secure erase process resets iLO and deletes all licenses stored there, resets BIOS settings, and deletes all AHS and warranty data stored on the system. It also erases supported non-volatile storage data and deletes any deployment settings profiles. :raises: IloError, on an error from iLO. """ try: target_uri = ( self._get_hpe_one_button_secure_erase_action_element(). target_uri) data = { "SystemROMAndiLOErase": True, "UserDataErase": True } self._conn.post(target_uri, data=data) except sushy.exceptions.SushyError as e: msg = ("The Redfish controller failed to perform one button " "secure erase operation on the hardware. Error: %(error)s" % {'error': str(e)}) raise exception.IloError(msg) def push_power_button(self, target_value): """Reset the system in hpe exclusive manner. :param target_value: The target value to be set. :raises: InvalidInputError, if the target value is not allowed. :raises: SushyError, on an error from iLO. """ if target_value not in mappings.PUSH_POWER_BUTTON_VALUE_MAP_REV: msg = ('The parameter "%(parameter)s" value "%(target_value)s" is ' 'invalid. Valid values are: %(valid_power_values)s' % {'parameter': 'target_value', 'target_value': target_value, 'valid_power_values': ( mappings.PUSH_POWER_BUTTON_VALUE_MAP_REV.keys())}) raise exception.InvalidInputError(msg) value = mappings.PUSH_POWER_BUTTON_VALUE_MAP_REV[target_value] target_uri = ( self._get_hpe_push_power_button_action_element().target_uri) self._conn.post(target_uri, data={'PushType': value}) @property @sushy_utils.cache_it def bios_settings(self): """Property to provide reference to `BIOSSettings` instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return bios.BIOSSettings( self._conn, utils.get_subresource_path_by(self, 'Bios'), redfish_version=self.redfish_version) def update_persistent_boot(self, devices=[], persistent=False): """Changes the persistent boot device order in BIOS boot mode for host Note: It uses first boot device from the devices and ignores rest. :param devices: ordered list of boot devices :param persistent: Boolean flag to indicate if the device to be set as a persistent boot device :raises: IloError, on an error from iLO. :raises: IloInvalidInputError, if the given input is not valid. """ device = PERSISTENT_BOOT_DEVICE_MAP.get(devices[0].upper()) if device == sushy.BOOT_SOURCE_TARGET_UEFI_TARGET: try: uefi_devices = self.uefi_target_override_devices iscsi_device = None for uefi_device in uefi_devices: if uefi_device is not None and 'iSCSI' in uefi_device: iscsi_device = uefi_device break if iscsi_device is None: msg = 'No UEFI iSCSI bootable device found on system.' raise exception.IloError(msg) except sushy.exceptions.SushyError as e: msg = ('Unable to get uefi target override devices. ' 'Error %s') % (str(e)) raise exception.IloError(msg) uefi_boot_settings = { 'Boot': {'UefiTargetBootSourceOverride': iscsi_device} } self._conn.patch(self.path, data=uefi_boot_settings) elif device is None: device = sushy.BOOT_SOURCE_TARGET_NONE tenure = (sushy.BOOT_SOURCE_ENABLED_CONTINUOUS if persistent else sushy.BOOT_SOURCE_ENABLED_ONCE) self.set_system_boot_source(device, enabled=tenure) @property @sushy_utils.cache_it def pci_devices(self): """Provides the collection of PCI devices It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return pci_device.PCIDeviceCollection( self._conn, utils.get_subresource_path_by( self, ['Oem', 'Hpe', 'Links', 'PCIDevices'])) @property @sushy_utils.cache_it def secure_boot(self): """Property to provide reference to `SecureBoot` instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return secure_boot.SecureBoot( self._conn, utils.get_subresource_path_by(self, 'SecureBoot'), redfish_version=self.redfish_version) def _get_hpe_sub_resource_collection_path(self, sub_res): path = None try: path = utils.get_subresource_path_by(self, sub_res) except exception.MissingAttributeError: path = utils.get_subresource_path_by( self, ['Oem', 'Hpe', 'Links', sub_res]) return path @property @sushy_utils.cache_it def ethernet_interfaces(self): """Provide reference to EthernetInterfacesCollection instance""" return ethernet_interface.EthernetInterfaceCollection( self._conn, self._get_hpe_sub_resource_collection_path('EthernetInterfaces'), redfish_version=self.redfish_version) @property @sushy_utils.cache_it def smart_storage(self): """This property gets the object for smart storage. This property gets the object for smart storage. There is no collection for smart storages. :returns: an instance of smart storage """ return hpe_smart_storage.HPESmartStorage( self._conn, utils.get_subresource_path_by( self, ['Oem', 'Hpe', 'Links', 'SmartStorage']), redfish_version=self.redfish_version) @property @sushy_utils.cache_it def storages(self): """This property gets the list of instances for Storages This property gets the list of instances for Storages :returns: a list of instances of Storages """ return storage.StorageCollection( self._conn, utils.get_subresource_path_by(self, 'Storage'), redfish_version=self.redfish_version) @property @sushy_utils.cache_it def simple_storages(self): """This property gets the list of instances for SimpleStorages :returns: a list of instances of SimpleStorages """ return simple_storage.SimpleStorageCollection( self._conn, utils.get_subresource_path_by(self, 'SimpleStorage'), redfish_version=self.redfish_version) @property @sushy_utils.cache_it def memory(self): """Property to provide reference to `MemoryCollection` instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return memory.MemoryCollection( self._conn, utils.get_subresource_path_by(self, 'Memory'), redfish_version=self.redfish_version) def get_smart_storage_config(self, smart_storage_config_url): """Returns a SmartStorageConfig Instance for each controller.""" return (smart_storage_config. HPESmartStorageConfig(self._conn, smart_storage_config_url, redfish_version=self.redfish_version)) def _get_smart_storage_config_by_controller_model(self, controller_model): """Returns a SmartStorageConfig Instance for controller by model. :returns: SmartStorageConfig Instance for controller """ ac = self.smart_storage.array_controllers.array_controller_by_model( controller_model) if ac: for ssc_id in self.smart_storage_config_identities: ssc_obj = self.get_smart_storage_config(ssc_id) if ac.location == ssc_obj.location: return ssc_obj def check_smart_storage_config_ids(self): """Check SmartStorageConfig controllers is there in hardware. :raises: IloError, on an error from iLO. """ if self.smart_storage_config_identities is None: msg = ('The Redfish controller failed to get the ' 'SmartStorageConfig controller configurations.') LOG.debug(msg) raise exception.IloError(msg) def delete_raid(self): """Delete the raid configuration on the hardware. Loops through each SmartStorageConfig controller and clears the raid configuration. :raises: IloError, on an error from iLO. """ self.check_smart_storage_config_ids() any_exceptions = [] ld_exc_count = 0 for config_id in self.smart_storage_config_identities: try: ssc_obj = self.get_smart_storage_config(config_id) ssc_obj.delete_raid() except exception.IloLogicalDriveNotFoundError: ld_exc_count += 1 except sushy.exceptions.SushyError as e: any_exceptions.append((config_id, str(e))) if any_exceptions: msg = ('The Redfish controller failed to delete the ' 'raid configuration in one or more controllers with ' 'Error: %(error)s' % {'error': str(any_exceptions)}) raise exception.IloError(msg) if ld_exc_count == len(self.smart_storage_config_identities): msg = ('No logical drives are found in any controllers. Nothing ' 'to delete.') raise exception.IloLogicalDriveNotFoundError(msg) def _get_drives_has_raid(self): drives = [] ssc_ids = self.smart_storage_config_identities for ssc_id in ssc_ids: ssc_obj = self.get_smart_storage_config(ssc_id) drives.extend(ssc_obj.get_drives_has_raid()) return drives def _get_disk_properties_by_drive_location(self, location): controllers = ( self.smart_storage.array_controllers.get_all_controllers_model()) for controller in controllers: controller_obj = ( self.smart_storage.array_controllers.array_controller_by_model( controller)) properties = ( controller_obj.physical_drives. get_disk_properties_by_drive_location(location)) if properties: return properties def do_disk_erase(self, disk_type, pattern): """Performs out-of-band sanitize disk erase on the hardware. :param disk_type: Media type of disk drives either 'HDD' or 'SSD'. :param pattern: Erase pattern, if nothing passed default ('overwrite' for 'HDD', and 'block' for 'SSD') will be used. :raises: IloError, on an error from iLO. """ try: current_controller = None controllers = ( self.smart_storage.array_controllers. get_all_controllers_model()) for controller in controllers: current_controller = controller # Will filter out S controller by controller model ex. # 'HPE Smart Array S100i SR Gen10'. if re.search("^HPE Smart Array S[0-9]{3}", controller) is None: controller_obj = ( self.smart_storage.array_controllers. array_controller_by_model(controller)) ssc_obj = ( self._get_smart_storage_config_by_controller_model( controller)) if disk_type == (storage_map.MEDIA_TYPE_MAP_REV[ storage_const.MEDIA_TYPE_HDD]): disks = ( controller_obj. physical_drives.get_all_hdd_drives_locations()) else: disks = ( controller_obj. physical_drives.get_all_ssd_drives_locations()) assigned_disks = self._get_drives_has_raid() unassigned_disks = list(set(disks) - set(assigned_disks)) if unassigned_disks: ssc_obj.disk_erase(unassigned_disks, disk_type, pattern) if assigned_disks: disk_list = [] for disk in assigned_disks: disk_prop = ( self._get_disk_properties_by_drive_location( disk)) if disk_prop['Media type'] is disk_type: disk_list.append(disk_prop) if disk_list: LOG.warn("Skipping disk erase of %(disk_list)s " "with logical volumes on them." % {'disk_list': disk_list}) else: LOG.warn("Smart array controller: %(controller)s, doesn't " "support sanitize disk erase. All the disks of " "the controller are ignored." % {'controller': current_controller}) except sushy.exceptions.SushyError as e: msg = ("The Redfish controller failed to perform the sanitize " "disk erase on smart storage controller: %(controller)s, " "on disk_type: %(disk_type)s with error: %(error)s" % {'controller': current_controller, 'disk_type': disk_type, 'error': str(e)}) raise exception.IloError(msg) def has_disk_erase_completed(self): """Get out-of-band sanitize disk erase status. :returns: True if disk erase completed on all controllers otherwise False :raises: IloError, on an error from iLO. """ try: controllers = (self.smart_storage.array_controllers. get_all_controllers_model()) for controller in controllers: controller_obj = (self.smart_storage.array_controllers. array_controller_by_model(controller)) if controller_obj.physical_drives.has_disk_erase_completed: continue else: return False return True except sushy.exceptions.SushyError as e: msg = ('The Redfish controller failed to get the status of ' 'sanitize disk erase. Error: %(error)s' % {'error': str(e)}) raise exception.IloError(msg) def _parse_raid_config_data(self, raid_config): """It will parse raid config data based on raid controllers :param raid_config: A dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100, 'controller': 'HPE Smart Array P408i-a SR Gen10'}, ]} :returns: A dictionary of controllers, each containing list of their respected logical drives. """ default = ( self.smart_storage.array_controllers.get_default_controller.model) controllers = {default: []} for ld in raid_config['logical_disks']: if 'controller' not in ld.keys(): controllers[default].append(ld) else: ctrl = ld['controller'] if ctrl not in controllers: controllers[ctrl] = [] controllers[ctrl].append(ld) return controllers def create_raid(self, raid_config): """Create the raid configuration on the hardware. :param raid_config: A dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100, 'physical_disks': ['6I:1:5'], 'controller': 'HPE Smart Array P408i-a SR Gen10'}, ]} :raises: IloError, on an error from iLO. """ self.check_smart_storage_config_ids() any_exceptions = [] controllers = self._parse_raid_config_data(raid_config) # Creating raid on rest of the controllers for controller in controllers: try: config = {'logical_disks': controllers[controller]} ssc_obj = ( self._get_smart_storage_config_by_controller_model( controller)) if ssc_obj: ssc_obj.create_raid(config) else: members = ( self.smart_storage.array_controllers.get_members()) models = [member.model for member in members] msg = ('Controller not found. Available controllers are: ' '%(models)s' % {'models': models}) any_exceptions.append((controller, msg)) except sushy.exceptions.SushyError as e: any_exceptions.append((controller, str(e))) if any_exceptions: msg = ('The Redfish controller failed to create the ' 'raid configuration for one or more controllers with ' 'Error: %(error)s' % {'error': str(any_exceptions)}) raise exception.IloError(msg) def _post_create_read_raid(self, raid_config): """Read the logical drives from the system after post-create raid :param raid_config: A dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100, 'physical_disks': ['6I:1:5'], 'controller': 'HPE Smart Array P408i-a SR Gen10'}, ]} :raises: IloLogicalDriveNotFoundError, if no controllers are configured :raises: IloError, if any error form iLO :returns: A dictionary containing list of logical disks """ controllers = self._parse_raid_config_data(raid_config) ld_exc_count = 0 any_exceptions = [] config = {'logical_disks': []} for controller in controllers: try: ssc_obj = ( self._get_smart_storage_config_by_controller_model( controller)) if ssc_obj: result = ssc_obj.read_raid(controller=controller) config['logical_disks'].extend(result['logical_disks']) except exception.IloLogicalDriveNotFoundError: ld_exc_count += 1 except sushy.exceptions.SushyError as e: any_exceptions.append((controller, str(e))) if ld_exc_count == len(controllers): msg = 'No logical drives are found in any controllers.' raise exception.IloLogicalDriveNotFoundError(msg) if any_exceptions: msg = ('The Redfish controller failed to read the ' 'raid configuration in one or more controllers with ' 'Error: %(error)s' % {'error': str(any_exceptions)}) raise exception.IloError(msg) return config def _post_delete_read_raid(self): """Read the logical drives from the system after post-delete raid :raises: IloError, if any error form iLO :returns: Empty dictionary with format: {'logical_disks': []} """ any_exceptions = [] ssc_ids = self.smart_storage_config_identities config = {'logical_disks': []} for ssc_id in ssc_ids: try: ssc_obj = self.get_smart_storage_config(ssc_id) ac_obj = ( self.smart_storage.array_controllers. array_controller_by_location(ssc_obj.location)) if ac_obj: model = ac_obj.model result = ssc_obj.read_raid() if result: config['logical_disks'].extend(result['logical_disks']) except sushy.exceptions.SushyError as e: any_exceptions.append((model, str(e))) if any_exceptions: msg = ('The Redfish controller failed to read the ' 'raid configuration in one or more controllers with ' 'Error: %(error)s' % {'error': str(any_exceptions)}) raise exception.IloError(msg) return config def read_raid(self, raid_config=None): """Read the logical drives from the system :param raid_config: None or a dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 'size_gb': 100, 'physical_disks': ['6I:1:5'], 'controller': 'HPE Smart Array P408i-a SR Gen10'}, ]} :returns: A dictionary containing list of logical disks """ self.check_smart_storage_config_ids() if raid_config: # When read called after create raid, user can pass raid config # as a input result = self._post_create_read_raid(raid_config=raid_config) else: # When read called after delete raid, there will be no input # passed by user then result = self._post_delete_read_raid() return result def get_disk_types(self): """Get the list of all disk type available in server :returns: A list containing disk types :raises: IloError, on an error from iLO. """ disk_types = [] try: controllers = (self.smart_storage.array_controllers. get_all_controllers_model()) for controller in controllers: controller_obj = (self.smart_storage.array_controllers. array_controller_by_model(controller)) if controller_obj.physical_drives.has_rotational: disk_types.append(storage_map.MEDIA_TYPE_MAP_REV[ storage_const.MEDIA_TYPE_HDD]) if controller_obj.physical_drives.has_ssd: disk_types.append(storage_map.MEDIA_TYPE_MAP_REV[ storage_const.MEDIA_TYPE_SSD]) return list(set(disk_types)) except sushy.exceptions.SushyError as e: msg = ('The Redfish controller failed to get list of disk types. ' 'Error: %(error)s' % {'error': str(e)}) raise exception.IloError(msg) def validate_macs(self, macs): """Validate given macs are there in system :param macs: List of macs :raises: InvalidInputError, if macs not valid """ macs_available = self.ethernet_interfaces.get_all_macs() if not set(macs).issubset(macs_available): msg = ("Given macs: %(macs)s not found in the system" % {'macs': list(set(macs) - set(macs_available))}) raise exception.InvalidInputError(msg) def get_nic_association_name_by_mac(self, mac): """Return nic association name by mac address :mac: Mac address. :returns: Nic association name. Ex. NicBoot1 """ mappings = self.bios_settings.bios_mappings.pci_settings_mappings correlatable_id = self.ethernet_interfaces.get_uefi_device_path_by_mac( mac) for mapping in mappings: for subinstance in mapping['Subinstances']: for association in subinstance['Associations']: if subinstance.get('CorrelatableID') == correlatable_id: return [name for name in subinstance[ 'Associations'] if 'NicBoot' in name][0] ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/system/tls_config.py0000664000175000017500000000402400000000000027130 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from sushy.resources import base from sushy import utils as sushy_utils from proliantutils.redfish import utils class TLSConfig(base.ResourceBase): """Class that represents the TLS Configuration. This class extends the functionality of base resource class from sushy. """ tls_certificates = base.Field('Certificates') """The certificates currently configured""" @property @sushy_utils.cache_it def tls_config_settings(self): """Property to provide reference to TLS configuration settings instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return TLSConfigSettings( self._conn, utils.get_subresource_path_by( self, ["@Redfish.Settings", "SettingsObject"]), redfish_version=self.redfish_version) class TLSConfigSettings(base.ResourceBase): """Class that represents the TLS configuration settings. This class extends the functionality of base resource class from sushy. """ def add_tls_certificate(self, cert_data): """Update tls certificate :param data: default tls certs data """ self._conn.put(self.path, data=cert_data) def remove_tls_certificate(self, cert_data): """Update tls certificate :param data: default tls certs data """ self._conn.put(self.path, data=cert_data) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/resources/update_service.py0000664000175000017500000001441300000000000026462 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' import sushy from sushy.resources import base from sushy.resources import common as sushy_common from proliantutils import exception from proliantutils.ilo import common from proliantutils import log LOG = log.get_logger(__name__) class ActionsField(base.CompositeField): update_firmware = (sushy_common. ResetActionField('#UpdateService.SimpleUpdate')) class HPEUpdateService(base.ResourceBase): """Class that extends the functionality of Base resource class This class extends the functionality of Base resource class from sushy """ firmware_state = base.Field(['Oem', 'Hpe', 'State']) firmware_percentage = base.Field(['Oem', 'Hpe', 'FlashProgressPercent']) _actions = ActionsField(['Actions'], required=True) def _get_firmware_update_element(self): """Get the url for firmware update :returns: firmware update url :raises: Missing resource error on missing url """ fw_update_action = self._actions.update_firmware if not fw_update_action: raise (sushy.exceptions. MissingActionError(action='#UpdateService.SimpleUpdate', resource=self._path)) return fw_update_action def flash_firmware(self, redfish_inst, file_url): """Perform firmware flashing on a redfish system :param file_url: url to firmware bits. :param redfish_inst: redfish instance :raises: IloError, on an error from iLO. """ action_data = { 'ImageURI': file_url, } target_uri = self._get_firmware_update_element().target_uri try: self._conn.post(target_uri, data=action_data) except sushy.exceptions.SushyError as e: msg = (('The Redfish controller failed to update firmware ' 'with file %(file)s Error %(error)s') % {'file': file_url, 'error': str(e)}) LOG.debug(msg) # noqa raise exception.IloError(msg) self.wait_for_redfish_firmware_update_to_complete(redfish_inst) try: state, percent = self.get_firmware_update_progress() except sushy.exceptions.SushyError as e: msg = ('Failed to get firmware progress update ' 'Error %(error)s' % {'error': str(e)}) LOG.debug(msg) raise exception.IloError(msg) if state == "Error": msg = 'Unable to update firmware' LOG.debug(msg) # noqa raise exception.IloError(msg) elif state == "Unknown": msg = 'Status of firmware update not known' LOG.debug(msg) # noqa else: # "Complete" | "Idle" LOG.info('Flashing firmware file: %s ... done', file_url) def wait_for_redfish_firmware_update_to_complete(self, redfish_object): """Continuously polls for iLO firmware update to complete. :param redfish_object: redfish instance """ p_state = ['Idle'] c_state = ['Idle'] def has_firmware_flash_completed(): """Checks for completion status of firmware update operation The below table shows the conditions for which the firmware update will be considered as DONE (be it success or error):: +-----------------------------------+-----------------------------+ | Previous state | Current state | +===================================+=============================+ | Idle | Error, Complete | +-----------------------------------+-----------------------------+ | Updating, Verifying, | Complete, Error, | | Uploading, Writing | Unknown, Idle | +-----------------------------------+-----------------------------+ :returns: True upon firmware update completion otherwise False """ curr_state, curr_percent = self.get_firmware_update_progress() p_state[0] = c_state[0] c_state[0] = curr_state if (((p_state[0] in ['Updating', 'Verifying', 'Uploading', 'Writing']) and (c_state[0] in ['Complete', 'Error', 'Unknown', 'Idle'])) or (p_state[0] == 'Idle' and (c_state[0] in ['Complete', 'Error']))): return True return False common.wait_for_operation_to_complete( has_firmware_flash_completed, delay_bw_retries=30, failover_msg='iLO firmware update has failed.' ) common.wait_for_ilo_after_reset(redfish_object) def get_firmware_update_progress(self): """Get the progress of the firmware update. :returns: firmware update state, one of the following values: "Idle","Uploading","Verifying","Writing", "Updating","Complete","Error". If the update resource is not found, then "Unknown". :returns: firmware update progress percent """ # perform refresh try: self.refresh() except sushy.exceptions.SushyError as e: msg = (('Progress of firmware update not known. ' 'Error %(error)s') % {'error': str(e)}) LOG.debug(msg) return "Unknown", "Unknown" # NOTE: Percentage is returned None after firmware flash is completed. return (self.firmware_state, self.firmware_percentage) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/redfish/utils.py0000664000175000017500000001050700000000000022606 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' import collections import six from proliantutils import exception from proliantutils.redfish.resources.system import constants as sys_cons # Representation of supported boot modes SupportedBootModes = collections.namedtuple( 'SupportedBootModes', ['boot_mode_bios', 'boot_mode_uefi']) def get_subresource_path_by(resource, subresource_path): """Helper function to find the resource path :param resource: ResourceBase instance from which the path is loaded. :param subresource_path: JSON field to fetch the value from. Either a string, or a list of strings in case of a nested field. It should also include the '@odata.id' :raises: MissingAttributeError, if required path is missing. :raises: ValueError, if path is empty. :raises: AttributeError, if json attr not found in resource """ if isinstance(subresource_path, six.string_types): subresource_path = [subresource_path] elif not subresource_path: raise ValueError('"subresource_path" cannot be empty') body = resource.json for path_item in subresource_path: body = body.get(path_item, {}) if not body: raise exception.MissingAttributeError( attribute='/'.join(subresource_path), resource=resource.path) if '@odata.id' not in body: raise exception.MissingAttributeError( attribute='/'.join(subresource_path) + '/@odata.id', resource=resource.path) return body['@odata.id'] def get_supported_boot_mode(supported_boot_mode): """Return bios and uefi support. :param supported_boot_mode: Supported boot modes :return: A tuple of 'true'/'false' based on bios and uefi support respectively. """ boot_mode_bios = 'false' boot_mode_uefi = 'false' if (supported_boot_mode == sys_cons.SUPPORTED_LEGACY_BIOS_ONLY): boot_mode_bios = 'true' elif (supported_boot_mode == sys_cons.SUPPORTED_UEFI_ONLY): boot_mode_uefi = 'true' elif (supported_boot_mode == sys_cons.SUPPORTED_LEGACY_BIOS_AND_UEFI): boot_mode_bios = 'true' boot_mode_uefi = 'true' return SupportedBootModes(boot_mode_bios=boot_mode_bios, boot_mode_uefi=boot_mode_uefi) def get_allowed_operations(resource, subresource_path): """Helper function to get the HTTP allowed methods. :param resource: ResourceBase instance from which the path is loaded. :param subresource_path: JSON field to fetch the value from. Either a string, or a list of strings in case of a nested field. :returns: A list of allowed HTTP methods. """ uri = get_subresource_path_by(resource, subresource_path) response = resource._conn.get(path=uri) return response.headers['Allow'] def is_operation_allowed(method, resource, subresouce_path): """Checks whether the operation is allowed for the resource. This method checks whether a HTTP method is allowed to be performed on the given sub resource path. :param method: A HTTP method. example: GET, PATCH, POST :param resource: ResourceBase instance from which the path is loaded. :param subresource_path: JSON field to fetch the value from. Either a string, or a list of strings in case of a nested field. :returns: True if the operation is allowed else False """ return method in get_allowed_operations(resource, subresouce_path) def max_safe(iterable): """Creates a wrapper over python max() function. This function is just a wrapper over pthon max(). It catches the exceptions and let max() return without any error. """ try: return max(iterable) except ValueError: # The TypeError is not caught here as that should be thrown. return 0 ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2426646 proliantutils-2.16.0/proliantutils/rest/0000775000175000017500000000000000000000000020422 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/rest/__init__.py0000664000175000017500000000031100000000000022526 0ustar00zuulzuul00000000000000"""REST infrastructure to simplify communicating with REST based iLO interfaces Helper module to work with REST based APIs of BMCs. """ from proliantutils.rest.v1 import RestConnectorBase # noqa ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/rest/v1.py0000775000175000017500000002447100000000000021335 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise 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. """Helper module to work with REST APIs""" __author__ = 'HPE' import base64 import gzip import json import requests from requests.packages import urllib3 from requests.packages.urllib3 import exceptions as urllib3_exceptions import retrying import six from six.moves.urllib import parse as urlparse from proliantutils import exception from proliantutils import log REDIRECTION_ATTEMPTS = 5 LOG = log.get_logger(__name__) class RestConnectorBase(object): def __init__(self, host, login, password, bios_password=None, cacert=None): self.host = host self.login = login self.password = password self.bios_password = bios_password # Message registry support self.message_registries = {} self.cacert = cacert # By default, requests logs following message if verify=False # InsecureRequestWarning: Unverified HTTPS request is # being made. Adding certificate verification is strongly advised. # Just disable the warning if user intentionally did this. if self.cacert is None: urllib3.disable_warnings(urllib3_exceptions.InsecureRequestWarning) def _(self, msg): """Prepends host information to msg and returns it.""" return "[iLO %s] %s" % (self.host, msg) def _get_response_body_from_gzipped_content(self, url, response): """Get the response body from gzipped content Try to decode as gzip (we should check the headers for Content-Encoding=gzip) if response.headers['content-encoding'] == "gzip": ... :param url: the url for which response was sent :type url: str :param response: response content object, probably gzipped :type response: object :returns: returns response body :raises IloError: if the content is **not** gzipped """ try: gzipper = gzip.GzipFile(fileobj=six.BytesIO(response.text)) LOG.debug(self._("Received compressed response for " "url %(url)s."), {'url': url}) uncompressed_string = (gzipper.read().decode('UTF-8')) response_body = json.loads(uncompressed_string) except Exception as e: LOG.debug( self._("Error occurred while decompressing body. " "Got invalid response '%(response)s' for " "url %(url)s: %(error)s"), {'url': url, 'response': response.text, 'error': e}) raise exception.IloError(e) return response_body def _rest_op(self, operation, suburi, request_headers, request_body): """Generic REST Operation handler.""" url = urlparse.urlparse('https://' + self.host + suburi) # Used for logging on redirection error. start_url = url.geturl() LOG.debug(self._("%(operation)s %(url)s"), {'operation': operation, 'url': start_url}) if request_headers is None or not isinstance(request_headers, dict): request_headers = {} # Use self.login/self.password and Basic Auth if self.login is not None and self.password is not None: auth_data = self.login + ":" + self.password hr = "BASIC " + base64.b64encode( auth_data.encode('ascii')).decode("utf-8") request_headers['Authorization'] = hr if request_body is not None: if (isinstance(request_body, dict) or isinstance(request_body, list)): request_headers['Content-Type'] = 'application/json' else: request_headers['Content-Type'] = ('application/' 'x-www-form-urlencoded') """Helper methods to retry and keep retrying on redirection - START""" def retry_if_response_asks_for_redirection(response): # NOTE:Do not assume every HTTP operation will return a JSON # request_body. For example, ExtendedError structures are only # required for HTTP 400 errors and are optional elsewhere as they # are mostly redundant for many of the other HTTP status code. # In particular, 200 OK responses should not have to return any # request_body. # NOTE: this makes sure the headers names are all lower cases # because HTTP says they are case insensitive # Follow HTTP redirect if response.status_code == 301 and 'location' in response.headers: retry_if_response_asks_for_redirection.url = ( urlparse.urlparse(response.headers['location'])) LOG.debug(self._("Request redirected to %s."), retry_if_response_asks_for_redirection.url.geturl()) return True return False @retrying.retry( # Note(deray): Return True if we should retry, False otherwise. # In our case, when the url response we receive asks for # redirection then we retry. retry_on_result=retry_if_response_asks_for_redirection, # Note(deray): Return True if we should retry, False otherwise. # In our case, when it's an IloConnectionError we don't retry. # ``requests`` already takes care of issuing max number of # retries if the URL service is unavailable. retry_on_exception=( lambda e: not isinstance(e, exception.IloConnectionError)), stop_max_attempt_number=REDIRECTION_ATTEMPTS) def _fetch_response(): url = retry_if_response_asks_for_redirection.url kwargs = {'headers': request_headers, 'data': json.dumps(request_body)} if self.cacert is not None: kwargs['verify'] = self.cacert else: kwargs['verify'] = False LOG.debug(self._('\n\tHTTP REQUEST: %(restreq_method)s' '\n\tPATH: %(restreq_path)s' '\n\tBODY: %(restreq_body)s' '\n'), {'restreq_method': operation, 'restreq_path': url.geturl(), 'restreq_body': request_body}) request_method = getattr(requests, operation.lower()) try: response = request_method(url.geturl(), **kwargs) except Exception as e: LOG.debug(self._("Unable to connect to iLO. %s"), e) raise exception.IloConnectionError(e) return response """Helper methods to retry and keep retrying on redirection - END""" try: # Note(deray): This is a trick to use the function attributes # to overwrite variable/s (in our case ``url``) and use the # modified one in nested functions, i.e. :func:`_fetch_response` # and :func:`retry_if_response_asks_for_redirection` retry_if_response_asks_for_redirection.url = url response = _fetch_response() except retrying.RetryError as e: # Redirected for REDIRECTION_ATTEMPTS - th time. Throw error msg = (self._("URL Redirected %(times)s times continuously. " "URL used: %(start_url)s More info: %(error)s") % {'start_url': start_url, 'times': REDIRECTION_ATTEMPTS, 'error': str(e)}) LOG.debug(msg) raise exception.IloConnectionError(msg) response_body = {} if response.text: try: response_body = json.loads(response.text) except (TypeError, ValueError): # Note(deray): If it doesn't decode as json, then # resources may return gzipped content. # ``json.loads`` on python3 raises TypeError when # ``response.text`` is gzipped one. response_body = ( self._get_response_body_from_gzipped_content(url, response)) LOG.debug(self._('\n\tHTTP RESPONSE for %(restreq_path)s:' '\n\tCode: %(status_code)s' '\n\tResponse Body: %(response_body)s' '\n'), {'restreq_path': url.geturl(), 'status_code': response.status_code, 'response_body': response_body}) return response.status_code, response.headers, response_body def _rest_get(self, suburi, request_headers=None): """REST GET operation. HTTP response codes could be 500, 404 etc. """ return self._rest_op('GET', suburi, request_headers, None) def _rest_patch(self, suburi, request_headers, request_body): """REST PATCH operation. HTTP response codes could be 500, 404, 202 etc. """ return self._rest_op('PATCH', suburi, request_headers, request_body) def _rest_put(self, suburi, request_headers, request_body): """REST PUT operation. HTTP response codes could be 500, 404, 202 etc. """ return self._rest_op('PUT', suburi, request_headers, request_body) def _rest_post(self, suburi, request_headers, request_body): """REST POST operation. The response body after the operation could be the new resource, or ExtendedError, or it could be empty. """ return self._rest_op('POST', suburi, request_headers, request_body) def _rest_delete(self, suburi, request_headers): """REST DELETE operation. HTTP response codes could be 500, 404 etc. """ return self._rest_op('DELETE', suburi, request_headers, None) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2426646 proliantutils-2.16.0/proliantutils/sum/0000775000175000017500000000000000000000000020251 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/sum/__init__.py0000664000175000017500000000000000000000000022350 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/sum/sum_controller.py0000664000175000017500000002112400000000000023672 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise 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 fnmatch import io import os import re import shutil import tarfile import tempfile import time from oslo_concurrency import processutils from oslo_serialization import base64 from proliantutils import exception from proliantutils import utils HPSUM_LOCATION = 'hp/swpackages/hpsum' SUM_LOCATION = 'packages/smartupdate' WAIT_TIME_DISK_LABEL_TO_BE_VISIBLE = 5 # List of log files created by SUM based firmware update. OUTPUT_FILES = ['/var/hp/log/localhost/hpsum_log.txt', '/var/hp/log/localhost/hpsum_detail_log.txt', '/var/log/sum/localhost/sum_log.txt', '/var/log/sum/localhost/sum_detail_log.txt'] EXIT_CODE_TO_STRING = { 0: "The smart component was installed successfully.", 1: ("The smart component was installed successfully, but the system " "must be restarted."), 3: ("The smart component was not installed. Node is already " "up-to-date."), 253: "The installation of the component failed." } def _execute_sum(sum_file_path, mount_point, components=None): """Executes the SUM based firmware update command. This method executes the SUM based firmware update command to update the components specified, if not, it performs update on all the firmware components on th server. :param sum_file_path: A string with the path to the SUM binary to be executed :param components: A list of components to be updated. If it is None, all the firmware components are updated. :param mount_point: Location in which SPP iso is mounted. :returns: A string with the statistics of the updated/failed components. :raises: SUMOperationError, when the SUM based firmware update operation on the node fails. """ cmd = ' --c ' + ' --c '.join(components) if components else '' try: if SUM_LOCATION in sum_file_path: location = os.path.join(mount_point, 'packages') # NOTE: 'launch_sum.sh' binary is part of SPP ISO and it is # available in the SPP mount point (eg:'/mount/launch_sum.sh'). # 'launch_sum.sh' binary calls the 'smartupdate' binary by passing # the arguments. processutils.execute('./launch_sum.sh', '--s', '--romonly', '--use_location', location, cmd, cwd=mount_point) else: processutils.execute(sum_file_path, '--s', '--romonly', cmd) except processutils.ProcessExecutionError as e: result = _parse_sum_ouput(e.exit_code) if result: return result else: raise exception.SUMOperationError(reason=str(e)) def _get_log_file_data_as_encoded_content(): """Gzip and base64 encode files and BytesIO buffers. This method gets the log files created by SUM based firmware update and tar zip the files. :returns: A gzipped and base64 encoded string as text. """ with io.BytesIO() as fp: with tarfile.open(fileobj=fp, mode='w:gz') as tar: for f in OUTPUT_FILES: if os.path.isfile(f): tar.add(f) fp.seek(0) return base64.encode_as_bytes(fp.getvalue()) def _parse_sum_ouput(exit_code): """Parse the SUM output log file. This method parses through the SUM log file in the default location to return the SUM update status. Sample return string: "Summary: The installation of the component failed. Status of updated components: Total: 5 Success: 4 Failed: 1" :param exit_code: A integer returned by the SUM after command execution. :returns: A string with the statistics of the updated/failed components and 'None' when the exit_code is not 0, 1, 3 or 253. """ if exit_code == 3: return "Summary: %s" % EXIT_CODE_TO_STRING.get(exit_code) if exit_code in (0, 1, 253): if os.path.exists(OUTPUT_FILES[0]): with open(OUTPUT_FILES[0], 'r') as f: output_data = f.read() ret_data = output_data[(output_data.find('Deployed Components:') + len('Deployed Components:')): output_data.find('Exit status:')] failed = 0 success = 0 for line in re.split('\n\n', ret_data): if line: if 'Success' not in line: failed += 1 else: success += 1 return { 'Summary': ( "%(return_string)s Status of updated components: Total: " "%(total)s Success: %(success)s Failed: %(failed)s." % {'return_string': EXIT_CODE_TO_STRING.get(exit_code), 'total': (success + failed), 'success': success, 'failed': failed}), 'Log Data': _get_log_file_data_as_encoded_content() } return "UPDATE STATUS: UNKNOWN" def update_firmware(node, url, checksum, components=None): """Performs SUM based firmware update on the node. This method performs SUM firmware update by mounting the SPP ISO on the node. It performs firmware update on all or some of the firmware components. :param node: A dictionary of the node object. :param url: URL of SPP (Service Pack for Proliant) ISO. :param checksum: MD5 checksum of SPP ISO to verify the image. :param components: List of filenames of the firmware components to be flashed. If not provided, the firmware update is performed on all the firmware components. :returns: Operation Status string. :raises: SUMOperationError, when the vmedia device is not found or when the mount operation fails or when the image validation fails. :raises: IloConnectionError, when the iLO connection fails. :raises: IloError, when vmedia eject or insert operation fails. """ # Validates the http image reference for SUM update ISO. try: utils.validate_href(url) except exception.ImageRefValidationFailed as e: raise exception.SUMOperationError(reason=e) # Waits for the OS to detect the disk and update the label file. SPP ISO # is identified by matching its label. time.sleep(WAIT_TIME_DISK_LABEL_TO_BE_VISIBLE) vmedia_device_dir = "/dev/disk/by-label/" for fname in os.listdir(vmedia_device_dir): if fnmatch.fnmatch(fname, 'SPP*'): vmedia_device_file = os.path.join(vmedia_device_dir, fname) if not os.path.exists(vmedia_device_file): msg = "Unable to find the virtual media device for SUM" raise exception.SUMOperationError(reason=msg) # Validates the SPP ISO image for any file corruption using the checksum # of the ISO file. try: utils.verify_image_checksum(vmedia_device_file, checksum) except exception.ImageRefValidationFailed as e: raise exception.SUMOperationError(reason=e) # Mounts SPP ISO on a temporary directory. vmedia_mount_point = tempfile.mkdtemp() try: try: processutils.execute("mount", vmedia_device_file, vmedia_mount_point) except processutils.ProcessExecutionError as e: msg = ("Unable to mount virtual media device %(device)s: " "%(error)s" % {'device': vmedia_device_file, 'error': e}) raise exception.SUMOperationError(reason=msg) # Executes the SUM based firmware update by passing the 'smartupdate' # executable path if exists else 'hpsum' executable path and the # components specified (if any). sum_file_path = os.path.join(vmedia_mount_point, SUM_LOCATION) if not os.path.exists(sum_file_path): sum_file_path = os.path.join(vmedia_mount_point, HPSUM_LOCATION) result = _execute_sum(sum_file_path, vmedia_mount_point, components=components) processutils.trycmd("umount", vmedia_mount_point) finally: shutil.rmtree(vmedia_mount_point, ignore_errors=True) return result ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2466645 proliantutils-2.16.0/proliantutils/tests/0000775000175000017500000000000000000000000020607 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/__init__.py0000664000175000017500000000000000000000000022706 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2466645 proliantutils-2.16.0/proliantutils/tests/hpssa/0000775000175000017500000000000000000000000021725 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/hpssa/__init__.py0000664000175000017500000000000000000000000024024 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/hpssa/raid_constants.py0000664000175000017500000021566300000000000025327 0ustar00zuulzuul00000000000000# Copyright 2015 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. HPSSA_NO_DRIVES = ''' Smart Array P822 in Slot 2 Bus Interface: PCI Slot: 2 Serial Number: PDVTF0BRH5T0MO Cache Serial Number: PBKUD0BRH5T3I6 RAID 6 (ADG) Status: Enabled Controller Status: OK Hardware Revision: B Firmware Version: 4.68 Wait for Cache Room: Disabled Surface Analysis Inconsistency Notification: Disabled Post Prompt Timeout: 15 secs Cache Board Present: True Cache Status: OK Drive Write Cache: Disabled Total Cache Size: 2.0 GB Total Cache Memory Available: 1.8 GB No-Battery Write Cache: Disabled Cache Backup Power Source: Capacitors Battery/Capacitor Count: 1 Battery/Capacitor Status: OK SATA NCQ Supported: True Spare Activation Mode: Activate on physical drive failure (default) Controller Temperature (C): 88 Cache Module Temperature (C): 37 Capacitor Temperature (C): 21 Number of Ports: 6 (2 Internal / 4 External ) Driver Name: hpsa Driver Version: 3.4.4 Driver Supports HP SSD Smart Path: True unassigned physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 500 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G55D0000N4173JLT Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 43 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:2 Port: 5I Box: 1 Bay: 2 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H2DM0000B41800Y0 Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 44 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:3 Port: 5I Box: 1 Bay: 3 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 400 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G4ZN0000B41707PD Model: HP EF0600FARNA Current Temperature (C): 33 Maximum Temperature (C): 42 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:4 Port: 5I Box: 1 Bay: 4 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 400 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H27F0000B41800S0 Model: HP EF0600FARNA Current Temperature (C): 36 Maximum Temperature (C): 45 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 6I:1:5 Port: 6I Box: 1 Bay: 5 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 400 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H2BR0000B41800V8 Model: HP EF0600FARNA Current Temperature (C): 32 Maximum Temperature (C): 41 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 6I:1:6 Port: 6I Box: 1 Bay: 6 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G4WD0000N4180GEJ Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 44 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 6I:1:7 Port: 6I Box: 1 Bay: 7 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G54Q0000N4180W34 Model: HP EF0600FARNA Current Temperature (C): 31 Maximum Temperature (C): 39 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 SEP (Vendor ID PMCSIERA, Model SRCv24x6G) 380 Device Number: 380 Firmware Version: RevB WWID: 5001438028842E1F Vendor ID: PMCSIERA Model: SRCv24x6G ''' HPSSA_DRIVES_SSD = ''' Smart Array P822 in Slot 2 Bus Interface: PCI Slot: 2 Serial Number: PDVTF0BRH5T0MO Cache Serial Number: PBKUD0BRH5T3I6 RAID 6 (ADG) Status: Enabled Controller Status: OK Hardware Revision: B Firmware Version: 4.68 Wait for Cache Room: Disabled Surface Analysis Inconsistency Notification: Disabled Post Prompt Timeout: 15 secs Cache Board Present: True Cache Status: OK Drive Write Cache: Disabled Total Cache Size: 2.0 GB Total Cache Memory Available: 1.8 GB No-Battery Write Cache: Disabled Cache Backup Power Source: Capacitors Battery/Capacitor Count: 1 Battery/Capacitor Status: OK SATA NCQ Supported: True Spare Activation Mode: Activate on physical drive failure (default) Controller Temperature (C): 88 Cache Module Temperature (C): 37 Capacitor Temperature (C): 21 Number of Ports: 6 (2 Internal / 4 External ) Driver Name: hpsa Driver Version: 3.4.4 Driver Supports HP SSD Smart Path: True unassigned physicaldrive 6I:1:7 Port: 6I Box: 1 Bay: 7 Status: OK Drive Type: Unassigned Drive Interface Type: Solid State SAS Size: 200 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G54Q0000N4180W34 Model: HP EF0600FARNA Current Temperature (C): 31 Maximum Temperature (C): 39 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 6I:1:8 Port: 6I Box: 1 Bay: 7 Status: OK Drive Type: Unassigned Drive Interface Type: Solid State SATA Size: 200 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G54Q0000N4180W34 Model: HP EF0600FARNA Current Temperature (C): 31 Maximum Temperature (C): 39 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 SEP (Vendor ID PMCSIERA, Model SRCv24x6G) 380 Device Number: 380 Firmware Version: RevB WWID: 5001438028842E1F Vendor ID: PMCSIERA Model: SRCv24x6G ''' HPSSA_ONE_DRIVE = ''' Smart Array P822 in Slot 2 Bus Interface: PCI Slot: 2 Serial Number: PDVTF0BRH5T0MO Cache Serial Number: PBKUD0BRH5T3I6 RAID 6 (ADG) Status: Enabled Controller Status: OK Hardware Revision: B Firmware Version: 4.68 Rebuild Priority: Medium Expand Priority: Medium Surface Scan Delay: 3 secs Surface Scan Mode: Idle Queue Depth: Automatic Monitor and Performance Delay: 60 min Elevator Sort: Enabled Degraded Performance Optimization: Disabled Inconsistency Repair Policy: Disabled Wait for Cache Room: Disabled Surface Analysis Inconsistency Notification: Disabled Post Prompt Timeout: 15 secs Cache Board Present: True Cache Status: OK Cache Ratio: 10% Read / 90% Write Drive Write Cache: Disabled Total Cache Size: 2.0 GB Total Cache Memory Available: 1.8 GB No-Battery Write Cache: Disabled Cache Backup Power Source: Capacitors Battery/Capacitor Count: 1 Battery/Capacitor Status: OK SATA NCQ Supported: True Spare Activation Mode: Activate on physical drive failure (default) Controller Temperature (C): 88 Cache Module Temperature (C): 37 Capacitor Temperature (C): 22 Number of Ports: 6 (2 Internal / 4 External ) Driver Name: hpsa Driver Version: 3.4.4 Driver Supports HP SSD Smart Path: True Array: A Interface Type: SAS Unused Space: 0 MB Status: OK MultiDomain Status: OK Array Type: Data HP SSD Smart Path: disable Logical Drive: 1 Size: 558.9 GB Fault Tolerance: 1 Heads: 255 Sectors Per Track: 32 Cylinders: 65535 Strip Size: 256 KB Full Stripe Size: 256 KB Status: OK MultiDomain Status: OK Caching: Enabled Unique Identifier: 600508B1001C321CCA06EB7CD847939D Disk Name: /dev/sda Mount Points: None Logical Drive Label: 01F42227PDVTF0BRH5T0MOAB64 Mirror Group 0: physicaldrive 5I:1:1 (port 5I:box 1:bay 1, SAS, 600 GB, OK) Mirror Group 1: physicaldrive 5I:1:2 (port 5I:box 1:bay 2, SAS, 600 GB, OK) Drive Type: Data LD Acceleration Method: Controller Cache physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 500 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G55D0000N4173JLT Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 43 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:2 Port: 5I Box: 1 Bay: 2 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 500 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H2DM0000B41800Y0 Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 44 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 unassigned physicaldrive 5I:1:3 Port: 5I Box: 1 Bay: 3 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 400 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G4ZN0000B41707PD Model: HP EF0600FARNA Current Temperature (C): 33 Maximum Temperature (C): 42 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:4 Port: 5I Box: 1 Bay: 4 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 400 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H27F0000B41800S0 Model: HP EF0600FARNA Current Temperature (C): 36 Maximum Temperature (C): 45 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 6I:1:5 Port: 6I Box: 1 Bay: 5 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 400 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H2BR0000B41800V8 Model: HP EF0600FARNA Current Temperature (C): 32 Maximum Temperature (C): 41 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 6I:1:6 Port: 6I Box: 1 Bay: 6 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G4WD0000N4180GEJ Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 44 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 6I:1:7 Port: 6I Box: 1 Bay: 7 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G54Q0000N4180W34 Model: HP EF0600FARNA Current Temperature (C): 31 Maximum Temperature (C): 39 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 SEP (Vendor ID PMCSIERA, Model SRCv24x6G) 380 Device Number: 380 Firmware Version: RevB WWID: 5001438028842E1F Vendor ID: PMCSIERA Model: SRCv24x6G ''' HPSSA_ONE_DRIVE_RAID_50 = ''' Smart Array P822 in Slot 2 Bus Interface: PCI Slot: 2 Serial Number: PDVTF0BRH5T0MO Cache Serial Number: PBKUD0BRH5T3I6 RAID 6 (ADG) Status: Enabled Controller Status: OK Hardware Revision: B Firmware Version: 4.68 Rebuild Priority: Medium Expand Priority: Medium Surface Scan Delay: 3 secs Surface Scan Mode: Idle Queue Depth: Automatic Monitor and Performance Delay: 60 min Elevator Sort: Enabled Degraded Performance Optimization: Disabled Inconsistency Repair Policy: Disabled Wait for Cache Room: Disabled Surface Analysis Inconsistency Notification: Disabled Post Prompt Timeout: 15 secs Cache Board Present: True Cache Status: OK Cache Ratio: 10% Read / 90% Write Drive Write Cache: Disabled Total Cache Size: 2.0 GB Total Cache Memory Available: 1.8 GB No-Battery Write Cache: Disabled Cache Backup Power Source: Capacitors Battery/Capacitor Count: 1 Battery/Capacitor Status: OK SATA NCQ Supported: True Spare Activation Mode: Activate on physical drive failure (default) Controller Temperature (C): 88 Cache Module Temperature (C): 38 Capacitor Temperature (C): 23 Number of Ports: 6 (2 Internal / 4 External ) Driver Name: hpsa Driver Version: 3.4.4 Driver Supports HP SSD Smart Path: True Array: A Interface Type: SAS Unused Space: 3280165 MB Status: OK MultiDomain Status: OK Array Type: Data HP SSD Smart Path: disable Logical Drive: 1 Size: 100.0 GB Fault Tolerance: 50 Number of Parity Groups: 2 Heads: 255 Sectors Per Track: 32 Cylinders: 25700 Strip Size: 256 KB Full Stripe Size: 512 KB Status: OK MultiDomain Status: OK Caching: Enabled Parity Initialization Status: Queued Unique Identifier: 600508B1001C0FC2145AA6F3A0AF2A57 Disk Name: /dev/sda Mount Points: None Logical Drive Label: 02795E8FPDVTF0BRH5T0MOF6B8 Parity Group 0: physicaldrive 5I:1:1 (port 5I:box 1:bay 1, SAS, 600 GB, OK) physicaldrive 5I:1:3 (port 5I:box 1:bay 3, SAS, 600 GB, OK) physicaldrive 6I:1:5 (port 6I:box 1:bay 5, SAS, 600 GB, OK) Parity Group 1: physicaldrive 5I:1:2 (port 5I:box 1:bay 2, SAS, 600 GB, OK) physicaldrive 5I:1:4 (port 5I:box 1:bay 4, SAS, 600 GB, OK) physicaldrive 6I:1:6 (port 6I:box 1:bay 6, SAS, 600 GB, OK) Drive Type: Data LD Acceleration Method: Controller Cache physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G55D0000N4173JLT Model: HP EF0600FARNA Current Temperature (C): 36 Maximum Temperature (C): 43 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:2 Port: 5I Box: 1 Bay: 2 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H2DM0000B41800Y0 Model: HP EF0600FARNA Current Temperature (C): 37 Maximum Temperature (C): 44 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:3 Port: 5I Box: 1 Bay: 3 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G4ZN0000B41707PD Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 42 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:4 Port: 5I Box: 1 Bay: 4 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H27F0000B41800S0 Model: HP EF0600FARNA Current Temperature (C): 38 Maximum Temperature (C): 45 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 6I:1:5 Port: 6I Box: 1 Bay: 5 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H2BR0000B41800V8 Model: HP EF0600FARNA Current Temperature (C): 33 Maximum Temperature (C): 41 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 6I:1:6 Port: 6I Box: 1 Bay: 6 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G4WD0000N4180GEJ Model: HP EF0600FARNA Current Temperature (C): 36 Maximum Temperature (C): 44 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 unassigned physicaldrive 6I:1:7 Port: 6I Box: 1 Bay: 7 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G54Q0000N4180W34 Model: HP EF0600FARNA Current Temperature (C): 33 Maximum Temperature (C): 39 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 SEP (Vendor ID PMCSIERA, Model SRCv24x6G) 380 Device Number: 380 Firmware Version: RevB WWID: 5001438028842E1F Vendor ID: PMCSIERA Model: SRCv24x6G ''' HPSSA_ONE_DRIVE_100GB_RAID_5 = ''' Smart Array P822 in Slot 2 Bus Interface: PCI Slot: 2 Serial Number: PDVTF0BRH5T0MO Cache Serial Number: PBKUD0BRH5T3I6 RAID 6 (ADG) Status: Enabled Controller Status: OK Hardware Revision: B Firmware Version: 4.68 Rebuild Priority: Medium Expand Priority: Medium Surface Scan Delay: 3 secs Surface Scan Mode: Idle Queue Depth: Automatic Monitor and Performance Delay: 60 min Elevator Sort: Enabled Degraded Performance Optimization: Disabled Inconsistency Repair Policy: Disabled Wait for Cache Room: Disabled Surface Analysis Inconsistency Notification: Disabled Post Prompt Timeout: 15 secs Cache Board Present: True Cache Status: OK Cache Ratio: 10% Read / 90% Write Drive Write Cache: Disabled Total Cache Size: 2.0 GB Total Cache Memory Available: 1.8 GB No-Battery Write Cache: Disabled Cache Backup Power Source: Capacitors Battery/Capacitor Count: 1 Battery/Capacitor Status: OK SATA NCQ Supported: True Spare Activation Mode: Activate on physical drive failure (default) Controller Temperature (C): 88 Cache Module Temperature (C): 38 Capacitor Temperature (C): 23 Number of Ports: 6 (2 Internal / 4 External ) Driver Name: hpsa Driver Version: 3.4.4 Driver Supports HP SSD Smart Path: True Array: A Interface Type: SAS Unused Space: 1563284 MB Status: OK MultiDomain Status: OK Array Type: Data HP SSD Smart Path: disable Logical Drive: 1 Size: 100.0 GB Fault Tolerance: 5 Heads: 255 Sectors Per Track: 32 Cylinders: 25700 Strip Size: 256 KB Full Stripe Size: 512 KB Status: OK MultiDomain Status: OK Caching: Enabled Parity Initialization Status: Queued Unique Identifier: 600508B1001CC42CDF101F06E5563967 Disk Name: /dev/sda Mount Points: None Logical Drive Label: 02715627PDVTF0BRH5T0MO154D Drive Type: Data LD Acceleration Method: Controller Cache physicaldrive 5I:1:3 Port: 5I Box: 1 Bay: 3 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 400 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G4ZN0000B41707PD Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 42 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:4 Port: 5I Box: 1 Bay: 4 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 400 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H27F0000B41800S0 Model: HP EF0600FARNA Current Temperature (C): 38 Maximum Temperature (C): 45 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 6I:1:5 Port: 6I Box: 1 Bay: 5 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 400 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H2BR0000B41800V8 Model: HP EF0600FARNA Current Temperature (C): 34 Maximum Temperature (C): 41 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 unassigned physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 500 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G55D0000N4173JLT Model: HP EF0600FARNA Current Temperature (C): 36 Maximum Temperature (C): 43 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:2 Port: 5I Box: 1 Bay: 2 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 500 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H2DM0000B41800Y0 Model: HP EF0600FARNA Current Temperature (C): 37 Maximum Temperature (C): 44 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 6I:1:6 Port: 6I Box: 1 Bay: 6 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G4WD0000N4180GEJ Model: HP EF0600FARNA Current Temperature (C): 36 Maximum Temperature (C): 44 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 6I:1:7 Port: 6I Box: 1 Bay: 7 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G54Q0000N4180W34 Model: HP EF0600FARNA Current Temperature (C): 33 Maximum Temperature (C): 39 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 SEP (Vendor ID PMCSIERA, Model SRCv24x6G) 380 Device Number: 380 Firmware Version: RevB WWID: 5001438028842E1F Vendor ID: PMCSIERA Model: SRCv24x6G ''' HPSSA_TWO_DRIVES_100GB_RAID5_50GB_RAID1 = ''' Smart Array P822 in Slot 2 Bus Interface: PCI Slot: 2 Serial Number: PDVTF0BRH5T0MO Cache Serial Number: PBKUD0BRH5T3I6 RAID 6 (ADG) Status: Enabled Controller Status: OK Hardware Revision: B Firmware Version: 4.68 Rebuild Priority: Medium Expand Priority: Medium Surface Scan Delay: 3 secs Surface Scan Mode: Idle Queue Depth: Automatic Monitor and Performance Delay: 60 min Elevator Sort: Enabled Degraded Performance Optimization: Disabled Inconsistency Repair Policy: Disabled Wait for Cache Room: Disabled Surface Analysis Inconsistency Notification: Disabled Post Prompt Timeout: 15 secs Cache Board Present: True Cache Status: OK Cache Ratio: 10% Read / 90% Write Drive Write Cache: Disabled Total Cache Size: 2.0 GB Total Cache Memory Available: 1.8 GB No-Battery Write Cache: Disabled Cache Backup Power Source: Capacitors Battery/Capacitor Count: 1 Battery/Capacitor Status: OK SATA NCQ Supported: True Spare Activation Mode: Activate on physical drive failure (default) Controller Temperature (C): 88 Cache Module Temperature (C): 38 Capacitor Temperature (C): 23 Number of Ports: 6 (2 Internal / 4 External ) Driver Name: hpsa Driver Version: 3.4.4 Driver Supports HP SSD Smart Path: True Array: A Interface Type: SAS Unused Space: 1563284 MB Status: OK MultiDomain Status: OK Array Type: Data HP SSD Smart Path: disable Logical Drive: 1 Size: 100.0 GB Fault Tolerance: 5 Heads: 255 Sectors Per Track: 32 Cylinders: 25700 Strip Size: 256 KB Full Stripe Size: 512 KB Status: OK MultiDomain Status: OK Caching: Enabled Parity Initialization Status: Queued Unique Identifier: 600508B1001CC42CDF101F06E5563967 Disk Name: /dev/sda Mount Points: None Logical Drive Label: 02715627PDVTF0BRH5T0MO154D Drive Type: Data LD Acceleration Method: Controller Cache physicaldrive 5I:1:3 Port: 5I Box: 1 Bay: 3 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 400 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G4ZN0000B41707PD Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 42 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:4 Port: 5I Box: 1 Bay: 4 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 400 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H27F0000B41800S0 Model: HP EF0600FARNA Current Temperature (C): 38 Maximum Temperature (C): 45 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 6I:1:5 Port: 6I Box: 1 Bay: 5 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 400 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H2BR0000B41800V8 Model: HP EF0600FARNA Current Temperature (C): 34 Maximum Temperature (C): 41 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 Array: B Interface Type: SAS Unused Space: 1042189 MB Status: OK MultiDomain Status: OK Array Type: Data HP SSD Smart Path: disable Logical Drive: 2 Size: 50.0 GB Fault Tolerance: 1 Heads: 255 Sectors Per Track: 32 Cylinders: 12850 Strip Size: 256 KB Full Stripe Size: 256 KB Status: OK MultiDomain Status: OK Caching: Enabled Unique Identifier: 600508B1001CE1E18302A8702C6AB008 Disk Name: /dev/sdb Mount Points: None Logical Drive Label: 06715654PDVTF0BRH5T0MOACF0 Mirror Group 0: physicaldrive 5I:1:1 (port 5I:box 1:bay 1, SAS, 600 GB, OK) Mirror Group 1: physicaldrive 5I:1:2 (port 5I:box 1:bay 2, SAS, 600 GB, OK) Drive Type: Data LD Acceleration Method: Controller Cache physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 500 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G55D0000N4173JLT Model: HP EF0600FARNA Current Temperature (C): 36 Maximum Temperature (C): 43 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:2 Port: 5I Box: 1 Bay: 2 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 500 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H2DM0000B41800Y0 Model: HP EF0600FARNA Current Temperature (C): 37 Maximum Temperature (C): 44 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 unassigned physicaldrive 6I:1:6 Port: 6I Box: 1 Bay: 6 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G4WD0000N4180GEJ Model: HP EF0600FARNA Current Temperature (C): 36 Maximum Temperature (C): 44 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 6I:1:7 Port: 6I Box: 1 Bay: 7 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G54Q0000N4180W34 Model: HP EF0600FARNA Current Temperature (C): 33 Maximum Temperature (C): 39 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 SEP (Vendor ID PMCSIERA, Model SRCv24x6G) 380 Device Number: 380 Firmware Version: RevB WWID: 5001438028842E1F Vendor ID: PMCSIERA Model: SRCv24x6G ''' HPSSA_BAD_SIZE_PHYSICAL_DRIVE = ''' Smart Array P822 in Slot 2 Bus Interface: PCI Slot: 2 Serial Number: PDVTF0BRH5T0MO Cache Serial Number: PBKUD0BRH5T3I6 RAID 6 (ADG) Status: Enabled Controller Status: OK Hardware Revision: B Firmware Version: 4.68 Wait for Cache Room: Disabled Surface Analysis Inconsistency Notification: Disabled Post Prompt Timeout: 15 secs Cache Board Present: True Cache Status: OK Drive Write Cache: Disabled Total Cache Size: 2.0 GB Total Cache Memory Available: 1.8 GB No-Battery Write Cache: Disabled Cache Backup Power Source: Capacitors Battery/Capacitor Count: 1 Battery/Capacitor Status: OK SATA NCQ Supported: True Spare Activation Mode: Activate on physical drive failure (default) Controller Temperature (C): 88 Cache Module Temperature (C): 37 Capacitor Temperature (C): 21 Number of Ports: 6 (2 Internal / 4 External ) Driver Name: hpsa Driver Version: 3.4.4 Driver Supports HP SSD Smart Path: True unassigned physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 500foo Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G55D0000N4173JLT Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 43 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 ''' HPSSA_BAD_SIZE_LOGICAL_DRIVE = ''' Smart Array P822 in Slot 2 Bus Interface: PCI Slot: 2 Serial Number: PDVTF0BRH5T0MO Cache Serial Number: PBKUD0BRH5T3I6 RAID 6 (ADG) Status: Enabled Controller Status: OK Hardware Revision: B Firmware Version: 4.68 Rebuild Priority: Medium Expand Priority: Medium Surface Scan Delay: 3 secs Surface Scan Mode: Idle Queue Depth: Automatic Monitor and Performance Delay: 60 min Elevator Sort: Enabled Degraded Performance Optimization: Disabled Inconsistency Repair Policy: Disabled Wait for Cache Room: Disabled Surface Analysis Inconsistency Notification: Disabled Post Prompt Timeout: 15 secs Cache Board Present: True Cache Status: OK Cache Ratio: 10% Read / 90% Write Drive Write Cache: Disabled Total Cache Size: 2.0 GB Total Cache Memory Available: 1.8 GB No-Battery Write Cache: Disabled Cache Backup Power Source: Capacitors Battery/Capacitor Count: 1 Battery/Capacitor Status: OK SATA NCQ Supported: True Spare Activation Mode: Activate on physical drive failure (default) Controller Temperature (C): 88 Cache Module Temperature (C): 37 Capacitor Temperature (C): 22 Number of Ports: 6 (2 Internal / 4 External ) Driver Name: hpsa Driver Version: 3.4.4 Driver Supports HP SSD Smart Path: True Array: A Interface Type: SAS Unused Space: 0 MB Status: OK MultiDomain Status: OK Array Type: Data HP SSD Smart Path: disable Logical Drive: 1 Size: 558.9foo Fault Tolerance: 1 Heads: 255 Sectors Per Track: 32 Cylinders: 65535 Strip Size: 256 KB Full Stripe Size: 256 KB Status: OK MultiDomain Status: OK Caching: Enabled Unique Identifier: 600508B1001C321CCA06EB7CD847939D Disk Name: /dev/sda Mount Points: None Logical Drive Label: 01F42227PDVTF0BRH5T0MOAB64 Mirror Group 0: physicaldrive 5I:1:1 (port 5I:box 1:bay 1, SAS, 600 GB, OK) Mirror Group 1: physicaldrive 5I:1:2 (port 5I:box 1:bay 2, SAS, 600 GB, OK) Drive Type: Data LD Acceleration Method: Controller Cache physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 500 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G55D0000N4173JLT Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 43 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:2 Port: 5I Box: 1 Bay: 2 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 500 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H2DM0000B41800Y0 Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 44 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 ''' HPSSA_SMALL_SIZE_PHYSICAL_DRIVE = ''' Smart Array P822 in Slot 2 Bus Interface: PCI Slot: 2 Serial Number: PDVTF0BRH5T0MO Cache Serial Number: PBKUD0BRH5T3I6 RAID 6 (ADG) Status: Enabled Controller Status: OK Hardware Revision: B Firmware Version: 4.68 Wait for Cache Room: Disabled Surface Analysis Inconsistency Notification: Disabled Post Prompt Timeout: 15 secs Cache Board Present: True Cache Status: OK Drive Write Cache: Disabled Total Cache Size: 2.0 GB Total Cache Memory Available: 1.8 GB No-Battery Write Cache: Disabled Cache Backup Power Source: Capacitors Battery/Capacitor Count: 1 Battery/Capacitor Status: OK SATA NCQ Supported: True Spare Activation Mode: Activate on physical drive failure (default) Controller Temperature (C): 88 Cache Module Temperature (C): 37 Capacitor Temperature (C): 21 Number of Ports: 6 (2 Internal / 4 External ) Driver Name: hpsa Driver Version: 3.4.4 Driver Supports HP SSD Smart Path: True unassigned physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 2048 MB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G55D0000N4173JLT Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 43 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 ''' ARRAY_ACCOMODATE_LOGICAL_DISK = ''' Available options are: Max: 1042188 (Units in MB) Min: 16 (Units in MB) ''' ARRAY_ACCOMODATE_LOGICAL_DISK_INVALID = ''' Error: "raid=1" is not a valid option for array A Available options are: 0 1adm 5 (default value) ''' HPSSA_NO_DRIVES_3_PHYSICAL_DISKS = ''' Smart Array P822 in Slot 2 Bus Interface: PCI Slot: 2 Serial Number: PDVTF0BRH5T0MO Cache Serial Number: PBKUD0BRH5T3I6 RAID 6 (ADG) Status: Enabled Controller Status: OK Hardware Revision: B Firmware Version: 4.68 Wait for Cache Room: Disabled Surface Analysis Inconsistency Notification: Disabled Post Prompt Timeout: 15 secs Cache Board Present: True Cache Status: OK Drive Write Cache: Disabled Total Cache Size: 2.0 GB Total Cache Memory Available: 1.8 GB No-Battery Write Cache: Disabled Cache Backup Power Source: Capacitors Battery/Capacitor Count: 1 Battery/Capacitor Status: OK SATA NCQ Supported: True Spare Activation Mode: Activate on physical drive failure (default) Controller Temperature (C): 88 Cache Module Temperature (C): 37 Capacitor Temperature (C): 21 Number of Ports: 6 (2 Internal / 4 External ) Driver Name: hpsa Driver Version: 3.4.4 Driver Supports HP SSD Smart Path: True unassigned physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 500 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G55D0000N4173JLT Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 43 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:2 Port: 5I Box: 1 Bay: 2 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H2DM0000B41800Y0 Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 44 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:3 Port: 5I Box: 1 Bay: 1 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 700 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G55D0000N4173JLT Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 43 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 SEP (Vendor ID PMCSIERA, Model SRCv24x6G) 380 Device Number: 380 Firmware Version: RevB WWID: 5001438028842E1F Vendor ID: PMCSIERA Model: SRCv24x6G ''' ONE_DRIVE_RAID_1 = ''' Smart Array P822 in Slot 2 Bus Interface: PCI Slot: 2 Serial Number: PDVTF0BRH5T0MO Cache Serial Number: PBKUD0BRH5T3I6 RAID 6 (ADG) Status: Enabled Controller Status: OK Hardware Revision: B Firmware Version: 4.68 Rebuild Priority: Medium Expand Priority: Medium Surface Scan Delay: 3 secs Surface Scan Mode: Idle Queue Depth: Automatic Monitor and Performance Delay: 60 min Elevator Sort: Enabled Degraded Performance Optimization: Disabled Inconsistency Repair Policy: Disabled Wait for Cache Room: Disabled Surface Analysis Inconsistency Notification: Disabled Post Prompt Timeout: 15 secs Cache Board Present: True Cache Status: OK Cache Ratio: 10% Read / 90% Write Drive Write Cache: Disabled Total Cache Size: 2.0 GB Total Cache Memory Available: 1.8 GB No-Battery Write Cache: Disabled Cache Backup Power Source: Capacitors Battery/Capacitor Count: 1 Battery/Capacitor Status: OK SATA NCQ Supported: True Spare Activation Mode: Activate on physical drive failure (default) Controller Temperature (C): 88 Cache Module Temperature (C): 38 Capacitor Temperature (C): 23 Number of Ports: 6 (2 Internal / 4 External ) Driver Name: hpsa Driver Version: 3.4.4 Driver Supports HP SSD Smart Path: True Array: A Interface Type: SAS Unused Space: 1042189 MB Status: OK MultiDomain Status: OK Array Type: Data HP SSD Smart Path: disable Logical Drive: 1 Size: 50.0 GB Fault Tolerance: 1 Heads: 255 Sectors Per Track: 32 Cylinders: 12850 Strip Size: 256 KB Full Stripe Size: 256 KB Status: OK MultiDomain Status: OK Caching: Enabled Unique Identifier: 600508B1001C02BDBCB659B8A264186A Disk Name: /dev/sda Mount Points: None Logical Drive Label: 02896A0EPDVTF0BRH5T0MOEBAA Mirror Group 0: physicaldrive 5I:1:1 (port 5I:box 1:bay 1, SAS, 600 GB, OK) Mirror Group 1: physicaldrive 5I:1:2 (port 5I:box 1:bay 2, SAS, 600 GB, OK) Drive Type: Data LD Acceleration Method: Controller Cache physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD5 Serial Number: 6SL7G55D0000N4173JLT Model: HP EF0600FARNA Current Temperature (C): 37 Maximum Temperature (C): 43 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:2 Port: 5I Box: 1 Bay: 2 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H2DM0000B41800Y0 Model: HP EF0600FARNA Current Temperature (C): 37 Maximum Temperature (C): 44 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 unassigned physicaldrive 5I:1:3 Port: 5I Box: 1 Bay: 1 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 500 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G55D0000N4173JLT Model: HP EF0600FARNA Current Temperature (C): 35 Maximum Temperature (C): 43 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 ''' DRIVE_2_RAID_1_OKAY_TO_SHARE = ''' Available options are: Max: 521094 (Units in MB) Min: 16 (Units in MB) ''' TWO_DRIVES_50GB_RAID1 = ''' Smart Array P822 in Slot 2 Bus Interface: PCI Slot: 2 Serial Number: PDVTF0BRH5T0MO Cache Serial Number: PBKUD0BRH5T3I6 RAID 6 (ADG) Status: Enabled Controller Status: OK Hardware Revision: B Firmware Version: 4.68 Rebuild Priority: Medium Expand Priority: Medium Surface Scan Delay: 3 secs Surface Scan Mode: Idle Queue Depth: Automatic Monitor and Performance Delay: 60 min Elevator Sort: Enabled Degraded Performance Optimization: Disabled Inconsistency Repair Policy: Disabled Wait for Cache Room: Disabled Surface Analysis Inconsistency Notification: Disabled Post Prompt Timeout: 15 secs Cache Board Present: True Cache Status: OK Cache Ratio: 10% Read / 90% Write Drive Write Cache: Disabled Total Cache Size: 2.0 GB Total Cache Memory Available: 1.8 GB No-Battery Write Cache: Disabled Cache Backup Power Source: Capacitors Battery/Capacitor Count: 1 Battery/Capacitor Status: OK SATA NCQ Supported: True Spare Activation Mode: Activate on physical drive failure (default) Controller Temperature (C): 88 Cache Module Temperature (C): 38 Capacitor Temperature (C): 23 Number of Ports: 6 (2 Internal / 4 External ) Driver Name: hpsa Driver Version: 3.4.4 Driver Supports HP SSD Smart Path: True Array: A Interface Type: SAS Unused Space: 939791 MB Status: OK MultiDomain Status: OK Array Type: Data HP SSD Smart Path: disable Logical Drive: 1 Size: 50.0 GB Fault Tolerance: 1 Heads: 255 Sectors Per Track: 32 Cylinders: 12850 Strip Size: 256 KB Full Stripe Size: 256 KB Status: OK MultiDomain Status: OK Caching: Enabled Unique Identifier: 600508B1001C02BDBCB659B8A264186A Disk Name: /dev/sda Mount Points: None Logical Drive Label: 02896A0EPDVTF0BRH5T0MOEBAA Mirror Group 0: physicaldrive 5I:1:1 (port 5I:box 1:bay 1, SAS, 600 GB, OK) Mirror Group 1: physicaldrive 5I:1:2 (port 5I:box 1:bay 2, SAS, 600 GB, OK) Drive Type: Data LD Acceleration Method: Controller Cache Logical Drive: 2 Size: 50.0 GB Fault Tolerance: 1 Heads: 255 Sectors Per Track: 32 Cylinders: 12850 Strip Size: 256 KB Full Stripe Size: 256 KB Status: OK MultiDomain Status: OK Caching: Enabled Unique Identifier: 600508B1001C1614116817E8A9DA1D2F Disk Name: /dev/sdb Mount Points: None Logical Drive Label: 06896EEAPDVTF0BRH5T0MO55C7 Mirror Group 0: physicaldrive 5I:1:1 (port 5I:box 1:bay 1, SAS, 600 GB, OK) Mirror Group 1: physicaldrive 5I:1:2 (port 5I:box 1:bay 2, SAS, 600 GB, OK) Drive Type: Data LD Acceleration Method: Controller Cache physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G55D0000N4173JLT Model: HP EF0600FARNA Current Temperature (C): 37 Maximum Temperature (C): 43 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 physicaldrive 5I:1:2 Port: 5I Box: 1 Bay: 2 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H2DM0000B41800Y0 Model: HP EF0600FARNA Current Temperature (C): 37 Maximum Temperature (C): 44 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 unassigned physicaldrive 5I:1:3 Port: 5I Box: 1 Bay: 2 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 600 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7H2DM0000B41800Y0 Model: HP EF0600FARNA Current Temperature (C): 37 Maximum Temperature (C): 44 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 SEP (Vendor ID PMCSIERA, Model SRCv24x6G) 380 Device Number: 380 Firmware Version: RevB WWID: 5001438028842E1F Vendor ID: PMCSIERA Model: SRCv24x6G ''' NO_DRIVES_HPSSA_7_DISKS = ''' Smart Array P822 in Slot 3 Bus Interface: PCI Slot: 3 Serial Number: PDVTF0BRH5T0KV unassigned physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Interface Type: SAS Size: 199 GB Firmware Revision: HPD6 Serial Number: 6SL7G4QV0000B41803GZ Model: HP EF0600FARNA physicaldrive 5I:1:2 Port: 5I Box: 1 Bay: 2 Status: OK Interface Type: SAS Size: 200 GB Firmware Revision: HPD6 Serial Number: 6SL7HK0Y0000N419008G Model: HP EF0600FARNA physicaldrive 5I:1:3 Port: 5I Box: 1 Bay: 3 Status: OK Interface Type: SAS Size: 600 GB Firmware Revision: HPD6 Serial Number: 6SL7H1L50000B4180V5Y Model: HP EF0600FARNA physicaldrive 5I:1:4 Port: 5I Box: 1 Bay: 4 Status: OK Interface Type: SAS Size: 599 GB Firmware Revision: HPD6 Serial Number: 6SL7H1K30000B41800TT Model: HP EF0600FARNA physicaldrive 6I:1:5 Port: 6I Box: 1 Bay: 5 Status: OK Interface Type: SAS Size: 598 GB Firmware Revision: HPDB Serial Number: 2AVUR97N Model: HP EF0600FATFF physicaldrive 6I:1:6 Port: 6I Box: 1 Bay: 6 Status: OK Interface Type: SAS Size: 500 GB Firmware Revision: HPDB Serial Number: 2AVVJR1N Model: HP EF0600FATFF physicaldrive 6I:1:7 Port: 6I Box: 1 Bay: 7 Status: OK Interface Type: SAS Size: 500 GB Firmware Revision: HPDB Serial Number: 2AVVENJN Model: HP EF0600FATFF ''' ONE_DRIVE_RAID_1_50_GB = ''' Smart Array P822 in Slot 3 Slot: 3 Serial Number: PDVTF0BRH5T0KV Array: A Interface Type: SAS Unused Space: 1042189 MB (91.1%) Used Space: 100.0 GB (8.9%) Logical Drive: 1 Size: 50.0 GB Fault Tolerance: 1 Status: OK MultiDomain Status: OK Unique Identifier: 600508B1001C861A72C774A7394AE2AC Disk Name: /dev/sda Logical Drive Label: 013400ABPDVTF0BRH5T0KV22C5 LD Acceleration Method: Controller Cache physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Interface Type: SAS Size: 199 GB Firmware Revision: HPD6 Serial Number: 6SL7G4QV0000B41803GZ Model: HP EF0600FARNA physicaldrive 5I:1:2 Port: 5I Box: 1 Bay: 2 Status: OK Interface Type: SAS Size: 200 GB Firmware Revision: HPD6 Serial Number: 6SL7HK0Y0000N419008G Model: HP EF0600FARNA unassigned physicaldrive 5I:1:3 Port: 5I Box: 1 Bay: 3 Status: OK Interface Type: SAS Size: 600 GB Firmware Revision: HPD6 Serial Number: 6SL7H1L50000B4180V5Y Model: HP EF0600FARNA physicaldrive 5I:1:4 Port: 5I Box: 1 Bay: 4 Status: OK Interface Type: SAS Size: 599 GB Firmware Revision: HPD6 Serial Number: 6SL7H1K30000B41800TT Model: HP EF0600FARNA physicaldrive 6I:1:5 Port: 6I Box: 1 Bay: 5 Status: OK Interface Type: SAS Size: 598 GB Firmware Revision: HPDB Serial Number: 2AVUR97N Model: HP EF0600FATFF physicaldrive 6I:1:6 Port: 6I Box: 1 Bay: 6 Status: OK Interface Type: SAS Size: 500 GB Firmware Revision: HPDB Serial Number: 2AVVJR1N Model: HP EF0600FATFF physicaldrive 6I:1:7 Port: 6I Box: 1 Bay: 7 Status: OK Interface Type: SAS Size: 500 GB Firmware Revision: HPDB Serial Number: 2AVVENJN Model: HP EF0600FATFF ''' TWO_DRIVES_50GB_RAID1_MAXGB_RAID5 = ''' Smart Array P822 in Slot 3 Slot: 3 Serial Number: PDVTF0BRH5T0KV Array: A Interface Type: SAS Unused Space: 1042189 MB (91.1%) Used Space: 100.0 GB (8.9%) Status: OK Logical Drive: 1 Size: 50.0 GB Fault Tolerance: 1 Status: OK Unique Identifier: 600508B1001C861A72C774A7394AE2AC Disk Name: /dev/sda physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Interface Type: SAS Size: 199 GB Firmware Revision: HPD6 Serial Number: 6SL7G4QV0000B41803GZ Model: HP EF0600FARNA physicaldrive 5I:1:2 Port: 5I Box: 1 Bay: 2 Status: OK Interface Type: SAS Size: 200 GB Firmware Revision: HPD6 Serial Number: 6SL7HK0Y0000N419008G Model: HP EF0600FARNA Array: B Interface Type: SAS Unused Space: 0 MB (0.0%) Used Space: 1.6 TB (100.0%) Status: OK MultiDomain Status: OK Array Type: Data HP SSD Smart Path: disable Logical Drive: 2 Size: 1.1 TB Fault Tolerance: 5 Status: OK Unique Identifier: 600508B1001CE9DE8551AEE29D5A72F7 physicaldrive 5I:1:3 Port: 5I Box: 1 Bay: 3 Status: OK Interface Type: SAS Size: 600 GB Firmware Revision: HPD6 Serial Number: 6SL7H1L50000B4180V5Y Model: HP EF0600FARNA physicaldrive 5I:1:4 Port: 5I Box: 1 Bay: 4 Status: OK Interface Type: SAS Size: 599 GB Firmware Revision: HPD6 Serial Number: 6SL7H1K30000B41800TT Model: HP EF0600FARNA physicaldrive 6I:1:5 Port: 6I Box: 1 Bay: 5 Status: OK Interface Type: SAS Size: 598 GB Firmware Revision: HPDB Serial Number: 2AVUR97N Model: HP EF0600FATFF unassigned physicaldrive 6I:1:6 Port: 6I Box: 1 Bay: 6 Status: OK Interface Type: SAS Size: 500 GB Firmware Revision: HPDB Serial Number: 2AVVJR1N physicaldrive 6I:1:7 Port: 6I Box: 1 Bay: 7 Status: OK Interface Type: SAS Size: 500 GB Firmware Revision: HPDB Serial Number: 2AVVENJN Model: HP EF0600FATFF ''' HPSSA_HBA_MODE = ''' Smart Array P822 in Slot 3 Bus Interface: PCI Slot: 3 Serial Number: PDVTF0BRH5T0KV Cache Serial Number: PBKUD0BRH5T3UM RAID 6 (ADG) Status: Enabled Controller Status: OK Hardware Revision: B Firmware Version: 5.22 Cache Board Present: True Cache Status: Not Configured Total Cache Size: 2.0 GB Total Cache Memory Available: 1.8 GB Cache Backup Power Source: Capacitors Battery/Capacitor Count: 1 Battery/Capacitor Status: OK Controller Temperature (C): 88 Cache Module Temperature (C): 37 Capacitor Temperature (C): 24 Number of Ports: 6 (2 Internal / 4 External ) Driver Name: hpsa Driver Version: 3.4.14 HBA Mode Enabled: True PCI Address (Domain:Bus:Device.Function): 0000:0D:00.0 Host Serial Number: SGH401AERD Sanitize Erase Supported: False Primary Boot Volume: None Secondary Boot Volume: None Port Name: 5I Port ID: 0 Port Connection Number: 0 SAS Address: 5001438028842E40 Port Location: Internal Internal Drive Cage at Port 5I, Box 1, OK Power Supply Status: Not Redundant Drive Bays: 4 Port: 5I Box: 1 Location: Internal Physical Drives physicaldrive 5I:1:1 (port 5I:box 1:bay 1, SAS, 600 GB, OK) unassigned physicaldrive 5I:1:1 Port: 5I Box: 1 Bay: 1 Status: OK Drive Type: HBA Mode Drive Interface Type: SAS Size: 600 GB Drive exposed to OS: True Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G4QV0000B41803GZ Model: HP EF0600FARNA Current Temperature (C): 36 Maximum Temperature (C): 45 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 Disk Name: /dev/sda Mount Points: None Sanitize Erase Supported: False ''' SSA_ERASE_DRIVE = ''' Smart Array P440 in Slot 2 Bus Interface: PCI Slot: 2 Serial Number: PDNMF0ARH8Y342 RAID 6 (ADG) Status: Enabled Controller Status: OK Firmware Version: 4.52-0 Spare Activation Mode: Activate on physical drive failure (default) Encryption: Disabled Driver Name: hpsa Driver Version: 3.4.16 Controller Mode: RAID Pending Controller Mode: RAID Controller Mode Reboot: Not Required Host Serial Number: SGH537Y7AY Sanitize Erase Supported: True Primary Boot Volume: None Secondary Boot Volume: None Port Name: 1I Port ID: 0 Port Connection Number: 0 SAS Address: 5001438035544EC0 Port Location: Internal Managed Cable Connected: False Physical Drives physicaldrive 1I:2:1 (port 1I:box 2:bay 1, SAS HDD, 300 GB, OK) unassigned physicaldrive 1I:2:1 Port: 1I Box: 2 Bay: 1 Status: OK Drive Type: Unassigned Drive Interface Type: SAS Size: 300 GB Drive exposed to OS: False Logical/Physical Block Size: 512/512 Rotational Speed: 15100 Firmware Revision: HPD4 Serial Number: S7K0C3FJ0000K601EZLM WWID: 5000C5008E183B1D Model: HP EH0300JEDHC Current Temperature (C): 42 Maximum Temperature (C): 52 PHY Count: 2 PHY Transfer Rate: 12.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 Sanitize Erase Supported: True Sanitize Estimated Max Erase Time: 0 hour(s)36 minute(s) Unrestricted Sanitize Supported: False Shingled Magnetic Recording Support: None physicaldrive 6I:1:7 Port: 6I Box: 1 Bay: 7 Status: OK Drive Type: Unassigned Drive Interface Type: Solid State SAS Size: 200 GB Native Block Size: 512 Rotational Speed: 15000 Firmware Revision: HPD6 Serial Number: 6SL7G54Q0000N4180W34 Model: HP EF0600FARNA Current Temperature (C): 31 Maximum Temperature (C): 39 PHY Count: 2 PHY Transfer Rate: 6.0Gbps, Unknown Drive Authentication Status: OK Carrier Application Version: 11 Carrier Bootloader Version: 6 ''' SSA_ERASE_IN_PROGRESS = ''' Smart Array P440 in Slot 2 Controller Mode: RAID Pending Controller Mode: RAID Sanitize Erase Supported: True Primary Boot Volume: None Secondary Boot Volume: None unassigned physicaldrive 1I:2:1 Drive Type: Unassigned Drive Interface Type: SAS Size: 300 GB Status: Erase In Progress Drive Type: Unassigned Drive Sanitize Erase Supported: True Sanitize Estimated Max Erase Time: 0 hour(s)36 minute(s) Unrestricted Sanitize Supported: False ''' SSA_ERASE_COMPLETE = ''' Smart Array P440 in Slot 2 Controller Mode: RAID Pending Controller Mode: RAID Sanitize Erase Supported: True Primary Boot Volume: None Secondary Boot Volume: None unassigned physicaldrive 1I:2:1 Drive Type: Unassigned Drive Interface Type: SAS Size: 300 GB Status: Erase Complete. Reenable Before Using. Drive Type: Unassigned Drive Sanitize Erase Supported: True Sanitize Estimated Max Erase Time: 0 hour(s)36 minute(s) Unrestricted Sanitize Supported: False ''' SSA_ERASE_NOT_SUPPORTED = ''' Smart Array P440 in Slot 2 Controller Status: OK Firmware Version: 4.52-0 Spare Activation Mode: Activate on physical drive failure (default) Controller Mode: RAID Pending Controller Mode: RAID Controller Mode Reboot: Not Required Sanitize Erase Supported: False Primary Boot Volume: None Secondary Boot Volume: None unassigned physicaldrive 1I:2:1 Drive Type: Unassigned Drive Interface Type: SAS Size: 300 GB Status: OK Drive Type: Unassigned Drive Sanitize Erase Supported: False Sanitize Estimated Max Erase Time: 0 hour(s)36 minute(s) Unrestricted Sanitize Supported: False ''' SSA_ERASE_COMPLETE_NOT_SUPPORTED = ''' Smart Array P440 in Slot 2 Controller Status: OK Firmware Version: 4.52-0 Spare Activation Mode: Activate on physical drive failure (default) Controller Mode: RAID Pending Controller Mode: RAID Controller Mode Reboot: Not Required Sanitize Erase Supported: False Primary Boot Volume: None Secondary Boot Volume: None unassigned physicaldrive 1I:2:1 Drive Type: Unassigned Drive Interface Type: SAS Size: 300 GB Status: Erase Complete. Reenable Before Using. Drive Type: Unassigned Drive Sanitize Erase Supported: False Sanitize Estimated Max Erase Time: 0 hour(s)36 minute(s) Unrestricted Sanitize Supported: False ''' SSA_ERASE_IN_PROGRESS_NOT_SUPPORTED = ''' Smart Array P440 in Slot 2 Controller Mode: RAID Pending Controller Mode: RAID Sanitize Erase Supported: True Primary Boot Volume: None Secondary Boot Volume: None unassigned physicaldrive 1I:2:1 Drive Type: Unassigned Drive Interface Type: SAS Size: 300 GB Status: Erase In Progress Drive Type: Unassigned Drive Sanitize Erase Supported: False Sanitize Estimated Max Erase Time: 0 hour(s)36 minute(s) Unrestricted Sanitize Supported: False ''' SSACLI_PARSING_TESTS = ''' Smart HBA H240 in Slot 1 (RAID Mode) Slot: 1 Controller Mode: RAID Mode Internal Drive Cage at Port 1I, Box 1, OK Drive Bays: 4 Port: 1I Box: 1 Physical Drives physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS HDD, 900 GB, OK) physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS HDD, 900 GB, OK) Internal Drive Cage at Port 2I, Box 1, OK Drive Bays: 4 Port: 2I Box: 1 Physical Drives physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS HDD, 900 GB, OK) physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS HDD, 900 GB, OK) Unassigned physicaldrive 1I:1:4 Port: 1I Box: 1 Bay: 4 Size: 900 GB Interface Type: SAS Smart HBA H240 in Slot 2 (RAID Mode) Slot: 2 Controller Mode: RAID Mode PCI Address (Domain:Bus:Device.Function): 0000:0B:00.0 Array: H Interface Type: SAS Logical Drive: 8 Size: 838.3 GB Status: OK physicaldrive 2I:2:8 Port: 2I Box: 2 Bay: 8 Size: 900 GB Interface Type: SAS Smart HBA H240 in Slot 3 (RAID Mode) Slot: 3 Controller Mode: RAID Mode Smart HBA H240ar in Slot 0 (Embedded) (RAID Mode) Bus Interface: PCI Slot: 0 ''' ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/hpssa/test_disk_allocator.py0000664000175000017500000002701700000000000026337 0ustar00zuulzuul00000000000000# Copyright 2015 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from unittest import mock import testtools from proliantutils import exception from proliantutils.hpssa import disk_allocator from proliantutils.hpssa import objects from proliantutils.tests.hpssa import raid_constants @mock.patch.object(objects.Server, '_get_all_details') class DiskAllocatorTestCase(testtools.TestCase): def test__get_criteria_matching_disks_all_criterias(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() physical_drives = server.controllers[0].unassigned_physical_drives logical_disk = {'size_gb': 100, 'raid_level': '1', 'disk_type': 'hdd', 'interface_type': 'sas', 'model': 'HP EF0600FARNA', 'firmware': 'HPD6'} ret_physical_drives = disk_allocator._get_criteria_matching_disks( logical_disk, physical_drives) self.assertEqual(ret_physical_drives, physical_drives) def test__get_criteria_matching_disks_not_all_criterias( self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() physical_drives = server.controllers[0].unassigned_physical_drives logical_disk = {'size_gb': 100, 'raid_level': '1', 'disk_type': 'hdd', 'interface_type': 'sas', 'firmware': 'HPD6'} ret_physical_drives = disk_allocator._get_criteria_matching_disks( logical_disk, physical_drives) self.assertEqual(ret_physical_drives, physical_drives) def test__get_criteria_matching_disks_some_disks_dont_match( self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() physical_drives = server.controllers[0].unassigned_physical_drives logical_disk = {'size_gb': 100, 'raid_level': '1', 'disk_type': 'hdd', 'interface_type': 'sas', 'firmware': 'HPD6'} physical_drives[0].disk_type = 'ssd' physical_drives[1].firmware = 'HPD7' ret_physical_drives = disk_allocator._get_criteria_matching_disks( logical_disk, physical_drives) exp_physical_drives = physical_drives[2:] self.assertEqual(exp_physical_drives, ret_physical_drives) def test__get_criteria_matching_disks_no_disks_match( self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() physical_drives = server.controllers[0].unassigned_physical_drives logical_disk = {'size_gb': 100, 'raid_level': '1', 'disk_type': 'ssdd', 'interface_type': 'sas', 'firmware': 'HPD6'} ret_physical_drives = disk_allocator._get_criteria_matching_disks( logical_disk, physical_drives) self.assertFalse(ret_physical_drives) def test_allocate_disks_okay(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() logical_disk = {'size_gb': 100, 'raid_level': '1', 'disk_type': 'hdd', 'interface_type': 'sas'} # Decrease size of two disks so that they get selected. disk1 = server.controllers[0].get_physical_drive_by_id('5I:1:3') disk2 = server.controllers[0].get_physical_drive_by_id('6I:1:7') disk1.size_gb = 300 disk2.size_gb = 300 raid_config = {'logical_disks': [logical_disk]} disk_allocator.allocate_disks(logical_disk, server, raid_config) self.assertEqual('Smart Array P822 in Slot 2', logical_disk['controller']) self.assertEqual(sorted(['5I:1:3', '6I:1:7']), sorted(logical_disk['physical_disks'])) def test_allocate_disks_max_okay(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() logical_disk = {'size_gb': 'MAX', 'raid_level': '1', 'disk_type': 'hdd', 'interface_type': 'sas'} # Decrease size of three disks so that the remaining gets # selected. disk1 = server.controllers[0].get_physical_drive_by_id('5I:1:3') disk2 = server.controllers[0].get_physical_drive_by_id('6I:1:7') disk3 = server.controllers[0].get_physical_drive_by_id('5I:1:4') disk1.size_gb = 300 disk2.size_gb = 300 disk3.size_gb = 300 raid_config = {'logical_disks': [logical_disk]} disk_allocator.allocate_disks(logical_disk, server, raid_config) self.assertEqual('Smart Array P822 in Slot 2', logical_disk['controller']) self.assertEqual(sorted(['6I:1:5', '6I:1:6']), sorted(logical_disk['physical_disks'])) def test_allocate_disks_disk_size_not_matching(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() logical_disk = {'size_gb': 700, 'raid_level': '1', 'disk_type': 'hdd', 'interface_type': 'sas'} raid_config = {'logical_disks': [logical_disk]} exc = self.assertRaises(exception.PhysicalDisksNotFoundError, disk_allocator.allocate_disks, logical_disk, server, raid_config) self.assertIn("of size 700 GB and raid level 1", str(exc)) def test_allocate_disks_disk_not_enough_disks(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() physical_drives = server.controllers[0].unassigned_physical_drives physical_drives = physical_drives[:2] server.controllers[0].unassigned_physical_drives = physical_drives logical_disk = {'size_gb': 600, 'raid_level': '5', 'disk_type': 'hdd', 'interface_type': 'sas'} raid_config = {'logical_disks': [logical_disk]} exc = self.assertRaises(exception.PhysicalDisksNotFoundError, disk_allocator.allocate_disks, logical_disk, server, raid_config) self.assertIn("of size 600 GB and raid level 5", str(exc)) @mock.patch.object(objects.Controller, 'execute_cmd') def test_allocate_disks_share_physical_disks(self, execute_mock, get_all_details_mock): get_all_details_mock.return_value = raid_constants.ONE_DRIVE_RAID_1 execute_mock.return_value = ( raid_constants.DRIVE_2_RAID_1_OKAY_TO_SHARE, None) rdh = {'wwn': '0x600508b1001c02bd'} controller = 'Smart Array P822 in Slot 2' physical_disks = ['5I:1:1', '5I:1:2'] raid_config = {'logical_disks': [{'size_gb': 50, 'raid_level': '1', 'share_physical_disks': True, 'root_device_hint': rdh, 'controller': controller, 'physical_disks': physical_disks}, {'size_gb': 50, 'raid_level': '1', 'share_physical_disks': True}]} logical_disk = raid_config['logical_disks'][1] server = objects.Server() disk_allocator.allocate_disks(logical_disk, server, raid_config) self.assertEqual(controller, logical_disk['controller']) self.assertEqual('A', logical_disk['array']) self.assertNotIn('physical_disks', logical_disk) @mock.patch.object(objects.Controller, 'execute_cmd') def test_allocate_disks_share_physical_disks_no_space( self, execute_mock, get_all_details_mock): get_all_details_mock.return_value = raid_constants.ONE_DRIVE_RAID_1 execute_mock.return_value = ( raid_constants.DRIVE_2_RAID_1_OKAY_TO_SHARE, None) rdh = {'wwn': '0x600508b1001c02bd'} controller = 'Smart Array P822 in Slot 2' physical_disks = ['5I:1:1', '5I:1:2'] raid_config = {'logical_disks': [{'size_gb': 50, 'raid_level': '1', 'share_physical_disks': True, 'root_device_hint': rdh, 'controller': controller, 'physical_disks': physical_disks}, {'size_gb': 600, 'raid_level': '1', 'share_physical_disks': True}]} logical_disk = raid_config['logical_disks'][1] server = objects.Server() self.assertRaises(exception.PhysicalDisksNotFoundError, disk_allocator.allocate_disks, logical_disk, server, raid_config) def test_allocate_disks_share_physical_disks_criteria_mismatch( self, get_all_details_mock): # Both the drives don't have firmware HPD6 get_all_details_mock.return_value = raid_constants.ONE_DRIVE_RAID_1 rdh = {'wwn': '0x600508b1001c02bd'} controller = 'Smart Array P822 in Slot 2' physical_disks = ['5I:1:1', '5I:1:2'] raid_config = {'logical_disks': [{'size_gb': 50, 'raid_level': '1', 'share_physical_disks': True, 'root_device_hint': rdh, 'controller': controller, 'physical_disks': physical_disks}, {'size_gb': 50, 'raid_level': '1', 'firmware': 'HPD6', 'share_physical_disks': True}]} logical_disk = raid_config['logical_disks'][1] server = objects.Server() self.assertRaises(exception.PhysicalDisksNotFoundError, disk_allocator.allocate_disks, logical_disk, server, raid_config) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/hpssa/test_manager.py0000664000175000017500000007111500000000000024755 0ustar00zuulzuul00000000000000# Copyright 2014 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 time from unittest import mock import testtools from proliantutils import exception from proliantutils.hpssa import manager from proliantutils.hpssa import objects from proliantutils.tests.hpssa import raid_constants @mock.patch.object(objects.Server, '_get_all_details') class ManagerTestCases(testtools.TestCase): def _test_create_configuration_with_disk_input(self, controller_exec_cmd_mock, get_all_details_mock): ld1 = {'size_gb': 50, 'raid_level': '1', 'controller': 'Smart Array P822 in Slot 2', 'physical_disks': ['5I:1:1', '5I:1:2']} ld2 = {'size_gb': 100, 'raid_level': '5', 'controller': 'Smart Array P822 in Slot 2', 'physical_disks': ['5I:1:3', '5I:1:4', '6I:1:5']} raid_info = {'logical_disks': [ld1, ld2]} current_config = manager.create_configuration(raid_info) ld1_drives = '5I:1:1,5I:1:2' ld2_drives = '5I:1:3,5I:1:4,6I:1:5' controller_exec_cmd_mock.assert_any_call("create", "type=logicaldrive", "drives=%s" % ld2_drives, "raid=5", "size=%d" % (100 * 1024), process_input='y') # Verify that we created the 50GB disk the last. controller_exec_cmd_mock.assert_called_with("create", "type=logicaldrive", "drives=%s" % ld1_drives, "raid=1", "size=%d" % (50 * 1024), process_input='y') ld1_ret = [x for x in current_config['logical_disks'] if x['raid_level'] == '1'][0] ld2_ret = [x for x in current_config['logical_disks'] if x['raid_level'] == '5'][0] self.assertIsNotNone(ld1_ret['root_device_hint']['wwn']) self.assertIsNotNone(ld2_ret['root_device_hint']['wwn']) self.assertIsNotNone(ld1_ret['volume_name']) self.assertIsNotNone(ld2_ret['volume_name']) # Assert physical disk info pds_active = [x['id'] for x in current_config['physical_disks'] if x['status'] == 'active'] pds_ready = [x['id'] for x in current_config['physical_disks'] if x['status'] == 'ready'] pds_active_expected = ['5I:1:3', '5I:1:4', '6I:1:5', '5I:1:1', '5I:1:2'] pds_ready_expected = ['6I:1:6', '6I:1:7'] self.assertEqual(sorted(pds_active_expected), sorted(pds_active)) self.assertEqual(sorted(pds_ready_expected), sorted(pds_ready)) @mock.patch.object(objects.Controller, 'execute_cmd') def test_create_configuration_with_disk_input_create_succeeds( self, controller_exec_cmd_mock, get_all_details_mock): no_drives = raid_constants.HPSSA_NO_DRIVES one_drive = raid_constants.HPSSA_ONE_DRIVE_100GB_RAID_5 two_drives = raid_constants.HPSSA_TWO_DRIVES_100GB_RAID5_50GB_RAID1 get_all_details_mock.side_effect = [no_drives, one_drive, two_drives] self._test_create_configuration_with_disk_input( controller_exec_cmd_mock, get_all_details_mock) @mock.patch.object(objects.Controller, 'execute_cmd') def test_create_configuration_with_disk_input_create_fails( self, controller_exec_cmd_mock, get_all_details_mock): no_drives = raid_constants.HPSSA_NO_DRIVES one_drive = raid_constants.HPSSA_ONE_DRIVE_100GB_RAID_5 get_all_details_mock.side_effect = [no_drives, one_drive, one_drive] ex = self.assertRaises(exception.HPSSAOperationError, self._test_create_configuration_with_disk_input, controller_exec_cmd_mock, get_all_details_mock) self.assertIn("raid_level '1' and size 50 GB not found", str(ex)) def test_create_configuration_invalid_logical_disks(self, get_all_details_mock): drives = raid_constants.HPSSA_NO_DRIVES get_all_details_mock.return_value = drives raid_info = {} self.assertRaises(exception.InvalidInputError, manager.create_configuration, raid_info) raid_info = {'logical_disks': 'foo'} self.assertRaises(exception.InvalidInputError, manager.create_configuration, raid_info) no_drives = raid_constants.HPSSA_NO_DRIVES get_all_details_mock.return_value = no_drives raid_info = {'logical_disks': [ {'size_gb': 50, 'raid_level': '1', 'controller': 'Smart Array P822 in Slot 0', 'physical_disks': ["6I:1:5", "6I:1:6"]}]} msg = ("Invalid Input: Unable to find controller named 'Smart Array " "P822 in Slot 0'. The available controllers are " "'Smart Array P822 in Slot 2'.") ex = self.assertRaises(exception.InvalidInputError, manager.create_configuration, raid_info) self.assertEqual(msg, str(ex)) @mock.patch.object(objects.Controller, 'execute_cmd') def test_create_configuration_without_disk_input_succeeds( self, controller_exec_cmd_mock, get_all_details_mock): no_drives = raid_constants.HPSSA_NO_DRIVES one_drive = raid_constants.HPSSA_ONE_DRIVE_100GB_RAID_5 two_drives = raid_constants.HPSSA_TWO_DRIVES_100GB_RAID5_50GB_RAID1 get_all_details_mock.side_effect = [no_drives, one_drive, two_drives] raid_info = {'logical_disks': [{'size_gb': 50, 'raid_level': '1'}, {'size_gb': 100, 'raid_level': '5'}]} current_config = manager.create_configuration(raid_info) controller_exec_cmd_mock.assert_any_call("create", "type=logicaldrive", mock.ANY, "raid=5", "size=%d" % (100 * 1024), process_input='y') # Verify that we created the 50GB disk the last. controller_exec_cmd_mock.assert_called_with("create", "type=logicaldrive", mock.ANY, "raid=1", "size=%d" % (50 * 1024), process_input='y') ld1_ret = [x for x in current_config['logical_disks'] if x['raid_level'] == '1'][0] ld2_ret = [x for x in current_config['logical_disks'] if x['raid_level'] == '5'][0] self.assertEqual('0x600508b1001cc42c', ld2_ret['root_device_hint']['wwn']) self.assertEqual('0x600508b1001ce1e1', ld1_ret['root_device_hint']['wwn']) @mock.patch.object(objects.Controller, 'execute_cmd') def test_create_configuration_without_disk_input_fails_on_disk_type( self, controller_exec_cmd_mock, get_all_details_mock): no_drives = raid_constants.HPSSA_NO_DRIVES one_drive = raid_constants.HPSSA_ONE_DRIVE_100GB_RAID_5 two_drives = raid_constants.HPSSA_TWO_DRIVES_100GB_RAID5_50GB_RAID1 get_all_details_mock.side_effect = [no_drives, one_drive, two_drives] raid_info = {'logical_disks': [{'size_gb': 50, 'raid_level': '1', 'disk_type': 'ssd'}, {'size_gb': 100, 'raid_level': '5', 'disk_type': 'hdd'}]} exc = self.assertRaises(exception.PhysicalDisksNotFoundError, manager.create_configuration, raid_info) self.assertIn("of size 50 GB and raid level 1", str(exc)) def test_create_configuration_hba_enabled(self, get_all_details_mock): drives = raid_constants.HPSSA_HBA_MODE get_all_details_mock.return_value = drives raid_info = {'logical_disks': 'foo'} msg = ("An error was encountered while doing ssa configuration: None" " of the available SSA controllers Smart Array P822 in " "Slot 3 have RAID enabled") ex = self.assertRaises(exception.HPSSAOperationError, manager.create_configuration, raid_info) self.assertIn(msg, str(ex)) @mock.patch.object(objects.Controller, 'execute_cmd') def test_create_configuration_share_physical_disks( self, controller_exec_cmd_mock, get_all_details_mock): no_drives = raid_constants.HPSSA_NO_DRIVES_3_PHYSICAL_DISKS one_drive = raid_constants.ONE_DRIVE_RAID_1 two_drives = raid_constants.TWO_DRIVES_50GB_RAID1 get_all_details_mock.side_effect = [no_drives, one_drive, two_drives] controller_exec_cmd_mock.side_effect = [ (None, None), (raid_constants.DRIVE_2_RAID_1_OKAY_TO_SHARE, None), (None, None)] raid_info = {'logical_disks': [{'size_gb': 50, 'share_physical_disks': True, 'number_of_physical_disks': 2, 'raid_level': '0', 'disk_type': 'hdd'}, {'size_gb': 50, 'share_physical_disks': True, 'raid_level': '1', 'disk_type': 'hdd'}]} raid_info = manager.create_configuration(raid_info) ld1 = raid_info['logical_disks'][0] ld2 = raid_info['logical_disks'][1] self.assertEqual('Smart Array P822 in Slot 2', ld1['controller']) self.assertEqual('Smart Array P822 in Slot 2', ld2['controller']) self.assertEqual(sorted(['5I:1:1', '5I:1:2']), sorted(ld1['physical_disks'])) self.assertEqual(sorted(['5I:1:1', '5I:1:2']), sorted(ld2['physical_disks'])) controller_exec_cmd_mock.assert_any_call( 'create', 'type=logicaldrive', 'drives=5I:1:1,5I:1:2', 'raid=1', 'size=51200', process_input='y') controller_exec_cmd_mock.assert_any_call( 'array', 'A', 'create', 'type=logicaldrive', 'raid=0', 'size=?', dont_transform_to_hpssa_exception=True) controller_exec_cmd_mock.assert_any_call( 'array', 'A', 'create', 'type=logicaldrive', 'raid=0', 'size=51200', process_input='y') @mock.patch.object(objects.Controller, 'execute_cmd') def test_create_configuration_share_nonshare_physical_disks( self, controller_exec_cmd_mock, get_all_details_mock): no_drives = raid_constants.HPSSA_NO_DRIVES_3_PHYSICAL_DISKS one_drive = raid_constants.ONE_DRIVE_RAID_1 two_drives = raid_constants.TWO_DRIVES_50GB_RAID1 get_all_details_mock.side_effect = [no_drives, one_drive, two_drives] controller_exec_cmd_mock.side_effect = [ (None, None), (raid_constants.DRIVE_2_RAID_1_OKAY_TO_SHARE, None), (None, None)] raid_info = {'logical_disks': [{'size_gb': 50, 'raid_level': '1', 'disk_type': 'hdd'}, {'size_gb': 50, 'share_physical_disks': True, 'raid_level': '0', 'disk_type': 'hdd'}]} raid_info = manager.create_configuration(raid_info) ld1 = raid_info['logical_disks'][0] ld2 = raid_info['logical_disks'][1] self.assertEqual('Smart Array P822 in Slot 2', ld1['controller']) self.assertEqual('Smart Array P822 in Slot 2', ld2['controller']) self.assertEqual(sorted(['5I:1:1', '5I:1:2']), sorted(ld1['physical_disks'])) self.assertEqual(sorted(['5I:1:1', '5I:1:2']), sorted(ld2['physical_disks'])) controller_exec_cmd_mock.assert_any_call( 'create', 'type=logicaldrive', 'drives=5I:1:1,5I:1:2', 'raid=1', 'size=51200', process_input='y') controller_exec_cmd_mock.assert_any_call( 'create', 'type=logicaldrive', 'drives=5I:1:3', 'raid=0', 'size=51200', process_input='y') @mock.patch.object(objects.Controller, 'execute_cmd') def test_create_configuration_max_as_size_gb( self, controller_exec_cmd_mock, get_all_details_mock): no_drives = raid_constants.NO_DRIVES_HPSSA_7_DISKS one_drive = raid_constants.ONE_DRIVE_RAID_1_50_GB two_drives = raid_constants.TWO_DRIVES_50GB_RAID1_MAXGB_RAID5 get_all_details_mock.side_effect = [no_drives, one_drive, two_drives] raid_info = {'logical_disks': [{'size_gb': 50, 'raid_level': '1', 'disk_type': 'hdd'}, {'size_gb': 'MAX', 'raid_level': '5', 'disk_type': 'hdd'}]} raid_info = manager.create_configuration(raid_info) ld1 = raid_info['logical_disks'][0] ld2 = raid_info['logical_disks'][1] self.assertEqual('Smart Array P822 in Slot 3', ld1['controller']) self.assertEqual('Smart Array P822 in Slot 3', ld2['controller']) self.assertEqual(sorted(['5I:1:1', '5I:1:2']), sorted(ld1['physical_disks'])) self.assertEqual(sorted(['5I:1:3', '5I:1:4', '6I:1:5']), sorted(ld2['physical_disks'])) controller_exec_cmd_mock.assert_any_call( 'create', 'type=logicaldrive', 'drives=5I:1:1,5I:1:2', 'raid=1', 'size=51200', process_input='y') controller_exec_cmd_mock.assert_any_call( 'create', 'type=logicaldrive', 'drives=5I:1:3,5I:1:4,6I:1:5', 'raid=5', process_input='y') def test__sort_shared_logical_disks(self, get_all_details_mock): logical_disk_sorted_expected = [ {'size_gb': 500, 'disk_type': 'hdd', 'raid_level': '1'}, {'share_physical_disks': True, 'size_gb': 450, 'disk_type': 'hdd', 'number_of_physical_disks': 6, 'raid_level': '0'}, {'share_physical_disks': True, 'size_gb': 200, 'disk_type': 'hdd', 'raid_level': '1+0'}, {'share_physical_disks': True, 'size_gb': 200, 'disk_type': 'hdd', 'raid_level': '0'}, {'share_physical_disks': True, 'size_gb': 100, 'disk_type': 'hdd', 'raid_level': '0'}] logical_disks = [{'size_gb': 500, 'disk_type': 'hdd', 'raid_level': '1'}, {'share_physical_disks': True, 'size_gb': 450, 'disk_type': 'hdd', 'number_of_physical_disks': 6, 'raid_level': '0'}, {'share_physical_disks': True, 'size_gb': 200, 'disk_type': 'hdd', 'raid_level': '1+0'}, {'share_physical_disks': True, 'size_gb': 200, 'disk_type': 'hdd', 'raid_level': '0'}, {'share_physical_disks': True, 'size_gb': 100, 'disk_type': 'hdd', 'raid_level': '0'}] logical_disks_sorted = manager._sort_shared_logical_disks( logical_disks) self.assertEqual(logical_disks_sorted, logical_disk_sorted_expected) def test__sort_shared_logical_disks_raid10(self, get_all_details_mock): logical_disk_sorted_expected = [ {'size_gb': 600, 'disk_type': 'hdd', 'raid_level': '1'}, {'share_physical_disks': False, 'size_gb': 400, 'disk_type': 'hdd', 'raid_level': '1+0'}, {'share_physical_disks': False, 'size_gb': 100, 'disk_type': 'hdd', 'raid_level': '5'}, {'share_physical_disks': True, 'size_gb': 550, 'disk_type': 'hdd', 'raid_level': '1'}, {'share_physical_disks': True, 'size_gb': 200, 'disk_type': 'hdd', 'raid_level': '1+0'}, {'share_physical_disks': True, 'size_gb': 450, 'disk_type': 'hdd', 'number_of_physical_disks': 5, 'raid_level': '0'}, {'share_physical_disks': True, 'size_gb': 300, 'disk_type': 'hdd', 'raid_level': '5'}] logical_disks = [ {'size_gb': 600, 'disk_type': 'hdd', 'raid_level': '1'}, {'share_physical_disks': True, 'size_gb': 550, 'disk_type': 'hdd', 'raid_level': '1'}, {'share_physical_disks': True, 'size_gb': 450, 'disk_type': 'hdd', 'number_of_physical_disks': 5, 'raid_level': '0'}, {'share_physical_disks': False, 'size_gb': 400, 'disk_type': 'hdd', 'raid_level': '1+0'}, {'share_physical_disks': True, 'size_gb': 300, 'disk_type': 'hdd', 'raid_level': '5'}, {'share_physical_disks': True, 'size_gb': 200, 'disk_type': 'hdd', 'raid_level': '1+0'}, {'share_physical_disks': False, 'size_gb': 100, 'disk_type': 'hdd', 'raid_level': '5'}] logical_disks_sorted = manager._sort_shared_logical_disks( logical_disks) self.assertEqual(logical_disks_sorted, logical_disk_sorted_expected) @mock.patch.object(manager, 'get_configuration') @mock.patch.object(objects.Controller, 'execute_cmd') def test_delete_configuration(self, controller_exec_cmd_mock, get_configuration_mock, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE get_configuration_mock.return_value = 'foo' ret = manager.delete_configuration() controller_exec_cmd_mock.assert_called_with( "logicaldrive", "all", "delete", "forced") get_configuration_mock.assert_called_once_with() self.assertEqual('foo', ret) @mock.patch.object(manager, 'get_configuration') @mock.patch.object(objects.Controller, 'execute_cmd') def test_delete_configuration_no_arrays( self, controller_exec_cmd_mock, get_configuration_mock, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_NO_DRIVES get_configuration_mock.return_value = 'foo' ret = manager.delete_configuration() self.assertFalse(controller_exec_cmd_mock.called) get_configuration_mock.assert_called_once_with() self.assertEqual('foo', ret) @mock.patch.object(manager, 'get_configuration') def test_delete_configuration_hba_enabled(self, get_configuration, get_all_details_mock): drives = raid_constants.HPSSA_HBA_MODE get_all_details_mock.return_value = drives msg = ("An error was encountered while doing ssa configuration: None" " of the available SSA controllers Smart Array P822 in " "Slot 3 have RAID enabled") ex = self.assertRaises(exception.HPSSAOperationError, manager.delete_configuration) self.assertIn(msg, str(ex)) def test_get_configuration(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE raid_info_returned = manager.get_configuration() ld1_expected = {'size_gb': 557, 'raid_level': '1', 'controller': 'Smart Array P822 in Slot 2', 'physical_disks': ['5I:1:1', '5I:1:2'], 'volume_name': '01F42227PDVTF0BRH5T0MOAB64', 'root_device_hint': { 'wwn': '0x600508b1001c321c'}} # NOTE(rameshg87: Cannot directly compare because # of 'physical_disks' key. ld1_returned = raid_info_returned['logical_disks'][0] self.assertEqual(ld1_expected['size_gb'], ld1_returned['size_gb']) self.assertEqual(ld1_expected['raid_level'], ld1_returned['raid_level']) self.assertEqual(ld1_expected['controller'], ld1_returned['controller']) self.assertEqual(ld1_expected['volume_name'], ld1_returned['volume_name']) self.assertEqual(ld1_expected['root_device_hint'], ld1_returned['root_device_hint']) self.assertEqual(sorted(ld1_expected['physical_disks']), sorted(ld1_returned['physical_disks'])) # Assert physical disk info pds_active = [x['id'] for x in raid_info_returned['physical_disks'] if x['status'] == 'active'] pds_ready = [x['id'] for x in raid_info_returned['physical_disks'] if x['status'] == 'ready'] pds_active_expected = ['5I:1:1', '5I:1:2'] pds_ready_expected = ['6I:1:6', '6I:1:7', '5I:1:3', '5I:1:4', '6I:1:5'] self.assertEqual(sorted(pds_active_expected), sorted(pds_active)) self.assertEqual(sorted(pds_ready_expected), sorted(pds_ready)) def test__select_controllers_by_hba(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_HBA_MODE server = objects.Server() select_controllers = lambda x: not x.properties.get('HBA Mode Enabled', False) msg = ("An error was encountered while doing ssa configuration: " "None of the available SSA controllers Smart Array P822 " "in Slot 3 have Raid enabled.") ex = self.assertRaises(exception.HPSSAOperationError, manager._select_controllers_by, server, select_controllers, 'Raid enabled') self.assertIn(msg, str(ex)) def test__select_controllers_by(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_NO_DRIVES server = objects.Server() select_controllers = lambda x: not x.properties.get('HBA Mode Enabled', False) ctrl_expected = server.controllers manager._select_controllers_by(server, select_controllers, 'Raid enabled') self.assertEqual(ctrl_expected, server.controllers) @mock.patch.object(time, 'sleep') @mock.patch.object(objects.Controller, 'execute_cmd') def test_erase_devices(self, controller_exec_cmd_mock, sleep_mock, get_all_details_mock): erase_drive = raid_constants.SSA_ERASE_DRIVE erase_complete = raid_constants.SSA_ERASE_COMPLETE cmd_args = [] cmd_args.append("pd 1I:2:1") cmd_args.extend(['modify', 'erase', 'erasepattern=overwrite', 'unrestricted=off', 'forced']) expt_ret = { 'Smart Array P440 in Slot 2': { '1I:2:1': 'Erase Complete. Reenable Before Using.', 'Summary': ('Sanitize Erase performed on the disks attached to' ' the controller.')}} get_all_details_mock.side_effect = [erase_drive, erase_complete, erase_complete] ret = manager.erase_devices() self.assertTrue(controller_exec_cmd_mock.called) controller_exec_cmd_mock.assert_any_call(*cmd_args) self.assertEqual(expt_ret, ret) self.assertFalse(sleep_mock.called) @mock.patch.object(time, 'sleep') @mock.patch.object(objects.Controller, 'execute_cmd') def test_erase_devices_in_progress(self, controller_exec_cmd_mock, sleep_mock, get_all_details_mock): erase_drive = raid_constants.SSA_ERASE_DRIVE erase_progress = raid_constants.SSA_ERASE_IN_PROGRESS erase_complete = raid_constants.SSA_ERASE_COMPLETE expt_ret = { 'Smart Array P440 in Slot 2': { '1I:2:1': 'Erase Complete. Reenable Before Using.', 'Summary': ('Sanitize Erase performed on the disks attached to' ' the controller.')}} get_all_details_mock.side_effect = [erase_drive, erase_progress, erase_complete, erase_complete] ret = manager.erase_devices() self.assertTrue(controller_exec_cmd_mock.called) self.assertEqual(expt_ret, ret) self.assertTrue(sleep_mock.called) @mock.patch.object(time, 'sleep') @mock.patch.object(objects.Controller, 'execute_cmd') def test_erase_devices_not_supported(self, controller_exec_cmd_mock, sleep_mock, get_all_details_mock): erase_not_supported = raid_constants.SSA_ERASE_NOT_SUPPORTED erase_complete = raid_constants.SSA_ERASE_COMPLETE_NOT_SUPPORTED erase_progress = raid_constants.SSA_ERASE_IN_PROGRESS_NOT_SUPPORTED get_all_details_mock.side_effect = [erase_not_supported, erase_progress, erase_complete, erase_complete] value = ("Drive 1I:2:1: This operation is not supported in this " "physical drive") controller_exec_cmd_mock.return_value = value expt_ret = { 'Smart Array P440 in Slot 2': { '1I:2:1': 'Erase Complete. Reenable Before Using.', 'Summary': ('Drives overwritten with zeros because ' 'sanitize erase is not supported on the ' 'controller.') } } ret = manager.erase_devices() self.assertEqual(expt_ret, ret) self.assertTrue(controller_exec_cmd_mock.called) self.assertTrue(sleep_mock.called) class RaidConfigValidationTestCases(testtools.TestCase): def test_validate_fails_min_disks_number(self): raid_config = {'logical_disks': [{'size_gb': 100, 'raid_level': '5', 'number_of_physical_disks': 2}]} msg = "RAID level 5 requires at least 3 disks" self.assertRaisesRegex(exception.InvalidInputError, msg, manager.validate, raid_config) def test_validate_fails_min_physical_disks(self): raid_config = {'logical_disks': [{'size_gb': 100, 'raid_level': '5', 'physical_disks': ['foo']}]} msg = "RAID level 5 requires at least 3 disks" self.assertRaisesRegex(exception.InvalidInputError, msg, manager.validate, raid_config) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/hpssa/test_objects.py0000664000175000017500000007452100000000000025000 0ustar00zuulzuul00000000000000# Copyright 2014 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from unittest import mock from oslo_concurrency import processutils import testtools from proliantutils import exception from proliantutils.hpssa import constants from proliantutils.hpssa import objects from proliantutils.tests.hpssa import raid_constants @mock.patch.object(objects.Server, '_get_all_details') class ServerTest(testtools.TestCase): def test_server_object_no_logical_drives(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_NO_DRIVES server = objects.Server() # Assertions on server self.assertEqual(1, len(server.controllers)) # Assertions on RAID controller properties controller = server.controllers[0] self.assertEqual(server, controller.parent) self.assertIsInstance(controller.properties, dict) self.assertEqual('Smart Array P822 in Slot 2', controller.id) self.assertEqual(7, len(controller.unassigned_physical_drives)) self.assertFalse(controller.raid_arrays) # Assertion on physical drives on controller physical_drives_expected = ['5I:1:1', '5I:1:2', '5I:1:3', '5I:1:4', '6I:1:5', '6I:1:6', '6I:1:7'] physical_drives_found = map(lambda x: x.id, controller.unassigned_physical_drives) self.assertEqual(sorted(physical_drives_expected), sorted(physical_drives_found)) physical_drive = list(filter(lambda x: x.id == '5I:1:1', controller.unassigned_physical_drives))[0] self.assertEqual(controller, physical_drive.parent) self.assertEqual(500, physical_drive.size_gb) self.assertEqual(constants.INTERFACE_TYPE_SAS, physical_drive.interface_type) self.assertEqual(constants.DISK_TYPE_HDD, physical_drive.disk_type) def test_server_object_one_logical_drive(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() controller = server.controllers[0] self.assertEqual(5, len(controller.unassigned_physical_drives)) self.assertEqual(1, len(controller.raid_arrays)) # Assertion on raid_arrays array = controller.raid_arrays[0] self.assertEqual(array.parent, controller) self.assertIsInstance(array.properties, dict) self.assertEqual('A', array.id) self.assertEqual(1, len(array.logical_drives)) self.assertEqual(2, len(array.physical_drives)) # Assertion on logical drives of array logical_drive = array.logical_drives[0] self.assertEqual('1', logical_drive.id) self.assertEqual(logical_drive.parent, array) self.assertEqual(557, logical_drive.size_gb) self.assertEqual(constants.RAID_1, logical_drive.raid_level) self.assertIsInstance(logical_drive.properties, dict) # Assertion on physical drives of array physical_drive = list(filter(lambda x: x.id == '5I:1:1', array.physical_drives))[0] self.assertEqual(array, physical_drive.parent) self.assertEqual(500, physical_drive.size_gb) # Assertion on physical drives of controller physical_drive = list(filter(lambda x: x.id == '5I:1:3', controller.unassigned_physical_drives))[0] self.assertEqual(controller, physical_drive.parent) self.assertEqual(400, physical_drive.size_gb) def test_server_object_one_logical_drive_raid_level_mappping( self, get_all_details_mock): stdout = raid_constants.HPSSA_ONE_DRIVE_RAID_50 get_all_details_mock.return_value = stdout server = objects.Server() logical_drive = server.controllers[0].raid_arrays[0].logical_drives[0] self.assertEqual(constants.RAID_50, logical_drive.raid_level) def test_get_controller_by_id(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() id = 'Smart Array P822 in Slot 2' self.assertEqual(server.controllers[0], server.get_controller_by_id(id)) self.assertIsNone(server.get_controller_by_id('foo')) def test_get_physical_drives(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() exp_pds = [server.controllers[0].unassigned_physical_drives[0], server.controllers[0].unassigned_physical_drives[1], server.controllers[0].unassigned_physical_drives[2], server.controllers[0].unassigned_physical_drives[3], server.controllers[0].unassigned_physical_drives[4], server.controllers[0].raid_arrays[0].physical_drives[0], server.controllers[0].raid_arrays[0].physical_drives[1]] self.assertEqual(exp_pds, server.get_physical_drives()) def test_get_logical_drives(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() exp_ld = server.controllers[0].raid_arrays[0].logical_drives[0] self.assertEqual(exp_ld, server.get_logical_drives()[0]) def test_get_logical_drives_no_drives(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_NO_DRIVES server = objects.Server() self.assertFalse(server.get_logical_drives()) def test_get_logical_drive_by_wwn(self, get_all_details_mock): two_drives = raid_constants.HPSSA_TWO_DRIVES_100GB_RAID5_50GB_RAID1 get_all_details_mock.return_value = two_drives server = objects.Server() wwn = '0x600508b1001cc42c' ld_ret = server.get_logical_drive_by_wwn(wwn) raid_arrays = server.controllers[0].raid_arrays ld_exp = [x.logical_drives[0] for x in raid_arrays if x.logical_drives[0].raid_level == '5'][0] self.assertEqual(ld_exp, ld_ret) def test_get_logical_drive_by_wwn_not_exist(self, get_all_details_mock): two_drives = raid_constants.HPSSA_TWO_DRIVES_100GB_RAID5_50GB_RAID1 get_all_details_mock.return_value = two_drives server = objects.Server() wwn = 'foo' ld_ret = server.get_logical_drive_by_wwn(wwn) self.assertIsNone(ld_ret) @mock.patch.object(objects.Server, '_get_all_details') class ControllerTest(testtools.TestCase): @mock.patch('os.path.exists') @mock.patch.object(processutils, 'execute') def test_execute_cmd(self, processutils_mock, path_mock, get_all_details_mock): path_mock.return_value = True get_all_details_mock.return_value = raid_constants.HPSSA_NO_DRIVES server = objects.Server() controller = server.controllers[0] processutils_mock.return_value = ('stdout', 'stderr') stdout, stderr = controller.execute_cmd('foo', 'bar') processutils_mock.assert_called_once_with("ssacli", "controller", "slot=2", "foo", "bar") self.assertEqual(stdout, 'stdout') self.assertEqual(stderr, 'stderr') @mock.patch.object(processutils, 'execute') def test_execute_cmd_fails(self, processutils_mock, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_NO_DRIVES server = objects.Server() controller = server.controllers[0] processutils_mock.side_effect = OSError self.assertRaises(exception.HPSSAOperationError, controller.execute_cmd, 'foo', 'bar') @mock.patch.object(objects.Controller, 'execute_cmd') def test_create_logical_drive_with_physical_disks(self, execute_mock, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_NO_DRIVES server = objects.Server() controller = server.controllers[0] logical_drive_info = {'size_gb': 50, 'raid_level': '1', 'volume_name': 'boot_volume', 'is_boot_volume': 'true', 'controller': 'Smart Array P822 in Slot 2', 'physical_disks': ['5I:1:1', '5I:1:2', '5I:1:3']} controller.create_logical_drive(logical_drive_info) execute_mock.assert_called_once_with("create", "type=logicaldrive", "drives=5I:1:1,5I:1:2,5I:1:3", "raid=1", "size=51200", process_input='y') @mock.patch.object(objects.Controller, 'execute_cmd') def test_create_logical_drive_max_size_gb(self, execute_mock, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_NO_DRIVES server = objects.Server() controller = server.controllers[0] logical_drive_info = {'size_gb': 'MAX', 'raid_level': '1', 'controller': 'Smart Array P822 in Slot 2', 'physical_disks': ['5I:1:1', '5I:1:2', '5I:1:3']} controller.create_logical_drive(logical_drive_info) execute_mock.assert_called_once_with("create", "type=logicaldrive", "drives=5I:1:1,5I:1:2,5I:1:3", "raid=1", process_input='y') @mock.patch.object(objects.Controller, 'execute_cmd') def test_create_logical_drive_with_raid_array(self, execute_mock, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_NO_DRIVES server = objects.Server() controller = server.controllers[0] logical_drive_info = {'size_gb': 50, 'raid_level': '1', 'volume_name': 'boot_volume', 'is_boot_volume': 'true', 'controller': 'Smart Array P822 in Slot 2', 'array': 'A'} controller.create_logical_drive(logical_drive_info) execute_mock.assert_called_once_with("array", "A", "create", "type=logicaldrive", "raid=1", "size=51200", process_input='y') @mock.patch.object(objects.Controller, 'execute_cmd') def test_create_logical_drive_raid_level_mapping(self, execute_mock, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_NO_DRIVES server = objects.Server() controller = server.controllers[0] logical_drive_info = {'size_gb': 50, 'raid_level': '5+0', 'volume_name': 'boot_volume', 'is_boot_volume': 'true', 'controller': 'Smart Array P822 in Slot 2', 'physical_disks': ['5I:1:1', '5I:1:2', '5I:1:3', '5I:1:4', '5I:1:5', '6I:1:6']} controller.create_logical_drive(logical_drive_info) execute_mock.assert_called_once_with( "create", "type=logicaldrive", "drives=5I:1:1,5I:1:2,5I:1:3,5I:1:4,5I:1:5,6I:1:6", "raid=50", "size=51200", process_input='y') @mock.patch.object(objects.Controller, 'execute_cmd') def test_delete_all_logical_drives(self, execute_mock, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_NO_DRIVES server = objects.Server() controller = server.controllers[0] controller.delete_all_logical_drives() execute_mock.assert_called_once_with("logicaldrive", "all", "delete", "forced") def test_get_physical_drive_by_id(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() controller = server.controllers[0] array = controller.raid_arrays[0] physical_drive = list(filter(lambda x: x.id == '5I:1:1', array.physical_drives))[0] self.assertEqual(physical_drive, controller.get_physical_drive_by_id('5I:1:1')) physical_drive = list(filter(lambda x: x.id == '5I:1:3', controller.unassigned_physical_drives))[0] self.assertEqual(physical_drive, controller.get_physical_drive_by_id('5I:1:3')) self.assertIsNone(controller.get_physical_drive_by_id('foo')) @mock.patch.object(objects.Controller, 'execute_cmd') def test_erase_devices(self, execute_mock, get_all_details_mock): get_all_details_mock.return_value = raid_constants.SSA_ERASE_DRIVE server = objects.Server() drives = [x for x in server.controllers[0].unassigned_physical_drives] controller = server.controllers[0] execute_mock.return_value = "" controller.erase_devices(drives) calls = [mock.call('pd 6I:1:7', 'modify', 'erase', 'erasepattern=block', 'unrestricted=off', 'forced'), mock.call('pd 1I:2:1', 'modify', 'erase', 'erasepattern=overwrite', 'unrestricted=off', 'forced')] execute_mock.assert_has_calls(calls, any_order=True) @mock.patch.object(objects.Controller, 'execute_cmd') def test_erase_devices_sanitize_not_supported(self, execute_mock, get_all_details_mock): erase_not_supported = raid_constants.SSA_ERASE_NOT_SUPPORTED get_all_details_mock.return_value = erase_not_supported server = objects.Server() d = [x for x in server.controllers[0].unassigned_physical_drives] controller = server.controllers[0] value = ("Drive 1I:2:1: This operation is not supported in this " "physical drive") execute_mock.return_value = value controller.erase_devices(d) calls = [mock.call('pd 1I:2:1', 'modify', 'erase', 'erasepattern=overwrite', 'unrestricted=off', 'forced'), mock.call('pd 1I:2:1', 'modify', 'erase', 'erasepattern=zero', 'forced')] execute_mock.assert_has_calls(calls) @mock.patch.object(objects.Controller, 'execute_cmd') def test_erase_devices_exception(self, execute_mock, get_all_details_mock): get_all_details_mock.return_value = raid_constants.SSA_ERASE_DRIVE server = objects.Server() d = [x for x in server.controllers[0].unassigned_physical_drives] controller = server.controllers[0] value = 'Some Exception' execute_mock.side_effect = [exception.HPSSAOperationError( reason=value), None] ex = self.assertRaises(exception.HPSSAOperationError, controller.erase_devices, d) self.assertIn(value, str(ex)) @mock.patch.object(objects.Server, '_get_all_details') class LogicalDriveTest(testtools.TestCase): def test_get_logical_drive_dict(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() logical_drive = server.controllers[0].raid_arrays[0].logical_drives[0] ret = logical_drive.get_logical_drive_dict() self.assertEqual(557, ret['size_gb']) self.assertEqual('1', ret['raid_level']) self.assertEqual('0x600508b1001c321c', ret['root_device_hint']['wwn']) self.assertEqual('Smart Array P822 in Slot 2', ret['controller']) self.assertEqual(sorted(['5I:1:1', '5I:1:2']), sorted(ret['physical_disks'])) self.assertEqual('01F42227PDVTF0BRH5T0MOAB64', ret['volume_name']) def test___init__bad_size_logical_drive(self, get_all_details_mock): ret = raid_constants.HPSSA_BAD_SIZE_LOGICAL_DRIVE get_all_details_mock.return_value = ret ex = self.assertRaises(exception.HPSSAOperationError, objects.Server) msg = ("unknown size '558.9foo' for logical disk '1' of RAID array " "'A' in controller 'Smart Array P822 in Slot 2'") self.assertIn(msg, str(ex)) @mock.patch.object(objects.Server, '_get_all_details') class ArrayTest(testtools.TestCase): @mock.patch.object(processutils, 'execute') def test_can_accomodate_okay(self, execute_mock, get_all_details_mock): current_config = raid_constants.HPSSA_TWO_DRIVES_100GB_RAID5_50GB_RAID1 get_all_details_mock.return_value = current_config execute_mock.return_value = ( raid_constants.ARRAY_ACCOMODATE_LOGICAL_DISK, None) logical_disk = {'size_gb': 500, 'raid_level': '5'} server = objects.Server() ret_val = server.controllers[0].raid_arrays[0].can_accomodate( logical_disk) self.assertTrue(ret_val) @mock.patch.object(processutils, 'execute') def test_can_accomodate_max_size_gb_okay(self, execute_mock, get_all_details_mock): current_config = raid_constants.HPSSA_TWO_DRIVES_100GB_RAID5_50GB_RAID1 get_all_details_mock.return_value = current_config execute_mock.return_value = ( raid_constants.ARRAY_ACCOMODATE_LOGICAL_DISK, None) logical_disk = {'size_gb': 'MAX', 'raid_level': '5'} server = objects.Server() ret_val = server.controllers[0].raid_arrays[0].can_accomodate( logical_disk) self.assertTrue(ret_val) @mock.patch.object(processutils, 'execute') def test_can_accomodate_not_enough_space(self, execute_mock, get_all_details_mock): current_config = raid_constants.HPSSA_TWO_DRIVES_100GB_RAID5_50GB_RAID1 get_all_details_mock.return_value = current_config execute_mock.return_value = ( raid_constants.ARRAY_ACCOMODATE_LOGICAL_DISK, None) logical_disk = {'size_gb': 1500, 'raid_level': '5'} server = objects.Server() ret_val = server.controllers[0].raid_arrays[0].can_accomodate( logical_disk) self.assertFalse(ret_val) @mock.patch.object(processutils, 'execute') def test_can_accomodate_invalid_raid_level(self, execute_mock, get_all_details_mock): current_config = raid_constants.HPSSA_TWO_DRIVES_100GB_RAID5_50GB_RAID1 get_all_details_mock.return_value = current_config exc = processutils.ProcessExecutionError( stdout=raid_constants.ARRAY_ACCOMODATE_LOGICAL_DISK_INVALID, stderr=None, exit_code=1) execute_mock.side_effect = exc logical_disk = {'size_gb': 1500, 'raid_level': '1'} server = objects.Server() ret_val = server.controllers[0].raid_arrays[0].can_accomodate( logical_disk) self.assertFalse(ret_val) @mock.patch.object(processutils, 'execute') def test_can_accomodate_some_other_error(self, execute_mock, get_all_details_mock): current_config = raid_constants.HPSSA_TWO_DRIVES_100GB_RAID5_50GB_RAID1 get_all_details_mock.return_value = current_config exc = processutils.ProcessExecutionError( stdout=raid_constants.ARRAY_ACCOMODATE_LOGICAL_DISK_INVALID, stderr=None, exit_code=2) execute_mock.side_effect = exc logical_disk = {'size_gb': 1500, 'raid_level': '1'} server = objects.Server() self.assertRaises( exception.HPSSAOperationError, server.controllers[0].raid_arrays[0].can_accomodate, logical_disk) @mock.patch.object(processutils, 'execute') def test_can_accomodate_oserror(self, execute_mock, get_all_details_mock): current_config = raid_constants.HPSSA_TWO_DRIVES_100GB_RAID5_50GB_RAID1 get_all_details_mock.return_value = current_config execute_mock.side_effect = OSError logical_disk = {'size_gb': 1500, 'raid_level': '1'} server = objects.Server() self.assertRaises( exception.HPSSAOperationError, server.controllers[0].raid_arrays[0].can_accomodate, logical_disk) @mock.patch('os.path.exists') @mock.patch.object(processutils, 'execute') def test_can_accomodate_map_raid_level(self, execute_mock, path_mock, get_all_details_mock): current_config = raid_constants.HPSSA_TWO_DRIVES_100GB_RAID5_50GB_RAID1 path_mock.return_value = True execute_mock.return_value = ("", None) get_all_details_mock.return_value = current_config logical_disk = {'size_gb': 1500, 'raid_level': '5+0'} server = objects.Server() server.controllers[0].raid_arrays[0].can_accomodate(logical_disk) execute_mock.assert_called_once_with( "ssacli", "controller", "slot=2", "array", mock.ANY, "create", "type=logicaldrive", "raid=50", "size=?") @mock.patch.object(objects.Server, '_get_all_details') class PhysicalDriveTest(testtools.TestCase): def test___init__bad_size_logical_drive(self, get_all_details_mock): ret = raid_constants.HPSSA_BAD_SIZE_PHYSICAL_DRIVE get_all_details_mock.return_value = ret ex = self.assertRaises(exception.HPSSAOperationError, objects.Server) msg = ("unknown size '500foo' for physical disk '5I:1:1' of " "controller 'Smart Array P822 in Slot 2'") self.assertIn(msg, str(ex)) def test___init__physical_disk_size_mb(self, get_all_details_mock): ret = raid_constants.HPSSA_SMALL_SIZE_PHYSICAL_DRIVE get_all_details_mock.return_value = ret server = objects.Server() self.assertEqual( 2, server.controllers[0].unassigned_physical_drives[0].size_gb) def test___init__physical_disk_ssd(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_DRIVES_SSD server = objects.Server() d = [x for x in server.controllers[0].unassigned_physical_drives] drives = sorted((x for x in d), key=lambda x: x.get_physical_drive_dict()['id']) ret_sas = drives[0].get_physical_drive_dict() ret_sata = drives[1].get_physical_drive_dict() self.assertEqual(200, ret_sas['size_gb']) self.assertEqual('Smart Array P822 in Slot 2', ret_sas['controller']) self.assertEqual('6I:1:7', ret_sas['id']) self.assertEqual('ssd', ret_sas['disk_type']) self.assertEqual('sas', ret_sas['interface_type']) self.assertEqual('HP EF0600FARNA', ret_sas['model']) self.assertEqual('HPD6', ret_sas['firmware']) self.assertEqual('ready', ret_sas['status']) self.assertEqual('6I:1:8', ret_sata['id']) self.assertEqual('ssd', ret_sata['disk_type']) self.assertEqual('sata', ret_sata['interface_type']) self.assertEqual('OK', ret_sata['erase_status']) def test_get_physical_drive_dict_part_of_array(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() d = server.controllers[0].raid_arrays[0].physical_drives[0] d = [x for x in server.controllers[0].raid_arrays[0].physical_drives if x.id == '5I:1:1'] ret = d[0].get_physical_drive_dict() self.assertEqual(500, ret['size_gb']) self.assertEqual('Smart Array P822 in Slot 2', ret['controller']) self.assertEqual('5I:1:1', ret['id']) self.assertEqual('hdd', ret['disk_type']) self.assertEqual('sas', ret['interface_type']) self.assertEqual('HP EF0600FARNA', ret['model']) self.assertEqual('HPD6', ret['firmware']) self.assertEqual('active', ret['status']) self.assertEqual('OK', ret['erase_status']) def test_get_physical_drive_dict_unassigned(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.HPSSA_ONE_DRIVE server = objects.Server() d = server.controllers[0].unassigned_physical_drives[0] d = [x for x in server.controllers[0].unassigned_physical_drives if x.id == '5I:1:3'] ret = d[0].get_physical_drive_dict() self.assertEqual('Smart Array P822 in Slot 2', ret['controller']) self.assertEqual(400, ret['size_gb']) self.assertEqual('5I:1:3', ret['id']) self.assertEqual('hdd', ret['disk_type']) self.assertEqual('sas', ret['interface_type']) self.assertEqual('HP EF0600FARNA', ret['model']) self.assertEqual('HPD6', ret['firmware']) self.assertEqual('ready', ret['status']) self.assertEqual('OK', ret['erase_status']) def test_ssacli_output_parsing(self, get_all_details_mock): get_all_details_mock.return_value = raid_constants.SSACLI_PARSING_TESTS server = objects.Server() self.assertEqual(4, len(server.controllers)) id = 'Smart HBA H240ar in Slot 0 (Embedded) (RAID Mode)' self.assertIsNotNone(server.get_controller_by_id(id)) id = 'Smart HBA H240 in Slot 2 (RAID Mode)' controller = server.get_controller_by_id(id) self.assertIsInstance(controller.properties, dict) self.assertIn("PCI Address (Domain:Bus:Device.Function)", controller.properties) id = 'Smart HBA H240 in Slot 1 (RAID Mode)' controller = server.get_controller_by_id(id) self.assertIsInstance(controller.properties, dict) self.assertEqual(4, len(controller.properties['Physical Drives'])) class PrivateMethodsTestCase(testtools.TestCase): @mock.patch('os.path.exists') @mock.patch.object(processutils, 'execute') def test__ssacli(self, execute_mock, path_mock): execute_mock.return_value = ("stdout", "stderr") path_mock.return_value = True stdout, stderr = objects._ssacli("foo", "bar", check_exit_code=[0, 1, 2, 3]) execute_mock.assert_called_once_with( "ssacli", "foo", "bar", check_exit_code=[0, 1, 2, 3]) self.assertEqual("stdout", stdout) self.assertEqual("stderr", stderr) @mock.patch('os.path.exists') @mock.patch.object(processutils, 'execute') def test__ssacli_raises_error(self, execute_mock, path_mock): path_mock.return_value = True execute_mock.side_effect = OSError self.assertRaises(exception.HPSSAOperationError, objects._ssacli, "foo", "bar") @mock.patch('os.path.exists') @mock.patch.object(processutils, 'execute') def test__ssacli_raises_error_no_transform(self, execute_mock, path_mock): path_mock.return_value = True execute_mock.side_effect = OSError self.assertRaises(OSError, objects._ssacli, "foo", "bar", dont_transform_to_hpssa_exception=True) execute_mock.assert_called_once_with("ssacli", "foo", "bar") @mock.patch('os.path.exists') @mock.patch.object(processutils, 'execute') def test__ssacli_raises_error_no_controller(self, execute_mock, path_mock): path_mock.return_value = True value = ("Error: No controllers detected. Possible causes:" " The driver for the installed controller(s) is not loaded." " On LINUX, the scsi_generic (sg) driver module is not" " loaded. See the README file for more details.") execute_mock.side_effect = processutils.ProcessExecutionError( value) ex = self.assertRaises(exception.HPSSAOperationError, objects._ssacli, "foo", "bar") msg = ("SSA controller not found. Enable ssa controller" " to continue with the desired operation") self.assertIn(msg, str(ex)) @mock.patch('os.path.exists') @mock.patch.object(processutils, 'execute') def test__hpssacli_exists(self, execute_mock, path_mock): execute_mock.return_value = ("stdout", "stderr") path_mock.return_value = False stdout, stderr = objects._ssacli("foo", "bar", check_exit_code=[0, 1, 2, 3]) execute_mock.assert_called_once_with( "hpssacli", "foo", "bar", check_exit_code=[0, 1, 2, 3]) self.assertEqual("stdout", stdout) self.assertEqual("stderr", stderr) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2506647 proliantutils-2.16.0/proliantutils/tests/ilo/0000775000175000017500000000000000000000000021372 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ilo/__init__.py0000664000175000017500000000000000000000000023471 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ilo/ipmi_sample_outputs.py0000664000175000017500000001125400000000000026051 0ustar00zuulzuul00000000000000# Copyright 2014 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test Utils for iLO test modules.""" NIC_FRU_OUT_TUPLE = (( "Board Mfg Date : Mon Apr 28 23:16:00 2014\n" "Board Mfg : HP\n" "Board Product : HP Ethernet 1Gb 4-port 331FLR Adapter\n" "Board Serial : CN84170RX5\n" "Board Part Number : 634025-001\n" "Board Extra : d23041\n" "Board Extra : d5629133b001\n" "Product Manufacturer : HP\n" "Product Name : HP Ethernet 1Gb 4-port 331FLR Adapter\n" "Product Part Number : 629135-B21\n" "Product Version : 00\n" "Product Serial : CN84170RX5").encode('ascii'), None) NIC_FRU_OUT = ( "Board Mfg Date : Mon Apr 28 23:16:00 2014\n" "Board Mfg : HP\n" "Board Product : HP Ethernet 1Gb 4-port 331FLR Adapter\n" "Board Serial : CN84170RX5\n" "Board Part Number : 634025-001\n" "Board Extra : d23041\n" "Board Extra : d5629133b001\n" "Product Manufacturer : HP\n" "Product Name : HP Ethernet 1Gb 4-port 331FLR Adapter\n" "Product Part Number : 629135-B21\n" "Product Version : 00\n" "Product Serial : CN84170RX5") NIC_FRU_OUT_NO_PORT_DETAILS = ( "Board Mfg Date : Mon Apr 28 23:16:00 2014\n" "Board Mfg : HP\n" "Board Serial : CN84170RX5\n" "Board Part Number : 634025-001\n" "Board Extra : d23041\n" "Board Extra : d5629133b001\n" "Product Manufacturer : HP\n" "Product Part Number : 629135-B21\n" "Product Version : 00\n" "Product Serial : CN84170RX5") NIC_FRU_OUT_NO_PRODUCT_NAME = ( "Board Mfg Date : Mon Apr 28 23:16:00 2014\n" "Board Mfg : HP\n" "Board Product : HP Ethernet 1Gb 4-port 331FLR Adapter\n" "Board Serial : CN84170RX5\n" "Board Part Number : 634025-001\n" "Board Extra : d23041\n" "Board Extra : d5629133b001\n" "Product Manufacturer : HP\n" "Product Part Number : 629135-B21\n" "Product Version : 00\n" "Product Serial : CN84170RX5") NIC_FRU_OUT_ALL = ( "FRU Device Description : Builtin FRU Device (ID 0)" "Chassis Type : Rack Mount Chassis" "Chassis Serial : 2M24500B4F" "Board Mfg Date : Sat Mar 26 00:00:00 2005" "Board Mfg : HP" "Board Product : ProLiant DL180 Gen9" "Board Serial : 2M24500B4F" "Board Part Number : 754524-B21" "Product Manufacturer : HP" "Product Name : ProLiant DL180 Gen9" "Product Part Number : 754524-B21" "Product Serial : 2M24500B4F" "FRU Device Description : BMC CONTROLLER (ID 238)" "Product Manufacturer : HP" "Product Name : BMC CONTROLLER" "Product Part Number : iLO 4" "FRU Device Description : MB BIOS (ID 239)" "Product Manufacturer : HP" "Product Name : SYSTEM BIOS" "Product Part Number : U20" "Product Version : 11/03/2014" "Board Mfg Date : Mon Apr 28 23:16:00 2014\n" "Board Mfg : HP\n" "Board Product : HP Ethernet 1Gb 4-port 331FLR Adapter\n" "Board Serial : CN84170RX5\n" "Board Part Number : 634025-001\n" "Board Extra : d23041\n" "Board Extra : d5629133b001\n" "Product Manufacturer : HP\n" "Product Part Number : 629135-B21\n" "Product Version : 00\n" "Product Serial : CN84170RX5" "FRU Device Description : CPU 1 (ID 16)" "Product Manufacturer : Intel(R) Corporation" "Product Name : Intel(R) Xeon(R) CPU E5-2603 v3 @ 1.60GHz" "FRU Device Description : CPU 1 DIMM 6 (ID 110)" "Device not present (Command response could not be provided)" "FRU Device Description : CPU 1 DIMM 8 (ID 111)" "Device not present (Command response could not be provided)") LESSER_THAN_MIN_SUGGESTED_FW_STR = "2.25" MIN_SUGGESTED_FW_STR = "2.30" GREATER_THAN_MIN_SUGGESTED_FW_STR = "2.35" ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ilo/ribcl_sample_outputs.py0000664000175000017500000341423500000000000026217 0ustar00zuulzuul00000000000000# Copyright 2014 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test Utils for iLO test modules.""" GET_VM_STATUS_XML = ''' ''' GET_VM_STATUS_CDROM_XML = ''' ''' GET_VM_STATUS_ERROR_XML = ''' ''' GET_ALL_LICENSES_XML = ''' ''' GET_ONE_TIME_BOOT_XML = ''' ''' GET_HOST_POWER_STATUS_XML = ''' ''' RESET_SERVER_XML = ''' ''' PRESS_POWER_BTN_XML = ''' ''' SET_ONE_TIME_BOOT_XML = ''' ''' SET_VM_STATUS_XML = ''' ''' INSERT_VIRTUAL_MEDIA_XML = ''' ''' EJECT_VIRTUAL_MEDIA_XML = ''' \r \r \r ''' SET_HOST_POWER_XML = ''' ''' LOGIN_FAIL_XML = ''' ''' HOLD_PWR_BTN_XML = ''' ''' BOOT_MODE_NOT_SUPPORTED = ''' ''' GET_PRODUCT_NAME = ''' ''' RESET_ILO_XML = """ Integrated Lights-Out will reset at the end of the script. """ RESET_ILO_CREDENTIAL_XML = """ """ RESET_ILO_CREDENTIAL_FAIL_XML = """ """ GET_PERSISTENT_BOOT_DEVICE_HDD_UEFI_XML = """ """ GET_PERSISTENT_BOOT_DEVICE_NIC_UEFI_XML = """ """ GET_PERSISTENT_BOOT_DEVICE_BIOS_XML = """ """ GET_PERSISTENT_BOOT_DEVICE_CDROM_UEFI_XML = """ """ GET_PERSISTENT_BOOT_DEVICE_CDROM_MISSING_UEFI_XML = """ """ GET_NIC_DATA = ''' [ { "DESCRIPTION": "Slot 1 : Smart Array P840 Controller - 279.37 GiB,\ RAID 0 Logical Drive(Target:0, Lun:0)", "value": "Boot000E" }, { "DESCRIPTION": "Slot1:SmartArrayP840Controller-279.37GiB, RAID0 \ LogicalDrive(Target: 0, Lun: 1)", "value": "Boot000F" }, { "DESCRIPTION": "EmbeddedLOM1 Port1: HPEthernet1Gb4-port331iAdapter-\ NIC(iSCSIIPv4)", "value": "Boot0004" }, { "DESCRIPTION": "EmbeddedLOM1Port2: HPEthernet1Gb4-port331iAdapter-\ NIC(PXEIPv4)", "value": "Boot0003" }, { "DESCRIPTION": "EmbeddedLOM1Port2: HPEthernet1Gb 4-port331iAdapter-\ NIC IPv4", "value": "Boot0001" }, { "DESCRIPTION": "GenericUSBBoot", "value": "Boot0000" } ] ''' GET_HOST_UUID = ''' 2M220102JA ProLiant ML110 G7 6567662M220102JA 1 37363536-3636-4D32-3232-303130324A41 Inactive 1 Integrated Lights-Out 3 (iLO 3) 1.70 01/08/2011 ASIC: 12 ILO2M220102JA ILO6567662M220102JA 1 0 1.7 ''' GET_HOST_HEALTH_DATA = ''' ''' GET_HOST_POWER_READINGS = ''' ''' GET_EMBEDDED_HEALTH_OUTPUT_GEN7 = ''' { "GET_EMBEDDED_HEALTH_DATA": { "MEMORY": { "MEMORY_COMPONENTS": { "MEMORY_COMPONENT": [ { "MEMORY_SPEED": { "VALUE": "0 MHz" }, "MEMORY_SIZE": { "VALUE": "Not Installed" }, "MEMORY_LOCATION": { "VALUE": "PROC 1 DIMM 1G" } }, { "MEMORY_SPEED": { "VALUE": "1333 MHz" }, "MEMORY_SIZE": { "VALUE": "8192 MB" }, "MEMORY_LOCATION": { "VALUE": "PROC 1 DIMM 2D" } }, { "MEMORY_SPEED": { "VALUE": "1333 MHz" }, "MEMORY_SIZE": { "VALUE": "8192 MB" }, "MEMORY_LOCATION": { "VALUE": "PROC 1 DIMM 3A" } }, { "MEMORY_SPEED": { "VALUE": "0 MHz" }, "MEMORY_SIZE": { "VALUE": "Not Installed" }, "MEMORY_LOCATION": { "VALUE": "PROC 1 DIMM 4H" } }, { "MEMORY_SPEED": { "VALUE": "1333 MHz" }, "MEMORY_SIZE": { "VALUE": "8192 MB" }, "MEMORY_LOCATION": { "VALUE": "PROC 1 DIMM 5E" } }, { "MEMORY_SPEED": { "VALUE": "0 MHz" }, "MEMORY_SIZE": { "VALUE": "Not Installed" }, "MEMORY_LOCATION": { "VALUE": "PROC 1 DIMM 6B" } }, { "MEMORY_SPEED": { "VALUE": "1333 MHz" }, "MEMORY_SIZE": { "VALUE": "8192 MB" }, "MEMORY_LOCATION": { "VALUE": "PROC 1 DIMM 7I" } }, { "MEMORY_SPEED": { "VALUE": "0 MHz" }, "MEMORY_SIZE": { "VALUE": "Not Installed" }, "MEMORY_LOCATION": { "VALUE": "PROC 1 DIMM 8F" } }, { "MEMORY_SPEED": { "VALUE": "0 MHz" }, "MEMORY_SIZE": { "VALUE": "Not Installed" }, "MEMORY_LOCATION": { "VALUE": "PROC 1 DIMM 9C" } } ] } }, "NIC_INFOMATION": { "NIC": [ { "MAC_ADDRESS": { "VALUE": "78:ac:c0:fe:49:60" }, "NETWORK_PORT": { "VALUE": "Port 1" } }, { "MAC_ADDRESS": { "VALUE": "78:ac:c0:fe:49:62" }, "NETWORK_PORT": { "VALUE": "Port 2" } }, { "MAC_ADDRESS": { "VALUE": "78:ac:c0:fe:49:64" }, "NETWORK_PORT": { "VALUE": "Port 3" } }, { "MAC_ADDRESS": { "VALUE": "78:ac:c0:fe:49:66" }, "NETWORK_PORT": { "VALUE": "Port 4" } } ], "iSCSI": [ { "MAC_ADDRESS": { "VALUE": "78:ac:c0:fe:49:61" }, "NETWORK_PORT": { "VALUE": "Port 1" } }, { "MAC_ADDRESS": { "VALUE": "78:ac:c0:fe:49:63" }, "NETWORK_PORT": { "VALUE": "Port 2" } }, { "MAC_ADDRESS": { "VALUE": "78:ac:c0:fe:49:65" }, "NETWORK_PORT": { "VALUE": "Port 3" } }, { "MAC_ADDRESS": { "VALUE": "78:ac:c0:fe:49:67" }, "NETWORK_PORT": { "VALUE": "Port 4" } } ], "iLO": { "MAC_ADDRESS": { "VALUE": "78:ac:c0:fe:49:68" }, "NETWORK_PORT": { "VALUE": "iLO Dedicated Network Port" } } } }, "RESPONSE": { "MESSAGE": "No error", "STATUS": "0x0000" }, "VERSION": "2.23" } ''' GET_EMBEDDED_HEALTH_OUTPUT = ''' { "GET_EMBEDDED_HEALTH_DATA": { "FANS": { "FAN": [ { "LABEL": { "VALUE": "Fan Block 1" }, "SPEED": { "UNIT": "Percentage", "VALUE": "12" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } }, { "LABEL": { "VALUE": "Fan Block 2" }, "SPEED": { "UNIT": "Percentage", "VALUE": "12" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } }, { "LABEL": { "VALUE": "Fan Block 3" }, "SPEED": { "UNIT": "Percentage", "VALUE": "18" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } }, { "LABEL": { "VALUE": "Fan Block 4" }, "SPEED": { "UNIT": "Percentage", "VALUE": "18" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } } ] }, "FIRMWARE_INFORMATION": { "INDEX_1": { "FIRMWARE_NAME": { "VALUE": "HP ProLiant System ROM" }, "FIRMWARE_VERSION": { "VALUE": "11/26/2014" } }, "INDEX_10": { "FIRMWARE_NAME": { "VALUE": "HP Smart Array P830i Controller" }, "FIRMWARE_VERSION": { "VALUE": "1.62" } }, "INDEX_2": { "FIRMWARE_NAME": { "VALUE": "HP ProLiant System ROM - Backup" }, "FIRMWARE_VERSION": { "VALUE": "11/26/2014" } }, "INDEX_3": { "FIRMWARE_NAME": { "VALUE": "HP ProLiant System ROM Bootblock" }, "FIRMWARE_VERSION": { "VALUE": "" } }, "INDEX_4": { "FIRMWARE_NAME": { "VALUE": "iLO" }, "FIRMWARE_VERSION": { "VALUE": "2.02 Sep 05 2014" } }, "INDEX_5": { "FIRMWARE_FAMILY": { "VALUE": "0Ch" }, "FIRMWARE_NAME": { "VALUE": "Power Management Controller Firmware" }, "FIRMWARE_VERSION": { "VALUE": "4.1" } }, "INDEX_6": { "FIRMWARE_NAME": { "VALUE": "Power Management Controller FW Bootloader" }, "FIRMWARE_VERSION": { "VALUE": "2.7" } }, "INDEX_7": { "FIRMWARE_NAME": { "VALUE": "System Programmable Logic Device" }, "FIRMWARE_VERSION": { "VALUE": "Version 0x0B" } }, "INDEX_8": { "FIRMWARE_NAME": { "VALUE": "SAS Programmable Logic Device" }, "FIRMWARE_VERSION": { "VALUE": "Version 0x04" } }, "INDEX_9": { "FIRMWARE_NAME": { "VALUE": "Server Platform Services (SPS) Firmware" }, "FIRMWARE_VERSION": { "VALUE": "2.3.0.FA.0" } } }, "HEALTH_AT_A_GLANCE": { "BIOS_HARDWARE": { "STATUS": "OK" }, "FANS": [ { "STATUS": "OK" }, { "REDUNDANCY": "Redundant" } ], "MEMORY": { "STATUS": "Other" }, "NETWORK": { "STATUS": "OK" }, "POWER_SUPPLIES": [ { "STATUS": "OK" }, { "REDUNDANCY": "Redundant" } ], "PROCESSOR": { "STATUS": "OK" }, "STORAGE": { "STATUS": "OK" }, "TEMPERATURE": { "STATUS": "OK" } }, "MEMORY": { "ADVANCED_MEMORY_PROTECTION": { "AMP_MODE_STATUS": { "VALUE": "Unknown" }, "AVAILABLE_AMP_MODES": { "VALUE": "Unknown" }, "CONFIGURED_AMP_MODE": { "VALUE": "Unknown" } }, "MEMORY_DETAILS": { "Memory_Board_1": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_2": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_3": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_4": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_5": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_6": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_7": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_8": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ] }, "MEMORY_DETAILS_SUMMARY": { "Memory_Board_1": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "1067 MHz" }, "OPERATING_VOLTAGE": { "VALUE": "1.50 v" }, "TOTAL_MEMORY_SIZE": { "VALUE": "16 GB" } }, "Memory_Board_2": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_3": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "1067 MHz" }, "OPERATING_VOLTAGE": { "VALUE": "1.50 v" }, "TOTAL_MEMORY_SIZE": { "VALUE": "16 GB" } }, "Memory_Board_4": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_5": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_6": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_7": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_8": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } } } }, "NIC_INFORMATION": { "NIC": [ { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:74" }, "NETWORK_PORT": { "VALUE": "Port 1" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:75" }, "NETWORK_PORT": { "VALUE": "Port 2" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:76" }, "NETWORK_PORT": { "VALUE": "Port 3" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:77" }, "NETWORK_PORT": { "VALUE": "Port 4" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } } ], "iLO": { "IP_ADDRESS": { "VALUE": "10.10.1.66" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "fc:15:b4:18:c0:d4" }, "NETWORK_PORT": { "VALUE": "iLO Dedicated Network Port" }, "PORT_DESCRIPTION": { "VALUE": "iLO Dedicated Network Port" }, "STATUS": { "VALUE": "OK" } } }, "POWER_SUPPLIES": { "POWER_SUPPLY_SUMMARY": { "HIGH_EFFICIENCY_MODE": { "VALUE": "Balanced" }, "HP_POWER_DISCOVERY_SERVICES_REDUNDANCY_STATUS": { "VALUE": "N/A" }, "POWER_MANAGEMENT_CONTROLLER_FIRMWARE_VERSION": { "VALUE": "4.1" }, "POWER_SYSTEM_REDUNDANCY": { "VALUE": "Redundant" }, "PRESENT_POWER_READING": { "VALUE": "162 Watts" } }, "SUPPLY": [ { "CAPACITY": { "VALUE": "1200 Watts" }, "FIRMWARE_VERSION": { "VALUE": "1.00" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 1" }, "MODEL": { "VALUE": "656364-B21" }, "PDS": { "VALUE": "Yes" }, "PRESENT": { "VALUE": "Yes" }, "SERIAL_NUMBER": { "VALUE": "5BXRC0D4D6X0X1" }, "SPARE": { "VALUE": "660185-001" }, "STATUS": { "VALUE": "Good, In Use" } }, { "CAPACITY": { "VALUE": "1200 Watts" }, "FIRMWARE_VERSION": { "VALUE": "1.00" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 2" }, "MODEL": { "VALUE": "656364-B21" }, "PDS": { "VALUE": "Yes" }, "PRESENT": { "VALUE": "Yes" }, "SERIAL_NUMBER": { "VALUE": "5BXRC0D4D6X0WR" }, "SPARE": { "VALUE": "660185-001" }, "STATUS": { "VALUE": "Good, In Use" } }, { "CAPACITY": { "VALUE": "N/A Watts" }, "FIRMWARE_VERSION": { "VALUE": "N/A" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 3" }, "MODEL": { "VALUE": "N/A" }, "PDS": { "VALUE": "Other" }, "PRESENT": { "VALUE": "No" }, "SERIAL_NUMBER": { "VALUE": "N/A" }, "SPARE": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "CAPACITY": { "VALUE": "N/A Watts" }, "FIRMWARE_VERSION": { "VALUE": "N/A" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 4" }, "MODEL": { "VALUE": "N/A" }, "PDS": { "VALUE": "Other" }, "PRESENT": { "VALUE": "No" }, "SERIAL_NUMBER": { "VALUE": "N/A" }, "SPARE": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } } ] }, "PROCESSORS": { "PROCESSOR": [ { "EXECUTION_TECHNOLOGY": { "VALUE": "8/8 cores; 16 threads" }, "INTERNAL_L1_CACHE": { "VALUE": "64 KB" }, "INTERNAL_L2_CACHE": { "VALUE": "256 KB" }, "INTERNAL_L3_CACHE": { "VALUE": "16384 KB" }, "LABEL": { "VALUE": "Proc 1" }, "MEMORY_TECHNOLOGY": { "VALUE": "64-bit Capable" }, "NAME": { "VALUE": "Intel(R) Xeon(R) CPU E7-4820 v2 @ 2.00GHz" }, "SPEED": { "VALUE": "2000 MHz" }, "STATUS": { "VALUE": "OK" } }, { "EXECUTION_TECHNOLOGY": { "VALUE": "8/8 cores; 16 threads" }, "INTERNAL_L1_CACHE": { "VALUE": "64 KB" }, "INTERNAL_L2_CACHE": { "VALUE": "256 KB" }, "INTERNAL_L3_CACHE": { "VALUE": "16384 KB" }, "LABEL": { "VALUE": "Proc 2" }, "MEMORY_TECHNOLOGY": { "VALUE": "64-bit Capable" }, "NAME": { "VALUE": "Intel(R) Xeon(R) CPU E7-4820 v2 @ 2.00GHz" }, "SPEED": { "VALUE": "2000 MHz" }, "STATUS": { "VALUE": "OK" } } ] }, "STORAGE": { "CONTROLLER": { "CACHE_MODULE_MEMORY": { "VALUE": "2097152 KB" }, "CACHE_MODULE_SERIAL_NUM": { "VALUE": "PBKUD0BRH6U3KO" }, "CACHE_MODULE_STATUS": { "VALUE": "OK" }, "CONTROLLER_STATUS": { "VALUE": "OK" }, "DRIVE_ENCLOSURE": [ { "DRIVE_BAY": { "VALUE": "04" }, "LABEL": { "VALUE": "Port 1I Box 1" }, "STATUS": { "VALUE": "OK" } }, { "DRIVE_BAY": { "VALUE": "01" }, "LABEL": { "VALUE": "Port 1I Box 0" }, "STATUS": { "VALUE": "OK" } } ], "ENCRYPTION_CSP_STATUS": { "VALUE": "OK" }, "ENCRYPTION_SELF_TEST_STATUS": { "VALUE": "OK" }, "ENCRYPTION_STATUS": { "VALUE": "Not Enabled" }, "FW_VERSION": { "VALUE": "1.62" }, "LABEL": { "VALUE": "Controller on System Board" }, "LOGICAL_DRIVE": { "CAPACITY": { "VALUE": "99 GB" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FAULT_TOLERANCE": { "VALUE": "RAID 1/RAID 1+0" }, "LABEL": { "VALUE": "01" }, "PHYSICAL_DRIVE": [ { "CAPACITY": { "VALUE": "279 GB" }, "DRIVE_CONFIGURATION": { "VALUE": "Configured" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FW_VERSION": { "VALUE": "HPD0" }, "LABEL": { "VALUE": "Port 1I Box 1 Bay 1" }, "LOCATION": { "VALUE": "Port 1I Box 1 Bay 1" }, "MODEL": { "VALUE": "EG0300FCSPH" }, "SERIAL_NUMBER": { "VALUE": "64R0A18KFTM91426" }, "STATUS": { "VALUE": "OK" } }, { "CAPACITY": { "VALUE": "279 GB" }, "DRIVE_CONFIGURATION": { "VALUE": "Configured" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FW_VERSION": { "VALUE": "HPD0" }, "LABEL": { "VALUE": "Port 1I Box 1 Bay 2" }, "LOCATION": { "VALUE": "Port 1I Box 1 Bay 2" }, "MODEL": { "VALUE": "EG0300FCSPH" }, "SERIAL_NUMBER": { "VALUE": "64R0A109FTM91426" }, "STATUS": { "VALUE": "OK" } } ], "STATUS": { "VALUE": "OK" } }, "MODEL": { "VALUE": "HP Smart Array P830i Controller" }, "SERIAL_NUMBER": { "VALUE": "001438031389320" }, "STATUS": { "VALUE": "OK" } }, "DISCOVERY_STATUS": { "STATUS": { "VALUE": "Discovery Complete" } } }, "TEMPERATURE": { "TEMP": [ { "CAUTION": { "UNIT": "Celsius", "VALUE": "42" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "46" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "27" }, "LABEL": { "VALUE": "01-Inlet Ambient" }, "LOCATION": { "VALUE": "Ambient" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "70" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "02-CPU 1" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "70" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "03-CPU 2" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "04-CPU 3" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "05-CPU 4" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "87" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "34" }, "LABEL": { "VALUE": "06-P1 DIMM 1-24" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "87" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "34" }, "LABEL": { "VALUE": "07-P2 DIMM 25-48" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "08-P3 DIMM 49-72" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "09-P4 DIMM 73-96" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "95" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "51" }, "LABEL": { "VALUE": "10-P1 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "95" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "51" }, "LABEL": { "VALUE": "11-P2 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "12-P3 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "13-P4 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "60" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "35" }, "LABEL": { "VALUE": "14-HD Max" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "105" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "68" }, "LABEL": { "VALUE": "15-Chipset" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "33" }, "LABEL": { "VALUE": "16-P/S 1" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "31" }, "LABEL": { "VALUE": "17-P/S 2" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "18-P/S 3" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "19-P/S 4" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "70" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "75" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "30" }, "LABEL": { "VALUE": "20-P/S Zone" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "115" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "120" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "46" }, "LABEL": { "VALUE": "21-VR P1" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "115" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "120" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "45" }, "LABEL": { "VALUE": "22-VR P2" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "23-VR P3" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "24-VR P4" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "25-VR P1 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "26-VR P2 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "36" }, "LABEL": { "VALUE": "27-VR P3 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "30" }, "LABEL": { "VALUE": "28-VR P4 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "29-VR P1 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "30-VR P2 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "31-VR P3 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "32-VR P4 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "65" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "29" }, "LABEL": { "VALUE": "33-SuperCAP Max" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "100" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "82" }, "LABEL": { "VALUE": "34-HD Controller" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "35-PCI 1" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "36-PCI 2" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "37-PCI 3" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "38-PCI 4" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "39-PCI 5" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "40-PCI 6" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "41-PCI 7" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "42-PCI 8" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "43-PCI 9" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "44-PCI 1 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "45-PCI 2 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "46-PCI 3 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "42" }, "LABEL": { "VALUE": "47-PCI 4 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "48-PCI 5 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "49-PCI 6 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "50-PCI 7 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "51-PCI 8 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "52-PCI 9 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "53-LOM Card" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "54-I/O Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "49" }, "LABEL": { "VALUE": "55-SPI Board" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "56-GPU 1" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "57-GPU 2" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } } ] }, "VRM": {} }, "RESPONSE": { "MESSAGE": "No error", "STATUS": "0x0000" }, "VERSION": "2.23" } ''' GET_EMBEDDED_HEALTH_OUTPUT_EQ_SUGGESTED = ''' { "GET_EMBEDDED_HEALTH_DATA": { "FANS": { "FAN": [ { "LABEL": { "VALUE": "Fan Block 1" }, "SPEED": { "UNIT": "Percentage", "VALUE": "12" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } }, { "LABEL": { "VALUE": "Fan Block 2" }, "SPEED": { "UNIT": "Percentage", "VALUE": "12" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } }, { "LABEL": { "VALUE": "Fan Block 3" }, "SPEED": { "UNIT": "Percentage", "VALUE": "18" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } }, { "LABEL": { "VALUE": "Fan Block 4" }, "SPEED": { "UNIT": "Percentage", "VALUE": "18" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } } ] }, "FIRMWARE_INFORMATION": { "INDEX_1": { "FIRMWARE_NAME": { "VALUE": "HP ProLiant System ROM" }, "FIRMWARE_VERSION": { "VALUE": "11/26/2014" } }, "INDEX_10": { "FIRMWARE_NAME": { "VALUE": "HP Smart Array P830i Controller" }, "FIRMWARE_VERSION": { "VALUE": "1.62" } }, "INDEX_2": { "FIRMWARE_NAME": { "VALUE": "HP ProLiant System ROM - Backup" }, "FIRMWARE_VERSION": { "VALUE": "11/26/2014" } }, "INDEX_3": { "FIRMWARE_NAME": { "VALUE": "HP ProLiant System ROM Bootblock" }, "FIRMWARE_VERSION": { "VALUE": "" } }, "INDEX_4": { "FIRMWARE_NAME": { "VALUE": "iLO" }, "FIRMWARE_VERSION": { "VALUE": "iLO 2.30 Sep 2014" } }, "INDEX_5": { "FIRMWARE_FAMILY": { "VALUE": "0Ch" }, "FIRMWARE_NAME": { "VALUE": "Power Management Controller Firmware" }, "FIRMWARE_VERSION": { "VALUE": "4.1" } }, "INDEX_6": { "FIRMWARE_NAME": { "VALUE": "Power Management Controller FW Bootloader" }, "FIRMWARE_VERSION": { "VALUE": "2.7" } }, "INDEX_7": { "FIRMWARE_NAME": { "VALUE": "System Programmable Logic Device" }, "FIRMWARE_VERSION": { "VALUE": "Version 0x0B" } }, "INDEX_8": { "FIRMWARE_NAME": { "VALUE": "SAS Programmable Logic Device" }, "FIRMWARE_VERSION": { "VALUE": "Version 0x04" } }, "INDEX_9": { "FIRMWARE_NAME": { "VALUE": "Server Platform Services (SPS) Firmware" }, "FIRMWARE_VERSION": { "VALUE": "2.3.0.FA.0" } } }, "HEALTH_AT_A_GLANCE": { "BIOS_HARDWARE": { "STATUS": "OK" }, "FANS": [ { "STATUS": "OK" }, { "REDUNDANCY": "Redundant" } ], "MEMORY": { "STATUS": "Other" }, "NETWORK": { "STATUS": "OK" }, "POWER_SUPPLIES": [ { "STATUS": "OK" }, { "REDUNDANCY": "Redundant" } ], "PROCESSOR": { "STATUS": "OK" }, "STORAGE": { "STATUS": "OK" }, "TEMPERATURE": { "STATUS": "OK" } }, "MEMORY": { "ADVANCED_MEMORY_PROTECTION": { "AMP_MODE_STATUS": { "VALUE": "Unknown" }, "AVAILABLE_AMP_MODES": { "VALUE": "Unknown" }, "CONFIGURED_AMP_MODE": { "VALUE": "Unknown" } }, "MEMORY_DETAILS": { "Memory_Board_1": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_2": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_3": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_4": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_5": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_6": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_7": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_8": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ] }, "MEMORY_DETAILS_SUMMARY": { "Memory_Board_1": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "1067 MHz" }, "OPERATING_VOLTAGE": { "VALUE": "1.50 v" }, "TOTAL_MEMORY_SIZE": { "VALUE": "16 GB" } }, "Memory_Board_2": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_3": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "1067 MHz" }, "OPERATING_VOLTAGE": { "VALUE": "1.50 v" }, "TOTAL_MEMORY_SIZE": { "VALUE": "16 GB" } }, "Memory_Board_4": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_5": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_6": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_7": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_8": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } } } }, "NIC_INFORMATION": { "NIC": [ { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:74" }, "NETWORK_PORT": { "VALUE": "Port 1" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:75" }, "NETWORK_PORT": { "VALUE": "Port 2" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:76" }, "NETWORK_PORT": { "VALUE": "Port 3" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:77" }, "NETWORK_PORT": { "VALUE": "Port 4" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } } ], "iLO": { "IP_ADDRESS": { "VALUE": "10.10.1.66" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "fc:15:b4:18:c0:d4" }, "NETWORK_PORT": { "VALUE": "iLO Dedicated Network Port" }, "PORT_DESCRIPTION": { "VALUE": "iLO Dedicated Network Port" }, "STATUS": { "VALUE": "OK" } } }, "POWER_SUPPLIES": { "POWER_SUPPLY_SUMMARY": { "HIGH_EFFICIENCY_MODE": { "VALUE": "Balanced" }, "HP_POWER_DISCOVERY_SERVICES_REDUNDANCY_STATUS": { "VALUE": "N/A" }, "POWER_MANAGEMENT_CONTROLLER_FIRMWARE_VERSION": { "VALUE": "4.1" }, "POWER_SYSTEM_REDUNDANCY": { "VALUE": "Redundant" }, "PRESENT_POWER_READING": { "VALUE": "162 Watts" } }, "SUPPLY": [ { "CAPACITY": { "VALUE": "1200 Watts" }, "FIRMWARE_VERSION": { "VALUE": "1.00" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 1" }, "MODEL": { "VALUE": "656364-B21" }, "PDS": { "VALUE": "Yes" }, "PRESENT": { "VALUE": "Yes" }, "SERIAL_NUMBER": { "VALUE": "5BXRC0D4D6X0X1" }, "SPARE": { "VALUE": "660185-001" }, "STATUS": { "VALUE": "Good, In Use" } }, { "CAPACITY": { "VALUE": "1200 Watts" }, "FIRMWARE_VERSION": { "VALUE": "1.00" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 2" }, "MODEL": { "VALUE": "656364-B21" }, "PDS": { "VALUE": "Yes" }, "PRESENT": { "VALUE": "Yes" }, "SERIAL_NUMBER": { "VALUE": "5BXRC0D4D6X0WR" }, "SPARE": { "VALUE": "660185-001" }, "STATUS": { "VALUE": "Good, In Use" } }, { "CAPACITY": { "VALUE": "N/A Watts" }, "FIRMWARE_VERSION": { "VALUE": "N/A" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 3" }, "MODEL": { "VALUE": "N/A" }, "PDS": { "VALUE": "Other" }, "PRESENT": { "VALUE": "No" }, "SERIAL_NUMBER": { "VALUE": "N/A" }, "SPARE": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "CAPACITY": { "VALUE": "N/A Watts" }, "FIRMWARE_VERSION": { "VALUE": "N/A" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 4" }, "MODEL": { "VALUE": "N/A" }, "PDS": { "VALUE": "Other" }, "PRESENT": { "VALUE": "No" }, "SERIAL_NUMBER": { "VALUE": "N/A" }, "SPARE": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } } ] }, "PROCESSORS": { "PROCESSOR": [ { "EXECUTION_TECHNOLOGY": { "VALUE": "8/8 cores; 16 threads" }, "INTERNAL_L1_CACHE": { "VALUE": "64 KB" }, "INTERNAL_L2_CACHE": { "VALUE": "256 KB" }, "INTERNAL_L3_CACHE": { "VALUE": "16384 KB" }, "LABEL": { "VALUE": "Proc 1" }, "MEMORY_TECHNOLOGY": { "VALUE": "64-bit Capable" }, "NAME": { "VALUE": "Intel(R) Xeon(R) CPU E7-4820 v2 @ 2.00GHz" }, "SPEED": { "VALUE": "2000 MHz" }, "STATUS": { "VALUE": "OK" } }, { "EXECUTION_TECHNOLOGY": { "VALUE": "8/8 cores; 16 threads" }, "INTERNAL_L1_CACHE": { "VALUE": "64 KB" }, "INTERNAL_L2_CACHE": { "VALUE": "256 KB" }, "INTERNAL_L3_CACHE": { "VALUE": "16384 KB" }, "LABEL": { "VALUE": "Proc 2" }, "MEMORY_TECHNOLOGY": { "VALUE": "64-bit Capable" }, "NAME": { "VALUE": "Intel(R) Xeon(R) CPU E7-4820 v2 @ 2.00GHz" }, "SPEED": { "VALUE": "2000 MHz" }, "STATUS": { "VALUE": "OK" } } ] }, "STORAGE": { "CONTROLLER": { "CACHE_MODULE_MEMORY": { "VALUE": "2097152 KB" }, "CACHE_MODULE_SERIAL_NUM": { "VALUE": "PBKUD0BRH6U3KO" }, "CACHE_MODULE_STATUS": { "VALUE": "OK" }, "CONTROLLER_STATUS": { "VALUE": "OK" }, "DRIVE_ENCLOSURE": [ { "DRIVE_BAY": { "VALUE": "04" }, "LABEL": { "VALUE": "Port 1I Box 1" }, "STATUS": { "VALUE": "OK" } }, { "DRIVE_BAY": { "VALUE": "01" }, "LABEL": { "VALUE": "Port 1I Box 0" }, "STATUS": { "VALUE": "OK" } } ], "ENCRYPTION_CSP_STATUS": { "VALUE": "OK" }, "ENCRYPTION_SELF_TEST_STATUS": { "VALUE": "OK" }, "ENCRYPTION_STATUS": { "VALUE": "Not Enabled" }, "FW_VERSION": { "VALUE": "1.62" }, "LABEL": { "VALUE": "Controller on System Board" }, "LOGICAL_DRIVE": { "CAPACITY": { "VALUE": "99 GB" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FAULT_TOLERANCE": { "VALUE": "RAID 1/RAID 1+0" }, "LABEL": { "VALUE": "01" }, "PHYSICAL_DRIVE": [ { "CAPACITY": { "VALUE": "279 GB" }, "DRIVE_CONFIGURATION": { "VALUE": "Configured" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FW_VERSION": { "VALUE": "HPD0" }, "LABEL": { "VALUE": "Port 1I Box 1 Bay 1" }, "LOCATION": { "VALUE": "Port 1I Box 1 Bay 1" }, "MODEL": { "VALUE": "EG0300FCSPH" }, "SERIAL_NUMBER": { "VALUE": "64R0A18KFTM91426" }, "STATUS": { "VALUE": "OK" } }, { "CAPACITY": { "VALUE": "279 GB" }, "DRIVE_CONFIGURATION": { "VALUE": "Configured" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FW_VERSION": { "VALUE": "HPD0" }, "LABEL": { "VALUE": "Port 1I Box 1 Bay 2" }, "LOCATION": { "VALUE": "Port 1I Box 1 Bay 2" }, "MODEL": { "VALUE": "EG0300FCSPH" }, "SERIAL_NUMBER": { "VALUE": "64R0A109FTM91426" }, "STATUS": { "VALUE": "OK" } } ], "STATUS": { "VALUE": "OK" } }, "MODEL": { "VALUE": "HP Smart Array P830i Controller" }, "SERIAL_NUMBER": { "VALUE": "001438031389320" }, "STATUS": { "VALUE": "OK" } }, "DISCOVERY_STATUS": { "STATUS": { "VALUE": "Discovery Complete" } } }, "TEMPERATURE": { "TEMP": [ { "CAUTION": { "UNIT": "Celsius", "VALUE": "42" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "46" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "27" }, "LABEL": { "VALUE": "01-Inlet Ambient" }, "LOCATION": { "VALUE": "Ambient" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "70" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "02-CPU 1" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "70" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "03-CPU 2" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "04-CPU 3" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "05-CPU 4" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "87" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "34" }, "LABEL": { "VALUE": "06-P1 DIMM 1-24" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "87" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "34" }, "LABEL": { "VALUE": "07-P2 DIMM 25-48" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "08-P3 DIMM 49-72" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "09-P4 DIMM 73-96" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "95" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "51" }, "LABEL": { "VALUE": "10-P1 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "95" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "51" }, "LABEL": { "VALUE": "11-P2 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "12-P3 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "13-P4 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "60" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "35" }, "LABEL": { "VALUE": "14-HD Max" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "105" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "68" }, "LABEL": { "VALUE": "15-Chipset" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "33" }, "LABEL": { "VALUE": "16-P/S 1" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "31" }, "LABEL": { "VALUE": "17-P/S 2" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "18-P/S 3" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "19-P/S 4" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "70" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "75" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "30" }, "LABEL": { "VALUE": "20-P/S Zone" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "115" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "120" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "46" }, "LABEL": { "VALUE": "21-VR P1" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "115" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "120" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "45" }, "LABEL": { "VALUE": "22-VR P2" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "23-VR P3" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "24-VR P4" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "25-VR P1 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "26-VR P2 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "36" }, "LABEL": { "VALUE": "27-VR P3 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "30" }, "LABEL": { "VALUE": "28-VR P4 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "29-VR P1 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "30-VR P2 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "31-VR P3 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "32-VR P4 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "65" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "29" }, "LABEL": { "VALUE": "33-SuperCAP Max" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "100" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "82" }, "LABEL": { "VALUE": "34-HD Controller" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "35-PCI 1" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "36-PCI 2" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "37-PCI 3" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "38-PCI 4" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "39-PCI 5" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "40-PCI 6" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "41-PCI 7" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "42-PCI 8" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "43-PCI 9" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "44-PCI 1 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "45-PCI 2 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "46-PCI 3 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "42" }, "LABEL": { "VALUE": "47-PCI 4 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "48-PCI 5 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "49-PCI 6 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "50-PCI 7 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "51-PCI 8 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "52-PCI 9 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "53-LOM Card" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "54-I/O Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "49" }, "LABEL": { "VALUE": "55-SPI Board" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "56-GPU 1" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "57-GPU 2" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } } ] }, "VRM": {} }, "RESPONSE": { "MESSAGE": "No error", "STATUS": "0x0000" }, "VERSION": "2.23" } ''' GET_EMBEDDED_HEALTH_OUTPUT_GT_SUGGESTED = ''' { "GET_EMBEDDED_HEALTH_DATA": { "FANS": { "FAN": [ { "LABEL": { "VALUE": "Fan Block 1" }, "SPEED": { "UNIT": "Percentage", "VALUE": "12" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } }, { "LABEL": { "VALUE": "Fan Block 2" }, "SPEED": { "UNIT": "Percentage", "VALUE": "12" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } }, { "LABEL": { "VALUE": "Fan Block 3" }, "SPEED": { "UNIT": "Percentage", "VALUE": "18" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } }, { "LABEL": { "VALUE": "Fan Block 4" }, "SPEED": { "UNIT": "Percentage", "VALUE": "18" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } } ] }, "FIRMWARE_INFORMATION": { "INDEX_1": { "FIRMWARE_NAME": { "VALUE": "HP ProLiant System ROM" }, "FIRMWARE_VERSION": { "VALUE": "11/26/2014" } }, "INDEX_10": { "FIRMWARE_NAME": { "VALUE": "HP Smart Array P830i Controller" }, "FIRMWARE_VERSION": { "VALUE": "1.62" } }, "INDEX_2": { "FIRMWARE_NAME": { "VALUE": "HP ProLiant System ROM - Backup" }, "FIRMWARE_VERSION": { "VALUE": "11/26/2014" } }, "INDEX_3": { "FIRMWARE_NAME": { "VALUE": "HP ProLiant System ROM Bootblock" }, "FIRMWARE_VERSION": { "VALUE": "" } }, "INDEX_4": { "FIRMWARE_NAME": { "VALUE": "iLO" }, "FIRMWARE_VERSION": { "VALUE": "2.54 Sep 05 2014" } }, "INDEX_5": { "FIRMWARE_FAMILY": { "VALUE": "0Ch" }, "FIRMWARE_NAME": { "VALUE": "Power Management Controller Firmware" }, "FIRMWARE_VERSION": { "VALUE": "4.1" } }, "INDEX_6": { "FIRMWARE_NAME": { "VALUE": "Power Management Controller FW Bootloader" }, "FIRMWARE_VERSION": { "VALUE": "2.7" } }, "INDEX_7": { "FIRMWARE_NAME": { "VALUE": "System Programmable Logic Device" }, "FIRMWARE_VERSION": { "VALUE": "Version 0x0B" } }, "INDEX_8": { "FIRMWARE_NAME": { "VALUE": "SAS Programmable Logic Device" }, "FIRMWARE_VERSION": { "VALUE": "Version 0x04" } }, "INDEX_9": { "FIRMWARE_NAME": { "VALUE": "Server Platform Services (SPS) Firmware" }, "FIRMWARE_VERSION": { "VALUE": "2.3.0.FA.0" } } }, "HEALTH_AT_A_GLANCE": { "BIOS_HARDWARE": { "STATUS": "OK" }, "FANS": [ { "STATUS": "OK" }, { "REDUNDANCY": "Redundant" } ], "MEMORY": { "STATUS": "Other" }, "NETWORK": { "STATUS": "OK" }, "POWER_SUPPLIES": [ { "STATUS": "OK" }, { "REDUNDANCY": "Redundant" } ], "PROCESSOR": { "STATUS": "OK" }, "STORAGE": { "STATUS": "OK" }, "TEMPERATURE": { "STATUS": "OK" } }, "MEMORY": { "ADVANCED_MEMORY_PROTECTION": { "AMP_MODE_STATUS": { "VALUE": "Unknown" }, "AVAILABLE_AMP_MODES": { "VALUE": "Unknown" }, "CONFIGURED_AMP_MODE": { "VALUE": "Unknown" } }, "MEMORY_DETAILS": { "Memory_Board_1": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_2": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_3": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_4": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_5": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_6": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_7": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_8": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ] }, "MEMORY_DETAILS_SUMMARY": { "Memory_Board_1": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "1067 MHz" }, "OPERATING_VOLTAGE": { "VALUE": "1.50 v" }, "TOTAL_MEMORY_SIZE": { "VALUE": "16 GB" } }, "Memory_Board_2": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_3": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "1067 MHz" }, "OPERATING_VOLTAGE": { "VALUE": "1.50 v" }, "TOTAL_MEMORY_SIZE": { "VALUE": "16 GB" } }, "Memory_Board_4": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_5": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_6": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_7": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_8": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } } } }, "NIC_INFORMATION": { "NIC": [ { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:74" }, "NETWORK_PORT": { "VALUE": "Port 1" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:75" }, "NETWORK_PORT": { "VALUE": "Port 2" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:76" }, "NETWORK_PORT": { "VALUE": "Port 3" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:77" }, "NETWORK_PORT": { "VALUE": "Port 4" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } } ], "iLO": { "IP_ADDRESS": { "VALUE": "10.10.1.66" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "fc:15:b4:18:c0:d4" }, "NETWORK_PORT": { "VALUE": "iLO Dedicated Network Port" }, "PORT_DESCRIPTION": { "VALUE": "iLO Dedicated Network Port" }, "STATUS": { "VALUE": "OK" } } }, "POWER_SUPPLIES": { "POWER_SUPPLY_SUMMARY": { "HIGH_EFFICIENCY_MODE": { "VALUE": "Balanced" }, "HP_POWER_DISCOVERY_SERVICES_REDUNDANCY_STATUS": { "VALUE": "N/A" }, "POWER_MANAGEMENT_CONTROLLER_FIRMWARE_VERSION": { "VALUE": "4.1" }, "POWER_SYSTEM_REDUNDANCY": { "VALUE": "Redundant" }, "PRESENT_POWER_READING": { "VALUE": "162 Watts" } }, "SUPPLY": [ { "CAPACITY": { "VALUE": "1200 Watts" }, "FIRMWARE_VERSION": { "VALUE": "1.00" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 1" }, "MODEL": { "VALUE": "656364-B21" }, "PDS": { "VALUE": "Yes" }, "PRESENT": { "VALUE": "Yes" }, "SERIAL_NUMBER": { "VALUE": "5BXRC0D4D6X0X1" }, "SPARE": { "VALUE": "660185-001" }, "STATUS": { "VALUE": "Good, In Use" } }, { "CAPACITY": { "VALUE": "1200 Watts" }, "FIRMWARE_VERSION": { "VALUE": "1.00" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 2" }, "MODEL": { "VALUE": "656364-B21" }, "PDS": { "VALUE": "Yes" }, "PRESENT": { "VALUE": "Yes" }, "SERIAL_NUMBER": { "VALUE": "5BXRC0D4D6X0WR" }, "SPARE": { "VALUE": "660185-001" }, "STATUS": { "VALUE": "Good, In Use" } }, { "CAPACITY": { "VALUE": "N/A Watts" }, "FIRMWARE_VERSION": { "VALUE": "N/A" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 3" }, "MODEL": { "VALUE": "N/A" }, "PDS": { "VALUE": "Other" }, "PRESENT": { "VALUE": "No" }, "SERIAL_NUMBER": { "VALUE": "N/A" }, "SPARE": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "CAPACITY": { "VALUE": "N/A Watts" }, "FIRMWARE_VERSION": { "VALUE": "N/A" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 4" }, "MODEL": { "VALUE": "N/A" }, "PDS": { "VALUE": "Other" }, "PRESENT": { "VALUE": "No" }, "SERIAL_NUMBER": { "VALUE": "N/A" }, "SPARE": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } } ] }, "PROCESSORS": { "PROCESSOR": [ { "EXECUTION_TECHNOLOGY": { "VALUE": "8/8 cores; 16 threads" }, "INTERNAL_L1_CACHE": { "VALUE": "64 KB" }, "INTERNAL_L2_CACHE": { "VALUE": "256 KB" }, "INTERNAL_L3_CACHE": { "VALUE": "16384 KB" }, "LABEL": { "VALUE": "Proc 1" }, "MEMORY_TECHNOLOGY": { "VALUE": "64-bit Capable" }, "NAME": { "VALUE": "Intel(R) Xeon(R) CPU E7-4820 v2 @ 2.00GHz" }, "SPEED": { "VALUE": "2000 MHz" }, "STATUS": { "VALUE": "OK" } }, { "EXECUTION_TECHNOLOGY": { "VALUE": "8/8 cores; 16 threads" }, "INTERNAL_L1_CACHE": { "VALUE": "64 KB" }, "INTERNAL_L2_CACHE": { "VALUE": "256 KB" }, "INTERNAL_L3_CACHE": { "VALUE": "16384 KB" }, "LABEL": { "VALUE": "Proc 2" }, "MEMORY_TECHNOLOGY": { "VALUE": "64-bit Capable" }, "NAME": { "VALUE": "Intel(R) Xeon(R) CPU E7-4820 v2 @ 2.00GHz" }, "SPEED": { "VALUE": "2000 MHz" }, "STATUS": { "VALUE": "OK" } } ] }, "STORAGE": { "CONTROLLER": { "CACHE_MODULE_MEMORY": { "VALUE": "2097152 KB" }, "CACHE_MODULE_SERIAL_NUM": { "VALUE": "PBKUD0BRH6U3KO" }, "CACHE_MODULE_STATUS": { "VALUE": "OK" }, "CONTROLLER_STATUS": { "VALUE": "OK" }, "DRIVE_ENCLOSURE": [ { "DRIVE_BAY": { "VALUE": "04" }, "LABEL": { "VALUE": "Port 1I Box 1" }, "STATUS": { "VALUE": "OK" } }, { "DRIVE_BAY": { "VALUE": "01" }, "LABEL": { "VALUE": "Port 1I Box 0" }, "STATUS": { "VALUE": "OK" } } ], "ENCRYPTION_CSP_STATUS": { "VALUE": "OK" }, "ENCRYPTION_SELF_TEST_STATUS": { "VALUE": "OK" }, "ENCRYPTION_STATUS": { "VALUE": "Not Enabled" }, "FW_VERSION": { "VALUE": "1.62" }, "LABEL": { "VALUE": "Controller on System Board" }, "LOGICAL_DRIVE": { "CAPACITY": { "VALUE": "99 GB" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FAULT_TOLERANCE": { "VALUE": "RAID 1/RAID 1+0" }, "LABEL": { "VALUE": "01" }, "PHYSICAL_DRIVE": [ { "CAPACITY": { "VALUE": "279 GB" }, "DRIVE_CONFIGURATION": { "VALUE": "Configured" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FW_VERSION": { "VALUE": "HPD0" }, "LABEL": { "VALUE": "Port 1I Box 1 Bay 1" }, "LOCATION": { "VALUE": "Port 1I Box 1 Bay 1" }, "MODEL": { "VALUE": "EG0300FCSPH" }, "SERIAL_NUMBER": { "VALUE": "64R0A18KFTM91426" }, "STATUS": { "VALUE": "OK" } }, { "CAPACITY": { "VALUE": "279 GB" }, "DRIVE_CONFIGURATION": { "VALUE": "Configured" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FW_VERSION": { "VALUE": "HPD0" }, "LABEL": { "VALUE": "Port 1I Box 1 Bay 2" }, "LOCATION": { "VALUE": "Port 1I Box 1 Bay 2" }, "MODEL": { "VALUE": "EG0300FCSPH" }, "SERIAL_NUMBER": { "VALUE": "64R0A109FTM91426" }, "STATUS": { "VALUE": "OK" } } ], "STATUS": { "VALUE": "OK" } }, "MODEL": { "VALUE": "HP Smart Array P830i Controller" }, "SERIAL_NUMBER": { "VALUE": "001438031389320" }, "STATUS": { "VALUE": "OK" } }, "DISCOVERY_STATUS": { "STATUS": { "VALUE": "Discovery Complete" } } }, "TEMPERATURE": { "TEMP": [ { "CAUTION": { "UNIT": "Celsius", "VALUE": "42" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "46" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "27" }, "LABEL": { "VALUE": "01-Inlet Ambient" }, "LOCATION": { "VALUE": "Ambient" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "70" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "02-CPU 1" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "70" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "03-CPU 2" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "04-CPU 3" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "05-CPU 4" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "87" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "34" }, "LABEL": { "VALUE": "06-P1 DIMM 1-24" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "87" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "34" }, "LABEL": { "VALUE": "07-P2 DIMM 25-48" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "08-P3 DIMM 49-72" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "09-P4 DIMM 73-96" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "95" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "51" }, "LABEL": { "VALUE": "10-P1 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "95" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "51" }, "LABEL": { "VALUE": "11-P2 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "12-P3 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "13-P4 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "60" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "35" }, "LABEL": { "VALUE": "14-HD Max" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "105" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "68" }, "LABEL": { "VALUE": "15-Chipset" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "33" }, "LABEL": { "VALUE": "16-P/S 1" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "31" }, "LABEL": { "VALUE": "17-P/S 2" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "18-P/S 3" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "19-P/S 4" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "70" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "75" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "30" }, "LABEL": { "VALUE": "20-P/S Zone" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "115" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "120" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "46" }, "LABEL": { "VALUE": "21-VR P1" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "115" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "120" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "45" }, "LABEL": { "VALUE": "22-VR P2" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "23-VR P3" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "24-VR P4" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "25-VR P1 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "26-VR P2 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "36" }, "LABEL": { "VALUE": "27-VR P3 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "30" }, "LABEL": { "VALUE": "28-VR P4 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "29-VR P1 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "30-VR P2 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "31-VR P3 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "32-VR P4 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "65" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "29" }, "LABEL": { "VALUE": "33-SuperCAP Max" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "100" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "82" }, "LABEL": { "VALUE": "34-HD Controller" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "35-PCI 1" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "36-PCI 2" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "37-PCI 3" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "38-PCI 4" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "39-PCI 5" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "40-PCI 6" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "41-PCI 7" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "42-PCI 8" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "43-PCI 9" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "44-PCI 1 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "45-PCI 2 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "46-PCI 3 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "42" }, "LABEL": { "VALUE": "47-PCI 4 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "48-PCI 5 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "49-PCI 6 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "50-PCI 7 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "51-PCI 8 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "52-PCI 9 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "53-LOM Card" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "54-I/O Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "49" }, "LABEL": { "VALUE": "55-SPI Board" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "56-GPU 1" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "57-GPU 2" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } } ] }, "VRM": {} }, "RESPONSE": { "MESSAGE": "No error", "STATUS": "0x0000" }, "VERSION": "2.23" } ''' GET_EMBEDDED_HEALTH_OUTPUT_UNEXPECTED_FORMAT = ''' { "GET_EMBEDDED_HEALTH_DATA": { "FANS": { "FAN": [ { "LABEL": { "VALUE": "Fan Block 1" }, "SPEED": { "UNIT": "Percentage", "VALUE": "12" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } }, { "LABEL": { "VALUE": "Fan Block 2" }, "SPEED": { "UNIT": "Percentage", "VALUE": "12" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } }, { "LABEL": { "VALUE": "Fan Block 3" }, "SPEED": { "UNIT": "Percentage", "VALUE": "18" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } }, { "LABEL": { "VALUE": "Fan Block 4" }, "SPEED": { "UNIT": "Percentage", "VALUE": "18" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } } ] }, "FIRMWARE_INFORMATION": { "INDEX_1": { "FIRMWARE_NAME": { "VALUE": "HP ProLiant System ROM" }, "FIRMWARE_VERSION": { "VALUE": "11/26/2014" } }, "INDEX_10": { "FIRMWARE_NAME": { "VALUE": "HP Smart Array P830i Controller" }, "FIRMWARE_VERSION": { "VALUE": "1.62" } }, "INDEX_2": { "FIRMWARE_NAME": { "VALUE": "HP ProLiant System ROM - Backup" }, "FIRMWARE_VERSION": { "VALUE": "11/26/2014" } }, "INDEX_3": { "FIRMWARE_NAME": { "VALUE": "HP ProLiant System ROM Bootblock" }, "FIRMWARE_VERSION": { "VALUE": "" } }, "INDEX_4": { "FIRMWARE_NAME": { "VALUE": "iLO" }, "FIRMWARE_VERSION": { "VALUE": "iLO x.y Sep 05 2014" } }, "INDEX_5": { "FIRMWARE_FAMILY": { "VALUE": "0Ch" }, "FIRMWARE_NAME": { "VALUE": "Power Management Controller Firmware" }, "FIRMWARE_VERSION": { "VALUE": "4.1" } }, "INDEX_6": { "FIRMWARE_NAME": { "VALUE": "Power Management Controller FW Bootloader" }, "FIRMWARE_VERSION": { "VALUE": "2.7" } }, "INDEX_7": { "FIRMWARE_NAME": { "VALUE": "System Programmable Logic Device" }, "FIRMWARE_VERSION": { "VALUE": "Version 0x0B" } }, "INDEX_8": { "FIRMWARE_NAME": { "VALUE": "SAS Programmable Logic Device" }, "FIRMWARE_VERSION": { "VALUE": "Version 0x04" } }, "INDEX_9": { "FIRMWARE_NAME": { "VALUE": "Server Platform Services (SPS) Firmware" }, "FIRMWARE_VERSION": { "VALUE": "2.3.0.FA.0" } } }, "HEALTH_AT_A_GLANCE": { "BIOS_HARDWARE": { "STATUS": "OK" }, "FANS": [ { "STATUS": "OK" }, { "REDUNDANCY": "Redundant" } ], "MEMORY": { "STATUS": "Other" }, "NETWORK": { "STATUS": "OK" }, "POWER_SUPPLIES": [ { "STATUS": "OK" }, { "REDUNDANCY": "Redundant" } ], "PROCESSOR": { "STATUS": "OK" }, "STORAGE": { "STATUS": "OK" }, "TEMPERATURE": { "STATUS": "OK" } }, "MEMORY": { "ADVANCED_MEMORY_PROTECTION": { "AMP_MODE_STATUS": { "VALUE": "Unknown" }, "AVAILABLE_AMP_MODES": { "VALUE": "Unknown" }, "CONFIGURED_AMP_MODE": { "VALUE": "Unknown" } }, "MEMORY_DETAILS": { "Memory_Board_1": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_2": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_3": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_4": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_5": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_6": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_7": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_8": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ] }, "MEMORY_DETAILS_SUMMARY": { "Memory_Board_1": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "1067 MHz" }, "OPERATING_VOLTAGE": { "VALUE": "1.50 v" }, "TOTAL_MEMORY_SIZE": { "VALUE": "16 GB" } }, "Memory_Board_2": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_3": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "1067 MHz" }, "OPERATING_VOLTAGE": { "VALUE": "1.50 v" }, "TOTAL_MEMORY_SIZE": { "VALUE": "16 GB" } }, "Memory_Board_4": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_5": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_6": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_7": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_8": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } } } }, "NIC_INFORMATION": { "NIC": [ { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:74" }, "NETWORK_PORT": { "VALUE": "Port 1" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:75" }, "NETWORK_PORT": { "VALUE": "Port 2" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:76" }, "NETWORK_PORT": { "VALUE": "Port 3" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:77" }, "NETWORK_PORT": { "VALUE": "Port 4" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } } ], "iLO": { "IP_ADDRESS": { "VALUE": "10.10.1.66" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "fc:15:b4:18:c0:d4" }, "NETWORK_PORT": { "VALUE": "iLO Dedicated Network Port" }, "PORT_DESCRIPTION": { "VALUE": "iLO Dedicated Network Port" }, "STATUS": { "VALUE": "OK" } } }, "POWER_SUPPLIES": { "POWER_SUPPLY_SUMMARY": { "HIGH_EFFICIENCY_MODE": { "VALUE": "Balanced" }, "HP_POWER_DISCOVERY_SERVICES_REDUNDANCY_STATUS": { "VALUE": "N/A" }, "POWER_MANAGEMENT_CONTROLLER_FIRMWARE_VERSION": { "VALUE": "4.1" }, "POWER_SYSTEM_REDUNDANCY": { "VALUE": "Redundant" }, "PRESENT_POWER_READING": { "VALUE": "162 Watts" } }, "SUPPLY": [ { "CAPACITY": { "VALUE": "1200 Watts" }, "FIRMWARE_VERSION": { "VALUE": "1.00" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 1" }, "MODEL": { "VALUE": "656364-B21" }, "PDS": { "VALUE": "Yes" }, "PRESENT": { "VALUE": "Yes" }, "SERIAL_NUMBER": { "VALUE": "5BXRC0D4D6X0X1" }, "SPARE": { "VALUE": "660185-001" }, "STATUS": { "VALUE": "Good, In Use" } }, { "CAPACITY": { "VALUE": "1200 Watts" }, "FIRMWARE_VERSION": { "VALUE": "1.00" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 2" }, "MODEL": { "VALUE": "656364-B21" }, "PDS": { "VALUE": "Yes" }, "PRESENT": { "VALUE": "Yes" }, "SERIAL_NUMBER": { "VALUE": "5BXRC0D4D6X0WR" }, "SPARE": { "VALUE": "660185-001" }, "STATUS": { "VALUE": "Good, In Use" } }, { "CAPACITY": { "VALUE": "N/A Watts" }, "FIRMWARE_VERSION": { "VALUE": "N/A" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 3" }, "MODEL": { "VALUE": "N/A" }, "PDS": { "VALUE": "Other" }, "PRESENT": { "VALUE": "No" }, "SERIAL_NUMBER": { "VALUE": "N/A" }, "SPARE": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "CAPACITY": { "VALUE": "N/A Watts" }, "FIRMWARE_VERSION": { "VALUE": "N/A" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 4" }, "MODEL": { "VALUE": "N/A" }, "PDS": { "VALUE": "Other" }, "PRESENT": { "VALUE": "No" }, "SERIAL_NUMBER": { "VALUE": "N/A" }, "SPARE": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } } ] }, "PROCESSORS": { "PROCESSOR": [ { "EXECUTION_TECHNOLOGY": { "VALUE": "8/8 cores; 16 threads" }, "INTERNAL_L1_CACHE": { "VALUE": "64 KB" }, "INTERNAL_L2_CACHE": { "VALUE": "256 KB" }, "INTERNAL_L3_CACHE": { "VALUE": "16384 KB" }, "LABEL": { "VALUE": "Proc 1" }, "MEMORY_TECHNOLOGY": { "VALUE": "64-bit Capable" }, "NAME": { "VALUE": "Intel(R) Xeon(R) CPU E7-4820 v2 @ 2.00GHz" }, "SPEED": { "VALUE": "2000 MHz" }, "STATUS": { "VALUE": "OK" } }, { "EXECUTION_TECHNOLOGY": { "VALUE": "8/8 cores; 16 threads" }, "INTERNAL_L1_CACHE": { "VALUE": "64 KB" }, "INTERNAL_L2_CACHE": { "VALUE": "256 KB" }, "INTERNAL_L3_CACHE": { "VALUE": "16384 KB" }, "LABEL": { "VALUE": "Proc 2" }, "MEMORY_TECHNOLOGY": { "VALUE": "64-bit Capable" }, "NAME": { "VALUE": "Intel(R) Xeon(R) CPU E7-4820 v2 @ 2.00GHz" }, "SPEED": { "VALUE": "2000 MHz" }, "STATUS": { "VALUE": "OK" } } ] }, "STORAGE": { "CONTROLLER": { "CACHE_MODULE_MEMORY": { "VALUE": "2097152 KB" }, "CACHE_MODULE_SERIAL_NUM": { "VALUE": "PBKUD0BRH6U3KO" }, "CACHE_MODULE_STATUS": { "VALUE": "OK" }, "CONTROLLER_STATUS": { "VALUE": "OK" }, "DRIVE_ENCLOSURE": [ { "DRIVE_BAY": { "VALUE": "04" }, "LABEL": { "VALUE": "Port 1I Box 1" }, "STATUS": { "VALUE": "OK" } }, { "DRIVE_BAY": { "VALUE": "01" }, "LABEL": { "VALUE": "Port 1I Box 0" }, "STATUS": { "VALUE": "OK" } } ], "ENCRYPTION_CSP_STATUS": { "VALUE": "OK" }, "ENCRYPTION_SELF_TEST_STATUS": { "VALUE": "OK" }, "ENCRYPTION_STATUS": { "VALUE": "Not Enabled" }, "FW_VERSION": { "VALUE": "1.62" }, "LABEL": { "VALUE": "Controller on System Board" }, "LOGICAL_DRIVE": { "CAPACITY": { "VALUE": "99 GB" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FAULT_TOLERANCE": { "VALUE": "RAID 1/RAID 1+0" }, "LABEL": { "VALUE": "01" }, "PHYSICAL_DRIVE": [ { "CAPACITY": { "VALUE": "279 GB" }, "DRIVE_CONFIGURATION": { "VALUE": "Configured" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FW_VERSION": { "VALUE": "HPD0" }, "LABEL": { "VALUE": "Port 1I Box 1 Bay 1" }, "LOCATION": { "VALUE": "Port 1I Box 1 Bay 1" }, "MODEL": { "VALUE": "EG0300FCSPH" }, "SERIAL_NUMBER": { "VALUE": "64R0A18KFTM91426" }, "STATUS": { "VALUE": "OK" } }, { "CAPACITY": { "VALUE": "279 GB" }, "DRIVE_CONFIGURATION": { "VALUE": "Configured" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FW_VERSION": { "VALUE": "HPD0" }, "LABEL": { "VALUE": "Port 1I Box 1 Bay 2" }, "LOCATION": { "VALUE": "Port 1I Box 1 Bay 2" }, "MODEL": { "VALUE": "EG0300FCSPH" }, "SERIAL_NUMBER": { "VALUE": "64R0A109FTM91426" }, "STATUS": { "VALUE": "OK" } } ], "STATUS": { "VALUE": "OK" } }, "MODEL": { "VALUE": "HP Smart Array P830i Controller" }, "SERIAL_NUMBER": { "VALUE": "001438031389320" }, "STATUS": { "VALUE": "OK" } }, "DISCOVERY_STATUS": { "STATUS": { "VALUE": "Discovery Complete" } } }, "TEMPERATURE": { "TEMP": [ { "CAUTION": { "UNIT": "Celsius", "VALUE": "42" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "46" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "27" }, "LABEL": { "VALUE": "01-Inlet Ambient" }, "LOCATION": { "VALUE": "Ambient" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "70" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "02-CPU 1" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "70" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "03-CPU 2" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "04-CPU 3" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "05-CPU 4" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "87" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "34" }, "LABEL": { "VALUE": "06-P1 DIMM 1-24" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "87" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "34" }, "LABEL": { "VALUE": "07-P2 DIMM 25-48" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "08-P3 DIMM 49-72" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "09-P4 DIMM 73-96" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "95" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "51" }, "LABEL": { "VALUE": "10-P1 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "95" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "51" }, "LABEL": { "VALUE": "11-P2 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "12-P3 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "13-P4 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "60" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "35" }, "LABEL": { "VALUE": "14-HD Max" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "105" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "68" }, "LABEL": { "VALUE": "15-Chipset" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "33" }, "LABEL": { "VALUE": "16-P/S 1" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "31" }, "LABEL": { "VALUE": "17-P/S 2" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "18-P/S 3" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "19-P/S 4" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "70" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "75" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "30" }, "LABEL": { "VALUE": "20-P/S Zone" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "115" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "120" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "46" }, "LABEL": { "VALUE": "21-VR P1" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "115" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "120" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "45" }, "LABEL": { "VALUE": "22-VR P2" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "23-VR P3" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "24-VR P4" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "25-VR P1 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "26-VR P2 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "36" }, "LABEL": { "VALUE": "27-VR P3 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "30" }, "LABEL": { "VALUE": "28-VR P4 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "29-VR P1 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "30-VR P2 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "31-VR P3 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "32-VR P4 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "65" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "29" }, "LABEL": { "VALUE": "33-SuperCAP Max" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "100" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "82" }, "LABEL": { "VALUE": "34-HD Controller" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "35-PCI 1" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "36-PCI 2" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "37-PCI 3" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "38-PCI 4" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "39-PCI 5" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "40-PCI 6" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "41-PCI 7" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "42-PCI 8" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "43-PCI 9" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "44-PCI 1 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "45-PCI 2 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "46-PCI 3 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "42" }, "LABEL": { "VALUE": "47-PCI 4 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "48-PCI 5 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "49-PCI 6 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "50-PCI 7 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "51-PCI 8 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "52-PCI 9 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "53-LOM Card" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "54-I/O Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "49" }, "LABEL": { "VALUE": "55-SPI Board" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "56-GPU 1" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "57-GPU 2" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } } ] }, "VRM": {} }, "RESPONSE": { "MESSAGE": "No error", "STATUS": "0x0000" }, "VERSION": "2.23" } ''' GET_EMBEDDED_HEALTH_OUTPUT_NO_FIRMWARE = ''' { "GET_EMBEDDED_HEALTH_DATA": { "FANS": { "FAN": [ { "LABEL": { "VALUE": "Fan Block 1" }, "SPEED": { "UNIT": "Percentage", "VALUE": "12" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } }, { "LABEL": { "VALUE": "Fan Block 2" }, "SPEED": { "UNIT": "Percentage", "VALUE": "12" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } }, { "LABEL": { "VALUE": "Fan Block 3" }, "SPEED": { "UNIT": "Percentage", "VALUE": "18" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } }, { "LABEL": { "VALUE": "Fan Block 4" }, "SPEED": { "UNIT": "Percentage", "VALUE": "18" }, "STATUS": { "VALUE": "OK" }, "ZONE": { "VALUE": "System" } } ] }, "FIRMWARE_INFORMATION": { "INDEX_1": { "FIRMWARE_NAME": { "VALUE": "HP ProLiant System ROM" }, "FIRMWARE_VERSION": { "VALUE": "11/26/2014" } }, "INDEX_10": { "FIRMWARE_NAME": { "VALUE": "HP Smart Array P830i Controller" }, "FIRMWARE_VERSION": { "VALUE": "1.62" } }, "INDEX_2": { "FIRMWARE_NAME": { "VALUE": "HP ProLiant System ROM - Backup" }, "FIRMWARE_VERSION": { "VALUE": "11/26/2014" } }, "INDEX_3": { "FIRMWARE_NAME": { "VALUE": "HP ProLiant System ROM Bootblock" }, "FIRMWARE_VERSION": { "VALUE": "" } }, "INDEX_4": { "FIRMWARE_NAME": { "VALUE": "iLO" }, "FIRMWARE_VERSION": { "VALUE": "" } }, "INDEX_5": { "FIRMWARE_FAMILY": { "VALUE": "0Ch" }, "FIRMWARE_NAME": { "VALUE": "Power Management Controller Firmware" }, "FIRMWARE_VERSION": { "VALUE": "4.1" } }, "INDEX_6": { "FIRMWARE_NAME": { "VALUE": "Power Management Controller FW Bootloader" }, "FIRMWARE_VERSION": { "VALUE": "2.7" } }, "INDEX_7": { "FIRMWARE_NAME": { "VALUE": "System Programmable Logic Device" }, "FIRMWARE_VERSION": { "VALUE": "Version 0x0B" } }, "INDEX_8": { "FIRMWARE_NAME": { "VALUE": "SAS Programmable Logic Device" }, "FIRMWARE_VERSION": { "VALUE": "Version 0x04" } }, "INDEX_9": { "FIRMWARE_NAME": { "VALUE": "Server Platform Services (SPS) Firmware" }, "FIRMWARE_VERSION": { "VALUE": "2.3.0.FA.0" } } }, "HEALTH_AT_A_GLANCE": { "BIOS_HARDWARE": { "STATUS": "OK" }, "FANS": [ { "STATUS": "OK" }, { "REDUNDANCY": "Redundant" } ], "MEMORY": { "STATUS": "Other" }, "NETWORK": { "STATUS": "OK" }, "POWER_SUPPLIES": [ { "STATUS": "OK" }, { "REDUNDANCY": "Redundant" } ], "PROCESSOR": { "STATUS": "OK" }, "STORAGE": { "STATUS": "OK" }, "TEMPERATURE": { "STATUS": "OK" } }, "MEMORY": { "ADVANCED_MEMORY_PROTECTION": { "AMP_MODE_STATUS": { "VALUE": "Unknown" }, "AVAILABLE_AMP_MODES": { "VALUE": "Unknown" }, "CONFIGURED_AMP_MODE": { "VALUE": "Unknown" } }, "MEMORY_DETAILS": { "Memory_Board_1": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_2": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_3": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "1866 MHz" }, "HP_SMART_MEMORY": { "VALUE": "Yes" }, "MINIMUM_VOLTAGE": { "VALUE": "1.50 v" }, "PART": { "NUMBER": "731657-081" }, "RANKS": { "VALUE": "1" }, "SIZE": { "VALUE": "8192 MB" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Good, In Use" }, "TECHNOLOGY": { "VALUE": "RDIMM" }, "TYPE": { "VALUE": "DIMM DDR3" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_4": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_5": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_6": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_7": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ], "Memory_Board_8": [ { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "1" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "2" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "3" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "4" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "5" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "6" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "7" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "8" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "9" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "10" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "11" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } }, { "FREQUENCY": { "VALUE": "N/A" }, "HP_SMART_MEMORY": { "VALUE": "N/A" }, "MINIMUM_VOLTAGE": { "VALUE": "N/A" }, "PART": { "NUMBER": "N/A" }, "RANKS": { "VALUE": "N/A" }, "SIZE": { "VALUE": "N/A" }, "SOCKET": { "VALUE": "12" }, "STATUS": { "VALUE": "Not Present" }, "TECHNOLOGY": { "VALUE": "N/A" }, "TYPE": { "VALUE": "N/A" } } ] }, "MEMORY_DETAILS_SUMMARY": { "Memory_Board_1": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "1067 MHz" }, "OPERATING_VOLTAGE": { "VALUE": "1.50 v" }, "TOTAL_MEMORY_SIZE": { "VALUE": "16 GB" } }, "Memory_Board_2": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_3": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "1067 MHz" }, "OPERATING_VOLTAGE": { "VALUE": "1.50 v" }, "TOTAL_MEMORY_SIZE": { "VALUE": "16 GB" } }, "Memory_Board_4": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_5": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_6": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_7": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } }, "Memory_Board_8": { "NUMBER_OF_SOCKETS": { "VALUE": "12" }, "OPERATING_FREQUENCY": { "VALUE": "N/A" }, "OPERATING_VOLTAGE": { "VALUE": "N/A" }, "TOTAL_MEMORY_SIZE": { "VALUE": "N/A" } } } }, "NIC_INFORMATION": { "NIC": [ { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:74" }, "NETWORK_PORT": { "VALUE": "Port 1" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:75" }, "NETWORK_PORT": { "VALUE": "Port 2" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:76" }, "NETWORK_PORT": { "VALUE": "Port 3" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "IP_ADDRESS": { "VALUE": "N/A" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "40:a8:f0:1e:86:77" }, "NETWORK_PORT": { "VALUE": "Port 4" }, "PORT_DESCRIPTION": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } } ], "iLO": { "IP_ADDRESS": { "VALUE": "10.10.1.66" }, "LOCATION": { "VALUE": "Embedded" }, "MAC_ADDRESS": { "VALUE": "fc:15:b4:18:c0:d4" }, "NETWORK_PORT": { "VALUE": "iLO Dedicated Network Port" }, "PORT_DESCRIPTION": { "VALUE": "iLO Dedicated Network Port" }, "STATUS": { "VALUE": "OK" } } }, "POWER_SUPPLIES": { "POWER_SUPPLY_SUMMARY": { "HIGH_EFFICIENCY_MODE": { "VALUE": "Balanced" }, "HP_POWER_DISCOVERY_SERVICES_REDUNDANCY_STATUS": { "VALUE": "N/A" }, "POWER_MANAGEMENT_CONTROLLER_FIRMWARE_VERSION": { "VALUE": "4.1" }, "POWER_SYSTEM_REDUNDANCY": { "VALUE": "Redundant" }, "PRESENT_POWER_READING": { "VALUE": "162 Watts" } }, "SUPPLY": [ { "CAPACITY": { "VALUE": "1200 Watts" }, "FIRMWARE_VERSION": { "VALUE": "1.00" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 1" }, "MODEL": { "VALUE": "656364-B21" }, "PDS": { "VALUE": "Yes" }, "PRESENT": { "VALUE": "Yes" }, "SERIAL_NUMBER": { "VALUE": "5BXRC0D4D6X0X1" }, "SPARE": { "VALUE": "660185-001" }, "STATUS": { "VALUE": "Good, In Use" } }, { "CAPACITY": { "VALUE": "1200 Watts" }, "FIRMWARE_VERSION": { "VALUE": "1.00" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 2" }, "MODEL": { "VALUE": "656364-B21" }, "PDS": { "VALUE": "Yes" }, "PRESENT": { "VALUE": "Yes" }, "SERIAL_NUMBER": { "VALUE": "5BXRC0D4D6X0WR" }, "SPARE": { "VALUE": "660185-001" }, "STATUS": { "VALUE": "Good, In Use" } }, { "CAPACITY": { "VALUE": "N/A Watts" }, "FIRMWARE_VERSION": { "VALUE": "N/A" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 3" }, "MODEL": { "VALUE": "N/A" }, "PDS": { "VALUE": "Other" }, "PRESENT": { "VALUE": "No" }, "SERIAL_NUMBER": { "VALUE": "N/A" }, "SPARE": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } }, { "CAPACITY": { "VALUE": "N/A Watts" }, "FIRMWARE_VERSION": { "VALUE": "N/A" }, "HOTPLUG_CAPABLE": { "VALUE": "Yes" }, "LABEL": { "VALUE": "Power Supply 4" }, "MODEL": { "VALUE": "N/A" }, "PDS": { "VALUE": "Other" }, "PRESENT": { "VALUE": "No" }, "SERIAL_NUMBER": { "VALUE": "N/A" }, "SPARE": { "VALUE": "N/A" }, "STATUS": { "VALUE": "Unknown" } } ] }, "PROCESSORS": { "PROCESSOR": [ { "EXECUTION_TECHNOLOGY": { "VALUE": "8/8 cores; 16 threads" }, "INTERNAL_L1_CACHE": { "VALUE": "64 KB" }, "INTERNAL_L2_CACHE": { "VALUE": "256 KB" }, "INTERNAL_L3_CACHE": { "VALUE": "16384 KB" }, "LABEL": { "VALUE": "Proc 1" }, "MEMORY_TECHNOLOGY": { "VALUE": "64-bit Capable" }, "NAME": { "VALUE": "Intel(R) Xeon(R) CPU E7-4820 v2 @ 2.00GHz" }, "SPEED": { "VALUE": "2000 MHz" }, "STATUS": { "VALUE": "OK" } }, { "EXECUTION_TECHNOLOGY": { "VALUE": "8/8 cores; 16 threads" }, "INTERNAL_L1_CACHE": { "VALUE": "64 KB" }, "INTERNAL_L2_CACHE": { "VALUE": "256 KB" }, "INTERNAL_L3_CACHE": { "VALUE": "16384 KB" }, "LABEL": { "VALUE": "Proc 2" }, "MEMORY_TECHNOLOGY": { "VALUE": "64-bit Capable" }, "NAME": { "VALUE": "Intel(R) Xeon(R) CPU E7-4820 v2 @ 2.00GHz" }, "SPEED": { "VALUE": "2000 MHz" }, "STATUS": { "VALUE": "OK" } } ] }, "STORAGE": { "CONTROLLER": { "CACHE_MODULE_MEMORY": { "VALUE": "2097152 KB" }, "CACHE_MODULE_SERIAL_NUM": { "VALUE": "PBKUD0BRH6U3KO" }, "CACHE_MODULE_STATUS": { "VALUE": "OK" }, "CONTROLLER_STATUS": { "VALUE": "OK" }, "DRIVE_ENCLOSURE": [ { "DRIVE_BAY": { "VALUE": "04" }, "LABEL": { "VALUE": "Port 1I Box 1" }, "STATUS": { "VALUE": "OK" } }, { "DRIVE_BAY": { "VALUE": "01" }, "LABEL": { "VALUE": "Port 1I Box 0" }, "STATUS": { "VALUE": "OK" } } ], "ENCRYPTION_CSP_STATUS": { "VALUE": "OK" }, "ENCRYPTION_SELF_TEST_STATUS": { "VALUE": "OK" }, "ENCRYPTION_STATUS": { "VALUE": "Not Enabled" }, "FW_VERSION": { "VALUE": "1.62" }, "LABEL": { "VALUE": "Controller on System Board" }, "LOGICAL_DRIVE": { "CAPACITY": { "VALUE": "99 GB" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FAULT_TOLERANCE": { "VALUE": "RAID 1/RAID 1+0" }, "LABEL": { "VALUE": "01" }, "PHYSICAL_DRIVE": [ { "CAPACITY": { "VALUE": "279 GB" }, "DRIVE_CONFIGURATION": { "VALUE": "Configured" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FW_VERSION": { "VALUE": "HPD0" }, "LABEL": { "VALUE": "Port 1I Box 1 Bay 1" }, "LOCATION": { "VALUE": "Port 1I Box 1 Bay 1" }, "MODEL": { "VALUE": "EG0300FCSPH" }, "SERIAL_NUMBER": { "VALUE": "64R0A18KFTM91426" }, "STATUS": { "VALUE": "OK" } }, { "CAPACITY": { "VALUE": "279 GB" }, "DRIVE_CONFIGURATION": { "VALUE": "Configured" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FW_VERSION": { "VALUE": "HPD0" }, "LABEL": { "VALUE": "Port 1I Box 1 Bay 2" }, "LOCATION": { "VALUE": "Port 1I Box 1 Bay 2" }, "MODEL": { "VALUE": "EG0300FCSPH" }, "SERIAL_NUMBER": { "VALUE": "64R0A109FTM91426" }, "STATUS": { "VALUE": "OK" } } ], "STATUS": { "VALUE": "OK" } }, "MODEL": { "VALUE": "HP Smart Array P830i Controller" }, "SERIAL_NUMBER": { "VALUE": "001438031389320" }, "STATUS": { "VALUE": "OK" } }, "DISCOVERY_STATUS": { "STATUS": { "VALUE": "Discovery Complete" } } }, "TEMPERATURE": { "TEMP": [ { "CAUTION": { "UNIT": "Celsius", "VALUE": "42" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "46" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "27" }, "LABEL": { "VALUE": "01-Inlet Ambient" }, "LOCATION": { "VALUE": "Ambient" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "70" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "02-CPU 1" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "70" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "03-CPU 2" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "04-CPU 3" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "05-CPU 4" }, "LOCATION": { "VALUE": "CPU" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "87" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "34" }, "LABEL": { "VALUE": "06-P1 DIMM 1-24" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "87" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "34" }, "LABEL": { "VALUE": "07-P2 DIMM 25-48" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "08-P3 DIMM 49-72" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "09-P4 DIMM 73-96" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "95" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "51" }, "LABEL": { "VALUE": "10-P1 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "95" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "51" }, "LABEL": { "VALUE": "11-P2 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "12-P3 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "13-P4 Mem Buff" }, "LOCATION": { "VALUE": "Memory" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "60" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "35" }, "LABEL": { "VALUE": "14-HD Max" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "105" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "68" }, "LABEL": { "VALUE": "15-Chipset" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "33" }, "LABEL": { "VALUE": "16-P/S 1" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "31" }, "LABEL": { "VALUE": "17-P/S 2" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "18-P/S 3" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "19-P/S 4" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "70" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "75" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "30" }, "LABEL": { "VALUE": "20-P/S Zone" }, "LOCATION": { "VALUE": "Power Supply" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "115" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "120" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "46" }, "LABEL": { "VALUE": "21-VR P1" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "115" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "120" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "45" }, "LABEL": { "VALUE": "22-VR P2" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "23-VR P3" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "24-VR P4" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "25-VR P1 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "26-VR P2 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "36" }, "LABEL": { "VALUE": "27-VR P3 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "85" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "90" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "30" }, "LABEL": { "VALUE": "28-VR P4 Zone" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "29-VR P1 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "30-VR P2 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "31-VR P3 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "32-VR P4 Mem" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "65" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "29" }, "LABEL": { "VALUE": "33-SuperCAP Max" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "100" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "82" }, "LABEL": { "VALUE": "34-HD Controller" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "35-PCI 1" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "36-PCI 2" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "37-PCI 3" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "38-PCI 4" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "39-PCI 5" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "40-PCI 6" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "41-PCI 7" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "42-PCI 8" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "43-PCI 9" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "40" }, "LABEL": { "VALUE": "44-PCI 1 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "45-PCI 2 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "46-PCI 3 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "42" }, "LABEL": { "VALUE": "47-PCI 4 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "48-PCI 5 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "49-PCI 6 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "41" }, "LABEL": { "VALUE": "50-PCI 7 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "51-PCI 8 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "52-PCI 9 Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "53-LOM Card" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "43" }, "LABEL": { "VALUE": "54-I/O Zone" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "UNIT": "Celsius", "VALUE": "80" }, "CRITICAL": { "UNIT": "Celsius", "VALUE": "85" }, "CURRENTREADING": { "UNIT": "Celsius", "VALUE": "49" }, "LABEL": { "VALUE": "55-SPI Board" }, "LOCATION": { "VALUE": "System" }, "STATUS": { "VALUE": "OK" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "56-GPU 1" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } }, { "CAUTION": { "VALUE": "N/A" }, "CRITICAL": { "VALUE": "N/A" }, "CURRENTREADING": { "VALUE": "N/A" }, "LABEL": { "VALUE": "57-GPU 2" }, "LOCATION": { "VALUE": "I/O Board" }, "STATUS": { "VALUE": "Not Installed" } } ] }, "VRM": {} }, "RESPONSE": { "MESSAGE": "No error", "STATUS": "0x0000" }, "VERSION": "2.23" } ''' GET_EMBEDDED_HEALTH_OUTPUT_LIST_STORAGE = ''' { "GET_EMBEDDED_HEALTH_DATA": { "STORAGE": { "CONTROLLER": [ { "CACHE_MODULE_MEMORY": { "VALUE": "2097152 KB" }, "CACHE_MODULE_SERIAL_NUM": { "VALUE": "PBKUD0BRH6U3KO" }, "CACHE_MODULE_STATUS": { "VALUE": "OK" }, "CONTROLLER_STATUS": { "VALUE": "OK" }, "DRIVE_ENCLOSURE": [ { "DRIVE_BAY": { "VALUE": "04" }, "LABEL": { "VALUE": "Port 1I Box 1" }, "STATUS": { "VALUE": "OK" } }, { "DRIVE_BAY": { "VALUE": "01" }, "LABEL": { "VALUE": "Port 1I Box 0" }, "STATUS": { "VALUE": "OK" } } ], "ENCRYPTION_CSP_STATUS": { "VALUE": "OK" }, "ENCRYPTION_SELF_TEST_STATUS": { "VALUE": "OK" }, "ENCRYPTION_STATUS": { "VALUE": "Not Enabled" }, "FW_VERSION": { "VALUE": "1.62" }, "LABEL": { "VALUE": "Controller on System Board" }, "LOGICAL_DRIVE": [ { "CAPACITY": { "VALUE": "99 GB" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FAULT_TOLERANCE": { "VALUE": "RAID 1/RAID 1+0" }, "LABEL": { "VALUE": "01" }, "PHYSICAL_DRIVE": [ { "CAPACITY": { "VALUE": "279 GB" }, "DRIVE_CONFIGURATION": { "VALUE": "Configured" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FW_VERSION": { "VALUE": "HPD0" }, "LABEL": { "VALUE": "Port 1I Box 1 Bay 1" }, "LOCATION": { "VALUE": "Port 1I Box 1 Bay 1" }, "MODEL": { "VALUE": "EG0300FCSPH" }, "SERIAL_NUMBER": { "VALUE": "64R0A18KFTM91426" }, "STATUS": { "VALUE": "OK" } }, { "CAPACITY": { "VALUE": "279 GB" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FW_VERSION": { "VALUE": "HPD0" }, "LABEL": { "VALUE": "Port 1I Box 1 Bay 2" }, "LOCATION": { "VALUE": "Port 1I Box 1 Bay 2" }, "MODEL": { "VALUE": "EG0300FCSPH" }, "SERIAL_NUMBER": { "VALUE": "64R0A109FTM91426" }, "STATUS": { "VALUE": "OK" } } ], "STATUS": { "VALUE": "OK" } }, { "CAPACITY": { "VALUE": "99 GB" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FAULT_TOLERANCE": { "VALUE": "RAID 1/RAID 1+0" }, "LABEL": { "VALUE": "01" }, "PHYSICAL_DRIVE": [ { "CAPACITY": { "VALUE": "279 GB" }, "DRIVE_CONFIGURATION": { "VALUE": "Configured" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FW_VERSION": { "VALUE": "HPD0" }, "LABEL": { "VALUE": "Port 1I Box 1 Bay 1" }, "LOCATION": { "VALUE": "Port 1I Box 1 Bay 1" }, "MODEL": { "VALUE": "EG0300FCSPH" }, "SERIAL_NUMBER": { "VALUE": "64R0A18KFTM91426" }, "STATUS": { "VALUE": "OK" } }, { "CAPACITY": { "VALUE": "279 GB" }, "DRIVE_CONFIGURATION": { "VALUE": "Configured" }, "ENCRYPTION_STATUS": { "VALUE": "Not Encrypted" }, "FW_VERSION": { "VALUE": "HPD0" }, "LABEL": { "VALUE": "Port 1I Box 1 Bay 2" }, "LOCATION": { "VALUE": "Port 1I Box 1 Bay 2" }, "MODEL": { "VALUE": "EG0300FCSPH" }, "SERIAL_NUMBER": { "VALUE": "64R0A109FTM91426" }, "STATUS": { "VALUE": "OK" } } ], "STATUS": { "VALUE": "OK" } } ], "MODEL": { "VALUE": "HP Smart Array P830i Controller" }, "SERIAL_NUMBER": { "VALUE": "001438031389320" }, "STATUS": { "VALUE": "OK" } }, { "CONTROLLER_STATUS": { "VALUE": "OK" }, "FW_VERSION": { "VALUE": "5.42" }, "LABEL": { "VALUE": "Controller in Slot 1" }, "MODEL": { "VALUE": "HP Smart Array P421 Controller" }, "SERIAL_NUMBER": { "VALUE": "PDSXL0BRH6G032" }, "STATUS": { "VALUE": "OK" } } ], "DISCOVERY_STATUS": { "STATUS": { "VALUE": "Discovery Complete" } } } } } ''' GET_EMBEDDED_HEALTH_OUTPUT_NO_CONTROLLER = ''' { "GET_EMBEDDED_HEALTH_DATA": { "STORAGE": { "DISCOVERY_STATUS": { "STATUS": { "VALUE": "Discovery Complete" } } } } } ''' GET_EMBEDDED_HEALTH_OUTPUT_NO_LOGICAL_DRIVE = ''' { "GET_EMBEDDED_HEALTH_DATA": { "STORAGE": { "CONTROLLER": [ { "CACHE_MODULE_MEMORY": { "VALUE": "2097152 KB" }, "CACHE_MODULE_SERIAL_NUM": { "VALUE": "PBKUD0BRH6U3KO" }, "CACHE_MODULE_STATUS": { "VALUE": "OK" }, "CONTROLLER_STATUS": { "VALUE": "OK" }, "DRIVE_ENCLOSURE": [ { "DRIVE_BAY": { "VALUE": "04" }, "LABEL": { "VALUE": "Port 1I Box 1" }, "STATUS": { "VALUE": "OK" } }, { "DRIVE_BAY": { "VALUE": "01" }, "LABEL": { "VALUE": "Port 1I Box 0" }, "STATUS": { "VALUE": "OK" } } ], "ENCRYPTION_CSP_STATUS": { "VALUE": "OK" }, "ENCRYPTION_SELF_TEST_STATUS": { "VALUE": "OK" }, "ENCRYPTION_STATUS": { "VALUE": "Not Enabled" }, "FW_VERSION": { "VALUE": "1.62" }, "LABEL": { "VALUE": "Controller on System Board" }, "MODEL": { "VALUE": "HP Smart Array P830i Controller" }, "SERIAL_NUMBER": { "VALUE": "001438031389320" }, "STATUS": { "VALUE": "OK" } }, { "CONTROLLER_STATUS": { "VALUE": "OK" }, "FW_VERSION": { "VALUE": "5.42" }, "LABEL": { "VALUE": "Controller in Slot 1" }, "MODEL": { "VALUE": "HP Smart Array P421 Controller" }, "SERIAL_NUMBER": { "VALUE": "PDSXL0BRH6G032" }, "STATUS": { "VALUE": "OK" } } ], "DISCOVERY_STATUS": { "STATUS": { "VALUE": "Discovery Complete" } } } } } ''' GET_EMBEDDED_HEALTH_PROCESSORS_DATA_MISSING = ''' { "GET_EMBEDDED_HEALTH_DATA": { "PROCESSORS": { "PROCESSOR": [ { "EXECUTION_TECHNOLOGY": { "VALUE": "8/8cores; threads" }, "INTERNAL_L1_CACHE": { "VALUE": "64KB" }, "INTERNAL_L2_CACHE": { "VALUE": "256KB" }, "INTERNAL_L3_CACHE": { "VALUE": "16384KB" }, "LABEL": { "VALUE": "Proc1" }, "MEMORY_TECHNOLOGY": { "VALUE": "64-bitCapable" }, "NAME": { "VALUE": "Intel(R)Xeon(R)CPUE7-4820v2@2.00GHz" }, "SPEED": { "VALUE": "2000MHz" }, "STATUS": { "VALUE": "OK" } }, { "EXECUTION_TECHNOLOGY": { "VALUE": "8/8cores;16threads" }, "INTERNAL_L1_CACHE": { "VALUE": "64KB" }, "INTERNAL_L2_CACHE": { "VALUE": "256KB" }, "INTERNAL_L3_CACHE": { "VALUE": "16384KB" }, "LABEL": { "VALUE": "Proc2" }, "MEMORY_TECHNOLOGY": { "VALUE": "64-bitCapable" }, "NAME": { "VALUE": "Intel(R)Xeon(R)CPUE7-4820v2@2.00GHz" }, "SPEED": { "VALUE": "2000MHz" }, "STATUS": { "VALUE": "OK" } } ] } } } ''' FIRMWARE_EMBEDDED_HEALTH_OUTPUT = ''' { "iLO": "2.02 Sep 05 2014", "Power Management Controller FW Bootloader": "2.7", "SAS Programmable Logic Device": "Version 0x04", "HP ProLiant System ROM": "11/26/2014", "HP Smart Array P830i Controller": "1.62", "Server Platform Services (SPS) Firmware": "2.3.0.FA.0", "HP ProLiant System ROM - Backup": "11/26/2014", "System Programmable Logic Device": "Version 0x0B", "Power Management Controller Firmware": "4.1" } ''' ACTIVATE_LICENSE_XML = ''' ''' ACTIVATE_LICENSE_FAIL_XML = ''' ''' UPDATE_ILO_FIRMWARE_INPUT_XML = ''' ''' UPDATE_NONILO_FIRMWARE_INPUT_XML = ''' ''' ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ilo/ris_sample_outputs.py0000775000175000017500000046252400000000000025725 0ustar00zuulzuul00000000000000# Copyright 2015 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # 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. # Flake doesn't allow files without anything. Remove on first commit. MODULE = "RIS" HTTP_BOOT_URL = { "UefiShellStartupUrl": "http://10.10.1.30:8081/startup.nsh" } RESPONSE_BODY_FOR_REST_OP = """ { "AssetTag": "", "AvailableActions": [ { "Action": "Reset", "Capabilities": [ { "AllowableValues": [ "On", "ForceOff", "ForceRestart", "Nmi", "PushPowerButton" ], "PropertyName": "ResetType" } ] } ], "Bios": { "Current": { "VersionString": "I36 v1.40 (01/28/2015)" } }, "Boot": { "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideSupported": [ "None", "Cd", "Hdd", "Usb", "Utilities", "Diags", "BiosSetup", "Pxe", "UefiShell", "UefiTarget" ], "BootSourceOverrideTarget": "None", "UefiTargetBootSourceOverride": "None", "UefiTargetBootSourceOverrideSupported": [ "HD.Emb.1.2", "Generic.USB.1.1", "NIC.FlexLOM.1.1.IPv4", "NIC.FlexLOM.1.1.IPv6", "CD.Virtual.2.1" ] }, "Description": "Computer System View", "HostCorrelation": { "HostMACAddress": [ "6c:c2:17:39:fe:80", "6c:c2:17:39:fe:88" ], "HostName": "", "IPAddress": [ "", "" ] }, "IndicatorLED": "Off", "Manufacturer": "HP", "Memory": { "TotalSystemMemoryGB": 16 }, "Model": "ProLiant BL460c Gen9", "Name": "Computer System", "Oem": { "Hp": { "AvailableActions": [ { "Action": "PowerButton", "Capabilities": [ { "AllowableValues": [ "Press", "PressAndHold" ], "PropertyName": "PushType" }, { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] }, { "Action": "SystemReset", "Capabilities": [ { "AllowableValues": [ "ColdBoot" ], "PropertyName": "ResetType" }, { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] } ], "Battery": [], "Bios": { "Backup": { "Date": "v1.40 (01/28/2015)", "Family": "I36", "VersionString": "I36 v1.40 (01/28/2015)" }, "Current": { "Date": "01/28/2015", "Family": "I36", "VersionString": "I36 v1.40 (01/28/2015)" }, "UefiClass": 2 }, "DeviceDiscoveryComplete": { "AMSDeviceDiscovery": "NoAMS", "SmartArrayDiscovery": "Initial", "vAuxDeviceDiscovery": "DataIncomplete", "vMainDeviceDiscovery": "ServerOff" }, "PostState": "PowerOff", "PowerAllocationLimit": 500, "PowerAutoOn": "PowerOn", "PowerOnDelay": "Minimum", "PowerRegulatorMode": "Dynamic", "PowerRegulatorModesSupported": [ "OSControl", "Dynamic", "Max", "Min" ], "ServerSignature": 0, "Type": "HpComputerSystemExt.0.10.1", "VirtualProfile": "Inactive", "VirtualUUID": null, "links": { "BIOS": { "href": "/rest/v1/systems/1/bios" }, "MEMORY": { "href": "/rest/v1/Systems/1/Memory" }, "PCIDevices": { "href": "/rest/v1/Systems/1/PCIDevices" }, "PCISlots": { "href": "/rest/v1/Systems/1/PCISlots" }, "SecureBoot": { "href": "/rest/v1/Systems/1/SecureBoot" } } } }, "Power": "Off", "Processors": { "Count": 1, "ProcessorFamily": "Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz", "Status": { "HealthRollUp": "OK" } }, "SKU": "727021-B21", "SerialNumber": "SGH449WNL3", "Status": { "Health": "OK", "State": "Disabled" }, "SystemType": "Physical", "Type": "ComputerSystem.0.9.6", "UUID": "30373237-3132-4753-4834-3439574E4C33", "links": { "Chassis": [ { "href": "/rest/v1/Chassis/1" } ], "Logs": { "href": "/rest/v1/Systems/1/Logs" }, "ManagedBy": [ { "href": "/rest/v1/Managers/1" } ], "self": { "href": "/rest/v1/Systems/1" } } } """ RESPONSE_BODY_FOR_REST_OP_WITH_ISCSI = """ { "Boot": { "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideSupported": [ "None", "Cd", "Hdd", "Usb", "Utilities", "Diags", "BiosSetup", "Pxe", "UefiShell", "UefiTarget" ], "BootSourceOverrideTarget": "None", "UefiTargetBootSourceOverride": "None", "UefiTargetBootSourceOverrideSupported": [ "HD.Emb.1.2", "Generic.USB.1.1", "NIC.FlexLOM.1.1.IPv4", "NIC.FlexLOM.1.1.IPv6", "NIC.LOM.1.1.iSCSI", "CD.Virtual.2.1" ] } } """ RESPONSE_BODY_FOR_REST_OP_WITH_ISCSI_AND_NONE = """ { "Boot": { "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideSupported": [ "None", "Cd", "Hdd", "Usb", "Utilities", "Diags", "BiosSetup", "Pxe", "UefiShell", "UefiTarget" ], "BootSourceOverrideTarget": "None", "UefiTargetBootSourceOverride": "None", "UefiTargetBootSourceOverrideSupported": [ "HD.Emb.1.2", null, "HD.Emb.2.1", "HD.Emb.1.2", "NIC.FlexLOM.1.1.IPv4", "NIC.FlexLOM.1.1.IPv6", "NIC.LOM.1.1.iSCSI", "CD.Virtual.2.1" ] } } """ HEADERS_FOR_REST_OP = [('content-length', '2729'), ('server', 'HP-iLO-Server/1.30'), ('etag', 'W/"B61EB245"'), ('allow', 'GET, HEAD, POST, PATCH'), ('cache-control', 'no-cache'), ('date', 'Thu, 19 Mar 2015 06:55:59 GMT'), ('x_hp-chrp-service-version', '1.0.3'), ('content-type', 'application/json')] COLLECTIONS_SAMPLE = """ { "Description": "iLO User Accounts", "links": { "Member": [ { "href": "/rest/v1/AccountService/Accounts/1" } ], "self": { "href": "/rest/v1/AccountService/Accounts" } }, "Items": [ { "UserName": "Administrator", "Description": "iLO User Account", "links": { "self": { "href": "/rest/v1/AccountService/Accounts/1" } }, "Oem": { "Hp": { "Privileges": { "RemoteConsolePriv": "true", "iLOConfigPriv": "true", "VirtualMediaPriv": "true", "UserConfigPriv": "true", "VirtualPowerAndResetPriv": "true", "LoginPriv": "true" }, "LoginName": "Administrator", "Type": "HpiLOAccount.0.9.7" } }, "Password": null, "Type": "ManagerAccount.0.9.7", "Name": "User Account" } ], "MemberType": "ManagerAccount.0", "Total": 1, "Type": "Collection.0.9.5", "Name": "Accounts" } """ GET_HEADERS = { 'content-length': '114', 'etag': 'W/"715B59E6"', 'allow': 'GET, HEAD, PATCH, POST', 'cache-control': 'no-cache', 'date': 'Mon, 23 Mar 2015 08:49:12 GMT', 'server': 'HP-iLO-Server/1.30', 'content-type': 'application/json', 'x_hp-chrp-service-version': '1.0.3' } REST_GET_SMART_STORAGE = """ { "Model": "ProLiant BL460c Gen9", "Name": "Computer System", "Oem": { "Hp": { "links": { "SmartStorage": { "href": "/rest/v1/Systems/1/SmartStorage" } } } } } """ REST_GET_SECURE_BOOT = { "Name": "SecureBoot", "ResetAllKeys": True, "ResetToDefaultKeys": True, "SecureBootCurrentState": False, "SecureBootEnable": True, "Type": "HpSecureBoot.0.9.5", "links": { "self": { "href": "/rest/v1/Systems/1/SecureBoot" } } } REST_FAILURE_OUTPUT = { 'Type': 'ExtendedError.1.0.0', 'Messages': [{'MessageID': 'Base.0.0.FakeFailureMessage'}], 'Name': 'Extended Error Information' } REST_POST_RESPONSE = { 'Type': 'ExtendedError.0.9.6', 'Messages': [{'MessageID': 'Base.0.0.Success'}], 'Name': 'Extended Error Information' } GET_MANAGER_DETAILS = """ { "AvailableActions": [ { "Action": "Reset" } ], "CommandShell": { "ConnectTypesSupported": [ "SSH", "Oem" ], "Enabled": true, "MaxConcurrentSessions": 9 }, "Description": "Manager View", "Firmware": { "Current": { "VersionString": "iLO 4 v2.20" } }, "GraphicalConsole": { "ConnectTypesSupported": [ "KVMIP" ], "Enabled": true, "MaxConcurrentSessions": 10 }, "ManagerType": "BMC", "Model": "iLO 4", "Name": "Manager", "Oem": { "Hp": { "AvailableActions": [ { "Action": "ResetRestApiState", "Capabilities": [ { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] } ], "FederationConfig": { "IPv6MulticastScope": "Site", "MulticastAnnouncementInterval": 600, "MulticastDiscovery": "Enabled", "MulticastTimeToLive": 5, "iLOFederationManagement": "Enabled" }, "Firmware": { "Current": { "Date": "Feb 09 2015", "DebugBuild": false, "MajorVersion": 2, "MinorVersion": 4, "Time": "", "VersionString": "iLO 4 v2.04" } }, "License": { "LicenseKey": "32Q6W-PQWTB-H7XYL-39968-RR53R", "LicenseString": "iLO 4 Advanced", "LicenseType": "Perpetual" }, "RequiredLoginForiLORBSU": false, "SerialCLISpeed": 9600, "SerialCLIStatus": "EnabledAuthReq", "Type": "HpiLO.0.13.0", "VSPLogDownloadEnabled": false, "iLOSelfTestResults": [ { "Notes": "", "SelfTestName": "NVRAMData", "Status": "OK" }, { "Notes": "Controller firmware revision 2.09.00 ", "SelfTestName": "EmbeddedFlash/SDCard", "Status": "OK" }, { "Notes": "", "SelfTestName": "EEPROM", "Status": "OK" }, { "Notes": "", "SelfTestName": "HostRom", "Status": "OK" }, { "Notes": "", "SelfTestName": "SupportedHost", "Status": "OK" }, { "Notes": "ProLiant BL460c Gen9 System Programmable \ Logic Device version 0x13", "SelfTestName": "CPLDPAL0", "Status": "Informational" }, { "Notes": "ProLiant BL460c Gen9 SAS Programmable \ Logic Device version 0x01", "SelfTestName": "CPLDPAL1", "Status": "Informational" } ], "links": { "ActiveHealthSystem": { "href": "/rest/v1/Managers/1/ActiveHealthSystem" }, "DateTimeService": { "href": "/rest/v1/Managers/1/DateTime" }, "EmbeddedMediaService": { "href": "/rest/v1/Managers/1/EmbeddedMedia" }, "FederationDispatch": { "extref": "/dispatch" }, "FederationGroups": { "href": "/rest/v1/Managers/1/FederationGroups" }, "FederationPeers": { "href": "/rest/v1/Managers/1/FederationPeers" }, "LicenseService": { "href": "/rest/v1/Managers/1/LicenseService" }, "UpdateService": { "href": "/rest/v1/Managers/1/UpdateService" }, "VSPLogLocation": { "extref": "/sol.log.gz" } } } }, "SerialConsole": { "ConnectTypesSupported": [ "SSH", "IPMI", "Oem" ], "Enabled": true, "MaxConcurrentSessions": 13 }, "Status": { "State": "Enabled" }, "Type": "Manager.0.10.0", "UUID": "83590768-e977-575a-927a-b3de8f692d4f", "links": { "EthernetNICs": { "href": "/rest/v1/Managers/1/NICs" }, "Logs": { "href": "/rest/v1/Managers/1/Logs" }, "ManagerForServers": [ { "href": "/rest/v1/Systems/1" } ], "NetworkService": { "href": "/rest/v1/Managers/1/NetworkService" }, "VirtualMedia": { "href": "/rest/v1/Managers/1/VirtualMedia" }, "self": { "href": "/rest/v1/Managers/1" } } } """ GET_MANAGER_DETAILS_EQ_SUGGESTED = """ { "AvailableActions": [ { "Action": "Reset" } ], "CommandShell": { "ConnectTypesSupported": [ "SSH", "Oem" ], "Enabled": true, "MaxConcurrentSessions": 9 }, "Description": "Manager View", "Firmware": { "Current": { "VersionString": "iLO 4 v2.20" } }, "GraphicalConsole": { "ConnectTypesSupported": [ "KVMIP" ], "Enabled": true, "MaxConcurrentSessions": 10 }, "ManagerType": "BMC", "Model": "iLO 4", "Name": "Manager", "Oem": { "Hp": { "AvailableActions": [ { "Action": "ResetRestApiState", "Capabilities": [ { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] } ], "FederationConfig": { "IPv6MulticastScope": "Site", "MulticastAnnouncementInterval": 600, "MulticastDiscovery": "Enabled", "MulticastTimeToLive": 5, "iLOFederationManagement": "Enabled" }, "Firmware": { "Current": { "Date": "Feb 09 2015", "DebugBuild": false, "MajorVersion": 2, "MinorVersion": 4, "Time": "", "VersionString": "iLO 4 v2.30" } }, "License": { "LicenseKey": "32Q6W-PQWTB-H7XYL-39968-RR53R", "LicenseString": "iLO 4 Advanced", "LicenseType": "Perpetual" }, "RequiredLoginForiLORBSU": false, "SerialCLISpeed": 9600, "SerialCLIStatus": "EnabledAuthReq", "Type": "HpiLO.0.13.0", "VSPLogDownloadEnabled": false, "iLOSelfTestResults": [ { "Notes": "", "SelfTestName": "NVRAMData", "Status": "OK" }, { "Notes": "Controller firmware revision 2.09.00 ", "SelfTestName": "EmbeddedFlash/SDCard", "Status": "OK" }, { "Notes": "", "SelfTestName": "EEPROM", "Status": "OK" }, { "Notes": "", "SelfTestName": "HostRom", "Status": "OK" }, { "Notes": "", "SelfTestName": "SupportedHost", "Status": "OK" }, { "Notes": "ProLiant BL460c Gen9 System Programmable \ Logic Device version 0x13", "SelfTestName": "CPLDPAL0", "Status": "Informational" }, { "Notes": "ProLiant BL460c Gen9 SAS Programmable \ Logic Device version 0x01", "SelfTestName": "CPLDPAL1", "Status": "Informational" } ], "links": { "ActiveHealthSystem": { "href": "/rest/v1/Managers/1/ActiveHealthSystem" }, "DateTimeService": { "href": "/rest/v1/Managers/1/DateTime" }, "EmbeddedMediaService": { "href": "/rest/v1/Managers/1/EmbeddedMedia" }, "FederationDispatch": { "extref": "/dispatch" }, "FederationGroups": { "href": "/rest/v1/Managers/1/FederationGroups" }, "FederationPeers": { "href": "/rest/v1/Managers/1/FederationPeers" }, "LicenseService": { "href": "/rest/v1/Managers/1/LicenseService" }, "UpdateService": { "href": "/rest/v1/Managers/1/UpdateService" }, "VSPLogLocation": { "extref": "/sol.log.gz" } } } }, "SerialConsole": { "ConnectTypesSupported": [ "SSH", "IPMI", "Oem" ], "Enabled": true, "MaxConcurrentSessions": 13 }, "Status": { "State": "Enabled" }, "Type": "Manager.0.10.0", "UUID": "83590768-e977-575a-927a-b3de8f692d4f", "links": { "EthernetNICs": { "href": "/rest/v1/Managers/1/NICs" }, "Logs": { "href": "/rest/v1/Managers/1/Logs" }, "ManagerForServers": [ { "href": "/rest/v1/Systems/1" } ], "NetworkService": { "href": "/rest/v1/Managers/1/NetworkService" }, "VirtualMedia": { "href": "/rest/v1/Managers/1/VirtualMedia" }, "self": { "href": "/rest/v1/Managers/1" } } } """ GET_MANAGER_DETAILS_GT_SUGGESTED = """ { "AvailableActions": [ { "Action": "Reset" } ], "CommandShell": { "ConnectTypesSupported": [ "SSH", "Oem" ], "Enabled": true, "MaxConcurrentSessions": 9 }, "Description": "Manager View", "Firmware": { "Current": { "VersionString": "iLO 4 v2.54" } }, "GraphicalConsole": { "ConnectTypesSupported": [ "KVMIP" ], "Enabled": true, "MaxConcurrentSessions": 10 }, "ManagerType": "BMC", "Model": "iLO 4", "Name": "Manager", "Oem": { "Hp": { "AvailableActions": [ { "Action": "ResetRestApiState", "Capabilities": [ { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] } ], "FederationConfig": { "IPv6MulticastScope": "Site", "MulticastAnnouncementInterval": 600, "MulticastDiscovery": "Enabled", "MulticastTimeToLive": 5, "iLOFederationManagement": "Enabled" }, "Firmware": { "Current": { "Date": "Feb 09 2015", "DebugBuild": false, "MajorVersion": 2, "MinorVersion": 54, "Time": "", "VersionString": "iLO 4 v2.54" } }, "License": { "LicenseKey": "32Q6W-PQWTB-H7XYL-39968-RR53R", "LicenseString": "iLO 4 Advanced", "LicenseType": "Perpetual" }, "RequiredLoginForiLORBSU": false, "SerialCLISpeed": 9600, "SerialCLIStatus": "EnabledAuthReq", "Type": "HpiLO.0.13.0", "VSPLogDownloadEnabled": false, "iLOSelfTestResults": [ { "Notes": "", "SelfTestName": "NVRAMData", "Status": "OK" }, { "Notes": "Controller firmware revision 2.09.00 ", "SelfTestName": "EmbeddedFlash/SDCard", "Status": "OK" }, { "Notes": "", "SelfTestName": "EEPROM", "Status": "OK" }, { "Notes": "", "SelfTestName": "HostRom", "Status": "OK" }, { "Notes": "", "SelfTestName": "SupportedHost", "Status": "OK" }, { "Notes": "ProLiant BL460c Gen9 System Programmable \ Logic Device version 0x13", "SelfTestName": "CPLDPAL0", "Status": "Informational" }, { "Notes": "ProLiant BL460c Gen9 SAS Programmable \ Logic Device version 0x01", "SelfTestName": "CPLDPAL1", "Status": "Informational" } ], "links": { "ActiveHealthSystem": { "href": "/rest/v1/Managers/1/ActiveHealthSystem" }, "DateTimeService": { "href": "/rest/v1/Managers/1/DateTime" }, "EmbeddedMediaService": { "href": "/rest/v1/Managers/1/EmbeddedMedia" }, "FederationDispatch": { "extref": "/dispatch" }, "FederationGroups": { "href": "/rest/v1/Managers/1/FederationGroups" }, "FederationPeers": { "href": "/rest/v1/Managers/1/FederationPeers" }, "LicenseService": { "href": "/rest/v1/Managers/1/LicenseService" }, "UpdateService": { "href": "/rest/v1/Managers/1/UpdateService" }, "VSPLogLocation": { "extref": "/sol.log.gz" } } } }, "SerialConsole": { "ConnectTypesSupported": [ "SSH", "IPMI", "Oem" ], "Enabled": true, "MaxConcurrentSessions": 13 }, "Status": { "State": "Enabled" }, "Type": "Manager.0.10.0", "UUID": "83590768-e977-575a-927a-b3de8f692d4f", "links": { "EthernetNICs": { "href": "/rest/v1/Managers/1/NICs" }, "Logs": { "href": "/rest/v1/Managers/1/Logs" }, "ManagerForServers": [ { "href": "/rest/v1/Systems/1" } ], "NetworkService": { "href": "/rest/v1/Managers/1/NetworkService" }, "VirtualMedia": { "href": "/rest/v1/Managers/1/VirtualMedia" }, "self": { "href": "/rest/v1/Managers/1" } } } """ GET_MANAGER_DETAILS_NO_FIRMWARE = """ { "AvailableActions": [ { "Action": "Reset" } ], "CommandShell": { "ConnectTypesSupported": [ "SSH", "Oem" ], "Enabled": true, "MaxConcurrentSessions": 9 }, "Description": "Manager View", "Firmware": { "Current": { "VersionString": "iLO 4 v2.20" } }, "GraphicalConsole": { "ConnectTypesSupported": [ "KVMIP" ], "Enabled": true, "MaxConcurrentSessions": 10 }, "ManagerType": "BMC", "Model": "iLO 4", "Name": "Manager", "Oem": { "Hp": { "AvailableActions": [ { "Action": "ResetRestApiState", "Capabilities": [ { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] } ], "FederationConfig": { "IPv6MulticastScope": "Site", "MulticastAnnouncementInterval": 600, "MulticastDiscovery": "Enabled", "MulticastTimeToLive": 5, "iLOFederationManagement": "Enabled" }, "Firmware": { "Current": { "Date": "Feb 09 2015", "DebugBuild": false, "MinorVersion": 20, "Time": "", "VersionString": "iLO 4 v" } }, "License": { "LicenseKey": "32Q6W-PQWTB-H7XYL-39968-RR53R", "LicenseString": "iLO 4 Advanced", "LicenseType": "Perpetual" }, "RequiredLoginForiLORBSU": false, "SerialCLISpeed": 9600, "SerialCLIStatus": "EnabledAuthReq", "Type": "HpiLO.0.13.0", "VSPLogDownloadEnabled": false, "iLOSelfTestResults": [ { "Notes": "", "SelfTestName": "NVRAMData", "Status": "OK" }, { "Notes": "Controller firmware revision 2.09.00 ", "SelfTestName": "EmbeddedFlash/SDCard", "Status": "OK" }, { "Notes": "", "SelfTestName": "EEPROM", "Status": "OK" }, { "Notes": "", "SelfTestName": "HostRom", "Status": "OK" }, { "Notes": "", "SelfTestName": "SupportedHost", "Status": "OK" }, { "Notes": "ProLiant BL460c Gen9 System Programmable \ Logic Device version 0x13", "SelfTestName": "CPLDPAL0", "Status": "Informational" }, { "Notes": "ProLiant BL460c Gen9 SAS Programmable \ Logic Device version 0x01", "SelfTestName": "CPLDPAL1", "Status": "Informational" } ], "links": { "ActiveHealthSystem": { "href": "/rest/v1/Managers/1/ActiveHealthSystem" }, "DateTimeService": { "href": "/rest/v1/Managers/1/DateTime" }, "EmbeddedMediaService": { "href": "/rest/v1/Managers/1/EmbeddedMedia" }, "FederationDispatch": { "extref": "/dispatch" }, "FederationGroups": { "href": "/rest/v1/Managers/1/FederationGroups" }, "FederationPeers": { "href": "/rest/v1/Managers/1/FederationPeers" }, "LicenseService": { "href": "/rest/v1/Managers/1/LicenseService" }, "UpdateService": { "href": "/rest/v1/Managers/1/UpdateService" }, "VSPLogLocation": { "extref": "/sol.log.gz" } } } }, "SerialConsole": { "ConnectTypesSupported": [ "SSH", "IPMI", "Oem" ], "Enabled": true, "MaxConcurrentSessions": 13 }, "Status": { "State": "Enabled" }, "Type": "Manager.0.10.0", "UUID": "83590768-e977-575a-927a-b3de8f692d4f", "links": { "EthernetNICs": { "href": "/rest/v1/Managers/1/NICs" }, "Logs": { "href": "/rest/v1/Managers/1/Logs" }, "ManagerForServers": [ { "href": "/rest/v1/Systems/1" } ], "NetworkService": { "href": "/rest/v1/Managers/1/NetworkService" }, "VirtualMedia": { "href": "/rest/v1/Managers/1/VirtualMedia" }, "self": { "href": "/rest/v1/Managers/1" } } } """ RESP_NETWORK_ADAPTER = """ { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/\ NetworkAdapters/Members/$entity", "@odata.id": "/redfish/v1/Systems/1/NetworkAdapters/1/", "@odata.type": "#BaseNetworkAdapter.1.1.0.BaseNetworkAdapter", "Firmware": { "Current": { "VersionString": null } }, "Id": "1", "Name": "HPE Ethernet 1Gb 2-port 361i Adapter - NIC", "PartNumber": null, "PhysicalPorts": [ { "FullDuplex": false, "IPv4Addresses": [ { "Address": null } ], "IPv6Addresses": [ { "Address": null } ], "MacAddress": "9C:B6:54:79:78:70", "Name": null, "Oem": { "Hp": { "@odata.type": "#HpBaseNetworkAdapterExt.1.0.0.\ HpBaseNetworkAdapterExt", "BadReceives": null, "BadTransmits": null, "GoodReceives": null, "GoodTransmits": null, "StructuredName": "NIC.LOM.1.1", "Team": null, "Type": "HpBaseNetworkAdapterExt.1.0.0" } }, "SpeedMbps": 0, "Status": { "Health": "OK", "State": "Enabled" }, "UEFIDevicePath": "PciRoot(0x0)/Pci(0x2,0x3)/Pci(0x0,0x0)" } ], "SerialNumber": null, "Status": { "Health": "OK", "State": "Enabled" }, "StructuredName": "NIC.LOM.1.1", "Type": "BaseNetworkAdapter.1.1.0", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x2,0x3)/Pci(0x0,0x0)", "links": { "self": { "href": "/rest/v1/Systems/1/NetworkAdapters/1" } } } """ GET_BIOS_SETTINGS = """ { "AcpiRootBridgePxm": "Enabled", "AcpiSlit": "Enabled", "AdjSecPrefetch": "Enabled", "AdminEmail": "", "AdminName": "", "AdminOtherInfo": "", "AdminPassword": null, "AdminPhone": "", "AdvancedMemProtection": "AdvancedEcc", "AsrStatus": "Enabled", "AsrTimeoutMinutes": "10", "AssetTagProtection": "Unlocked", "AttributeRegistry": "HpBiosAttributeRegistryI36.1.0.40", "BootMode": "Uefi", "BootOrderPolicy": "RetryIndefinitely", "ChannelInterleaving": "Enabled", "CollabPowerControl": "Enabled", "ConsistentDevNaming": "LomsOnly", "CustomPostMessage": "", "DcuIpPrefetcher": "Enabled", "DcuStreamPrefetcher": "Enabled", "Description": "This is the Platform/BIOS Configuration (RBSU)\ Current Settings", "Dhcpv4": "Enabled", "DynamicPowerCapping": "Auto", "DynamicPowerResponse": "Fast", "EmbNicEnable": "Enabled", "EmbSasEnable": "Enabled", "EmbSata1Enable": "Enabled", "EmbSata2Enable": "Enabled", "EmbVideoConnection": "Auto", "EmbeddedDiagnostics": "Enabled", "EmbeddedDiagsMode": "Auto", "EmbeddedSata": "Ahci", "EmbeddedSerialPort": "Com2Irq3", "EmbeddedUefiShell": "Enabled", "EmbeddedUserPartition": "Disabled", "EmsConsole": "Com1Irq4", "EnergyPerfBias": "BalancedPerf", "EraseUserDefaults": "No", "ExtendedAmbientTemp": "Disabled", "ExtendedMemTest": "Disabled", "F11BootMenu": "Enabled", "FCScanPolicy": "AllTargets", "FanFailPolicy": "Shutdown", "FanInstallReq": "EnableMessaging", "FlexLom1Enable": "Enabled", "HwPrefetcher": "Enabled", "IntelDmiLinkFreq": "Auto", "IntelNicDmaChannels": "Enabled", "IntelPerfMonitoring": "Disabled", "IntelProcVtd": "Enabled", "IntelQpiFreq": "Auto", "IntelQpiLinkEn": "Auto", "IntelQpiPowerManagement": "Enabled", "IntelTxt": "Disabled", "IntelligentProvisioning": "Enabled", "InternalSDCardSlot": "Enabled", "IoNonPostedPrefetching": "Enabled", "Ipv4Address": "0.0.0.0", "Ipv4Gateway": "0.0.0.0", "Ipv4PrimaryDNS": "0.0.0.0", "Ipv4SecondaryDNS": "0.0.0.0", "Ipv4SubnetMask": "0.0.0.0", "MaxMemBusFreqMHz": "Auto", "MaxPcieSpeed": "MaxSupported", "MemFastTraining": "Enabled", "MinProcIdlePkgState": "C6Retention", "MinProcIdlePower": "C6", "MixedPowerSupplyReporting": "Enabled", "Modified": "2015-03-13T21:50:42+00:00", "Name": "BIOS Current Settings", "NetworkBootRetry": "Enabled", "NicBoot1": "NetworkBoot", "NicBoot2": "Disabled", "NicBoot3": "Disabled", "NicBoot4": "Disabled", "NicBoot5": "Disabled", "NicBoot6": "Disabled", "NicBoot7": "Disabled", "NicBoot8": "Disabled", "NmiDebugButton": "Enabled", "NodeInterleaving": "Disabled", "NumaGroupSizeOpt": "Clustered", "NvDimmNMemFunctionality": "Enabled", "OldAdminPassword": null, "OldPowerOnPassword": null, "PciBusPadding": "Enabled", "PostF1Prompt": "Delayed20Sec", "PowerButton": "Enabled", "PowerOnDelay": "None", "PowerOnLogo": "Enabled", "PowerOnPassword": null, "PowerProfile": "BalancedPowerPerf", "PowerRegulator": "DynamicPowerSavings", "PreBootNetwork": "Auto", "ProcAes": "Enabled", "ProcCoreDisable": 0, "ProcNoExecute": "Enabled", "ProcVirtualization": "Enabled", "ProcX2Apic": "Enabled", "ProductId": "727021-B21", "QpiBandwidthOpt": "Balanced", "QpiSnoopConfig": "Standard", "RemovableFlashBootSeq": "ExternalKeysFirst", "RestoreDefaults": "No", "RestoreManufacturingDefaults": "No", "RomSelection": "CurrentRom", "SataSecureErase": "Disabled", "SaveUserDefaults": "No", "SecureBootStatus": "Disabled", "SerialConsoleBaudRate": "115200", "SerialConsoleEmulation": "Vt100Plus", "SerialConsolePort": "Auto", "SerialNumber": "SGH449WNL3", "ServerAssetTag": "", "ServerName": "", "ServerOtherInfo": "", "ServerPrimaryOs": "", "ServiceEmail": "", "ServiceName": "", "ServiceOtherInfo": "", "ServicePhone": "", "SettingsResult": { "ETag": "5E0136E3", "Messages": [ { "MessageArgs": [ ], "MessageID": "Base.1.0:Success" } ], "Time": "2015-03-09T17:50:09+00:00" }, "Sriov": "Enabled", "ThermalConfig": "OptimalCooling", "ThermalShutdown": "Enabled", "TimeFormat": "Utc", "TimeZone": "Unspecified", "Tpm2Operation": "NoAction", "Tpm2Visibility": "Visible", "TpmBinding": "Disabled", "TpmState": "NotPresent", "TpmType": "NoTpm", "TpmUefiOpromMeasuring": "Enabled", "TpmVisibility": "Visible", "Type": "HpBios.1.1.0", "UefiPxeBoot": "Auto", "UefiShellBootOrder": "Disabled", "UefiShellStartup": "Disabled", "UefiShellStartupLocation": "Auto", "UefiShellStartupUrl": "", "UrlBootFile": "", "Usb3Mode": "Auto", "UsbBoot": "Enabled", "UsbControl": "UsbEnabled", "UtilityLang": "English", "VideoOptions": "BothVideoEnabled", "VirtualInstallDisk": "Disabled", "VirtualSerialPort": "Com1Irq4", "WakeOnLan": "Disabled", "links": { "BaseConfigs": { "href": "/rest/v1/systems/1/bios/BaseConfigs" }, "Boot": { "href": "/rest/v1/systems/1/bios/Boot" }, "Mappings": { "href": "/rest/v1/systems/1/bios/Mappings" }, "Settings": { "href": "/rest/v1/systems/1/bios/Settings" }, "iScsi": { "href": "/rest/v1/systems/1/bios/iScsi" }, "self": { "href": "/rest/v1/systems/1/bios" } } } """ GET_BIOS_SETTINGS_FAILED = """ { "AcpiRootBridgePxm": "Enabled", "AcpiSlit": "Enabled", "AdjSecPrefetch": "Enabled", "AdminEmail": "", "AdminName": "", "AdminOtherInfo": "", "AdminPassword": null, "AdminPhone": "", "AdvancedMemProtection": "AdvancedEcc", "AsrStatus": "Enabled", "AsrTimeoutMinutes": "10", "AssetTagProtection": "Unlocked", "AttributeRegistry": "HpBiosAttributeRegistryI36.1.0.40", "BootMode": "Uefi", "BootOrderPolicy": "RetryIndefinitely", "ChannelInterleaving": "Enabled", "CollabPowerControl": "Enabled", "ConsistentDevNaming": "LomsOnly", "CustomPostMessage": "", "DcuIpPrefetcher": "Enabled", "DcuStreamPrefetcher": "Enabled", "Description": "This is the Platform/BIOS Configuration (RBSU)\ Current Settings", "Dhcpv4": "Enabled", "DynamicPowerCapping": "Auto", "DynamicPowerResponse": "Fast", "EmbNicEnable": "Enabled", "EmbSasEnable": "Enabled", "EmbSata1Enable": "Enabled", "EmbSata2Enable": "Enabled", "EmbVideoConnection": "Auto", "EmbeddedDiagnostics": "Enabled", "EmbeddedDiagsMode": "Auto", "EmbeddedSata": "Ahci", "EmbeddedSerialPort": "Com2Irq3", "EmbeddedUefiShell": "Enabled", "EmbeddedUserPartition": "Disabled", "EmsConsole": "Com1Irq4", "EnergyPerfBias": "BalancedPerf", "EraseUserDefaults": "No", "ExtendedAmbientTemp": "Disabled", "ExtendedMemTest": "Disabled", "F11BootMenu": "Enabled", "FCScanPolicy": "AllTargets", "FanFailPolicy": "Shutdown", "FanInstallReq": "EnableMessaging", "FlexLom1Enable": "Enabled", "HwPrefetcher": "Enabled", "IntelDmiLinkFreq": "Auto", "IntelNicDmaChannels": "Enabled", "IntelPerfMonitoring": "Disabled", "IntelProcVtd": "Enabled", "IntelQpiFreq": "Auto", "IntelQpiLinkEn": "Auto", "IntelQpiPowerManagement": "Enabled", "IntelTxt": "Disabled", "IntelligentProvisioning": "Enabled", "InternalSDCardSlot": "Enabled", "IoNonPostedPrefetching": "Enabled", "Ipv4Address": "0.0.0.0", "Ipv4Gateway": "0.0.0.0", "Ipv4PrimaryDNS": "0.0.0.0", "Ipv4SecondaryDNS": "0.0.0.0", "Ipv4SubnetMask": "0.0.0.0", "MaxMemBusFreqMHz": "Auto", "MaxPcieSpeed": "MaxSupported", "MemFastTraining": "Enabled", "MinProcIdlePkgState": "C6Retention", "MinProcIdlePower": "C6", "MixedPowerSupplyReporting": "Enabled", "Modified": "2015-03-13T21:50:42+00:00", "Name": "BIOS Current Settings", "NetworkBootRetry": "Enabled", "NicBoot1": "NetworkBoot", "NicBoot2": "Disabled", "NicBoot3": "Disabled", "NicBoot4": "Disabled", "NicBoot5": "Disabled", "NicBoot6": "Disabled", "NicBoot7": "Disabled", "NicBoot8": "Disabled", "NmiDebugButton": "Enabled", "NodeInterleaving": "Disabled", "NumaGroupSizeOpt": "Clustered", "NvDimmNMemFunctionality": "Enabled", "OldAdminPassword": null, "OldPowerOnPassword": null, "PciBusPadding": "Enabled", "PostF1Prompt": "Delayed20Sec", "PowerButton": "Enabled", "PowerOnDelay": "None", "PowerOnLogo": "Enabled", "PowerOnPassword": null, "PowerProfile": "BalancedPowerPerf", "PowerRegulator": "DynamicPowerSavings", "PreBootNetwork": "Auto", "ProcAes": "Enabled", "ProcCoreDisable": 0, "ProcNoExecute": "Enabled", "ProcVirtualization": "Enabled", "ProcX2Apic": "Enabled", "ProductId": "727021-B21", "QpiBandwidthOpt": "Balanced", "QpiSnoopConfig": "Standard", "RemovableFlashBootSeq": "ExternalKeysFirst", "RestoreDefaults": "No", "RestoreManufacturingDefaults": "No", "RomSelection": "CurrentRom", "SataSecureErase": "Disabled", "SaveUserDefaults": "No", "SecureBootStatus": "Disabled", "SerialConsoleBaudRate": "115200", "SerialConsoleEmulation": "Vt100Plus", "SerialConsolePort": "Auto", "SerialNumber": "SGH449WNL3", "ServerAssetTag": "", "ServerName": "", "ServerOtherInfo": "", "ServerPrimaryOs": "", "ServiceEmail": "", "ServiceName": "", "ServiceOtherInfo": "", "ServicePhone": "", "SettingsResult": { "ETag": "5E0136E3", "Messages": [ { "MessageArgs": [ "MinProcIdlePkgState" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [ "MinProcIdlePower" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [ "EnergyPerfBias" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [ "PowerRegulator" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [], "MessageID": "Base.1.0:Success" } ], "Time": "2015-03-09T17:50:09+00:00" }, "Sriov": "Enabled", "ThermalConfig": "OptimalCooling", "ThermalShutdown": "Enabled", "TimeFormat": "Utc", "TimeZone": "Unspecified", "Tpm2Operation": "NoAction", "Tpm2Visibility": "Visible", "TpmBinding": "Disabled", "TpmState": "NotPresent", "TpmType": "NoTpm", "TpmUefiOpromMeasuring": "Enabled", "TpmVisibility": "Visible", "Type": "HpBios.1.1.0", "UefiPxeBoot": "Auto", "UefiShellBootOrder": "Disabled", "UefiShellStartup": "Disabled", "UefiShellStartupLocation": "Auto", "UefiShellStartupUrl": "", "UrlBootFile": "", "Usb3Mode": "Auto", "UsbBoot": "Enabled", "UsbControl": "UsbEnabled", "UtilityLang": "English", "VideoOptions": "BothVideoEnabled", "VirtualInstallDisk": "Disabled", "VirtualSerialPort": "Com1Irq4", "WakeOnLan": "Disabled", "links": { "BaseConfigs": { "href": "/rest/v1/systems/1/bios/BaseConfigs" }, "Boot": { "href": "/rest/v1/systems/1/bios/Boot" }, "Mappings": { "href": "/rest/v1/systems/1/bios/Mappings" }, "Settings": { "href": "/rest/v1/systems/1/bios/Settings" }, "iScsi": { "href": "/rest/v1/systems/1/bios/iScsi" }, "self": { "href": "/rest/v1/systems/1/bios" } } } """ GET_BIOS_PENDING_SETTINGS = """ { "AcpiRootBridgePxm": "Enabled", "AcpiSlit": "Enabled", "AdjSecPrefetch": "Enabled", "AdminEmail": "", "AdminName": "", "AdminOtherInfo": "", "AdminPassword": null, "AdminPhone": "", "AdvancedMemProtection": "AdvancedEcc", "AsrStatus": "Enabled", "AsrTimeoutMinutes": "10", "AssetTagProtection": "Unlocked", "AutoPowerOn": "RestoreLastState", "BootMode": "Uefi", "BootOrderPolicy": "RetryIndefinitely", "ChannelInterleaving": "Enabled", "CollabPowerControl": "Enabled", "ConsistentDevNaming": "LomsOnly", "CustomPostMessage": "", "DaylightSavingsTime": "Disabled", "DcuIpPrefetcher": "Enabled", "DcuStreamPrefetcher": "Enabled", "Description": "This is the Platform/BIOS Configuration (RBSU) \ Pending Settings", "Dhcpv4": "Enabled", "DynamicPowerCapping": "Auto", "DynamicPowerResponse": "Fast", "EmbNicEnable": "Enabled", "EmbSata1Enable": "Enabled", "EmbSata2Enable": "Enabled", "EmbVideoConnection": "Auto", "EmbeddedDiagnostics": "Enabled", "EmbeddedDiagsMode": "Auto", "EmbeddedSata": "Ahci", "EmbeddedSerialPort": "Com1Irq4", "EmbeddedUefiShell": "Enabled", "EmbeddedUserPartition": "Disabled", "EmsConsole": "Disabled", "EnergyPerfBias": "BalancedPerf", "EraseUserDefaults": "No", "ExtendedAmbientTemp": "Disabled", "ExtendedMemTest": "Disabled", "F11BootMenu": "Enabled", "FCScanPolicy": "CardConfig", "FanFailPolicy": "Shutdown", "FanInstallReq": "EnableMessaging", "HwPrefetcher": "Enabled", "IntelDmiLinkFreq": "Auto", "IntelNicDmaChannels": "Enabled", "IntelPerfMonitoring": "Disabled", "IntelProcVtd": "Enabled", "IntelligentProvisioning": "Enabled", "InternalSDCardSlot": "Enabled", "IoNonPostedPrefetching": "Enabled", "Ipv4Address": "0.0.0.0", "Ipv4Gateway": "0.0.0.0", "Ipv4PrimaryDNS": "0.0.0.0", "Ipv4SecondaryDNS": "0.0.0.0", "Ipv4SubnetMask": "0.0.0.0", "Ipv6Duid": "Auto", "MaxMemBusFreqMHz": "Auto", "MaxPcieSpeed": "MaxSupported", "MemFastTraining": "Enabled", "MinProcIdlePkgState": "C6Retention", "MinProcIdlePower": "C6", "MixedPowerSupplyReporting": "Enabled", "Modified": "2018-06-25T22:36:55+00:00", "Name": "BIOS Pending Settings", "NetworkBootRetry": "Enabled", "NicBoot1": "NetworkBoot", "NicBoot2": "Disabled", "NicBoot3": "Disabled", "NicBoot4": "Disabled", "NmiDebugButton": "Enabled", "NodeInterleaving": "Disabled", "NumaGroupSizeOpt": "Clustered", "OldAdminPassword": null, "OldPowerOnPassword": null, "PciBusPadding": "Enabled", "PciSlot1Enable": "Enabled", "PcieExpressEcrcSupport": "Disabled", "PostF1Prompt": "Delayed20Sec", "PowerButton": "Enabled", "PowerOnDelay": "None", "PowerOnLogo": "Enabled", "PowerOnPassword": null, "PowerProfile": "BalancedPowerPerf", "PowerRegulator": "StaticHighPerf", "PreBootNetwork": "Auto", "ProcAes": "Enabled", "ProcCoreDisable": 0, "ProcNoExecute": "Enabled", "ProcVirtualization": "Enabled", "ProcX2Apic": "Enabled", "ProductId": "719061-B21", "QpiSnoopConfig": "Standard", "RedundantPowerSupply": "BalancedMode", "RemovableFlashBootSeq": "ExternalKeysFirst", "RestoreDefaults": "No", "RestoreManufacturingDefaults": "No", "RomSelection": "CurrentRom", "SataSecureErase": "Disabled", "SaveUserDefaults": "No", "SecureBootStatus": "Disabled", "SerialConsoleBaudRate": "115200", "SerialConsoleEmulation": "Vt100Plus", "SerialConsolePort": "Auto", "SerialNumber": "SGH449WW5B", "ServerAssetTag": "", "ServerName": "", "ServerOtherInfo": "", "ServerPrimaryOs": "", "ServiceEmail": "", "ServiceName": "", "ServiceOtherInfo": "", "ServicePhone": "", "Slot1StorageBoot": "AllTargets", "Sriov": "Enabled", "ThermalConfig": "OptimalCooling", "ThermalShutdown": "Enabled", "TimeFormat": "Utc", "TimeZone": "UtcP530", "TpmState": "NotPresent", "TpmType": "NoTpm", "Type": "HpBios.1.2.0", "UefiOptimizedBoot": "Enabled", "UefiPxeBoot": "Auto", "UefiShellBootOrder": "Disabled", "UefiShellStartup": "Disabled", "UefiShellStartupLocation": "Auto", "UefiShellStartupUrl": "", "UrlBootFile": "", "Usb3Mode": "Auto", "UsbBoot": "Enabled", "UsbControl": "UsbEnabled", "UtilityLang": "English", "VirtualInstallDisk": "Disabled", "VirtualSerialPort": "Com2Irq3", "VlanControl": "Disabled", "VlanId": 0, "VlanPriority": 0, "WakeOnLan": "Enabled", "links": { "self": { "href": "/rest/v1/systems/1/bios/Settings" } } } """ GET_BIOS_BOOT = """ { "AttributeRegistry": "HpBiosAttributeRegistryP89.1.1.00", "BootSources": [ { "BootString": "Slot 1 : Smart Array P840 Controller - 279.37 GiB,\ RAID 0 Logical Drive(Target:0, Lun:0)", "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)", "StructuredBootString": "HD.Slot.1.1", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/Scsi\ (0x0,0x0)" }, { "BootString": "Slot 1 : Smart Array P840 Controller - 279.37 GiB,\ RAID 0 Logical Drive(Target:0, Lun:1)", "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)", "StructuredBootString": "HD.Slot.1.2", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/Scsi\ (0x0,0x1)" }, { "BootString": "Embedded LOM 1 Port 1 : HP Ethernet 1Gb 4-port\ 331i Adapter - NIC (PXE IPv4) ", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)", "StructuredBootString": "NIC.LOM.1.1.IPv4", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)/MAC\ (C4346BB7EF30,0x0)/IPv4(0.0.0.0)" }, { "BootString": "Embedded LOM 1 Port 1 : HP Ethernet 1Gb 2-port\ 361i Adapter - NIC (iSCSI IPv4) ", "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x3)/Pci(0x0,0x0)", "StructuredBootString": "NIC.LOM.1.1.iSCSI", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x2,0x3)/Pci(0x0,0x0)/MAC\ (C4346BB7EF30,0x1)/IPv4(0.0.0.0)/iSCSI(iqn.2016-07.org.de\ :storage,0x1,0x0,None,None,None,TCP)" }, { "BootString": "Embedded LOM 1 Port 1 : HP Ethernet 1Gb 4-port\ 331i Adapter - NIC (PXE IPv6) ", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)", "StructuredBootString": "NIC.LOM.1.1.IPv6", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)/MAC\ (C4346BB7EF30,0x0)/IPv6(0000:0000:0000:0000:0000:0000:0000:0000)" }, { "BootString": "Generic USB Boot", "CorrelatableID": "UsbClass(0xFFFF,0xFFFF,0xFF,0xFF,0xFF)", "StructuredBootString": "Generic.USB.1.1", "UEFIDevicePath": "UsbClass(0xFFFF,0xFFFF,0xFF,0xFF,0xFF)" }, { "BootString": "iLO Virtual USB 2 : HP iLO Virtual USB CD/DVD ROM", "CorrelatableID": "PciRoot(0x0)/Pci(0x1D,0x0)/USB(0x0,0x0)/USB\ (0x0,0x0)", "StructuredBootString": "CD.Virtual.2.1", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1D,0x0)/USB(0x0,0x0)/USB\ (0x0,0x0)" } ], "DefaultBootOrder": [ "Floppy", "Cd", "Usb", "EmbeddedStorage", "PcieSlotStorage", "EmbeddedFlexLOM", "PcieSlotNic", "UefiShell" ], "Description": "This is the Server Boot Order Current Settings", "DesiredBootDevices": [ { "CorrelatableID": "", "Lun": "", "Wwn": "", "iScsiTargetName": "" }, { "CorrelatableID": "", "Lun": "", "Wwn": "", "iScsiTargetName": "" } ], "Modified": "2015-05-26T23:38:24+00:00", "Name": "Boot Order Current Settings", "PersistentBootConfigOrder": [ "HD.Slot.1.1", "HD.Slot.1.2", "NIC.LOM.1.1.iSCSI", "NIC.LOM.1.1.IPv4", "NIC.LOM.1.1.IPv6", "Generic.USB.1.1", "CD.Virtual.2.1" ], "SettingsResult": { "ETag": "0DEA61A1609C51EED0628E3B0BC633DD", "Messages": [ { "MessageArgs": [ "PersistentBootConfigOrder[0" ], "MessageID": "Base.1.0:PropertyValueNotInList" }, { "MessageArgs": [], "MessageID": "Base.1.0:Success" } ], "Time": "2015-05-14T02:38:40+00:00" }, "Type": "HpServerBootSettings.1.2.0", "links": { "BaseConfigs": { "href": "/rest/v1/systems/1/bios/Boot/BaseConfigs" }, "Settings": { "href": "/rest/v1/systems/1/bios/Boot/Settings" }, "self": { "href": "/rest/v1/systems/1/bios/Boot" } } } """ GET_BIOS_MAPPINGS_WITHOUT_NIC = """ { "Registry": "HpBiosAttributeRegistryP89.1.1.00", "BiosPciSettingsMappings": [ { "Associations": [ "EmbSata1Enable" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x1F,0x2)", "Instance": 1, "Subinstances": [] }, { "Associations": [ "EmbNicEnable", { "PreBootNetwork": "EmbNic" } ], "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)", "Instance": 3, "Subinstances": [] } ] } """ GET_BIOS_MAPPINGS = """ { "Registry": "HpBiosAttributeRegistryP89.1.1.00", "BiosPciSettingsMappings": [ { "Associations": [ "EmbSata1Enable" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x1F,0x2)", "Instance": 1, "Subinstances": [] }, { "Associations": [ "EmbSata2Enable" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x11,0x4)", "Instance": 2, "Subinstances": [] }, { "Associations": [ "EmbNicEnable", { "PreBootNetwork": "EmbNic" } ], "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)", "Instance": 3, "Subinstances": [ { "Associations": [ "NicBoot1" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)", "Subinstance": 1 }, { "Associations": [ "NicBoot2" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x1)", "Subinstance": 2 }, { "Associations": [ "NicBoot3" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x2)", "Subinstance": 3 }, { "Associations": [ "NicBoot4" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x3)", "Subinstance": 4 } ] }, { "Associations": [ "EmbSasEnable" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)", "Instance": 4, "Subinstances": [] }, { "Associations": [ "FlexLom1Enable", { "PreBootNetwork": "FlexLom1" } ], "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x2)/Pci(0x0,0x0)", "Instance": 5, "Subinstances": [] }, { "Associations": [ "PciSlot1Enable" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)", "Instance": 6, "Subinstances": [] }, { "Associations": [ "PciSlot3Enable" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)", "Instance": 7, "Subinstances": [] }, { "Associations": [ "PciSlot2Enable" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x3,0x2)/Pci(0x0,0x0)", "Instance": 8, "Subinstances": [] }, { "Associations": [ "Slot1StorageBoot" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/\ Scsi(0x0,0x0)", "Instance": 9, "Subinstances": [] }, { "Associations": [ "Slot1StorageBoot" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/\ Scsi(0x0,0x1)", "Instance": 10, "Subinstances": [] }, { "Associations": [ "Slot1StorageBoot" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/\ Scsi(0x0,0x0)/HD(1,MBR,0x000677A4,0x800,0x2800)", "Instance": 11, "Subinstances": [] }, { "Associations": [ "Slot1StorageBoot" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/\ Scsi(0x0,0x0)/HD(2,MBR,0x000677A4,0x3000,0x800)", "Instance": 12, "Subinstances": [] }, { "Associations": [ "Slot1StorageBoot" ], "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/\ Scsi(0x0,0x0)/HD(3,MBR,0x000677A4,0x3800,0x6400000)", "Instance": 13, "Subinstances": [] } ], "Modified": "2015-05-22T06:48:46+00:00", "Name": "Bios Setting Mapping to Devices", "Type": "HpBiosMapping.1.2.0", "links": { "self": { "href": "/rest/v1/systems/1/bios/Mappings" } } } """ GET_BASE_CONFIG = """ { "BaseConfigs": [ { "default": { "AcpiRootBridgePxm": "Enabled", "AcpiSlit": "Enabled", "AdjSecPrefetch": "Enabled", "AdminEmail": "", "AdminName": "", "AdminOtherInfo": "", "AdminPassword": "", "AdminPhone": "", "AdvancedMemProtection": "AdvancedEcc", "AsrStatus": "Enabled", "AsrTimeoutMinutes": "10", "AssetTagProtection": "Unlocked", "AutoPowerOn": "RestoreLastState", "BootMode": "Uefi", "BootOrderPolicy": "RetryIndefinitely", "ChannelInterleaving": "Enabled", "CollabPowerControl": "Enabled", "ConsistentDevNaming": "LomsOnly", "CustomPostMessage": "", "DcuIpPrefetcher": "Enabled", "DcuStreamPrefetcher": "Enabled", "Description": "BIOS System Defaults", "Dhcpv4": "Enabled", "DynamicPowerCapping": "Auto", "DynamicPowerResponse": "Fast", "EmbNicEnable": "Enabled", "EmbSas1Boot": "AllTargets", "EmbSata1Enable": "Enabled", "EmbSata2Enable": "Enabled", "EmbVideoConnection": "Auto", "EmbeddedDiagnostics": "Enabled", "EmbeddedDiagsMode": "Auto", "EmbeddedSata": "Ahci", "EmbeddedSerialPort": "Com1Irq4", "EmbeddedUefiShell": "Enabled", "EmbeddedUserPartition": "Disabled", "EmsConsole": "Disabled", "EnergyPerfBias": "BalancedPerf", "EraseUserDefaults": "No", "ExtendedAmbientTemp": "Disabled", "ExtendedMemTest": "Disabled", "F11BootMenu": "Enabled", "FCScanPolicy": "AllTargets", "FanFailPolicy": "Shutdown", "FanInstallReq": "EnableMessaging", "HwPrefetcher": "Enabled", "IntelDmiLinkFreq": "Auto", "IntelNicDmaChannels": "Enabled", "IntelPerfMonitoring": "Disabled", "IntelProcVtd": "Enabled", "IntelQpiFreq": "Auto", "IntelQpiLinkEn": "Auto", "IntelQpiPowerManagement": "Enabled", "IntelTxt": "Disabled", "IntelligentProvisioning": "Enabled", "InternalSDCardSlot": "Enabled", "IoNonPostedPrefetching": "Enabled", "Ipv4Address": "0.0.0.0", "Ipv4Gateway": "0.0.0.0", "Ipv4PrimaryDNS": "0.0.0.0", "Ipv4SecondaryDNS": "0.0.0.0", "Ipv4SubnetMask": "0.0.0.0", "MaxMemBusFreqMHz": "Auto", "MaxPcieSpeed": "MaxSupported", "MemFastTraining": "Enabled", "MinProcIdlePkgState": "C6Retention", "MinProcIdlePower": "C6", "MixedPowerSupplyReporting": "Enabled", "NetworkBootRetry": "Enabled", "NicBoot1": "NetworkBoot", "NicBoot2": "Disabled", "NicBoot3": "Disabled", "NicBoot4": "Disabled", "NmiDebugButton": "Enabled", "NodeInterleaving": "Disabled", "NumaGroupSizeOpt": "Clustered", "OldAdminPassword": "", "OldPowerOnPassword": "", "PciBusPadding": "Enabled", "PciSlot1Enable": "Enabled", "PostF1Prompt": "Delayed20Sec", "PowerButton": "Enabled", "PowerOnDelay": "None", "PowerOnLogo": "Enabled", "PowerOnPassword": "", "PowerProfile": "BalancedPowerPerf", "PowerRegulator": "DynamicPowerSavings", "PreBootNetwork": "Auto", "ProcAes": "Enabled", "ProcCoreDisable": 0, "ProcNoExecute": "Enabled", "ProcVirtualization": "Enabled", "ProcX2Apic": "Enabled", "QpiBandwidthOpt": "Balanced", "QpiSnoopConfig": "Standard", "RedundantPowerSupply": "BalancedMode", "RemovableFlashBootSeq": "ExternalKeysFirst", "RestoreDefaults": "No", "RestoreManufacturingDefaults": "No", "SataSecureErase": "Disabled", "SaveUserDefaults": "No", "SecureBoot": "Disabled", "SecureBootStatus": "Disabled", "SerialConsoleBaudRate": "115200", "SerialConsoleEmulation": "Vt100Plus", "SerialConsolePort": "Auto", "ServerAssetTag": "", "ServerName": "", "ServerOtherInfo": "", "ServerPrimaryOs": "", "ServiceEmail": "", "ServiceName": "", "ServiceOtherInfo": "", "ServicePhone": "", "Slot1StorageBoot": "AllTargets", "Slot2StorageBoot": "AllTargets", "Slot3StorageBoot": "AllTargets", "Slot4StorageBoot": "AllTargets", "Slot5StorageBoot": "AllTargets", "Slot6StorageBoot": "AllTargets", "Sriov": "Enabled", "TcmOperation": "Disable", "TcmVisibility": "Visible", "ThermalConfig": "OptimalCooling", "ThermalShutdown": "Enabled", "TimeFormat": "Utc", "TimeZone": "UtcM7", "Tpm2Operation": "NoAction", "Tpm2Ppi": "Disabled", "Tpm2Visibility": "Visible", "TpmBinding": "Disabled", "TpmOperation": "Disable", "TpmState": "NotPresent", "TpmType": "NoTpm", "TpmUefiOpromMeasuring": "Enabled", "TpmVisibility": "Visible", "UefiOptimizedBoot": "Enabled", "UefiPxeBoot": "Auto", "UefiShellBootOrder": "Disabled", "UefiShellStartup": "Disabled", "UefiShellStartupLocation": "Auto", "UefiShellStartupUrl": "", "UrlBootFile": "", "Usb3Mode": "Auto", "UsbBoot": "Enabled", "UsbControl": "UsbEnabled", "UtilityLang": "English", "VideoOptions": "BothVideoEnabled", "VirtualInstallDisk": "Disabled", "VirtualSerialPort": "Com2Irq3", "VlanControl": "Disabled", "VlanId": 0, "VlanPriority": 0, "WakeOnLan": "Enabled" } } ], "Capabilities": { "BaseConfig": true, "BaseConfigs": false }, "Modified": "2015-03-26T00:05:15+00:00", "Name": "BIOS Default Settings", "Type": "HpBaseConfigs.0.10.0", "links": { "self": { "href": "/rest/v1/systems/1/bios/BaseConfigs" } } } """ GET_DEFAULT_CONFIG = """ { "AcpiRootBridgePxm": "Enabled", "AcpiSlit": "Enabled", "AdjSecPrefetch": "Enabled", "AdminEmail": "", "AdminName": "", "AdminOtherInfo": "", "AdminPassword": "", "AdminPhone": "", "AdvancedMemProtection": "AdvancedEcc", "AsrStatus": "Enabled", "AsrTimeoutMinutes": "10", "AssetTagProtection": "Unlocked", "AutoPowerOn": "RestoreLastState", "BootMode": "Uefi", "BootOrderPolicy": "RetryIndefinitely", "ChannelInterleaving": "Enabled", "CollabPowerControl": "Enabled", "ConsistentDevNaming": "LomsOnly", "CustomPostMessage": "", "DcuIpPrefetcher": "Enabled", "DcuStreamPrefetcher": "Enabled", "Description": "BIOS System Defaults", "Dhcpv4": "Enabled", "DynamicPowerCapping": "Auto", "DynamicPowerResponse": "Fast", "EmbNicEnable": "Enabled", "EmbSas1Boot": "AllTargets", "EmbSata1Enable": "Enabled", "EmbSata2Enable": "Enabled", "EmbVideoConnection": "Auto", "EmbeddedDiagnostics": "Enabled", "EmbeddedDiagsMode": "Auto", "EmbeddedSata": "Ahci", "EmbeddedSerialPort": "Com1Irq4", "EmbeddedUefiShell": "Enabled", "EmbeddedUserPartition": "Disabled", "EmsConsole": "Disabled", "EnergyPerfBias": "BalancedPerf", "EraseUserDefaults": "No", "ExtendedAmbientTemp": "Disabled", "ExtendedMemTest": "Disabled", "F11BootMenu": "Enabled", "FCScanPolicy": "AllTargets", "FanFailPolicy": "Shutdown", "FanInstallReq": "EnableMessaging", "HwPrefetcher": "Enabled", "IntelDmiLinkFreq": "Auto", "IntelNicDmaChannels": "Enabled", "IntelPerfMonitoring": "Disabled", "IntelProcVtd": "Enabled", "IntelQpiFreq": "Auto", "IntelQpiLinkEn": "Auto", "IntelQpiPowerManagement": "Enabled", "IntelTxt": "Disabled", "IntelligentProvisioning": "Enabled", "InternalSDCardSlot": "Enabled", "IoNonPostedPrefetching": "Enabled", "Ipv4Address": "0.0.0.0", "Ipv4Gateway": "0.0.0.0", "Ipv4PrimaryDNS": "0.0.0.0", "Ipv4SecondaryDNS": "0.0.0.0", "Ipv4SubnetMask": "0.0.0.0", "MaxMemBusFreqMHz": "Auto", "MaxPcieSpeed": "MaxSupported", "MemFastTraining": "Enabled", "MinProcIdlePkgState": "C6Retention", "MinProcIdlePower": "C6", "MixedPowerSupplyReporting": "Enabled", "NetworkBootRetry": "Enabled", "NicBoot1": "NetworkBoot", "NicBoot2": "Disabled", "NicBoot3": "Disabled", "NicBoot4": "Disabled", "NmiDebugButton": "Enabled", "NodeInterleaving": "Disabled", "NumaGroupSizeOpt": "Clustered", "OldAdminPassword": "", "OldPowerOnPassword": "", "PciBusPadding": "Enabled", "PciSlot1Enable": "Enabled", "PostF1Prompt": "Delayed20Sec", "PowerButton": "Enabled", "PowerOnDelay": "None", "PowerOnLogo": "Enabled", "PowerOnPassword": "", "PowerProfile": "BalancedPowerPerf", "PowerRegulator": "DynamicPowerSavings", "PreBootNetwork": "Auto", "ProcAes": "Enabled", "ProcCoreDisable": 0, "ProcNoExecute": "Enabled", "ProcVirtualization": "Enabled", "ProcX2Apic": "Enabled", "QpiBandwidthOpt": "Balanced", "QpiSnoopConfig": "Standard", "RedundantPowerSupply": "BalancedMode", "RemovableFlashBootSeq": "ExternalKeysFirst", "RestoreDefaults": "No", "RestoreManufacturingDefaults": "No", "SataSecureErase": "Disabled", "SaveUserDefaults": "No", "SecureBoot": "Disabled", "SecureBootStatus": "Disabled", "SerialConsoleBaudRate": "115200", "SerialConsoleEmulation": "Vt100Plus", "SerialConsolePort": "Auto", "ServerAssetTag": "", "ServerName": "", "ServerOtherInfo": "", "ServerPrimaryOs": "", "ServiceEmail": "", "ServiceName": "", "ServiceOtherInfo": "", "ServicePhone": "", "Slot1StorageBoot": "AllTargets", "Slot2StorageBoot": "AllTargets", "Slot3StorageBoot": "AllTargets", "Slot4StorageBoot": "AllTargets", "Slot5StorageBoot": "AllTargets", "Slot6StorageBoot": "AllTargets", "Sriov": "Enabled", "TcmOperation": "Disable", "TcmVisibility": "Visible", "ThermalConfig": "OptimalCooling", "ThermalShutdown": "Enabled", "TimeZone": "UtcM7", "Tpm2Operation": "NoAction", "Tpm2Ppi": "Disabled", "Tpm2Visibility": "Visible", "TpmBinding": "Disabled", "TpmOperation": "Disable", "TpmState": "NotPresent", "TpmType": "NoTpm", "TpmUefiOpromMeasuring": "Enabled", "TpmVisibility": "Visible", "UefiOptimizedBoot": "Enabled", "UefiPxeBoot": "Auto", "UefiShellBootOrder": "Disabled", "UefiShellStartup": "Disabled", "UefiShellStartupLocation": "Auto", "UefiShellStartupUrl": "", "UrlBootFile": "", "Usb3Mode": "Auto", "UsbBoot": "Enabled", "UsbControl": "UsbEnabled", "UtilityLang": "English", "VideoOptions": "BothVideoEnabled", "VirtualInstallDisk": "Disabled", "VirtualSerialPort": "Com2Irq3", "VlanControl": "Disabled", "VlanId": 0, "VlanPriority": 0, "WakeOnLan": "Enabled" } """ GET_ISCSI_PATCH = """ { "iSCSIBootSources": [ { "iSCSIBootAttemptInstance": 1, "iSCSIBootAttemptName": "NicBoot1", "iSCSIBootLUN": "1", "iSCSINicSource": "NicBoot1", "iSCSITargetIpAddress": "10.10.1.30", "iSCSITargetName": "iqn.2011-07.com.example.server:test1", "iSCSITargetTcpPort": 3260 }, { "iSCSIBootAttemptInstance": 2, "iSCSIBootAttemptName": "NicBoot2", "iSCSIBootLUN": "1", "iSCSINicSource": "NicBoot2", "iSCSITargetIpAddress": "10.10.1.30", "iSCSITargetName": "iqn.2011-07.com.example.server:test1", "iSCSITargetTcpPort": 3260 }, { "iSCSIBootAttemptInstance": 3, "iSCSIBootAttemptName": "NicBoot3", "iSCSIBootLUN": "1", "iSCSINicSource": "NicBoot3", "iSCSITargetIpAddress": "10.10.1.30", "iSCSITargetName": "iqn.2011-07.com.example.server:test1", "iSCSITargetTcpPort": 3260 }, { "iSCSIBootAttemptInstance": 4, "iSCSIBootAttemptName": "NicBoot4", "iSCSIBootLUN": "1", "iSCSINicSource": "NicBoot4", "iSCSITargetIpAddress": "10.10.1.30", "iSCSITargetName": "iqn.2011-07.com.example.server:test1", "iSCSITargetTcpPort": 3260 } ] } """ GET_ISCSI_SETTINGS = """ { "AttributRegistry": "HpBiosAttributeRegistryP89.1.1.00", "Description": "This is the Server iSCSI Software Initiator Current \ Settings", "Modified": "2015-05-28T04:11:55+00:00", "Name": "iSCSI Software Initiator Current Settings", "SettingsResult": { "ETag": "D43535CE", "Messages": [ { "MessageArgs": [ "iSCSITargetTcpport" ], "MessageID": "Base.1.0:PropertyUnknown" }, { "MessageArgs": [], "MessageID": "Base.1.0:Success" } ], "Time": "2015-05-28T04:11:55+00:00" }, "Type": "HpiSCSISoftwareInitiator.1.0.0", "iSCSIBootSources": [ { "StructuredBootString": "NIC.LOM.1.1.iSCSI", "UEFIDevicePath": null, "iSCSIAuthenticationMethod": "None", "iSCSIBootAttemptInstance": 1, "iSCSIBootAttemptName": "NicBoot1", "iSCSIBootEnable": "Enabled", "iSCSIBootLUN": "1", "iSCSIChapSecret": null, "iSCSIChapType": "OneWay", "iSCSIChapUsername": null, "iSCSIConnectRetry": 0, "iSCSIConnectTimeoutMS": 1000, "iSCSIInitiatorGateway": "0.0.0.0", "iSCSIInitiatorInfoViaDHCP": true, "iSCSIInitiatorIpAddress": "0.0.0.0", "iSCSIInitiatorNetmask": "0.0.0.0", "iSCSIIpAddressType": "IPv4", "iSCSINicSource": "NicBoot1", "iSCSIReverseChapSecret": null, "iSCSIReverseChapUsername": null, "iSCSITargetInfoViaDHCP": false, "iSCSITargetIpAddress": "10.10.1.38", "iSCSITargetName": "iqn.2014-07.com.tecmint:tgt1", "iSCSITargetTcpPort": 3260 }, { "StructuredBootString": "NIC.LOM.1.1.iSCSI", "UEFIDevicePath": null, "iSCSIAuthenticationMethod": "None", "iSCSIBootAttemptInstance": 0, "iSCSIBootAttemptName": "test2", "iSCSIBootEnable": "Enabled", "iSCSIBootLUN": "1", "iSCSIChapSecret": null, "iSCSIChapType": "OneWay", "iSCSIChapUsername": null, "iSCSIConnectRetry": 0, "iSCSIConnectTimeoutMS": 1000, "iSCSIInitiatorGateway": "0.0.0.0", "iSCSIInitiatorInfoViaDHCP": true, "iSCSIInitiatorIpAddress": "0.0.0.0", "iSCSIInitiatorNetmask": "0.0.0.0", "iSCSIIpAddressType": "IPv4", "iSCSINicSource": "NicBoot1", "iSCSIReverseChapSecret": null, "iSCSIReverseChapUsername": null, "iSCSITargetInfoViaDHCP": false, "iSCSITargetIpAddress": "10.10.1.38", "iSCSITargetName": "iqn.2014-07.com.tecmint:tgt1", "iSCSITargetTcpPort": 3260 }, { "StructuredBootString": null, "UEFIDevicePath": null, "iSCSIAuthenticationMethod": "None", "iSCSIBootAttemptInstance": 0, "iSCSIBootAttemptName": "", "iSCSIBootEnable": "Disabled", "iSCSIBootLUN": "0", "iSCSIChapSecret": null, "iSCSIChapType": "OneWay", "iSCSIChapUsername": null, "iSCSIConnectRetry": 0, "iSCSIConnectTimeoutMS": 100, "iSCSIInitiatorGateway": "0.0.0.0", "iSCSIInitiatorInfoViaDHCP": true, "iSCSIInitiatorIpAddress": "0.0.0.0", "iSCSIInitiatorNetmask": "0.0.0.0", "iSCSIIpAddressType": "IPv4", "iSCSINicSource": null, "iSCSIReverseChapSecret": null, "iSCSIReverseChapUsername": null, "iSCSITargetInfoViaDHCP": true, "iSCSITargetIpAddress": "0.0.0.0", "iSCSITargetName": null, "iSCSITargetTcpPort": 0 }, { "StructuredBootString": null, "UEFIDevicePath": null, "iSCSIAuthenticationMethod": "None", "iSCSIBootAttemptInstance": 0, "iSCSIBootAttemptName": "", "iSCSIBootEnable": "Disabled", "iSCSIBootLUN": "0", "iSCSIChapSecret": null, "iSCSIChapType": "OneWay", "iSCSIChapUsername": null, "iSCSIConnectRetry": 0, "iSCSIConnectTimeoutMS": 100, "iSCSIInitiatorGateway": "0.0.0.0", "iSCSIInitiatorInfoViaDHCP": true, "iSCSIInitiatorIpAddress": "0.0.0.0", "iSCSIInitiatorNetmask": "0.0.0.0", "iSCSIIpAddressType": "IPv4", "iSCSINicSource": null, "iSCSIReverseChapSecret": null, "iSCSIReverseChapUsername": null, "iSCSITargetInfoViaDHCP": true, "iSCSITargetIpAddress": "0.0.0.0", "iSCSITargetName": null, "iSCSITargetTcpPort": 0 } ], "iSCSIInitiatorName": "iqn.1986-03.com.hp:uefi-p89-mxq45006w5", "iSCSINicSources": [ "NicBoot1", "NicBoot2", "NicBoot3", "NicBoot4" ], "links": { "BaseConfigs": { "href": "/rest/v1/systems/1/bios/iScsi/BaseConfigs" }, "Mappings": { "href": "/rest/v1/systems/1/bios/Mappings" }, "Settings": { "href": "/rest/v1/systems/1/bios/iScsi/Settings" }, "self": { "href": "/rest/v1/systems/1/bios/iScsi" } } } """ RESP_VM_STATUS_FLOPPY_EMPTY = """ { "Description": "Virtual Removable Media", "links": { "self": { "href": "/rest/v1/Managers/1/VirtualMedia/1" } }, "Type": "VirtualMedia.0.9.5", "Image": "", "ConnectedVia": "NotConnected", "MediaTypes": [ "Floppy", "USBStick" ], "WriteProtected": false, "Inserted": false, "Name": "VirtualMedia" } """ GET_VM_STATUS_FLOPPY_EMPTY = """ { "WRITE_PROTECT": "NO", "VM_APPLET": "DISCONNECTED", "IMAGE_URL": "", "BOOT_OPTION": "NO_BOOT", "DEVICE": "FLOPPY", "IMAGE_INSERTED": "NO" } """ RESP_VM_STATUS_FLOPPY_INSERTED = """ { "ImageName": "floppy.iso", "Description": "Virtual Removable Media", "links": { "self": { "href": "/rest/v1/Managers/1/VirtualMedia/1" } }, "Type": "VirtualMedia.0.9.5", "Image": "http://1.1.1.1/floppy.iso", "ConnectedVia": "URI", "MediaTypes": [ "Floppy", "USBStick" ], "WriteProtected": true, "Inserted": true, "Name": "VirtualMedia" } """ GET_VM_STATUS_FLOPPY_INSERTED = """ { "WRITE_PROTECT": "YES", "VM_APPLET": "CONNECTED", "IMAGE_URL": "http://1.1.1.1/floppy.iso", "BOOT_OPTION": "BOOT_ALWAYS", "DEVICE": "FLOPPY", "IMAGE_INSERTED": "YES" } """ RESP_VM_STATUS_CDROM_INSERTED = """ { "Description": "Virtual Removable Media", "links": { "self": {"href": "/rest/v1/Managers/1/VirtualMedia/2" } }, "Type": "VirtualMedia.0.9.5", "Image": "http://foo/foo", "ConnectedVia": "NotConnected", "MediaTypes": [ "CD", "DVD" ], "Oem": { "Hp": { "Type": "HpiLOVirtualMedia.0.9.5", "BootOnNextServerReset": false } }, "WriteProtected": true, "Inserted": true, "Name": "VirtualMedia" } """ RESP_VM_STATUS_CDROM_EMPTY = """ { "Description": "Virtual Removable Media", "links": { "self": {"href": "/rest/v1/Managers/1/VirtualMedia/2" } }, "Type": "VirtualMedia.0.9.5", "Image": "", "ConnectedVia": "NotConnected", "MediaTypes": [ "CD", "DVD" ], "Oem": { "Hp": { "Type": "HpiLOVirtualMedia.0.9.5", "BootOnNextServerReset": false } }, "WriteProtected": true, "Inserted": false, "Name": "VirtualMedia" } """ GET_VM_STATUS_CDROM_EMPTY = """ { "WRITE_PROTECT": "YES", "VM_APPLET": "DISCONNECTED", "IMAGE_URL": "", "BOOT_OPTION": "NO_BOOT", "DEVICE": "CDROM", "IMAGE_INSERTED": "NO"} """ RESP_VM_STATUS_CDROM_INSERTED = """ { "ImageName": "cdrom.iso", "Description": "Virtual Removable Media", "links": {"self": {"href": "/rest/v1/Managers/1/VirtualMedia/2"}}, "Type": "VirtualMedia.0.9.5", "Image": "http://1.1.1.1/cdrom.iso", "ConnectedVia": "URI", "MediaTypes": [ "CD", "DVD" ], "Oem": { "Hp": { "Type": "HpiLOVirtualMedia.0.9.5", "BootOnNextServerReset": false } }, "WriteProtected": true, "Inserted": true, "Name": "VirtualMedia" } """ GET_VM_STATUS_CDROM_INSERTED = """ { "WRITE_PROTECT": "YES", "VM_APPLET": "CONNECTED", "IMAGE_URL": "http://1.1.1.1/cdrom.iso", "BOOT_OPTION": "BOOT_ALWAYS", "DEVICE": "CDROM", "IMAGE_INSERTED": "YES" } """ PATCH_VM_CDROM = """ { "Oem": { "Hp": { "BootOnNextServerReset": true } } } """ GET_MANAGER_DETAILS_NO_VMEDIA = """ { "AvailableActions": [ { "Action": "Reset" } ], "CommandShell": { "ConnectTypesSupported": [ "SSH", "Oem" ], "Enabled": true, "MaxConcurrentSessions": 9 }, "Description": "Manager View", "Firmware": { "Current": { "VersionString": "iLO 4 v2.20" } }, "GraphicalConsole": { "ConnectTypesSupported": [ "KVMIP" ], "Enabled": true, "MaxConcurrentSessions": 10 }, "ManagerType": "BMC", "Model": "iLO 4", "Name": "Manager", "Oem": { "Hp": { "AvailableActions": [ { "Action": "ResetRestApiState", "Capabilities": [ { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] } ], "FederationConfig": { "IPv6MulticastScope": "Site", "MulticastAnnouncementInterval": 600, "MulticastDiscovery": "Enabled", "MulticastTimeToLive": 5, "iLOFederationManagement": "Enabled" }, "Firmware": { "Current": { "Date": "Feb 09 2015", "DebugBuild": false, "MajorVersion": 2, "MinorVersion": 20, "Time": "", "VersionString": "iLO 4 v2.20" } }, "License": { "LicenseKey": "32Q6W-PQWTB-H7XYL-39968-RR53R", "LicenseString": "iLO 4 Advanced", "LicenseType": "Perpetual" }, "RequiredLoginForiLORBSU": false, "SerialCLISpeed": 9600, "SerialCLIStatus": "EnabledAuthReq", "Type": "HpiLO.0.13.0", "VSPLogDownloadEnabled": false, "iLOSelfTestResults": [ { "Notes": "", "SelfTestName": "NVRAMData", "Status": "OK" }, { "Notes": "Controller firmware revision 2.09.00 ", "SelfTestName": "EmbeddedFlash/SDCard", "Status": "OK" }, { "Notes": "", "SelfTestName": "EEPROM", "Status": "OK" }, { "Notes": "", "SelfTestName": "HostRom", "Status": "OK" }, { "Notes": "", "SelfTestName": "SupportedHost", "Status": "OK" }, { "Notes": "ProLiant BL460c Gen9 System Programmable \ Logic Device version 0x13", "SelfTestName": "CPLDPAL0", "Status": "Informational" }, { "Notes": "ProLiant BL460c Gen9 SAS Programmable \ Logic Device version 0x01", "SelfTestName": "CPLDPAL1", "Status": "Informational" } ], "links": { "ActiveHealthSystem": { "href": "/rest/v1/Managers/1/ActiveHealthSystem" }, "DateTimeService": { "href": "/rest/v1/Managers/1/DateTime" }, "EmbeddedMediaService": { "href": "/rest/v1/Managers/1/EmbeddedMedia" }, "FederationDispatch": { "extref": "/dispatch" }, "FederationGroups": { "href": "/rest/v1/Managers/1/FederationGroups" }, "FederationPeers": { "href": "/rest/v1/Managers/1/FederationPeers" }, "LicenseService": { "href": "/rest/v1/Managers/1/LicenseService" }, "UpdateService": { "href": "/rest/v1/Managers/1/UpdateService" }, "VSPLogLocation": { "extref": "/sol.log.gz" } } } }, "SerialConsole": { "ConnectTypesSupported": [ "SSH", "IPMI", "Oem" ], "Enabled": true, "MaxConcurrentSessions": 13 }, "Status": { "State": "Enabled" }, "Type": "Manager.0.10.0", "UUID": "83590768-e977-575a-927a-b3de8f692d4f", "links": { "EthernetNICs": { "href": "/rest/v1/Managers/1/NICs" }, "Logs": { "href": "/rest/v1/Managers/1/Logs" }, "ManagerForServers": [ { "href": "/rest/v1/Systems/1" } ], "NetworkService": { "href": "/rest/v1/Managers/1/NetworkService" }, "self": { "href": "/rest/v1/Managers/1" } } } """ RESP_VM_STATUS_CDROM_MISSING = """ { "Description": "Virtual Removable Media", "links": { "self": {"href": "/rest/v1/Managers/1/VirtualMedia/2" } }, "Type": "VirtualMedia.0.9.5", "Image": "", "ConnectedVia": "NotConnected", "MediaTypes": [ "DVD" ], "Oem": { "Hp": { "Type": "HpiLOVirtualMedia.0.9.5", "BootOnNextServerReset": false } }, "WriteProtected": true, "Inserted": false, "Name": "VirtualMedia" } """ RESP_BODY_FOR_SYSTEM_WITH_CDROM = """ { "AssetTag": "", "AvailableActions": [ { "Action": "Reset", "Capabilities": [ { "AllowableValues": [ "On", "ForceOff", "ForceRestart", "Nmi", "PushPowerButton" ], "PropertyName": "ResetType" } ] } ], "Bios": { "Current": { "VersionString": "I36 v1.40 (01/28/2015)" } }, "Boot": { "BootSourceOverrideEnabled": "Once", "BootSourceOverrideSupported": [ "None", "Cd", "Hdd", "Usb", "Utilities", "Diags", "BiosSetup", "Pxe", "UefiShell", "UefiTarget" ], "BootSourceOverrideTarget": "Cd", "UefiTargetBootSourceOverride": "None", "UefiTargetBootSourceOverrideSupported": [ "HD.Emb.1.2", "Generic.USB.1.1", "NIC.FlexLOM.1.1.IPv4", "NIC.FlexLOM.1.1.IPv6", "CD.Virtual.2.1" ] }, "Description": "Computer System View", "HostCorrelation": { "HostMACAddress": [ "6c:c2:17:39:fe:80", "6c:c2:17:39:fe:88" ], "HostName": "", "IPAddress": [ "", "" ] }, "IndicatorLED": "Off", "Manufacturer": "HP", "Memory": { "TotalSystemMemoryGB": 16 }, "Model": "ProLiant BL460c Gen9", "Name": "Computer System", "Oem": { "Hp": { "AvailableActions": [ { "Action": "PowerButton", "Capabilities": [ { "AllowableValues": [ "Press", "PressAndHold" ], "PropertyName": "PushType" }, { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] }, { "Action": "SystemReset", "Capabilities": [ { "AllowableValues": [ "ColdBoot" ], "PropertyName": "ResetType" }, { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] } ], "Battery": [], "Bios": { "Backup": { "Date": "v1.40 (01/28/2015)", "Family": "I36", "VersionString": "I36 v1.40 (01/28/2015)" }, "Current": { "Date": "01/28/2015", "Family": "I36", "VersionString": "I36 v1.40 (01/28/2015)" }, "UefiClass": 2 }, "DeviceDiscoveryComplete": { "AMSDeviceDiscovery": "NoAMS", "SmartArrayDiscovery": "Initial", "vAuxDeviceDiscovery": "DataIncomplete", "vMainDeviceDiscovery": "ServerOff" }, "PostState": "PowerOff", "PowerAllocationLimit": 500, "PowerAutoOn": "PowerOn", "PowerOnDelay": "Minimum", "PowerRegulatorMode": "Dynamic", "PowerRegulatorModesSupported": [ "OSControl", "Dynamic", "Max", "Min" ], "ServerSignature": 0, "Type": "HpComputerSystemExt.0.10.1", "VirtualProfile": "Inactive", "VirtualUUID": null, "links": { "BIOS": { "href": "/rest/v1/systems/1/bios" }, "MEMORY": { "href": "/rest/v1/Systems/1/Memory" }, "PCIDevices": { "href": "/rest/v1/Systems/1/PCIDevices" }, "PCISlots": { "href": "/rest/v1/Systems/1/PCISlots" }, "SecureBoot": { "href": "/rest/v1/Systems/1/SecureBoot" } } } }, "Power": "Off", "Processors": { "Count": 1, "ProcessorFamily": "Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz", "Status": { "HealthRollUp": "OK" } }, "SKU": "727021-B21", "SerialNumber": "SGH449WNL3", "Status": { "Health": "OK", "State": "Disabled" }, "SystemType": "Physical", "Type": "ComputerSystem.0.9.6", "UUID": "30373237-3132-4753-4834-3439574E4C33", "links": { "Chassis": [ { "href": "/rest/v1/Chassis/1" } ], "Logs": { "href": "/rest/v1/Systems/1/Logs" }, "ManagedBy": [ { "href": "/rest/v1/Managers/1" } ], "self": { "href": "/rest/v1/Systems/1" } } } """ RESP_BODY_WITH_UEFI_SHELL = """ { "AssetTag": "", "AvailableActions": [ { "Action": "Reset", "Capabilities": [ { "AllowableValues": [ "On", "ForceOff", "ForceRestart", "Nmi", "PushPowerButton" ], "PropertyName": "ResetType" } ] } ], "Bios": { "Current": { "VersionString": "I36 v1.40 (01/28/2015)" } }, "Boot": { "BootSourceOverrideEnabled": "Once", "BootSourceOverrideSupported": [ "None", "Cd", "Hdd", "Usb", "Utilities", "Diags", "BiosSetup", "Pxe", "UefiShell", "UefiTarget" ], "BootSourceOverrideTarget": "UefiShell", "UefiTargetBootSourceOverride": "None", "UefiTargetBootSourceOverrideSupported": [ "HD.Emb.1.2", "Generic.USB.1.1", "NIC.FlexLOM.1.1.IPv4", "NIC.FlexLOM.1.1.IPv6", "CD.Virtual.2.1" ] }, "Description": "Computer System View", "HostCorrelation": { "HostMACAddress": [ "6c:c2:17:39:fe:80", "6c:c2:17:39:fe:88" ], "HostName": "", "IPAddress": [ "", "" ] }, "IndicatorLED": "Off", "Manufacturer": "HP", "Memory": { "TotalSystemMemoryGB": 16 }, "Model": "ProLiant BL460c Gen9", "Name": "Computer System", "Oem": { "Hp": { "AvailableActions": [ { "Action": "PowerButton", "Capabilities": [ { "AllowableValues": [ "Press", "PressAndHold" ], "PropertyName": "PushType" }, { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] }, { "Action": "SystemReset", "Capabilities": [ { "AllowableValues": [ "ColdBoot" ], "PropertyName": "ResetType" }, { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] } ], "Battery": [], "Bios": { "Backup": { "Date": "v1.40 (01/28/2015)", "Family": "I36", "VersionString": "I36 v1.40 (01/28/2015)" }, "Current": { "Date": "01/28/2015", "Family": "I36", "VersionString": "I36 v1.40 (01/28/2015)" }, "UefiClass": 2 }, "DeviceDiscoveryComplete": { "AMSDeviceDiscovery": "NoAMS", "SmartArrayDiscovery": "Initial", "vAuxDeviceDiscovery": "DataIncomplete", "vMainDeviceDiscovery": "ServerOff" }, "PostState": "PowerOff", "PowerAllocationLimit": 500, "PowerAutoOn": "PowerOn", "PowerOnDelay": "Minimum", "PowerRegulatorMode": "Dynamic", "PowerRegulatorModesSupported": [ "OSControl", "Dynamic", "Max", "Min" ], "ServerSignature": 0, "Type": "HpComputerSystemExt.0.10.1", "VirtualProfile": "Inactive", "VirtualUUID": null, "links": { "BIOS": { "href": "/rest/v1/systems/1/bios" }, "MEMORY": { "href": "/rest/v1/Systems/1/Memory" }, "PCIDevices": { "href": "/rest/v1/Systems/1/PCIDevices" }, "PCISlots": { "href": "/rest/v1/Systems/1/PCISlots" }, "SecureBoot": { "href": "/rest/v1/Systems/1/SecureBoot" } } } }, "Power": "Off", "Processors": { "Count": 1, "ProcessorFamily": "Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz", "Status": { "HealthRollUp": "OK" } }, "SKU": "727021-B21", "SerialNumber": "SGH449WNL3", "Status": { "Health": "OK", "State": "Disabled" }, "SystemType": "Physical", "Type": "ComputerSystem.0.9.6", "UUID": "30373237-3132-4753-4834-3439574E4C33", "links": { "Chassis": [ { "href": "/rest/v1/Chassis/1" } ], "Logs": { "href": "/rest/v1/Systems/1/Logs" }, "ManagedBy": [ { "href": "/rest/v1/Managers/1" } ], "self": { "href": "/rest/v1/Systems/1" } } } """ RESP_BODY_FOR_SYSTEM_WITHOUT_BOOT = """ { "AssetTag": "", "AvailableActions": [ { "Action": "Reset", "Capabilities": [ { "AllowableValues": [ "On", "ForceOff", "ForceRestart", "Nmi", "PushPowerButton" ], "PropertyName": "ResetType" } ] } ], "Bios": { "Current": { "VersionString": "I36 v1.40 (01/28/2015)" } }, "Description": "Computer System View", "HostCorrelation": { "HostMACAddress": [ "6c:c2:17:39:fe:80", "6c:c2:17:39:fe:88" ], "HostName": "", "IPAddress": [ "", "" ] }, "IndicatorLED": "Off", "Manufacturer": "HP", "Memory": { "TotalSystemMemoryGB": 16 }, "Model": "ProLiant BL460c Gen9", "Name": "Computer System", "Oem": { "Hp": { "AvailableActions": [ { "Action": "PowerButton", "Capabilities": [ { "AllowableValues": [ "Press", "PressAndHold" ], "PropertyName": "PushType" }, { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] }, { "Action": "SystemReset", "Capabilities": [ { "AllowableValues": [ "ColdBoot" ], "PropertyName": "ResetType" }, { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] } ], "Battery": [], "Bios": { "Backup": { "Date": "v1.40 (01/28/2015)", "Family": "I36", "VersionString": "I36 v1.40 (01/28/2015)" }, "Current": { "Date": "01/28/2015", "Family": "I36", "VersionString": "I36 v1.40 (01/28/2015)" }, "UefiClass": 2 }, "DeviceDiscoveryComplete": { "AMSDeviceDiscovery": "NoAMS", "SmartArrayDiscovery": "Initial", "vAuxDeviceDiscovery": "DataIncomplete", "vMainDeviceDiscovery": "ServerOff" }, "PostState": "PowerOff", "PowerAllocationLimit": 500, "PowerAutoOn": "PowerOn", "PowerOnDelay": "Minimum", "PowerRegulatorMode": "Dynamic", "PowerRegulatorModesSupported": [ "OSControl", "Dynamic", "Max", "Min" ], "ServerSignature": 0, "Type": "HpComputerSystemExt.0.10.1", "VirtualProfile": "Inactive", "VirtualUUID": null, "links": { "BIOS": { "href": "/rest/v1/systems/1/bios" }, "MEMORY": { "href": "/rest/v1/Systems/1/Memory" }, "PCIDevices": { "href": "/rest/v1/Systems/1/PCIDevices" }, "PCISlots": { "href": "/rest/v1/Systems/1/PCISlots" }, "SecureBoot": { "href": "/rest/v1/Systems/1/SecureBoot" } } } }, "Power": "Off", "Processors": { "Count": 1, "ProcessorFamily": "Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz", "Status": { "HealthRollUp": "OK" } }, "SKU": "727021-B21", "SerialNumber": "SGH449WNL3", "Status": { "Health": "OK", "State": "Disabled" }, "SystemType": "Physical", "Type": "ComputerSystem.0.9.6", "UUID": "30373237-3132-4753-4834-3439574E4C33", "links": { "Chassis": [ { "href": "/rest/v1/Chassis/1" } ], "Logs": { "href": "/rest/v1/Systems/1/Logs" }, "ManagedBy": [ { "href": "/rest/v1/Managers/1" } ], "self": { "href": "/rest/v1/Systems/1" } } } """ SYSTEM_WITH_CDROM_CONT = """ { "AssetTag": "", "AvailableActions": [ { "Action": "Reset", "Capabilities": [ { "AllowableValues": [ "On", "ForceOff", "ForceRestart", "Nmi", "PushPowerButton" ], "PropertyName": "ResetType" } ] } ], "Bios": { "Current": { "VersionString": "I36 v1.40 (01/28/2015)" } }, "Boot": { "BootSourceOverrideEnabled": "Continuous", "BootSourceOverrideSupported": [ "None", "Cd", "Hdd", "Usb", "Utilities", "Diags", "BiosSetup", "Pxe", "UefiShell", "UefiTarget" ], "BootSourceOverrideTarget": "Cd", "UefiTargetBootSourceOverride": "None", "UefiTargetBootSourceOverrideSupported": [ "HD.Emb.1.2", "Generic.USB.1.1", "NIC.FlexLOM.1.1.IPv4", "NIC.FlexLOM.1.1.IPv6", "CD.Virtual.2.1" ] }, "Description": "Computer System View", "HostCorrelation": { "HostMACAddress": [ "6c:c2:17:39:fe:80", "6c:c2:17:39:fe:88" ], "HostName": "", "IPAddress": [ "", "" ] }, "IndicatorLED": "Off", "Manufacturer": "HP", "Memory": { "TotalSystemMemoryGB": 16 }, "Model": "ProLiant BL460c Gen9", "Name": "Computer System", "Oem": { "Hp": { "AvailableActions": [ { "Action": "PowerButton", "Capabilities": [ { "AllowableValues": [ "Press", "PressAndHold" ], "PropertyName": "PushType" }, { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] }, { "Action": "SystemReset", "Capabilities": [ { "AllowableValues": [ "ColdBoot" ], "PropertyName": "ResetType" }, { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] } ], "Battery": [], "Bios": { "Backup": { "Date": "v1.40 (01/28/2015)", "Family": "I36", "VersionString": "I36 v1.40 (01/28/2015)" }, "Current": { "Date": "01/28/2015", "Family": "I36", "VersionString": "I36 v1.40 (01/28/2015)" }, "UefiClass": 2 }, "DeviceDiscoveryComplete": { "AMSDeviceDiscovery": "NoAMS", "SmartArrayDiscovery": "Initial", "vAuxDeviceDiscovery": "DataIncomplete", "vMainDeviceDiscovery": "ServerOff" }, "PostState": "PowerOff", "PowerAllocationLimit": 500, "PowerAutoOn": "PowerOn", "PowerOnDelay": "Minimum", "PowerRegulatorMode": "Dynamic", "PowerRegulatorModesSupported": [ "OSControl", "Dynamic", "Max", "Min" ], "ServerSignature": 0, "Type": "HpComputerSystemExt.0.10.1", "VirtualProfile": "Inactive", "VirtualUUID": null, "links": { "BIOS": { "href": "/rest/v1/systems/1/bios" }, "MEMORY": { "href": "/rest/v1/Systems/1/Memory" }, "PCIDevices": { "href": "/rest/v1/Systems/1/PCIDevices" }, "PCISlots": { "href": "/rest/v1/Systems/1/PCISlots" }, "SecureBoot": { "href": "/rest/v1/Systems/1/SecureBoot" } } } }, "Power": "Off", "Processors": { "Count": 1, "ProcessorFamily": "Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz", "Status": { "HealthRollUp": "OK" } }, "SKU": "727021-B21", "SerialNumber": "SGH449WNL3", "Status": { "Health": "OK", "State": "Disabled" }, "SystemType": "Physical", "Type": "ComputerSystem.0.9.6", "UUID": "30373237-3132-4753-4834-3439574E4C33", "links": { "Chassis": [ { "href": "/rest/v1/Chassis/1" } ], "Logs": { "href": "/rest/v1/Systems/1/Logs" }, "ManagedBy": [ { "href": "/rest/v1/Managers/1" } ], "self": { "href": "/rest/v1/Systems/1" } } } """ SYSTEM_WITH_UEFISHELL_CONT = """ { "AssetTag": "", "AvailableActions": [ { "Action": "Reset", "Capabilities": [ { "AllowableValues": [ "On", "ForceOff", "ForceRestart", "Nmi", "PushPowerButton" ], "PropertyName": "ResetType" } ] } ], "Bios": { "Current": { "VersionString": "I36 v1.40 (01/28/2015)" } }, "Boot": { "BootSourceOverrideEnabled": "Continuous", "BootSourceOverrideSupported": [ "None", "Cd", "Hdd", "Usb", "Utilities", "Diags", "BiosSetup", "Pxe", "UefiShell", "UefiTarget" ], "BootSourceOverrideTarget": "UefiShell", "UefiTargetBootSourceOverride": "None", "UefiTargetBootSourceOverrideSupported": [ "HD.Emb.1.2", "Generic.USB.1.1", "NIC.FlexLOM.1.1.IPv4", "NIC.FlexLOM.1.1.IPv6", "CD.Virtual.2.1" ] }, "Description": "Computer System View", "HostCorrelation": { "HostMACAddress": [ "6c:c2:17:39:fe:80", "6c:c2:17:39:fe:88" ], "HostName": "", "IPAddress": [ "", "" ] }, "IndicatorLED": "Off", "Manufacturer": "HP", "Memory": { "TotalSystemMemoryGB": 16 }, "Model": "ProLiant BL460c Gen9", "Name": "Computer System", "Oem": { "Hp": { "AvailableActions": [ { "Action": "PowerButton", "Capabilities": [ { "AllowableValues": [ "Press", "PressAndHold" ], "PropertyName": "PushType" }, { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] }, { "Action": "SystemReset", "Capabilities": [ { "AllowableValues": [ "ColdBoot" ], "PropertyName": "ResetType" }, { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] } ], "Battery": [], "Bios": { "Backup": { "Date": "v1.40 (01/28/2015)", "Family": "I36", "VersionString": "I36 v1.40 (01/28/2015)" }, "Current": { "Date": "01/28/2015", "Family": "I36", "VersionString": "I36 v1.40 (01/28/2015)" }, "UefiClass": 2 }, "DeviceDiscoveryComplete": { "AMSDeviceDiscovery": "NoAMS", "SmartArrayDiscovery": "Initial", "vAuxDeviceDiscovery": "DataIncomplete", "vMainDeviceDiscovery": "ServerOff" }, "PostState": "PowerOff", "PowerAllocationLimit": 500, "PowerAutoOn": "PowerOn", "PowerOnDelay": "Minimum", "PowerRegulatorMode": "Dynamic", "PowerRegulatorModesSupported": [ "OSControl", "Dynamic", "Max", "Min" ], "ServerSignature": 0, "Type": "HpComputerSystemExt.0.10.1", "VirtualProfile": "Inactive", "VirtualUUID": null, "links": { "BIOS": { "href": "/rest/v1/systems/1/bios" }, "MEMORY": { "href": "/rest/v1/Systems/1/Memory" }, "PCIDevices": { "href": "/rest/v1/Systems/1/PCIDevices" }, "PCISlots": { "href": "/rest/v1/Systems/1/PCISlots" }, "SecureBoot": { "href": "/rest/v1/Systems/1/SecureBoot" } } } }, "Power": "Off", "Processors": { "Count": 1, "ProcessorFamily": "Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz", "Status": { "HealthRollUp": "OK" } }, "SKU": "727021-B21", "SerialNumber": "SGH449WNL3", "Status": { "Health": "OK", "State": "Disabled" }, "SystemType": "Physical", "Type": "ComputerSystem.0.9.6", "UUID": "30373237-3132-4753-4834-3439574E4C33", "links": { "Chassis": [ { "href": "/rest/v1/Chassis/1" } ], "Logs": { "href": "/rest/v1/Systems/1/Logs" }, "ManagedBy": [ { "href": "/rest/v1/Managers/1" } ], "self": { "href": "/rest/v1/Systems/1" } } } """ UEFI_BOOT_DEVICE_ORDER_PXE = ['NIC.LOM.1.1.IPv4', 'NIC.LOM.1.1.IPv6', 'HD.Slot.1.2', 'Generic.USB.1.1', 'CD.Virtual.2.1', 'FD.Virtual.1.1'] UEFI_BOOT_DEVICE_ORDER_HDD = ['HD.Slot.1.2', 'NIC.LOM.1.1.IPv4', 'NIC.LOM.1.1.IPv6', 'Generic.USB.1.1', 'CD.Virtual.2.1', 'FD.Virtual.1.1'] UEFI_BOOT_DEVICE_ORDER_CD = ['CD.Virtual.2.1', 'NIC.LOM.1.1.IPv4', 'NIC.LOM.1.1.IPv6', 'Generic.USB.1.1', 'HD.Slot.1.2', 'FD.Virtual.1.1'] UEFI_BOOT_DEVICE_ORDER_ERR = ['FAKE.Virtual.2.1', 'CD.Virtual.2.1', 'NIC.LOM.1.1.IPv4', 'NIC.LOM.1.1.IPv6', 'Generic.USB.1.1', 'HD.Slot.1.2', 'FD.Virtual.1.1'] UEFI_BOOT_SOURCES_ERR = ''' [ { "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)/MAC \ (3863BB43683C,0x0)/IPv4(0.0.0.0)", "BootString": "Embedded LOM 1 Port 1 : HP Ethernet 1Gb 4-port \ 331i Adapter - NIC (PXE IPv4) ", "StructuredBootString": "NIC.LOM.1.1.IPv4", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)" }, { "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)/MAC\ (3863BB43683C,0x0)/IPv6(0000:0000:0000:0000:\ 0000:0000:0000:0000)", "BootString": "Embedded LOM 1 Port 1 : HP Ethernet 1Gb 4-port \ 331i Adapter - NIC (PXE IPv6) ", "StructuredBootString": "NIC.LOM.1.1.IPv6", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)" }, { "UEFIDevicePath": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/Scsi\ (0x0,0x0)", "StructuredBootString": "HD.Slot.1.2", "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)" }, { "UEFIDevicePath": "UsbClass(0xFFFF,0xFFFF,0xFF,0xFF,0xFF)", "BootString": "Generic USB Boot", "StructuredBootString": "Generic.USB.1.1", "CorrelatableID": "UsbClass(0xFFFF,0xFFFF,0xFF,0xFF,0xFF)" }, { "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1D,0x0)/USB(0x0,0x0)\ /USB(0x0,0x0)", "BootString": "iLO Virtual USB 2 : HP iLO Virtual USB CD/DVD ROM", "StructuredBootString": "CD.Virtual.2.1", "CorrelatableID": "PciRoot(0x0)/Pci(0x1D,0x0)/USB(0x0,0x0)/USB\ (0x0,0x0)" }, { "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x2)/Pci(0x0,0x4)/USB\ (0x1,0x0)", "BootString": "iLO Virtual USB 1 : HP iLO Virtual USB Key", "StructuredBootString": "FD.Virtual.1.1", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x2)/Pci(0x0,0x4)/USB(0x1,\ 0x0)" } ] ''' UEFI_PERS_BOOT_DEVICES = ["HD.Slot.1.1", "HD.Slot.1.2", "NIC.LOM.1.1.iSCSI", "NIC.LOM.1.1.IPv4", "NIC.LOM.1.1.IPv6", "Generic.USB.1.1", "CD.Virtual.2.1" ] BOOT_PERS_DEV_ORDER_MISSING = """ { "AttributeRegistry": "HpBiosAttributeRegistryP89.1.1.00", "BootSources": [ { "BootString": "Slot 1 : Smart Array P840 Controller - 279.37 GiB,\ RAID 0 Logical Drive(Target:0, Lun:0)", "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)", "StructuredBootString": "HD.Slot.1.1", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/Scsi\ (0x0,0x0)" }, { "BootString": "Slot 1 : Smart Array P840 Controller - 279.37 GiB,\ RAID 0 Logical Drive(Target:0, Lun:1)", "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)", "StructuredBootString": "HD.Slot.1.2", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/Scsi\ (0x0,0x1)" }, { "BootString": "Embedded LOM 1 Port 1 : HP Ethernet 1Gb 4-port\ 331i Adapter - NIC (PXE IPv4) ", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)", "StructuredBootString": "NIC.LOM.1.1.IPv4", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)/MAC\ (C4346BB7EF30,0x0)/IPv4(0.0.0.0)" }, { "BootString": "Embedded LOM 1 Port 1 : HP Ethernet 1Gb 4-port\ 331i Adapter - NIC (PXE IPv6) ", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)", "StructuredBootString": "NIC.LOM.1.1.IPv6", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)/MAC\ (C4346BB7EF30,0x0)/IPv6(0000:0000:0000:0000:0000:0000:0000:0000)" }, { "BootString": "Generic USB Boot", "CorrelatableID": "UsbClass(0xFFFF,0xFFFF,0xFF,0xFF,0xFF)", "StructuredBootString": "Generic.USB.1.1", "UEFIDevicePath": "UsbClass(0xFFFF,0xFFFF,0xFF,0xFF,0xFF)" }, { "BootString": "iLO Virtual USB 2 : HP iLO Virtual USB CD/DVD ROM", "CorrelatableID": "PciRoot(0x0)/Pci(0x1D,0x0)/USB(0x0,0x0)/USB\ (0x0,0x0)", "StructuredBootString": "CD.Virtual.2.1", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1D,0x0)/USB(0x0,0x0)/USB\ (0x0,0x0)" } ], "DefaultBootOrder": [ "Floppy", "Cd", "Usb", "EmbeddedStorage", "PcieSlotStorage", "EmbeddedFlexLOM", "PcieSlotNic", "UefiShell" ], "Description": "This is the Server Boot Order Current Settings", "DesiredBootDevices": [ { "CorrelatableID": "", "Lun": "", "Wwn": "", "iScsiTargetName": "" }, { "CorrelatableID": "", "Lun": "", "Wwn": "", "iScsiTargetName": "" } ], "Modified": "2015-05-26T23:38:24+00:00", "Name": "Boot Order Current Settings", "SettingsResult": { "ETag": "0DEA61A1609C51EED0628E3B0BC633DD", "Messages": [ { "MessageArgs": [ "PersistentBootConfigOrder[0" ], "MessageID": "Base.1.0:PropertyValueNotInList" }, { "MessageArgs": [], "MessageID": "Base.1.0:Success" } ], "Time": "2015-05-14T02:38:40+00:00" }, "Type": "HpServerBootSettings.1.2.0", "links": { "BaseConfigs": { "href": "/rest/v1/systems/1/bios/Boot/BaseConfigs" }, "Settings": { "href": "/rest/v1/systems/1/bios/Boot/Settings" }, "self": { "href": "/rest/v1/systems/1/bios/Boot" } } } """ UEFI_BootSources = ''' [ { "BootString": "Slot 1 : Smart Array P840 Controller - 279.37 GiB,\ RAID 0 Logical Drive(Target:0, Lun:0)", "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)", "StructuredBootString": "HD.Slot.1.1", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/Scsi\ (0x0,0x0)" }, { "BootString": "Slot 1 : Smart Array P840 Controller - 279.37 GiB,\ RAID 0 Logical Drive(Target:0, Lun:1)", "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)", "StructuredBootString": "HD.Slot.1.2", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/Scsi\ (0x0,0x1)" }, { "BootString": "Embedded LOM 1 Port 1 : HP Ethernet 1Gb 4-port\ 331i Adapter - NIC (PXE IPv4) ", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)", "StructuredBootString": "NIC.LOM.1.1.IPv4", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)/MAC\ (C4346BB7EF30,0x0)/IPv4(0.0.0.0)" }, { "BootString": "Embedded LOM 1 Port 1 : HP Ethernet 1Gb 2-port\ 361i Adapter - NIC (iSCSI IPv4) ", "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x3)/Pci(0x0,0x0)", "StructuredBootString": "NIC.LOM.1.1.iSCSI", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x2,0x3)/Pci(0x0,0x0)/MAC\ (C4346BB7EF30,0x1)/IPv4(0.0.0.0)/iSCSI(iqn.2016-07.org.de\ :storage,0x1,0x0,None,None,None,TCP)" }, { "BootString": "Embedded LOM 1 Port 1 : HP Ethernet 1Gb 4-port\ 331i Adapter - NIC (PXE IPv6) ", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)", "StructuredBootString": "NIC.LOM.1.1.IPv6", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)/MAC\ (C4346BB7EF30,0x0)/IPv6(0000:0000:0000:0000:0000:0000:0000:0000)" }, { "BootString": "Generic USB Boot", "CorrelatableID": "UsbClass(0xFFFF,0xFFFF,0xFF,0xFF,0xFF)", "StructuredBootString": "Generic.USB.1.1", "UEFIDevicePath": "UsbClass(0xFFFF,0xFFFF,0xFF,0xFF,0xFF)" }, { "BootString": "iLO Virtual USB 2 : HP iLO Virtual USB CD/DVD ROM", "CorrelatableID": "PciRoot(0x0)/Pci(0x1D,0x0)/USB(0x0,0x0)/USB\ (0x0,0x0)", "StructuredBootString": "CD.Virtual.2.1", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1D,0x0)/USB(0x0,0x0)/USB\ (0x0,0x0)" } ] ''' UEFI_BOOTSOURCES_MISSING = """ { "AttributeRegistry": "HpBiosAttributeRegistryP89.1.1.00", "DefaultBootOrder": [ "Floppy", "Cd", "Usb", "EmbeddedStorage", "PcieSlotStorage", "EmbeddedFlexLOM", "PcieSlotNic", "UefiShell" ], "Description": "This is the Server Boot Order Current Settings", "DesiredBootDevices": [ { "CorrelatableID": "", "Lun": "", "Wwn": "", "iScsiTargetName": "" }, { "CorrelatableID": "", "Lun": "", "Wwn": "", "iScsiTargetName": "" } ], "Modified": "2015-05-26T23:38:24+00:00", "Name": "Boot Order Current Settings", "PersistentBootConfigOrder": [ "HD.Slot.1.1", "HD.Slot.1.2", "NIC.LOM.1.1.IPv4", "NIC.LOM.1.1.IPv6", "Generic.USB.1.1", "CD.Virtual.2.1" ], "SettingsResult": { "ETag": "0DEA61A1609C51EED0628E3B0BC633DD", "Messages": [ { "MessageArgs": [ "PersistentBootConfigOrder[0" ], "MessageID": "Base.1.0:PropertyValueNotInList" }, { "MessageArgs": [], "MessageID": "Base.1.0:Success" } ], "Time": "2015-05-14T02:38:40+00:00" }, "Type": "HpServerBootSettings.1.2.0", "links": { "BaseConfigs": { "href": "/rest/v1/systems/1/bios/Boot/BaseConfigs" }, "Settings": { "href": "/rest/v1/systems/1/bios/Boot/Settings" }, "self": { "href": "/rest/v1/systems/1/bios/Boot" } } } """ PCI_DEVICE_DETAILS_NO_GPU = """ { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/PCIDevices", "@odata.id": "/redfish/v1/Systems/1/PCIDevices/", "@odata.type": "#HpServerPciDeviceCollection.HpServerPciDeviceCollection", "Description": " PciDevices view", "Items": [ { "@odata.context": "/redfish/v1/$metadata#Systems/Members/\ 1/PCIDevices/Members/$entity", "@odata.id": "/redfish/v1/Systems/1/PCIDevices/6/", "@odata.type": "#HpServerPciDevice.1.0.0.HpServerPciDevice", "BusNumber": 132, "ClassCode": 6, "DeviceID": 34631, "DeviceInstance": 2, "DeviceLocation": "PCI Slot", "DeviceNumber": 0, "DeviceSubInstance": 1, "DeviceType": "Other PCI Device", "FunctionNumber": 0, "Id": "6", "Name": "PCIe Controller", "SegmentNumber": 0, "StructuredName": "PCI.Slot.2.1", "SubclassCode": 4, "SubsystemDeviceID": 34631, "SubsystemVendorID": 4277, "Type": "HpServerPciDevice.1.0.0", "UEFIDevicePath": "PciRoot(0x1)/Pci(0x3,0x0)/Pci(0x0,0x0)", "VendorID": 4277, "links": { "self": { "href": "/rest/v1/Systems/1/PCIDevices/6" } } } ] } """ PCI_GPU_LIST = """ [ { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1\ /PCIDevices/Members/$entity", "@odata.id": "/redfish/v1/Systems/1/PCIDevices/6/", "@odata.type": "#HpServerPciDevice.1.0.0.HpServerPciDevice", "BusNumber": 5, "ClassCode": 3, "DeviceID": 26528, "DeviceInstance": 3, "DeviceLocation": "PCI Slot", "DeviceNumber": 0, "DeviceSubInstance": 1, "DeviceType": "Other PCI Device", "FunctionNumber": 0, "Id": "6", "Name": "HAWAII XTGL", "SegmentNumber": 0, "StructuredName": "PCI.Slot.3.1", "SubclassCode": 128, "SubsystemDeviceID": 821, "SubsystemVendorID": 4098, "Type": "HpServerPciDevice.1.0.0", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/\ Pci(0x8,0x0)/Pci(0x0,0x0)", "VendorID": 4098, "links": { "self": { "href": "/rest/v1/Systems/1/PCIDevices/6" } } } ] """ PCI_DEVICE_DETAILS = """ { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/PCIDevices", "@odata.id": "/redfish/v1/Systems/1/PCIDevices/", "@odata.type": "#HpServerPciDeviceCollection.HpServerPciDeviceCollection", "Description": " PciDevices view", "Items": [ { "@odata.context": "/redfish/v1/$metadata#Systems/Members/\ 1/PCIDevices/Members/$entity", "@odata.id": "/redfish/v1/Systems/1/PCIDevices/6/", "@odata.type": "#HpServerPciDevice.1.0.0.HpServerPciDevice", "BusNumber": 132, "ClassCode": 6, "DeviceID": 34631, "DeviceInstance": 2, "DeviceLocation": "PCI Slot", "DeviceNumber": 0, "DeviceSubInstance": 1, "DeviceType": "Other PCI Device", "FunctionNumber": 0, "Id": "6", "Name": "PCIe Controller", "SegmentNumber": 0, "StructuredName": "PCI.Slot.2.1", "SubclassCode": 4, "SubsystemDeviceID": 34631, "SubsystemVendorID": 4277, "Type": "HpServerPciDevice.1.0.0", "UEFIDevicePath": "PciRoot(0x1)/Pci(0x3,0x0)/Pci(0x0,0x0)", "VendorID": 4277, "links": { "self": { "href": "/rest/v1/Systems/1/PCIDevices/6" } } }, { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1\ /PCIDevices/Members/$entity", "@odata.id": "/redfish/v1/Systems/1/PCIDevices/6/", "@odata.type": "#HpServerPciDevice.1.0.0.HpServerPciDevice", "BusNumber": 5, "ClassCode": 3, "DeviceID": 26528, "DeviceInstance": 3, "DeviceLocation": "PCI Slot", "DeviceNumber": 0, "DeviceSubInstance": 1, "DeviceType": "Other PCI Device", "FunctionNumber": 0, "Id": "6", "Name": "HAWAII XTGL", "SegmentNumber": 0, "StructuredName": "PCI.Slot.3.1", "SubclassCode": 128, "SubsystemDeviceID": 821, "SubsystemVendorID": 4098, "Type": "HpServerPciDevice.1.0.0", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/\ Pci(0x8,0x0)/Pci(0x0,0x0)", "VendorID": 4098, "links": { "self": { "href": "/rest/v1/Systems/1/PCIDevices/6" } } } ] } """ STORAGE_SETTINGS = """ { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1\ /SmartStorage$entity", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/", "@odata.type": "#HpSmartStorage.HpSmartStorage", "Description": "HP Smart Storage", "Id": "1", "Links": { "ArrayControllers": { "@odata.id": "/redfish/v1/Systems/1\ /SmartStorage/ArrayControllers/" }, "HostBusAdapters": { "@odata.id": "/redfish/v1/Systems/1/SmartStorage\ /HostBusAdapters/" } }, "Name": "HpSmartStorage", "Status": { "Health": "OK" }, "Type": "HpSmartStorage.1.0.0", "links": { "ArrayControllers": { "href": "/rest/v1/Systems/1/SmartStorage\ /ArrayControllers" }, "HostBusAdapters": { "href": "/rest/v1/Systems/1/SmartStorage\ /HostBusAdapters" }, "self": { "href": "/rest/v1/Systems/1/SmartStorage" } } } """ ARRAY_SETTINGS = """ { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1\ /SmartStorage/ArrayControllers", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/", "@odata.type": "#HpSmartStorageArrayControllerCollection.\ 1.0.0.HpSmartStorageArrayControllerCollection", "Description": "HP Smart Storage Array Controllers View", "MemberType": "HpSmartStorageArrayController.1", "Members": [{ "@odata.id": "/redfish/v1/Systems/1/SmartStorage\ /ArrayControllers/0/" }], "Members@odata.count": 1, "Name": "HpSmartStorageArrayControllers", "Total": 1, "Type": "Collection.0.9.5", "links": { "Member": [{ "href": "/rest/v1/Systems/1/SmartStorage/ArrayControllers/0" }], "self": { "href": "/rest/v1/Systems/1/SmartStorage/\ ArrayControllers" } } } """ ARRAY_MEM_SETTINGS = """ { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1\ /SmartStorage/ArrayControllers/Members/$entity", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/", "@odata.type": "#HpSmartStorageArrayController.\ HpSmartStorageArrayController", "AdapterType": "SmartArray", "BackupPowerSourceStatus": "Present", "CacheMemorySizeMiB": 1024, "CurrentOperatingMode": "RAID", "Description": "HP Smart Storage Array Controller View", "FirmwareVersion": { "Current": { "VersionString": "2.49" } }, "HardwareRevision": "B", "Id": "0", "Links": { "LogicalDrives": { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/\ ArrayControllers/0/LogicalDrives/" }, "PhysicalDrives": { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/\ ArrayControllers/0/DiskDrives/" }, "StorageEnclosures": { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/\ ArrayControllers/0/StorageEnclosures/" } }, "Location": "Slot 0", "LocationFormat": "PCISlot", "Model": "HP Smart Array P244br Controller", "Name": "HpSmartStorageArrayController", "SerialNumber": "PDZVU0FLM7I03I", "Status": { "Health": "OK", "State": "Enabled" }, "Type": "HpSmartStorageArrayController.1.0.0", "links": { "LogicalDrives": { "href": "/rest/v1/Systems/1/SmartStorage/ArrayControllers\ /0/LogicalDrives" }, "PhysicalDrives": { "href": "/rest/v1/Systems/1/SmartStorage/ArrayControllers/\ 0/DiskDrives" }, "StorageEnclosures": { "href": "/rest/v1/Systems/1/SmartStorage/ArrayControllers/\ 0/StorageEnclosures" }, "self": { "href": "/rest/v1/Systems/1/SmartStorage/ArrayControllers/0" } } } """ DISK_COLLECTION = """ { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1\ /SmartStorage/ArrayControllers/Members/2/DiskDrives", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers\ /2/DiskDrives/", "@odata.type": "\ #HpSmartStorageDiskDriveCollection.HpSmartStorageDiskDriveCollection", "Description": "HP Smart Storage Disk Drives View", "MemberType": "HpSmartStorageDiskDrive.1", "Members": [{ "@odata.id": "/redfish/v1/Systems/1/SmartStorage/\ ArrayControllers/0/DiskDrives/0/" }], "Members@odata.count": 1, "Name": "HpSmartStorageDiskDrives", "Total": 1, "Type": "Collection.1.0.0", "links": { "Member": [{ "href": "/rest/v1/Systems/1/SmartStorage/\ ArrayControllers/0/DiskDrives/0" }], "self": { "href": "/rest/v1/Systems/1/SmartStorage/\ ArrayControllers/0/DiskDrives" } } } """ DISK_COLLECTION_NO_DISK = """ { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1\ /SmartStorage/ArrayControllers/Members/2/DiskDrives", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers\ /2/DiskDrives/", "@odata.type": "\ #HpSmartStorageDiskDriveCollection.HpSmartStorageDiskDriveCollection", "Description": "HP Smart Storage Disk Drives View", "MemberType": "HpSmartStorageDiskDrive.1", "Members@odata.count": 0, "Name": "HpSmartStorageDiskDrives", "Total": 0, "Type": "Collection.1.0.0", "links": { "self": { "href": "/rest/v1/Systems/1/SmartStorage/ArrayControllers/0\ /DiskDrives" } } } """ DISK_DETAILS_LIST = """ [{ "@odata.context": "/redfish/v1/$metadata#Systems/Members/1\ /SmartStorage/ArrayControllers/Members/0/DiskDrives/Members/$entity", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers\ /0/DiskDrives/0/", "@odata.type": "#HpSmartStorageDiskDrive.HpSmartStorageDiskDrive", "CapacityMiB": 572325, "CurrentTemperatureCelsius": 25, "Description": "HP Smart Storage Disk Drive View", "EncryptedDrive": "False", "FirmwareVersion": { "Current": { "VersionString": "HPDC" } }, "Id": "0", "InterfaceType": "SAS", "Location": "1I:1:1", "LocationFormat": "ControllerPort:Box:Bay", "MaximumTemperatureCelsius": 34, "MediaType": "HDD", "Model": "EG0600FBVFP", "Name": "HpSmartStorageDiskDrive", "RotationalSpeedRpm": 10000, "SerialNumber": "KWK1JS2X", "Status": { "Health": "OK", "State": "Enabled" }, "Type": "HpSmartStorageDiskDrive.1.0.0", "links": { "self": { "href": "/rest/v1/Systems/1/SmartStorage/ArrayControllers\ /0/DiskDrives/0" } } }] """ LOGICAL_COLLECTION = """ { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/SmartStorage/\ ArrayControllers/Members/0/LogicalDrives", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/\ 0/LogicalDrives/", "@odata.type": "\ #HpSmartStorageLogicalDriveCollection.HpSmartStorageLogicalDriveCollection", "Description": "HP Smart Storage Logical Drives View", "MemberType": "HpSmartStorageLogicalDrive.1", "Members": [{ "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers\ /0/LogicalDrives/0/" }], "Members@odata.count": 1, "Name": "HpSmartStorageLogicalDrives", "Total": 1, "Type": "Collection.1.0.0", "links": { "Member": [{ "href": "/rest/v1/Systems/1/SmartStorage/ArrayControllers/\ 0/LogicalDrives/1" }], "self": { "href": "/rest/v1/Systems/1/SmartStorage/ArrayControllers/0\ /LogicalDrives" } } } """ LOGICAL_COLLECTION_NO_DRIVE = """ { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/SmartStorage/\ ArrayControllers/Members/0/LogicalDrives", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/\ 0/LogicalDrives/", "@odata.type": "\ #HpSmartStorageLogicalDriveCollection.HpSmartStorageLogicalDriveCollection", "Description": "HP Smart Storage Logical Drives View", "MemberType": "HpSmartStorageLogicalDrive.1", "Members@odata.count": 0, "Name": "HpSmartStorageLogicalDrives", "Total": 0, "Type": "Collection.1.0.0", "links": { "self": { "href": "/rest/v1/Systems/1/SmartStorage/ArrayControllers/0\ /LogicalDrives" } } } """ LOGICAL_DETAILS = """ [{ "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/SmartStorage/\ ArrayControllers/Members/0/LogicalDrives/Members/$entity", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/\ LogicalDrives/1/", "@odata.type": "\ #HpSmartStorageLogicalDrive.1.1.0.HpSmartStorageLogicalDrive", "CapacityMiB": 286070, "Description": "HP Smart Storage Logical Drive View", "Id": "1", "LogicalDriveEncryption": false, "LogicalDriveName": "01908CF2PDNMF0ARH6X0FN6FE9", "LogicalDriveNumber": 1, "LogicalDriveType": "Data", "Name": "HpSmartStorageLogicalDrive", "Raid": "0", "Status": { "Health": "OK", "State": "Enabled" }, "StripeSizeBytes": 262144, "Type": "HpSmartStorageLogicalDrive.1.1.0", "VolumeUniqueIdentifier": "600508B1001CC8A5FF549462C7B8412A", "links": { "DataDrives": { "href": "/rest/v1/Systems/1/SmartStorage/ArrayControllers/0/\ LogicalDrives/1/DataDrives" }, "self": { "href": "/rest/v1/Systems/1/SmartStorage/ArrayControllers/0/\ LogicalDrives/1" } } }] """ ARRAY_SETTING_NO_CONTROLLER = """ { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1\ /SmartStorage/ArrayControllers", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/", "@odata.type": "#HpSmartStorageArrayControllerCollection.\ 1.0.0.HpSmartStorageArrayControllerCollection", "Description": "HP Smart Storage Array Controllers View", "MemberType": "HpSmartStorageArrayController.1", "Members@odata.count": 0, "Name": "HpSmartStorageArrayControllers", "Total": 0, "Type": "Collection.0.9.5", "links": { "self": { "href": "/rest/v1/Systems/1/SmartStorage/\ ArrayControllers" } } } """ ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2506647 proliantutils-2.16.0/proliantutils/tests/ilo/snmp/0000775000175000017500000000000000000000000022347 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ilo/snmp/__init__.py0000664000175000017500000000000000000000000024446 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ilo/snmp/snmp_sample_output.py0000664000175000017500000000425100000000000026661 0ustar00zuulzuul00000000000000#!/usr/bin/python # Copyright 2017 Hewlett-Packard Enterprise Development Company, L.P. # All Rights Reserved. # # 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. def Integer(value): return value def ObjectName(value): return (value,) PHY_DRIVE_MIB_OUTPUT = { 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.1.2.0': { 'cpqDaPhyDrvCntlrIndex': {ObjectName('2.0'): Integer(2)}}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.1.2.1': { 'cpqDaPhyDrvCntlrIndex': {ObjectName('2.1'): Integer(2)}}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.1.2.2': { 'cpqDaPhyDrvCntlrIndex': {ObjectName('2.2'): Integer(2)}}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.1.2.3': { 'cpqDaPhyDrvCntlrIndex': {ObjectName('2.3'): Integer(2)}}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.2.2.0': { 'cpqDaPhyDrvIndex': {ObjectName('2.0'): Integer(0)}}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.2.2.1': { 'cpqDaPhyDrvIndex': {ObjectName('2.1'): Integer(1)}}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.2.2.2': { 'cpqDaPhyDrvIndex': {ObjectName('2.2'): Integer(2)}}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.2.2.3': { 'cpqDaPhyDrvIndex': {ObjectName('2.3'): Integer(3)}}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.45.2.0': { 'cpqDaPhyDrvSize': {ObjectName('2.0'): Integer(286102)}}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.45.2.1': { 'cpqDaPhyDrvSize': {ObjectName('2.1'): Integer(286102)}}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.45.2.2': { 'cpqDaPhyDrvSize': {ObjectName('2.2'): Integer(286102)}}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.45.2.3': { 'cpqDaPhyDrvSize': {ObjectName('2.3'): Integer(286102)}} } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ilo/snmp/test_snmp_cpqdisk_sizes.py0000664000175000017500000000625000000000000027673 0ustar00zuulzuul00000000000000#!/usr/bin/env python # Copyright 2017 Hewlett-Packard Enterprise 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 unittest from unittest import mock from proliantutils.ilo.snmp import snmp_cpqdisk_sizes as snmp from proliantutils.tests.ilo.snmp import snmp_sample_output class SnmpTestCase(unittest.TestCase): def setUp(self): super(SnmpTestCase, self).setUp() @mock.patch.object(snmp, '_get_disksize_MiB') def test_get_local_gb(self, get_disk_mock): iLOIp = 'a.b.c.d' snmp_credentials = {'auth_user': 'user', 'auth_prot_pp': '1234', 'auth_priv_pp': '4321', 'auth_protocol': 'SHA', 'priv_protocol': 'AES', 'snmp_inspection': 'true'} disk_snmp_data = {'SNMPv2-SMI::enterprises.232.3.2.5.1.1.45.2.0': {'cpqDaPhyDrvSize': '286102'}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.45.2.1': {'cpqDaPhyDrvSize': '286102'}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.45.2.2': {'cpqDaPhyDrvSize': '572316'}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.45.2.3': {'cpqDaPhyDrvSize': '286102'}} get_disk_mock.return_value = disk_snmp_data actual_size = snmp.get_local_gb(iLOIp, snmp_credentials) expected_size = (572316 / 1024) self.assertEqual(actual_size, expected_size) get_disk_mock.assert_called_once_with(iLOIp, snmp_credentials) @mock.patch.object(snmp, '_parse_mibs') def test__get_disksize_MiB(self, mib_mock): iLOIP = 'a.b.c.d' snmp_credentials = {'auth_user': 'user', 'auth_prot_pp': '1234', 'auth_priv_pp': '4321', 'auth_protocol': 'SHA', 'priv_protocol': 'AES', 'snmp_inspection': 'true'} mib_mock.return_value = snmp_sample_output.PHY_DRIVE_MIB_OUTPUT actual = snmp._get_disksize_MiB(iLOIP, snmp_credentials) expected = {'SNMPv2-SMI::enterprises.232.3.2.5.1.1.45.2.0': {'cpqDaPhyDrvSize': '286102'}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.45.2.1': {'cpqDaPhyDrvSize': '286102'}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.45.2.2': {'cpqDaPhyDrvSize': '286102'}, 'SNMPv2-SMI::enterprises.232.3.2.5.1.1.45.2.3': {'cpqDaPhyDrvSize': '286102'}} self.assertEqual(expected, actual) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ilo/test_client.py0000664000175000017500000020751300000000000024271 0ustar00zuulzuul00000000000000# Copyright 2022 Hewlett Packard Enterprise Development LP # Copyright 2015 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test class for Client Module.""" from unittest import mock import testtools from proliantutils import exception from proliantutils.ilo import client from proliantutils.ilo import ipmi from proliantutils.ilo import ribcl from proliantutils.ilo import ris from proliantutils.ilo.snmp import snmp_cpqdisk_sizes from proliantutils.redfish import redfish def get_cls_wrapper(cls, cache=True): original_cls = cls cls = client.cache_node(cache)(cls) return (original_cls, cls) class IloCacheNodeTestCase(testtools.TestCase): def test_cache_node_cache_true(self): class Dummyclass1(object): pass original_cls, decorated_cls = get_cls_wrapper(Dummyclass1) self.assertNotEqual(id(original_cls), id(decorated_cls)) def test_cache_node_cache_false(self): class Dummyclass2(object): pass original_cls, decorated_cls = get_cls_wrapper(Dummyclass2, cache=False) self.assertEqual(id(original_cls), id(decorated_cls)) class IloClientWrapperTestCase(testtools.TestCase): class DummyClass(object): def __init__(self, ip, name, password): self._ip = ip self._name = name self._password = password original_cls, decorated_cls = get_cls_wrapper(DummyClass) wrapper_cls = decorated_cls.__class__ @mock.patch.object(wrapper_cls, '_create_instance') @mock.patch.object(wrapper_cls, '_if_not_exists') def test___call___already_created(self, exists_mock, create_mock): exists_mock.return_value = True try: wrapper_obj = IloClientWrapperTestCase.wrapper_cls( IloClientWrapperTestCase.original_cls) wrapper_obj('a.b.c.d', 'abcd', 'deaf') except KeyError: pass exists_mock.assert_called_once_with(('a.b.c.d', 'abcd', 'deaf')) create_mock.assert_called_once_with('a.b.c.d', 'abcd', 'deaf') @mock.patch.object(wrapper_cls, '_create_instance') @mock.patch.object(wrapper_cls, '_if_not_exists') def test___call___new(self, exists_mock, create_mock): exists_mock.return_value = False try: wrapper_obj = IloClientWrapperTestCase.wrapper_cls( IloClientWrapperTestCase.original_cls) wrapper_obj('a.b.c.d', 'abcd', 'deaf') except KeyError: pass exists_mock.assert_called_once_with(('a.b.c.d', 'abcd', 'deaf')) create_mock.assert_not_called() @mock.patch.object(original_cls, '__init__') @mock.patch.object(wrapper_cls, '_pop_oldest_node') def test__create_instance(self, pop_mock, init_mock): init_mock.return_value = None wrapper_obj = IloClientWrapperTestCase.wrapper_cls( IloClientWrapperTestCase.original_cls) wrapper_obj.MAX_CACHE_SIZE = 2 wrapper_obj._create_instance('a.b.c.d', 'abcd', 'defe') init_mock.assert_called_once_with('a.b.c.d', 'abcd', 'defe') pop_mock.assert_not_called() @mock.patch.object(original_cls, '__init__') @mock.patch.object(wrapper_cls, '_pop_oldest_node') def test__create_instance_max_size(self, pop_mock, init_mock): init_mock.return_value = None wrapper_obj = IloClientWrapperTestCase.wrapper_cls( IloClientWrapperTestCase.original_cls) wrapper_obj.MAX_CACHE_SIZE = 2 wrapper_obj._create_instance('a.b.c.d', 'abcd', 'deaf') wrapper_obj._create_instance('e.f.g.h', 'efgh', 'deaf') wrapper_obj._create_instance('i.j.k.l', 'ijkl', 'deaf') pop_mock.assert_called_once_with() def test__pop_oldest_node(self): wrapper_obj = IloClientWrapperTestCase.wrapper_cls( IloClientWrapperTestCase.original_cls) wrapper_obj.MAX_CACHE_SIZE = 2 wrapper_obj('a.b.c.d', 'abcd', 'deaf') wrapper_obj('e.f.g.h', 'efgh', 'deaf') wrapper_obj('i.j.k.l', 'ijkl', 'deaf') self.assertIn(('i.j.k.l', 'ijkl', 'deaf'), wrapper_obj._instances) self.assertIn(('e.f.g.h', 'efgh', 'deaf'), wrapper_obj._instances) self.assertNotIn(('a.b.c.d', 'ijkl', 'deaf'), wrapper_obj._instances) class IloClientInitTestCase(testtools.TestCase): @mock.patch.object(ribcl, 'RIBCLOperations') @mock.patch.object(ris, 'RISOperations') def test_init(self, ris_mock, ribcl_mock): ribcl_obj_mock = mock.MagicMock() ribcl_mock.return_value = ribcl_obj_mock ribcl_obj_mock.get_product_name.return_value = 'product' c = client.IloClient.cls("1.2.3.4", "admin", "Admin", timeout=120, port=4430, bios_password='foo', cacert='/somewhere') ris_mock.assert_called_once_with( "1.2.3.4", "admin", "Admin", bios_password='foo', cacert='/somewhere') ribcl_mock.assert_called_once_with( "1.2.3.4", "admin", "Admin", 120, 4430, cacert='/somewhere') self.assertEqual( {'address': "1.2.3.4", 'username': "admin", 'password': "Admin"}, c.ipmi_host_info) self.assertEqual('product', c.model) @mock.patch.object(ribcl, 'RIBCLOperations') @mock.patch.object(ris, 'RISOperations') def test_init_for_ipv6_link_address(self, ris_mock, ribcl_mock): ribcl_obj_mock = mock.MagicMock() ribcl_mock.return_value = ribcl_obj_mock ribcl_obj_mock.get_product_name.return_value = 'product' c = client.IloClient.cls("FE80::9AF2:B3FF:FEEE:F884%eth0", "admin", "Admin", timeout=120, port=4430, bios_password='foo', cacert='/somewhere') ris_mock.assert_called_once_with( "[FE80::9AF2:B3FF:FEEE:F884%eth0]", "admin", "Admin", bios_password='foo', cacert='/somewhere') ribcl_mock.assert_called_once_with( "[FE80::9AF2:B3FF:FEEE:F884%eth0]", "admin", "Admin", 120, 4430, cacert='/somewhere') self.assertEqual( {'address': "FE80::9AF2:B3FF:FEEE:F884%eth0", 'username': "admin", 'password': "Admin"}, c.ipmi_host_info) self.assertEqual('product', c.model) @mock.patch.object(ribcl, 'RIBCLOperations') @mock.patch.object(ris, 'RISOperations') def test_init_for_ipv6_global_address(self, ris_mock, ribcl_mock): ribcl_obj_mock = mock.MagicMock() ribcl_mock.return_value = ribcl_obj_mock ribcl_obj_mock.get_product_name.return_value = 'product' c = client.IloClient.cls("2001:0db8:85a3::8a2e:0370:7334", "admin", "Admin", timeout=120, port=4430, bios_password='foo', cacert='/somewhere') ris_mock.assert_called_once_with( "[2001:0db8:85a3::8a2e:0370:7334]", "admin", "Admin", bios_password='foo', cacert='/somewhere') ribcl_mock.assert_called_once_with( "[2001:0db8:85a3::8a2e:0370:7334]", "admin", "Admin", 120, 4430, cacert='/somewhere') self.assertEqual( {'address': "2001:0db8:85a3::8a2e:0370:7334", 'username': "admin", 'password': "Admin"}, c.ipmi_host_info) self.assertEqual('product', c.model) @mock.patch.object(ribcl, 'RIBCLOperations') @mock.patch.object(redfish, 'RedfishOperations') def test_init_for_redfish_with_ribcl_enabled( self, redfish_mock, ribcl_mock): ribcl_obj_mock = mock.MagicMock() ribcl_mock.return_value = ribcl_obj_mock ribcl_obj_mock.get_product_name.return_value = 'ProLiant DL180 Gen10' c = client.IloClient.cls("1.2.3.4", "admin", "Admin", timeout=120, port=4430, bios_password='foo', cacert='/somewhere') ribcl_mock.assert_called_once_with( "1.2.3.4", "admin", "Admin", 120, 4430, cacert='/somewhere') redfish_mock.assert_called_once_with( "1.2.3.4", "admin", "Admin", bios_password='foo', cacert='/somewhere') self.assertEqual( {'address': "1.2.3.4", 'username': "admin", 'password': "Admin"}, c.ipmi_host_info) self.assertEqual('ProLiant DL180 Gen10', c.model) self.assertIsNotNone(c.redfish) self.assertTrue(c.is_ribcl_enabled) self.assertFalse(hasattr(c, 'ris')) @mock.patch.object(ribcl, 'RIBCLOperations') @mock.patch.object(redfish, 'RedfishOperations') def test_init_for_redfish_with_ribcl_disabled( self, redfish_mock, ribcl_mock): ribcl_obj_mock = mock.MagicMock() ribcl_mock.return_value = ribcl_obj_mock ribcl_obj_mock.get_product_name.side_effect = ( exception.IloError('RIBCL is disabled')) c = client.IloClient.cls("1.2.3.4", "admin", "Admin", timeout=120, port=4430, bios_password='foo', cacert='/somewhere') ribcl_mock.assert_called_once_with( "1.2.3.4", "admin", "Admin", 120, 4430, cacert='/somewhere') redfish_mock.assert_called_once_with( "1.2.3.4", "admin", "Admin", bios_password='foo', cacert='/somewhere') self.assertEqual( {'address': "1.2.3.4", 'username': "admin", 'password': "Admin"}, c.ipmi_host_info) self.assertIsNotNone(c.model) self.assertIsNotNone(c.redfish) self.assertFalse(c.is_ribcl_enabled) self.assertFalse(hasattr(c, 'ris')) @mock.patch.object(ribcl, 'RIBCLOperations') @mock.patch.object(redfish, 'RedfishOperations') def test_init_with_use_redfish_only_set( self, redfish_mock, ribcl_mock): c = client.IloClient.cls("1.2.3.4", "admin", "Admin", timeout=120, port=4430, bios_password='foo', cacert='/somewhere', use_redfish_only=True) ribcl_mock.assert_called_once_with( "1.2.3.4", "admin", "Admin", 120, 4430, cacert='/somewhere') redfish_mock.assert_called_once_with( "1.2.3.4", "admin", "Admin", bios_password='foo', cacert='/somewhere') self.assertEqual( {'address': "1.2.3.4", 'username': "admin", 'password': "Admin"}, c.ipmi_host_info) self.assertIsNotNone(c.model) self.assertIsNotNone(c.redfish) self.assertIsNone(c.is_ribcl_enabled) self.assertFalse(hasattr(c, 'ris')) self.assertTrue(c.use_redfish_only) @mock.patch.object(client.IloClient.cls, '_validate_snmp') @mock.patch.object(ribcl, 'RIBCLOperations') @mock.patch.object(ris, 'RISOperations') def test_init_snmp(self, ris_mock, ribcl_mock, snmp_mock): ribcl_obj_mock = mock.MagicMock() ribcl_mock.return_value = ribcl_obj_mock ribcl_obj_mock.get_product_name.return_value = 'product' snmp_credentials = {'auth_user': 'user', 'auth_protocol': 'SHA', 'auth_prot_pp': '1234', 'priv_protocol': 'AES', 'auth_priv_pp': '4321', 'snmp_inspection': 'true'} c = client.IloClient.cls("1.2.3.4", "admin", "Admin", timeout=120, port=4430, bios_password='foo', cacert='/somewhere', snmp_credentials=snmp_credentials) ris_mock.assert_called_once_with( "1.2.3.4", "admin", "Admin", bios_password='foo', cacert='/somewhere') ribcl_mock.assert_called_once_with( "1.2.3.4", "admin", "Admin", 120, 4430, cacert='/somewhere') self.assertEqual( {'address': "1.2.3.4", 'username': "admin", 'password': "Admin"}, c.ipmi_host_info) self.assertEqual('product', c.model) self.assertTrue(snmp_mock.called) @mock.patch.object(client.IloClient.cls, '_validate_snmp') @mock.patch.object(ribcl, 'RIBCLOperations') @mock.patch.object(ris, 'RISOperations') def test_init_snmp_raises(self, ris_mock, ribcl_mock, snmp_mock): ribcl_obj_mock = mock.MagicMock() ribcl_mock.return_value = ribcl_obj_mock ribcl_obj_mock.get_product_name.return_value = 'product' snmp_mock.side_effect = exception.IloInvalidInputError("msg") snmp_credentials = {'auth_user': 'user', 'auth_protocol': 'SHA', 'priv_protocol': 'AES', 'snmp_inspection': 'true'} self.assertRaises(exception.IloInvalidInputError, client.IloClient.cls, "1.2.3.4", "admin", "Admin", timeout=120, port=4430, bios_password='foo', cacert='/somewhere', snmp_credentials=snmp_credentials) ris_mock.assert_called_once_with( "1.2.3.4", "admin", "Admin", bios_password='foo', cacert='/somewhere') ribcl_mock.assert_called_once_with( "1.2.3.4", "admin", "Admin", 120, 4430, cacert='/somewhere') self.assertTrue(snmp_mock.called) class IloClientSNMPValidateTestCase(testtools.TestCase): @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_validate_snmp(self, product_mock): cred = {'auth_user': 'user', 'auth_protocol': 'SHA', 'priv_protocol': 'AES', 'auth_prot_pp': '1234', 'auth_priv_pp': '4321', 'snmp_inspection': True} self.snmp_credentials = cred self.client = client.IloClient.cls("1.2.3.4", "admin", "Admin", snmp_credentials=cred) self.assertEqual(self.client.snmp_credentials, cred) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_validate_snmp_fail_auth_priv_pp_missing(self, product_mock): cred = {'auth_user': 'user', 'auth_protocol': 'SHA', 'priv_protocol': 'AES', 'auth_prot_pp': '1234', 'snmp_inspection': True} self.assertRaises(exception.IloInvalidInputError, client.IloClient.cls, "1.2.3.4", "admin", "Admin", snmp_credentials=cred) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_validate_snmp_auth_prot_pp_missing(self, product_mock): cred = {'auth_user': 'user', 'auth_protocol': 'SHA', 'priv_protocol': 'AES', 'auth_priv_pp': '4321', 'snmp_inspection': True} self.assertRaises(exception.IloInvalidInputError, client.IloClient.cls, "1.2.3.4", "admin", "Admin", snmp_credentials=cred) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_validate_snmp_auth_prot_priv_prot_missing(self, product_mock): cred = {'auth_user': 'user', 'auth_prot_pp': '1234', 'auth_priv_pp': '4321', 'snmp_inspection': True} self.client = client.IloClient.cls("1.2.3.4", "admin", "Admin", snmp_credentials=cred) self.assertEqual(self.client.snmp_credentials, cred) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_validate_snmp_auth_user_missing(self, product_mock): cred = {'auth_protocol': 'SHA', 'priv_protocol': 'AES', 'auth_priv_pp': '4321', 'auth_prot_pp': '1234', 'snmp_inspection': True} self.assertRaises(exception.IloInvalidInputError, client.IloClient.cls, "1.2.3.4", "admin", "Admin", snmp_credentials=cred) class IloClientTestCase(testtools.TestCase): @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def setUp(self, product_mock): super(IloClientTestCase, self).setUp() product_mock.return_value = 'Gen8' self.client = client.IloClient.cls("1.2.3.4", "admin", "Admin") @mock.patch.object(ribcl.RIBCLOperations, 'get_all_licenses') def test__call_method_ribcl(self, license_mock): self.client._call_method('get_all_licenses') license_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, 'get_host_power_status') def test__call_method_ris(self, power_mock): self.client.model = 'Gen9' self.client._call_method('get_host_power_status') power_mock.assert_called_once_with() @mock.patch.object(ribcl.RIBCLOperations, 'reset_ilo') def test__call_method_gen9_ribcl(self, ilo_mock): self.client.model = 'Gen9' self.client._call_method('reset_ilo') ilo_mock.assert_called_once_with() """ Testing ``_call_method`` with Redfish support. Testing the redfish methods based on the following scenarios, which are depicted in this table:: redfish | ribcl | method implemented | name of test method supported? | enabled? | on redfish? | ===========|==========|====================|============================= true | true | true | test__call_method_redfish_1 true | true | false | test__call_method_redfish_2 true | false | true | test__call_method_redfish_3 true | false | false | test__call_method_redfish_4 ===========|==========|====================|============================= """ @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') @mock.patch.object(redfish, 'RedfishOperations') def test__call_method_redfish_1(self, redfish_mock, ribcl_product_name_mock): ribcl_product_name_mock.return_value = 'Gen10' self.client = client.IloClient.cls("1.2.3.4", "admin", "secret") redfish_get_host_power_mock = (redfish.RedfishOperations.return_value. get_host_power_status) self.client._call_method('get_host_power_status') redfish_get_host_power_mock.assert_called_once_with() @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') @mock.patch.object(redfish, 'RedfishOperations') @mock.patch.object(ribcl.RIBCLOperations, 'reset_ilo') def test__call_method_redfish_2(self, ribcl_reset_ilo_mock, redfish_mock, ribcl_product_name_mock): ribcl_product_name_mock.return_value = 'Gen10' self.client = client.IloClient.cls("1.2.3.4", "admin", "secret") self.client._call_method('reset_ilo') ribcl_reset_ilo_mock.assert_called_once_with() @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') @mock.patch.object(redfish, 'RedfishOperations') def test__call_method_redfish_3(self, redfish_mock, ribcl_product_name_mock): ribcl_product_name_mock.side_effect = ( exception.IloError('RIBCL is disabled')) redfish_mock.return_value.get_product_name.return_value = 'Gen10' self.client = client.IloClient.cls("1.2.3.4", "admin", "secret") redfish_get_host_power_mock = (redfish.RedfishOperations.return_value. get_host_power_status) self.client._call_method('get_host_power_status') redfish_get_host_power_mock.assert_called_once_with() @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') @mock.patch.object(redfish, 'RedfishOperations') def test__call_method_redfish_4(self, redfish_mock, ribcl_product_name_mock): ribcl_product_name_mock.side_effect = ( exception.IloError('RIBCL is disabled')) redfish_mock.return_value.get_product_name.return_value = 'Gen10' self.client = client.IloClient.cls("1.2.3.4", "admin", "secret") self.assertRaises(NotImplementedError, self.client._call_method, 'reset_ilo') @mock.patch.object(redfish, 'RedfishOperations', spec_set=True, autospec=True) def test__call_method_with_use_redfish_only_set(self, redfish_mock): self.client = client.IloClient.cls("1.2.3.4", "admin", "secret", use_redfish_only=True) redfish_get_host_power_mock = ( redfish.RedfishOperations.return_value.get_host_power_status) self.client._call_method('get_host_power_status') redfish_get_host_power_mock.assert_called_once_with() @mock.patch.object(redfish, 'RedfishOperations', spec_set=True, autospec=True) def test__call_method_use_redfish_only_set_but_not_implemented( self, redfish_mock): self.client = client.IloClient.cls("1.2.3.4", "admin", "secret", use_redfish_only=True) self.assertRaises(NotImplementedError, self.client._call_method, 'reset_ilo') @mock.patch.object(client.IloClient.cls, '_call_method') def test_set_http_boot_url(self, call_mock): self.client.set_http_boot_url('fake-url') call_mock.assert_called_once_with('set_http_boot_url', 'fake-url') @mock.patch.object(client.IloClient.cls, '_call_method') def test_set_iscsi_info(self, call_mock): self.client.set_iscsi_info('iqn.2011-07.com:example:123', '1', '10.10.1.23', '3260', 'CHAP', 'user', 'password') call_mock.assert_called_once_with('set_iscsi_info', 'iqn.2011-07.com:example:123', '1', '10.10.1.23', '3260', 'CHAP', 'user', 'password', []) @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_iscsi_initiator_info(self, call_mock): self.client.get_iscsi_initiator_info() call_mock.assert_called_once_with('get_iscsi_initiator_info') @mock.patch.object(client.IloClient.cls, '_call_method') def test_unset_iscsi_info(self, call_mock): self.client.unset_iscsi_info() call_mock.assert_called_once_with('unset_iscsi_info', []) @mock.patch.object(client.IloClient.cls, '_call_method') def test_set_iscsi_initiator_info(self, call_mock): self.client.set_iscsi_initiator_info('iqn.2011-07.com:example:123') call_mock.assert_called_once_with('set_iscsi_initiator_info', 'iqn.2011-07.com:example:123') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_product_name(self, call_mock): self.client.get_product_name() call_mock.assert_called_once_with('get_product_name') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_all_licenses(self, call_mock): self.client.get_all_licenses() call_mock.assert_called_once_with('get_all_licenses') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_host_power_status(self, call_mock): self.client.get_host_power_status() call_mock.assert_called_once_with('get_host_power_status') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_http_boot_url(self, call_mock): self.client.get_http_boot_url() call_mock.assert_called_once_with('get_http_boot_url') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_one_time_boot(self, call_mock): self.client.get_one_time_boot() call_mock.assert_called_once_with('get_one_time_boot') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_vm_status(self, call_mock): self.client.get_vm_status('CDROM') call_mock.assert_called_once_with('get_vm_status', 'CDROM') @mock.patch.object(client.IloClient.cls, '_call_method') def test_press_pwr_btn(self, call_mock): self.client.press_pwr_btn() call_mock.assert_called_once_with('press_pwr_btn') @mock.patch.object(client.IloClient.cls, '_call_method') def test_reset_server(self, call_mock): self.client.reset_server() call_mock.assert_called_once_with('reset_server') @mock.patch.object(client.IloClient.cls, '_call_method') def test_hold_pwr_btn(self, call_mock): self.client.hold_pwr_btn() call_mock.assert_called_once_with('hold_pwr_btn') @mock.patch.object(client.IloClient.cls, '_call_method') def test_set_host_power(self, call_mock): self.client.set_host_power('ON') call_mock.assert_called_once_with('set_host_power', 'ON') @mock.patch.object(client.IloClient.cls, '_call_method') def test_set_one_time_boot(self, call_mock): self.client.set_one_time_boot('CDROM') call_mock.assert_called_once_with('set_one_time_boot', 'CDROM') @mock.patch.object(client.IloClient.cls, '_call_method') def test_insert_virtual_media(self, call_mock): self.client.insert_virtual_media(url='fake-url', device='FLOPPY') call_mock.assert_called_once_with('insert_virtual_media', 'fake-url', 'FLOPPY') @mock.patch.object(client.IloClient.cls, '_call_method') def test_eject_virtual_media(self, call_mock): self.client.eject_virtual_media(device='FLOPPY') call_mock.assert_called_once_with('eject_virtual_media', 'FLOPPY') @mock.patch.object(client.IloClient.cls, '_call_method') def test_set_vm_status(self, call_mock): self.client.set_vm_status(device='FLOPPY', boot_option='BOOT_ONCE', write_protect='YES') call_mock.assert_called_once_with('set_vm_status', 'FLOPPY', 'BOOT_ONCE', 'YES') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_current_boot_mode(self, call_mock): self.client.get_current_boot_mode() call_mock.assert_called_once_with('get_current_boot_mode') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_pending_boot_mode(self, call_mock): self.client.get_pending_boot_mode() call_mock.assert_called_once_with('get_pending_boot_mode') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_supported_boot_mode(self, call_mock): self.client.get_supported_boot_mode() call_mock.assert_called_once_with('get_supported_boot_mode') @mock.patch.object(client.IloClient.cls, '_call_method') def test_set_pending_boot_mode(self, call_mock): self.client.set_pending_boot_mode('UEFI') call_mock.assert_called_once_with('set_pending_boot_mode', 'UEFI') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_persistent_boot_device(self, call_mock): self.client.get_persistent_boot_device() call_mock.assert_called_once_with('get_persistent_boot_device') @mock.patch.object(client.IloClient.cls, '_call_method') def test_update_persistent_boot(self, call_mock): self.client.update_persistent_boot(['HDD']) call_mock.assert_called_once_with('update_persistent_boot', ['HDD']) @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_secure_boot_mode(self, call_mock): self.client.get_secure_boot_mode() call_mock.assert_called_once_with('get_secure_boot_mode') @mock.patch.object(client.IloClient.cls, '_call_method') def test_set_secure_boot_mode(self, call_mock): self.client.set_secure_boot_mode(True) call_mock.assert_called_once_with('set_secure_boot_mode', True) @mock.patch.object(client.IloClient.cls, '_call_method') def test_reset_secure_boot_keys(self, call_mock): self.client.reset_secure_boot_keys() call_mock.assert_called_once_with('reset_secure_boot_keys') @mock.patch.object(client.IloClient.cls, '_call_method') def test_clear_secure_boot_keys(self, call_mock): self.client.clear_secure_boot_keys() call_mock.assert_called_once_with('clear_secure_boot_keys') @mock.patch.object(client.IloClient.cls, '_call_method') def test_reset_ilo_credential(self, call_mock): self.client.reset_ilo_credential('password') call_mock.assert_called_once_with('reset_ilo_credential', 'password') @mock.patch.object(client.IloClient.cls, '_call_method') def test_reset_ilo(self, call_mock): self.client.reset_ilo() call_mock.assert_called_once_with('reset_ilo') @mock.patch.object(client.IloClient.cls, '_call_method') def test_reset_bios_to_default(self, call_mock): self.client.reset_bios_to_default() call_mock.assert_called_once_with('reset_bios_to_default') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_host_uuid(self, call_mock): self.client.get_host_uuid() call_mock.assert_called_once_with('get_host_uuid') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_host_health_data(self, call_mock): self.client.get_host_health_data('fake-data') call_mock.assert_called_once_with('get_host_health_data', 'fake-data') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_host_health_present_power_reading(self, call_mock): self.client.get_host_health_present_power_reading('fake-data') call_mock.assert_called_once_with( 'get_host_health_present_power_reading', 'fake-data') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_host_health_power_supplies(self, call_mock): self.client.get_host_health_power_supplies('fake-data') call_mock.assert_called_once_with('get_host_health_power_supplies', 'fake-data') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_host_health_fan_sensors(self, call_mock): self.client.get_host_health_fan_sensors('fake-data') call_mock.assert_called_once_with('get_host_health_fan_sensors', 'fake-data') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_host_health_temperature_sensors(self, call_mock): self.client.get_host_health_temperature_sensors('fake-data') call_mock.assert_called_once_with( 'get_host_health_temperature_sensors', 'fake-data') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_host_health_at_a_glance(self, call_mock): self.client.get_host_health_at_a_glance('fake-data') call_mock.assert_called_once_with('get_host_health_at_a_glance', 'fake-data') @mock.patch.object(ipmi, 'get_nic_capacity') @mock.patch.object(ribcl.RIBCLOperations, 'get_ilo_firmware_version_as_major_minor') @mock.patch.object(ribcl.RIBCLOperations, 'get_server_capabilities') def test_get_server_capabilities(self, cap_mock, maj_min_mock, nic_mock): info = {'address': "1.2.3.4", 'username': "admin", 'password': "Admin"} str_val = maj_min_mock.return_value = "2.10" nic_mock.return_value = '10Gb' cap_mock.return_value = {'ilo_firmware_version': '2.10', 'rom_firmware_version': 'x', 'server_model': 'Gen8', 'pci_gpu_devices': '2'} capabilities = self.client.get_server_capabilities() expected_capabilities = {'ilo_firmware_version': '2.10', 'rom_firmware_version': 'x', 'server_model': 'Gen8', 'pci_gpu_devices': '2', 'nic_capacity': '10Gb'} cap_mock.assert_called_once_with() nic_mock.assert_called_once_with(self.client.ipmi_host_info, str_val) self.assertEqual(expected_capabilities, capabilities) self.assertEqual(info, self.client.ipmi_host_info) @mock.patch.object(ipmi, 'get_nic_capacity') @mock.patch.object(ribcl.RIBCLOperations, 'get_ilo_firmware_version_as_major_minor') @mock.patch.object(ribcl.RIBCLOperations, 'get_server_capabilities') def test_get_server_capabilities_no_nic(self, cap_mock, maj_min_mock, nic_mock): info = {'address': "1.2.3.4", 'username': "admin", 'password': "Admin"} str_val = maj_min_mock.return_value = '2.10' nic_mock.return_value = None cap_mock.return_value = {'ilo_firmware_version': '2.10', 'rom_firmware_version': 'x', 'server_model': 'Gen8', 'pci_gpu_devices': '2'} capabilities = self.client.get_server_capabilities() expected_capabilities = {'ilo_firmware_version': '2.10', 'rom_firmware_version': 'x', 'server_model': 'Gen8', 'pci_gpu_devices': '2'} cap_mock.assert_called_once_with() nic_mock.assert_called_once_with(self.client.ipmi_host_info, str_val) self.assertEqual(expected_capabilities, capabilities) self.assertEqual(info, self.client.ipmi_host_info) @mock.patch.object(ipmi, 'get_nic_capacity') @mock.patch.object(ribcl.RIBCLOperations, 'get_ilo_firmware_version_as_major_minor') @mock.patch.object(ribcl.RIBCLOperations, 'get_server_capabilities') def test_get_server_capabilities_no_firmware(self, cap_mock, maj_min_mock, nic_mock): maj_min_mock.return_value = None nic_mock.return_value = None cap_mock.return_value = {'rom_firmware_version': 'x', 'server_model': 'Gen8', 'pci_gpu_devices': '2'} expected_capabilities = {'rom_firmware_version': 'x', 'server_model': 'Gen8', 'pci_gpu_devices': '2'} capabilities = self.client.get_server_capabilities() self.assertEqual(expected_capabilities, capabilities) nic_mock.assert_called_once_with(self.client.ipmi_host_info, None) @mock.patch.object(ipmi, 'get_nic_capacity') @mock.patch.object(ribcl.RIBCLOperations, 'get_ilo_firmware_version_as_major_minor') @mock.patch.object(ribcl.RIBCLOperations, 'get_server_capabilities') def test_get_server_capabilities_no_boot_modes( self, cap_mock, maj_min_mock, nic_mock): maj_min_mock.return_value = None nic_mock.return_value = None cap_mock.return_value = {'rom_firmware_version': 'x', 'server_model': 'Gen8', 'pci_gpu_devices': '2'} expected_capabilities = {'rom_firmware_version': 'x', 'server_model': 'Gen8', 'pci_gpu_devices': '2'} capabilities = self.client.get_server_capabilities() self.assertEqual(expected_capabilities, capabilities) nic_mock.assert_called_once_with(self.client.ipmi_host_info, None) @mock.patch.object(ris.RISOperations, 'get_ilo_firmware_version_as_major_minor') @mock.patch.object(ipmi, 'get_nic_capacity') @mock.patch.object(ris.RISOperations, 'get_server_capabilities') def test_get_server_capabilities_no_nic_Gen9(self, cap_mock, nic_mock, mm_mock): str_val = mm_mock.return_value = '2.10' self.client.model = 'Gen9' nic_mock.return_value = None cap_mock.return_value = {'ilo_firmware_version': '2.10', 'rom_firmware_version': 'x', 'server_model': 'Gen9', 'pci_gpu_devices': 2, 'secure_boot': 'true'} capabilities = self.client.get_server_capabilities() cap_mock.assert_called_once_with() nic_mock.assert_called_once_with(self.client.ipmi_host_info, str_val) expected_capabilities = {'ilo_firmware_version': '2.10', 'rom_firmware_version': 'x', 'server_model': 'Gen9', 'pci_gpu_devices': 2, 'secure_boot': 'true'} self.assertEqual(expected_capabilities, capabilities) @mock.patch.object(ris.RISOperations, 'get_ilo_firmware_version_as_major_minor') @mock.patch.object(ipmi, 'get_nic_capacity') @mock.patch.object(ris.RISOperations, 'get_server_capabilities') def test_get_server_capabilities_Gen9(self, cap_mock, nic_mock, mm_mock): str_val = mm_mock.return_value = '2.10' self.client.model = 'Gen9' nic_mock.return_value = '10Gb' cap_mock.return_value = {'ilo_firmware_version': '2.10', 'rom_firmware_version': 'x', 'server_model': 'Gen9', 'pci_gpu_devices': 2, 'secure_boot': 'true'} capabilities = self.client.get_server_capabilities() cap_mock.assert_called_once_with() nic_mock.assert_called_once_with(self.client.ipmi_host_info, str_val) expected_capabilities = {'ilo_firmware_version': '2.10', 'rom_firmware_version': 'x', 'server_model': 'Gen9', 'pci_gpu_devices': 2, 'secure_boot': 'true', 'nic_capacity': '10Gb'} self.assertEqual(expected_capabilities, capabilities) @mock.patch.object(redfish, 'RedfishOperations') @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') @mock.patch.object(ipmi, 'get_nic_capacity') def test_get_server_capabilities_Gen10(self, ipmi_mock, ribcl_product_name_mock, redfish_mock): ribcl_product_name_mock.return_value = 'Gen10' self.client = client.IloClient("1.2.3.4", "admin", "secret") cap_mock = (redfish_mock.return_value.get_server_capabilities) self.client.get_server_capabilities() self.assertFalse(ipmi_mock.called) self.assertTrue(cap_mock.called) @mock.patch.object(ris.RISOperations, 'get_ilo_firmware_version_as_major_minor') @mock.patch.object(ribcl.RIBCLOperations, 'get_host_health_data') @mock.patch.object(ris.RISOperations, '_get_number_of_gpu_devices_connected') @mock.patch.object(ipmi, 'get_nic_capacity') @mock.patch.object(ris.RISOperations, 'get_server_capabilities') def test_get_server_capabilities_no_boot_modes_Gen9( self, cap_mock, nic_mock, gpu_mock, host_mock, mm_mock): str_val = mm_mock.return_value = '2.10' self.client.model = 'Gen9' nic_mock.return_value = None gpu_mock.return_value = None cap_mock.return_value = {'ilo_firmware_version': '2.10', 'rom_firmware_version': 'x', 'server_model': 'Gen9', 'secure_boot': 'true'} capabilities = self.client.get_server_capabilities() cap_mock.assert_called_once_with() nic_mock.assert_called_once_with(self.client.ipmi_host_info, str_val) expected_capabilities = {'ilo_firmware_version': '2.10', 'rom_firmware_version': 'x', 'server_model': 'Gen9', 'secure_boot': 'true'} self.assertEqual(expected_capabilities, capabilities) @mock.patch.object(client.IloClient.cls, '_call_method') def test_activate_license(self, call_mock): self.client.activate_license('fake-key') call_mock.assert_called_once_with('activate_license', 'fake-key') @mock.patch.object(client.IloClient.cls, '_call_method') def test_delete_raid_configuration(self, call_mock): self.client.delete_raid_configuration() call_mock.assert_called_once_with('delete_raid_configuration') @mock.patch.object(ris.RISOperations, 'get_product_name') def test_delete_raid_configuration_gen9(self, get_product_mock): self.client.model = 'Gen9' get_product_mock.return_value = 'ProLiant BL460c Gen9' self.assertRaisesRegex(exception.IloCommandNotSupportedError, '`delete_raid_configuration` is not supported ' 'on ProLiant BL460c Gen9', self.client.delete_raid_configuration) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_delete_raid_configuration_gen8(self, get_product_mock): self.client.model = 'Gen8' get_product_mock.return_value = 'ProLiant DL380 G8' self.assertRaisesRegex(exception.IloCommandNotSupportedError, '`delete_raid_configuration` is not supported ' 'on ProLiant DL380 G8', self.client.delete_raid_configuration) @mock.patch.object(client.IloClient.cls, '_call_method') def test_do_disk_erase(self, call_mock): self.client.do_disk_erase('SSD', None) call_mock.assert_called_once_with( 'do_disk_erase', 'SSD', None) @mock.patch.object(ris.RISOperations, 'get_product_name') def test_do_disk_erase_gen9(self, get_product_mock): self.client.model = 'Gen9' get_product_mock.return_value = 'ProLiant BL460c Gen9' self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'The specified operation is not supported ' 'on current platform.', self.client.do_disk_erase, 'SSD', None) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_do_disk_erase_gen8(self, get_product_mock): self.client.model = 'Gen8' get_product_mock.return_value = 'ProLiant DL380 G8' self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'The specified operation is not supported ' 'on current platform.', self.client.do_disk_erase, 'SSD', None) @mock.patch.object(client.IloClient.cls, '_call_method') def test_do_one_button_secure_erase(self, call_mock): self.client.do_one_button_secure_erase() self.assertTrue(call_mock.called) @mock.patch.object(ris.RISOperations, 'get_product_name') def test_do_one_button_secure_erase_gen9(self, get_product_mock): self.client.model = 'Gen9' get_product_mock.return_value = 'ProLiant BL460c Gen9' self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'The specified operation is not supported ' 'on current platform.', self.client.do_one_button_secure_erase) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_do_one_button_secure_erase_gen8(self, get_product_mock): self.client.model = 'Gen8' get_product_mock.return_value = 'ProLiant DL380 G8' self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'The specified operation is not supported ' 'on current platform.', self.client.do_one_button_secure_erase) @mock.patch.object(client.IloClient.cls, '_call_method') def test_has_disk_erase_completed(self, call_mock): self.client.has_disk_erase_completed() call_mock.assert_called_once_with('has_disk_erase_completed') @mock.patch.object(ris.RISOperations, 'get_product_name') def test_has_disk_erase_completed_gen9(self, get_product_mock): self.client.model = 'Gen9' get_product_mock.return_value = 'ProLiant BL460c Gen9' self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'The specified operation is not supported ' 'on current platform.', self.client.has_disk_erase_completed) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_has_disk_erase_completed_gen8(self, get_product_mock): self.client.model = 'Gen8' get_product_mock.return_value = 'ProLiant DL380 G8' self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'The specified operation is not supported ' 'on current platform.', self.client.has_disk_erase_completed) @mock.patch.object(client.IloClient.cls, '_call_method') def test_create_raid_configuration(self, call_mock): ld1 = {"size_gb": 150, "raid_level": '0', "is_root_volume": True} raid_config = {"logical_disks": [ld1]} self.client.create_raid_configuration(raid_config) call_mock.assert_called_once_with('create_raid_configuration', raid_config) @mock.patch.object(ris.RISOperations, 'get_product_name') def test_create_raid_configuration_gen9(self, get_product_mock): self.client.model = 'Gen9' ld1 = {"size_gb": 150, "raid_level": '0', "is_root_volume": True} raid_config = {"logical_disks": [ld1]} get_product_mock.return_value = 'ProLiant BL460c Gen9' self.assertRaisesRegex(exception.IloCommandNotSupportedError, '`create_raid_configuration` is not supported ' 'on ProLiant BL460c Gen9', self.client.create_raid_configuration, raid_config) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_create_raid_configuration_gen8(self, get_product_mock): self.client.model = 'Gen8' ld1 = {"size_gb": 150, "raid_level": '0', "is_root_volume": True} raid_config = {"logical_disks": [ld1]} get_product_mock.return_value = 'ProLiant DL380 G8' self.assertRaisesRegex(exception.IloCommandNotSupportedError, '`create_raid_configuration` is not supported ' 'on ProLiant DL380 G8', self.client.create_raid_configuration, raid_config) @mock.patch.object(client.IloClient.cls, '_call_method') def test_read_raid_configuration(self, call_mock): ld1 = {"size_gb": 150, "raid_level": '0', "is_root_volume": True} raid_config = {"logical_disks": [ld1]} self.client.read_raid_configuration(raid_config) call_mock.assert_called_once_with('read_raid_configuration', raid_config) @mock.patch.object(ris.RISOperations, 'get_product_name') def test_read_raid_configuration_gen9(self, get_product_mock): self.client.model = 'Gen9' ld1 = {"size_gb": 150, "raid_level": '0', "is_root_volume": True} raid_config = {"logical_disks": [ld1]} get_product_mock.return_value = 'ProLiant BL460c Gen9' self.assertRaisesRegex(exception.IloCommandNotSupportedError, '`read_raid_configuration` is not supported ' 'on ProLiant BL460c Gen9', self.client.read_raid_configuration, raid_config) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_read_raid_configuration_gen8(self, get_product_mock): self.client.model = 'Gen8' ld1 = {"size_gb": 150, "raid_level": '0', "is_root_volume": True} raid_config = {"logical_disks": [ld1]} get_product_mock.return_value = 'ProLiant DL380 G8' self.assertRaisesRegex(exception.IloCommandNotSupportedError, '`read_raid_configuration` is not supported ' 'on ProLiant DL380 G8', self.client.read_raid_configuration, raid_config) @mock.patch.object(ris.RISOperations, 'eject_virtual_media') def test_eject_virtual_media_gen9(self, eject_virtual_media_mock): self.client.model = 'Gen9' self.client.eject_virtual_media(device='FLOPPY') eject_virtual_media_mock.assert_called_once_with('FLOPPY') @mock.patch.object(ribcl.RIBCLOperations, 'eject_virtual_media') def test_eject_virtual_media_gen8(self, eject_virtual_media_mock): self.client.model = 'Gen8' self.client.eject_virtual_media(device='FLOPPY') eject_virtual_media_mock.assert_called_once_with('FLOPPY') @mock.patch.object(ris.RISOperations, 'get_vm_status') def test_get_vm_status_gen9(self, get_vm_status_mock): self.client.model = 'Gen9' self.client.get_vm_status(device='FLOPPY') get_vm_status_mock.assert_called_once_with('FLOPPY') @mock.patch.object(ribcl.RIBCLOperations, 'get_vm_status') def test_get_vm_status_gen8(self, get_vm_status_mock): self.client.model = 'Gen8' self.client.get_vm_status(device='FLOPPY') get_vm_status_mock.assert_called_once_with('FLOPPY') @mock.patch.object(ris.RISOperations, 'set_vm_status') def test_set_vm_status_gen9(self, set_vm_status_mock): self.client.model = 'Gen9' self.client.set_vm_status(device='FLOPPY', boot_option='BOOT_ONCE', write_protect='YES') set_vm_status_mock.assert_called_once_with('FLOPPY', 'BOOT_ONCE', 'YES') @mock.patch.object(ribcl.RIBCLOperations, 'set_vm_status') def test_set_vm_status_gen8(self, set_vm_status_mock): self.client.model = 'Gen8' self.client.set_vm_status(device='FLOPPY', boot_option='BOOT_ONCE', write_protect='YES') set_vm_status_mock.assert_called_once_with('FLOPPY', 'BOOT_ONCE', 'YES') @mock.patch.object(ris.RISOperations, 'insert_virtual_media') def test_insert_virtual_media_gen9(self, insert_virtual_media_mock): self.client.model = 'Gen9' self.client.insert_virtual_media(url="http://ilo/fpy.iso", device='FLOPPY') insert_virtual_media_mock.assert_called_once_with("http://ilo/fpy.iso", "FLOPPY") @mock.patch.object(ribcl.RIBCLOperations, 'insert_virtual_media') def test_insert_virtual_media_gen8(self, insert_virtual_media_mock): self.client.model = 'Gen8' self.client.insert_virtual_media(url="http://ilo/fpy.iso", device='FLOPPY') insert_virtual_media_mock.assert_called_once_with("http://ilo/fpy.iso", "FLOPPY") @mock.patch.object(ris.RISOperations, 'get_one_time_boot') def test_get_one_time_boot_gen9(self, get_one_time_boot_mock): self.client.model = 'Gen9' self.client.get_one_time_boot() get_one_time_boot_mock.assert_called_once_with() @mock.patch.object(ribcl.RIBCLOperations, 'get_one_time_boot') def test_get_one_time_boot_gen8(self, get_one_time_boot_mock): self.client.model = 'Gen8' self.client.get_one_time_boot() get_one_time_boot_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, 'set_one_time_boot') def test_set_one_time_boot_gen9(self, set_one_time_boot_mock): self.client.model = 'Gen9' self.client.set_one_time_boot('cdrom') set_one_time_boot_mock.assert_called_once_with('cdrom') @mock.patch.object(ribcl.RIBCLOperations, 'set_one_time_boot') def test_set_one_time_boot_gen8(self, set_one_time_boot_mock): self.client.model = 'Gen8' self.client.set_one_time_boot('cdrom') set_one_time_boot_mock.assert_called_once_with('cdrom') @mock.patch.object(ris.RISOperations, 'update_persistent_boot') def test_update_persistent_boot_gen9(self, update_persistent_boot_mock): self.client.model = 'Gen9' self.client.update_persistent_boot(['cdrom']) update_persistent_boot_mock.assert_called_once_with(['cdrom']) @mock.patch.object(ribcl.RIBCLOperations, 'update_persistent_boot') def test_update_persistent_boot_gen8(self, update_persistent_boot_mock): self.client.model = 'Gen8' self.client.update_persistent_boot(['cdrom']) update_persistent_boot_mock.assert_called_once_with(['cdrom']) @mock.patch.object(ris.RISOperations, 'get_persistent_boot_device') def test_get_persistent_boot_device_gen9(self, get_pers_boot_device_mock): self.client.model = 'Gen9' self.client.get_persistent_boot_device() get_pers_boot_device_mock.assert_called_once_with() @mock.patch.object(ribcl.RIBCLOperations, 'get_persistent_boot_device') def test_get_persistent_boot_device_gen8(self, get_pers_boot_device_mock): self.client.model = 'Gen8' self.client.get_persistent_boot_device() get_pers_boot_device_mock.assert_called_once_with() @mock.patch.object(client.IloClient.cls, '_call_method') def test_update_firmware(self, _call_method_mock): # | GIVEN | some_url = 'some-url' some_component_type = 'ilo' # | WHEN | self.client.update_firmware(some_url, some_component_type) # | THEN | _call_method_mock.assert_called_once_with('update_firmware', some_url, some_component_type) @mock.patch.object(ris.RISOperations, 'hold_pwr_btn') def test_hold_pwr_btn_gen9(self, hold_pwr_btn_mock): self.client.model = 'Gen9' self.client.hold_pwr_btn() self.assertTrue(hold_pwr_btn_mock.called) @mock.patch.object(ribcl.RIBCLOperations, 'hold_pwr_btn') def test_hold_pwr_btn_gen8(self, hold_pwr_btn_mock): self.client.model = 'Gen8' self.client.hold_pwr_btn() self.assertTrue(hold_pwr_btn_mock.called) @mock.patch.object(ris.RISOperations, 'set_host_power') def test_set_host_power_gen9(self, set_host_power_mock): self.client.model = 'Gen9' self.client.set_host_power('ON') set_host_power_mock.assert_called_once_with('ON') @mock.patch.object(ribcl.RIBCLOperations, 'set_host_power') def test_set_host_power_gen8(self, set_host_power_mock): self.client.model = 'Gen8' self.client.set_host_power('ON') set_host_power_mock.assert_called_once_with('ON') @mock.patch.object(ris.RISOperations, 'press_pwr_btn') def test_press_pwr_btn_gen9(self, press_pwr_btn_mock): self.client.model = 'Gen9' self.client.press_pwr_btn() self.assertTrue(press_pwr_btn_mock.called) @mock.patch.object(ribcl.RIBCLOperations, 'press_pwr_btn') def test_press_pwr_btn_gen8(self, press_pwr_btn_mock): self.client.model = 'Gen8' self.client.press_pwr_btn() self.assertTrue(press_pwr_btn_mock.called) @mock.patch.object(ris.RISOperations, 'reset_server') def test_reset_server_gen9(self, reset_server_mock): self.client.model = 'Gen9' self.client.reset_server() self.assertTrue(reset_server_mock.called) @mock.patch.object(ribcl.RIBCLOperations, 'reset_server') def test_reset_server_gen8(self, reset_server_mock): self.client.model = 'Gen8' self.client.reset_server() self.assertTrue(reset_server_mock.called) @mock.patch.object(ris.RISOperations, 'get_current_bios_settings') def test_get_current_bios_settings_gen9(self, cur_bios_settings_mock): self.client.model = 'Gen9' apply_filter = True self.client.get_current_bios_settings(apply_filter) cur_bios_settings_mock.assert_called_once_with(True) @mock.patch.object(ris.RISOperations, 'get_pending_bios_settings') def test_get_pending_bios_settings_gen9(self, pending_bios_settings_mock): self.client.model = 'Gen9' apply_filter = True self.client.get_pending_bios_settings(apply_filter) pending_bios_settings_mock.assert_called_once_with(True) @mock.patch.object(ris.RISOperations, 'get_default_bios_settings') def test_get_default_bios_settings_gen9(self, def_bios_settings_mock): self.client.model = 'Gen9' apply_filter = False self.client.get_default_bios_settings(apply_filter) def_bios_settings_mock.assert_called_once_with(False) @mock.patch.object(ris.RISOperations, 'set_bios_settings') def test_set_bios_settings_gen9(self, bios_settings_mock): self.client.model = 'Gen9' apply_filter = False d = {'a': 'blah', 'b': 'blah blah'} self.client.set_bios_settings(d, apply_filter) bios_settings_mock.assert_called_once_with(d, False) @mock.patch.object(client.IloClient.cls, '_call_method') @mock.patch.object(snmp_cpqdisk_sizes, 'get_local_gb') def test_get_essential_prop_no_snmp_ris(self, snmp_mock, call_mock): self.client.model = 'Gen9' properties = {'local_gb': 250} data = {'properties': properties} call_mock.return_value = data self.client.get_essential_properties() call_mock.assert_called_once_with('get_essential_properties') self.assertFalse(snmp_mock.called) @mock.patch.object(client.IloClient.cls, '_call_method') @mock.patch.object(snmp_cpqdisk_sizes, 'get_local_gb') def test_get_essential_prop_no_snmp_local_gb_0(self, snmp_mock, call_mock): self.client.model = 'Gen9' properties = {'local_gb': 0} data = {'properties': properties} call_mock.return_value = data self.client.get_essential_properties() call_mock.assert_called_once_with('get_essential_properties') self.assertFalse(snmp_mock.called) @mock.patch.object(client.IloClient.cls, '_call_method') @mock.patch.object(snmp_cpqdisk_sizes, 'get_local_gb') def test_get_essential_prop_snmp_true(self, snmp_mock, call_mock): self.client.model = 'Gen9' snmp_credentials = {'auth_user': 'user', 'auth_prot_pp': '1234', 'auth_priv_pp': '4321', 'auth_protocol': 'SHA', 'priv_protocol': 'AES', 'snmp_inspection': 'true'} self.client.snmp_credentials = snmp_credentials properties = {'local_gb': 0} data = {'properties': properties} call_mock.return_value = data snmp_mock.return_value = 250 self.client.get_essential_properties() call_mock.assert_called_once_with('get_essential_properties') snmp_mock.assert_called_once_with( self.client.ipmi_host_info['address'], snmp_credentials) @mock.patch.object(client.IloClient.cls, '_call_method') @mock.patch.object(snmp_cpqdisk_sizes, 'get_local_gb') def test_get_essential_prop_snmp_true_local_gb_0(self, snmp_mock, call_mock): self.client.model = 'Gen9' snmp_credentials = {'auth_user': 'user', 'auth_prot_pp': '1234', 'auth_priv_pp': '4321', 'auth_protocol': 'SHA', 'priv_protocol': 'AES', 'snmp_inspection': 'true'} self.client.snmp_credentials = snmp_credentials properties = {'local_gb': 0} data = {'properties': properties} call_mock.return_value = data snmp_mock.return_value = 0 self.client.get_essential_properties() call_mock.assert_called_once_with('get_essential_properties') snmp_mock.assert_called_once_with( self.client.ipmi_host_info['address'], snmp_credentials) @mock.patch.object(snmp_cpqdisk_sizes, 'get_local_gb') @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_essential_prop_snmp_false_local_gb_0(self, call_mock, snmp_mock): self.client.model = 'Gen9' snmp_credentials = {'auth_user': 'user', 'auth_prot_pp': '1234', 'auth_priv_pp': '4321', 'auth_protocol': 'SHA', 'priv_protocol': 'AES', 'snmp_inspection': False} self.client.snmp_inspection = False self.client.snmp_credentials = snmp_credentials properties = {'local_gb': 0} data = {'properties': properties} call_mock.return_value = data self.client.get_essential_properties() call_mock.assert_called_once_with('get_essential_properties') self.assertFalse(snmp_mock.called) @mock.patch.object(client.IloClient.cls, '_call_method') def test_inject_nmi(self, call_mock): self.client.inject_nmi() call_mock.assert_called_once_with('inject_nmi') @mock.patch.object(ris.RISOperations, 'inject_nmi') def test_inject_nmi_gen9(self, inject_nmi_mock): self.client.model = 'Gen9' self.client.inject_nmi() inject_nmi_mock.assert_called_once_with() @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_inject_nmi_gen8(self, product_mock): self.client.model = 'Gen8' self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'not supported', self.client.inject_nmi) @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_host_post_state(self, call_mock): self.client.get_host_post_state() call_mock.assert_called_once_with('get_host_post_state') @mock.patch.object(ris.RISOperations, 'get_host_post_state') def test_get_host_post_state_gen9(self, get_host_post_state_mock): self.client.model = 'Gen9' self.client.get_host_post_state() get_host_post_state_mock.assert_called_once_with() @mock.patch.object(ribcl.RIBCLOperations, 'get_host_post_state') def test_get_host_post_state_gen8(self, get_host_post_state_mock): self.client.model = 'Gen8' self.client.get_host_post_state() get_host_post_state_mock.assert_called_once_with() @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_bios_settings_result(self, call_mock): self.client.get_bios_settings_result() call_mock.assert_called_once_with('get_bios_settings_result') @mock.patch.object(ris.RISOperations, 'get_bios_settings_result') def test_get_bios_settings_result_gen9(self, get_bios_settings_mock): self.client.model = 'Gen9' self.client.get_bios_settings_result() get_bios_settings_mock.assert_called_once_with() @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_get_bios_settings_result_gen8(self, product_mock): self.client.model = 'Gen8' self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'not supported', self.client.get_bios_settings_result) @mock.patch.object(client.IloClient.cls, '_call_method') def test_get_available_disk_types(self, call_mock): self.client.get_available_disk_types() call_mock.assert_called_once_with('get_available_disk_types') @mock.patch.object(ris.RISOperations, 'get_product_name') def test_get_available_disk_types_gen9(self, get_product_mock): self.client.model = 'Gen9' get_product_mock.return_value = 'ProLiant BL460c Gen9' self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'not supported', self.client.get_available_disk_types) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_get_available_disk_types_gen8(self, get_product_mock): self.client.model = 'Gen8' get_product_mock.return_value = 'ProLiant DL380 G8' self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'not supported', self.client.get_available_disk_types) class IloRedfishClientTestCase(testtools.TestCase): @mock.patch.object(redfish, 'RedfishOperations', spec_set=True, autospec=True) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def setUp(self, product_mock, redfish_mock): super(IloRedfishClientTestCase, self).setUp() self.redfish_mock = redfish_mock product_mock.return_value = 'Gen10' self.client = client.IloClient.cls("1.2.3.4", "Admin", "admin") def test_calling_redfish_operations_gen10(self): self.client.model = 'Gen10' def validate_method_calls(methods, method_args, missed_ops): for redfish_method_name in methods: try: if method_args: eval('self.client.' + redfish_method_name)( *method_args) else: eval('self.client.' + redfish_method_name)() if redfish_method_name not in ('unset_iscsi_boot_info', 'set_iscsi_boot_info'): self.assertTrue(eval( 'self.redfish_mock.return_value.' + redfish_method_name).called) validate_method_calls.no_test_cases += 1 except TypeError: missed_ops.append(redfish_method_name) validate_method_calls.no_test_cases = 0 missed_operations = [] validate_method_calls( client.SUPPORTED_REDFISH_METHODS, (), missed_operations) more_missed_operations = [] validate_method_calls( missed_operations, ('arg',), more_missed_operations) even_more_missed_operations = [] validate_method_calls( more_missed_operations, ('arg1', 'arg2'), even_more_missed_operations) if (len(even_more_missed_operations) == 1): self.assertEqual('set_iscsi_info', even_more_missed_operations[0]) else: self.assertEqual(2, len(even_more_missed_operations)) self.assertEqual(len(client.SUPPORTED_REDFISH_METHODS) - 2, validate_method_calls.no_test_cases) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ilo/test_common.py0000664000175000017500000002455700000000000024310 0ustar00zuulzuul00000000000000# Copyright 2015 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test Class for Common Operations.""" import time import unittest from unittest import mock import ddt from proliantutils import exception from proliantutils.ilo import common from proliantutils.ilo import constants from proliantutils.ilo import ribcl from proliantutils.ilo import ris from proliantutils.tests.ilo import ribcl_sample_outputs as ribcl_output @ddt.ddt class IloCommonModuleTestCase(unittest.TestCase): def setUp(self): # | BEFORE_EACH | super(IloCommonModuleTestCase, self).setUp() self.ribcl = ribcl.RIBCLOperations("x.x.x.x", "admin", "Admin", 60, 443) self.ris = ris.RISOperations("x.x.x.x", "admin", "Admin", 60, 443) self.any_scexe_file = 'any_file.scexe' self.any_rpm_file = 'any_file.rpm' @mock.patch.object(time, 'sleep', lambda x: None) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_wait_for_ilo_after_reset_ribcl_ok(self, name_mock): # | GIVEN | name_mock.return_value = ribcl_output.GET_PRODUCT_NAME # | WHEN | common.wait_for_ilo_after_reset(self.ribcl) # | THEN | name_mock.assert_called_once_with() @mock.patch.object(time, 'sleep') @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_wait_for_ilo_after_reset_retry(self, name_mock, sleep_mock): # | GIVEN | exc = exception.IloError('error') name_mock.side_effect = [exc, ribcl_output.GET_PRODUCT_NAME] # | WHEN | common.wait_for_ilo_after_reset(self.ribcl) # | THEN | self.assertEqual(2, name_mock.call_count) name_mock.assert_called_with() @mock.patch.object(time, 'sleep') @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_wait_for_ilo_after_reset_fail(self, name_mock, time_mock): # | GIVEN | exc = exception.IloError('error') name_mock.side_effect = exc # | WHEN | & | THEN | self.assertRaises(exception.IloError, common.wait_for_ilo_after_reset, self.ribcl) self.assertEqual(10, name_mock.call_count) name_mock.assert_called_with() @mock.patch.object(time, 'sleep') @mock.patch.object(ris.RISOperations, 'get_firmware_update_progress') @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_wait_for_ris_firmware_update_to_complete_ok( self, get_firmware_update_progress_mock, sleep_mock): # | GIVEN | get_firmware_update_progress_mock.side_effect = [('PROGRESSING', 25), ('COMPLETED', 100)] # | WHEN | common.wait_for_ris_firmware_update_to_complete(self.ris) # | THEN | self.assertEqual(2, get_firmware_update_progress_mock.call_count) @mock.patch.object(time, 'sleep') @mock.patch.object(ris.RISOperations, 'get_firmware_update_progress') @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_wait_for_ris_firmware_update_to_complete_retry_on_exception( self, get_firmware_update_progress_mock, sleep_mock): # | GIVEN | exc = exception.IloError('error') get_firmware_update_progress_mock.side_effect = [('PROGRESSING', 25), exc, ('COMPLETED', 100)] # | WHEN | common.wait_for_ris_firmware_update_to_complete(self.ris) # | THEN | self.assertEqual(3, get_firmware_update_progress_mock.call_count) @mock.patch.object(time, 'sleep') @mock.patch.object(ris.RISOperations, 'get_firmware_update_progress') @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_wait_for_ris_firmware_update_to_complete_multiple_retries( self, get_firmware_update_progress_mock, sleep_mock): # | GIVEN | get_firmware_update_progress_mock.side_effect = [('IDLE', 0), ('PROGRESSING', 25), ('PROGRESSING', 50), ('PROGRESSING', 75), ('ERROR', 0)] # | WHEN | common.wait_for_ris_firmware_update_to_complete(self.ris) # | THEN | self.assertEqual(5, get_firmware_update_progress_mock.call_count) @mock.patch.object(time, 'sleep') @mock.patch.object(ris.RISOperations, 'get_firmware_update_progress') def test_wait_for_ris_firmware_update_to_complete_fail( self, get_firmware_update_progress_mock, sleep_mock): # | GIVEN | exc = exception.IloError('error') get_firmware_update_progress_mock.side_effect = exc # | WHEN | & | THEN | self.assertRaises(exception.IloError, common.wait_for_ris_firmware_update_to_complete, self.ris) self.assertEqual(10, get_firmware_update_progress_mock.call_count) @mock.patch.object(time, 'sleep') @mock.patch.object(ris.RISOperations, 'get_firmware_update_progress') @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_wait_for_ris_firmware_update_to_complete_for_very_quick_update( self, get_firmware_update_progress_mock, sleep_mock): # | GIVEN | get_firmware_update_progress_mock.side_effect = [('COMPLETED', 100)] # | WHEN | common.wait_for_ris_firmware_update_to_complete(self.ris) # | THEN | self.assertEqual(1, get_firmware_update_progress_mock.call_count) @mock.patch.object(time, 'sleep') @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_wait_for_ribcl_firmware_update_to_complete_retries_till_exception( self, get_product_name_mock, sleep_mock): # | GIVEN | exc = exception.IloError('error') get_product_name_mock.side_effect = ['Rap metal', 'Death metal', exc] # | WHEN | common.wait_for_ribcl_firmware_update_to_complete(self.ribcl) # | THEN | self.assertEqual(3, get_product_name_mock.call_count) @mock.patch.object(time, 'sleep') @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_wait_for_ribcl_firmware_update_silent_if_reset_exc_not_captured( self, get_product_name_mock, sleep_mock): # | GIVEN | get_product_name_mock.side_effect = [ 'Rap metal', 'Death metal', 'Black metal', 'Extreme metal', 'Folk metal', 'Gothic metal', 'Power metal', 'War metal', 'Thrash metal', 'Groove metal'] # | WHEN | common.wait_for_ribcl_firmware_update_to_complete(self.ribcl) # | THEN | self.assertEqual(10, get_product_name_mock.call_count) @ddt.data(('/path/to/file.scexe', 'file', '.scexe'), ('/path/to/.hidden', '.hidden', ''), ('filename', 'filename', ''), ('filename.txt.bk', 'filename.txt', '.bk'), ('//filename.txt', 'filename', '.txt'), ('.filename.txt.bk', '.filename.txt', '.bk'), ('/', '', ''), ('.', '.', ''),) @ddt.unpack def test_get_filename_and_extension_of( self, input_file_path, expected_file_name, expected_file_ext): # | WHEN | actual_file_name, actual_file_ext = ( common.get_filename_and_extension_of(input_file_path)) # | THEN | self.assertEqual(actual_file_name, expected_file_name) self.assertEqual(actual_file_ext, expected_file_ext) @mock.patch.object(common, 'os', autospec=True) @mock.patch.object(common, 'stat', autospec=True) def test_add_exec_permission_to(self, stat_mock, os_mock): # | GIVEN | any_file = 'any_file' # | WHEN | common.add_exec_permission_to(any_file) # | THEN | os_mock.stat.assert_called_once_with(any_file) os_mock.chmod.assert_called_once_with( any_file, os_mock.stat().st_mode | stat_mock.S_IXUSR) def test_get_major_minor_lt_suggested_min(self): ver_str = "iLO 4 v2.05" actual = "2.05" expected = common.get_major_minor(ver_str) self.assertEqual(actual, expected) def test_get_major_minor_eq_suggested_min(self): ver_str = "iLO 4 v2.30" actual = "2.30" expected = common.get_major_minor(ver_str) self.assertEqual(actual, expected) def test_get_major_minor_gt_suggested_min(self): ver_str = "iLO 4 v2.5" actual = "2.5" expected = common.get_major_minor(ver_str) self.assertEqual(actual, expected) def test_get_major_minor_unexpected(self): ver_str = "iLO 4 v" actual = None expected = common.get_major_minor(ver_str) self.assertEqual(actual, expected) @ddt.data((constants.SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY, ('true', 'false')), (constants.SUPPORTED_BOOT_MODE_UEFI_ONLY, ('false', 'true')), (constants.SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI, ('true', 'true'))) @ddt.unpack def test_get_supported_boot_modes(self, boot_mode_value, expected_boot_modes): actual_boot_modes = common.get_supported_boot_modes(boot_mode_value) self.assertEqual(expected_boot_modes, actual_boot_modes) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ilo/test_firmware_controller.py0000664000175000017500000006145400000000000027074 0ustar00zuulzuul00000000000000# Copyright 2016 Hewlett Packard Enterprise Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test Class for Firmware controller.""" import distutils.spawn import os import shutil import tempfile import unittest from unittest import mock import ddt from six.moves import builtins as __builtin__ from proliantutils import exception from proliantutils.ilo import common from proliantutils.ilo import firmware_controller @ddt.ddt class FirmwareControllerModuleTestCase(unittest.TestCase): def setUp(self): # | BEFORE_EACH | super(FirmwareControllerModuleTestCase, self).setUp() self.any_scexe_file = 'any_file.scexe' self.any_rpm_file = 'any_file.rpm' self.any_raw_fw_file = 'any_fw_file.bin' @ddt.data('absolute_path_to_exe', None) @mock.patch.object(firmware_controller, 'shutil', spec=['which']) @mock.patch.object(distutils.spawn, 'find_executable', autospec=True) def test_find_executable_returns(self, expected_ret_val, find_executable_mock, shutil_mock): # | GIVEN | find_executable_mock.return_value = expected_ret_val shutil_mock.which.return_value = expected_ret_val # | WHEN | actual_ret_val = firmware_controller.find_executable('executable') # | THEN | self.assertEqual(expected_ret_val, actual_ret_val) @ddt.data('ilo', 'cpld', 'power_pic', 'bios', 'chassis') def test_check_firmware_update_component_passes_for_valid_component( self, component_type): # | GIVEN | ris_or_ribcl_obj_mock = mock.MagicMock() update_firmware_mock = mock.MagicMock() # Note(deray): Need to set __name__ attribute explicitly to keep # ``six.wraps`` happy. Passing this to the `name` argument at the time # creation of Mock doesn't help. update_firmware_mock.__name__ = 'update_firmware_mock' wrapped_func = (firmware_controller. check_firmware_update_component(update_firmware_mock)) # | WHEN | wrapped_func( ris_or_ribcl_obj_mock, self.any_raw_fw_file, component_type) # | THEN | update_firmware_mock.assert_called_once_with( ris_or_ribcl_obj_mock, self.any_raw_fw_file, component_type) def test_check_firmware_update_component_throws_for_invalid_component( self): # | GIVEN | def func(ris_or_ribcl_obj, filename, component_type): pass wrapped_func = (firmware_controller. check_firmware_update_component(func)) ris_or_ribcl_obj_mock = mock.MagicMock() # | WHEN | & | THEN | self.assertRaises(exception.InvalidInputError, wrapped_func, ris_or_ribcl_obj_mock, self.any_raw_fw_file, 'invalid_component') def test_get_fw_extractor_will_set_the_fw_file_attribute(self): # | WHEN | fw_img_extractor = (firmware_controller. get_fw_extractor(self.any_scexe_file)) # | THEN | self.assertEqual(self.any_scexe_file, fw_img_extractor.fw_file) @mock.patch.object(firmware_controller, '_extract_scexe_file', autospec=True) def test__extract_scexe_file_gets_invoked_for_scexe_firmware_file( self, _extract_scexe_file_mock): # _extract_scexe_file gets invoked when fw_img_extractor is initialized # with scexe firmware file # | WHEN | fw_img_extractor = (firmware_controller. get_fw_extractor(self.any_scexe_file)) fw_img_extractor._do_extract('some_target_file', 'some_extract_path') # | THEN | _extract_scexe_file_mock.assert_called_once_with( fw_img_extractor, 'some_target_file', 'some_extract_path') @mock.patch.object(firmware_controller, '_extract_rpm_file', autospec=True) def test__extract_rpm_file_gets_invoked_for_rpm_firmware_file( self, _extract_rpm_file_mock): # _extract_rpm_file gets invoked when fw_img_extractor is initialized # with rpm firmware file # | WHEN | fw_img_extractor = (firmware_controller. get_fw_extractor(self.any_rpm_file)) fw_img_extractor._do_extract('some_target_file', 'some_extract_path') # | THEN | _extract_rpm_file_mock.assert_called_once_with( fw_img_extractor, 'some_target_file', 'some_extract_path') @ddt.data('any_file.hex', 'any_file.bin', 'any_file.vme', 'any_file.flash') def test_no_op_extract_gets_invoked_for_raw_firmware_file(self, any_raw_file): # no_op extract when fw_img_extractor is initialized # with raw firmware file # | WHEN | fw_img_extractor = firmware_controller.get_fw_extractor(any_raw_file) return_result, is_extracted = fw_img_extractor.extract() # | THEN | self.assertEqual(any_raw_file, return_result) self.assertFalse(is_extracted) def test_get_fw_extractor_raises_exception_with_unknown_firmware_file( self): # | GIVEN | any_invalid_format_firmware_file = 'any_file.abc' # | WHEN | & | THEN | self.assertRaises(exception.InvalidInputError, firmware_controller.get_fw_extractor, any_invalid_format_firmware_file) @mock.patch.object(firmware_controller.utils, 'trycmd', autospec=True) def test__extract_scexe_file_issues_command_as(self, utils_trycmd_mock): # | GIVEN | any_scexe_firmware_file = 'any_file.scexe' any_extract_path = 'any_extract_path' utils_trycmd_mock.return_value = ('out', 'err') # | WHEN | firmware_controller._extract_scexe_file( None, any_scexe_firmware_file, any_extract_path) # | THEN | utils_trycmd_mock.assert_called_once_with( any_scexe_firmware_file, '--unpack=' + any_extract_path) @mock.patch.object(firmware_controller, 'os', autospec=True) @mock.patch.object(firmware_controller, 'subprocess', autospec=True) @mock.patch.object( firmware_controller, 'find_executable', lambda x: mock.ANY) def test__extract_rpm_file_creates_dir_if_extract_path_doesnt_exist( self, subprocess_mock, os_mock): # | GIVEN | any_rpm_firmware_file = 'any_file.rpm' any_extract_path = 'any_extract_path' os_mock.path.exists.return_value = False mock_cpio = mock.MagicMock() mock_cpio.communicate.return_value = ('out', 'err') subsequent_popen_call_returns = [mock.MagicMock(), mock_cpio] subprocess_mock.Popen = mock.MagicMock( side_effect=subsequent_popen_call_returns) # | WHEN | firmware_controller._extract_rpm_file( None, any_rpm_firmware_file, any_extract_path) # | THEN | os_mock.makedirs.assert_called_once_with(any_extract_path) @mock.patch.object(firmware_controller, 'os', autospec=True) @mock.patch.object(firmware_controller, 'subprocess', autospec=True) @mock.patch.object( firmware_controller, 'find_executable', lambda x: mock.ANY) def test__extract_rpm_file_doesnt_create_dir_if_extract_path_present( self, subprocess_mock, os_mock): # extract_rpm_file doesn't create dir if extract path # is already present # | GIVEN | any_rpm_firmware_file = 'any_file.rpm' any_extract_path = 'any_extract_path' os_mock.path.exists.return_value = True mock_cpio = mock.MagicMock() mock_cpio.communicate.return_value = ('out', 'err') subsequent_popen_call_returns = [mock.MagicMock(), mock_cpio] subprocess_mock.Popen = mock.MagicMock( side_effect=subsequent_popen_call_returns) # | WHEN | firmware_controller._extract_rpm_file( None, any_rpm_firmware_file, any_extract_path) # | THEN | self.assertFalse(os_mock.makedirs.called) @mock.patch.object(firmware_controller, 'os', autospec=True) @mock.patch.object(firmware_controller, 'subprocess', autospec=True) def test__extract_rpm_file_raises_exception_if_rpm_or_cpio_exec_not_found( self, subprocess_mock, os_mock): # | GIVEN | any_rpm_firmware_file = 'any_file.rpm' any_extract_path = 'any_extract_path' return_values_for_find_executable_stub = ( [None, 'absolute_path_to_cpio'], # `rpm2cpio` not present ['absolute_path_to_rpm2cpio', None] # `cpio` not present ) # | WHEN | & | THEN | for input in return_values_for_find_executable_stub: with mock.patch.object( firmware_controller, 'find_executable') as find_mock: find_mock.side_effect = input self.assertRaises(exception.ImageExtractionFailed, firmware_controller._extract_rpm_file, None, any_rpm_firmware_file, any_extract_path) @mock.patch.object(firmware_controller, 'os', autospec=True) @mock.patch.object(firmware_controller, 'subprocess', autospec=True) @mock.patch.object( firmware_controller, 'find_executable', lambda x: mock.ANY) def test__extract_rpm_file_issues_commands_as(self, subprocess_mock, os_mock): # | GIVEN | any_rpm_firmware_file = 'any_file.rpm' any_extract_path = 'any_extract_path' os_mock.path.exists.return_value = True rpm2cpio_mock = mock.MagicMock() cpio_mock = mock.MagicMock() cpio_mock.communicate.return_value = ('out', 'err') subsequent_popen_call_returns = [rpm2cpio_mock, cpio_mock] subprocess_mock.Popen = mock.MagicMock( side_effect=subsequent_popen_call_returns) # | WHEN | firmware_controller._extract_rpm_file( None, any_rpm_firmware_file, any_extract_path) # | THEN | popen_calls_to_assert = [ mock.call.Popen('rpm2cpio ' + any_rpm_firmware_file, shell=True, stdout=subprocess_mock.PIPE), mock.call.Popen('cpio -idm', shell=True, stdin=rpm2cpio_mock.stdout), ] subprocess_mock.assert_has_calls(popen_calls_to_assert) cpio_mock.communicate.assert_called_once_with() @mock.patch.object(firmware_controller, 'os', autospec=True) @mock.patch.object(firmware_controller, 'subprocess', autospec=True) @mock.patch.object( firmware_controller, 'find_executable', lambda x: mock.ANY) def test__extract_rpm_file_raises_exception_if_it_fails(self, subprocess_mock, os_mock): # | GIVEN | any_rpm_firmware_file = 'any_file.rpm' any_extract_path = 'any_extract_path' rpm2cpio_mock = mock.MagicMock() cpio_mock = mock.MagicMock() cpio_mock.communicate.side_effect = ValueError subsequent_popen_call_returns = [rpm2cpio_mock, cpio_mock] subprocess_mock.Popen = mock.MagicMock( side_effect=subsequent_popen_call_returns) # | WHEN | & | THEN | self.assertRaises(exception.ImageExtractionFailed, firmware_controller._extract_rpm_file, None, any_rpm_firmware_file, any_extract_path) def test__get_firmware_file(self): # | GIVEN | temp_dir_setup = setup_fixture_create_fw_file_extracts_for('scexe') # | WHEN | return_result = firmware_controller._get_firmware_file(temp_dir_setup) # | THEN | self.assertTrue(return_result.endswith('.bin')) teardown_fixture_create_fw_file_extracts_for(temp_dir_setup) @mock.patch.object( firmware_controller, '_get_firmware_file', autospec=True) @mock.patch.object(common, 'get_filename_and_extension_of', autospec=True) @mock.patch.object(firmware_controller, 'tempfile', autospec=True) @mock.patch.object(firmware_controller.uuid, 'uuid4', autospec=True) @mock.patch.object(firmware_controller.os, 'link', autospec=True) def test__get_firmware_file_in_new_path( self, os_link_mock, uuid4_mock, tempfile_mock, get_filename_and_extension_of_mock, _get_firmware_file_mock): # | GIVEN | _get_firmware_file_mock.return_value = 'some_raw_fw_file.bin' get_filename_and_extension_of_mock.return_value = ('some_raw_fw_file', '.bin') tempfile_mock.gettempdir.return_value = '/tmp' uuid4_mock.return_value = 12345 # | WHEN | new_fw_file_path = (firmware_controller. _get_firmware_file_in_new_path('any_path')) # | THEN | _get_firmware_file_mock.assert_called_once_with('any_path') # tests the hard linking of the raw fw file so found os_link_mock.assert_called_once_with( 'some_raw_fw_file.bin', '/tmp/12345_some_raw_fw_file.bin') self.assertEqual(new_fw_file_path, '/tmp/12345_some_raw_fw_file.bin') @mock.patch.object( firmware_controller, '_get_firmware_file', autospec=True) def test__get_firmware_file_in_new_path_returns_none_for_file_not_found( self, _get_firmware_file_mock): # | GIVEN | _get_firmware_file_mock.return_value = None # | WHEN | actual_result = (firmware_controller. _get_firmware_file_in_new_path('any_path')) # | THEN | self.assertIsNone(actual_result) def teardown_fixture_create_fw_file_extracts_for(temp_dir): # os.removedirs(temp_dir) shutil.rmtree(temp_dir) def setup_fixture_create_fw_file_extracts_for(format): temp_dir = tempfile.mkdtemp() fw_file_exts = [ '_ilo', '.bin', '.xml', '.TXT', '.hpsetup', '.cpq_package.inc' ] if format == 'scexe': fw_files_dir = temp_dir elif format == 'rpm': fw_files_dir = os.path.join( temp_dir + '/please_remove_rpm_file_extracts/usr/lib/i386-linux-gnu/' + 'hp-firmware-iloX-xxxx' ) else: fw_files_dir = temp_dir if not os.path.exists(fw_files_dir): os.makedirs(fw_files_dir) for fw_file_ext in fw_file_exts: tempfile.NamedTemporaryFile(suffix=fw_file_ext, dir=fw_files_dir, delete=False) return temp_dir class FirmwareImageExtractorTestCase(unittest.TestCase): def setUp(self): # | BEFORE_EACH | self.any_scexe_file = 'any_file.scexe' self.any_rpm_file = 'any_file.rpm' @mock.patch.object(common, 'add_exec_permission_to', autospec=True) @mock.patch.object(firmware_controller, 'tempfile', autospec=True) @mock.patch.object(firmware_controller, 'os', autospec=True) @mock.patch.object(firmware_controller, '_get_firmware_file_in_new_path', autospec=True) @mock.patch.object(firmware_controller, 'shutil', autospec=True) def test_extract_method_calls__do_extract_in_turn( self, shutil_mock, _get_firmware_file_in_new_path_mock, os_mock, tempfile_mock, add_exec_permission_to_mock): # | GIVEN | os_mock.path.splitext.return_value = ('any_file', '.scexe') fw_img_extractor = (firmware_controller. get_fw_extractor(self.any_scexe_file)) # Now mock the _do_extract method of fw_img_extractor instance _do_extract_mock = mock.MagicMock() fw_img_extractor._do_extract = _do_extract_mock expected_return_result = 'extracted_firmware_file' _get_firmware_file_in_new_path_mock.return_value = ( expected_return_result) # | WHEN | actual_return_result, is_extracted = fw_img_extractor.extract() # | THEN | _do_extract_mock.assert_called_once_with(self.any_scexe_file, mock.ANY) self.assertEqual(expected_return_result, actual_return_result) @mock.patch.object(common, 'add_exec_permission_to', autospec=True) @mock.patch.object(firmware_controller, 'tempfile', autospec=True) @mock.patch.object(firmware_controller, 'os', autospec=True) @mock.patch.object(firmware_controller, '_get_firmware_file_in_new_path', autospec=True) @mock.patch.object(firmware_controller, 'shutil', autospec=True) def test_extract_deletes_temp_extracted_folder_before_raising_exception( self, shutil_mock, _get_firmware_file_in_new_path_mock, os_mock, tempfile_mock, add_exec_permission_to_mock): # | GIVEN | os_mock.path.splitext.return_value = ('any_file', '.rpm') fw_img_extractor = (firmware_controller. get_fw_extractor(self.any_rpm_file)) # Now mock the _do_extract method of fw_img_extractor instance exc = exception.ImageExtractionFailed( image_ref=self.any_rpm_file, reason='God only knows!') _do_extract_mock = mock.MagicMock(side_effect=exc) fw_img_extractor._do_extract = _do_extract_mock # | WHEN | & | THEN | self.assertRaises(exception.ImageExtractionFailed, fw_img_extractor.extract) shutil_mock.rmtree.assert_called_once_with( tempfile_mock.mkdtemp.return_value, ignore_errors=True) @mock.patch.object(common, 'add_exec_permission_to', autospec=True) @mock.patch.object(firmware_controller, 'tempfile', autospec=True) @mock.patch.object(firmware_controller, 'os', autospec=True) @mock.patch.object(firmware_controller, '_extract_scexe_file', autospec=True) @mock.patch.object(firmware_controller, '_get_firmware_file_in_new_path', autospec=True) @mock.patch.object(firmware_controller, 'shutil', autospec=True) def test_extract_method_raises_exception_if_raw_fw_file_not_found( self, shutil_mock, _get_firmware_file_in_new_path_mock, _extract_scexe_mock, os_mock, tempfile_mock, add_exec_permission_to_mock): # | GIVEN | os_mock.path.splitext.return_value = ('any_file', '.scexe') _get_firmware_file_in_new_path_mock.return_value = None fw_img_extractor = (firmware_controller. get_fw_extractor(self.any_scexe_file)) # | WHEN | & | THEN | self.assertRaises(exception.InvalidInputError, fw_img_extractor.extract) @mock.patch.object(common, 'add_exec_permission_to', autospec=True) @mock.patch.object(firmware_controller, 'tempfile', autospec=True) @mock.patch.object(firmware_controller, '_extract_scexe_file', autospec=True) @mock.patch.object(firmware_controller, '_extract_rpm_file', autospec=True) # don't use autospec=True here(below one), setting side_effect # causes issue. refer https://bugs.python.org/issue17826 @mock.patch.object(firmware_controller, '_get_firmware_file_in_new_path') @mock.patch.object(firmware_controller, 'shutil', autospec=True) def test_successive_calls_to_extract_method( self, shutil_mock, _get_firmware_file_in_new_path_mock, _extract_rpm_mock, _extract_scexe_mock, tempfile_mock, add_exec_permission_to_mock): """This is more of an integration test of the extract method """ # | GIVEN | firmware_files = [ self.any_scexe_file, 'any_file.bin', self.any_rpm_file, ] actual_raw_fw_files = [] expected_raw_fw_files = [ ('extracted_file_from_scexe', True), ('any_file.bin', False), ('extracted_file_from_rpm', True) ] _get_firmware_file_in_new_path_mock.side_effect = [ 'extracted_file_from_scexe', 'extracted_file_from_rpm', ] tempfile_mock.mkdtemp.side_effect = [ '/tmp', '/tmp', '/tmp' ] # | WHEN | for fw_file in firmware_files: fw_img_extractor = firmware_controller.get_fw_extractor(fw_file) raw_fw_file, is_extracted = fw_img_extractor.extract() actual_raw_fw_files.append((raw_fw_file, is_extracted)) # | THEN | self.assertSequenceEqual(actual_raw_fw_files, expected_raw_fw_files) @ddt.ddt class FirmwareImageUploaderTestCase(unittest.TestCase): def setUp(self): # | BEFORE_EACH | self.any_scexe_file = 'any_file.scexe' self.any_rpm_file = 'any_file.rpm' @mock.patch.object(firmware_controller.FirmwareImageUploader, '_get_socket', autospec=True) @mock.patch.object(firmware_controller, 'socket') @mock.patch.object(__builtin__, 'open', autospec=True) def test_upload_file_to_returns_cookie_after_successful_upload( self, open_mock, socket_mock, _get_socket_mock): # | GIVEN | sock_mock = _get_socket_mock.return_value sock_mock.read.side_effect = [b'data returned from socket with ', b'Set-Cookie: blah_blah_cookie', b''] fw_img_uploader = (firmware_controller. FirmwareImageUploader('any_raw_file')) # | WHEN | cookie = fw_img_uploader.upload_file_to(('host', 'port'), 60) # | THEN | self.assertEqual('blah_blah_cookie', cookie) @mock.patch.object(firmware_controller.FirmwareImageUploader, '_get_socket', autospec=True) @mock.patch.object(firmware_controller, 'socket') @mock.patch.object(__builtin__, 'open', autospec=True) def test_upload_file_to_throws_exception_when_cookie_not_returned( self, open_mock, socket_mock, _get_socket_mock): # | GIVEN | sock_mock = _get_socket_mock.return_value sock_mock.read.side_effect = [b'data returned from socket with ', b'No-Cookie', b''] fw_img_uploader = (firmware_controller. FirmwareImageUploader('any_raw_file')) # | WHEN | & | THEN | self.assertRaises(exception.IloError, fw_img_uploader.upload_file_to, ('host', 'port'), 60) @mock.patch.object(firmware_controller, 'socket') @mock.patch.object(firmware_controller, 'ssl') def test__get_socket_returns_ssl_wrapped_socket_if_all_goes_well( self, ssl_mock, socket_mock): # | GIVEN | socket_mock.getaddrinfo().__iter__.return_value = [ # (family, socktype, proto, canonname, sockaddr), (10, 1, 6, '', ('2606:2800:220:1:248:1893:25c8:1946', 80, 0, 0)), (2, 1, 6, '', ('0.0.0.0-some-address', 80)), ] fw_img_uploader = (firmware_controller. FirmwareImageUploader('any_raw_file')) fw_img_uploader.hostname = 'host' fw_img_uploader.port = 443 fw_img_uploader.timeout = 'timeout' # | WHEN | returned_sock = fw_img_uploader._get_socket() # | THEN | socket_mock.socket.assert_has_calls([ mock.call(10, 1, 6), mock.call().settimeout('timeout'), mock.call().connect( ('2606:2800:220:1:248:1893:25c8:1946', 80, 0, 0)), mock.call(2, 1, 6), mock.call().settimeout('timeout'), mock.call().connect(('0.0.0.0-some-address', 80)), ]) self.assertTrue(ssl_mock.wrap_socket.called) self.assertEqual(returned_sock, ssl_mock.wrap_socket()) @ddt.data(('foo.bar.blah.blah', exception.IloConnectionError),) @ddt.unpack def test__get_socket_throws_exception_in_case_of_failed_connection( self, input_hostname, expected_exception_type): # | GIVEN | fw_img_uploader = (firmware_controller. FirmwareImageUploader('any_raw_file')) fw_img_uploader.hostname = input_hostname fw_img_uploader.port = 443 fw_img_uploader.timeout = 1 # | WHEN | & | THEN | self.assertRaises(expected_exception_type, fw_img_uploader._get_socket) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ilo/test_ipmi.py0000664000175000017500000002001300000000000023735 0ustar00zuulzuul00000000000000# Copyright 2014 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test class for IPMI Module.""" import subprocess import unittest from unittest import mock from proliantutils.ilo import ipmi from proliantutils.tests.ilo import ipmi_sample_outputs as constants class IloIpmiTestCase(unittest.TestCase): def setUp(self): super(IloIpmiTestCase, self).setUp() self.info = {'address': "x.x.x.x", 'username': "admin", 'password': "Admin"} def test_get_ilo_version_valid_1(self): in_vals = '2.03' expected = 2.03 actual = ipmi.get_ilo_version(in_vals) self.assertEqual(actual, expected) def test_get_ilo_version_valid_2(self): in_vals = '2.3' expected = 2.30 actual = ipmi.get_ilo_version(in_vals) self.assertEqual(actual, expected) def test_get_ilo_version_invalid(self): in_vals = 'x.y' expected = None actual = ipmi.get_ilo_version(in_vals) self.assertEqual(actual, expected) def test_get_ilo_version_appended_spaces(self): in_vals = ' 2.50 ' expected = 2.5 actual = ipmi.get_ilo_version(in_vals) self.assertEqual(actual, expected) def test_get_ilo_version_none(self): in_vals = None expected = None actual = ipmi.get_ilo_version(in_vals) self.assertEqual(actual, expected) @mock.patch.object(ipmi, '_parse_ipmi_nic_capacity') @mock.patch.object(ipmi, '_exec_ipmitool') def test_get_nic_capacity_fw_lt_suggested(self, ipmi_mock, parse_mock): fw_rev = constants.LESSER_THAN_MIN_SUGGESTED_FW_STR ipmi_mock.return_value = constants.NIC_FRU_OUT parse_mock.return_value = "1Gb" expected_out = "1Gb" actual_out = ipmi.get_nic_capacity(self.info, fw_rev) self.assertEqual(expected_out, actual_out) ipmi_mock.assert_called_once_with(mock.ANY, "fru print 0x0") @mock.patch.object(ipmi, '_parse_ipmi_nic_capacity') @mock.patch.object(ipmi, '_exec_ipmitool') def test_get_nic_capacity_fw_lt_suggested_none(self, ipmi_mock, parse_mock): fw_rev = constants.LESSER_THAN_MIN_SUGGESTED_FW_STR ipmi_mock.return_value = constants.NIC_FRU_OUT parse_mock.return_value = None actual_out = ipmi.get_nic_capacity(self.info, fw_rev) self.assertIsNone(actual_out) self.assertEqual(ipmi_mock.call_count, 126) @mock.patch.object(ipmi, '_parse_ipmi_nic_capacity') @mock.patch.object(ipmi, '_exec_ipmitool') def test_get_nic_capacity_fw_lt_suggested_out_of_range_check( self, ipmi_mock, parse_mock): fw_rev = constants.LESSER_THAN_MIN_SUGGESTED_FW_STR actual_out = ipmi.get_nic_capacity(self.info, fw_rev) format_call_args = map(lambda x: x[0][1], ipmi_mock.call_args_list) self.assertNotIn("fru print 0x7d", format_call_args) self.assertEqual(actual_out, None) @mock.patch.object(ipmi, '_parse_ipmi_nic_capacity') @mock.patch.object(ipmi, '_exec_ipmitool') def test_get_nic_capacity_fw_lt_suggested_in_range_check( self, ipmi_mock, parse_mock): fw_rev = constants.LESSER_THAN_MIN_SUGGESTED_FW_STR actual_out = ipmi.get_nic_capacity(self.info, fw_rev) format_call_args = map(lambda x: x[0][1], ipmi_mock.call_args_list) self.assertIn("fru print 0xef", format_call_args) self.assertEqual(actual_out, None) @mock.patch.object(ipmi, '_parse_ipmi_nic_capacity') @mock.patch.object(ipmi, '_exec_ipmitool') def test_get_nic_capacity_fw_suggested(self, ipmi_mock, parse_mock): fw_rev = constants.MIN_SUGGESTED_FW_STR ipmi_mock.return_value = constants.NIC_FRU_OUT_ALL parse_mock.return_value = "1Gb" expected_out = "1Gb" actual_out = ipmi.get_nic_capacity(self.info, fw_rev) self.assertEqual(expected_out, actual_out) ipmi_mock.assert_called_once_with(mock.ANY, "fru print") self.assertEqual(ipmi_mock.call_count, 1) @mock.patch.object(ipmi, '_parse_ipmi_nic_capacity') @mock.patch.object(ipmi, '_exec_ipmitool') def test_get_nic_capacity_fw_suggested_none(self, ipmi_mock, parse_mock): fw_rev = constants.MIN_SUGGESTED_FW_STR ipmi_mock.return_value = constants.NIC_FRU_OUT_ALL parse_mock.return_value = None actual_out = ipmi.get_nic_capacity(self.info, fw_rev) self.assertIsNone(actual_out) self.assertEqual(ipmi_mock.call_count, 1) @mock.patch.object(ipmi, '_parse_ipmi_nic_capacity') @mock.patch.object(ipmi, '_exec_ipmitool') def test_get_nic_capacity_fw_gt_suggested(self, ipmi_mock, parse_mock): fw_rev = constants.GREATER_THAN_MIN_SUGGESTED_FW_STR ipmi_mock.return_value = constants.NIC_FRU_OUT_ALL parse_mock.return_value = "1Gb" expected_out = "1Gb" actual_out = ipmi.get_nic_capacity(self.info, fw_rev) self.assertEqual(expected_out, actual_out) ipmi_mock.assert_called_once_with(mock.ANY, "fru print") @mock.patch.object(ipmi, '_parse_ipmi_nic_capacity') @mock.patch.object(ipmi, '_exec_ipmitool') def test_get_nic_capacity_fw_lt_suggested_loop_N_times(self, ipmi_mock, parse_mock): fw_rev = constants.LESSER_THAN_MIN_SUGGESTED_FW_STR ipmi_mock.side_effect = ["Device not present", "Device not present", "Device not present", "Device not present", "Device not present", "Device not present", "Device not present", "Device not present", constants.NIC_FRU_OUT] parse_mock.return_value = "1Gb" expected_out = "1Gb" actual_out = ipmi.get_nic_capacity(self.info, fw_rev) self.assertEqual(ipmi_mock.call_count, 9) self.assertEqual(expected_out, actual_out) @mock.patch.object(subprocess, 'Popen') def test__exec_ipmitool(self, popen_mock): pro_obj = mock.MagicMock() popen_mock.return_value = pro_obj pro_obj.communicate.return_value = constants.NIC_FRU_OUT_TUPLE expected_output = constants.NIC_FRU_OUT cmd = "fru print 0x64" actual_out = ipmi._exec_ipmitool(self.info, cmd) self.assertEqual(expected_output, actual_out) @mock.patch.object(subprocess, 'Popen') def test__exec_ipmitool_none(self, popen_mock): popen_mock.side_effect = Exception cmd = "fru print 0x2" actual_out = ipmi._exec_ipmitool(self.info, cmd) self.assertIsNone(actual_out) def test__parse_ipmi_nic_capacity(self): exec_output = constants.NIC_FRU_OUT expected_output = "1Gb" actual_out = ipmi._parse_ipmi_nic_capacity(exec_output) self.assertEqual(expected_output, actual_out) def test__parse_ipmi_nic_capacity_no_port_details(self): exec_output = constants.NIC_FRU_OUT_NO_PORT_DETAILS actual_out = ipmi._parse_ipmi_nic_capacity(exec_output) self.assertIsNone(actual_out) def test__parse_ipmi_nic_capacity_no_product_name(self): exec_output = constants.NIC_FRU_OUT_NO_PRODUCT_NAME actual_out = ipmi._parse_ipmi_nic_capacity(exec_output) self.assertIsNone(actual_out) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ilo/test_operations.py0000664000175000017500000000271600000000000025174 0ustar00zuulzuul00000000000000# Copyright 2015 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test Class for Common Operations.""" import unittest from proliantutils.ilo import operations class IloOperationsTestCase(unittest.TestCase): def setUp(self): super(IloOperationsTestCase, self).setUp() self.operations_object = operations.IloOperations() def test__okay(self): self.operations_object.host = '1.2.3.4' self.assertEqual('[iLO 1.2.3.4] foo', self.operations_object._('foo')) def test__no_host(self): self.assertEqual('[iLO ] foo', self.operations_object._('foo')) def test__ipv6_host(self): self.operations_object.host = 'FE80::9EB6:54FF:FEB1:ACEE%ens37' self.assertEqual('[iLO FE80::9EB6:54FF:FEB1:ACEE%%ens37] foo', self.operations_object._('foo')) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ilo/test_ribcl.py0000664000175000017500000014527500000000000024114 0ustar00zuulzuul00000000000000# Copyright 2022 Hewlett Packard Enterprise Development Company, L.P. # Copyright 2014 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test class for RIBCL Module.""" import json import re import unittest from unittest import mock import xml.etree.ElementTree as ET import ddt import requests from requests.packages import urllib3 from requests.packages.urllib3 import exceptions as urllib3_exceptions import xmltodict from proliantutils import exception from proliantutils.ilo import common from proliantutils.ilo import constants as cons from proliantutils.ilo import ribcl from proliantutils.tests.ilo import ribcl_sample_outputs as constants from proliantutils import utils class MaskedRequestDataTestCase(unittest.TestCase): def setUp(self): super(MaskedRequestDataTestCase, self).setUp() self.maskedRequestData = ribcl.MaskedRequestData({}) def test___str__with_user_credential_present(self): xml_data = ( '' '' '') masked_xml_data = ( '\'' '' '\'') self.maskedRequestData.request_data = {'headers': 'some-headers', 'data': xml_data, 'verify': False} self.assertIn(masked_xml_data, str(self.maskedRequestData)) def test___str__with_user_credential_not_present(self): xml_data = ( '' '') self.maskedRequestData.request_data = {'headers': 'some-headers', 'data': xml_data, 'verify': True} self.assertIn(xml_data, str(self.maskedRequestData)) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name', lambda x: 'ProLiant DL580 Gen8') class IloRibclTestCaseInitTestCase(unittest.TestCase): @mock.patch.object(urllib3, 'disable_warnings') def test_init(self, disable_warning_mock): ribcl_client = ribcl.RIBCLOperations( "x.x.x.x", "admin", "Admin", 60, 443, cacert='/somepath') self.assertEqual(ribcl_client.host, "x.x.x.x") self.assertEqual(ribcl_client.login, "admin") self.assertEqual(ribcl_client.password, "Admin") self.assertEqual(ribcl_client.timeout, 60) self.assertEqual(ribcl_client.port, 443) self.assertEqual(ribcl_client.cacert, '/somepath') @mock.patch.object(urllib3, 'disable_warnings') def test_init_without_cacert(self, disable_warning_mock): ribcl_client = ribcl.RIBCLOperations( "x.x.x.x", "admin", "Admin", 60, 443) self.assertEqual(ribcl_client.host, "x.x.x.x") self.assertEqual(ribcl_client.login, "admin") self.assertEqual(ribcl_client.password, "Admin") self.assertEqual(ribcl_client.timeout, 60) self.assertEqual(ribcl_client.port, 443) self.assertIsNone(ribcl_client.cacert) disable_warning_mock.assert_called_once_with( urllib3_exceptions.InsecureRequestWarning) @ddt.ddt class IloRibclTestCase(unittest.TestCase): def setUp(self): super(IloRibclTestCase, self).setUp() self.ilo = ribcl.RIBCLOperations("x.x.x.x", "admin", "Admin", 60, 443) self.ilo.init_model_based_tags('ProLiant DL580 Gen8') self.maxDiff = None def test_init_model_based_tags_gen7(self): self.ilo.init_model_based_tags('Proliant DL380 G7') self.assertEqual(self.ilo.MEMORY_SIZE_TAG, "MEMORY_SIZE") self.assertEqual(self.ilo.MEMORY_SIZE_NOT_PRESENT_TAG, "Not Installed") self.assertEqual(self.ilo.NIC_INFORMATION_TAG, "NIC_INFOMATION") def test_init_model_based_tags(self): self.ilo.init_model_based_tags('ProLiant DL580 Gen8') self.assertEqual(self.ilo.MEMORY_SIZE_TAG, "TOTAL_MEMORY_SIZE") self.assertEqual(self.ilo.MEMORY_SIZE_NOT_PRESENT_TAG, "N/A") self.assertEqual(self.ilo.NIC_INFORMATION_TAG, "NIC_INFORMATION") @mock.patch.object(ribcl.RIBCLOperations, '_serialize_xml') @mock.patch.object(requests, 'post') def test__request_ilo_without_verify(self, post_mock, serialize_mock): response_mock = mock.MagicMock(text='returned-text') serialize_mock.return_value = 'serialized-xml' post_mock.return_value = response_mock retval = self.ilo._request_ilo('xml-obj') post_mock.assert_called_once_with( 'https://x.x.x.x:443/ribcl', headers={"Content-length": '14'}, data='serialized-xml', verify=False) response_mock.raise_for_status.assert_called_once_with() self.assertEqual('returned-text', retval) @mock.patch.object(ribcl.RIBCLOperations, '_serialize_xml') @mock.patch.object(requests, 'post') def test__request_ilo_with_verify(self, post_mock, serialize_mock): self.ilo = ribcl.RIBCLOperations( "x.x.x.x", "admin", "Admin", 60, 443, cacert='/somepath') response_mock = mock.MagicMock(text='returned-text') serialize_mock.return_value = 'serialized-xml' post_mock.return_value = response_mock retval = self.ilo._request_ilo('xml-obj') post_mock.assert_called_once_with( 'https://x.x.x.x:443/ribcl', headers={"Content-length": '14'}, data='serialized-xml', verify='/somepath') response_mock.raise_for_status.assert_called_once_with() self.assertEqual('returned-text', retval) @mock.patch.object(ribcl.RIBCLOperations, '_serialize_xml') @mock.patch.object(requests, 'post') def test__request_ilo_raises(self, post_mock, serialize_mock): serialize_mock.return_value = 'serialized-xml' post_mock.side_effect = Exception self.assertRaises(exception.IloConnectionError, self.ilo._request_ilo, 'xml-obj') post_mock.assert_called_once_with( 'https://x.x.x.x:443/ribcl', headers={"Content-length": '14'}, data='serialized-xml', verify=False) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_login_fail(self, request_ilo_mock): request_ilo_mock.return_value = constants.LOGIN_FAIL_XML self.assertRaises(exception.IloError, self.ilo.get_all_licenses) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_hold_pwr_btn(self, request_ilo_mock): request_ilo_mock.return_value = constants.HOLD_PWR_BTN_XML result = self.ilo.hold_pwr_btn() self.assertIn('Host power is already OFF.', result) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_vm_status_none(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_VM_STATUS_XML result = self.ilo.get_vm_status() self.assertIsInstance(result, dict) self.assertIn('DEVICE', result) self.assertIn('WRITE_PROTECT', result) self.assertIn('VM_APPLET', result) self.assertIn('IMAGE_URL', result) self.assertIn('IMAGE_INSERTED', result) self.assertIn('BOOT_OPTION', result) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_vm_status_cdrom(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_VM_STATUS_CDROM_XML result = self.ilo.get_vm_status('cdrom') self.assertIsInstance(result, dict) self.assertIn('DEVICE', result) self.assertIn('WRITE_PROTECT', result) self.assertIn('VM_APPLET', result) self.assertIn('IMAGE_URL', result) self.assertIn('IMAGE_INSERTED', result) self.assertIn('BOOT_OPTION', result) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_vm_status_error(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_VM_STATUS_ERROR_XML self.assertRaises( exception.IloError, self.ilo.get_vm_status) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_all_licenses(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_ALL_LICENSES_XML result = self.ilo.get_all_licenses() self.assertIsInstance(result, dict) self.assertIn('LICENSE_TYPE', result) self.assertIn('LICENSE_INSTALL_DATE', result) self.assertIn('LICENSE_KEY', result) self.assertIn('LICENSE_CLASS', result) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_one_time_boot(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_ONE_TIME_BOOT_XML result = self.ilo.get_one_time_boot() self.assertIn('NORMAL', result.upper()) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_host_power_status(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_HOST_POWER_STATUS_XML result = self.ilo.get_host_power_status() self.assertIn('ON', result) def test_get_http_boot_url(self): self.assertRaises( exception.IloCommandNotSupportedError, self.ilo.get_http_boot_url ) def test_set_http_boot_url(self): self.assertRaises( exception.IloCommandNotSupportedError, self.ilo.set_http_boot_url, 'http://10.10.1.30:8081/startup.nsh' ) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_reset_server(self, request_ilo_mock): request_ilo_mock.return_value = constants.RESET_SERVER_XML result = self.ilo.reset_server() self.assertIn('server being reset', result.lower()) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_press_pwr_btn(self, request_ilo_mock): request_ilo_mock.return_value = constants.PRESS_POWER_BTN_XML result = self.ilo.press_pwr_btn() self.assertIsNone(result) self.assertTrue(request_ilo_mock.called) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_set_host_power(self, request_ilo_mock): request_ilo_mock.return_value = constants.SET_HOST_POWER_XML result = self.ilo.set_host_power('ON') self.assertIn('Host power is already ON.', result) self.assertRaises(exception.IloInvalidInputError, self.ilo.set_host_power, 'ErrorCase') @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_set_one_time_boot(self, request_ilo_mock): request_ilo_mock.return_value = constants.SET_ONE_TIME_BOOT_XML self.ilo.set_one_time_boot('NORMAL') self.assertTrue(request_ilo_mock.called) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') @mock.patch.object(utils, 'validate_href') def test_insert_virtual_media(self, validate_href_mock, request_ilo_mock): request_ilo_mock.return_value = constants.INSERT_VIRTUAL_MEDIA_XML result = self.ilo.insert_virtual_media('any_url', 'floppy') self.assertIsNone(result) self.assertTrue(request_ilo_mock.called) validate_href_mock.assert_called_once_with('any_url') @mock.patch.object(ribcl.RIBCLOperations, 'get_vm_status') @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_eject_virtual_media_no_media( self, request_ilo_mock, get_vm_status_mock): """Ensure we don't try to eject media when no media is present.""" get_vm_status_mock.return_value = {'IMAGE_INSERTED': 'NO'} self.ilo.eject_virtual_media(device='FLOPPY') get_vm_status_mock.assert_called_once_with(device='FLOPPY') self.assertFalse(request_ilo_mock.called) @mock.patch.object(ribcl.RIBCLOperations, 'get_vm_status') @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_eject_virtual_media( self, request_ilo_mock, get_vm_status_mock): """Ensure we try to eject media when media is present.""" get_vm_status_mock.return_value = {'IMAGE_INSERTED': 'YES'} request_ilo_mock.return_value = constants.EJECT_VIRTUAL_MEDIA_XML self.ilo.eject_virtual_media(device='CDROM') get_vm_status_mock.assert_called_once_with(device='CDROM') request_ilo_mock.assert_called_once_with(mock.ANY) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_set_vm_status(self, request_ilo_mock): request_ilo_mock.return_value = constants.SET_VM_STATUS_XML self.ilo.set_vm_status('cdrom', 'boot_once', 'yes') self.assertTrue(request_ilo_mock.called) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_pending_boot_mode_feature_not_supported(self, request_ilo_mock): request_ilo_mock.side_effect = [constants.BOOT_MODE_NOT_SUPPORTED, constants.GET_PRODUCT_NAME] try: self.ilo.get_pending_boot_mode() except exception.IloCommandNotSupportedError as e: self.assertIn('ProLiant DL380 G7', str(e)) @ddt.data(('LEGACY_ONLY', cons.SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY), ('UEFI_ONLY', cons.SUPPORTED_BOOT_MODE_UEFI_ONLY), ('LEGACY_UEFI', cons.SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI)) @ddt.unpack @mock.patch.object( ribcl.RIBCLOperations, '_execute_command', autospec=True) def test_get_supported_boot_mode( self, raw_boot_mode_value, expected_boot_mode_value, _execute_command_mock): # | GIVEN | ret_val = { 'GET_SUPPORTED_BOOT_MODE': { 'SUPPORTED_BOOT_MODE': { 'VALUE': raw_boot_mode_value } } } _execute_command_mock.return_value = ret_val # | WHEN | actual_val = self.ilo.get_supported_boot_mode() # | THEN | self.assertEqual(expected_boot_mode_value, actual_val) @mock.patch.object(common, 'wait_for_ilo_after_reset') @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_reset_ilo(self, request_ilo_mock, status_mock): request_ilo_mock.return_value = constants.RESET_ILO_XML self.ilo.reset_ilo() self.assertTrue(request_ilo_mock.called) status_mock.assert_called_once_with(self.ilo) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_reset_ilo_credential(self, request_ilo_mock): request_ilo_mock.return_value = constants.RESET_ILO_CREDENTIAL_XML self.ilo.reset_ilo_credential("fakepassword") self.assertTrue(request_ilo_mock.called) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_reset_ilo_credential_fail(self, request_ilo_mock): request_ilo_mock.return_value = constants.RESET_ILO_CREDENTIAL_FAIL_XML self.assertRaises(exception.IloError, self.ilo.reset_ilo_credential, "fake") self.assertTrue(request_ilo_mock.called) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_persistent_boot_device_hdd_uefi(self, request_ilo_mock): xml = constants.GET_PERSISTENT_BOOT_DEVICE_HDD_UEFI_XML request_ilo_mock.return_value = xml result = self.ilo.get_persistent_boot_device() self.assertEqual(result, 'HDD') self.assertTrue(request_ilo_mock.called) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_persistent_boot_device_nic_uefi(self, request_ilo_mock): xml = constants.GET_PERSISTENT_BOOT_DEVICE_NIC_UEFI_XML request_ilo_mock.return_value = xml result = self.ilo.get_persistent_boot_device() self.assertEqual(result, 'NETWORK') self.assertTrue(request_ilo_mock.called) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_persistent_boot_device_cdrom_uefi(self, request_ilo_mock): xml = constants.GET_PERSISTENT_BOOT_DEVICE_CDROM_UEFI_XML request_ilo_mock.return_value = xml result = self.ilo.get_persistent_boot_device() self.assertEqual(result, 'CDROM') self.assertTrue(request_ilo_mock.called) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_persistent_boot_device_bios(self, request_ilo_mock): xml = constants.GET_PERSISTENT_BOOT_DEVICE_BIOS_XML request_ilo_mock.return_value = xml result = self.ilo.get_persistent_boot_device() self.assertEqual(result, 'CDROM') self.assertTrue(request_ilo_mock.called) @mock.patch.object(ribcl.RIBCLOperations, '_set_persistent_boot') @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_update_persistent_boot_uefi_cdrom(self, request_ilo_mock, set_persist_boot_mock): xml = constants.GET_PERSISTENT_BOOT_DEVICE_NIC_UEFI_XML request_ilo_mock.return_value = xml self.ilo.update_persistent_boot(["CDROM"]) self.assertTrue(request_ilo_mock.called) set_persist_boot_mock.assert_called_once_with(['Boot000B']) @mock.patch.object(ribcl.RIBCLOperations, '_set_persistent_boot') @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_update_persistent_boot_uefi_hdd(self, request_ilo_mock, set_persist_boot_mock): xml = constants.GET_PERSISTENT_BOOT_DEVICE_CDROM_UEFI_XML request_ilo_mock.return_value = xml self.ilo.update_persistent_boot(["HDD"]) self.assertTrue(request_ilo_mock.called) set_persist_boot_mock.assert_called_once_with(['Boot0007']) @mock.patch.object(ribcl.RIBCLOperations, '_set_persistent_boot') @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_update_persistent_boot_uefi_nic(self, request_ilo_mock, set_persist_boot_mock): xml = constants.GET_PERSISTENT_BOOT_DEVICE_CDROM_UEFI_XML request_ilo_mock.return_value = xml self.ilo.update_persistent_boot(["NETWORK"]) self.assertTrue(request_ilo_mock.called) set_persist_boot_mock.assert_called_once_with(['Boot0009', 'Boot0008']) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_update_persistent_boot_uefi_missing_cdrom(self, request_ilo_mock): xml = constants.GET_PERSISTENT_BOOT_DEVICE_CDROM_MISSING_UEFI_XML prod_name = constants.GET_PRODUCT_NAME request_ilo_mock.side_effect = [xml, prod_name] with self.assertRaises(exception.IloInvalidInputError) as cm: self.ilo.update_persistent_boot(['CDROM']) exp = cm.exception self.assertIn('ProLiant DL380 G7', str(exp)) def test_update_persistent_boot_other(self): self.assertRaises(exception.IloInvalidInputError, self.ilo.update_persistent_boot, ['Other']) @mock.patch.object(ribcl.RIBCLOperations, '_set_persistent_boot') @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_update_persistent_boot_bios(self, request_ilo_mock, set_persist_boot_mock): xml = constants.GET_PERSISTENT_BOOT_DEVICE_BIOS_XML request_ilo_mock.return_value = xml self.ilo.update_persistent_boot(["CDROM"]) self.assertTrue(request_ilo_mock.called) set_persist_boot_mock.assert_called_once_with(['CDROM']) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_host_health_data(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_HOST_HEALTH_DATA result = self.ilo.get_host_health_data() self.assertIn('GET_EMBEDDED_HEALTH_DATA', result) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_host_health_present_power_reading(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_HOST_HEALTH_DATA for i in (None, self.ilo.get_host_health_data(), "Bad Input"): result = self.ilo.get_host_health_present_power_reading(i) self.assertIn('37 Watts', result) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_host_health_power_supplies(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_HOST_HEALTH_DATA for i in (None, self.ilo.get_host_health_data(), "Bad Input"): result = self.ilo.get_host_health_power_supplies() self.assertIsInstance(result, list) for power in result: self.assertIn('STATUS', power) self.assertIn('LABEL', power) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_host_temperature_sensors(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_HOST_HEALTH_DATA for i in (None, self.ilo.get_host_health_data(), "Bad Input"): result = self.ilo.get_host_health_temperature_sensors() self.assertIsInstance(result, list) for temp in result: self.assertIn('STATUS', temp) self.assertIn('CURRENTREADING', temp) self.assertIn('CRITICAL', temp) self.assertIn('CAUTION', temp) self.assertIn('LOCATION', temp) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_host_fan_sensors(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_HOST_HEALTH_DATA for i in (None, self.ilo.get_host_health_data(), "Bad Input"): result = self.ilo.get_host_health_fan_sensors() self.assertIsInstance(result, list) for fan in result: self.assertIn('STATUS', fan) self.assertIn('SPEED', fan) self.assertIn('ZONE', fan) self.assertIn('LABEL', fan) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_get_host_power_readings(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_HOST_POWER_READINGS for i in (None, self.ilo.get_host_health_data(), "Bad Input"): result = self.ilo.get_host_power_readings() self.assertIn('PRESENT_POWER_READING', result) self.assertIn('MAXIMUM_POWER_READING', result) self.assertIn('MINIMUM_POWER_READING', result) self.assertIn('AVERAGE_POWER_READING', result) @mock.patch.object(requests, 'get') def test__request_host_with_verify(self, request_mock): self.ilo = ribcl.RIBCLOperations( "x.x.x.x", "admin", "Admin", 60, 443, cacert='/somepath') response_mock = mock.MagicMock(text='foo') request_mock.return_value = response_mock retval = self.ilo._request_host() request_mock.assert_called_once_with( "https://x.x.x.x/xmldata?item=all", verify='/somepath') response_mock.raise_for_status.assert_called_once_with() self.assertEqual('foo', retval) @mock.patch.object(requests, 'get') def test__request_host_without_verify(self, request_mock): response_mock = mock.MagicMock(text='foo') request_mock.return_value = response_mock retval = self.ilo._request_host() request_mock.assert_called_once_with( "https://x.x.x.x/xmldata?item=all", verify=False) response_mock.raise_for_status.assert_called_once_with() self.assertEqual('foo', retval) @mock.patch.object(requests, 'get') def test__request_host_raises(self, request_mock): request_mock.side_effect = Exception self.assertRaises(exception.IloConnectionError, self.ilo._request_host) request_mock.assert_called_once_with( "https://x.x.x.x/xmldata?item=all", verify=False) @mock.patch.object(ribcl.RIBCLOperations, '_request_host') def test_get_host_uuid(self, request_host_mock): request_host_mock.return_value = constants.GET_HOST_UUID name, uuid = self.ilo.get_host_uuid() self.assertIn('ProLiant ML110 G7', name) self.assertIn('37363536-3636-4D32-3232-303130324A41', uuid) def test__parse_processor_embedded_health(self): data = constants.GET_EMBEDDED_HEALTH_OUTPUT json_data = json.loads(data) cpus, cpu_arch = self.ilo._parse_processor_embedded_health(json_data) self.assertEqual('32', str(cpus)) self.assertEqual('x86_64', cpu_arch) self.assertTrue(type(cpus), int) def test__parse_processor_embedded_health_missing(self): data = constants.GET_EMBEDDED_HEALTH_PROCESSORS_DATA_MISSING json_data = json.loads(data) self.assertRaises(exception.IloError, self.ilo._parse_processor_embedded_health, json_data) def test__parse_memory_embedded_health(self): self.ilo.init_model_based_tags('Proliant DL580 Gen8') data = constants.GET_EMBEDDED_HEALTH_OUTPUT json_data = json.loads(data) memory_mb = self.ilo._parse_memory_embedded_health(json_data) self.assertEqual('32768', str(memory_mb)) self.assertTrue(type(memory_mb), int) def test__parse_memory_embedded_health_gen7(self): self.ilo.model = 'Proliant DL380 G7' self.ilo.init_model_based_tags('Proliant DL380 G7') data = constants.GET_EMBEDDED_HEALTH_OUTPUT_GEN7 json_data = json.loads(data) memory_mb = self.ilo._parse_memory_embedded_health(json_data) self.assertEqual('32768', str(memory_mb)) self.assertTrue(type(memory_mb), int) def test__parse_nics_embedded_health_gen7(self): self.ilo.model = 'Proliant DL380 G7' self.ilo.init_model_based_tags('Proliant DL380 G7') data = constants.GET_EMBEDDED_HEALTH_OUTPUT_GEN7 json_data = json.loads(data) expected_output = {u'Port 4': u'78:ac:c0:fe:49:66', u'Port 3': u'78:ac:c0:fe:49:64', u'Port 2': u'78:ac:c0:fe:49:62', u'Port 1': u'78:ac:c0:fe:49:60'} nic_data = self.ilo._parse_nics_embedded_health(json_data) self.assertIsInstance(nic_data, dict) for key, val in nic_data.items(): self.assertIn("Port", key) self.assertEqual(expected_output, nic_data) def test__parse_nics_embedded_health(self): self.ilo.init_model_based_tags('Proliant DL580 Gen8') data = constants.GET_EMBEDDED_HEALTH_OUTPUT json_data = json.loads(data) expected_output = {u'Port 4': u'40:a8:f0:1e:86:77', u'Port 3': u'40:a8:f0:1e:86:76', u'Port 2': u'40:a8:f0:1e:86:75', u'Port 1': u'40:a8:f0:1e:86:74'} nic_data = self.ilo._parse_nics_embedded_health(json_data) self.assertIsInstance(nic_data, dict) for key, val in nic_data.items(): self.assertIn("Port", key) self.assertEqual(expected_output, nic_data) def test__parse_storage_embedded_health(self): data = constants.GET_EMBEDDED_HEALTH_OUTPUT json_data = json.loads(data) local_gb = self.ilo._parse_storage_embedded_health(json_data) self.assertTrue(type(local_gb), int) self.assertEqual("98", str(local_gb)) def test__parse_storage_embedded_health_controller_list(self): data = constants.GET_EMBEDDED_HEALTH_OUTPUT_LIST_STORAGE json_data = json.loads(data) local_gb = self.ilo._parse_storage_embedded_health(json_data) self.assertTrue(type(local_gb), int) self.assertEqual("98", str(local_gb)) def test__parse_storage_embedded_health_no_logical_drive(self): data = constants.GET_EMBEDDED_HEALTH_OUTPUT_NO_LOGICAL_DRIVE json_data = json.loads(data) local_gb = self.ilo._parse_storage_embedded_health(json_data) self.assertTrue(type(local_gb), int) self.assertEqual("0", str(local_gb)) def test__parse_storage_embedded_health_no_controller(self): data = constants.GET_EMBEDDED_HEALTH_OUTPUT_NO_CONTROLLER json_data = json.loads(data) local_gb = self.ilo._parse_storage_embedded_health(json_data) self.assertTrue(type(local_gb), int) self.assertEqual("0", str(local_gb)) def test__get_firmware_embedded_health(self): data = constants.GET_EMBEDDED_HEALTH_OUTPUT json_data = json.loads(data) firmware_dict = self.ilo._get_firmware_embedded_health(json_data) self.assertIsInstance(firmware_dict, dict) def test__get_rom_firmware_version(self): data = constants.GET_EMBEDDED_HEALTH_OUTPUT json_data = json.loads(data) expected_rom = {'rom_firmware_version': "11/26/2014"} rom_firmware = self.ilo._get_rom_firmware_version(json_data) self.assertIsInstance(rom_firmware, dict) self.assertEqual(expected_rom, rom_firmware) def test__get_ilo_firmware_version(self): data = constants.GET_EMBEDDED_HEALTH_OUTPUT json_data = json.loads(data) expected_ilo = {'ilo_firmware_version': "2.02 Sep 05 2014"} ilo_firmware = self.ilo._get_ilo_firmware_version(json_data) self.assertIsInstance(ilo_firmware, dict) self.assertEqual(expected_ilo, ilo_firmware) @mock.patch.object(ribcl.RIBCLOperations, 'get_host_health_data') def test_get_ilo_firmware_version_as_major_minor(self, mock_health_data): data = constants.GET_EMBEDDED_HEALTH_OUTPUT mock_health_data.return_value = json.loads(data) expected_ilo = '2.02' ilo_firmware = self.ilo.get_ilo_firmware_version_as_major_minor() self.assertEqual(expected_ilo, ilo_firmware) @mock.patch.object(ribcl.RIBCLOperations, 'get_host_health_data') def test_get_ilo_firmware_version_as_major_minor_eq_suggested( self, mock_health_data): data = constants.GET_EMBEDDED_HEALTH_OUTPUT_EQ_SUGGESTED mock_health_data.return_value = json.loads(data) expected_ilo = '2.30' ilo_firmware = self.ilo.get_ilo_firmware_version_as_major_minor() self.assertEqual(expected_ilo, ilo_firmware) @mock.patch.object(ribcl.RIBCLOperations, 'get_host_health_data') def test_get_ilo_firmware_version_as_major_minor_gt_suggested( self, mock_health_data): data = constants.GET_EMBEDDED_HEALTH_OUTPUT_GT_SUGGESTED mock_health_data.return_value = json.loads(data) expected_ilo = '2.54' ilo_firmware = self.ilo.get_ilo_firmware_version_as_major_minor() self.assertEqual(expected_ilo, ilo_firmware) @mock.patch.object(ribcl.RIBCLOperations, 'get_host_health_data') def test_get_ilo_firmware_version_as_major_minor_unexpected( self, mock_health_data): data = constants.GET_EMBEDDED_HEALTH_OUTPUT_UNEXPECTED_FORMAT mock_health_data.return_value = json.loads(data) expected_ilo = None ilo_firmware = self.ilo.get_ilo_firmware_version_as_major_minor() self.assertEqual(expected_ilo, ilo_firmware) @mock.patch.object(ribcl.RIBCLOperations, 'get_host_health_data') def test_get_ilo_firmware_version_as_major_minor_no_firmware( self, mock_health_data): data = constants.GET_EMBEDDED_HEALTH_OUTPUT_NO_FIRMWARE mock_health_data.return_value = json.loads(data) expected_ilo = None ilo_firmware = self.ilo.get_ilo_firmware_version_as_major_minor() self.assertEqual(expected_ilo, ilo_firmware) def test__get_number_of_gpu_devices_connected(self): data = constants.GET_EMBEDDED_HEALTH_OUTPUT json_data = json.loads(data) gpu_cnt = self.ilo._get_number_of_gpu_devices_connected(json_data) self.assertIsInstance(gpu_cnt, dict) self.assertIn('pci_gpu_devices', gpu_cnt) @mock.patch.object(ribcl.RIBCLOperations, 'get_host_health_data') def test_get_essential_properties(self, health_data_mock): data = constants.GET_EMBEDDED_HEALTH_OUTPUT json_data = json.loads(data) health_data_mock.return_value = json_data expected_properties = {'macs': { u'Port 4': u'40:a8:f0:1e:86:77', u'Port 3': u'40:a8:f0:1e:86:76', u'Port 2': u'40:a8:f0:1e:86:75', u'Port 1': u'40:a8:f0:1e:86:74' }, 'properties': { 'memory_mb': 32768, 'cpu_arch': 'x86_64', 'local_gb': 98, 'cpus': 32} } properties = self.ilo.get_essential_properties() self.assertIsInstance(properties, dict) self.assertIn('macs', properties) self.assertIn('properties', properties) self.assertEqual(expected_properties, properties) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') @mock.patch.object(ribcl.RIBCLOperations, 'get_host_health_data') @mock.patch.object(ribcl.RIBCLOperations, 'get_supported_boot_mode') def test_get_server_capabilities_gen8( self, boot_mode_mock, health_data_mock, server_mock): data = constants.GET_EMBEDDED_HEALTH_OUTPUT json_data = json.loads(data) health_data_mock.return_value = json_data server_mock.return_value = 'ProLiant DL580 Gen8' boot_mode_mock.return_value = ( cons.SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI) capabilities = self.ilo.get_server_capabilities() self.assertIsInstance(capabilities, dict) self.assertIn('ilo_firmware_version', capabilities) self.assertIn('rom_firmware_version', capabilities) self.assertIn('server_model', capabilities) self.assertIn('pci_gpu_devices', capabilities) self.assertIn('boot_mode_bios', capabilities) self.assertIn('boot_mode_uefi', capabilities) self.assertEqual('true', capabilities['boot_mode_bios']) self.assertEqual('true', capabilities['boot_mode_uefi']) self.assertNotIn('secure_boot', capabilities) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') @mock.patch.object(ribcl.RIBCLOperations, 'get_host_health_data') @mock.patch.object(ribcl.RIBCLOperations, '_get_ilo_firmware_version') @mock.patch.object(ribcl.RIBCLOperations, '_get_rom_firmware_version') @mock.patch.object(ribcl.RIBCLOperations, 'get_supported_boot_mode') def test_get_server_capabilities_gen8_no_firmware( self, boot_mode_mock, rom_mock, ilo_mock, health_data_mock, server_mock): data = constants.GET_EMBEDDED_HEALTH_OUTPUT json_data = json.loads(data) health_data_mock.return_value = json_data server_mock.return_value = 'ProLiant DL580 Gen8' ilo_mock.return_value = None rom_mock.return_value = None boot_mode_mock.return_value = cons.SUPPORTED_BOOT_MODE_UEFI_ONLY capabilities = self.ilo.get_server_capabilities() self.assertIsInstance(capabilities, dict) self.assertNotIn('ilo_firmware_version', capabilities) self.assertNotIn('rom_firmware_version', capabilities) self.assertIn('server_model', capabilities) self.assertIn('pci_gpu_devices', capabilities) self.assertIn('boot_mode_bios', capabilities) self.assertIn('boot_mode_uefi', capabilities) print(capabilities) self.assertEqual('false', capabilities['boot_mode_bios']) self.assertEqual('true', capabilities['boot_mode_uefi']) self.assertNotIn('secure_boot', capabilities) def test__get_nic_boot_devices(self): data = json.loads(constants.GET_NIC_DATA) expected = ["Boot0003", "Boot0001", "Boot0004"] result = self.ilo._get_nic_boot_devices(data) self.assertEqual(result, expected) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_activate_license_ok(self, request_mock): request_mock.return_value = constants.ACTIVATE_LICENSE_XML self.ilo.activate_license("testkey") self.assertTrue(request_mock.called) @mock.patch.object(ribcl.RIBCLOperations, '_request_ilo') def test_activate_license_invalid(self, request_mock): request_mock.return_value = constants.ACTIVATE_LICENSE_FAIL_XML self.assertRaises(exception.IloError, self.ilo.activate_license, 'key') self.assertTrue(request_mock.called) @mock.patch.object( ribcl.firmware_controller.FirmwareImageUploader, 'upload_file_to') @mock.patch.object(ribcl, 'os', autospec=True) @mock.patch.object(ribcl.IloClient, '_request_ilo', autospec=True) @mock.patch.object(ribcl.IloClient, '_parse_output', autospec=True) @mock.patch.object(common, 'wait_for_ribcl_firmware_update_to_complete', lambda x: None) def test_update_ilo_firmware(self, _parse_output_mock, _request_ilo_mock, os_mock, upload_file_to_mock): # | GIVEN | # NOTE(mgoddard): Whitespace should be stripped from the cookie. # https://launchpad.net/bugs/1859616. upload_file_to_mock.return_value = ' hickory-dickory-dock' os_mock.path.getsize.return_value = 12345 # | WHEN | self.ilo.update_firmware('raw_fw_file.bin', 'ilo') # | THEN | upload_file_to_mock.assert_called_once_with( (self.ilo.host, self.ilo.port), self.ilo.timeout) ref_root_xml_string = constants.UPDATE_ILO_FIRMWARE_INPUT_XML % ( self.ilo.password, self.ilo.login, 12345, 'raw_fw_file.bin') ref_root_xml_string = re.sub(r"\n\s*", '', ref_root_xml_string) ref_dict = xmltodict.parse(ref_root_xml_string) ref_string = json.dumps(ref_dict, sort_keys=True) ((ribcl_obj, xml_elem), the_ext_header_dict) = ( _request_ilo_mock.call_args) actual_dict = xmltodict.parse(ET.tostring(xml_elem).decode('latin-1')) actual_string = json.dumps(actual_dict, sort_keys=True) self.assertEqual(ref_string, actual_string) self.assertDictEqual(the_ext_header_dict['extra_headers'], {'Cookie': 'hickory-dickory-dock'}) _parse_output_mock.assert_called_once_with( self.ilo, _request_ilo_mock.return_value) @mock.patch.object( ribcl.firmware_controller.FirmwareImageUploader, 'upload_file_to') @mock.patch.object(ribcl, 'os', autospec=True) @mock.patch.object(ribcl.IloClient, '_request_ilo', autospec=True) @mock.patch.object(ribcl.IloClient, '_parse_output', autospec=True) @mock.patch.object(common, 'wait_for_ribcl_firmware_update_to_complete', lambda x: None) def test_update_other_component_firmware(self, _parse_output_mock, _request_ilo_mock, os_mock, upload_file_to_mock): # | GIVEN | upload_file_to_mock.return_value = 'hickory-dickory-dock' os_mock.path.getsize.return_value = 12345 # | WHEN | self.ilo.update_firmware('raw_fw_file.bin', 'power_pic') # | THEN | upload_file_to_mock.assert_called_once_with( (self.ilo.host, self.ilo.port), self.ilo.timeout) ref_root_xml_string = constants.UPDATE_NONILO_FIRMWARE_INPUT_XML % ( self.ilo.password, self.ilo.login, 12345, 'raw_fw_file.bin') ref_root_xml_string = re.sub(r"\n\s*", '', ref_root_xml_string) ref_dict = xmltodict.parse(ref_root_xml_string) ref_string = json.dumps(ref_dict, sort_keys=True) ((ribcl_obj, xml_elem), the_ext_header_dict) = ( _request_ilo_mock.call_args) actual_dict = xmltodict.parse(ET.tostring(xml_elem).decode('latin-1')) actual_string = json.dumps(actual_dict, sort_keys=True) self.assertEqual(ref_string, actual_string) self.assertDictEqual(the_ext_header_dict['extra_headers'], {'Cookie': 'hickory-dickory-dock'}) _parse_output_mock.assert_called_once_with( self.ilo, _request_ilo_mock.return_value) def test_update_firmware_throws_error_for_invalid_component(self): # | WHEN | & | THEN | self.assertRaises(exception.InvalidInputError, self.ilo.update_firmware, 'raw_fw_file.bin', 'invalid_component') def test__get_memory_details_value_based_on_model_gen7(self): self.ilo.model = 'Proliant DL380 G7' data = constants.GET_EMBEDDED_HEALTH_OUTPUT_GEN7 self.assertIn('MEMORY_COMPONENTS', data) self.assertIn('MEMORY_COMPONENT', data) def test__get_memory_details_value_based_on_model(self): self.ilo.model = 'ProLiant DL580 Gen8' data = constants.GET_EMBEDDED_HEALTH_OUTPUT self.assertIn('MEMORY_DETAILS_SUMMARY', data) def test__update_nic_data_from_nic_info_based_on_model_gen7(self): self.ilo.model = 'Proliant DL380 G7' nic_dict = {} item = {'NETWORK_PORT': {'VALUE': 'Port 1'}, 'MAC_ADDRESS': {'VALUE': '78:ac:c0:fe:49:60'}} port = 'Port 1' mac = '78:ac:c0:fe:49:60' expected_result = {'Port 1': '78:ac:c0:fe:49:60'} self.ilo._update_nic_data_from_nic_info_based_on_model( nic_dict, item, port, mac) self.assertEqual(expected_result, nic_dict) def test__update_nic_data_from_nic_info_based_on_model(self): self.ilo.model = 'ProLiant DL580 Gen8' nic_dict = {} item = {'NETWORK_PORT': {'VALUE': 'Port 1'}, 'STATUS': {'VALUE': 'Unknown'}, 'PORT_DESCRIPTION': {'VALUE': 'N/A'}, 'LOCATION': {'VALUE': 'Embedded'}, 'MAC_ADDRESS': {'VALUE': '40:a8:f0:1e:86:74'}, 'IP_ADDRESS': {'VALUE': 'N/A'}} port = 'Port 1' mac = '40:a8:f0:1e:86:74' expected_result = {'Port 1': '40:a8:f0:1e:86:74'} self.ilo._update_nic_data_from_nic_info_based_on_model( nic_dict, item, port, mac) self.assertEqual(expected_result, nic_dict) class IloRibclTestCaseBeforeRisSupport(unittest.TestCase): def setUp(self): super(IloRibclTestCaseBeforeRisSupport, self).setUp() self.ilo = ribcl.IloClient("x.x.x.x", "admin", "Admin", 60, 443) @mock.patch.object(ribcl.IloClient, '_request_ilo') def test_login_fail(self, request_ilo_mock): request_ilo_mock.return_value = constants.LOGIN_FAIL_XML self.assertRaises(ribcl.IloError, self.ilo.get_all_licenses) @mock.patch.object(ribcl.IloClient, '_request_ilo') def test_hold_pwr_btn(self, request_ilo_mock): request_ilo_mock.return_value = constants.HOLD_PWR_BTN_XML result = self.ilo.hold_pwr_btn() self.assertIn('Host power is already OFF.', result) @mock.patch.object(ribcl.IloClient, '_request_ilo') def test_get_vm_status_none(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_VM_STATUS_XML result = self.ilo.get_vm_status() self.assertIsInstance(result, dict) self.assertIn('DEVICE', result) self.assertIn('WRITE_PROTECT', result) self.assertIn('VM_APPLET', result) self.assertIn('IMAGE_URL', result) self.assertIn('IMAGE_INSERTED', result) self.assertIn('BOOT_OPTION', result) @mock.patch.object(ribcl.IloClient, '_request_ilo') def test_get_vm_status_cdrom(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_VM_STATUS_CDROM_XML result = self.ilo.get_vm_status('cdrom') self.assertIsInstance(result, dict) self.assertIn('DEVICE', result) self.assertIn('WRITE_PROTECT', result) self.assertIn('VM_APPLET', result) self.assertIn('IMAGE_URL', result) self.assertIn('IMAGE_INSERTED', result) self.assertIn('BOOT_OPTION', result) @mock.patch.object(ribcl.IloClient, '_request_ilo') def test_get_vm_status_error(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_VM_STATUS_ERROR_XML self.assertRaises( ribcl.IloError, self.ilo.get_vm_status) @mock.patch.object(ribcl.IloClient, '_request_ilo') def test_get_all_licenses(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_ALL_LICENSES_XML result = self.ilo.get_all_licenses() self.assertIsInstance(result, dict) self.assertIn('LICENSE_TYPE', result) self.assertIn('LICENSE_INSTALL_DATE', result) self.assertIn('LICENSE_KEY', result) self.assertIn('LICENSE_CLASS', result) @mock.patch.object(ribcl.IloClient, '_request_ilo') def test_get_one_time_boot(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_ONE_TIME_BOOT_XML result = self.ilo.get_one_time_boot() self.assertIn('NORMAL', result.upper()) @mock.patch.object(ribcl.IloClient, '_request_ilo') def test_get_host_power_status(self, request_ilo_mock): request_ilo_mock.return_value = constants.GET_HOST_POWER_STATUS_XML result = self.ilo.get_host_power_status() self.assertIn('ON', result) @mock.patch.object(ribcl.IloClient, '_request_ilo') def test_reset_server(self, request_ilo_mock): request_ilo_mock.return_value = constants.RESET_SERVER_XML result = self.ilo.reset_server() self.assertIn('server being reset', result.lower()) @mock.patch.object(ribcl.IloClient, '_request_ilo') def test_press_pwr_btn(self, request_ilo_mock): request_ilo_mock.return_value = constants.PRESS_POWER_BTN_XML result = self.ilo.press_pwr_btn() self.assertIsNone(result) self.assertTrue(request_ilo_mock.called) @mock.patch.object(ribcl.IloClient, '_request_ilo') def test_set_host_power(self, request_ilo_mock): request_ilo_mock.return_value = constants.SET_HOST_POWER_XML result = self.ilo.set_host_power('ON') self.assertIn('Host power is already ON.', result) self.assertRaises(ribcl.IloInvalidInputError, self.ilo.set_host_power, 'ErrorCase') @mock.patch.object(ribcl.IloClient, '_request_ilo') def test_set_one_time_boot(self, request_ilo_mock): request_ilo_mock.return_value = constants.SET_ONE_TIME_BOOT_XML self.ilo.set_one_time_boot('NORMAL') self.assertTrue(request_ilo_mock.called) @mock.patch.object(ribcl.IloClient, '_request_ilo') @mock.patch.object(utils, 'validate_href') def test_insert_virtual_media(self, validate_href_mock, request_ilo_mock): request_ilo_mock.return_value = constants.INSERT_VIRTUAL_MEDIA_XML result = self.ilo.insert_virtual_media('any_url', 'floppy') self.assertIsNone(result) self.assertTrue(request_ilo_mock.called) validate_href_mock.assert_called_once_with('any_url') @mock.patch.object(ribcl.RIBCLOperations, 'get_vm_status') @mock.patch.object(ribcl.IloClient, '_request_ilo') def test_eject_virtual_media(self, request_ilo_mock, get_vm_status_mock): get_vm_status_mock.return_value = {'IMAGE_INSERTED': 'YES'} request_ilo_mock.return_value = constants.EJECT_VIRTUAL_MEDIA_XML self.assertIsNone(self.ilo.eject_virtual_media(device='CDROM')) get_vm_status_mock.assert_called_once_with(device='CDROM') request_ilo_mock.assert_called_once_with(mock.ANY) @mock.patch.object(ribcl.IloClient, '_request_ilo') def test_set_vm_status(self, request_ilo_mock): request_ilo_mock.return_value = constants.SET_VM_STATUS_XML self.ilo.set_vm_status('cdrom', 'boot_once', 'yes') self.assertTrue(request_ilo_mock.called) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_inject_nmi(self, product_name_mock): product_name_mock.return_value = constants.GET_PRODUCT_NAME self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'ProLiant DL380 G7', self.ilo.inject_nmi) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_get_host_post_state(self, product_name_mock): product_name_mock.return_value = constants.GET_PRODUCT_NAME self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'ProLiant DL380 G7', self.ilo.get_host_post_state) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_read_raid_configuration(self, product_name_mock): ld1 = {"size_gb": 150, "raid_level": '0', "is_root_volume": True} raid_config = {"logical_disks": [ld1]} product_name_mock.return_value = constants.GET_PRODUCT_NAME self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'ProLiant DL380 G7', self.ilo.read_raid_configuration, raid_config) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_delete_raid_configuration(self, product_name_mock): product_name_mock.return_value = constants.GET_PRODUCT_NAME self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'ProLiant DL380 G7', self.ilo.delete_raid_configuration) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_create_raid_configuration(self, product_name_mock): ld1 = {"size_gb": 150, "raid_level": '0', "is_root_volume": True} raid_config = {"logical_disks": [ld1]} product_name_mock.return_value = constants.GET_PRODUCT_NAME self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'ProLiant DL380 G7', self.ilo.create_raid_configuration, raid_config) @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def test_get_bios_settings_result(self, product_name_mock): product_name_mock.return_value = constants.GET_PRODUCT_NAME self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'ProLiant DL380 G7', self.ilo.get_bios_settings_result) if __name__ == '__main__': unittest.main() ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ilo/test_ris.py0000775000175000017500000043242300000000000023613 0ustar00zuulzuul00000000000000# Copyright 2022 Hewlett Packard Enterprise Development Company, L.P. # Copyright 2015 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test class for RIS Module.""" import json from unittest import mock import ddt from requests.packages import urllib3 from requests.packages.urllib3 import exceptions as urllib3_exceptions import testtools from proliantutils import exception from proliantutils.ilo import common from proliantutils.ilo import constants from proliantutils.ilo import ris from proliantutils.tests.ilo import ris_sample_outputs as ris_outputs from proliantutils import utils class IloRisTestCaseInitTestCase(testtools.TestCase): @mock.patch.object(urllib3, 'disable_warnings') def test_init(self, disable_warning_mock): ris_client = ris.RISOperations( "x.x.x.x", "admin", "Admin", bios_password='foo', cacert='/somepath') self.assertEqual(ris_client.host, "x.x.x.x") self.assertEqual(ris_client.login, "admin") self.assertEqual(ris_client.password, "Admin") self.assertEqual(ris_client.bios_password, "foo") self.assertEqual({}, ris_client.message_registries) self.assertEqual(ris_client.cacert, '/somepath') @mock.patch.object(urllib3, 'disable_warnings') def test_init_without_cacert(self, disable_warning_mock): ris_client = ris.RISOperations( "x.x.x.x", "admin", "Admin", bios_password='foo') self.assertEqual(ris_client.host, "x.x.x.x") self.assertEqual(ris_client.login, "admin") self.assertEqual(ris_client.password, "Admin") self.assertIsNone(ris_client.cacert) disable_warning_mock.assert_called_once_with( urllib3_exceptions.InsecureRequestWarning) @ddt.ddt class IloRisTestCase(testtools.TestCase): def setUp(self): super(IloRisTestCase, self).setUp() self.client = ris.RISOperations("1.2.3.4", "Administrator", "Admin") @mock.patch.object(ris.RISOperations, '_get_bios_setting') @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') def test_get_http_boot_url_uefi(self, _uefi_boot_mode_mock, get_bios_settings_mock): get_bios_settings_mock.return_value = ris_outputs.HTTP_BOOT_URL _uefi_boot_mode_mock.return_value = True result = self.client.get_http_boot_url() _uefi_boot_mode_mock.assert_called_once_with() self.assertEqual( 'http://10.10.1.30:8081/startup.nsh', result['UefiShellStartupUrl'] ) @mock.patch.object(ris.RISOperations, '_change_bios_setting') @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') def test_set_http_boot_url_uefi(self, _uefi_boot_mode_mock, change_bios_setting_mock): _uefi_boot_mode_mock.return_value = True self.client.set_http_boot_url('http://10.10.1.30:8081/startup.nsh') _uefi_boot_mode_mock.assert_called_once_with() change_bios_setting_mock.assert_called_once_with({ "UefiShellStartupUrl": "http://10.10.1.30:8081/startup.nsh" }) @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') def test_get_http_boot_url_bios(self, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = False self.assertRaises(exception.IloCommandNotSupportedInBiosError, self.client.get_http_boot_url) _uefi_boot_mode_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') def test_set_http_boot_url_bios(self, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = False self.assertRaises(exception.IloCommandNotSupportedInBiosError, self.client.set_http_boot_url, 'http://10.10.1.30:8081/startup.nsh') _uefi_boot_mode_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_check_iscsi_rest_patch_allowed') @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') def test_set_iscsi_initiator_info_uefi(self, _uefi_boot_mode_mock, check_iscsi_mock, patch_mock): _uefi_boot_mode_mock.return_value = True iscsi_uri = '/rest/v1/systems/1/bios/iScsi/Settings' check_iscsi_mock.return_value = iscsi_uri initiator_iqn = 'iqn.2011-07.com.example.server:test1' initiator_info = {'iSCSIInitiatorName': initiator_iqn} patch_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client.set_iscsi_initiator_info(initiator_iqn) patch_mock.assert_called_once_with(iscsi_uri, None, initiator_info) @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_check_iscsi_rest_patch_allowed') @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') def test_set_iscsi_initiator_info_failed(self, _uefi_boot_mode_mock, check_iscsi_mock, patch_mock): _uefi_boot_mode_mock.return_value = True iscsi_uri = '/rest/v1/systems/1/bios/iScsi/Settings' check_iscsi_mock.return_value = iscsi_uri initiator_iqn = 'iqn.2011-07.com.example.server:test1' initiator_info = {'iSCSIInitiatorName': initiator_iqn} patch_mock.return_value = (302, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.assertRaises(exception.IloError, self.client.set_iscsi_initiator_info, initiator_iqn) patch_mock.assert_called_once_with(iscsi_uri, None, initiator_info) @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') def test_set_iscsi_initiator_info_bios(self, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = False self.assertRaises(exception.IloCommandNotSupportedError, self.client.set_iscsi_initiator_info, 'iqn.2011-07.com.example.server:test1') _uefi_boot_mode_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_change_iscsi_settings') @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') def test_set_iscsi_info_uefi(self, _uefi_boot_mode_mock, change_iscsi_settings_mock): _uefi_boot_mode_mock.return_value = True iscsi_variables = { 'iSCSITargetName': 'iqn.2011-07.com.example.server:test1', 'iSCSITargetInfoViaDHCP': False, 'iSCSIBootLUN': '1', 'iSCSIBootEnable': 'Enabled', 'iSCSITargetIpAddress': '10.10.1.30', 'iSCSITargetTcpPort': 3260} self.client.set_iscsi_info( 'iqn.2011-07.com.example.server:test1', '1', '10.10.1.30') _uefi_boot_mode_mock.assert_called_once_with() change_iscsi_settings_mock.assert_called_once_with( iscsi_variables, []) @mock.patch.object(ris.RISOperations, '_change_iscsi_settings') @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') def test_set_iscsi_info_uefi_with_mac(self, _uefi_boot_mode_mock, change_iscsi_settings_mock): _uefi_boot_mode_mock.return_value = True iscsi_variables = { 'iSCSITargetName': 'iqn.2011-07.com.example.server:test1', 'iSCSITargetInfoViaDHCP': False, 'iSCSIBootLUN': '1', 'iSCSIBootEnable': 'Enabled', 'iSCSITargetIpAddress': '10.10.1.30', 'iSCSITargetTcpPort': 3260} self.client.set_iscsi_info( 'iqn.2011-07.com.example.server:test1', '1', '10.10.1.30', macs=['98:f2:b3:ee:f4:00']) _uefi_boot_mode_mock.assert_called_once_with() change_iscsi_settings_mock.assert_called_once_with( iscsi_variables, ['98:f2:b3:ee:f4:00']) @mock.patch.object(ris.RISOperations, '_change_iscsi_settings') @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') def test_unset_iscsi_info_uefi(self, _uefi_boot_mode_mock, change_iscsi_settings_mock): _uefi_boot_mode_mock.return_value = True iscsi_variables = {'iSCSIBootEnable': 'Disabled'} self.client.unset_iscsi_info() _uefi_boot_mode_mock.assert_called_once_with() change_iscsi_settings_mock.assert_called_once_with( iscsi_variables, []) @mock.patch.object(ris.RISOperations, '_change_iscsi_settings') @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') def test_unset_iscsi_info_uefi_with_mac(self, _uefi_boot_mode_mock, change_iscsi_settings_mock): _uefi_boot_mode_mock.return_value = True iscsi_variables = {'iSCSIBootEnable': 'Disabled'} self.client.unset_iscsi_info(['98:f2:b3:ee:f4:00']) _uefi_boot_mode_mock.assert_called_once_with() change_iscsi_settings_mock.assert_called_once_with( iscsi_variables, ['98:f2:b3:ee:f4:00']) @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') def test_unset_iscsi_info_bios(self, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = False self.assertRaises(exception.IloCommandNotSupportedInBiosError, self.client.unset_iscsi_info) _uefi_boot_mode_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_iscsi_initiator_info(self, check_bios_mock, get_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) iscsi_settings = json.loads(ris_outputs.GET_ISCSI_SETTINGS) get_mock.return_value = (200, ris_outputs.GET_HEADERS, iscsi_settings) ret = self.client.get_iscsi_initiator_info() self.assertEqual(ret, 'iqn.1986-03.com.hp:uefi-p89-mxq45006w5') @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_iscsi_initiator_info_failed(self, check_bios_mock, get_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) iscsi_uri = '/rest/v1/systems/1/bios/iScsi' iscsi_settings = json.loads(ris_outputs.GET_ISCSI_SETTINGS) get_mock.return_value = (202, ris_outputs.GET_HEADERS, iscsi_settings) self.assertRaises(exception.IloError, self.client.get_iscsi_initiator_info) check_bios_mock.assert_called_once_with() get_mock.assert_called_once_with(iscsi_uri) @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_iscsi_initiator_info_not_found(self, check_bios_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BASE_CONFIG) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) self.assertRaises(exception.IloCommandNotSupportedError, self.client.get_iscsi_initiator_info) check_bios_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') def test_set_iscsi_info_bios(self, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = False self.assertRaises(exception.IloCommandNotSupportedInBiosError, self.client.set_iscsi_info, 'iqn.2011-07.com.example.server:test1', '1', '10.10.1.30') _uefi_boot_mode_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_secure_boot_mode(self, get_details_mock, rest_get_mock): host_response = ris_outputs.RESPONSE_BODY_FOR_REST_OP get_details_mock.return_value = json.loads(host_response) uri = ris_outputs.REST_GET_SECURE_BOOT['links']['self']['href'] rest_get_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_GET_SECURE_BOOT) result = self.client.get_secure_boot_mode() self.assertFalse(result) get_details_mock.assert_called_once_with() rest_get_mock.assert_called_once_with(uri) @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_secure_boot_mode_fail(self, get_details_mock, rest_get_mock): host_response = ris_outputs.RESPONSE_BODY_FOR_REST_OP get_details_mock.return_value = json.loads(host_response) uri = ris_outputs.REST_GET_SECURE_BOOT['links']['self']['href'] rest_get_mock.return_value = (301, ris_outputs.GET_HEADERS, ris_outputs.REST_FAILURE_OUTPUT) exc = self.assertRaises(exception.IloError, self.client.get_secure_boot_mode) get_details_mock.assert_called_once_with() rest_get_mock.assert_called_once_with(uri) self.assertIn('FakeFailureMessage', str(exc)) @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_secure_boot_mode_not_supported(self, get_details_mock): host_response = json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP) del host_response['Oem']['Hp']['links']['SecureBoot'] get_details_mock.return_value = host_response self.assertRaises(exception.IloCommandNotSupportedError, self.client.get_secure_boot_mode) get_details_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_host_power_status_ok(self, get_details_mock): host_response = ris_outputs.RESPONSE_BODY_FOR_REST_OP get_details_mock.return_value = json.loads(host_response) result = self.client.get_host_power_status() self.assertEqual(result, 'OFF') get_details_mock.assert_called_once_with() @mock.patch.object(common, 'wait_for_ilo_after_reset') @mock.patch.object(ris.RISOperations, '_rest_post') @mock.patch.object(ris.RISOperations, '_rest_get') def test_reset_ilo_ok(self, get_mock, post_mock, status_mock): uri = '/rest/v1/Managers/1' manager_data = json.loads(ris_outputs.GET_MANAGER_DETAILS) get_mock.return_value = (200, ris_outputs.GET_HEADERS, manager_data) post_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client.reset_ilo() get_mock.assert_called_once_with(uri) post_mock.assert_called_once_with(uri, None, {'Action': 'Reset'}) status_mock.assert_called_once_with(self.client) @mock.patch.object(ris.RISOperations, '_rest_post') @mock.patch.object(ris.RISOperations, '_rest_get') def test_reset_ilo_fail(self, get_mock, post_mock): uri = '/rest/v1/Managers/1' manager_data = json.loads(ris_outputs.GET_MANAGER_DETAILS) get_mock.return_value = (200, ris_outputs.HEADERS_FOR_REST_OP, manager_data) post_mock.return_value = (301, ris_outputs.HEADERS_FOR_REST_OP, ris_outputs.REST_FAILURE_OUTPUT) exc = self.assertRaises(exception.IloError, self.client.reset_ilo) get_mock.assert_called_once_with(uri) post_mock.assert_called_once_with(uri, None, {'Action': 'Reset'}) self.assertIn('FakeFailureMessage', str(exc)) @mock.patch.object(ris.RISOperations, '_get_type') @mock.patch.object(ris.RISOperations, '_rest_get') def test_reset_ilo_type_mismatch(self, get_mock, type_mock): uri = '/rest/v1/Managers/1' manager_data = json.loads(ris_outputs.GET_MANAGER_DETAILS) get_mock.return_value = (200, ris_outputs.HEADERS_FOR_REST_OP, manager_data) type_mock.return_value = 'Manager.x' self.assertRaises(exception.IloError, self.client.reset_ilo) get_mock.assert_called_once_with(uri) @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') @mock.patch.object(ris.RISOperations, '_change_secure_boot_settings') def test_reset_secure_boot_keys(self, change_mock, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = True self.client.reset_secure_boot_keys() _uefi_boot_mode_mock.assert_called_once_with() change_mock.assert_called_once_with('ResetToDefaultKeys', True) @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') @mock.patch.object(ris.RISOperations, '_change_secure_boot_settings') def test_reset_secure_boot_keys_bios(self, change_mock, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = False self.assertRaises(exception.IloCommandNotSupportedInBiosError, self.client.reset_secure_boot_keys) _uefi_boot_mode_mock.assert_called_once_with() self.assertFalse(change_mock.called) @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') @mock.patch.object(ris.RISOperations, '_change_secure_boot_settings') def test_clear_secure_boot_keys(self, change_mock, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = True self.client.clear_secure_boot_keys() _uefi_boot_mode_mock.assert_called_once_with() change_mock.assert_called_once_with('ResetAllKeys', True) @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') @mock.patch.object(ris.RISOperations, '_change_secure_boot_settings') def test_clear_secure_boot_keys_bios(self, change_mock, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = False self.assertRaises(exception.IloCommandNotSupportedInBiosError, self.client.clear_secure_boot_keys) _uefi_boot_mode_mock.assert_called_once_with() self.assertFalse(change_mock.called) @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') @mock.patch.object(ris.RISOperations, '_change_secure_boot_settings') def test_set_secure_boot_mode(self, change_mock, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = True self.client.set_secure_boot_mode(True) _uefi_boot_mode_mock.assert_called_once_with() change_mock.assert_called_once_with('SecureBootEnable', True) @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') @mock.patch.object(ris.RISOperations, '_change_secure_boot_settings') def test_set_secure_boot_mode_bios(self, change_mock, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = False self.assertRaises(exception.IloCommandNotSupportedInBiosError, self.client.set_secure_boot_mode, True) _uefi_boot_mode_mock.assert_called_once_with() self.assertFalse(change_mock.called) @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_product_name(self, get_details_mock): host_response = json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP) get_details_mock.return_value = host_response result = self.client.get_product_name() self.assertEqual(result, 'ProLiant BL460c Gen9') get_details_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_get_bios_setting') def test_get_current_boot_mode(self, bios_mock): bios_mock.return_value = 'LegacyBios' result = self.client.get_current_boot_mode() self.assertEqual(result, 'LEGACY') @mock.patch.object(ris.RISOperations, '_get_bios_settings_resource') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_pending_boot_mode(self, check_mock, bios_mock): check_mock.return_value = ('fake', 'fake', json.loads(ris_outputs.GET_BIOS_SETTINGS)) bios_mock.return_value = ('fake', 'fake', json.loads(ris_outputs.GET_BIOS_SETTINGS)) result = self.client.get_pending_boot_mode() self.assertEqual(result, 'UEFI') @mock.patch.object(ris.RISOperations, '_change_bios_setting') def test_set_pending_boot_mode_legacy(self, change_mock): self.client.set_pending_boot_mode('legacy') change_mock.assert_called_once_with({'BootMode': 'LegacyBios'}) @mock.patch.object(ris.RISOperations, '_change_bios_setting') def test_set_pending_boot_mode_uefi(self, change_mock): self.client.set_pending_boot_mode('uefi') expected_properties = {'BootMode': 'uefi', 'UefiOptimizedBoot': 'Enabled'} change_mock.assert_called_once_with(expected_properties) def test_set_pending_boot_mode_invalid_mode(self): self.assertRaises(exception.IloInvalidInputError, self.client.set_pending_boot_mode, 'invalid') @ddt.data((0, constants.SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY), (3, constants.SUPPORTED_BOOT_MODE_UEFI_ONLY), (2, constants.SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI)) @ddt.unpack @mock.patch.object(ris.RISOperations, '_get_host_details', autospec=True) def test_get_supported_boot_mode( self, raw_boot_mode_value, expected_boot_mode_value, _get_host_details_mock): # | GIVEN | system_val = { 'Oem': { 'Hp': { 'Bios': { 'UefiClass': raw_boot_mode_value } } } } _get_host_details_mock.return_value = system_val # | WHEN | actual_val = self.client.get_supported_boot_mode() # | THEN | self.assertEqual(expected_boot_mode_value, actual_val) @mock.patch.object(ris.RISOperations, '_get_host_details', autospec=True) def test_get_supported_boot_mode_returns_legacy_bios_if_bios_atrrib_absent( self, _get_host_details_mock): # | GIVEN | system_val = {'Oem': {'Hp': {'blahblah': 1234}}} _get_host_details_mock.return_value = system_val # | WHEN | actual_val = self.client.get_supported_boot_mode() # | THEN | self.assertEqual(constants.SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY, actual_val) @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_get_collection') def test_reset_ilo_credential(self, collection_mock, patch_mock): uri = '/rest/v1/AccountService/Accounts/1' collection_output = json.loads(ris_outputs.COLLECTIONS_SAMPLE) item = collection_output['Items'][0] collection_mock.return_value = [(200, None, item, uri)] patch_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client.reset_ilo_credential('fake-password') patch_mock.assert_called_once_with(uri, None, {'Password': 'fake-password'}) @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_get_collection') def test_reset_ilo_credential_fail(self, collection_mock, patch_mock): uri = '/rest/v1/AccountService/Accounts/1' collection_output = json.loads(ris_outputs.COLLECTIONS_SAMPLE) item = collection_output['Items'][0] collection_mock.return_value = [(200, None, item, uri)] patch_mock.return_value = (301, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.assertRaises(exception.IloError, self.client.reset_ilo_credential, 'fake-password') patch_mock.assert_called_once_with(uri, None, {'Password': 'fake-password'}) @mock.patch.object(ris.RISOperations, '_get_collection') def test_reset_ilo_credential_no_account(self, collection_mock): uri = '/rest/v1/AccountService/Accounts/1' self.client = ris.RISOperations("1.2.3.4", "Admin", "Admin") collection_output = json.loads(ris_outputs.COLLECTIONS_SAMPLE) item = collection_output['Items'][0] collection_mock.return_value = [(200, None, item, uri)] self.assertRaises(exception.IloError, self.client.reset_ilo_credential, 'fake-password') @mock.patch.object(ris.RISOperations, '_validate_if_patch_supported') @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_get_bios_hash_password') @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_operation_allowed') @mock.patch.object(ris.RISOperations, '_get_bios_settings_resource') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_reset_bios_to_default(self, check_mock, bios_mock, op_mock, get_mock, passwd_mock, patch_mock, validate_mock): settings_uri = '/rest/v1/systems/1/bios/Settings' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) base_config = json.loads(ris_outputs.GET_BASE_CONFIG) default_config = base_config['BaseConfigs'][0]['default'] check_mock.return_value = (ris_outputs.GET_HEADERS, 'fake', json.loads(ris_outputs.GET_BIOS_SETTINGS)) op_mock.return_value = False passwd_mock.return_value = {} get_mock.return_value = (200, 'fake', base_config) bios_mock.return_value = (ris_outputs.GET_HEADERS, settings_uri, {}) patch_mock.return_value = (200, 'fake', 'fake') self.client.reset_bios_to_default() check_mock.assert_called_once_with() bios_mock.assert_called_once_with(settings) op_mock.assert_called_once_with(ris_outputs.GET_HEADERS, 'PATCH') get_mock.assert_called_once_with('/rest/v1/systems/1/bios/BaseConfigs') passwd_mock.assert_called_once_with(None) patch_mock.assert_called_once_with(settings_uri, {}, default_config) validate_mock.assert_called_once_with(ris_outputs.GET_HEADERS, settings_uri) @mock.patch.object(ris.RISOperations, '_is_raid_supported') @mock.patch.object(ris.RISOperations, '_get_logical_raid_levels') @mock.patch.object(ris.RISOperations, '_get_drive_type_and_speed') @mock.patch.object(ris.RISOperations, '_check_iscsi_rest_patch_allowed') @mock.patch.object(ris.RISOperations, '_get_bios_setting') @mock.patch.object(ris.RISOperations, '_get_nvdimm_n_status') @mock.patch.object(ris.RISOperations, '_get_cpu_virtualization') @mock.patch.object(ris.RISOperations, '_get_tpm_capability') @mock.patch.object(ris.RISOperations, '_get_number_of_gpu_devices_connected') @mock.patch.object(ris.RISOperations, 'get_supported_boot_mode') @mock.patch.object(ris.RISOperations, 'get_secure_boot_mode') @mock.patch.object(ris.RISOperations, '_get_ilo_firmware_version') @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_server_capabilities(self, get_details_mock, ilo_firm_mock, secure_mock, boot_mode_mock, gpu_mock, tpm_mock, cpu_vt_mock, nvdimm_n_mock, bios_sriov_mock, iscsi_boot_mock, drive_mock, raid_mock, raid_support_mock): host_details = json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP) get_details_mock.return_value = host_details ilo_firm_mock.return_value = {'ilo_firmware_version': 'iLO 4 v2.20'} gpu_mock.return_value = {'pci_gpu_devices': 2} boot_mode_mock.return_value = ( constants.SUPPORTED_BOOT_MODE_UEFI_ONLY) cpu_vt_mock.return_value = True secure_mock.return_value = False nvdimm_n_mock.return_value = True tpm_mock.return_value = True bios_sriov_mock.return_value = 'Disabled' iscsi_boot_mock.return_value = '/rest/v1/systems/1/bios/iScsi' drive_mock.return_value = {'has_rotational': True, 'rotational_drive_4800_rpm': True} raid_mock.return_value = {'logical_raid_volume_0': 'true'} raid_support_mock.return_value = True expected_caps = {'secure_boot': 'true', 'ilo_firmware_version': 'iLO 4 v2.20', 'rom_firmware_version': u'I36 v1.40 (01/28/2015)', 'server_model': u'ProLiant BL460c Gen9', 'pci_gpu_devices': 2, 'trusted_boot': 'true', 'cpu_vt': 'true', 'nvdimm_n': 'true', 'boot_mode_bios': 'false', 'boot_mode_uefi': 'true', 'iscsi_boot': 'true', 'has_rotational': True, 'rotational_drive_4800_rpm': True, 'logical_raid_volume_0': 'true', 'hardware_supports_raid': 'true'} capabilities = self.client.get_server_capabilities() self.assertEqual(expected_caps, capabilities) @mock.patch.object(ris.RISOperations, '_is_raid_supported') @mock.patch.object(ris.RISOperations, '_get_logical_raid_levels') @mock.patch.object(ris.RISOperations, '_get_drive_type_and_speed') @mock.patch.object(ris.RISOperations, '_check_iscsi_rest_patch_allowed') @mock.patch.object(ris.RISOperations, '_get_bios_setting') @mock.patch.object(ris.RISOperations, '_get_nvdimm_n_status') @mock.patch.object(ris.RISOperations, '_get_cpu_virtualization') @mock.patch.object(ris.RISOperations, '_get_tpm_capability') @mock.patch.object(ris.RISOperations, '_get_number_of_gpu_devices_connected') @mock.patch.object(ris.RISOperations, 'get_supported_boot_mode') @mock.patch.object(ris.RISOperations, 'get_secure_boot_mode') @mock.patch.object(ris.RISOperations, '_get_ilo_firmware_version') @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_server_capabilities_tp_absent( self, get_details_mock, ilo_firm_mock, secure_mock, boot_mode_mock, gpu_mock, tpm_mock, cpu_vt_mock, nvdimm_n_mock, bios_sriov_mock, iscsi_mock, drive_mock, raid_mock, raid_support_mock): host_details = json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP) get_details_mock.return_value = host_details ilo_firm_mock.return_value = {'ilo_firmware_version': 'iLO 4 v2.20'} gpu_mock.return_value = {'pci_gpu_devices': 2} boot_mode_mock.return_value = ( constants.SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI) secure_mock.return_value = False nvdimm_n_mock.return_value = True tpm_mock.return_value = False cpu_vt_mock.return_value = True bios_sriov_mock.return_value = 'Enabled' iscsi_mock.side_effect = exception.IloCommandNotSupportedError('error') drive_mock.return_value = {'has_rotational': True, 'rotational_drive_4800_rpm': True} raid_mock.return_value = {'logical_raid_volume_0': 'true'} raid_support_mock.return_value = False expected_caps = {'secure_boot': 'true', 'ilo_firmware_version': 'iLO 4 v2.20', 'rom_firmware_version': u'I36 v1.40 (01/28/2015)', 'server_model': u'ProLiant BL460c Gen9', 'pci_gpu_devices': 2, 'cpu_vt': 'true', 'nvdimm_n': 'true', 'sriov_enabled': 'true', 'boot_mode_bios': 'true', 'boot_mode_uefi': 'true', 'has_rotational': True, 'rotational_drive_4800_rpm': True, 'logical_raid_volume_0': 'true'} capabilities = self.client.get_server_capabilities() self.assertEqual(expected_caps, capabilities) @mock.patch.object(ris.RISOperations, '_get_ilo_details') def test_get_ilo_firmware_version_as_major_minor( self, get_ilo_details_mock): ilo_details = json.loads(ris_outputs.GET_MANAGER_DETAILS) uri = '/rest/v1/Managers/1' get_ilo_details_mock.return_value = (ilo_details, uri) ilo_firm = self.client.get_ilo_firmware_version_as_major_minor() expected_ilo_firm = "2.04" self.assertEqual(expected_ilo_firm, ilo_firm) @mock.patch.object(ris.RISOperations, '_get_ilo_details') def test_get_ilo_firmware_version_as_major_minor_suggested_min( self, get_ilo_details_mock): ilo_details = json.loads(ris_outputs.GET_MANAGER_DETAILS_EQ_SUGGESTED) uri = '/rest/v1/Managers/1' get_ilo_details_mock.return_value = (ilo_details, uri) ilo_firm = self.client.get_ilo_firmware_version_as_major_minor() expected_ilo_firm = "2.30" self.assertEqual(expected_ilo_firm, ilo_firm) @mock.patch.object(ris.RISOperations, '_get_ilo_details') def test_get_ilo_firmware_version_as_major_minor_gt_suggested_min( self, get_ilo_details_mock): ilo_details = json.loads(ris_outputs.GET_MANAGER_DETAILS_GT_SUGGESTED) uri = '/rest/v1/Managers/1' get_ilo_details_mock.return_value = (ilo_details, uri) ilo_firm = self.client.get_ilo_firmware_version_as_major_minor() expected_ilo_firm = "2.54" self.assertEqual(expected_ilo_firm, ilo_firm) @mock.patch.object(ris.RISOperations, '_get_ilo_details') def test_get_ilo_firmware_version_as_major_minor_no_firmware( self, get_ilo_details_mock): ilo_details = json.loads(ris_outputs.GET_MANAGER_DETAILS_NO_FIRMWARE) uri = '/rest/v1/Managers/1' get_ilo_details_mock.return_value = (ilo_details, uri) ilo_firm = self.client.get_ilo_firmware_version_as_major_minor() expected_ilo_firm = None self.assertEqual(expected_ilo_firm, ilo_firm) @mock.patch.object(ris.RISOperations, '_get_ilo_details') def test__get_ilo_firmware_version(self, get_ilo_details_mock): ilo_details = json.loads(ris_outputs.GET_MANAGER_DETAILS) uri = '/rest/v1/Managers/1' get_ilo_details_mock.return_value = (ilo_details, uri) ilo_firm = self.client._get_ilo_firmware_version() expected_ilo_firm = {'ilo_firmware_version': 'iLO 4 v2.20'} self.assertIn('ilo_firmware_version', ilo_firm) self.assertEqual(expected_ilo_firm, ilo_firm) @mock.patch.object(ris.RISOperations, '_rest_post') @mock.patch.object(ris.RISOperations, '_get_ilo_details') def test_activate_license(self, get_ilo_details_mock, post_mock): ilo_details = json.loads(ris_outputs.GET_MANAGER_DETAILS) uri = '/rest/v1/Managers/1' license_uri = "/rest/v1/Managers/1/LicenseService" get_ilo_details_mock.return_value = (ilo_details, uri) post_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client.activate_license('testkey') get_ilo_details_mock.assert_called_once_with() post_mock.assert_called_once_with(license_uri, None, {'LicenseKey': 'testkey'}) @mock.patch.object(ris.RISOperations, '_rest_post') @mock.patch.object(ris.RISOperations, '_get_ilo_details') def test_activate_license_IloError(self, get_ilo_details_mock, post_mock): ilo_details = json.loads(ris_outputs.GET_MANAGER_DETAILS) uri = '/rest/v1/Managers/1' license_uri = "/rest/v1/Managers/1/LicenseService" get_ilo_details_mock.return_value = (ilo_details, uri) post_mock.return_value = (500, ris_outputs.GET_HEADERS, ris_outputs.REST_FAILURE_OUTPUT) self.assertRaises(exception.IloError, self.client.activate_license, 'testkey') get_ilo_details_mock.assert_called_once_with() post_mock.assert_called_once_with(license_uri, None, {'LicenseKey': 'testkey'}) @mock.patch.object(ris.RISOperations, '_get_ilo_details') def test_activate_license_IloCommandNotSupported(self, get_ilo_details_mock): ilo_details = json.loads(ris_outputs.GET_MANAGER_DETAILS) del ilo_details['Oem']['Hp']['links']['LicenseService'] uri = '/rest/v1/Managers/1' get_ilo_details_mock.return_value = (ilo_details, uri) self.assertRaises(exception.IloCommandNotSupportedError, self.client.activate_license, 'testkey') get_ilo_details_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_get_vm_device_status') def test_get_vm_status_floppy_empty(self, get_vm_device_status_mock): floppy_resp = json.loads(ris_outputs.RESP_VM_STATUS_FLOPPY_EMPTY) device_uri = floppy_resp["links"]["self"]["href"] get_vm_device_status_mock.return_value = (floppy_resp, device_uri) exp_result = json.loads(ris_outputs.GET_VM_STATUS_FLOPPY_EMPTY) result = self.client.get_vm_status('FLOPPY') self.assertEqual(result, exp_result) get_vm_device_status_mock.assert_called_once_with('FLOPPY') @mock.patch.object(ris.RISOperations, '_get_vm_device_status') def test_get_vm_status_floppy_inserted(self, get_vm_device_status_mock): floppy_resp = json.loads(ris_outputs.RESP_VM_STATUS_FLOPPY_INSERTED) device_uri = floppy_resp["links"]["self"]["href"] get_vm_device_status_mock.return_value = (floppy_resp, device_uri) exp_result = json.loads(ris_outputs.GET_VM_STATUS_FLOPPY_INSERTED) result = self.client.get_vm_status('FLOPPY') self.assertEqual(result, exp_result) get_vm_device_status_mock.assert_called_once_with('FLOPPY') @mock.patch.object(ris.RISOperations, '_get_vm_device_status') def test_get_vm_status_cdrom_empty(self, get_vm_device_status_mock): cdrom_resp = json.loads(ris_outputs.RESP_VM_STATUS_CDROM_EMPTY) device_uri = cdrom_resp["links"]["self"]["href"] get_vm_device_status_mock.return_value = (cdrom_resp, device_uri) exp_result = json.loads(ris_outputs.GET_VM_STATUS_CDROM_EMPTY) result = self.client.get_vm_status('CDROM') self.assertEqual(result, exp_result) get_vm_device_status_mock.assert_called_once_with('CDROM') @mock.patch.object(ris.RISOperations, '_get_vm_device_status') def test_get_vm_status_cdrom_inserted(self, get_vm_device_status_mock): cdrom_resp = json.loads(ris_outputs.RESP_VM_STATUS_CDROM_INSERTED) device_uri = cdrom_resp["links"]["self"]["href"] get_vm_device_status_mock.return_value = (cdrom_resp, device_uri) exp_result = json.loads(ris_outputs.GET_VM_STATUS_CDROM_INSERTED) result = self.client.get_vm_status('CDROM') self.assertEqual(result, exp_result) get_vm_device_status_mock.assert_called_once_with('CDROM') @mock.patch.object(ris.RISOperations, '_rest_patch') def test_set_vm_status_cdrom_connect(self, patch_mock): self.client.set_vm_status('CDROM', boot_option='CONNECT') self.assertFalse(patch_mock.called) def test_set_vm_status_cdrom_invalid_arg(self): self.assertRaises(exception.IloInvalidInputError, self.client.set_vm_status, device='CDROM', boot_option='FOO') @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_get_vm_device_status') def test_set_vm_status_cdrom(self, get_vm_device_mock, patch_mock): vm_uri = '/rest/v1/Managers/1/VirtualMedia/2' cdrom_resp = json.loads(ris_outputs.RESP_VM_STATUS_CDROM_INSERTED) device_uri = cdrom_resp["links"]["self"]["href"] get_vm_device_mock.return_value = (cdrom_resp, device_uri) vm_patch = json.loads(ris_outputs.PATCH_VM_CDROM) patch_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client.set_vm_status(device='CDROM', boot_option='BOOT_ONCE') get_vm_device_mock.assert_called_once_with('CDROM') patch_mock.assert_called_once_with(vm_uri, None, vm_patch) @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_get_vm_device_status') def test_set_vm_status_cdrom_fail(self, get_vm_device_mock, patch_mock): vm_uri = '/rest/v1/Managers/1/VirtualMedia/2' cdrom_resp = json.loads(ris_outputs.RESP_VM_STATUS_CDROM_INSERTED) device_uri = cdrom_resp["links"]["self"]["href"] get_vm_device_mock.return_value = (cdrom_resp, device_uri) vm_patch = json.loads(ris_outputs.PATCH_VM_CDROM) patch_mock.return_value = (301, ris_outputs.GET_HEADERS, ris_outputs.REST_FAILURE_OUTPUT) self.assertRaises(exception.IloError, self.client.set_vm_status, device='CDROM', boot_option='BOOT_ONCE') get_vm_device_mock.assert_called_once_with('CDROM') patch_mock.assert_called_once_with(vm_uri, None, vm_patch) @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_get_vm_device_status') @mock.patch.object(utils, 'validate_href') def test_insert_virtual_media( self, validate_href_mock, get_vm_device_mock, patch_mock): vm_uri = '/rest/v1/Managers/1/VirtualMedia/2' cdrom_resp = json.loads(ris_outputs.RESP_VM_STATUS_CDROM_EMPTY) device_uri = cdrom_resp["links"]["self"]["href"] get_vm_device_mock.return_value = (cdrom_resp, device_uri) vm_patch = {'Image': 'http://1.1.1.1/cdrom.iso'} patch_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client.insert_virtual_media('http://1.1.1.1/cdrom.iso', device='CDROM') get_vm_device_mock.assert_called_once_with('CDROM') patch_mock.assert_called_once_with(vm_uri, None, vm_patch) validate_href_mock.assert_called_once_with('http://1.1.1.1/cdrom.iso') @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, 'eject_virtual_media') @mock.patch.object(ris.RISOperations, '_get_vm_device_status') @mock.patch.object(utils, 'validate_href') def test_insert_virtual_media_media_attached(self, validate_href_mock, get_vm_device_mock, eject_virtual_media_mock, patch_mock): vm_uri = '/rest/v1/Managers/1/VirtualMedia/2' cdrom_resp = json.loads(ris_outputs.RESP_VM_STATUS_CDROM_INSERTED) device_uri = cdrom_resp["links"]["self"]["href"] get_vm_device_mock.return_value = (cdrom_resp, device_uri) vm_patch = {'Image': 'http://1.1.1.1/cdrom.iso'} patch_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client.insert_virtual_media('http://1.1.1.1/cdrom.iso', device='CDROM') get_vm_device_mock.assert_called_once_with('CDROM') eject_virtual_media_mock.assert_called_once_with('CDROM') patch_mock.assert_called_once_with(vm_uri, None, vm_patch) validate_href_mock.assert_called_once_with('http://1.1.1.1/cdrom.iso') @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_get_vm_device_status') @mock.patch.object(utils, 'validate_href') def test_insert_virtual_media_fail( self, validate_href_mock, get_vm_device_mock, patch_mock): vm_uri = '/rest/v1/Managers/1/VirtualMedia/2' cdrom_resp = json.loads(ris_outputs.RESP_VM_STATUS_CDROM_EMPTY) device_uri = cdrom_resp["links"]["self"]["href"] get_vm_device_mock.return_value = (cdrom_resp, device_uri) vm_patch = {'Image': 'http://1.1.1.1/cdrom.iso'} patch_mock.return_value = (301, ris_outputs.GET_HEADERS, ris_outputs.REST_FAILURE_OUTPUT) self.assertRaises(exception.IloError, self.client.insert_virtual_media, 'http://1.1.1.1/cdrom.iso', device='CDROM') get_vm_device_mock.assert_called_once_with('CDROM') patch_mock.assert_called_once_with(vm_uri, None, vm_patch) validate_href_mock.assert_called_once_with('http://1.1.1.1/cdrom.iso') @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_get_vm_device_status') def test_eject_virtual_media(self, get_vm_device_mock, patch_mock): vm_uri = '/rest/v1/Managers/1/VirtualMedia/2' cdrom_resp = json.loads(ris_outputs.RESP_VM_STATUS_CDROM_INSERTED) device_uri = cdrom_resp["links"]["self"]["href"] get_vm_device_mock.return_value = (cdrom_resp, device_uri) vm_patch = {'Image': None} patch_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client.eject_virtual_media(device='CDROM') get_vm_device_mock.assert_called_once_with('CDROM') patch_mock.assert_called_once_with(vm_uri, None, vm_patch) @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_get_vm_device_status') def test_eject_virtual_media_cdrom_empty( self, get_vm_device_mock, patch_mock): cdrom_resp = json.loads(ris_outputs.RESP_VM_STATUS_CDROM_EMPTY) device_uri = cdrom_resp["links"]["self"]["href"] get_vm_device_mock.return_value = (cdrom_resp, device_uri) self.client.eject_virtual_media(device='CDROM') get_vm_device_mock.assert_called_once_with('CDROM') self.assertFalse(patch_mock.called) @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_get_vm_device_status') def test_eject_virtual_media_fail(self, get_vm_device_mock, patch_mock): vm_uri = '/rest/v1/Managers/1/VirtualMedia/2' cdrom_resp = json.loads(ris_outputs.RESP_VM_STATUS_CDROM_INSERTED) device_uri = cdrom_resp["links"]["self"]["href"] get_vm_device_mock.return_value = (cdrom_resp, device_uri) vm_patch = {'Image': None} patch_mock.return_value = (301, ris_outputs.GET_HEADERS, ris_outputs.REST_FAILURE_OUTPUT) self.assertRaises(exception.IloError, self.client.eject_virtual_media, device='CDROM') get_vm_device_mock.assert_called_once_with('CDROM') patch_mock.assert_called_once_with(vm_uri, None, vm_patch) @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_one_time_boot_not_set(self, get_host_details_mock): system_data = json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP) get_host_details_mock.return_value = system_data ret = self.client.get_one_time_boot() get_host_details_mock.assert_called_once_with() self.assertEqual(ret, 'Normal') @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_one_time_boot_cdrom(self, get_host_details_mock): system_data = json.loads(ris_outputs.RESP_BODY_FOR_SYSTEM_WITH_CDROM) get_host_details_mock.return_value = system_data ret = self.client.get_one_time_boot() get_host_details_mock.assert_called_once_with() self.assertEqual(ret, 'CDROM') @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_one_time_boot_UefiShell(self, get_host_details_mock): system_data = json.loads(ris_outputs.RESP_BODY_WITH_UEFI_SHELL) get_host_details_mock.return_value = system_data ret = self.client.get_one_time_boot() get_host_details_mock.assert_called_once_with() self.assertEqual(ret, 'UefiShell') @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_one_time_boot_exc(self, get_host_details_mock): system_data = json.loads(ris_outputs.RESP_BODY_FOR_SYSTEM_WITHOUT_BOOT) get_host_details_mock.return_value = system_data self.assertRaises(exception.IloError, self.client.get_one_time_boot) get_host_details_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_update_persistent_boot') def test_set_one_time_boot_cdrom(self, update_persistent_boot_mock): self.client.set_one_time_boot('cdrom') update_persistent_boot_mock.assert_called_once_with( ['cdrom'], persistent=False) @mock.patch.object(ris.RISOperations, '_update_persistent_boot') def test_set_one_time_boot_iscsi(self, update_persistent_boot_mock): self.client.set_one_time_boot('ISCSI') update_persistent_boot_mock.assert_called_once_with( ['ISCSI'], persistent=False) @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_persistent_boot_device_cdrom(self, get_host_details_mock): system_data = json.loads(ris_outputs.SYSTEM_WITH_CDROM_CONT) get_host_details_mock.return_value = system_data ret = self.client.get_persistent_boot_device() get_host_details_mock.assert_called_once_with() self.assertEqual(ret, 'CDROM') @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_persistent_boot_device_UefiShell(self, get_host_details_mock): system_data = json.loads(ris_outputs.SYSTEM_WITH_UEFISHELL_CONT) get_host_details_mock.return_value = system_data ret = self.client.get_persistent_boot_device() get_host_details_mock.assert_called_once_with() self.assertEqual(ret, 'UefiShell') @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_persistent_boot_device_exc(self, get_host_details_mock): system_data = json.loads(ris_outputs.RESP_BODY_FOR_SYSTEM_WITHOUT_BOOT) get_host_details_mock.return_value = system_data self.assertRaises(exception.IloError, self.client.get_persistent_boot_device) get_host_details_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_persistent_boot_device_bios(self, get_host_details_mock, _uefi_boot_mode_mock): system_data = json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP) get_host_details_mock.return_value = system_data _uefi_boot_mode_mock.return_value = False ret = self.client.get_persistent_boot_device() get_host_details_mock.assert_called_once_with() self.assertIsNone(ret) @mock.patch.object(ris.RISOperations, '_get_persistent_boot_devices') @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') @mock.patch.object(ris.RISOperations, '_get_host_details') def _test_get_persistent_boot_device_uefi(self, get_host_details_mock, _uefi_boot_mode_mock, boot_devices_mock, boot_devices, boot_sources, exp_ret_value=None): system_data = json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP) get_host_details_mock.return_value = system_data _uefi_boot_mode_mock.return_value = True boot_devices_mock.return_value = boot_sources, boot_devices ret = self.client.get_persistent_boot_device() get_host_details_mock.assert_called_once_with() _uefi_boot_mode_mock.assert_called_once_with() boot_devices_mock.assert_called_once_with() self.assertEqual(ret, exp_ret_value) def test_get_persistent_boot_device_uefi_pxe(self): boot_devs = ris_outputs.UEFI_BOOT_DEVICE_ORDER_PXE boot_srcs = json.loads(ris_outputs.UEFI_BootSources) self._test_get_persistent_boot_device_uefi(boot_devices=boot_devs, boot_sources=boot_srcs, exp_ret_value='NETWORK') @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_persistent_boot_device_uefi_cd(self, get_host_details_mock, _uefi_boot_mode_mock): boot_devs = ris_outputs.UEFI_BOOT_DEVICE_ORDER_CD boot_srcs = json.loads(ris_outputs.UEFI_BootSources) self._test_get_persistent_boot_device_uefi(boot_devices=boot_devs, boot_sources=boot_srcs, exp_ret_value='CDROM') def test_get_persistent_boot_device_uefi_hdd(self): boot_devs = ris_outputs.UEFI_BOOT_DEVICE_ORDER_HDD boot_srcs = json.loads(ris_outputs.UEFI_BootSources) self._test_get_persistent_boot_device_uefi(boot_devices=boot_devs, boot_sources=boot_srcs, exp_ret_value='HDD') def test_get_persistent_boot_device_uefi_none(self): boot_devs = ris_outputs.UEFI_BOOT_DEVICE_ORDER_ERR boot_srcs = json.loads(ris_outputs.UEFI_BootSources) self._test_get_persistent_boot_device_uefi(boot_devices=boot_devs, boot_sources=boot_srcs, exp_ret_value=None) @mock.patch.object(ris.RISOperations, '_get_persistent_boot_devices') @mock.patch.object(ris.RISOperations, '_is_boot_mode_uefi') @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_persistent_boot_device_uefi_exp(self, get_host_details_mock, _uefi_boot_mode_mock, boot_devices_mock): system_data = json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP) get_host_details_mock.return_value = system_data _uefi_boot_mode_mock.return_value = True devices = ris_outputs.UEFI_BOOT_DEVICE_ORDER_HDD sources = json.loads(ris_outputs.UEFI_BOOT_SOURCES_ERR) boot_devices_mock.return_value = sources, devices self.assertRaises(exception.IloError, self.client.get_persistent_boot_device) get_host_details_mock.assert_called_once_with() _uefi_boot_mode_mock.assert_called_once_with() boot_devices_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_update_persistent_boot') def test_update_persistent_boot_cdrom(self, update_persistent_boot_mock): self.client.update_persistent_boot(['cdrom']) update_persistent_boot_mock.assert_called_once_with( ['cdrom'], persistent=True) @mock.patch.object(ris.RISOperations, '_update_persistent_boot') def test_update_persistent_boot_iscsi(self, update_persistent_boot_mock): self.client.update_persistent_boot(['ISCSI']) update_persistent_boot_mock.assert_called_once_with( ['ISCSI'], persistent=True) @mock.patch.object(ris.RISOperations, '_update_persistent_boot') def test_update_persistent_boot_exc(self, update_persistent_boot_mock): self.assertRaises(exception.IloError, self.client.update_persistent_boot, ['fake']) self.assertFalse(update_persistent_boot_mock.called) def test_update_firmware_throws_error_for_invalid_component(self): # | WHEN | & | THEN | self.assertRaises(exception.InvalidInputError, self.client.update_firmware, 'fw_file_url', 'invalid_component') @mock.patch.object(ris.RISOperations, '_get_firmware_update_service_resource', autospec=True) @mock.patch.object(ris.RISOperations, '_rest_post', autospec=True) @mock.patch.object(ris.common, 'wait_for_ris_firmware_update_to_complete', autospec=True) @mock.patch.object(ris.RISOperations, 'get_firmware_update_progress', autospec=True) def test_update_firmware( self, get_firmware_update_progress_mock, wait_for_ris_firmware_update_to_complete_mock, _rest_post_mock, _get_firmware_update_service_resource_mock): # | GIVEN | _rest_post_mock.return_value = 200, 'some-headers', 'response' get_firmware_update_progress_mock.return_value = 'COMPLETED', 100 # | WHEN | self.client.update_firmware('fw_file_url', 'ilo') # | THEN | _get_firmware_update_service_resource_mock.assert_called_once_with( self.client) _rest_post_mock.assert_called_once_with( self.client, mock.ANY, None, {'Action': 'InstallFromURI', 'FirmwareURI': 'fw_file_url', }) wait_for_ris_firmware_update_to_complete_mock.assert_called_once_with( self.client) get_firmware_update_progress_mock.assert_called_once_with( self.client) @mock.patch.object( ris.RISOperations, '_get_firmware_update_service_resource', autospec=True) @mock.patch.object(ris.RISOperations, '_rest_post', autospec=True) def test_update_firmware_throws_if_post_operation_fails( self, _rest_post_mock, _get_firmware_update_service_resource_mock): # | GIVEN | _rest_post_mock.return_value = 500, 'some-headers', 'response' # | WHEN | & | THEN | self.assertRaises(exception.IloError, self.client.update_firmware, 'fw_file_url', 'cpld') @mock.patch.object(ris.RISOperations, '_get_firmware_update_service_resource', autospec=True) @mock.patch.object(ris.RISOperations, '_rest_post', autospec=True) @mock.patch.object(ris.common, 'wait_for_ris_firmware_update_to_complete', autospec=True) @mock.patch.object(ris.RISOperations, 'get_firmware_update_progress', autospec=True) def test_update_firmware_throws_if_error_occurs_in_update( self, get_firmware_update_progress_mock, wait_for_ris_firmware_update_to_complete_mock, _rest_post_mock, _get_firmware_update_service_resource_mock): # | GIVEN | _rest_post_mock.return_value = 200, 'some-headers', 'response' get_firmware_update_progress_mock.return_value = 'ERROR', 0 # | WHEN | & | THEN | self.assertRaises(exception.IloError, self.client.update_firmware, 'fw_file_url', 'ilo') @mock.patch.object(ris.RISOperations, '_get_firmware_update_service_resource', autospec=True) @mock.patch.object(ris.RISOperations, '_rest_get', autospec=True) def test_get_firmware_update_progress( self, _rest_get_mock, _get_firmware_update_service_resource_mock): # | GIVEN | _rest_get_mock.return_value = (200, 'some-headers', {'State': 'COMPLETED', 'ProgressPercent': 100}) # | WHEN | state, percent = self.client.get_firmware_update_progress() # | THEN | _get_firmware_update_service_resource_mock.assert_called_once_with( self.client) _rest_get_mock.assert_called_once_with(self.client, mock.ANY) self.assertTupleEqual((state, percent), ('COMPLETED', 100)) @mock.patch.object(ris.RISOperations, '_get_firmware_update_service_resource', autospec=True) @mock.patch.object(ris.RISOperations, '_rest_get', autospec=True) def test_get_firmware_update_progress_throws_if_get_operation_fails( self, _rest_get_mock, _get_firmware_update_service_resource_mock): # | GIVEN | _rest_get_mock.return_value = 500, 'some-headers', 'response' # | WHEN | & | THEN | self.assertRaises(exception.IloError, self.client.get_firmware_update_progress) @mock.patch.object(ris.RISOperations, 'get_host_power_status') def test_set_host_power_no_change(self, host_power_status_mock): host_power_status_mock.return_value = 'ON' self.client.set_host_power('on') self.assertTrue(host_power_status_mock.called) @mock.patch.object(ris.RISOperations, 'get_host_power_status') def test_set_host_power_exc(self, host_power_status_mock): self.assertRaises(exception.IloInvalidInputError, self.client.set_host_power, 'invalid') @mock.patch.object(ris.RISOperations, '_perform_power_op') @mock.patch.object(ris.RISOperations, 'get_host_power_status') @mock.patch.object(ris.RISOperations, 'get_product_name') @mock.patch.object(ris.RISOperations, '_retry_until_powered_on') def test_set_host_power_off_for_blade_servers(self, retry_mock, product_mock, host_power_status_mock, perform_power_op_mock): host_power_status_mock.return_value = 'ON' product_mock.return_value = 'ProLiant BL460' self.client.set_host_power('off') host_power_status_mock.assert_called_once_with() perform_power_op_mock.assert_called_once_with('ForceOff') self.assertFalse(retry_mock.called) @mock.patch.object(ris.RISOperations, '_perform_power_op') @mock.patch.object(ris.RISOperations, 'get_host_power_status') @mock.patch.object(ris.RISOperations, 'get_product_name') @mock.patch.object(ris.RISOperations, '_retry_until_powered_on') def test_set_host_power_on_for_blade_servers(self, retry_mock, product_mock, host_power_status_mock, perform_power_op_mock): host_power_status_mock.return_value = 'OFF' product_mock.return_value = 'ProLiant BL460' self.client.set_host_power('On') host_power_status_mock.assert_called_once_with() self.assertTrue(product_mock.called) self.assertFalse(perform_power_op_mock.called) self.assertTrue(retry_mock.called) @mock.patch.object(ris.RISOperations, '_perform_power_op') @mock.patch.object(ris.RISOperations, 'get_host_power_status') @mock.patch.object(ris.RISOperations, '_retry_until_powered_on') def test_set_host_power_off_for_non_blade_servers( self, retry_mock, host_power_status_mock, perform_power_op_mock): host_power_status_mock.return_value = 'ON' self.client.set_host_power('off') host_power_status_mock.assert_called_once_with() perform_power_op_mock.assert_called_once_with('ForceOff') self.assertFalse(retry_mock.called) @mock.patch.object(ris.RISOperations, '_perform_power_op') @mock.patch.object(ris.RISOperations, 'get_host_power_status') @mock.patch.object(ris.RISOperations, 'get_product_name') @mock.patch.object(ris.RISOperations, '_retry_until_powered_on') def test_set_host_power_on_for_non_blade_servers( self, retry_mock, product_mock, host_power_status_mock, perform_power_op_mock): host_power_status_mock.return_value = 'OFF' product_mock.return_value = 'ProLiant DL380' self.client.set_host_power('On') host_power_status_mock.assert_called_once_with() self.assertTrue(product_mock.called) self.assertTrue(perform_power_op_mock.called) self.assertFalse(retry_mock.called) @mock.patch.object(ris.RISOperations, '_perform_power_op') @mock.patch.object(ris.RISOperations, 'get_host_power_status') def test_retry_until_powered_on_3times(self, host_power_status_mock, perform_power_mock): host_power_status_mock.side_effect = ['OFF', 'OFF', 'ON'] self.client._retry_until_powered_on('ON') self.assertEqual(3, host_power_status_mock.call_count) @mock.patch.object(ris.RISOperations, '_perform_power_op') @mock.patch.object(ris.RISOperations, 'get_host_power_status') def test_retry_until_powered_on(self, host_power_status_mock, perform_power_mock): host_power_status_mock.return_value = 'ON' self.client._retry_until_powered_on('ON') self.assertEqual(1, host_power_status_mock.call_count) @mock.patch.object(ris.RISOperations, '_perform_power_op') def test_reset_server(self, mock_perform_power): self.client.reset_server() mock_perform_power.assert_called_once_with("ForceRestart") @mock.patch.object(ris.RISOperations, '_press_pwr_btn') def test_hold_pwr_btn(self, press_pwr_btn_mock): self.client.hold_pwr_btn() press_pwr_btn_mock.assert_called_once_with(pushType="PressAndHold") @mock.patch.object(ris.RISOperations, '_press_pwr_btn') def test_press_pwr_btn(self, press_pwr_btn_mock): self.client.hold_pwr_btn() press_pwr_btn_mock.assert_called_once_with(pushType="PressAndHold") @mock.patch.object(ris.RISOperations, '_perform_power_op') @mock.patch.object(ris.RISOperations, 'get_host_power_status') def test_inject_nmi(self, get_power_status_mock, perform_power_op_mock): get_power_status_mock.return_value = 'ON' self.client.inject_nmi() get_power_status_mock.assert_called_once_with() perform_power_op_mock.assert_called_once_with('Nmi') @mock.patch.object(ris.RISOperations, '_perform_power_op') @mock.patch.object(ris.RISOperations, 'get_host_power_status') def test_inject_nmi_exc(self, get_power_status_mock, perform_power_op_mock): get_power_status_mock.return_value = 'OFF' self.assertRaises(exception.IloError, self.client.inject_nmi) get_power_status_mock.assert_called_once_with() self.assertFalse(perform_power_op_mock.called) @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_host_post_state(self, get_details_mock): host_response = ris_outputs.RESPONSE_BODY_FOR_REST_OP expected = 'PowerOff' get_details_mock.return_value = json.loads(host_response) result = self.client.get_host_post_state() self.assertEqual(expected, result) get_details_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_get_host_details') def test_get_host_post_state_exc(self, get_details_mock): host_response = json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP) get_details_mock.return_value = host_response del host_response['Oem']['Hp']['PostState'] self.assertRaises(exception.IloError, self.client.get_host_post_state) get_details_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_current_bios_settings_filter_true(self, check_bios_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) settings.pop("links", None) expected_value = {k: settings[k] for k in ( constants.SUPPORTED_BIOS_PROPERTIES) if k in settings} actual_value = self.client.get_current_bios_settings(True) check_bios_mock.assert_called_once_with() self.assertEqual(actual_value, expected_value) @mock.patch.object(utils, 'apply_bios_properties_filter') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_current_bios_settings_filter_false(self, check_bios_mock, bios_filter_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) settings.pop("links", None) actual_value = self.client.get_current_bios_settings(False) check_bios_mock.assert_called_once_with() bios_filter_mock.assert_not_called() self.assertEqual(actual_value, settings) @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_pending_bios_settings_no_links(self, check_bios_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) settings.pop("links", None) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) self.assertRaises(exception.IloCommandNotSupportedError, self.client.get_pending_bios_settings, False) check_bios_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_get_extended_error') @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_pending_bios_settings_filter_true(self, check_bios_mock, get_mock, get_ext_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) settings_uri = "/rest/v1/systems/1/bios/Settings" pending_settings = json.loads(ris_outputs.GET_BIOS_PENDING_SETTINGS) pending_settings.pop("Description", None) get_mock.return_value = (200, ris_outputs.GET_HEADERS, pending_settings) expected_value = {k: pending_settings[k] for k in ( constants.SUPPORTED_BIOS_PROPERTIES) if k in pending_settings} actual_value = self.client.get_pending_bios_settings(True) self.assertEqual(actual_value, expected_value) get_mock.assert_called_once_with(settings_uri) check_bios_mock.assert_called_once_with() @mock.patch.object(utils, 'apply_bios_properties_filter') @mock.patch.object(ris.RISOperations, '_get_extended_error') @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_pending_bios_settings_filter_false(self, check_bios_mock, get_mock, get_ext_mock, bios_filter_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) settings_uri = "/rest/v1/systems/1/bios/Settings" pending_settings = json.loads(ris_outputs.GET_BIOS_PENDING_SETTINGS) get_mock.return_value = (200, ris_outputs.GET_HEADERS, pending_settings) actual_value = self.client.get_pending_bios_settings(False) self.assertEqual(actual_value, pending_settings) get_mock.assert_called_once_with(settings_uri) check_bios_mock.assert_called_once_with() bios_filter_mock.assert_not_called() @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_default_bios_settings_filter_true(self, check_bios_mock, rest_get_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) base_config = json.loads(ris_outputs.GET_BASE_CONFIG) rest_get_mock.return_value = (200, 'HEADERS', base_config) default_settings = None for cfg in base_config['BaseConfigs']: default_settings = cfg.get('default', None) if default_settings is not None: break expected_value = {k: default_settings[k] for k in ( constants.SUPPORTED_BIOS_PROPERTIES) if k in default_settings} actual_value = self.client.get_default_bios_settings(True) check_bios_mock.assert_called_once_with() rest_get_mock.assert_called_once_with( "/rest/v1/systems/1/bios/BaseConfigs") self.assertEqual(expected_value, actual_value) @mock.patch.object(utils, 'apply_bios_properties_filter') @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_default_bios_settings_filter_false( self, check_bios_mock, rest_get_mock, filter_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) base_config = json.loads(ris_outputs.GET_BASE_CONFIG) rest_get_mock.return_value = (200, 'HEADERS', base_config) default_settings = None for cfg in base_config['BaseConfigs']: default_settings = cfg.get('default', None) if default_settings is not None: break expected_value = default_settings actual_value = self.client.get_default_bios_settings(False) check_bios_mock.assert_called_once_with() rest_get_mock.assert_called_once_with( "/rest/v1/systems/1/bios/BaseConfigs") self.assertEqual(expected_value, actual_value) filter_mock.assert_not_called() @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_default_bios_settings_no_links(self, check_bios_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) settings.pop("links", None) self.assertRaises(exception.IloCommandNotSupportedError, self.client.get_default_bios_settings, False) check_bios_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_get_extended_error') @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_default_bios_settings_check_extended_error( self, check_bios_mock, rest_get_mock, ext_err_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) base_config = json.loads(ris_outputs.GET_BASE_CONFIG) rest_get_mock.return_value = (201, 'HEADERS', base_config) self.assertRaises(exception.IloError, self.client.get_default_bios_settings, False) check_bios_mock.assert_called_once_with() ext_err_mock.assert_called_once_with(base_config) @mock.patch.object(utils, 'apply_bios_properties_filter') @mock.patch.object(ris.RISOperations, '_get_extended_error') @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_default_bios_settings_no_default_settings( self, check_bios_mock, rest_get_mock, ext_err_mock, filter_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) base_config = json.loads(ris_outputs.GET_BASE_CONFIG) default_val = base_config["BaseConfigs"][0].pop("default") base_config["BaseConfigs"][0]["no_default"] = default_val rest_get_mock.return_value = (200, 'HEADERS', base_config) self.assertRaises(exception.IloCommandNotSupportedError, self.client.get_default_bios_settings, False) check_bios_mock.assert_called_once_with() ext_err_mock.assert_not_called() filter_mock.assert_not_called() @mock.patch.object(ris.RISOperations, '_change_bios_setting') def test_set_bios_settings_no_data(self, change_bios_mock): apply_filter = True data = None self.assertRaisesRegex( exception.IloError, "Could not apply settings with empty data", self.client.set_bios_settings, data, apply_filter) change_bios_mock.assert_not_called() @mock.patch.object(ris.RISOperations, '_change_bios_setting') def test_set_bios_settings_no_data_no_filter(self, change_bios_mock): apply_filter = False data = None self.assertRaisesRegex( exception.IloError, "Could not apply settings with empty data", self.client.set_bios_settings, data, apply_filter) change_bios_mock.assert_not_called() @mock.patch.object(ris.RISOperations, '_change_bios_setting') def test_set_bios_settings_filter_true_valid_data(self, change_bios_mock): data = { "BootOrderPolicy": "AttemptOnce", "IntelPerfMonitoring": "Enabled", "IntelProcVtd": "Disabled", "UefiOptimizedBoot": "Disabled", "PowerProfile": "MaxPerf", } apply_filter = True self.client.set_bios_settings(data, apply_filter) change_bios_mock.assert_called_once_with(data) @mock.patch.object(ris.RISOperations, '_change_bios_setting') def test_set_bios_settings_filter_true_invalid_data(self, change_bios_mock): data = { "AdminName": "Administrator", "BootOrderPolicy": "AttemptOnce", "IntelPerfMonitoring": "Enabled", "IntelProcVtd": "Disabled", "UefiOptimizedBoot": "Disabled", "PowerProfile": "MaxPerf", "TimeZone": "Utc1" } apply_filter = True self.assertRaisesRegex( exception.IloError, "Could not apply settings as one or more settings" " are not supported", self.client.set_bios_settings, data, apply_filter) change_bios_mock.assert_not_called() @mock.patch.object(ris.RISOperations, '_change_bios_setting') def test_set_bios_settings_filter_false(self, change_bios_mock): data = { "AdminName": "Administrator", "BootMode": "LEGACY", "ServerName": "Gen9 server", "TimeFormat": "Ist", "BootOrderPolicy": "RetryIndefinitely", "ChannelInterleaving": "Enabled", "CollabPowerControl": "Enabled", "ConsistentDevNaming": "LomsOnly", "CustomPostMessage": "" } apply_filter = False self.client.set_bios_settings(data, apply_filter) change_bios_mock.assert_called_once_with(data) @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_bios_settings_result_failed(self, check_bios_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS_FAILED) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) actual_results = [ { "MessageArgs": [ "MinProcIdlePkgState" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [ "MinProcIdlePower" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [ "EnergyPerfBias" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [ "PowerRegulator" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [], "MessageID": "Base.1.0:Success" } ] actual = {"status": "failed", "results": actual_results} expected = self.client.get_bios_settings_result() check_bios_mock.assert_called_once_with() self.assertEqual(expected, actual) @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test_get_bios_settings_result_success(self, check_bios_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) actual_results = [ { "MessageArgs": [], "MessageID": "Base.1.0:Success" } ] actual = {"status": "success", "results": actual_results} check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) expected = self.client.get_bios_settings_result() self.assertEqual(expected, actual) class TestRISOperationsPrivateMethods(testtools.TestCase): def setUp(self): super(TestRISOperationsPrivateMethods, self).setUp() self.client = ris.RISOperations("1.2.3.4", "admin", "Admin") @mock.patch.object(ris.RISOperations, 'get_current_boot_mode') def test__is_boot_mode_uefi_uefi(self, get_current_boot_mode_mock): get_current_boot_mode_mock.return_value = 'UEFI' result = self.client._is_boot_mode_uefi() self.assertTrue(result) @mock.patch.object(ris.RISOperations, 'get_current_boot_mode') def test__is_boot_mode_uefi_bios(self, get_current_boot_mode_mock): get_current_boot_mode_mock.return_value = 'LEGACY' result = self.client._is_boot_mode_uefi() self.assertFalse(result) @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test___change_bios_setting(self, check_bios_mock, patch_mock): bios_uri = '/rest/v1/systems/1/bios' properties = {'fake-property': 'fake-value'} settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) patch_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client._change_bios_setting(properties) check_bios_mock.assert_called_once_with(properties.keys()) patch_mock.assert_called_once_with(bios_uri, {}, properties) @mock.patch.object(ris.RISOperations, '_validate_if_patch_supported') @mock.patch.object(ris.RISOperations, '_operation_allowed') @mock.patch.object(ris.RISOperations, '_get_bios_settings_resource') @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test___change_bios_setting_fail(self, check_bios_mock, patch_mock, settings_mock, op_mock, validate_mock): bios_uri = '/rest/v1/systems/1/bios/Settings' properties = {'fake-property': 'fake-value'} settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) op_mock.return_value = False settings_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) patch_mock.return_value = (301, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.assertRaises(exception.IloError, self.client._change_bios_setting, properties) check_bios_mock.assert_called_once_with(properties.keys()) op_mock.assert_called_once_with(ris_outputs.GET_HEADERS, 'PATCH') settings_mock.assert_called_once_with(settings) patch_mock.assert_called_once_with(bios_uri, {}, properties) @mock.patch.object(ris.RISOperations, '_validate_if_patch_supported') @mock.patch.object(ris.RISOperations, '_get_iscsi_settings_resource') @mock.patch.object(ris.RISOperations, '_operation_allowed') @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test__check_iscsi_rest_patch_allowed(self, check_bios_mock, get_mock, op_mock, settings_mock, validate_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) iscsi_uri = '/rest/v1/systems/1/bios/iScsi' iscsi_settings = json.loads(ris_outputs.GET_ISCSI_SETTINGS) get_mock.return_value = (200, ris_outputs.GET_HEADERS, iscsi_settings) op_mock.return_value = False iscsi_settings_uri = '/rest/v1/systems/1/bios/iScsi/Settings' settings_mock.return_value = (ris_outputs.GET_HEADERS, iscsi_settings_uri, iscsi_settings) self.client._check_iscsi_rest_patch_allowed() check_bios_mock.assert_called_once_with() get_mock.assert_called_once_with(iscsi_uri) op_mock.assert_called_once_with(ris_outputs.GET_HEADERS, 'PATCH') settings_mock.assert_called_once_with(iscsi_settings) validate_mock.assert_called_once_with(ris_outputs.GET_HEADERS, iscsi_settings_uri) @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test__check_iscsi_rest_patch_allowed_fail(self, check_bios_mock, get_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) iscsi_uri = '/rest/v1/systems/1/bios/iScsi' iscsi_settings = json.loads(ris_outputs.GET_ISCSI_SETTINGS) get_mock.return_value = (202, ris_outputs.GET_HEADERS, iscsi_settings) self.assertRaises(exception.IloError, self.client._check_iscsi_rest_patch_allowed) check_bios_mock.assert_called_once_with() get_mock.assert_called_once_with(iscsi_uri) @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test__check_iscsi_rest_patch_allowed_not_found(self, check_bios_mock): bios_uri = '/rest/v1/systems/1/bios' settings = json.loads(ris_outputs.GET_BASE_CONFIG) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, settings) self.assertRaises(exception.IloCommandNotSupportedError, self.client._check_iscsi_rest_patch_allowed) check_bios_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_get_uefi_device_path_by_mac') @mock.patch.object(ris.RISOperations, '_get_bios_mappings_resource') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test__get_nic_association_name_by_mac( self, check_bios_mock, mappings_mock, uefi_device_path_mock): bios_uri = '/rest/v1/systems/1/bios' bios_settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = ( ris_outputs.GET_HEADERS, bios_uri, bios_settings) map_settings = json.loads(ris_outputs.GET_BIOS_MAPPINGS) mappings_mock.return_value = map_settings (uefi_device_path_mock. return_value) = 'PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)' result = ( self.client._get_nic_association_name_by_mac('98:f2:b3:ee:f4:00')) self.assertEqual(result, 'NicBoot1') @mock.patch.object(ris.RISOperations, '_get_collection') def test__get_all_macs(self, collection_mock): member_uri = '/rest/v1/Systems/1/NetworkAdapters' collection_item = json.loads(ris_outputs.RESP_NETWORK_ADAPTER) collection_mock.return_value = [(200, None, collection_item, member_uri)] result = self.client._get_all_macs() self.assertEqual(result, ['9c:b6:54:79:78:70']) @mock.patch.object(ris.RISOperations, '_get_all_macs') def test__validate_macs(self, get_all_macs_mock): get_all_macs_mock.return_value = [ '12:44:6a:3b:04:11', '13:44:6a:3b:04:13'] result = self.client._validate_macs(['12:44:6a:3b:04:11']) self.assertEqual(result, None) @mock.patch.object(ris.RISOperations, '_get_all_macs') def test_validate_macs_failed(self, get_all_macs_mock): get_all_macs_mock.return_value = [ '12:44:6a:3b:04:11', '13:44:6a:3b:04:13'] self.assertRaisesRegex( exception.InvalidInputError, r"Given macs: \['12:44:6A:3B:04:15'\] not found in the system", self.client._validate_macs, ['12:44:6A:3B:04:15']) @mock.patch.object(ris.RISOperations, '_get_collection') def test__get_uefi_device_path_by_mac(self, collection_mock): member_uri = '/rest/v1/Systems/1/NetworkAdapters' collection_item = json.loads(ris_outputs.RESP_NETWORK_ADAPTER) collection_mock.return_value = [(200, None, collection_item, member_uri)] result = self.client._get_uefi_device_path_by_mac('9c:b6:54:79:78:70') self.assertEqual(result, 'PciRoot(0x0)/Pci(0x2,0x3)/Pci(0x0,0x0)') @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_check_iscsi_rest_patch_allowed') @mock.patch.object(ris.RISOperations, '_get_bios_mappings_resource') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test__change_iscsi_settings(self, check_bios_mock, mappings_mock, check_iscsi_mock, patch_mock): bios_uri = '/rest/v1/systems/1/bios' bios_settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, bios_settings) map_settings = json.loads(ris_outputs.GET_BIOS_MAPPINGS) mappings_mock.return_value = map_settings iscsi_uri = '/rest/v1/systems/1/bios/iScsi/Settings' properties = { 'iSCSITargetName': 'iqn.2011-07.com.example.server:test1', 'iSCSIBootLUN': '1', 'iSCSITargetIpAddress': '10.10.1.30', 'iSCSITargetTcpPort': 3260 } settings = json.loads(ris_outputs.GET_ISCSI_PATCH) check_iscsi_mock.return_value = iscsi_uri patch_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client._change_iscsi_settings(properties, []) check_bios_mock.assert_called_once_with() mappings_mock.assert_called_once_with(bios_settings) check_iscsi_mock.assert_called_once_with() patch_mock.assert_called_once_with(iscsi_uri, None, settings) @mock.patch.object(ris.RISOperations, '_validate_macs') @mock.patch.object(ris.RISOperations, '_get_nic_association_name_by_mac') @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_check_iscsi_rest_patch_allowed') def test__change_iscsi_settings_with_mac( self, check_iscsi_mock, patch_mock, nic_association_mock, validate_mock): nic_association_mock.return_value = 'NicBoot1' iscsi_uri = '/rest/v1/systems/1/bios/iScsi/Settings' properties = { 'iSCSITargetName': 'iqn.2011-07.com.example.server:test1', 'iSCSIBootLUN': '1', 'iSCSITargetIpAddress': '10.10.1.30', 'iSCSITargetTcpPort': 3260 } settings = json.loads(ris_outputs.GET_ISCSI_PATCH) check_iscsi_mock.return_value = iscsi_uri patch_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client._change_iscsi_settings(properties, ['98:f2:b3:ee:f4:00']) patch_mock.assert_called_once_with( iscsi_uri, None, {'iSCSIBootSources': [settings['iSCSIBootSources'][0]]}) validate_mock.assert_called_once_with(['98:f2:b3:ee:f4:00']) @mock.patch.object(ris.RISOperations, '_validate_macs') @mock.patch.object(ris.RISOperations, '_check_iscsi_rest_patch_allowed') def test__change_iscsi_settings_invalid_mac( self, check_iscsi_mock, validate_macs_mock): iscsi_uri = '/rest/v1/systems/1/bios/iScsi/Settings' check_iscsi_mock.return_value = iscsi_uri msg = ("Given macs: %(macs)s not found in the system" % {'macs': str(['12:44:6A:3B:04:15'])}) validate_macs_mock.side_effect = exception.InvalidInputError(msg) self.assertRaisesRegex( exception.InvalidInputError, r"Given macs: \['12:44:6A:3B:04:15'\] not found in the system", self.client._change_iscsi_settings, {}, ['12:44:6A:3B:04:15']) @mock.patch.object(ris.RISOperations, '_check_iscsi_rest_patch_allowed') @mock.patch.object(ris.RISOperations, '_get_bios_mappings_resource') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test__change_iscsi_settings_no_macs( self, check_bios_mock, mappings_mock, check_iscsi_mock): bios_uri = '/rest/v1/systems/1/bios' iscsi_uri = '/rest/v1/systems/1/bios/iScsi/Settings' bios_settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, bios_settings) map_settings = json.loads(ris_outputs.GET_BIOS_MAPPINGS_WITHOUT_NIC) mappings_mock.return_value = map_settings check_iscsi_mock.return_value = iscsi_uri self.assertRaises(exception.IloError, self.client._change_iscsi_settings, {}, []) check_bios_mock.assert_called_once_with() mappings_mock.assert_called_once_with(bios_settings) @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_check_iscsi_rest_patch_allowed') @mock.patch.object(ris.RISOperations, '_get_bios_mappings_resource') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test__change_iscsi_settings_fail(self, check_bios_mock, mappings_mock, check_iscsi_mock, patch_mock): bios_uri = '/rest/v1/systems/1/bios' bios_settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, bios_settings) map_settings = json.loads(ris_outputs.GET_BIOS_MAPPINGS) mappings_mock.return_value = map_settings iscsi_uri = '/rest/v1/systems/1/bios/iScsi/Settings' properties = { 'iSCSITargetName': 'iqn.2011-07.com.example.server:test1', 'iSCSIBootLUN': '1', 'iSCSITargetIpAddress': '10.10.1.30', 'iSCSITargetTcpPort': 3260 } settings = json.loads(ris_outputs.GET_ISCSI_PATCH) check_iscsi_mock.return_value = iscsi_uri patch_mock.return_value = (301, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.assertRaises(exception.IloError, self.client._change_iscsi_settings, properties, []) check_bios_mock.assert_called_once_with() mappings_mock.assert_called_once_with(bios_settings) check_iscsi_mock.assert_called_once_with() patch_mock.assert_called_once_with(iscsi_uri, None, settings) @mock.patch.object(ris.RISOperations, '_change_bios_setting') @mock.patch.object(ris.RISOperations, '_get_bios_setting') @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_get_host_details') def test___change_secure_boot_settings(self, get_details_mock, patch_mock, get_bios_mock, change_bios_mock): host_details = json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP) get_details_mock.return_value = host_details get_bios_mock.return_value = "test" secure_boot_uri = '/rest/v1/Systems/1/SecureBoot' bios_dict = {'CustomPostMessage': 'test '} patch_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client._change_secure_boot_settings('fake-property', 'fake-value') get_details_mock.assert_called_once_with() patch_mock.assert_called_once_with(secure_boot_uri, None, {'fake-property': 'fake-value'}) get_bios_mock.assert_called_once_with('CustomPostMessage') change_bios_mock.assert_called_once_with(bios_dict) @mock.patch.object(ris.RISOperations, '_get_host_details') def test___change_secure_boot_settings_not_supported(self, get_details_mock): host_response = json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP) del host_response['Oem']['Hp']['links']['SecureBoot'] get_details_mock.return_value = host_response self.assertRaises(exception.IloCommandNotSupportedError, self.client._change_secure_boot_settings, 'fake-property', 'fake-value') get_details_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_rest_patch') @mock.patch.object(ris.RISOperations, '_get_host_details') def test___change_secure_boot_settings_fail(self, get_details_mock, patch_mock): host_details = json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP) get_details_mock.return_value = host_details secure_boot_uri = '/rest/v1/Systems/1/SecureBoot' patch_mock.return_value = (301, ris_outputs.GET_HEADERS, ris_outputs.REST_FAILURE_OUTPUT) self.assertRaises(exception.IloError, self.client._change_secure_boot_settings, 'fake-property', 'fake-value') get_details_mock.assert_called_once_with() patch_mock.assert_called_once_with(secure_boot_uri, None, {'fake-property': 'fake-value'}) @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test__get_bios_setting(self, bios_mock): bios_mock.return_value = ('fake', 'fake', json.loads(ris_outputs.GET_BIOS_SETTINGS)) result = self.client._get_bios_setting('BootMode') bios_mock.assert_called_once_with(['BootMode']) self.assertEqual(result, 'Uefi') @mock.patch.object(ris.RISOperations, '_rest_get') def test__get_bios_settings_resource(self, get_mock): settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) get_mock.return_value = (200, ris_outputs.GET_HEADERS, settings) self.client._get_bios_settings_resource(settings) get_mock.assert_called_once_with('/rest/v1/systems/1/bios/Settings') @mock.patch.object(ris.RISOperations, '_rest_get') def test__get_bios_settings_resource_key_error(self, get_mock): settings = json.loads(ris_outputs.GET_BASE_CONFIG) self.assertRaises(exception.IloError, self.client._get_bios_settings_resource, settings) @mock.patch.object(ris.RISOperations, '_rest_get') def test__get_bios_settings_resource_fail(self, get_mock): settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) settings_uri = '/rest/v1/systems/1/bios/Settings' get_mock.return_value = (301, ris_outputs.GET_HEADERS, settings) self.assertRaises(exception.IloError, self.client._get_bios_settings_resource, settings) get_mock.assert_called_once_with(settings_uri) @mock.patch.object(ris.RISOperations, '_rest_get') def test__get_bios_boot_resource(self, get_mock): settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) boot_settings = json.loads(ris_outputs.GET_BIOS_BOOT) get_mock.return_value = (200, ris_outputs.GET_HEADERS, boot_settings) self.client._get_bios_boot_resource(settings) get_mock.assert_called_once_with('/rest/v1/systems/1/bios/Boot') def test__get_bios_boot_resource_key_error(self): settings = json.loads(ris_outputs.GET_BASE_CONFIG) self.assertRaises(exception.IloCommandNotSupportedError, self.client._get_bios_boot_resource, settings) @mock.patch.object(ris.RISOperations, '_rest_get') def test__get_bios_boot_resource_fail(self, get_mock): settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) boot_settings = json.loads(ris_outputs.GET_BIOS_BOOT) get_mock.return_value = (201, ris_outputs.GET_HEADERS, boot_settings) self.assertRaises(exception.IloError, self.client._get_bios_boot_resource, settings) get_mock.assert_called_once_with('/rest/v1/systems/1/bios/Boot') @mock.patch.object(ris.RISOperations, '_rest_get') def test__get_bios_mappings_resource(self, get_mock): settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) map_settings = json.loads(ris_outputs.GET_BIOS_MAPPINGS) get_mock.return_value = (200, ris_outputs.GET_HEADERS, map_settings) self.client._get_bios_mappings_resource(settings) get_mock.assert_called_once_with('/rest/v1/systems/1/bios/Mappings') def test__get_bios_mappings_resource_key_error(self): settings = json.loads(ris_outputs.GET_BASE_CONFIG) self.assertRaises(exception.IloCommandNotSupportedError, self.client._get_bios_mappings_resource, settings) @mock.patch.object(ris.RISOperations, '_rest_get') def test__get_bios_mappings_resource_fail(self, get_mock): settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) map_settings = json.loads(ris_outputs.GET_BIOS_MAPPINGS) get_mock.return_value = (201, ris_outputs.GET_HEADERS, map_settings) self.assertRaises(exception.IloError, self.client._get_bios_mappings_resource, settings) get_mock.assert_called_once_with('/rest/v1/systems/1/bios/Mappings') @mock.patch.object(ris.RISOperations, '_rest_get') def test__get_iscsi_settings_resource(self, get_mock): settings = json.loads(ris_outputs.GET_ISCSI_SETTINGS) get_mock.return_value = (200, ris_outputs.GET_HEADERS, settings) self.client._get_iscsi_settings_resource(settings) get_mock.assert_called_once_with( '/rest/v1/systems/1/bios/iScsi/Settings') def test__get_iscsi_settings_resource_key_error(self): settings = json.loads(ris_outputs.GET_ISCSI_PATCH) self.assertRaises(exception.IloCommandNotSupportedError, self.client._get_iscsi_settings_resource, settings) @mock.patch.object(ris.RISOperations, '_rest_get') def test__get_iscsi_settings_resource_fail(self, get_mock): settings = json.loads(ris_outputs.GET_ISCSI_SETTINGS) get_mock.return_value = (201, ris_outputs.GET_HEADERS, settings) self.assertRaises(exception.IloError, self.client._get_iscsi_settings_resource, settings) get_mock.assert_called_once_with( '/rest/v1/systems/1/bios/iScsi/Settings') @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_get_ilo_details') @mock.patch.object(ris.RISOperations, '_get_collection') def test__get_vm_device_status(self, collection_mock, ilo_details_mock, get_mock): manager_uri = '/rest/v1/Managers/1' manager_data = json.loads(ris_outputs.GET_MANAGER_DETAILS) ilo_details_mock.return_value = (manager_data, manager_uri) collection_item = json.loads(ris_outputs.RESP_VM_STATUS_FLOPPY_EMPTY) vmedia_uri = '/rest/v1/Managers/1/VirtualMedia' member_uri = '/rest/v1/Managers/1/VirtualMedia/1' collection_mock.return_value = [(200, None, collection_item, member_uri)] get_mock.return_value = (200, ris_outputs.GET_HEADERS, collection_item) self.client._get_vm_device_status('FLOPPY') ilo_details_mock.assert_called_once_with() collection_mock.assert_called_once_with(vmedia_uri) get_mock.assert_called_once_with(member_uri) def test__get_vm_device_status_invalid_device(self): self.assertRaises(exception.IloInvalidInputError, self.client._get_vm_device_status, device='FOO') @mock.patch.object(ris.RISOperations, '_get_ilo_details') def test__get_vm_device_status_vmedia_not_supported(self, ilo_details_mock): manager_uri = '/rest/v1/Managers/1' manager_data = json.loads(ris_outputs.GET_MANAGER_DETAILS_NO_VMEDIA) ilo_details_mock.return_value = (manager_data, manager_uri) self.assertRaises(exception.IloCommandNotSupportedError, self.client._get_vm_device_status, device='FLOPPY') ilo_details_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_get_ilo_details') @mock.patch.object(ris.RISOperations, '_get_collection') def test__get_vm_device_status_fail(self, collection_mock, ilo_details_mock, get_mock): manager_uri = '/rest/v1/Managers/1' manager_data = json.loads(ris_outputs.GET_MANAGER_DETAILS) ilo_details_mock.return_value = (manager_data, manager_uri) collection_item = json.loads(ris_outputs.RESP_VM_STATUS_FLOPPY_EMPTY) vmedia_uri = '/rest/v1/Managers/1/VirtualMedia' member_uri = '/rest/v1/Managers/1/VirtualMedia/1' collection_mock.return_value = [(200, None, collection_item, member_uri)] get_mock.return_value = (301, ris_outputs.GET_HEADERS, ris_outputs.REST_FAILURE_OUTPUT) self.assertRaises(exception.IloError, self.client._get_vm_device_status, device='FLOPPY') ilo_details_mock.assert_called_once_with() collection_mock.assert_called_once_with(vmedia_uri) get_mock.assert_called_once_with(member_uri) @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_get_ilo_details') @mock.patch.object(ris.RISOperations, '_get_collection') def test__get_vm_device_status_device_missing(self, collection_mock, ilo_details_mock, get_mock): manager_uri = '/rest/v1/Managers/1' manager_data = json.loads(ris_outputs.GET_MANAGER_DETAILS) ilo_details_mock.return_value = (manager_data, manager_uri) collection_item = json.loads(ris_outputs.RESP_VM_STATUS_CDROM_MISSING) vmedia_uri = '/rest/v1/Managers/1/VirtualMedia' member_uri = '/rest/v1/Managers/1/VirtualMedia/2' collection_mock.return_value = [(200, None, collection_item, member_uri)] get_mock.return_value = (200, ris_outputs.GET_HEADERS, collection_item) self.assertRaises(exception.IloError, self.client._get_vm_device_status, device='CDROM') ilo_details_mock.assert_called_once_with() collection_mock.assert_called_once_with(vmedia_uri) get_mock.assert_called_once_with(member_uri) @mock.patch.object(ris.RISOperations, '_rest_patch') def test__update_persistent_boot_once(self, rest_patch_mock): systems_uri = "/rest/v1/Systems/1" new_boot_settings = {} new_boot_settings['Boot'] = {'BootSourceOverrideEnabled': 'Once', 'BootSourceOverrideTarget': 'Cd'} rest_patch_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client._update_persistent_boot(['cdrom'], persistent=False) rest_patch_mock.assert_called_once_with(systems_uri, None, new_boot_settings) @mock.patch.object(ris.RISOperations, '_rest_patch') def test__update_persistent_boot_for_continuous(self, rest_patch_mock): systems_uri = "/rest/v1/Systems/1" new_boot_settings = {} new_boot_settings['Boot'] = {'BootSourceOverrideEnabled': 'Continuous', 'BootSourceOverrideTarget': 'Cd'} rest_patch_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client._update_persistent_boot(['cdrom'], persistent=True) rest_patch_mock.assert_called_once_with(systems_uri, None, new_boot_settings) @mock.patch.object(ris.RISOperations, '_rest_patch') def test__update_persistent_boot_for_UefiShell(self, rest_patch_mock): systems_uri = "/rest/v1/Systems/1" new_boot_settings = {} new_boot_settings['Boot'] = { 'BootSourceOverrideEnabled': 'Continuous', 'BootSourceOverrideTarget': 'UefiShell' } rest_patch_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client._update_persistent_boot(['UefiShell'], persistent=True) rest_patch_mock.assert_called_once_with(systems_uri, None, new_boot_settings) @mock.patch.object(ris.RISOperations, '_get_host_details') @mock.patch.object(ris.RISOperations, '_rest_patch') def test__update_persistent_boot_for_iscsi(self, rest_patch_mock, get_host_mock): get_host_mock.return_value = ( json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP_WITH_ISCSI)) systems_uri = '/rest/v1/Systems/1' new1_boot_settings = {} new1_boot_settings['Boot'] = { 'UefiTargetBootSourceOverride': u'NIC.LOM.1.1.iSCSI' } new2_boot_settings = {} new2_boot_settings['Boot'] = { 'BootSourceOverrideEnabled': 'Continuous', 'BootSourceOverrideTarget': 'UefiTarget' } rest_patch_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) calls = [mock.call(systems_uri, None, new1_boot_settings), mock.call(systems_uri, None, new2_boot_settings)] self.client._update_persistent_boot(['ISCSI'], persistent=True) rest_patch_mock.assert_has_calls(calls) @mock.patch.object(ris.RISOperations, '_get_host_details') @mock.patch.object(ris.RISOperations, '_rest_patch') def test__update_persistent_boot_for_iscsi_with_none_device_present( self, rest_patch_mock, get_host_mock): get_host_mock.return_value = ( json.loads( ris_outputs.RESPONSE_BODY_FOR_REST_OP_WITH_ISCSI_AND_NONE)) systems_uri = '/rest/v1/Systems/1' new1_boot_settings = {} new1_boot_settings['Boot'] = { 'UefiTargetBootSourceOverride': u'NIC.LOM.1.1.iSCSI' } new2_boot_settings = {} new2_boot_settings['Boot'] = { 'BootSourceOverrideEnabled': 'Continuous', 'BootSourceOverrideTarget': 'UefiTarget' } rest_patch_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) calls = [mock.call(systems_uri, None, new1_boot_settings), mock.call(systems_uri, None, new2_boot_settings)] self.client._update_persistent_boot(['ISCSI'], persistent=True) rest_patch_mock.assert_has_calls(calls) @mock.patch.object(ris.RISOperations, '_get_host_details') def test__update_persistent_boot_for_iscsi_not_found(self, get_host_mock): get_host_mock.return_value = ( json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP)) self.assertRaisesRegex(exception.IloError, "No UEFI iSCSI bootable " "device found", self.client._update_persistent_boot, ['ISCSI'], persistent=True) @mock.patch.object(ris.RISOperations, '_rest_patch') def test__update_persistent_boot_fail(self, rest_patch_mock): systems_uri = "/rest/v1/Systems/1" new_boot_settings = {} new_boot_settings['Boot'] = {'BootSourceOverrideEnabled': 'Continuous', 'BootSourceOverrideTarget': 'FakeDevice'} rest_patch_mock.return_value = (301, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.assertRaises(exception.IloError, self.client._update_persistent_boot, ['FakeDevice'], persistent=True) rest_patch_mock.assert_called_once_with(systems_uri, None, new_boot_settings) @mock.patch.object(ris.RISOperations, '_get_bios_boot_resource') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test__get_persistent_boot_devices_no_boot_order(self, check_bios_mock, boot_mock): bios_uri = '/rest/v1/systems/1/bios' bios_settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, bios_settings) boot_settings = json.loads(ris_outputs.BOOT_PERS_DEV_ORDER_MISSING) boot_mock.return_value = boot_settings self.assertRaises(exception.IloError, self.client._get_persistent_boot_devices) check_bios_mock.assert_called_once_with() boot_mock.assert_called_once_with(bios_settings) @mock.patch.object(ris.RISOperations, '_get_bios_boot_resource') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test__get_persistent_boot_devices(self, check_bios_mock, boot_mock): bios_uri = '/rest/v1/systems/1/bios' bios_settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, bios_settings) boot_settings = json.loads(ris_outputs.GET_BIOS_BOOT) boot_mock.return_value = boot_settings exp_boot_src = json.loads(ris_outputs.UEFI_BootSources) exp_boot_order = ris_outputs.UEFI_PERS_BOOT_DEVICES boot_src, boot_order = self.client._get_persistent_boot_devices() check_bios_mock.assert_called_once_with() boot_mock.assert_called_once_with(bios_settings) self.assertEqual(boot_src, exp_boot_src) self.assertEqual(boot_order, exp_boot_order) @mock.patch.object(ris.RISOperations, '_get_bios_boot_resource') @mock.patch.object(ris.RISOperations, '_check_bios_resource') def test__get_persistent_boot_devices_no_bootsources(self, check_bios_mock, boot_mock): bios_uri = '/rest/v1/systems/1/bios' bios_settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) check_bios_mock.return_value = (ris_outputs.GET_HEADERS, bios_uri, bios_settings) boot_settings = json.loads(ris_outputs.UEFI_BOOTSOURCES_MISSING) boot_mock.return_value = boot_settings self.assertRaises(exception.IloError, self.client._get_persistent_boot_devices) check_bios_mock.assert_called_once_with() boot_mock.assert_called_once_with(bios_settings) @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_get_host_details') def test__get_pci_devices(self, get_host_details_mock, get_mock): system_data = json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP) get_host_details_mock.return_value = system_data pci_uri = '/rest/v1/Systems/1/PCIDevices' pci_device_list = json.loads(ris_outputs.PCI_DEVICE_DETAILS) get_mock.return_value = (200, ris_outputs.GET_HEADERS, pci_device_list) self.client._get_pci_devices() get_mock.assert_called_once_with(pci_uri) @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_get_host_details') def test__get_pci_devices_fail(self, get_host_details_mock, get_mock): system_data = json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP) get_host_details_mock.return_value = system_data pci_uri = '/rest/v1/Systems/1/PCIDevices' pci_device_list = json.loads(ris_outputs.PCI_DEVICE_DETAILS) get_mock.return_value = (301, ris_outputs.GET_HEADERS, pci_device_list) self.assertRaises(exception.IloError, self.client._get_pci_devices) get_mock.assert_called_once_with(pci_uri) @mock.patch.object(ris.RISOperations, '_get_host_details') def test__get_pci_devices_not_supported(self, get_details_mock): host_response = json.loads(ris_outputs.RESPONSE_BODY_FOR_REST_OP) del host_response['Oem']['Hp']['links']['PCIDevices'] get_details_mock.return_value = host_response self.assertRaises(exception.IloCommandNotSupportedError, self.client._get_pci_devices) get_details_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_get_host_details') def test__get_storage_resource(self, get_host_details_mock, get_mock): system_data = json.loads(ris_outputs.REST_GET_SMART_STORAGE) get_host_details_mock.return_value = system_data storage_uri = '/rest/v1/Systems/1/SmartStorage' storage_settings = json.loads(ris_outputs.STORAGE_SETTINGS) get_mock.return_value = (200, ris_outputs.GET_HEADERS, storage_settings) self.client._get_storage_resource() get_mock.assert_called_once_with(storage_uri) @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_get_host_details') def test__get_storage_resource_fail(self, get_host_details_mock, get_mock): system_data = json.loads(ris_outputs.REST_GET_SMART_STORAGE) get_host_details_mock.return_value = system_data storage_uri = '/rest/v1/Systems/1/SmartStorage' storage_settings = json.loads(ris_outputs.STORAGE_SETTINGS) get_mock.return_value = (301, ris_outputs.GET_HEADERS, storage_settings) self.assertRaises(exception.IloError, self.client._get_storage_resource) get_mock.assert_called_once_with(storage_uri) @mock.patch.object(ris.RISOperations, '_get_host_details') def test__get_storage_resource_not_supported(self, get_host_details_mock): system_data = json.loads(ris_outputs.REST_GET_SMART_STORAGE) del system_data['Oem']['Hp']['links']['SmartStorage'] get_host_details_mock.return_value = system_data self.assertRaises(exception.IloCommandNotSupportedError, self.client._get_storage_resource) get_host_details_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_get_storage_resource') def test__get_array_controller_resource(self, storage_mock, get_mock): storage_data = json.loads(ris_outputs.STORAGE_SETTINGS) storage_uri = '/rest/v1/Systems/1/SmartStorage' storage_mock.return_value = (ris_outputs.GET_HEADERS, storage_uri, storage_data) array_uri = '/rest/v1/Systems/1/SmartStorage/ArrayControllers' array_settings = json.loads(ris_outputs.ARRAY_SETTINGS) get_mock.return_value = (200, ris_outputs.GET_HEADERS, array_settings) self.client._get_array_controller_resource() get_mock.assert_called_once_with(array_uri) @mock.patch.object(ris.RISOperations, '_rest_get') @mock.patch.object(ris.RISOperations, '_get_storage_resource') def test__get_array_controller_resource_fail(self, storage_mock, get_mock): storage_data = json.loads(ris_outputs.STORAGE_SETTINGS) storage_uri = '/rest/v1/Systems/1/SmartStorage' storage_mock.return_value = (ris_outputs.GET_HEADERS, storage_uri, storage_data) array_uri = '/rest/v1/Systems/1/SmartStorage/ArrayControllers' array_settings = json.loads(ris_outputs.ARRAY_SETTINGS) get_mock.return_value = (301, ris_outputs.GET_HEADERS, array_settings) self.assertRaises(exception.IloError, self.client._get_array_controller_resource) get_mock.assert_called_once_with(array_uri) @mock.patch.object(ris.RISOperations, '_get_array_controller_resource') def test__create_list_of_array_controllers(self, array_mock): array_data = json.loads(ris_outputs.ARRAY_SETTINGS) array_uri = '/rest/v1/Systems/1/SmartStorage/ArrayControllers' array_mock.return_value = (ris_outputs.GET_HEADERS, array_uri, array_data) expected_uri_links = ( [{u'href': u'/rest/v1/Systems/1/SmartStorage/ArrayControllers/0'}]) uri_links = self.client._create_list_of_array_controllers() self.assertEqual(expected_uri_links, uri_links) array_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_get_physical_drive_resource') def test__get_drive_type_and_speed(self, disk_details_mock): disk_details_mock.return_value = ( json.loads(ris_outputs.DISK_DETAILS_LIST)) expected_out = {'has_rotational': 'true', 'rotational_drive_10000_rpm': 'true'} out = self.client._get_drive_type_and_speed() self.assertEqual(expected_out, out) disk_details_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_create_list_of_array_controllers') @mock.patch.object(ris.RISOperations, '_rest_get') def test__get_drive_resource_physical(self, get_mock, array_mock): array_mock.return_value = ( [{u'href': u'/rest/v1/Systems/1/SmartStorage/ArrayControllers/0'}]) get_mock.side_effect = [(ris_outputs.GET_HEADERS, 'xyz', json.loads(ris_outputs.ARRAY_MEM_SETTINGS)), (ris_outputs.GET_HEADERS, 'xyz', json.loads(ris_outputs.DISK_COLLECTION)), (ris_outputs.GET_HEADERS, 'xyz', json.loads(ris_outputs.DISK_DETAILS_LIST))] out = self.client._get_physical_drive_resource() expected_out = [] expected_out.append(json.loads(ris_outputs.DISK_DETAILS_LIST)) self.assertEqual(expected_out, out) array_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_create_list_of_array_controllers') @mock.patch.object(ris.RISOperations, '_rest_get') def test__get_drive_resource_logical(self, get_mock, array_mock): array_mock.return_value = ( [{u'href': u'/rest/v1/Systems/1/SmartStorage/ArrayControllers/0'}]) get_mock.side_effect = [(ris_outputs.GET_HEADERS, 'xyz', json.loads(ris_outputs.ARRAY_MEM_SETTINGS)), (ris_outputs.GET_HEADERS, 'xyz', json.loads(ris_outputs.LOGICAL_COLLECTION)), (ris_outputs.GET_HEADERS, 'xyz', json.loads(ris_outputs.LOGICAL_DETAILS))] out = self.client._get_logical_drive_resource() expected_out = [] expected_out.append(json.loads(ris_outputs.LOGICAL_DETAILS)) self.assertEqual(expected_out, out) array_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_create_list_of_array_controllers') @mock.patch.object(ris.RISOperations, '_rest_get') def test__get_drive_resource_no_physical_disk(self, get_mock, array_mock): array_mock.return_value = ( [{u'href': u'/rest/v1/Systems/1/SmartStorage/ArrayControllers/0'}]) disk_col_no_disk = json.loads(ris_outputs.DISK_COLLECTION_NO_DISK) get_mock.side_effect = [(ris_outputs.GET_HEADERS, 'xyz', json.loads(ris_outputs.ARRAY_MEM_SETTINGS)), (ris_outputs.GET_HEADERS, 'xyz', disk_col_no_disk)] out = self.client._get_physical_drive_resource() self.assertIsNone(out) array_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_create_list_of_array_controllers') @mock.patch.object(ris.RISOperations, '_rest_get') def test__get_drive_resource_no_logical_drive(self, get_mock, array_mock): array_mock.return_value = ( [{u'href': u'/rest/v1/Systems/1/SmartStorage/ArrayControllers/0'}]) log_col_no_drive = json.loads(ris_outputs.LOGICAL_COLLECTION_NO_DRIVE) get_mock.side_effect = [(ris_outputs.GET_HEADERS, 'xyz', json.loads(ris_outputs.ARRAY_MEM_SETTINGS)), (ris_outputs.GET_HEADERS, 'xyz', log_col_no_drive)] out = self.client._get_physical_drive_resource() self.assertIsNone(out) array_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_get_pci_devices') def test__get_gpu_pci_devices(self, pci_mock): pci_mock.return_value = json.loads(ris_outputs.PCI_DEVICE_DETAILS) pci_gpu_list = self.client._get_gpu_pci_devices() self.assertEqual(pci_gpu_list, json.loads(ris_outputs.PCI_GPU_LIST)) self.assertTrue(pci_mock.called) @mock.patch.object(ris.RISOperations, '_get_pci_devices') def test__get_gpu_pci_devices_returns_empty(self, pci_mock): pci_response = json.loads(ris_outputs.PCI_DEVICE_DETAILS_NO_GPU) pci_mock.return_value = pci_response pci_gpu_list = self.client._get_gpu_pci_devices() self.assertEqual(len(pci_gpu_list), 0) self.assertTrue(pci_mock.called) @mock.patch.object(ris.RISOperations, '_get_pci_devices') def test__get_gpu_pci_devices_fail_not_supported_error(self, pci_mock): msg = ('links/PCIDevices section in ComputerSystem/Oem/Hp' ' does not exist') pci_mock.side_effect = exception.IloCommandNotSupportedError(msg) self.assertRaises(exception.IloCommandNotSupportedError, self.client._get_gpu_pci_devices) self.assertTrue(pci_mock.called) @mock.patch.object(ris.RISOperations, '_get_gpu_pci_devices') def test__get_number_of_gpu_devices_connected(self, gpu_list_mock): gpu_list_mock.return_value = json.loads(ris_outputs.PCI_GPU_LIST) expected_gpu_count = {'pci_gpu_devices': 1} gpu_count_returned = self.client._get_number_of_gpu_devices_connected() self.assertEqual(gpu_count_returned, expected_gpu_count) self.assertTrue(gpu_list_mock.called) @mock.patch.object(ris.RISOperations, '_get_bios_setting') def test___get_cpu_virtualization_enabled(self, bios_mock): bios_settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) bios_mock.return_value = bios_settings['ProcVirtualization'] expected_cpu_vt = True cpu_vt_return = self.client._get_cpu_virtualization() self.assertEqual(cpu_vt_return, expected_cpu_vt) self.assertTrue(bios_mock.called) @mock.patch.object(ris.RISOperations, '_get_bios_setting') def test___get_cpu_virtualization_disabled(self, bios_mock): bios_mock.return_value = 'Disable' expected_cpu_vt = False cpu_vt_return = self.client._get_cpu_virtualization() self.assertEqual(cpu_vt_return, expected_cpu_vt) self.assertTrue(bios_mock.called) @mock.patch.object(ris.RISOperations, '_get_bios_setting') def test___get_cpu_virtualization_not_supported_error(self, bios_mock): msg = ("BIOS Property 'ProcVirtualization' is not supported on this" " system") bios_mock.side_effect = exception.IloCommandNotSupportedError(msg) expected_cpu_vt = False cpu_vt_return = self.client._get_cpu_virtualization() self.assertEqual(cpu_vt_return, expected_cpu_vt) self.assertTrue(bios_mock.called) @mock.patch.object(ris.RISOperations, '_get_ilo_details', autospec=True) def test__get_firmware_update_service_resource_traverses_manager_as( self, _get_ilo_details_mock): # | GIVEN | manager_mock = mock.MagicMock(spec=dict, autospec=True) _get_ilo_details_mock.return_value = (manager_mock, 'some_uri') # | WHEN | self.client._get_firmware_update_service_resource() # | THEN | manager_mock.__getitem__.assert_called_once_with('Oem') manager_mock.__getitem__().__getitem__.assert_called_once_with('Hp') (manager_mock.__getitem__().__getitem__().__getitem__. assert_called_once_with('links')) (manager_mock.__getitem__().__getitem__().__getitem__(). __getitem__.assert_called_once_with('UpdateService')) (manager_mock.__getitem__().__getitem__().__getitem__(). __getitem__().__getitem__.assert_called_once_with('href')) @mock.patch.object(ris.RISOperations, '_get_ilo_details', autospec=True) def test__get_firmware_update_service_resource_throws_if_not_found( self, _get_ilo_details_mock): # | GIVEN | manager_mock = mock.MagicMock(spec=dict) _get_ilo_details_mock.return_value = (manager_mock, 'some_uri') manager_mock.__getitem__.side_effect = KeyError('not found') # | WHEN | & | THEN | self.assertRaises(exception.IloCommandNotSupportedError, self.client._get_firmware_update_service_resource) @mock.patch.object(ris.RISOperations, '_rest_post') def test_press_pwr_btn(self, rest_post_mock): systems_uri = "/rest/v1/Systems/1" new_pow_settings = {"Action": "PowerButton", "Target": "/Oem/Hp", "PushType": "Press"} rest_post_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client._press_pwr_btn() rest_post_mock.assert_called_once_with(systems_uri, None, new_pow_settings) @mock.patch.object(ris.RISOperations, '_rest_post') def test_press_pwr_btn_patch_fail(self, rest_post_mock): systems_uri = "/rest/v1/Systems/1" new_pow_settings = {"Action": "PowerButton", "Target": "/Oem/Hp", "PushType": "Press"} rest_post_mock.return_value = (301, ris_outputs.GET_HEADERS, ris_outputs.REST_FAILURE_OUTPUT) self.assertRaises(exception.IloError, self.client._press_pwr_btn, 'Press') rest_post_mock.assert_called_once_with(systems_uri, None, new_pow_settings) @mock.patch.object(ris.RISOperations, '_rest_post') def test_perform_power_op(self, rest_post_mock): systems_uri = "/rest/v1/Systems/1" new_pow_settings = {"Action": "Reset", "ResetType": "ForceRestart"} rest_post_mock.return_value = (200, ris_outputs.GET_HEADERS, ris_outputs.REST_POST_RESPONSE) self.client.reset_server() rest_post_mock.assert_called_once_with(systems_uri, None, new_pow_settings) @mock.patch.object(ris.RISOperations, '_rest_post') def test_perform_power_op_fail(self, rest_post_mock): systems_uri = "/rest/v1/Systems/1" new_pow_settings = {"Action": "Reset", "ResetType": "ForceRestart"} rest_post_mock.return_value = (301, ris_outputs.GET_HEADERS, ris_outputs.REST_FAILURE_OUTPUT) self.assertRaises(exception.IloError, self.client.reset_server) rest_post_mock.assert_called_once_with(systems_uri, None, new_pow_settings) @mock.patch.object(ris.RISOperations, '_get_bios_setting') def test__get_tpm_capability_notpresent(self, bios_mock): bios_mock.return_value = 'NotPresent' expected_out = False status = self.client._get_tpm_capability() self.assertEqual(expected_out, status) @mock.patch.object(ris.RISOperations, '_get_bios_setting') def test__get_tpm_capability_presentdisabled(self, bios_mock): bios_mock.return_value = 'PresentDisabled' expected_out = True status = self.client._get_tpm_capability() self.assertEqual(expected_out, status) @mock.patch.object(ris.RISOperations, '_get_bios_setting') def test__get_tpm_capability_presentenabled(self, bios_mock): bios_mock.return_value = 'PresentEnabled' expected_out = True status = self.client._get_tpm_capability() self.assertEqual(expected_out, status) @mock.patch.object(ris.RISOperations, '_get_bios_setting') def test__get_tpm_capability_resource_notpresent(self, bios_mock): msg = 'BIOS Property TpmState is not supported on this system.' bios_mock.side_effect = exception.IloCommandNotSupportedError(msg) expected_out = False status = self.client._get_tpm_capability() self.assertEqual(expected_out, status) @mock.patch.object(ris.RISOperations, '_get_bios_setting') def test___get_nvdimm_n_status_enabled(self, bios_mock): bios_settings = json.loads(ris_outputs.GET_BIOS_SETTINGS) bios_mock.return_value = bios_settings['NvDimmNMemFunctionality'] expected_nvdimm_n_status = True nvdimm_n_status_return = self.client._get_nvdimm_n_status() self.assertEqual(nvdimm_n_status_return, expected_nvdimm_n_status) self.assertTrue(bios_mock.called) @mock.patch.object(ris.RISOperations, '_get_bios_setting') def test___get_nvdimm_n_status_disabled(self, bios_mock): bios_mock.return_value = 'Disabled' expected_nvdimm_n_status = False nvdimm_n_status_return = self.client._get_nvdimm_n_status() self.assertEqual(nvdimm_n_status_return, expected_nvdimm_n_status) self.assertTrue(bios_mock.called) @mock.patch.object(ris.RISOperations, '_get_bios_setting') def test___get_nvdimm_n_status_not_supported_error(self, bios_mock): msg = ("BIOS Property 'NvDimmNMemFunctionality' is not supported on" " this system") bios_mock.side_effect = exception.IloCommandNotSupportedError(msg) expected_nvdimm_n_status = False nvdimm_n_status_return = self.client._get_nvdimm_n_status() self.assertEqual(nvdimm_n_status_return, expected_nvdimm_n_status) self.assertTrue(bios_mock.called) @mock.patch.object(ris.RISOperations, '_get_array_controller_resource') def test__is_raid_supported(self, get_array_mock): array_settings = json.loads(ris_outputs.ARRAY_SETTINGS) get_array_mock.return_value = (200, ris_outputs.GET_HEADERS, array_settings) expt_ret = True ret = self.client._is_raid_supported() self.assertEqual(ret, expt_ret) get_array_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, '_get_array_controller_resource') def test__is_raid_supported_false(self, get_array_mock): array_settings = json.loads(ris_outputs.ARRAY_SETTING_NO_CONTROLLER) get_array_mock.return_value = (200, ris_outputs.GET_HEADERS, array_settings) expt_ret = False ret = self.client._is_raid_supported() self.assertEqual(ret, expt_ret) get_array_mock.assert_called_once_with() @mock.patch.object(ris.RISOperations, 'get_product_name') def test_read_raid_configuration(self, product_name_mock): ld1 = {"size_gb": 150, "raid_level": '0', "is_root_volume": True} raid_config = {"logical_disks": [ld1]} product_name_mock.return_value = 'ProLiant BL460c Gen9' self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'ProLiant BL460c Gen9', self.client.read_raid_configuration, raid_config) @mock.patch.object(ris.RISOperations, 'get_product_name') def test_delete_raid_configuration(self, product_name_mock): product_name_mock.return_value = 'ProLiant BL460c Gen9' self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'ProLiant BL460c Gen9', self.client.delete_raid_configuration) @mock.patch.object(ris.RISOperations, 'get_product_name') def test_create_raid_configuration(self, product_name_mock): ld1 = {"size_gb": 150, "raid_level": '0', "is_root_volume": True} raid_config = {"logical_disks": [ld1]} product_name_mock.return_value = 'ProLiant BL460c Gen9' self.assertRaisesRegex(exception.IloCommandNotSupportedError, 'ProLiant BL460c Gen9', self.client.create_raid_configuration, raid_config) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2506647 proliantutils-2.16.0/proliantutils/tests/ipa_hw_manager/0000775000175000017500000000000000000000000023550 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ipa_hw_manager/__init__.py0000664000175000017500000000234700000000000025667 0ustar00zuulzuul00000000000000# Copyright 2015 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 sys from unittest import mock from oslo_utils import importutils import six ironic_python_agent = importutils.try_import('ironic_python_agent') if not ironic_python_agent: ipa_mock = mock.MagicMock() sys.modules['ironic_python_agent'] = ipa_mock sys.modules['ironic_python_agent.errors'] = ipa_mock.errors sys.modules['ironic_python_agent.hardware'] = ipa_mock.hardware ipa_mock.hardware.GenericHardwareManager = mock.MagicMock mock.MagicMock.erase_devices = mock.MagicMock(name='erase_devices') if 'proliantutils.ipa_hw_manager' in sys.modules: six.moves.reload_module('proliantutils.ipa_hw_manager') ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/ipa_hw_manager/test_hardware_manager.py0000664000175000017500000001755300000000000030463 0ustar00zuulzuul00000000000000# Copyright 2015 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from unittest import mock from oslo_utils import importutils import testtools from proliantutils import exception from proliantutils.hpssa import manager as hpssa_manager from proliantutils.ipa_hw_manager import hardware_manager from proliantutils.sum import sum_controller ironic_python_agent = importutils.try_import('ironic_python_agent') class ProliantHardwareManagerTestCase(testtools.TestCase): def setUp(self): self.hardware_manager = hardware_manager.ProliantHardwareManager() self.info = {'ilo_address': '1.2.3.4', 'ilo_password': '12345678', 'ilo_username': 'admin'} clean_step = { 'interface': 'management', 'step': 'update_firmware_sum', 'args': {'url': 'http://1.2.3.4/SPP.iso', 'checksum': '1234567890'}} self.node = {'driver_info': self.info, 'clean_step': clean_step} super(ProliantHardwareManagerTestCase, self).setUp() def test_get_clean_steps(self): self.assertEqual( [{'step': 'create_configuration', 'interface': 'raid', 'priority': 0, 'reboot_requested': False}, {'step': 'delete_configuration', 'interface': 'raid', 'priority': 0, 'reboot_requested': False}, {'step': 'erase_devices', 'interface': 'deploy', 'priority': 0, 'reboot_requested': False}, {'step': 'update_firmware_sum', 'interface': 'management', 'priority': 0, 'reboot_requested': False}], self.hardware_manager.get_clean_steps("", "")) def test_get_deploy_steps(self): self.assertEqual( [{'step': 'apply_configuration', 'interface': 'raid', 'reboot_requested': False, 'priority': 0, 'argsinfo': ( hardware_manager._RAID_APPLY_CONFIGURATION_ARGSINFO)}, {'step': 'flash_firmware_sum', 'interface': 'management', 'reboot_requested': False, 'priority': 0, 'argsinfo': ( hardware_manager._FIRMWARE_UPDATE_SUM_ARGSINFO)}], self.hardware_manager.get_deploy_steps("", [])) @mock.patch.object(hpssa_manager, 'create_configuration') def test_create_configuration(self, create_mock): create_mock.return_value = 'current-config' manager = self.hardware_manager node = {'target_raid_config': {'foo': 'bar'}} ret = manager.create_configuration(node, []) create_mock.assert_called_once_with(raid_config={'foo': 'bar'}) self.assertEqual('current-config', ret) @mock.patch.object(hpssa_manager, 'create_configuration') def test_create_configuration_no_target_config(self, create_mock): create_mock.return_value = 'current-config' manager = self.hardware_manager node = {'target_raid_config': {}} manager.create_configuration(node, []) create_mock.assert_not_called() @mock.patch.object(hardware_manager.ProliantHardwareManager, 'delete_configuration') @mock.patch.object(hpssa_manager, 'create_configuration') def test_apply_configuration_with_delete(self, create_mock, delete_mock): create_mock.return_value = 'current-config' manager = self.hardware_manager raid_config = {'foo': 'bar'} ret = manager.apply_configuration("", [], raid_config, delete_existing=True) delete_mock.assert_called_once_with("", []) create_mock.assert_called_once_with(raid_config={'foo': 'bar'}) self.assertEqual('current-config', ret) @mock.patch.object(hardware_manager.ProliantHardwareManager, 'delete_configuration') @mock.patch.object(hpssa_manager, 'create_configuration') def test_apply_configuration_no_delete(self, create_mock, delete_mock): create_mock.return_value = 'current-config' manager = self.hardware_manager raid_config = {'foo': 'bar'} ret = manager.apply_configuration("", [], raid_config, delete_existing=False) create_mock.assert_called_once_with(raid_config={'foo': 'bar'}) delete_mock.assert_not_called() self.assertEqual('current-config', ret) @mock.patch.object(hpssa_manager, 'delete_configuration') def test_delete_configuration(self, delete_mock): delete_mock.return_value = 'current-config' ret = self.hardware_manager.delete_configuration("", "") delete_mock.assert_called_once_with() self.assertEqual('current-config', ret) @mock.patch.object(ironic_python_agent.hardware.GenericHardwareManager, 'erase_devices') @mock.patch.object(hpssa_manager, 'erase_devices') def test_erase_devices(self, erase_mock, generic_erase_mock): node = {} port = {} erase_mock.return_value = 'erase_status' generic_erase_mock.return_value = {'foo': 'bar'} ret = self.hardware_manager.erase_devices(node, port) erase_mock.assert_called_once_with() generic_erase_mock.assert_called_once_with(node, port) self.assertEqual({'Disk Erase Status': 'erase_status', 'foo': 'bar'}, ret) @mock.patch.object(ironic_python_agent.hardware.GenericHardwareManager, 'erase_devices') @mock.patch.object(hpssa_manager, 'erase_devices') def test_erase_devices_not_supported(self, erase_mock, generic_erase_mock): node = {} port = {} value = ("Sanitize erase not supported in the " "available controllers") e = exception.HPSSAOperationError(reason=value) erase_mock.side_effect = e exc = self.assertRaises(exception.HPSSAOperationError, self.hardware_manager.erase_devices, node, port) self.assertIn(value, str(exc)) @mock.patch.object(sum_controller, 'update_firmware') def test_update_firmware_sum(self, update_mock): update_mock.return_value = "log files" url = self.node['clean_step']['args'].get('url') csum = self.node['clean_step']['args'].get('checksum') comp = self.node['clean_step']['args'].get('components') ret = self.hardware_manager.update_firmware_sum(self.node, "") update_mock.assert_called_once_with(self.node, url, csum, components=comp) self.assertEqual('log files', ret) @mock.patch.object(sum_controller, 'update_firmware') def test_flash_firmware_sum(self, update_mock): update_mock.return_value = "log files" url = self.node['clean_step']['args'].get('url') csum = self.node['clean_step']['args'].get('checksum') comp = self.node['clean_step']['args'].get('components') ret = self.hardware_manager.flash_firmware_sum(self.node, "", url, csum, components=comp) update_mock.assert_called_once_with(self.node, url, csum, components=comp) self.assertEqual('log files', ret) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2546647 proliantutils-2.16.0/proliantutils/tests/redfish/0000775000175000017500000000000000000000000022233 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/__init__.py0000664000175000017500000000000000000000000024332 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2626648 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/0000775000175000017500000000000000000000000024730 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/account.json0000664000175000017500000000165000000000000027261 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#AccountService/Accounts/Members/$entity", "@odata.etag": "W/\"BA0D308D\"", "@odata.id": "/redfish/v1/AccountService/Accounts/1/", "@odata.type": "#ManagerAccount.v1_0_0.ManagerAccount", "Description": "iLO User Account", "Id": "1", "Name": "User Account", "Oem": { "Hpe": { "@odata.type": "#HpeiLOAccount.v2_0_0.HpeiLOAccount", "LoginName": "foo", "Privileges": { "HostBIOSConfigPriv": true, "HostNICConfigPriv": true, "HostStorageConfigPriv": true, "LoginPriv": true, "RemoteConsolePriv": true, "SystemRecoveryConfigPriv": true, "UserConfigPriv": true, "VirtualMediaPriv": true, "VirtualPowerAndResetPriv": true, "iLOConfigPriv": true } } }, "UserName": "foo" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/account_collection.json0000664000175000017500000000063000000000000031471 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#Accounts", "@odata.etag": "W/\"72D11D4D\"", "@odata.id": "/redfish/v1/AccountService/Accounts/", "@odata.type": "#ManagerAccountCollection.ManagerAccountCollection", "Description": "iLO User Accounts", "Members": [ { "@odata.id": "/redfish/v1/AccountService/Accounts/1/" } ], "Members@odata.count": 1, "Name": "Accounts" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/account_service.json0000664000175000017500000000130300000000000030774 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#AccountService", "@odata.etag": "W/\"677A002B\"", "@odata.id": "/redfish/v1/AccountService/", "@odata.type": "#AccountService.v1_0_2.AccountService", "Accounts": { "@odata.id": "/redfish/v1/AccountService/Accounts/" }, "Description": "iLO User Accounts", "Id": "AccountService", "Name": "Account Service", "Oem": { "Hpe": { "@odata.type": "#HpeiLOAccountService.v2_0_0.HpeiLOAccountService", "AuthFailureDelayTimeSeconds": 10, "AuthFailureLoggingThreshold": 3, "AuthFailuresBeforeDelay": 1, "MinPasswordLength": 8 } } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/array_controller.json0000664000175000017500000000347100000000000031211 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/SmartStorage/ArrayControllers/Members/$entity", "@odata.etag": "W/\"8DF69E2A\"", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/", "@odata.type": "#HpeSmartStorageArrayController.v2_0_0.HpeSmartStorageArrayController", "AdapterType": "SmartArray", "BackupPowerSourceStatus": "NotPresent", "ControllerPartNumber": "836260-001", "CurrentOperatingMode": "Mixed", "Description": "HPE Smart Storage Array Controller View", "EncryptionCryptoOfficerPasswordSet": false, "EncryptionEnabled": false, "EncryptionFwLocked": false, "EncryptionHasLockedVolumesMissingBootPassword": false, "EncryptionMixedVolumesEnabled": false, "EncryptionStandaloneModeEnabled": false, "ExternalPortCount": 0, "FirmwareVersion": { "Current": { "VersionString": "0.01-808" } }, "HardwareRevision": "B", "Id": "0", "InternalPortCount": 2, "Links": { "LogicalDrives": { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/LogicalDrives/" }, "PhysicalDrives": { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/DiskDrives/" }, "StorageEnclosures": { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/StorageEnclosures/" }, "UnconfiguredDrives": { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/UnconfiguredDrives/" } }, "Location": "Slot 0", "LocationFormat": "PCISlot", "Model": "HPE Smart Array P408i-a SR Gen10", "Name": "HpeSmartStorageArrayController", "SerialNumber": "PEYHC0XRH400QI ", "Status": { "Health": "Warning", "State": "Enabled" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/array_controller_collection.json0000664000175000017500000000110300000000000033412 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/SmartStorage/ArrayControllers", "@odata.etag": "W/\"E5B74C7A\"", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/", "@odata.type": "#HpeSmartStorageArrayControllerCollection.HpeSmartStorageArrayControllerCollection", "Description": "HPE Smart Storage Array Controllers View", "Members": [ { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/" } ], "Members@odata.count": 1, "Name": "HpeSmartStorageArrayControllers" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/bios.json0000664000175000017500000004303000000000000026557 0ustar00zuulzuul00000000000000{ "Default": { "@Redfish.Settings": { "@odata.type": "#Settings.v1_0_0.Settings", "ETag": "C4690603", "Messages": [ { "MessageId": "Base.1.0.Success" } ], "SettingsObject": { "@odata.id": "/redfish/v1/systems/1/bios/settings/" }, "Time": "2017-06-10T07:40:44+00:00" }, "@odata.context": "/redfish/v1/$metadata#Bios.Bios", "@odata.etag": "W/\"EC55BACC2FF03737379F24EEF1948CE0\"", "@odata.id": "/redfish/v1/systems/1/bios/", "@odata.type": "#Bios.v1_0_0.Bios", "Actions": { "#Bios.ChangePassword": { "target": "/redfish/v1/systems/1/bios/settings/Actions/Bios.ChangePasswords/" }, "#Bios.ResetBios": { "target": "/redfish/v1/systems/1/bios/settings/Actions/Bios.ResetBios/" } }, "AttributeRegistry": "BiosAttributeRegistryU31.v1_1_00", "Attributes": { "AcpiHpet": "Enabled", "AcpiRootBridgePxm": "Enabled", "AcpiSlit": "Enabled", "AdjSecPrefetch": "Enabled", "AdminEmail": "", "AdminName": "", "AdminPassword": "password", "AdminOtherInfo": "", "AdminPhone": "", "AdvancedMemProtection": "AdvancedEcc", "AsrStatus": "Enabled", "AsrTimeoutMinutes": "Timeout10", "AssetTagProtection": "Unlocked", "AutoPowerOn": "RestoreLastState", "BootMode": "Uefi", "BootOrderPolicy": "RetryIndefinitely", "ChannelInterleaving": "Enabled", "Chipset_TpmFeatureEnableOrDisable": "Disabled", "Chipset_TpmFeatureType": "Chipset-TpmFeature:NONE", "CollabPowerControl": "Enabled", "ConsistentDevNaming": "LomsAndSlots", "CustomPostMessage": "", "DaylightSavingsTime": "Disabled", "DcuIpPrefetcher": "Enabled", "DcuStreamPrefetcher": "Enabled", "Description": "Default settings", "Dhcpv4": "Enabled", "DynamicPowerCapping": "Disabled", "EmbNicAspm": "Disabled", "EmbNicEnable": "Auto", "EmbNicLinkSpeed": "Auto", "EmbNicPCIeOptionROM": "Enabled", "EmbSas1Aspm": "Disabled", "EmbSas1LinkSpeed": "Auto", "EmbSas1PcieOptionROM": "Enabled", "EmbSata1Enable": "Auto", "EmbSata1PCIeOptionROM": "Enabled", "EmbSata2Enable": "Auto", "EmbSata2PCIeOptionROM": "Enabled", "EmbVideoConnection": "Auto", "EmbeddedDiagnostics": "Enabled", "EmbeddedDiagsMode": "Auto", "EmbeddedSata": "Ahci", "EmbeddedSerialPort": "Com2Irq3", "EmbeddedUefiShell": "Enabled", "EmsConsole": "Disabled", "EnabledCoresPerProc": 0, "EnergyEfficientTurbo": "Enabled", "EnergyPerfBias": "BalancedPerf", "EraseUserDefaults": "No", "ExtendedAmbientTemp": "Disabled", "ExtendedMemTest": "Disabled", "F11BootMenu": "Enabled", "FCScanPolicy": "CardConfig", "FanFailPolicy": "Shutdown", "FanInstallReq": "EnableMessaging", "FlexLom1Aspm": "Disabled", "FlexLom1LinkSpeed": "Auto", "FlexLom1PCIeOptionROM": "Enabled", "HpeScalablePmemBackupState": "Complete", "HpeScalablePmemConfigurationRestoration": "Disabled", "HpeScalablePmemFunctionalityEnabled": "Disabled", "HpeScalablePmemStorageInitialize": "Disabled", "HttpSupport": "Auto", "HwPrefetcher": "Enabled", "IntelDmiLinkFreq": "Auto", "IntelNicDmaChannels": "Enabled", "IntelPerfMonitoring": "Disabled", "IntelProcVtd": "Enabled", "IntelUpiFreq": "Auto", "IntelUpiLinkEn": "Auto", "IntelUpiPowerManagement": "Enabled", "IntelligentProvisioning": "Enabled", "InternalSDCardSlot": "Enabled", "Ipv4Address": "0.0.0.0", "Ipv4Gateway": "0.0.0.0", "Ipv4PrimaryDNS": "0.0.0.0", "Ipv4SecondaryDNS": "0.0.0.0", "Ipv4SubnetMask": "0.0.0.0", "Ipv6Address": "::", "Ipv6ConfigPolicy": "Automatic", "Ipv6Duid": "Auto", "Ipv6Gateway": "::", "Ipv6PrimaryDNS": "::", "Ipv6SecondaryDNS": "::", "LocalRemoteThreshold": "Auto", "MaxMemBusFreqMHz": "Auto", "MaxPcieSpeed": "PerPortCtrl", "MemClearWarmReset": "Disabled", "MemFastTraining": "Enabled", "MemMirrorMode": "Full", "MemPatrolScrubbing": "Enabled", "MemRefreshRate": "Refreshx2", "MemoryRemap": "NoAction", "MinProcIdlePkgState": "C6Retention", "MinProcIdlePower": "C6", "MixedPowerSupplyReporting": "Enabled", "NetworkBootRetry": "Enabled", "NetworkBootRetryCount": 20, "NicBoot1": "NetworkBoot", "NicBoot3": "Disabled", "NicBoot4": "Disabled", "NodeInterleaving": "Disabled", "NumaGroupSizeOpt": "Clustered", "NvDimmNMemInterleaving": "Disabled", "NvmeOptionRom": "Enabled", "PciResourcePadding": "Normal", "PciSlot1Aspm": "Disabled", "PciSlot1LinkSpeed": "Auto", "PciSlot1OptionROM": "Enabled", "PciSlot2Aspm": "Disabled", "PciSlot2LinkSpeed": "Auto", "PciSlot2OptionROM": "Enabled", "PciSlot3Aspm": "Disabled", "PciSlot3LinkSpeed": "Auto", "PciSlot3OptionROM": "Enabled", "PciSlot4Aspm": "Disabled", "PciSlot4LinkSpeed": "Auto", "PciSlot4OptionROM": "Enabled", "PciSlot5Aspm": "Disabled", "PciSlot5LinkSpeed": "Auto", "PciSlot5OptionROM": "Enabled", "PciSlot6Aspm": "Disabled", "PciSlot6LinkSpeed": "Auto", "PciSlot6OptionROM": "Enabled", "PersistentMemAddressRangeScrub": "Enabled", "PersistentMemBackupPowerPolicy": "WaitForBackupPower", "PersistentMemScanMem": "Enabled", "PostBootProgress": "Disabled", "PostDiscoveryMode": "ForceFullDiscovery", "PostF1Prompt": "Delayed20Sec", "PowerButton": "Enabled", "PowerOnDelay": "NoDelay", "PowerOnLogo": "Enabled", "PowerRegulator": "DynamicPowerSavings", "PreBootNetwork": "Auto", "PrebootNetworkEnvPolicy": "Auto", "PrebootNetworkProxy": "", "ProcAes": "Enabled", "ProcHyperthreading": "Enabled", "ProcTurbo": "Enabled", "ProcVirtualization": "Enabled", "ProcX2Apic": "Enabled", "Processor1LogicalNvdimm1SizeGiB": 0, "Processor1LogicalNvdimm2SizeGiB": 0, "Processor1ScalablePmemAvailableGiB": 0, "Processor2LogicalNvdimm1SizeGiB": 0, "Processor2LogicalNvdimm2SizeGiB": 0, "Processor2ScalablePmemAvailableGiB": 0, "Processor3LogicalNvdimm1SizeGiB": 0, "Processor3LogicalNvdimm2SizeGiB": 0, "Processor3ScalablePmemAvailableGiB": 0, "Processor4LogicalNvdimm1SizeGiB": 0, "Processor4LogicalNvdimm2SizeGiB": 0, "Processor4ScalablePmemAvailableGiB": 0, "ProcessorJitterControl": "Disabled", "ProcessorJitterControlFrequency": 0, "ProductId": "", "RedundantPowerSupply": "BalancedMode", "RemovableFlashBootSeq": "ExternalKeysFirst", "RestoreDefaults": "No", "RestoreManufacturingDefaults": "No", "RomSelection": "CurrentRom", "SataSecureErase": "Disabled", "SaveUserDefaults": "No", "ScalablePmemCapacity": 0, "SecureBootStatus": "Disabled", "SerialConsoleBaudRate": "BaudRate115200", "SerialConsoleEmulation": "Vt100Plus", "SerialConsolePort": "Auto", "SerialNumber": "", "ServerAssetTag": "", "ServerName": "", "ServerOtherInfo": "", "ServerPrimaryOs": "", "ServiceEmail": "", "ServiceName": "", "ServiceOtherInfo": "", "ServicePhone": "", "SetupBrowserSelection": "Auto", "SpannedLogicalNvdimm1AvailableMemoryGiB": 0, "SpannedLogicalNvdimm1SizeGiB": 0, "SpannedLogicalNvdimm1StartingDomainId": 0, "SpannedLogicalNvdimm1StartingDomainSize": 0, "SpannedLogicalNvdimm2AvailableMemoryGiB": 0, "SpannedLogicalNvdimm2SizeGiB": 0, "SpannedLogicalNvdimm2StartingDomainId": 0, "SpannedLogicalNvdimm2StartingDomainSize": 0, "Sriov": "Enabled", "SubNumaClustering": "Disabled", "ThermalConfig": "OptimalCooling", "ThermalShutdown": "Enabled", "TimeFormat": "Utc", "TimeZone": "Utc0", "TpmChipId": "None", "TpmFips": "NotSpecified", "TpmState": "NotPresent", "TpmType": "NoTpm", "UefiOptimizedBoot": "Enabled", "UefiPxeBoot": "Enabled", "UefiSerialDebugLevel": "Disabled", "UefiShellBootOrder": "Disabled", "UefiShellScriptVerification": "Disabled", "UefiShellStartup": "Disabled", "UefiShellStartupLocation": "Auto", "UefiShellStartupUrl": "", "UefiShellStartupUrlFromDhcp": "Disabled", "UncoreFreqScaling": "Auto", "UpiPrefetcher": "Enabled", "UrlBootFile": "http://w.x.y.z/ironic.iso", "UrlBootFile2": "", "UrlBootFile3": "", "UrlBootFile4": "", "UsbBoot": "Enabled", "UsbControl": "UsbEnabled", "UserDefaultsState": "Disabled", "UtilityLang": "English", "VirtualInstallDisk": "Disabled", "VirtualSerialPort": "Com1Irq4", "VlanControl": "Disabled", "VlanId": 0, "VlanPriority": 0, "WakeOnLan": "Enabled", "WorkloadProfile": "GeneralPowerEfficientCompute", "XptPrefetcher": "Enabled", "iSCSIPolicy": "SoftwareInitiator" }, "Id": "bios", "Name": "BIOS Current Settings", "Oem": { "Hpe": { "@odata.type": "#HpeBiosExt.v2_0_0.HpeBiosExt", "Links": { "BaseConfigs": { "@odata.id": "/redfish/v1/systems/1/bios/baseconfigs/" }, "Boot": { "@odata.id": "/redfish/v1/systems/1/bios/boot/" }, "Mappings": { "@odata.id": "/redfish/v1/systems/1/bios/mappings/" }, "ScalablePmem": { "@odata.id": "/redfish/v1/systems/1/bios/hpescalablepmem/" }, "TlsConfig": { "@odata.id": "/redfish/v1/systems/1/bios/tlsconfig/" }, "iScsi": { "@odata.id": "/redfish/v1/systems/1/bios/iscsi/" } }, "SettingsObject": { "UnmodifiedETag": "W/\"7F2D028BA2542B2B2B2AF4CFFD358F35\"" } } } }, "BIOS_pending_settings_default": { "@odata.context": "/redfish/v1/$metadata#Bios.Bios", "@odata.etag": "W/\"7F2D028BA2542B2B2B2AF4CFFD358F35\"", "@odata.id": "/redfish/v1/systems/1/bios/settings/", "@odata.type": "#Bios.v1_0_0.Bios", "AttributeRegistry": "BiosAttributeRegistryU31.v1_1_00", "Attributes": { "AcpiHpet": "Enabled", "AcpiRootBridgePxm": "Enabled", "AcpiSlit": "Enabled", "AdjSecPrefetch": "Enabled", "AdminEmail": "", "AdminName": "Redfish Administrator", "AdminPassword": "newpassword", "AdminOtherInfo": "", "AdminPhone": "", "AdvCrashDumpMode": "Disabled", "AdvancedMemProtection": "AdvancedEcc", "AsrStatus": "Enabled", "AsrTimeoutMinutes": "Timeout10", "AssetTagProtection": "Unlocked", "AutoPowerOn": "RestoreLastState", "BootMode": "Uefi", "BootOrderPolicy": "AttemptOnce", "ChannelInterleaving": "Enabled", "CollabPowerControl": "Enabled", "ConsistentDevNaming": "LomsAndSlots", "CustomPostMessage": "", "DaylightSavingsTime": "Disabled", "DcuIpPrefetcher": "Enabled", "DcuStreamPrefetcher": "Enabled", "Description": "Ilo Redifsh updated", "Dhcpv4": "Enabled", "DynamicPowerCapping": "Disabled", "EmbNicEnable": "Auto", "EmbNicLinkSpeed": "Auto", "EmbNicPCIeOptionROM": "Enabled", "EmbSas1Aspm": "Disabled", "EmbSas1Boot": "TwentyFourTargets", "EmbSas1Enable": "Auto", "EmbSas1LinkSpeed": "Auto", "EmbSas1PcieOptionROM": "Enabled", "EmbSata1Aspm": "Disabled", "EmbSata1PCIeOptionROM": "Enabled", "EmbSata2Aspm": "Disabled", "EmbSata2PCIeOptionROM": "Enabled", "EmbVideoConnection": "Auto", "EmbeddedDiagnostics": "Enabled", "EmbeddedSata": "Ahci", "EmbeddedSerialPort": "Com2Irq3", "EmbeddedUefiShell": "Enabled", "EmsConsole": "Disabled", "EnabledCoresPerProc": 0, "EnergyEfficientTurbo": "Enabled", "EnergyPerfBias": "BalancedPerf", "EraseUserDefaults": "No", "ExtendedAmbientTemp": "Disabled", "ExtendedMemTest": "Disabled", "F11BootMenu": "Enabled", "FCScanPolicy": "CardConfig", "FanFailPolicy": "Shutdown", "FanInstallReq": "EnableMessaging", "FlexLom1Aspm": "Disabled", "FlexLom1LinkSpeed": "Auto", "FlexLom1PCIeOptionROM": "Enabled", "HttpSupport": "Auto", "HwPrefetcher": "Enabled", "IntelDmiLinkFreq": "Auto", "IntelNicDmaChannels": "Enabled", "IntelPerfMonitoring": "Disabled", "IntelProcVtd": "Enabled", "IntelligentProvisioning": "Enabled", "InternalSDCardSlot": "Enabled", "Ipv4Address": "0.0.0.0", "Ipv4Gateway": "0.0.0.0", "Ipv4PrimaryDNS": "0.0.0.0", "Ipv4SecondaryDNS": "0.0.0.0", "Ipv4SubnetMask": "0.0.0.0", "Ipv6Address": "::", "Ipv6ConfigPolicy": "Automatic", "Ipv6Duid": "Auto", "Ipv6Gateway": "::", "Ipv6PrimaryDNS": "::", "Ipv6SecondaryDNS": "::", "LLCDeadLineAllocation": "Enabled", "LlcPrefetch": "Disabled", "LocalRemoteThreshold": "Auto", "MaxMemBusFreqMHz": "Auto", "MaxPcieSpeed": "PerPortCtrl", "MemClearWarmReset": "Disabled", "MemFastTraining": "Enabled", "MemMirrorMode": "Full", "MemPatrolScrubbing": "Enabled", "MemRefreshRate": "Refreshx1", "MemoryControllerInterleaving": "Auto", "MemoryRemap": "NoAction", "MinProcIdlePkgState": "C6Retention", "MinProcIdlePower": "C6", "MixedPowerSupplyReporting": "Enabled", "NVMeDriveBox3Bay1": "Nvme", "NetworkBootRetry": "Enabled", "NetworkBootRetryCount": 20, "NicBoot1": "NetworkBoot", "NicBoot2": "Disabled", "NicBoot3": "Disabled", "NicBoot4": "Disabled", "NodeInterleaving": "Disabled", "NumaGroupSizeOpt": "Flat", "NvmeOptionRom": "Enabled", "OpportunisticSelfRefresh": "Disabled", "PciResourcePadding": "Normal", "PciSlot1Aspm": "Disabled", "PciSlot1LinkSpeed": "Auto", "PciSlot1OptionROM": "Enabled", "PciSlot2Aspm": "Disabled", "PciSlot2LinkSpeed": "Auto", "PciSlot2OptionROM": "Enabled", "PciSlot3Aspm": "Disabled", "PciSlot3LinkSpeed": "Auto", "PciSlot3OptionROM": "Enabled", "PciSlot4Aspm": "Disabled", "PciSlot4LinkSpeed": "Auto", "PciSlot4OptionROM": "Enabled", "PciSlot5Aspm": "Disabled", "PciSlot5LinkSpeed": "Auto", "PciSlot5OptionROM": "Enabled", "PciSlot6Aspm": "Disabled", "PciSlot6LinkSpeed": "Auto", "PciSlot6OptionROM": "Enabled", "PciSlot7Aspm": "Disabled", "PciSlot7LinkSpeed": "Auto", "PciSlot7OptionROM": "Enabled", "PciSlot8Aspm": "Disabled", "PciSlot8LinkSpeed": "Auto", "PciSlot8OptionROM": "Enabled", "PersistentMemAddressRangeScrub": "Enabled", "PersistentMemBackupPowerPolicy": "WaitForBackupPower", "PersistentMemScanMem": "Enabled", "PostBootProgress": "Disabled", "PostDiscoveryMode": "Auto", "PostF1Prompt": "Delayed20Sec", "PowerButton": "Enabled", "PowerOnDelay": "NoDelay", "PowerRegulator": "DynamicPowerSavings", "PreBootNetwork": "Auto", "PrebootNetworkEnvPolicy": "Auto", "PrebootNetworkProxy": "", "ProcAes": "Enabled", "ProcHyperthreading": "Enabled", "ProcTurbo": "Enabled", "ProcVirtualization": "Enabled", "ProcX2Apic": "Enabled", "ProcessorJitterControl": "Disabled", "ProcessorJitterControlFrequency": 0, "ProcessorJitterControlOptimization": "ZeroLatency", "ProductId": "868703-B21", "RedundantPowerSupply": "BalancedMode", "RemovableFlashBootSeq": "ExternalKeysFirst", "RestoreDefaults": "No", "RestoreManufacturingDefaults": "No", "RomSelection": "CurrentRom", "SataSecureErase": "Disabled", "SaveUserDefaults": "No", "SecStartBackupImage": "Disabled", "SecureBootStatus": "Disabled", "SerialConsoleBaudRate": "BaudRate115200", "SerialConsoleEmulation": "Vt100Plus", "SerialConsolePort": "Auto", "SerialNumber": "SGH744YPVS", "ServerAssetTag": "", "ServerName": "", "ServerOtherInfo": "", "ServerPrimaryOs": "", "ServiceEmail": "", "ServiceName": "", "ServiceOtherInfo": "", "ServicePhone": "", "SetupBrowserSelection": "Auto", "Sriov": "Enabled", "StaleAtoS": "Disabled", "SubNumaClustering": "Disabled", "ThermalConfig": "OptimalCooling", "ThermalShutdown": "Enabled", "TimeFormat": "Utc", "TimeZone": "Utc9", "TpmChipId": "None", "TpmFips": "NotSpecified", "TpmState": "NotPresent", "TpmType": "NoTpm", "UefiOptimizedBoot": "Disabled", "UefiPxeBoot": "Enabled", "UefiSerialDebugLevel": "Disabled", "UefiShellBootOrder": "Disabled", "UefiShellScriptVerification": "Disabled", "UefiShellStartup": "Disabled", "UefiShellStartupLocation": "Auto", "UefiShellStartupUrl": "", "UefiShellStartupUrlFromDhcp": "Disabled", "UncoreFreqScaling": "Auto", "UrlBootFile": "", "UrlBootFile2": "", "UrlBootFile3": "", "UrlBootFile4": "", "UsbBoot": "Enabled", "UsbControl": "UsbEnabled", "UserDefaultsState": "Disabled", "UtilityLang": "English", "VirtualInstallDisk": "Disabled", "VirtualSerialPort": "Com1Irq4", "VlanControl": "Disabled", "VlanId": 0, "VlanPriority": 0, "WakeOnLan": "Enabled", "WorkloadProfile": "GeneralPowerEfficientCompute", "XptPrefetcher": "Auto", "iSCSIPolicy": "SoftwareInitiator" }, "Id": "settings", "Name": "BIOS Current Settings" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/bios_base_configs.json0000664000175000017500000002153600000000000031270 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#HpeBaseConfigs.HpeBaseConfigs", "@odata.etag": "W/\"181015940C22575757F4180F335F8F57\"", "@odata.id": "/redfish/v1/systems/1/bios/baseconfigs/", "@odata.type": "#HpeBaseConfigs.v2_0_0.HpeBaseConfigs", "BaseConfigs": [ { "default": { "AcpiHpet": "Enabled", "AcpiRootBridgePxm": "Enabled", "AcpiSlit": "Enabled", "AdjSecPrefetch": "Enabled", "AdminEmail": "", "AdminName": "", "AdminOtherInfo": "", "AdminPhone": "", "AdvancedMemProtection": "AdvancedEcc", "AsrStatus": "Enabled", "AsrTimeoutMinutes": "Timeout10", "AssetTagProtection": "Unlocked", "AutoPowerOn": "RestoreLastState", "BootMode": "Uefi", "BootOrderPolicy": "RetryIndefinitely", "ChannelInterleaving": "Enabled", "Chipset_TpmFeatureEnableOrDisable": "Disabled", "Chipset_TpmFeatureType": "Chipset-TpmFeature:NONE", "CollabPowerControl": "Enabled", "ConsistentDevNaming": "LomsAndSlots", "CustomPostMessage": "", "DaylightSavingsTime": "Disabled", "DcuIpPrefetcher": "Enabled", "DcuStreamPrefetcher": "Enabled", "Dhcpv4": "Enabled", "DynamicPowerCapping": "Disabled", "EmbNicAspm": "Disabled", "EmbNicEnable": "Auto", "EmbNicLinkSpeed": "Auto", "EmbNicPCIeOptionROM": "Enabled", "EmbSas1Aspm": "Disabled", "EmbSas1LinkSpeed": "Auto", "EmbSas1PcieOptionROM": "Enabled", "EmbSata1Enable": "Auto", "EmbSata1PCIeOptionROM": "Enabled", "EmbSata2Enable": "Auto", "EmbSata2PCIeOptionROM": "Enabled", "EmbVideoConnection": "Auto", "EmbeddedDiagnostics": "Enabled", "EmbeddedDiagsMode": "Auto", "EmbeddedSata": "Ahci", "EmbeddedSerialPort": "Com2Irq3", "EmbeddedUefiShell": "Enabled", "EmsConsole": "Disabled", "EnabledCoresPerProc": 0, "EnergyEfficientTurbo": "Enabled", "EnergyPerfBias": "BalancedPerf", "EraseUserDefaults": "No", "ExtendedAmbientTemp": "Disabled", "ExtendedMemTest": "Disabled", "F11BootMenu": "Enabled", "FCScanPolicy": "CardConfig", "FanFailPolicy": "Shutdown", "FanInstallReq": "EnableMessaging", "FlexLom1Aspm": "Disabled", "FlexLom1LinkSpeed": "Auto", "FlexLom1PCIeOptionROM": "Enabled", "HpeScalablePmemBackupState": "Complete", "HpeScalablePmemConfigurationRestoration": "Disabled", "HpeScalablePmemFunctionalityEnabled": "Disabled", "HpeScalablePmemStorageInitialize": "Disabled", "HttpSupport": "Auto", "HwPrefetcher": "Enabled", "IntelDmiLinkFreq": "Auto", "IntelNicDmaChannels": "Enabled", "IntelPerfMonitoring": "Disabled", "IntelProcVtd": "Enabled", "IntelUpiFreq": "Auto", "IntelUpiLinkEn": "Auto", "IntelUpiPowerManagement": "Enabled", "IntelligentProvisioning": "Enabled", "InternalSDCardSlot": "Enabled", "Ipv4Address": "0.0.0.0", "Ipv4Gateway": "0.0.0.0", "Ipv4PrimaryDNS": "0.0.0.0", "Ipv4SecondaryDNS": "0.0.0.0", "Ipv4SubnetMask": "0.0.0.0", "Ipv6Address": "::", "Ipv6ConfigPolicy": "Automatic", "Ipv6Duid": "Auto", "Ipv6Gateway": "::", "Ipv6PrimaryDNS": "::", "Ipv6SecondaryDNS": "::", "LocalRemoteThreshold": "Auto", "MaxMemBusFreqMHz": "Auto", "MaxPcieSpeed": "PerPortCtrl", "MemClearWarmReset": "Disabled", "MemFastTraining": "Enabled", "MemMirrorMode": "Full", "MemPatrolScrubbing": "Enabled", "MemRefreshRate": "Refreshx2", "MemoryRemap": "NoAction", "MinProcIdlePkgState": "C6Retention", "MinProcIdlePower": "C6", "MixedPowerSupplyReporting": "Enabled", "NetworkBootRetry": "Enabled", "NetworkBootRetryCount": 20, "NicBoot1": "NetworkBoot", "NicBoot3": "Disabled", "NicBoot4": "Disabled", "NodeInterleaving": "Disabled", "NumaGroupSizeOpt": "Flat", "NvDimmNMemInterleaving": "Disabled", "NvmeOptionRom": "Enabled", "PciResourcePadding": "Normal", "PciSlot1Aspm": "Disabled", "PciSlot1LinkSpeed": "Auto", "PciSlot1OptionROM": "Enabled", "PciSlot2Aspm": "Disabled", "PciSlot2LinkSpeed": "Auto", "PciSlot2OptionROM": "Enabled", "PciSlot3Aspm": "Disabled", "PciSlot3LinkSpeed": "Auto", "PciSlot3OptionROM": "Enabled", "PciSlot4Aspm": "Disabled", "PciSlot4LinkSpeed": "Auto", "PciSlot4OptionROM": "Enabled", "PciSlot5Aspm": "Disabled", "PciSlot5LinkSpeed": "Auto", "PciSlot5OptionROM": "Enabled", "PciSlot6Aspm": "Disabled", "PciSlot6LinkSpeed": "Auto", "PciSlot6OptionROM": "Enabled", "PersistentMemAddressRangeScrub": "Enabled", "PersistentMemBackupPowerPolicy": "WaitForBackupPower", "PersistentMemScanMem": "Enabled", "PostBootProgress": "Disabled", "PostDiscoveryMode": "ForceFullDiscovery", "PostF1Prompt": "Delayed20Sec", "PowerButton": "Enabled", "PowerOnDelay": "NoDelay", "PowerOnLogo": "Enabled", "PowerRegulator": "DynamicPowerSavings", "PreBootNetwork": "Auto", "PrebootNetworkEnvPolicy": "Auto", "PrebootNetworkProxy": "", "ProcAes": "Enabled", "ProcHyperthreading": "Enabled", "ProcTurbo": "Enabled", "ProcVirtualization": "Enabled", "ProcX2Apic": "Enabled", "Processor1LogicalNvdimm1SizeGiB": 0, "Processor1LogicalNvdimm2SizeGiB": 0, "Processor1ScalablePmemAvailableGiB": 0, "Processor2LogicalNvdimm1SizeGiB": 0, "Processor2LogicalNvdimm2SizeGiB": 0, "Processor2ScalablePmemAvailableGiB": 0, "Processor3LogicalNvdimm1SizeGiB": 0, "Processor3LogicalNvdimm2SizeGiB": 0, "Processor3ScalablePmemAvailableGiB": 0, "Processor4LogicalNvdimm1SizeGiB": 0, "Processor4LogicalNvdimm2SizeGiB": 0, "Processor4ScalablePmemAvailableGiB": 0, "ProcessorJitterControl": "Disabled", "ProcessorJitterControlFrequency": 0, "RedundantPowerSupply": "BalancedMode", "RemovableFlashBootSeq": "ExternalKeysFirst", "RestoreDefaults": "No", "RestoreManufacturingDefaults": "No", "SataSecureErase": "Disabled", "SaveUserDefaults": "No", "ScalablePmemCapacity": 0, "SecureBootStatus": "Disabled", "SerialConsoleBaudRate": "BaudRate115200", "SerialConsoleEmulation": "Vt100Plus", "SerialConsolePort": "Auto", "ServerAssetTag": "", "ServerName": "", "ServerOtherInfo": "", "ServerPrimaryOs": "", "ServiceEmail": "", "ServiceName": "", "ServiceOtherInfo": "", "ServicePhone": "", "SetupBrowserSelection": "Auto", "SpannedLogicalNvdimm1AvailableMemoryGiB": 0, "SpannedLogicalNvdimm1SizeGiB": 0, "SpannedLogicalNvdimm1StartingDomainId": 0, "SpannedLogicalNvdimm1StartingDomainSize": 0, "SpannedLogicalNvdimm2AvailableMemoryGiB": 0, "SpannedLogicalNvdimm2SizeGiB": 0, "SpannedLogicalNvdimm2StartingDomainId": 0, "SpannedLogicalNvdimm2StartingDomainSize": 0, "Sriov": "Enabled", "SubNumaClustering": "Disabled", "ThermalConfig": "OptimalCooling", "ThermalShutdown": "Enabled", "TimeFormat": "Utc", "TimeZone": "Utc0", "TpmChipId": "None", "TpmFips": "NotSpecified", "TpmState": "NotPresent", "TpmType": "NoTpm", "UefiOptimizedBoot": "Enabled", "UefiSerialDebugLevel": "Disabled", "UefiShellBootOrder": "Disabled", "UefiShellScriptVerification": "Disabled", "UefiShellStartup": "Disabled", "UefiShellStartupLocation": "Auto", "UefiShellStartupUrl": "", "UefiShellStartupUrlFromDhcp": "Disabled", "UncoreFreqScaling": "Auto", "UpiPrefetcher": "Enabled", "UrlBootFile": "", "UrlBootFile2": "", "UrlBootFile3": "", "UrlBootFile4": "", "UsbBoot": "Enabled", "UsbControl": "UsbEnabled", "UserDefaultsState": "Disabled", "UtilityLang": "English", "VirtualInstallDisk": "Disabled", "VirtualSerialPort": "Com1Irq4", "VlanControl": "Disabled", "VlanId": 0, "VlanPriority": 0, "WakeOnLan": "Enabled", "WorkloadProfile": "GeneralPowerEfficientCompute", "XptPrefetcher": "Enabled", "iSCSIPolicy": "SoftwareInitiator" } } ], "Capabilities": { "BaseConfig": true, "BaseConfigs": false }, "Id": "baseconfigs", "Name": "BIOS Default Settings" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/bios_boot.json0000664000175000017500000002502100000000000027602 0ustar00zuulzuul00000000000000{ "Default": { "@Redfish.Settings": { "@odata.type": "#Settings.v1_0_0.Settings", "ETag": "", "Messages": [ { "MessageId": "Base.1.0.Success" } ], "SettingsObject": { "@odata.id": "/redfish/v1/systems/1/bios/boot/settings/" }, "Time": "" }, "@odata.context": "/redfish/v1/$metadata#HpeServerBootSettings.HpeServerBootSettings", "@odata.etag": "W/\"86E6D5239B54171717C211D20C60F195\"", "@odata.id": "/redfish/v1/systems/1/bios/boot/", "@odata.type": "#HpeServerBootSettings.v2_0_0.HpeServerBootSettings", "BootSources": [ { "BootOptionNumber": "0014", "BootString": "Embedded Storage : HPE Smart Array S100i SR Gen10 - LogVol (Lun:1 VolId:1) 931.48 GiB, RAID 0", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x7)", "StructuredBootString": "HD.EmbSWRAID.3.1", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x7)/Scsi(0x0,0x1)" }, { "BootOptionNumber": "0013", "BootString": "Embedded Storage : HPE Smart Array S100i SR Gen10 - LogVol (Lun:0 VolId:0) 1117.78 GiB, RAID 0", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x7)", "StructuredBootString": "HD.EmbSWRAID.1.2", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x7)/Scsi(0x0,0x0)" }, { "BootOptionNumber": "0009", "BootString": "Generic USB Boot", "CorrelatableID": "UsbClass(0xFFFF,0xFFFF,0xFF,0xFF,0xFF)", "StructuredBootString": "Generic.USB.1.1", "UEFIDevicePath": "UsbClass(0xFFFF,0xFFFF,0xFF,0xFF,0xFF)" }, { "BootOptionNumber": "000D", "BootString": "Embedded LOM 1 Port 1 : HPE Ethernet 1Gb 4-port 331i Adapter - NIC (PXE IPv4)", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x0)/Pci(0x0,0x0)", "StructuredBootString": "NIC.LOM.1.1.IPv4", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x0)/Pci(0x0,0x0)/MAC(30E17155B124,0x0)/IPv4(0.0.0.0)" }, { "BootOptionNumber": "000E", "BootString": "Embedded LOM 1 Port 1 : HPE Ethernet 1Gb 4-port 331i Adapter - NIC (PXE IPv6)", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x0)/Pci(0x0,0x0)", "StructuredBootString": "NIC.LOM.1.1.IPv6", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x0)/Pci(0x0,0x0)/MAC(30E17155B124,0x0)/IPv6(0000:0000:0000:0000:0000:0000:0000:0000)" }, { "BootOptionNumber": "000B", "BootString": "Embedded LOM 1 Port 1 : HPE Ethernet 1Gb 4-port 331i Adapter - NIC (HTTP(S) IPv4)", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x0)/Pci(0x0,0x0)", "StructuredBootString": "NIC.LOM.1.1.Httpv4", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x0)/Pci(0x0,0x0)/MAC(30E17155B124,0x0)/IPv4(0.0.0.0)/Uri()" }, { "BootOptionNumber": "000C", "BootString": "Embedded LOM 1 Port 1 : HPE Ethernet 1Gb 4-port 331i Adapter - NIC (HTTP(S) IPv6)", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x0)/Pci(0x0,0x0)", "StructuredBootString": "NIC.LOM.1.1.Httpv6", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x0)/Pci(0x0,0x0)/MAC(30E17155B124,0x0)/IPv6(0000:0000:0000:0000:0000:0000:0000:0000)/Uri()" }, { "BootOptionNumber": "000A", "BootString": "Internal SD Card 1 : Generic USB3.0-CRW", "CorrelatableID": "PciRoot(0x0)/Pci(0x14,0x0)/USB(0x13,0x0)", "StructuredBootString": "HD.SD.1.2", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x14,0x0)/USB(0x13,0x0)" }, { "BootOptionNumber": "0001", "BootString": "Embedded UEFI Shell", "CorrelatableID": "Fv(CDBB7B35-6833-4ED6-9AB2-57D2ACDDF6F0)/FvFile(C57AD6B7-0515-40A8-9D21-551652854E37)", "StructuredBootString": "Shell.Emb.1.2", "UEFIDevicePath": "Fv(CDBB7B35-6833-4ED6-9AB2-57D2ACDDF6F0)/FvFile(C57AD6B7-0515-40A8-9D21-551652854E37)" }, { "BootOptionNumber": "0011", "BootString": "iLO Virtual USB 3 : HPE Virtual CD-ROM", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x4)/USB(0x1,0x0)", "StructuredBootString": "CD.Virtual.3.1", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x4)/USB(0x1,0x0)" }, { "BootOptionNumber": "0010", "BootString": "Red Hat Enterprise Linux", "CorrelatableID": "HD(1,GPT,6FB3037E-EB9E-4FEC-BE72-8DA4A2D225D9,0x800,0x64000)/\\EFI\\redhat\\shim.efi", "StructuredBootString": "Unknown.Unknown.200.1", "UEFIDevicePath": "HD(1,GPT,6FB3037E-EB9E-4FEC-BE72-8DA4A2D225D9,0x800,0x64000)/\\EFI\\redhat\\shim.efi" }, { "BootOptionNumber": "0012", "BootString": "iLO Virtual USB 4 : HPE Virtual USB Key", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x4)/USB(0x2,0x0)", "StructuredBootString": "FD.Virtual.4.1", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x4)/USB(0x2,0x0)" }, { "BootString": "Embedded LOM 1 Port 1 : HP Ethernet 1Gb 2-port 361i Adapter - NIC (iSCSI IPv4) ", "CorrelatableID": "PciRoot(0x0)/Pci(0x2,0x3)/Pci(0x0,0x0)", "StructuredBootString": "NIC.LOM.1.1.iSCSI", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x2,0x3)/Pci(0x0,0x0)/MAC (C4346BB7EF30,0x1)/IPv4(0.0.0.0)/iSCSI(iqn.2016.org.de:,0x1,0x0,None,None,None,TCP)" } ], "DefaultBootOrder": [ "Floppy", "Cd", "Usb", "EmbeddedStorage", "PcieSlotStorage", "EmbeddedFlexLOM", "PcieSlotNic", "UefiShell" ], "DesiredBootDevices": [ { "CorrelatableID": "", "Lun": "", "Wwn": "", "iScsiTargetName": "" }, { "CorrelatableID": "", "Lun": "", "Wwn": "", "iScsiTargetName": "" }, { "CorrelatableID": "", "Lun": "", "Wwn": "", "iScsiTargetName": "" }, { "CorrelatableID": "", "Lun": "", "Wwn": "", "iScsiTargetName": "" }, { "CorrelatableID": "", "Lun": "", "Wwn": "", "iScsiTargetName": "" } ], "Id": "boot", "Name": "Boot Order Current Settings", "Oem": { "Hpe": { "@odata.type": "#HpeBiosExt.v2_0_0.HpeBiosExt", "Links": { "BaseConfigs": { "@odata.id": "/redfish/v1/systems/1/bios/boot/baseconfigs/" } }, "SettingsObject": { "UnmodifiedETag": "W/\"CF56F5DDD086DDDDDD700DE91FAC4D22\"" } } }, "PersistentBootConfigOrder": [ "HD.EmbSWRAID.3.1", "HD.EmbSWRAID.1.2", "Generic.USB.1.1", "NIC.LOM.1.1.IPv4", "NIC.LOM.1.1.IPv6", "NIC.LOM.1.1.Httpv4", "NIC.LOM.1.1.Httpv6", "HD.SD.1.2", "Shell.Emb.1.2", "CD.Virtual.3.1", "Unknown.Unknown.200.1", "FD.Virtual.4.1" ] }, "BIOS_boot_without_boot": { "@Redfish.Settings": { "@odata.type": "#Settings.v1_0_0.Settings", "ETag": "", "Messages": [ { "MessageId": "Base.1.0.Success" } ], "SettingsObject": { "@odata.id": "/redfish/v1/systems/1/bios/boot/settings/" }, "Time": "" }, "@odata.context": "/redfish/v1/$metadata#HpeServerBootSettings.HpeServerBootSettings", "@odata.etag": "W/\"86E6D5239B54171717C211D20C60F195\"", "@odata.id": "/redfish/v1/systems/1/bios/boot/", "@odata.type": "#HpeServerBootSettings.v2_0_0.HpeServerBootSettings", "BootSources": [ { "BootOptionNumber": "0014", "BootString": "Embedded Storage : HPE Smart Array S100i SR Gen10 - LogVol (Lun:1 VolId:1) 931.48 GiB, RAID 0", "CorrelatableID": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x7)", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x7)/Scsi(0x0,0x1)" } ], "PersistentBootConfigOrder": [ "HD.EmbSWRAID.3.1" ], "Id": "boot", "Name": "Boot Order Current Settings" }, "BIOS_boot_without_boot_sources": { "@Redfish.Settings": { "@odata.type": "#Settings.v1_0_0.Settings", "ETag": "", "Messages": [ { "MessageId": "Base.1.0.Success" } ], "SettingsObject": { "@odata.id": "/redfish/v1/systems/1/bios/boot/settings/" }, "Time": "" }, "@odata.context": "/redfish/v1/$metadata#HpeServerBootSettings.HpeServerBootSettings", "@odata.etag": "W/\"86E6D5239B54171717C211D20C60F195\"", "@odata.id": "/redfish/v1/systems/1/bios/boot/", "@odata.type": "#HpeServerBootSettings.v2_0_0.HpeServerBootSettings", "BootSources": [], "PersistentBootConfigOrder": [], "Id": "boot", "Name": "Boot Order Current Settings" }, "BIOS_persistent_boot_device_none": { "@Redfish.Settings": { "@odata.type": "#Settings.v1_0_0.Settings", "ETag": "", "Messages": [ { "MessageId": "Base.1.0.Success" } ], "SettingsObject": { "@odata.id": "/redfish/v1/systems/1/bios/boot/settings/" }, "Time": "" }, "@odata.context": "/redfish/v1/$metadata#HpeServerBootSettings.HpeServerBootSettings", "@odata.etag": "W/\"86E6D5239B54171717C211D20C60F195\"", "@odata.id": "/redfish/v1/systems/1/bios/boot/", "@odata.type": "#HpeServerBootSettings.v2_0_0.HpeServerBootSettings", "BootSources": [ { "BootOptionNumber": "0010", "BootString": "Red Hat Enterprise Linux", "CorrelatableID": "PciRoot(0x0)/Pci(0x17,0x0)", "StructuredBootString": "HD.EmbSATA.4.3", "UEFIDevicePath": "PciRoot(0x0)/Pci(0x17,0x0)/Sata(0x3,0x0,0x0)/HD(1,GPT,4029CE09-5C2D-464D-9C2D-EC6E607F06A1,0x800,0x100000)/\\EFI\\redhat\\shim.efi" } ], "PersistentBootConfigOrder": [ "HD.EmbSATA.4.3" ], "Id": "boot", "Name": "Boot Order Current Settings" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/bios_failed.json0000664000175000017500000004433100000000000030070 0ustar00zuulzuul00000000000000{ "Default": { "@Redfish.Settings": { "@odata.type": "#Settings.v1_0_0.Settings", "ETag": "C4690603", "Messages": [ { "MessageArgs": [ "MinProcIdlePkgState" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [ "MinProcIdlePower" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [ "EnergyPerfBias" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [ "PowerRegulator" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [], "MessageID": "Base.1.0:Success" } ], "SettingsObject": { "@odata.id": "/redfish/v1/systems/1/bios/settings/" }, "Time": "2017-06-10T07:40:44+00:00" }, "@odata.context": "/redfish/v1/$metadata#Bios.Bios", "@odata.etag": "W/\"EC55BACC2FF03737379F24EEF1948CE0\"", "@odata.id": "/redfish/v1/systems/1/bios/", "@odata.type": "#Bios.v1_0_0.Bios", "Actions": { "#Bios.ChangePassword": { "target": "/redfish/v1/systems/1/bios/settings/Actions/Bios.ChangePasswords/" }, "#Bios.ResetBios": { "target": "/redfish/v1/systems/1/bios/settings/Actions/Bios.ResetBios/" } }, "AttributeRegistry": "BiosAttributeRegistryU31.v1_1_00", "Attributes": { "AcpiHpet": "Enabled", "AcpiRootBridgePxm": "Enabled", "AcpiSlit": "Enabled", "AdjSecPrefetch": "Enabled", "AdminEmail": "", "AdminName": "", "AdminPassword": "password", "AdminOtherInfo": "", "AdminPhone": "", "AdvancedMemProtection": "AdvancedEcc", "AsrStatus": "Enabled", "AsrTimeoutMinutes": "Timeout10", "AssetTagProtection": "Unlocked", "AutoPowerOn": "RestoreLastState", "BootMode": "Uefi", "BootOrderPolicy": "RetryIndefinitely", "ChannelInterleaving": "Enabled", "Chipset_TpmFeatureEnableOrDisable": "Disabled", "Chipset_TpmFeatureType": "Chipset-TpmFeature:NONE", "CollabPowerControl": "Enabled", "ConsistentDevNaming": "LomsAndSlots", "CustomPostMessage": "", "DaylightSavingsTime": "Disabled", "DcuIpPrefetcher": "Enabled", "DcuStreamPrefetcher": "Enabled", "Description": "Default settings", "Dhcpv4": "Enabled", "DynamicPowerCapping": "Disabled", "EmbNicAspm": "Disabled", "EmbNicEnable": "Auto", "EmbNicLinkSpeed": "Auto", "EmbNicPCIeOptionROM": "Enabled", "EmbSas1Aspm": "Disabled", "EmbSas1LinkSpeed": "Auto", "EmbSas1PcieOptionROM": "Enabled", "EmbSata1Enable": "Auto", "EmbSata1PCIeOptionROM": "Enabled", "EmbSata2Enable": "Auto", "EmbSata2PCIeOptionROM": "Enabled", "EmbVideoConnection": "Auto", "EmbeddedDiagnostics": "Enabled", "EmbeddedDiagsMode": "Auto", "EmbeddedSata": "Ahci", "EmbeddedSerialPort": "Com2Irq3", "EmbeddedUefiShell": "Enabled", "EmsConsole": "Disabled", "EnabledCoresPerProc": 0, "EnergyEfficientTurbo": "Enabled", "EnergyPerfBias": "BalancedPerf", "EraseUserDefaults": "No", "ExtendedAmbientTemp": "Disabled", "ExtendedMemTest": "Disabled", "F11BootMenu": "Enabled", "FCScanPolicy": "CardConfig", "FanFailPolicy": "Shutdown", "FanInstallReq": "EnableMessaging", "FlexLom1Aspm": "Disabled", "FlexLom1LinkSpeed": "Auto", "FlexLom1PCIeOptionROM": "Enabled", "HpeScalablePmemBackupState": "Complete", "HpeScalablePmemConfigurationRestoration": "Disabled", "HpeScalablePmemFunctionalityEnabled": "Disabled", "HpeScalablePmemStorageInitialize": "Disabled", "HttpSupport": "Auto", "HwPrefetcher": "Enabled", "IntelDmiLinkFreq": "Auto", "IntelNicDmaChannels": "Enabled", "IntelPerfMonitoring": "Disabled", "IntelProcVtd": "Enabled", "IntelUpiFreq": "Auto", "IntelUpiLinkEn": "Auto", "IntelUpiPowerManagement": "Enabled", "IntelligentProvisioning": "Enabled", "InternalSDCardSlot": "Enabled", "Ipv4Address": "0.0.0.0", "Ipv4Gateway": "0.0.0.0", "Ipv4PrimaryDNS": "0.0.0.0", "Ipv4SecondaryDNS": "0.0.0.0", "Ipv4SubnetMask": "0.0.0.0", "Ipv6Address": "::", "Ipv6ConfigPolicy": "Automatic", "Ipv6Duid": "Auto", "Ipv6Gateway": "::", "Ipv6PrimaryDNS": "::", "Ipv6SecondaryDNS": "::", "LocalRemoteThreshold": "Auto", "MaxMemBusFreqMHz": "Auto", "MaxPcieSpeed": "PerPortCtrl", "MemClearWarmReset": "Disabled", "MemFastTraining": "Enabled", "MemMirrorMode": "Full", "MemPatrolScrubbing": "Enabled", "MemRefreshRate": "Refreshx2", "MemoryRemap": "NoAction", "MinProcIdlePkgState": "C6Retention", "MinProcIdlePower": "C6", "MixedPowerSupplyReporting": "Enabled", "NetworkBootRetry": "Enabled", "NetworkBootRetryCount": 20, "NicBoot1": "NetworkBoot", "NicBoot3": "Disabled", "NicBoot4": "Disabled", "NodeInterleaving": "Disabled", "NumaGroupSizeOpt": "Clustered", "NvDimmNMemInterleaving": "Disabled", "NvmeOptionRom": "Enabled", "PciResourcePadding": "Normal", "PciSlot1Aspm": "Disabled", "PciSlot1LinkSpeed": "Auto", "PciSlot1OptionROM": "Enabled", "PciSlot2Aspm": "Disabled", "PciSlot2LinkSpeed": "Auto", "PciSlot2OptionROM": "Enabled", "PciSlot3Aspm": "Disabled", "PciSlot3LinkSpeed": "Auto", "PciSlot3OptionROM": "Enabled", "PciSlot4Aspm": "Disabled", "PciSlot4LinkSpeed": "Auto", "PciSlot4OptionROM": "Enabled", "PciSlot5Aspm": "Disabled", "PciSlot5LinkSpeed": "Auto", "PciSlot5OptionROM": "Enabled", "PciSlot6Aspm": "Disabled", "PciSlot6LinkSpeed": "Auto", "PciSlot6OptionROM": "Enabled", "PersistentMemAddressRangeScrub": "Enabled", "PersistentMemBackupPowerPolicy": "WaitForBackupPower", "PersistentMemScanMem": "Enabled", "PostBootProgress": "Disabled", "PostDiscoveryMode": "ForceFullDiscovery", "PostF1Prompt": "Delayed20Sec", "PowerButton": "Enabled", "PowerOnDelay": "NoDelay", "PowerOnLogo": "Enabled", "PowerRegulator": "DynamicPowerSavings", "PreBootNetwork": "Auto", "PrebootNetworkEnvPolicy": "Auto", "PrebootNetworkProxy": "", "ProcAes": "Enabled", "ProcHyperthreading": "Enabled", "ProcTurbo": "Enabled", "ProcVirtualization": "Enabled", "ProcX2Apic": "Enabled", "Processor1LogicalNvdimm1SizeGiB": 0, "Processor1LogicalNvdimm2SizeGiB": 0, "Processor1ScalablePmemAvailableGiB": 0, "Processor2LogicalNvdimm1SizeGiB": 0, "Processor2LogicalNvdimm2SizeGiB": 0, "Processor2ScalablePmemAvailableGiB": 0, "Processor3LogicalNvdimm1SizeGiB": 0, "Processor3LogicalNvdimm2SizeGiB": 0, "Processor3ScalablePmemAvailableGiB": 0, "Processor4LogicalNvdimm1SizeGiB": 0, "Processor4LogicalNvdimm2SizeGiB": 0, "Processor4ScalablePmemAvailableGiB": 0, "ProcessorJitterControl": "Disabled", "ProcessorJitterControlFrequency": 0, "ProductId": "", "RedundantPowerSupply": "BalancedMode", "RemovableFlashBootSeq": "ExternalKeysFirst", "RestoreDefaults": "No", "RestoreManufacturingDefaults": "No", "RomSelection": "CurrentRom", "SataSecureErase": "Disabled", "SaveUserDefaults": "No", "ScalablePmemCapacity": 0, "SecureBootStatus": "Disabled", "SerialConsoleBaudRate": "BaudRate115200", "SerialConsoleEmulation": "Vt100Plus", "SerialConsolePort": "Auto", "SerialNumber": "", "ServerAssetTag": "", "ServerName": "", "ServerOtherInfo": "", "ServerPrimaryOs": "", "ServiceEmail": "", "ServiceName": "", "ServiceOtherInfo": "", "ServicePhone": "", "SetupBrowserSelection": "Auto", "SpannedLogicalNvdimm1AvailableMemoryGiB": 0, "SpannedLogicalNvdimm1SizeGiB": 0, "SpannedLogicalNvdimm1StartingDomainId": 0, "SpannedLogicalNvdimm1StartingDomainSize": 0, "SpannedLogicalNvdimm2AvailableMemoryGiB": 0, "SpannedLogicalNvdimm2SizeGiB": 0, "SpannedLogicalNvdimm2StartingDomainId": 0, "SpannedLogicalNvdimm2StartingDomainSize": 0, "Sriov": "Enabled", "SubNumaClustering": "Disabled", "ThermalConfig": "OptimalCooling", "ThermalShutdown": "Enabled", "TimeFormat": "Utc", "TimeZone": "Utc0", "TpmChipId": "None", "TpmFips": "NotSpecified", "TpmState": "NotPresent", "TpmType": "NoTpm", "UefiOptimizedBoot": "Enabled", "UefiPxeBoot": "Enabled", "UefiSerialDebugLevel": "Disabled", "UefiShellBootOrder": "Disabled", "UefiShellScriptVerification": "Disabled", "UefiShellStartup": "Disabled", "UefiShellStartupLocation": "Auto", "UefiShellStartupUrl": "", "UefiShellStartupUrlFromDhcp": "Disabled", "UncoreFreqScaling": "Auto", "UpiPrefetcher": "Enabled", "UrlBootFile": "", "UrlBootFile2": "", "UrlBootFile3": "", "UrlBootFile4": "", "UsbBoot": "Enabled", "UsbControl": "UsbEnabled", "UserDefaultsState": "Disabled", "UtilityLang": "English", "VirtualInstallDisk": "Disabled", "VirtualSerialPort": "Com1Irq4", "VlanControl": "Disabled", "VlanId": 0, "VlanPriority": 0, "WakeOnLan": "Enabled", "WorkloadProfile": "GeneralPowerEfficientCompute", "XptPrefetcher": "Enabled", "iSCSIPolicy": "SoftwareInitiator" }, "Id": "bios", "Name": "BIOS Current Settings", "Oem": { "Hpe": { "@odata.type": "#HpeBiosExt.v2_0_0.HpeBiosExt", "Links": { "BaseConfigs": { "@odata.id": "/redfish/v1/systems/1/bios/baseconfigs/" }, "Boot": { "@odata.id": "/redfish/v1/systems/1/bios/boot/" }, "Mappings": { "@odata.id": "/redfish/v1/systems/1/bios/mappings/" }, "ScalablePmem": { "@odata.id": "/redfish/v1/systems/1/bios/hpescalablepmem/" }, "TlsConfig": { "@odata.id": "/redfish/v1/systems/1/bios/tlsconfig/" }, "iScsi": { "@odata.id": "/redfish/v1/systems/1/bios/iscsi/" } }, "SettingsObject": { "UnmodifiedETag": "W/\"7F2D028BA2542B2B2B2AF4CFFD358F35\"" } } } }, "BIOS_pending_settings_default": { "@odata.context": "/redfish/v1/$metadata#Bios.Bios", "@odata.etag": "W/\"7F2D028BA2542B2B2B2AF4CFFD358F35\"", "@odata.id": "/redfish/v1/systems/1/bios/settings/", "@odata.type": "#Bios.v1_0_0.Bios", "AttributeRegistry": "BiosAttributeRegistryU31.v1_1_00", "Attributes": { "AcpiHpet": "Enabled", "AcpiRootBridgePxm": "Enabled", "AcpiSlit": "Enabled", "AdjSecPrefetch": "Enabled", "AdminEmail": "", "AdminName": "Redfish Administrator", "AdminPassword": "newpassword", "AdminOtherInfo": "", "AdminPhone": "", "AdvCrashDumpMode": "Disabled", "AdvancedMemProtection": "AdvancedEcc", "AsrStatus": "Enabled", "AsrTimeoutMinutes": "Timeout10", "AssetTagProtection": "Unlocked", "AutoPowerOn": "RestoreLastState", "BootMode": "Uefi", "BootOrderPolicy": "AttemptOnce", "ChannelInterleaving": "Enabled", "CollabPowerControl": "Enabled", "ConsistentDevNaming": "LomsAndSlots", "CustomPostMessage": "", "DaylightSavingsTime": "Disabled", "DcuIpPrefetcher": "Enabled", "DcuStreamPrefetcher": "Enabled", "Description": "Ilo Redifsh updated", "Dhcpv4": "Enabled", "DynamicPowerCapping": "Disabled", "EmbNicEnable": "Auto", "EmbNicLinkSpeed": "Auto", "EmbNicPCIeOptionROM": "Enabled", "EmbSas1Aspm": "Disabled", "EmbSas1Boot": "TwentyFourTargets", "EmbSas1Enable": "Auto", "EmbSas1LinkSpeed": "Auto", "EmbSas1PcieOptionROM": "Enabled", "EmbSata1Aspm": "Disabled", "EmbSata1PCIeOptionROM": "Enabled", "EmbSata2Aspm": "Disabled", "EmbSata2PCIeOptionROM": "Enabled", "EmbVideoConnection": "Auto", "EmbeddedDiagnostics": "Enabled", "EmbeddedSata": "Ahci", "EmbeddedSerialPort": "Com2Irq3", "EmbeddedUefiShell": "Enabled", "EmsConsole": "Disabled", "EnabledCoresPerProc": 0, "EnergyEfficientTurbo": "Enabled", "EnergyPerfBias": "BalancedPerf", "EraseUserDefaults": "No", "ExtendedAmbientTemp": "Disabled", "ExtendedMemTest": "Disabled", "F11BootMenu": "Enabled", "FCScanPolicy": "CardConfig", "FanFailPolicy": "Shutdown", "FanInstallReq": "EnableMessaging", "FlexLom1Aspm": "Disabled", "FlexLom1LinkSpeed": "Auto", "FlexLom1PCIeOptionROM": "Enabled", "HttpSupport": "Auto", "HwPrefetcher": "Enabled", "IntelDmiLinkFreq": "Auto", "IntelNicDmaChannels": "Enabled", "IntelPerfMonitoring": "Disabled", "IntelProcVtd": "Enabled", "IntelligentProvisioning": "Enabled", "InternalSDCardSlot": "Enabled", "Ipv4Address": "0.0.0.0", "Ipv4Gateway": "0.0.0.0", "Ipv4PrimaryDNS": "0.0.0.0", "Ipv4SecondaryDNS": "0.0.0.0", "Ipv4SubnetMask": "0.0.0.0", "Ipv6Address": "::", "Ipv6ConfigPolicy": "Automatic", "Ipv6Duid": "Auto", "Ipv6Gateway": "::", "Ipv6PrimaryDNS": "::", "Ipv6SecondaryDNS": "::", "LLCDeadLineAllocation": "Enabled", "LlcPrefetch": "Disabled", "LocalRemoteThreshold": "Auto", "MaxMemBusFreqMHz": "Auto", "MaxPcieSpeed": "PerPortCtrl", "MemClearWarmReset": "Disabled", "MemFastTraining": "Enabled", "MemMirrorMode": "Full", "MemPatrolScrubbing": "Enabled", "MemRefreshRate": "Refreshx1", "MemoryControllerInterleaving": "Auto", "MemoryRemap": "NoAction", "MinProcIdlePkgState": "C6Retention", "MinProcIdlePower": "C6", "MixedPowerSupplyReporting": "Enabled", "NVMeDriveBox3Bay1": "Nvme", "NetworkBootRetry": "Enabled", "NetworkBootRetryCount": 20, "NicBoot1": "NetworkBoot", "NicBoot2": "Disabled", "NicBoot3": "Disabled", "NicBoot4": "Disabled", "NodeInterleaving": "Disabled", "NumaGroupSizeOpt": "Flat", "NvmeOptionRom": "Enabled", "OpportunisticSelfRefresh": "Disabled", "PciResourcePadding": "Normal", "PciSlot1Aspm": "Disabled", "PciSlot1LinkSpeed": "Auto", "PciSlot1OptionROM": "Enabled", "PciSlot2Aspm": "Disabled", "PciSlot2LinkSpeed": "Auto", "PciSlot2OptionROM": "Enabled", "PciSlot3Aspm": "Disabled", "PciSlot3LinkSpeed": "Auto", "PciSlot3OptionROM": "Enabled", "PciSlot4Aspm": "Disabled", "PciSlot4LinkSpeed": "Auto", "PciSlot4OptionROM": "Enabled", "PciSlot5Aspm": "Disabled", "PciSlot5LinkSpeed": "Auto", "PciSlot5OptionROM": "Enabled", "PciSlot6Aspm": "Disabled", "PciSlot6LinkSpeed": "Auto", "PciSlot6OptionROM": "Enabled", "PciSlot7Aspm": "Disabled", "PciSlot7LinkSpeed": "Auto", "PciSlot7OptionROM": "Enabled", "PciSlot8Aspm": "Disabled", "PciSlot8LinkSpeed": "Auto", "PciSlot8OptionROM": "Enabled", "PersistentMemAddressRangeScrub": "Enabled", "PersistentMemBackupPowerPolicy": "WaitForBackupPower", "PersistentMemScanMem": "Enabled", "PostBootProgress": "Disabled", "PostDiscoveryMode": "Auto", "PostF1Prompt": "Delayed20Sec", "PowerButton": "Enabled", "PowerOnDelay": "NoDelay", "PowerRegulator": "DynamicPowerSavings", "PreBootNetwork": "Auto", "PrebootNetworkEnvPolicy": "Auto", "PrebootNetworkProxy": "", "ProcAes": "Enabled", "ProcHyperthreading": "Enabled", "ProcTurbo": "Enabled", "ProcVirtualization": "Enabled", "ProcX2Apic": "Enabled", "ProcessorJitterControl": "Disabled", "ProcessorJitterControlFrequency": 0, "ProcessorJitterControlOptimization": "ZeroLatency", "ProductId": "868703-B21", "RedundantPowerSupply": "BalancedMode", "RemovableFlashBootSeq": "ExternalKeysFirst", "RestoreDefaults": "No", "RestoreManufacturingDefaults": "No", "RomSelection": "CurrentRom", "SataSecureErase": "Disabled", "SaveUserDefaults": "No", "SecStartBackupImage": "Disabled", "SecureBootStatus": "Disabled", "SerialConsoleBaudRate": "BaudRate115200", "SerialConsoleEmulation": "Vt100Plus", "SerialConsolePort": "Auto", "SerialNumber": "SGH744YPVS", "ServerAssetTag": "", "ServerName": "", "ServerOtherInfo": "", "ServerPrimaryOs": "", "ServiceEmail": "", "ServiceName": "", "ServiceOtherInfo": "", "ServicePhone": "", "SetupBrowserSelection": "Auto", "Sriov": "Enabled", "StaleAtoS": "Disabled", "SubNumaClustering": "Disabled", "ThermalConfig": "OptimalCooling", "ThermalShutdown": "Enabled", "TimeFormat": "Utc", "TimeZone": "Utc9", "TpmChipId": "None", "TpmFips": "NotSpecified", "TpmState": "NotPresent", "TpmType": "NoTpm", "UefiOptimizedBoot": "Disabled", "UefiPxeBoot": "Enabled", "UefiSerialDebugLevel": "Disabled", "UefiShellBootOrder": "Disabled", "UefiShellScriptVerification": "Disabled", "UefiShellStartup": "Disabled", "UefiShellStartupLocation": "Auto", "UefiShellStartupUrl": "", "UefiShellStartupUrlFromDhcp": "Disabled", "UncoreFreqScaling": "Auto", "UrlBootFile": "", "UrlBootFile2": "", "UrlBootFile3": "", "UrlBootFile4": "", "UsbBoot": "Enabled", "UsbControl": "UsbEnabled", "UserDefaultsState": "Disabled", "UtilityLang": "English", "VirtualInstallDisk": "Disabled", "VirtualSerialPort": "Com1Irq4", "VlanControl": "Disabled", "VlanId": 0, "VlanPriority": 0, "WakeOnLan": "Enabled", "WorkloadProfile": "GeneralPowerEfficientCompute", "XptPrefetcher": "Auto", "iSCSIPolicy": "SoftwareInitiator" }, "Id": "settings", "Name": "BIOS Current Settings" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/bios_mappings.json0000664000175000017500000000545000000000000030461 0ustar00zuulzuul00000000000000{ "Default": { "@odata.context": "/redfish/v1/$metadata#HpeBiosMapping.HpeBiosMapping", "@odata.etag": "W/\"75FF243D79B08484843282DBD1D18A0E\"", "@odata.id": "/redfish/v1/systems/1/bios/mappings/", "@odata.type": "#HpeBiosMapping.v2_0_0.HpeBiosMapping", "BiosPciSettingsMappings":[ { "Associations":["EmbSata1Aspm", "EmbSata1PCIeOptionROM"], "CorrelatableID": "PciRoot(0x0)/Pci(0x17,0x0)", "Instance": 1, "Subinstances":[] }, { "Associations":["EmbSata2Aspm", "EmbSata2PCIeOptionROM"], "CorrelatableID": "PciRoot(0x0)/Pci(0x11,0x5)", "Instance": 2, "Subinstances":[] }, { "Associations":["PciSlot3LinkSpeed", "PciSlot3OptionROM"], "CorrelatableID": "PciRoot(0x1)/Pci(0x0,0x0)/Pci(0x0,0x0)", "Instance": 3, "Subinstances":[] }, { "Associations":["FlexLom1Enable", "FlexLom1LinkSpeed", "FlexLom1Aspm", "FlexLom1PCIeOptionROM"], "CorrelatableID": "PciRoot(0x2)/Pci(0x0,0x0)/Pci(0x0,0x0)", "Instance": 4, "Subinstances":[ { "Associations":[{"PreBootNetwork": "FlexLom1Port3" }, "NicBoot1"], "CorrelatableID": "PciRoot(0x2)/Pci(0x0,0x0)/Pci(0x0,0x2)", "Subinstance": 3 }, { "Associations":[{"PreBootNetwork": "FlexLom1Port4" }, "NicBoot2"], "CorrelatableID": "PciRoot(0x2)/Pci(0x0,0x0)/Pci(0x0,0x3)", "Subinstance": 4 } ] } ], "Id": "mappings", "Name": "BIOS mappings" }, "Mappings_without_nic": { "@odata.context": "/redfish/v1/$metadata#HpeBiosMapping.HpeBiosMapping", "@odata.etag": "W/\"75FF243D79B08484843282DBD1D18A0E\"", "@odata.id": "/redfish/v1/systems/1/bios/mappings/", "@odata.type": "#HpeBiosMapping.v2_0_0.HpeBiosMapping", "BiosPciSettingsMappings":[ { "Associations":["EmbSata1Aspm", "EmbSata1PCIeOptionROM"], "CorrelatableID": "PciRoot(0x0)/Pci(0x17,0x0)", "Instance": 1, "Subinstances":[] }, { "Associations":["EmbSata2Aspm", "EmbSata2PCIeOptionROM"], "CorrelatableID": "PciRoot(0x0)/Pci(0x11,0x5)", "Instance": 2, "Subinstances":[] }, { "Associations":["PciSlot3LinkSpeed", "PciSlot3OptionROM"], "CorrelatableID": "PciRoot(0x1)/Pci(0x0,0x0)/Pci(0x0,0x0)", "Instance": 3, "Subinstances":[] }, { "Associations":["FlexLom1Enable", "FlexLom1LinkSpeed", "FlexLom1Aspm", "FlexLom1PCIeOptionROM"], "CorrelatableID": "PciRoot(0x2)/Pci(0x0,0x0)/Pci(0x0,0x0)", "Instance": 4, "Subinstances":[] } ], "Id": "mappings", "Name": "BIOS mappings" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/certfile.crt0000664000175000017500000000262000000000000027237 0ustar00zuulzuul00000000000000-----BEGIN CERTIFICATE----- MIID7TCCAtWgAwIBAgIJAPpdOt6Qt3FFMA0GCSqGSIb3DQEBCwUAMIGMMQswCQYD VQQGEwJJTjESMBAGA1UECAwJVGVsYW5nYW5hMRIwEAYDVQQHDAlIeWRlcmFiYWQx DDAKBgNVBAoMA0hQRTELMAkGA1UECwwCU0cxFDASBgNVBAMMCzE3Mi4xNy4xLjg4 MSQwIgYJKoZIhvcNAQkBFhV2aW5heS5tLmt1bWFyQGhwZS5jb20wHhcNMTkwNDI0 MDg1MTI4WhcNMjAwNDIzMDg1MTI4WjCBjDELMAkGA1UEBhMCSU4xEjAQBgNVBAgM CVRlbGFuZ2FuYTESMBAGA1UEBwwJSHlkZXJhYmFkMQwwCgYDVQQKDANIUEUxCzAJ BgNVBAsMAlNHMRQwEgYDVQQDDAsxNzIuMTcuMS44ODEkMCIGCSqGSIb3DQEJARYV dmluYXkubS5rdW1hckBocGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB CgKCAQEA3afHTbbueWjZMp0w0g4XN5VaGD17kk2fjjpJn0Ltgx2L4SSbEabM/491 A79wZlr0WSo53IYH7AB2ZA0Ze8ZBML6F4FBhSf6lPoGJN/cHDz5z/bDhNV/KrXLA uqpghDQS0hiv0KHsk3JXaRz/FM+MmmoKdOWSLCWReGOOIGYwEyaB4CFAXefppTlP ii0IyzGLMfUERxP3x/UpsR/hejun8QNOKcf5mpTbGbh1Ro+yvoJbeXy7ivkOX9QG 7w8UMzGxFXgQ/U3VvpfY5C1A23wAvX9F+lwNQQ71XfmB9ascC7luzWQ3WqVHVpKh Ksv0vQ3MM17xEuHzlUrUJJSzltsb+wIDAQABo1AwTjAdBgNVHQ4EFgQUB6xKvLMe R0JVdSSJZH37aEBh5zQwHwYDVR0jBBgwFoAUB6xKvLMeR0JVdSSJZH37aEBh5zQw DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAU3fBFSyx19SMgvBVzelP NyudGhNKm+3zmKndi2HYdKQWHqg6dMSR9zE8FE6viUgB2v1V+5JpF7NhDbgCaNng DmC8sm3p6lNpvcEDnPak6759K6yT/k6tlPsZ5GsIGXQhBMJdVw0zJPNHEMIV8SnV D0SGSG5F+pcPvnQtdLzGl18kIOj0NmjzKnz+l/jBd7bckb7vXM+M/KRmrTE6cLF0 yB6IQ/UPWiuOIflxSxhSPaVYNWiaRALCJEiIYagoWr6mOUxqCnAdR50Pfwxz7KGI txLjc4+qa6ZgWEBx3uDQ9ehysBrMOmWg5nXRlO/nbtyFXi+GzZChiNA75fgnb6e/ YQ== -----END CERTIFICATE----- ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/chassis.json0000664000175000017500000000613300000000000027263 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#Chassis.Chassis", "@odata.etag": "W/\"DF3E9DED\"", "@odata.id": "/redfish/v1/Chassis/1", "@odata.type": "#Chassis.v1_6_0.Chassis", "Id": "1", "AssetTag": "", "ChassisType": "RackMount", "IndicatorLED": "Off", "Links": { "ManagedBy": [{ "@odata.id": "/redfish/v1/Managers/1" }], "ComputerSystems": [{ "@odata.id": "/redfish/v1/Systems/1" }] }, "Manufacturer": "HPE", "Model": "ProLiant DL360 Gen10", "Name": "Computer System Chassis", "NetworkAdapters": { "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters" }, "Oem": { "Hpe": { "@odata.context": "/redfish/v1/$metadata#HpeServerChassis.HpeServerChassis", "@odata.type": "#HpeServerChassis.v2_3_1.HpeServerChassis", "Actions": { "#HpeServerChassis.DisableMCTPOnServer": { "target": "/redfish/v1/Chassis/1/Actions/Oem/Hpe/HpeServerChassis.DisableMCTPOnServer" }, "#HpeServerChassis.FactoryResetMCTP": { "target": "/redfish/v1/Chassis/1/Actions/Oem/Hpe/HpeServerChassis.FactoryResetMCTP" } }, "Firmware": { "PlatformDefinitionTable": { "Current": { "VersionString": "9.6.0 Build 15" } }, "PowerManagementController": { "Current": { "VersionString": "1.0.4" } }, "PowerManagementControllerBootloader": { "Current": { "Family": "25", "VersionString": "1.1" } }, "SPSFirmwareVersionData": { "Current": { "VersionString": "4.1.4.296" } }, "SystemProgrammableLogicDevice": { "Current": { "VersionString": "0x2E" } } }, "Links": { "Devices": { "@odata.id": "/redfish/v1/Chassis/1/Devices" } }, "MCTPEnabledOnServer": true, "SmartStorageBattery": [{ "ChargeLevelPercent": 100, "FirmwareVersion": "0.70", "Index": 1, "MaximumCapWatts": 96, "Model": "875241-B21", "ProductName": "HPE Smart Storage Battery ", "RemainingChargeTimeSeconds": 25, "SerialNumber": "6WQXL0EB2CT3N9", "SparePartNumber": "878643-001", "Status": { "Health": "OK", "State": "Enabled" } }], "SystemMaintenanceSwitches": { "Sw1": "Off", "Sw10": "Off", "Sw11": "Off", "Sw12": "Off", "Sw2": "Off", "Sw3": "Off", "Sw4": "Off", "Sw5": "Off", "Sw6": "Off", "Sw7": "Off", "Sw8": "Off", "Sw9": "Off" } } }, "PCIeDevices": { "@odata.id": "/redfish/v1/Chassis/1/PCIeDevices" }, "PCIeSlots": { "@odata.id": "/redfish/v1/Chassis/1/PCIeSlots" }, "Power": { "@odata.id": "/redfish/v1/Chassis/1/Power" }, "PowerState": "On", "SKU": "867960-B21", "SerialNumber": "SGH945SFJG", "Status": { "Health": "OK", "State": "Enabled" }, "Thermal": { "@odata.id": "/redfish/v1/Chassis/1/Thermal" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/devices.json0000664000175000017500000000124600000000000027250 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#HpeServerDevice.HpeServerDevice", "@odata.etag": "W/\"96249847\"", "@odata.id": "/redfish/v1/Chassis/1/Devices/9", "@odata.type": "#HpeServerDevice.v2_0_0.HpeServerDevice", "Id": "9", "DeviceInstances": [{ "@odata.id": "/redfish/v1/Systems/1/PCIDevices/6" }], "DeviceType": "Unknown", "FirmwareVersion": { "Current": { "VersionString": "2.5" } }, "Location": "Embedded Device", "Manufacturer": "", "Name": "Embedded Video Controller", "PartNumber": "", "ProductPartNumber": "", "ProductVersion": "", "SerialNumber": "", "Status": { "Health": "OK", "State": "Enabled" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/devices_collection.json0000664000175000017500000000063300000000000031462 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#HpeServerDeviceCollection.HpeServerDeviceCollection", "@odata.etag": "W/\"1E796226\"", "@odata.id": "/redfish/v1/Chassis/1/Devices", "@odata.type": "#HpeServerDeviceCollection.HpeServerDeviceCollection", "Description": "Devices View", "Name": "Devices", "Members": [{ "@odata.id": "/redfish/v1/Chassis/1/Devices/9" }], "Members@odata.count": 1 } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/disk_drive.json0000664000175000017500000001142400000000000027750 0ustar00zuulzuul00000000000000{ "disk-erase-progress": { "@odata.context": "/redfish/v1/$metadata#HpeSmartStorageDiskDrive.HpeSmartStorageDiskDrive", "@odata.etag": "W/\"E852783E\"", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/DiskDrives/1/", "@odata.type": "#HpeSmartStorageDiskDrive.v2_0_0.HpeSmartStorageDiskDrive", "Id": "1", "BlockSizeBytes": 512, "CapacityGB": 1200, "CapacityLogicalBlocks": 2344225968, "CapacityMiB": 1144641, "CarrierApplicationVersion": "11", "CarrierAuthenticationStatus": "OK", "CurrentTemperatureCelsius": 0, "Description": "HPE Smart Storage Disk Drive View", "DiskDriveStatusReasons": [ "EraseInProgress" ], "DiskDriveUse": "Raw", "EncryptedDrive": false, "FirmwareVersion": { "Current": { "VersionString": "HPD6" } }, "MediaType": "HDD", "InterfaceSpeedMbps": 12000, "InterfaceType": "SAS", "LegacyBootPriority": "Primary", "Location": "1I:2:3", "LocationFormat": "ControllerPort:Box:Bay" }, "disk-erase-completed": { "@odata.context": "/redfish/v1/$metadata#HpeSmartStorageDiskDrive.HpeSmartStorageDiskDrive", "@odata.etag": "W/\"E852783E\"", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/DiskDrives/1/", "@odata.type": "#HpeSmartStorageDiskDrive.v2_0_0.HpeSmartStorageDiskDrive", "BlockSizeBytes": 512, "CapacityGB": 1200, "CapacityLogicalBlocks": 2344225968, "CapacityMiB": 1144641, "CarrierApplicationVersion": "11", "CarrierAuthenticationStatus": "OK", "CurrentTemperatureCelsius": 0, "Description": "HPE Smart Storage Disk Drive View", "DiskDriveStatusReasons": [ "EraseCompleted" ], "DiskDriveUse": "Raw", "EncryptedDrive": false, "FirmwareVersion": { "Current": { "VersionString": "HPD6" } }, "Id": "1", "MediaType": "HDD", "InterfaceSpeedMbps": 12000, "InterfaceType": "SAS", "LegacyBootPriority": "Primary", "Location": "1I:2:3", "LocationFormat": "ControllerPort:Box:Bay" }, "drive1": { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/SmartStorage/ArrayControllers/Members/0/DiskDrives/Members/$entity", "@odata.etag": "W/\"559F84DD\"", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/DiskDrives/3/", "@odata.type": "#HpeSmartStorageDiskDrive.v2_0_0.HpeSmartStorageDiskDrive", "BlockSizeBytes": 512, "CapacityGB": 600, "CapacityLogicalBlocks": 1172123568, "CapacityMiB": 572325, "CarrierApplicationVersion": "0", "CarrierAuthenticationStatus": "Fail", "CurrentTemperatureCelsius": 29, "Description": "HPE Smart Storage Disk Drive View", "DiskDriveStatusReasons": [ "NonAuthenticDrive" ], "DiskDriveUse": "Raw", "EncryptedDrive": false, "FirmwareVersion": { "Current": { "VersionString": "HPDC" } }, "Id": "3", "InterfaceSpeedMbps": 6000, "InterfaceType": "SAS", "LegacyBootPriority": "Primary", "Location": "1I:0:1", "LocationFormat": "ControllerPort:Box:Bay", "MaximumTemperatureCelsius": 40, "MediaType": "HDD", "Model": "EG0600FBVFP", "Name": "HpeSmartStorageDiskDrive", "PowerOnHours": null, "RotationalSpeedRpm": 10000, "SSDEnduranceUtilizationPercentage": null, "SerialNumber": "KWGER73R", "Status": { "Health": "Warning", "State": "Enabled" } }, "drive2": { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/SmartStorage/ArrayControllers/Members/0/DiskDrives/Members/$entity", "@odata.etag": "W/\"559F84DD\"", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/DiskDrives/4/", "@odata.type": "#HpeSmartStorageDiskDrive.v2_0_0.HpeSmartStorageDiskDrive", "BlockSizeBytes": 512, "CapacityGB": 600, "CapacityLogicalBlocks": 1172123568, "CapacityMiB": 572325, "CarrierApplicationVersion": "0", "CarrierAuthenticationStatus": "Fail", "CurrentTemperatureCelsius": 29, "Description": "HPE Smart Storage Disk Drive View", "DiskDriveStatusReasons": [ "NonAuthenticDrive" ], "DiskDriveUse": "Raw", "EncryptedDrive": false, "FirmwareVersion": { "Current": { "VersionString": "HPDC" } }, "Id": "3", "InterfaceSpeedMbps": 6000, "InterfaceType": "SAS", "LegacyBootPriority": "Primary", "Location": "1I:0:1", "LocationFormat": "ControllerPort:Box:Bay", "MaximumTemperatureCelsius": 40, "MediaType": "SSD", "Model": "EG0600FBVFX", "Name": "HpeSmartStorageDiskDrive", "PowerOnHours": null, "SSDEnduranceUtilizationPercentage": null, "SerialNumber": "KWGER73R", "Status": { "Health": "Warning", "State": "Enabled" } } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/disk_drive_collection.json0000664000175000017500000000131600000000000032162 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/SmartStorage/ArrayControllers/Members/0/DiskDrives", "@odata.etag": "W/\"E5B74C7A\"", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/DiskDrives/", "@odata.type": "#HpeSmartStorageDiskDriveCollection.HpeSmartStorageDiskDriveCollection", "Description": "HPE Smart Storage Disk Drives View", "Members": [ { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/DiskDrives/3/" }, { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/DiskDrives/4/" } ], "Members@odata.count": 2, "Name": "HpeSmartStorageDiskDrives" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/drive.json0000664000175000017500000000701500000000000026737 0ustar00zuulzuul00000000000000{ "drive1":{ "@odata.type": "#Drive.v1_1_0.Drive", "IndicatorLED": "Lit", "Model": "C123", "Revision": "100A", "Status": { "State": "Enabled", "Health": "OK" }, "CapacityBytes": 899527000000, "FailurePredicted": false, "Protocol": "SAS", "MediaType": "HDD", "Manufacturer": "Contoso", "SerialNumber": "1234567", "PartNumber": "C123-1111", "Identifiers": [{ "DurableNameFormat": "NAA", "DurableName": "35D38F11ACEF7BD3" }], "HotspareType": "None", "EncryptionAbility": "SelfEncryptingDrive", "EncryptionStatus": "Unlocked", "RotationSpeedRPM": 15000, "BlockSizeBytes": 512, "CapableSpeedGbs": 12, "NegotiatedSpeedGbs": 12, "Links": { "Volumes": [{ "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes/1" }] }, "Actions": { "#Drive.SecureErase": { "Target": "/redfish/v1/Systems/437XR1138R2/Storage/1/Drives/35D38F11ACEF7BD3/Actions/Drive.SecureErase" } }, "@odata.context": "/redfish/v1/$metadata#Drive.Drive", "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Drives/35D38F11ACEF7BD3" }, "drive2": { "@odata.type": "#Drive.v1_1_0.Drive", "IndicatorLED": "Lit", "Model": "C123", "Revision": "100A", "Status": { "State": "Enabled", "Health": "OK" }, "CapacityBytes": 899527000000, "FailurePredicted": false, "Protocol": "NVMe", "MediaType": "SSD", "Manufacturer": "Contoso", "SerialNumber": "1234567", "PartNumber": "C123-1111", "Identifiers": [{ "DurableNameFormat": "NAA", "DurableName": "3F5A8C54207B7233" }], "HotspareType": "None", "EncryptionAbility": "SelfEncryptingDrive", "EncryptionStatus": "Unlocked", "BlockSizeBytes": 512, "CapableSpeedGbs": 12, "NegotiatedSpeedGbs": 12, "Links": { "Volumes": [{ "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes/1" }] }, "Actions": { "#Drive.SecureErase": { "Target": "/redfish/v1/Systems/437XR1138R2/Storage/1/Drives/3F5A8C54207B7233/Actions/Drive.SecureErase" } }, "@odata.context": "/redfish/v1/$metadata#Drive.Drive", "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Drives/3F5A8C54207B7233" }, "drive3": { "@odata.type": "#Drive.v1_1_0.Drive", "IndicatorLED": "Lit", "Model": "C123", "Revision": "100A", "Status": { "State": "Enabled", "Health": "OK" }, "CapacityBytes": 899527000000, "FailurePredicted": false, "Protocol": "SAS", "MediaType": "HDD", "Manufacturer": "Contoso", "SerialNumber": "1234567", "PartNumber": "C123-1111", "Identifiers": [{ "DurableNameFormat": "NAA", "DurableName": "35D38F11ACEF7BD3" }], "HotspareType": "None", "EncryptionAbility": "SelfEncryptingDrive", "EncryptionStatus": "Unlocked", "RotationSpeedRPM": 10000, "BlockSizeBytes": 512, "CapableSpeedGbs": 12, "NegotiatedSpeedGbs": 12, "Links": { "Volumes": [{ "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes/1" }] }, "Actions": { "#Drive.SecureErase": { "Target": "/redfish/v1/Systems/437XR1138R2/Storage/1/Drives/35D38F11ACEF7BD3/Actions/Drive.SecureErase" } }, "@odata.context": "/redfish/v1/$metadata#Drive.Drive", "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Drives/35D38F11ACEF7BD3" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/ethernet_interface.json0000664000175000017500000000423400000000000031464 0ustar00zuulzuul00000000000000{ "default": { "@odata.type": "#EthernetInterface.v1_0_2.EthernetInterface", "Id": "1", "Name": "Ethernet Interface", "Description": "System NIC 1", "Status": { "State": "Enabled", "Health": "OK" }, "PermanentMACAddress": "12:44:6A:3B:04:11", "MACAddress": "12:44:6A:3B:04:11", "SpeedMbps": 1000, "FullDuplex": true, "HostName": "web483", "FQDN": "web483.contoso.com", "IPv6DefaultGateway": "fe80::3ed9:2bff:fe34:600", "NameServers": [ "names.contoso.com" ], "IPv4Addresses": [{ "Address": "192.168.0.10", "SubnetMask": "255.255.252.0", "AddressOrigin": "Static", "Gateway": "192.168.0.1" }], "IPv6Addresses": [{ "Address": "fe80::1ec1:deff:fe6f:1e24", "PrefixLength": 64, "AddressOrigin": "Static", "AddressState": "Preferred" }], "VLANs": { "@odata.id": "/redfish/v1/Systems/437XR1138R2/EthernetInterfaces/12446A3B0411/VLANs" }, "@odata.context": "/redfish/v1/$metadata#EthernetInterface.EthernetInterface", "@odata.id": "/redfish/v1/Systems/437XR1138R2/EthernetInterfaces/12446A3B0411" }, "latest": { "@odata.context": "/redfish/v1/$metadata#EthernetInterface.EthernetInterface", "@odata.etag": "W/\"72E9391E\"", "@odata.id": "/redfish/v1/Systems/1/EthernetInterfaces/6/", "@odata.type": "#EthernetInterface.v1_4_1.EthernetInterface", "Id": "6", "FullDuplex": true, "IPv4Addresses": [], "IPv4StaticAddresses": [], "IPv6AddressPolicyTable": [], "IPv6Addresses": [], "IPv6StaticAddresses": [], "IPv6StaticDefaultGateways": [], "LinkStatus": null, "MACAddress": "98:f2:b3:2a:0e:3d", "Name": "", "NameServers": [], "SpeedMbps": null, "StaticNameServers": [], "Status": { "Health": null, "State": null }, "UefiDevicePath": "PciRoot(0x0)/Pci(0x1C,0x0)/Pci(0x0,0x0)" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/ethernet_interface_collection.json0000664000175000017500000000100000000000000033663 0ustar00zuulzuul00000000000000{ "@odata.type": "#EthernetInterfaceCollection.EthernetInterfaceCollection", "Name": "Ethernet Interface Collection", "Description": "System NICs on Contoso Servers", "Members@odata.count": 1, "Members": [{ "@odata.id": "/redfish/v1/Systems/437XR1138R2/EthernetInterfaces/12446A3B0411" }], "Oem": {}, "@odata.context": "/redfish/v1/$metadata#EthernetInterfaceCollection.EthernetInterfaceCollection", "@odata.id": "/redfish/v1/Systems/437XR1138R2/EthernetInterfaces" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/https_cert.json0000664000175000017500000000176700000000000030015 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#HpeHttpsCert.HpeHttpsCert", "@odata.etag": "W/\"75D0C583\"", "@odata.id": "/redfish/v1/Managers/1/SecurityService/HttpsCert", "@odata.type": "#HpeHttpsCert.v2_0_0.HpeHttpsCert", "Id": "HttpsCert", "Actions": { "#HpeHttpsCert.GenerateCSR": { "target": "/redfish/v1/Managers/1/SecurityService/HttpsCert/Actions/HpeHttpsCert.GenerateCSR" }, "#HpeHttpsCert.ImportCertificate": { "target": "/redfish/v1/Managers/1/SecurityService/HttpsCert/Actions/HpeHttpsCert.ImportCertificate" } }, "CertificateSigningRequest": "none", "X509CertificateInformation": { "Issuer": "CN = Default Issuer (Do not trust), O = AA, OU = CC, L = BLR, ST = KN, C = IN", "SerialNumber": "00:00:00:00:00:00:00", "Subject": "CN = ABCDE, O = AA, OU = ISS, L = CDE, ST = TRD, C = AB", "ValidNotAfter": "2033-06-21T03:03:01Z", "ValidNotBefore": "2018-06-22T03:03:01Z" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/iscsi.json0000664000175000017500000001347000000000000026742 0ustar00zuulzuul00000000000000 { "@Redfish.Settings": { "@odata.type": "#Settings.v1_0_0.Settings", "ETag": "", "Messages": [ { "MessageId": "Base.1.0.Success" } ], "SettingsObject": { "@odata.id": "/redfish/v1/systems/1/bios/iscsi/settings/" }, "Time": "" }, "@odata.context": "/redfish/v1/$metadata#HpeiSCSISoftwareInitiator.HpeiSCSISoftwareInitiator", "@odata.etag": "W/\"A772A3CF45F53A3A3A285057B9B505F1\"", "@odata.id": "/redfish/v1/systems/1/bios/iscsi/", "@odata.type": "#HpeiSCSISoftwareInitiator.v2_0_0.HpeiSCSISoftwareInitiator", "Id": "iscsi", "Name": "iSCSI Software Initiator Current Settings", "Oem": { "Hpe": { "@odata.type": "#HpeBiosExt.v2_0_0.HpeBiosExt", "Links": { "BaseConfigs": { "@odata.id": "/redfish/v1/systems/1/bios/iscsi/baseconfigs/" } }, "SettingsObject": { "UnmodifiedETag": "W/\"F92FCCF7BBE885858530538BD89804A4\"" } } }, "iSCSIInitiatorName": "iqn.2015-02.com.hpe:uefi-U31", "iSCSISources": [ { "StructuredBootString": null, "UEFIDevicePath": null, "iSCSIAttemptInstance": 0, "iSCSIAttemptName": "", "iSCSIAuthenticationMethod": "None", "iSCSIChapSecret": null, "iSCSIChapType": "OneWay", "iSCSIChapUsername": null, "iSCSIConnectRetry": 3, "iSCSIConnectTimeoutMS": 20000, "iSCSIConnection": "Disabled", "iSCSIInitiatorGateway": "0.0.0.0", "iSCSIInitiatorInfoViaDHCP": true, "iSCSIInitiatorIpAddress": "0.0.0.0", "iSCSIInitiatorNetmask": "0.0.0.0", "iSCSIIpAddressType": "IPv4", "iSCSILUN": "0", "iSCSINicSource": null, "iSCSIReverseChapSecret": null, "iSCSIReverseChapUsername": null, "iSCSITargetInfoViaDHCP": true, "iSCSITargetIpAddress": "0.0.0.0", "iSCSITargetName": "", "iSCSITargetTcpPort": 3260 }, { "StructuredBootString": null, "UEFIDevicePath": null, "iSCSIAttemptInstance": 0, "iSCSIAttemptName": "", "iSCSIAuthenticationMethod": "None", "iSCSIChapSecret": null, "iSCSIChapType": "OneWay", "iSCSIChapUsername": null, "iSCSIConnectRetry": 3, "iSCSIConnectTimeoutMS": 20000, "iSCSIConnection": "Disabled", "iSCSIInitiatorGateway": "0.0.0.0", "iSCSIInitiatorInfoViaDHCP": true, "iSCSIInitiatorIpAddress": "0.0.0.0", "iSCSIInitiatorNetmask": "0.0.0.0", "iSCSIIpAddressType": "IPv4", "iSCSILUN": "0", "iSCSINicSource": null, "iSCSIReverseChapSecret": null, "iSCSIReverseChapUsername": null, "iSCSITargetInfoViaDHCP": true, "iSCSITargetIpAddress": "0.0.0.0", "iSCSITargetName": "", "iSCSITargetTcpPort": 3260 }, { "StructuredBootString": null, "UEFIDevicePath": null, "iSCSIAttemptInstance": 0, "iSCSIAttemptName": "", "iSCSIAuthenticationMethod": "None", "iSCSIChapSecret": null, "iSCSIChapType": "OneWay", "iSCSIChapUsername": null, "iSCSIConnectRetry": 3, "iSCSIConnectTimeoutMS": 20000, "iSCSIConnection": "Disabled", "iSCSIInitiatorGateway": "0.0.0.0", "iSCSIInitiatorInfoViaDHCP": true, "iSCSIInitiatorIpAddress": "0.0.0.0", "iSCSIInitiatorNetmask": "0.0.0.0", "iSCSIIpAddressType": "IPv4", "iSCSILUN": "0", "iSCSINicSource": null, "iSCSIReverseChapSecret": null, "iSCSIReverseChapUsername": null, "iSCSITargetInfoViaDHCP": true, "iSCSITargetIpAddress": "0.0.0.0", "iSCSITargetName": "", "iSCSITargetTcpPort": 3260 }, { "StructuredBootString": null, "UEFIDevicePath": null, "iSCSIAttemptInstance": 0, "iSCSIAttemptName": "", "iSCSIAuthenticationMethod": "None", "iSCSIChapSecret": null, "iSCSIChapType": "OneWay", "iSCSIChapUsername": null, "iSCSIConnectRetry": 3, "iSCSIConnectTimeoutMS": 20000, "iSCSIConnection": "Disabled", "iSCSIInitiatorGateway": "0.0.0.0", "iSCSIInitiatorInfoViaDHCP": true, "iSCSIInitiatorIpAddress": "0.0.0.0", "iSCSIInitiatorNetmask": "0.0.0.0", "iSCSIIpAddressType": "IPv4", "iSCSILUN": "0", "iSCSINicSource": null, "iSCSIReverseChapSecret": null, "iSCSIReverseChapUsername": null, "iSCSITargetInfoViaDHCP": true, "iSCSITargetIpAddress": "0.0.0.0", "iSCSITargetName": "", "iSCSITargetTcpPort": 3260 } ] } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/iscsi_settings.json0000664000175000017500000001170200000000000030656 0ustar00zuulzuul00000000000000{ "Default": { "@odata.context": "/redfish/v1/$metadata#HpeiSCSISoftwareInitiator.HpeiSCSISoftwareInitiator", "@odata.etag": "W/\"9DAB2702E4B2A3A3A38C81720461C5A4\"", "@odata.id": "/redfish/v1/systems/1/bios/iscsi/settings/", "@odata.type": "#HpeiSCSISoftwareInitiator.v2_0_0.HpeiSCSISoftwareInitiator", "Id": "settings", "Name": "iSCSI Software Initiator Current Settings", "iSCSIInitiatorName": "iqn.2015-02.com.hpe:uefi-i41-2m27240861", "iSCSINicSources":[ "NicBoot1", "NicBoot2" ], "iSCSISources": [ { "StructuredBootString": null, "UEFIDevicePath": null, "iSCSIAttemptInstance": 0, "iSCSIAttemptName": "", "iSCSIAuthenticationMethod": "None", "iSCSIChapSecret": null, "iSCSIChapType": "OneWay", "iSCSIChapUsername": null, "iSCSIConnectRetry": 3, "iSCSIConnectTimeoutMS": 20000, "iSCSIConnection": "Disabled", "iSCSIInitiatorGateway": "0.0.0.0", "iSCSIInitiatorInfoViaDHCP": true, "iSCSIInitiatorIpAddress": "0.0.0.0", "iSCSIInitiatorNetmask": "0.0.0.0", "iSCSIIpAddressType": "IPv4", "iSCSILUN": "0", "iSCSINicSource": null, "iSCSIReverseChapSecret": null, "iSCSIReverseChapUsername": null, "iSCSITargetInfoViaDHCP": true, "iSCSITargetIpAddress": "0.0.0.0", "iSCSITargetName": "", "iSCSITargetTcpPort": 3260 }, { "StructuredBootString": null, "UEFIDevicePath": null, "iSCSIAttemptInstance": 0, "iSCSIAttemptName": "", "iSCSIAuthenticationMethod": "None", "iSCSIChapSecret": null, "iSCSIChapType": "OneWay", "iSCSIChapUsername": null, "iSCSIConnectRetry": 3, "iSCSIConnectTimeoutMS": 20000, "iSCSIConnection": "Disabled", "iSCSIInitiatorGateway": "0.0.0.0", "iSCSIInitiatorInfoViaDHCP": true, "iSCSIInitiatorIpAddress": "0.0.0.0", "iSCSIInitiatorNetmask": "0.0.0.0", "iSCSIIpAddressType": "IPv4", "iSCSILUN": "0", "iSCSINicSource": null, "iSCSIReverseChapSecret": null, "iSCSIReverseChapUsername": null, "iSCSITargetInfoViaDHCP": true, "iSCSITargetIpAddress": "0.0.0.0", "iSCSITargetName": "", "iSCSITargetTcpPort": 3260 }, { "StructuredBootString": null, "UEFIDevicePath": null, "iSCSIAttemptInstance": 0, "iSCSIAttemptName": "", "iSCSIAuthenticationMethod": "None", "iSCSIChapSecret": null, "iSCSIChapType": "OneWay", "iSCSIChapUsername": null, "iSCSIConnectRetry": 3, "iSCSIConnectTimeoutMS": 20000, "iSCSIConnection": "Disabled", "iSCSIInitiatorGateway": "0.0.0.0", "iSCSIInitiatorInfoViaDHCP": true, "iSCSIInitiatorIpAddress": "0.0.0.0", "iSCSIInitiatorNetmask": "0.0.0.0", "iSCSIIpAddressType": "IPv4", "iSCSILUN": "0", "iSCSINicSource": null, "iSCSIReverseChapSecret": null, "iSCSIReverseChapUsername": null, "iSCSITargetInfoViaDHCP": true, "iSCSITargetIpAddress": "0.0.0.0", "iSCSITargetName": "", "iSCSITargetTcpPort": 3260 }, { "StructuredBootString": null, "UEFIDevicePath": null, "iSCSIAttemptInstance": 0, "iSCSIAttemptName": "", "iSCSIAuthenticationMethod": "None", "iSCSIChapSecret": null, "iSCSIChapType": "OneWay", "iSCSIChapUsername": null, "iSCSIConnectRetry": 3, "iSCSIConnectTimeoutMS": 20000, "iSCSIConnection": "Disabled", "iSCSIInitiatorGateway": "0.0.0.0", "iSCSIInitiatorInfoViaDHCP": true, "iSCSIInitiatorIpAddress": "0.0.0.0", "iSCSIInitiatorNetmask": "0.0.0.0", "iSCSIIpAddressType": "IPv4", "iSCSILUN": "0", "iSCSINicSource": null, "iSCSIReverseChapSecret": null, "iSCSIReverseChapUsername": null, "iSCSITargetInfoViaDHCP": true, "iSCSITargetIpAddress": "0.0.0.0", "iSCSITargetName": "", "iSCSITargetTcpPort": 3260 } ] } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/logical_drive.json0000664000175000017500000000426300000000000030433 0ustar00zuulzuul00000000000000{ "logical_drive1": { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/SmartStorage/ArrayControllers/Members/0/LogicalDrives/Members/$entity", "@odata.etag": "W/\"21D690E9\"", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/LogicalDrives/1/", "@odata.type": "#HpeSmartStorageLogicalDrive.v2_1_0.HpeSmartStorageLogicalDrive", "CapacityMiB": 953837, "Description": "HPE Smart Storage Logical Drive View", "Id": "1", "InterfaceType": "SATA", "LegacyBootPriority": "None", "Links": { "DataDrives": { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/LogicalDrives/1/DataDrives/" } }, "LogicalDriveEncryption": false, "LogicalDriveName": "019D4217PWDRE0XRH57093 7DA4", "LogicalDriveNumber": 1, "LogicalDriveType": "Data", "MediaType": "HDD", "Name": "HpeSmartStorageLogicalDrive", "Raid": "0", "Status": { "Health": "OK", "State": "Enabled" }, "StripeSizeBytes": 262144, "VolumeUniqueIdentifier": "600508B1001CC8EF62AC74E1ABD407C1" }, "logical_drive2": { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/SmartStorage/ArrayControllers/Members/0/LogicalDrives/Members/$entity", "@odata.etag": "W/\"21D690E9\"", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/LogicalDrives/1/", "@odata.type": "#HpeSmartStorageLogicalDrive.v2_1_0.HpeSmartStorageLogicalDrive", "CapacityMiB": 953837, "Description": "HPE Smart Storage Logical Drive View", "Id": "1", "InterfaceType": "SATA", "LegacyBootPriority": "None", "Links": { "DataDrives": { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/LogicalDrives/1/DataDrives/" } }, "LogicalDriveEncryption": false, "LogicalDriveName": "019D4217PWDRE0XRH57093 7DA4", "LogicalDriveNumber": 2, "LogicalDriveType": "Data", "MediaType": "HDD", "Name": "HpeSmartStorageLogicalDrive", "Raid": "1", "Status": { "Health": "OK", "State": "Enabled" }, "StripeSizeBytes": 262144, "VolumeUniqueIdentifier": "600508B1001CC8EF62AC74E1ABD407C1" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/logical_drive_collection.json0000664000175000017500000000134600000000000032645 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/SmartStorage/ArrayControllers/Members/0/LogicalDrives", "@odata.etag": "W/\"E5B74C7A\"", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/LogicalDrives/", "@odata.type": "#HpeSmartStorageLogicalDriveCollection.HpeSmartStorageLogicalDriveCollection", "Description": "HPE Smart Storage Logical Drives View", "Members": [ { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/LogicalDrives/1/" }, { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/LogicalDrives/2/" } ], "Members@odata.count": 2, "Name": "HpeSmartStorageLogicalDrives" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/logical_nvdimm.json0000664000175000017500000000372100000000000030612 0ustar00zuulzuul00000000000000{ "default": { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/Memory/Members/$entity", "@odata.etag": "W/\"5F85A795\"", "@odata.id": "/redfish/v1/Systems/1/Memory/proc1logicalnvdimm1/", "@odata.type": "#Memory.v1_1_0.Memory", "BaseModuleType": "RNVDIMM", "BusWidthBits": 72, "CapacityMiB": 32768, "DataWidthBits": 64, "DeviceLocator": "PROC 1 Logical NVDIMM 1", "ErrorCorrection": "MultiBitECC", "Id": "proc1logicalnvdimm1", "Manufacturer": "HPE ", "MemoryDeviceType": "DDR4", "MemoryLocation": null, "MemoryMedia": [ "NAND" ], "MemoryType": "NVDIMM_N", "Name": "proc1logicalnvdimm1", "Oem": { "Hpe": { "@odata.type": "#HpeMemoryExt.v2_0_0.HpeMemoryExt", "DIMMStatus": "Unknown", "MinimumVoltageVoltsX10": 12 } }, "OperatingSpeedMhz": 2400, "RankCount": 2 }, "logical_nvdimm": { "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/Memory/Members/$entity", "@odata.etag": "W/\"5E848A23\"", "@odata.id": "/redfish/v1/Systems/1/Memory/proc1logicalnvdimm1/", "@odata.type": "#Memory.v1_1_0.Memory", "BaseModuleType": "RNVDIMM", "BusWidthBits": 72, "CapacityMiB": 32768, "DataWidthBits": 64, "DeviceLocator": "PROC 1 Logical NVDIMM 1", "ErrorCorrection": "MultiBitECC", "Id": "proc1logicalnvdimm1", "Manufacturer": "HPE ", "MemoryDeviceType": "Logical", "MemoryLocation": null, "MemoryMedia": [ "Proprietary" ], "MemoryType": "NVDIMM_N", "Name": "proc1logicalnvdimm1", "Oem": { "Hpe": { "@odata.type": "#HpeMemoryExt.v2_0_0.HpeMemoryExt", "Armed": false, "DIMMStatus": "Unknown", "MinimumVoltageVoltsX10": 12, "ProductName": "HPE Scalable Persistent Memory", "RelatedPowerBackupUnitBays": [ 1, 2 ] } }, "OperatingSpeedMhz": 2400, "RankCount": 2, "Status": { "Health": "OK", "State": "Enabled" } } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/manager.json0000664000175000017500000001476500000000000027252 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#Managers/Members/$entity", "@odata.etag": "W/\"FD28A1E2\"", "@odata.id": "/redfish/v1/Managers/1/", "@odata.type": "#Manager.v1_1_0.Manager", "Actions": { "#Manager.Reset": { "target": "/redfish/v1/Managers/1/Actions/Manager.Reset/" } }, "CommandShell": { "ConnectTypesSupported": [ "SSH", "Oem" ], "MaxConcurrentSessions": 9, "ServiceEnabled": true }, "EthernetInterfaces": { "@odata.id": "/redfish/v1/Managers/1/EthernetInterfaces/" }, "FirmwareVersion": "iLO 5 v1.15", "GraphicalConsole": { "ConnectTypesSupported": [ "KVMIP" ], "MaxConcurrentSessions": 10, "ServiceEnabled": true }, "Id": "1", "Links": { "ManagerForChassis": [ { "@odata.id": "/redfish/v1/Chassis/1/" } ], "ManagerForServers": [ { "@odata.id": "/redfish/v1/Systems/1/" } ], "ManagerInChassis": { "@odata.id": "/redfish/v1/Chassis/1/" } }, "LogServices": { "@odata.id": "/redfish/v1/Managers/1/LogServices/" }, "ManagerType": "BMC", "Name": "Manager", "NetworkProtocol": { "@odata.id": "/redfish/v1/Managers/1/NetworkService/" }, "Oem": { "Hpe": { "@odata.type": "#HpeiLO.v2_1_0.HpeiLO", "Actions": { "#HpeiLO.ClearRestApiState": { "target": "/redfish/v1/Managers/1/Actions/Oem/Hpe/HpeiLO.ClearRestApiState/" }, "#HpeiLO.DisableiLOFunctionality": { "target": "/redfish/v1/Managers/1/Actions/Oem/Hpe/HpeiLO.DisableiLOFunctionality/" }, "#HpeiLO.ResetToFactoryDefaults": { "ResetType@Redfish.AllowableValues": [ "Default" ], "target": "/redfish/v1/Managers/1/Actions/Oem/Hpe/HpeiLO.ResetToFactoryDefaults/" } }, "ClearRestApiStatus": "DataPresent", "ConfigurationSettings": "Current", "FederationConfig": { "IPv6MulticastScope": "Site", "MulticastAnnouncementInterval": 600, "MulticastDiscovery": "Enabled", "MulticastTimeToLive": 5, "iLOFederationManagement": "Enabled" }, "Firmware": { "Current": { "Date": "Jun 05 2017", "DebugBuild": false, "MajorVersion": 1, "MinorVersion": 15, "VersionString": "iLO 5 v1.15" } }, "FrontPanelUSB": { "State": "Ready" }, "IdleConnectionTimeoutMinutes": 30, "License": { "LicenseKey": "XXXXX-XXXXX-XXXXX-XXXXX-456N6", "LicenseString": "iLO Advanced limited-distribution test", "LicenseType": "Internal" }, "Links": { "ActiveHealthSystem": { "@odata.id": "/redfish/v1/Managers/1/ActiveHealthSystem/" }, "DateTimeService": { "@odata.id": "/redfish/v1/Managers/1/DateTime/" }, "EmbeddedMediaService": { "@odata.id": "/redfish/v1/Managers/1/EmbeddedMedia/" }, "FederationDispatch": { "extref": "/dispatch" }, "FederationGroups": { "@odata.id": "/redfish/v1/Managers/1/FederationGroups/" }, "FederationPeers": { "@odata.id": "/redfish/v1/Managers/1/FederationPeers/" }, "LicenseService": { "@odata.id": "/redfish/v1/Managers/1/LicenseService/" }, "SecurityService": { "@odata.id": "/redfish/v1/Managers/1/SecurityService/" }, "Thumbnail": { "extref": "/images/thumbnail.bmp" }, "VSPLogLocation": { "extref": "/sol.log.gz" } }, "PersistentMouseKeyboardEnabled": false, "RIBCLEnabled": true, "RequiredLoginForiLORBSU": false, "SerialCLISpeed": 9600, "SerialCLIStatus": "EnabledAuthReq", "VSPDlLoggingEnabled": false, "VSPLogDownloadEnabled": false, "WebGuiEnabled": true, "iLOFunctionalityRequired": false, "iLORBSUEnabled": true, "iLOSelfTestResults": [ { "Notes": "", "SelfTestName": "NVRAMData", "Status": "OK" }, { "Notes": "Controller firmware revision 2.10.00 ", "SelfTestName": "EmbeddedFlash", "Status": "OK" }, { "Notes": "", "SelfTestName": "HostRom", "Status": "OK" }, { "Notes": "", "SelfTestName": "SupportedHost", "Status": "OK" }, { "Notes": "Version 1.0.2", "SelfTestName": "PowerManagementController", "Status": "Informational" }, { "Notes": "ProLiant DL180 Gen10 System Programmable Logic Device 0x07", "SelfTestName": "CPLDPAL0", "Status": "Informational" } ], "iLOServicePort": { "MassStorageAuthenticationRequired": false, "USBEthernetAdaptersEnabled": true, "USBFlashDriveEnabled": true, "iLOServicePortEnabled": true } } }, "SerialConsole": { "ConnectTypesSupported": [ "SSH", "IPMI", "Oem" ], "MaxConcurrentSessions": 13, "ServiceEnabled": true }, "Status": { "State": "Enabled" }, "UUID": null, "VirtualMedia": { "@odata.id": "/redfish/v1/Managers/1/VirtualMedia/" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/memory_collection.json0000664000175000017500000000217700000000000031355 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/Memory", "@odata.etag": "W/\"2DFCC95B\"", "@odata.id": "/redfish/v1/Systems/1/Memory/", "@odata.type": "#MemoryCollection.MemoryCollection", "Description": "Memory DIMM Collection", "Members": [ { "@odata.id": "/redfish/v1/Systems/1/Memory/proc1logicalnvdimm1/" } ], "Members@odata.count": 1, "Name": "Memory DIMM Collection", "Oem": { "Hpe": { "@odata.type": "#HpeAdvancedMemoryProtection.v2_0_0.HpeAdvancedMemoryProtection", "AmpModeActive": "AdvancedECC", "AmpModeStatus": "AdvancedECC", "AmpModeSupported": [ "AdvancedECC", "OnlineSpareRank", "IntrasocketMirroring", "A3DC" ], "MemoryList": [ { "BoardCpuNumber": 1, "BoardNumberOfSockets": 12 }, { "BoardCpuNumber": 2, "BoardNumberOfSockets": 12 } ] } } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/pci_device.json0000664000175000017500000000150100000000000027712 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/PCIDevices/Members/$entity", "@odata.etag": "W/\"33150E20\"", "@odata.id": "/redfish/v1/Systems/1/PCIDevices/1/", "@odata.type": "#HpeServerPciDevice.v2_0_0.HpeServerPciDevice", "BusNumber": 2, "ClassCode": 2, "DeviceID": 5719, "DeviceInstance": 1, "DeviceLocation": "Embedded", "DeviceNumber": 0, "DeviceSubInstance": 1, "DeviceType": "Embedded LOM", "FunctionNumber": 0, "Id": "1", "LocationString": "Embedded LOM 1", "Name": "HPE Ethernet 1Gb 4-port 331i Adapter - NIC", "SegmentNumber": 0, "StructuredName": "NIC.LOM.1.1", "SubclassCode": 0, "SubsystemDeviceID": 8894, "SubsystemVendorID": 4156, "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x0)/Pci(0x0,0x0)", "VendorID": 5348 } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/pci_device1.json0000664000175000017500000000146300000000000030002 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/PCIDevices/Members/$entity", "@odata.etag": "W/\"5ABCB1B9\"", "@odata.id": "/redfish/v1/Systems/1/PCIDevices/6/", "@odata.type": "#HpeServerPciDevice.v2_0_0.HpeServerPciDevice", "BusNumber": 1, "ClassCode": 3, "DeviceID": 1336, "DeviceInstance": 1, "DeviceLocation": "Embedded", "DeviceNumber": 0, "DeviceSubInstance": 1, "DeviceType": "Video", "FunctionNumber": 1, "Id": "6", "LocationString": "Embedded Video Controller", "Name": "Embedded Video Controller", "SegmentNumber": 0, "StructuredName": "PCI.Emb.1.1", "SubclassCode": 0, "SubsystemDeviceID": 228, "SubsystemVendorID": 5520, "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x1)", "VendorID": 4139 } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/pci_device2.json0000664000175000017500000000140700000000000030001 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/PCIDevices/Members/$entity", "@odata.etag": "W/\"33150E20\"", "@odata.id": "/redfish/v1/Systems/1/PCIDevices/1/", "@odata.type": "#HpeServerPciDevice.v2_0_0.HpeServerPciDevice", "BusNumber": 2, "ClassCode": 2, "DeviceID": 5719, "DeviceInstance": 1, "DeviceLocation": "Embedded", "DeviceNumber": 0, "DeviceSubInstance": 1, "DeviceType": "Embedded LOM", "FunctionNumber": 0, "Id": "1", "LocationString": "Embedded LOM 1", "SegmentNumber": 0, "StructuredName": "NIC.LOM.1.1", "SubclassCode": 0, "SubsystemDeviceID": 8894, "SubsystemVendorID": 4156, "UEFIDevicePath": "PciRoot(0x0)/Pci(0x1C,0x0)/Pci(0x0,0x0)", "VendorID": 5348 } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/pci_device_collection.json0000664000175000017500000000077300000000000032137 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/PCIDevices", "@odata.etag": "W/\"9975C252\"", "@odata.id": "/redfish/v1/Systems/1/PCIDevices/", "@odata.type": "#HpeServerPciDeviceCollection.HpeServerPciDeviceCollection", "Description": " PciDevices view", "Members": [ { "@odata.id": "/redfish/v1/Systems/1/PCIDevices/1/" }, { "@odata.id": "/redfish/v1/Systems/1/PCIDevices/6/" } ], "Members@odata.count": 2, "Name": "PciDevices" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/root.json0000664000175000017500000000545400000000000026616 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#ServiceRoot", "@odata.etag": "W/\"06F9101D\"", "@odata.id": "/redfish/v1/", "@odata.type": "#ServiceRoot.v1_1_0.ServiceRoot", "AccountService": { "@odata.id": "/redfish/v1/AccountService/" }, "Chassis": { "@odata.id": "/redfish/v1/Chassis/" }, "EventService": { "@odata.id": "/redfish/v1/EventService/" }, "Id": "v1", "JsonSchemas": { "@odata.id": "/redfish/v1/Schemas/" }, "Links": { "Sessions": { "@odata.id": "/redfish/v1/SessionService/Sessions/" } }, "Managers": { "@odata.id": "/redfish/v1/Managers/" }, "Name": "HPE RESTful Root Service", "Oem": { "Hpe": { "@odata.type": "#HpeiLOServiceExt.v2_0_0.HpeiLOServiceExt", "Links": { "ResourceDirectory": { "@odata.id": "/redfish/v1/ResourceDirectory/" }, "ViewClassService": { "@odata.id": "/redfish/v1/Views/" } }, "Manager": [ { "DefaultLanguage": "en", "FQDN": "ILO.asiapacific.hpqcorp.net", "HostName": "ILO", "Languages": [ { "Language": "en", "TranslationName": "English", "Version": "1.10" } ], "ManagerFirmwareVersion": "1.10", "ManagerType": "iLO 5" } ], "Sessions": { "CertCommonName": "ILO.asiapacific.hpqcorp.net", "CertificateLoginEnabled": false, "KerberosEnabled": false, "LDAPAuthLicenced": true, "LDAPEnabled": false, "LocalLoginEnabled": true, "LoginFailureDelay": 0, "LoginHint": { "Hint": "POST to /Sessions to login using the following JSON object:", "HintPOSTData": { "Password": "password", "UserName": "username" } }, "SecurityOverride": false, "ServerName": "" }, "Time": "2017-03-30T12:13:38Z" } }, "RedfishVersion": "1.0.0", "Registries": { "@odata.id": "/redfish/v1/Registries/" }, "SessionService": { "@odata.id": "/redfish/v1/SessionService/" }, "Systems": { "@odata.id": "/redfish/v1/Systems/" }, "UUID": "7704b47b-2fbe-5920-99a5-b766dd84cc28", "UpdateService": { "@odata.id": "/redfish/v1/UpdateService/" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/secure_boot.json0000664000175000017500000000141600000000000030136 0ustar00zuulzuul00000000000000{ "default": { "@odata.context": "/redfish/v1/$metadata#Systems/1/SecureBoot", "@odata.id": "/redfish/v1/Systems/1/SecureBoot", "@odata.type": "#SecureBoot.v1_0_0.SecureBoot", "Id": "SecureBoot", "Name": "UEFI Secure Boot", "Actions": { "#SecureBoot.ResetKeys": { "target": "/redfish/v1/Systems/1/SecureBoot/Actions/SecureBoot.ResetKeys", "ResetKeysType@Redfish.AllowableValues": [ "ResetAllKeysToDefault", "DeleteAllKeys", "DeletePK" ] }, "Oem": {} }, "SecureBootEnable": false, "SecureBootCurrentBoot": "Disabled", "SecureBootMode": "UserMode" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/security_dashboard.json0000664000175000017500000000100300000000000031473 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#HpeiLOSecurityDashboard.HpeiLOSecurityDashboard", "@odata.etag": "W/\"543055B3\"", "@odata.id": "/redfish/v1/Managers/1/SecurityService/SecurityDashboard", "@odata.type": "#HpeiLOSecurityDashboard.v1_0_0.HpeiLOSecurityDashboard", "Id": "SecurityDashboard", "OverallSecurityStatus": "Risk", "SecurityParameters": { "@odata.id": "/redfish/v1/Managers/1/SecurityService/SecurityDashboard/SecurityParams" }, "ServerConfigurationLockStatus": "Disabled" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/security_param.json0000664000175000017500000000061500000000000030654 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#HpeiLOSecurityParam.HpeiLOSecurityParam", "@odata.etag": "W/\"A3A6BF43\"", "@odata.id": "/redfish/v1/Managers/1/SecurityService/SecurityDashboard/SecurityParams/0", "@odata.type": "#HpeiLOSecurityParam.v1_0_0.HpeiLOSecurityParam", "Id": "0", "Ignore": false, "Name": "Security Override Switch", "SecurityStatus": "Ok", "State": "Off" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/security_param1.json0000664000175000017500000000061400000000000030734 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#HpeiLOSecurityParam.HpeiLOSecurityParam", "@odata.etag": "W/\"A3A6BF43\"", "@odata.id": "/redfish/v1/Managers/1/SecurityService/SecurityDashboard/SecurityParams/1", "@odata.type": "#HpeiLOSecurityParam.v1_0_0.HpeiLOSecurityParam", "Id": "1", "Ignore": false, "Name": "IPMI/DCMI Over LAN", "SecurityStatus": "Ok", "State": "Disabled" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/security_params_collection.json0000664000175000017500000000121600000000000033250 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#HpeiLOSecurityParamCollection.HpeiLOSecurityParamCollection", "@odata.etag": "W/\"1E796226\"", "@odata.id": "/redfish/v1/Managers/1/SecurityService/SecurityDashboard/SecurityParams", "@odata.type": "#HpeiLOSecurityParamCollection.HpeiLOSecurityParamCollection", "Description": "iLO Security Parameter Collection", "Name": "Security Parameter Collection", "Members": [{ "@odata.id": "/redfish/v1/Managers/1/SecurityService/SecurityDashboard/SecurityParams/0" }, { "@odata.id": "/redfish/v1/Managers/1/SecurityService/SecurityDashboard/SecurityParams/1" }], "Members@odata.count": 2 } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/security_service.json0000664000175000017500000000276200000000000031221 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#HpeSecurityService.HpeSecurityService", "@odata.etag": "W/\"B61FA0F1\"", "@odata.id": "/redfish/v1/Managers/1/SecurityService", "@odata.type": "#HpeSecurityService.v2_2_0.HpeSecurityService", "Id": "SecurityService", "CurrentCipher": "ECDHE-RSA-AES256-GCM-SHA384", "Links": { "ESKM": { "@odata.id": "/redfish/v1/Managers/1/SecurityService/ESKM" }, "HttpsCert": { "@odata.id": "/redfish/v1/Managers/1/SecurityService/HttpsCert" }, "SSO": { "@odata.id": "/redfish/v1/Managers/1/SecurityService/SSO" }, "SecurityDashboard": { "@odata.id": "/redfish/v1/Managers/1/SecurityService/SecurityDashboard" }, "SecurityParams": { "@odata.id": "/redfish/v1/Managers/1/SecurityService/SecurityDashboard/SecurityParams" }, "CertAuth": { "@odata.id": "/redfish/v1/Managers/1/SecurityService/CertificateAuthentication" } }, "LoginSecurityBanner": { "IsEnabled": false }, "SSHHostKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQEv+Fv4xLYjuKRS30nhqHVasE/PXiEKN12mdZQA97K4yJY+9lHqFJOt82mUelHLnO4fvWuqdML4LeiXo6LI2EJBR83hE4jjsPmKS7ZBa3I6PI3KF8CiBN4mFaSdcTEA/ZYZFKwVcQgOox3Hu1TYu2b41bAofKl1f5ZBBmZ/ZGnoeGsq4PNFqj/xtVAOdj+rqYnuK8yNzetl+WXiMF7/lmFKuuKLoM0GfY7nQjSSlu+XwZhUflQYiKHHfq0gl+I3u8KbNaNbHjHMjQVPYSzaRRkR9F2M8N2bqR47EzAC3qOt3SMBCt4ka+87dIS54ji6dC3uk+xRqJv2kuREyELqlV", "SecurityState": "Production", "SecurityState@Redfish.AllowableValues": ["Production", "HighSecurity", "FIPS"] } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/simple_storage.json0000664000175000017500000000226000000000000030640 0ustar00zuulzuul00000000000000{ "@odata.type": "#SimpleStorage.v1_0_2.SimpleStorage", "Id": "1", "Name": "Simple Storage Controller", "Description": "System SATA", "UefiDevicePath": "Acpi(PNP0A03,0)/Pci(1F|1)/Ata(Primary,Master)/HD(Part3, Sig00110011)", "Status": { "State": "Enabled", "Health": "OK", "HealthRollup": "Warning" }, "Devices": [{ "Name": "SATA Bay 1", "Manufacturer": "Contoso", "Model": "3000GT8", "CapacityBytes": 8000000000000, "Status": { "State": "Enabled", "Health": "OK" } }, { "Name": "SATA Bay 2", "Manufacturer": "Contoso", "Model": "3000GT7", "CapacityBytes": 4000000000000, "Status": { "State": "Enabled", "Health": "Degraded" } }, { "Name": "SATA Bay 3", "Status": { "State": "Absent" } }, { "Name": "SATA Bay 4", "Status": { "State": "Absent" } }], "@odata.context": "/redfish/v1/$metadata#SimpleStorage.SimpleStorage", "@odata.id": "/redfish/v1/Systems/437XR1138R2/SimpleStorage/1" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/simple_storage_collection.json0000664000175000017500000000062300000000000033054 0ustar00zuulzuul00000000000000{ "@odata.type": "#SimpleStorageCollection.SimpleStorageCollection", "Name": "Simple Storage Collection", "Members@odata.count": 1, "Members": [{ "@odata.id": "/redfish/v1/Systems/437XR1138R2/SimpleStorage/1" }], "@odata.context": "/redfish/v1/$metadata#SimpleStorageCollection.SimpleStorageCollection", "@odata.id": "/redfish/v1/Systems/437XR1138R2/SimpleStorage" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/smart_storage.json0000664000175000017500000000120700000000000030475 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#Systems/Members/1/SmartStorage$entity", "@odata.etag": "W/\"D9735974\"", "@odata.id": "/redfish/v1/Systems/1/SmartStorage/", "@odata.type": "#HpeSmartStorage.v2_0_0.HpeSmartStorage", "Description": "HPE Smart Storage", "Id": "SmartStorage", "Links": { "ArrayControllers": { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/ArrayControllers/" }, "HostBusAdapters": { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/HostBusAdapters/" } }, "Name": "HpeSmartStorage", "Status": { "Health": "OK" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/smart_storage_config.json0000664000175000017500000000525200000000000032026 0ustar00zuulzuul00000000000000{ "@Redfish.Settings": { "@odata.type": "#Settings.v1_0_0.Settings", "ETag": "78F92741", "Messages": [ { "MessageId": "SmartStorageMessages.2.0.0.Success" } ], "SettingsObject": { "@odata.id": "/redfish/v1/systems/1/smartstorageconfig/settings/" }, "Time": "2017-10-31T12:12:35+00:00" }, "@odata.context": "/redfish/v1/$metadata#SmartStorageConfig.SmartStorageConfig", "@odata.etag": "W/\"90107B96DAE4060606D29991827C7EF7\"", "@odata.id": "/redfish/v1/systems/1/smartstorageconfig/", "@odata.type": "#SmartStorageConfig.v2_0_0.SmartStorageConfig", "CurrentParallelSurfaceScanCount": null, "DataGuard": "Strict", "DegradedPerformanceOptimization": null, "DriveWriteCache": null, "ElevatorSort": null, "EncryptionConfiguration": "None", "EncryptionEULA": null, "ExpandPriority": null, "FlexibleLatencySchedulerSetting": null, "Id": "smartstorageconfig", "InconsistencyRepairPolicy": null, "Location": "Slot 0", "LocationFormat": "PCISlot", "LogicalDrives": [ { "Accelerator": "ControllerCache", "BlockSizeBytes": 512, "CapacityBlocks": 4688319664, "CapacityGiB": 2235, "DataDrives": [ "2I:1:2", "2I:1:1" ], "DriveLocationFormat": "ControllerPort:Box:Bay", "LegacyBootPriority": "None", "LogicalDriveName": "01A27294PFJHD0ARCA218H 63E0", "LogicalDriveNumber": 1, "ParityGroupCount": 0, "Raid": "Raid0", "SpareDrives": [], "SpareRebuildMode": null, "StripSizeBytes": 262144, "StripeSizeBytes": 524288, "VolumeUniqueIdentifier": "600508B1001C045A9BAAC9F4F49498AE" } ], "MonitorAndPerformanceAnalysisDelaySeconds": null, "NoBatteryWriteCache": null, "Oem": { "Hpe": { "@odata.type": "#HpeBiosExt.v2_0_0.HpeBiosExt", "SettingsObject": { "UnmodifiedETag": "W/\"1BBCED8C1E405050504A92724569294F\"" } } }, "PhysicalDrives": [ { "LegacyBootPriority": "None", "Location": "1I:1:2", "LocationFormat": "ControllerPort:Box:Bay" } ], "Ports": [ { "OperatingModeAfterReboot": "Mixed", "PortIndex": 0 } ], "PowerModeAfterReboot": "MaxPerformance", "PredictiveSpareRebuild": null, "QueueDepth": null, "ReadCachePercent": null, "RebuildPriority": null, "SurfaceScanAnalysisDelaySeconds": null, "SurfaceScanAnalysisPriority": null, "SurvivalPowerMode": "Enabled", "WriteCacheBypassThresholdKiB": null } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/storage.json0000664000175000017500000000350200000000000027267 0ustar00zuulzuul00000000000000{ "@odata.type": "#Storage.v1_1_0.Storage", "Id": "1", "Name": "Local Storage Controller", "Description": "Integrated RAID Controller", "Status": { "State": "Enabled", "Health": "OK", "HealthRollup": "OK" }, "StorageControllers": [{ "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1#/StorageControllers/0", "@odata.type": "#Storage.v1_0_0.StorageController", "Id": "0", "Name": "Contoso Integrated RAID", "Description": "Contoso Integrated RAID", "Status": { "State": "Enabled", "Health": "OK" }, "Identifiers": [{ "DurableNameFormat": "NAA", "DurableName": "345C59DBD970859C" }], "Manufacturer": "Contoso", "Model": "12Gbs Integrated RAID", "SerialNumber": "2M220100SL", "PartNumber": "CT18754", "SpeedGbps": 12, "FirmwareVersion": "1.0.0.7", "SupportedControllerProtocols": [ "PCIe" ], "SupportedDeviceProtocols": [ "SAS", "SATA" ] }], "Drives": [{ "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Drives/35D38F11ACEF7BD3" }, { "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Drives/3F5A8C54207B7233" }, { "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Drives/3F5A8C54207B7234" }], "Volumes": { "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes" }, "Links": {}, "Actions": { "#Storage.SetEncryptionKey": { "Target": "/redfish/v1/Systems/437XR1138R2/Storage/1/Actions/Storage.SetEncryptionKey" } }, "@odata.context": "/redfish/v1/$metadata#Storage.Storage", "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/storage_collection.json0000664000175000017500000000055000000000000031502 0ustar00zuulzuul00000000000000{ "@odata.type": "#StorageCollection.StorageCollection", "Name": "Storage Collection", "Members@odata.count": 1, "Members": [{ "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1" }], "@odata.context": "/redfish/v1/$metadata#StorageCollection.StorageCollection", "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/system.json0000664000175000017500000003623600000000000027161 0ustar00zuulzuul00000000000000{ "default": { "@odata.context": "/redfish/v1/$metadata#Systems/Members/$entity", "@odata.etag": "W/\"0E79655D\"", "@odata.id": "/redfish/v1/Systems/1/", "@odata.type": "#ComputerSystem.v1_2_0.ComputerSystem", "Actions": { "#ComputerSystem.Reset": { "ResetType@Redfish.AllowableValues": [ "On", "ForceOff", "ForceRestart", "Nmi", "PushPowerButton" ], "target": "/redfish/v1/Systems/1/Actions/ComputerSystem.Reset/" } }, "AssetTag": "", "Bios": { "@odata.id": "/redfish/v1/systems/1/bios/" }, "BiosVersion": "U31 v1.00 (03/11/2017)", "Boot": { "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideMode": "UEFI", "BootSourceOverrideTarget": "None", "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Cd", "Hdd", "Usb", "SDCard", "Utilities", "Diags", "BiosSetup", "Pxe", "UefiShell", "UefiHttp", "UefiTarget" ], "UefiTargetBootSourceOverride": "None", "UefiTargetBootSourceOverride@Redfish.AllowableValues": [ "HD(1,GPT,7F14DF43-6600-420A-9950-C028836F6A5D,0x800,0x64000)/\\EFI\\centos\\shim.efi", "UsbClass(0xFFFF,0xFFFF,0xFF,0xFF,0xFF)", "PciRoot(0x0)/Pci(0x17,0x0)/Sata(0x3,0x0,0x0)" ] }, "EthernetInterfaces": { "@odata.id": "/redfish/v1/Systems/1/EthernetInterfaces/" }, "HostName": "", "Id": "1", "IndicatorLED": "Off", "Links": { "Chassis": [ { "@odata.id": "/redfish/v1/Chassis/1/" } ], "ManagedBy": [ { "@odata.id": "/redfish/v1/Managers/1/" } ] }, "LogServices": { "@odata.id": "/redfish/v1/Systems/1/LogServices/" }, "Manufacturer": "HPE", "Memory": { "@odata.id": "/redfish/v1/Systems/1/Memory/" }, "MemorySummary": { "Status": { "HealthRollup": "OK" }, "TotalSystemMemoryGiB": 8 }, "Model": "ProLiant DL180 Gen10", "Name": "Computer System", "Oem": { "Hpe": { "@odata.type": "#HpeComputerSystemExt.v2_1_0.HpeComputerSystemExt", "Actions": { "#HpeComputerSystemExt.PowerButton": { "PushType@Redfish.AllowableValues": [ "Press", "PressAndHold" ], "target": "/redfish/v1/Systems/1/Actions/Oem/Hpe/HpeComputerSystemExt.PowerButton/" }, "#HpeComputerSystemExt.SystemReset": { "ResetType@Redfish.AllowableValues": [ "ColdBoot" ], "target": "/redfish/v1/Systems/1/Actions/Oem/Hpe/HpeComputerSystemExt.SystemReset/" }, "#HpeComputerSystemExt.SecureSystemErase": { "target": "/redfish/v1/Systems/1/Actions/Oem/Hpe/HpeComputerSystemExt.SecureSystemErase" } }, "SmartStorageConfig": [ { "@odata.id": "/redfish/v1/systems/1/smartstorageconfig/" } ], "AggregateHealthStatus": { "AgentlessManagementService": "Unavailable", "BiosOrHardwareHealth": { "Status": { "Health": "OK" } }, "FanRedundancy": "Redundant", "Fans": { "Status": { "Health": "OK" } }, "Memory": { "Status": { "Health": "OK" } }, "PowerSupplies": { "PowerSuppliesMismatch": false, "Status": { "Health": "OK" } }, "Processors": { "Status": { "Health": "OK" } }, "Storage": { "Status": { "Health": "OK" } }, "Temperatures": { "Status": { "Health": "OK" } } }, "Bios": { "Backup": { "Date": "03/11/2017", "Family": "U31", "VersionString": "U31 v1.00 (03/11/2017)" }, "Current": { "Date": "03/11/2017", "Family": "U31", "VersionString": "U31 v1.00 (03/11/2017)" }, "UefiClass": 2 }, "DeviceDiscoveryComplete": { "AMSDeviceDiscovery": "NoAMS", "DeviceDiscovery": "DataIncomplete", "SmartArrayDiscovery": "Complete" }, "EndOfPostDelaySeconds": null, "Links": { "NetworkAdapters": { "@odata.id": "/redfish/v1/Systems/1/NetworkAdapters/" }, "PCIDevices": { "@odata.id": "/redfish/v1/Systems/1/PCIDevices/" }, "PCISlots": { "@odata.id": "/redfish/v1/Systems/1/PCISlots/" }, "SmartStorage": { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/" }, "USBPorts": { "@odata.id": "/redfish/v1/Systems/1/USBPorts/" } }, "PCAPartNumber": "", "PCASerialNumber": "847012-001", "PostDiscoveryCompleteTimeStamp": "2017-03-13T11:11:48Z", "PostDiscoveryMode": null, "PostMode": null, "PostState": "FinishedPost", "PowerAllocationLimit": 500, "PowerAutoOn": "Restore", "PowerOnDelay": "Minimum", "PowerRegulatorMode": "Dynamic", "PowerRegulatorModesSupported": [ "OSControl", "Dynamic", "Max", "Min" ], "SMBIOS": { "extref": "/smbios" }, "VirtualProfile": "Inactive" } }, "PowerState": "On", "ProcessorSummary": { "Count": 2, "Model": "Intel(R) Genuine processor", "Status": { "HealthRollup": "OK" } }, "Processors": { "@odata.id": "/redfish/v1/Systems/1/Processors/" }, "SKU": " ", "SecureBoot": { "@odata.id": "/redfish/v1/Systems/1/SecureBoot/" }, "SimpleStorage": { "@odata.id": "/redfish/v1/Systems/1/SimpleStorage/" }, "SerialNumber": " ", "Status": { "Health": "OK", "State": "Enabled" }, "Storage": { "@odata.id": "/redfish/v1/Systems/1/Storage/" }, "SystemType": "Physical", "TrustedModules": [ { "Status": { "State": "Absent" } } ], "UUID": "00000000-0000-0000-0000-000000000000" }, "System_for_oem_ethernet_interfaces":{ "@odata.context": "/redfish/v1/$metadata#Systems/Members/$entity", "@odata.etag": "W/\"0E79655D\"", "@odata.id": "/redfish/v1/Systems/1/", "@odata.type": "#ComputerSystem.v1_2_0.ComputerSystem", "Actions": { "#ComputerSystem.Reset": { "ResetType@Redfish.AllowableValues": [ "On", "ForceOff", "ForceRestart", "Nmi", "PushPowerButton" ], "target": "/redfish/v1/Systems/1/Actions/ComputerSystem.Reset/" } }, "AssetTag": "", "Bios": { "@odata.id": "/redfish/v1/systems/1/bios/" }, "BiosVersion": "U31 v1.00 (03/11/2017)", "Boot": { "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideMode": "UEFI", "BootSourceOverrideTarget": "None", "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Cd", "Hdd", "Usb", "SDCard", "Utilities", "Diags", "BiosSetup", "Pxe", "UefiShell", "UefiHttp", "UefiTarget" ], "UefiTargetBootSourceOverride": "None", "UefiTargetBootSourceOverride@Redfish.AllowableValues": [ "HD(1,GPT,7F14DF43-6600-420A-9950-C028836F6A5D,0x800,0x64000)/\\EFI\\centos\\shim.efi", "UsbClass(0xFFFF,0xFFFF,0xFF,0xFF,0xFF)", "PciRoot(0x0)/Pci(0x17,0x0)/Sata(0x3,0x0,0x0)" ] }, "HostName": "", "Id": "1", "Model": "ProLiant DL180 Gen10", "Oem": { "Hpe": { "@odata.type": "#HpeComputerSystemExt.v2_1_0.HpeComputerSystemExt", "Actions": { "#HpeComputerSystemExt.PowerButton": { "PushType@Redfish.AllowableValues": [ "Press", "PressAndHold" ], "target": "/redfish/v1/Systems/1/Actions/Oem/Hpe/HpeComputerSystemExt.PowerButton/" }, "#HpeComputerSystemExt.SystemReset": { "ResetType@Redfish.AllowableValues": [ "ColdBoot" ], "target": "/redfish/v1/Systems/1/Actions/Oem/Hpe/HpeComputerSystemExt.SystemReset/" } }, "Links": { "EthernetInterfaces": { "@odata.id": "/redfish/v1/Systems/1/EthernetInterfaces/" }, "SmartStorage": { "@odata.id": "/redfish/v1/Systems/1/SmartStorage/" } } } } }, "System_op_for_one_time_boot_cdrom": { "@odata.context": "/redfish/v1/$metadata#Systems/Members/$entity", "@odata.etag": "W/\"0E79655D\"", "@odata.id": "/redfish/v1/Systems/1/", "@odata.type": "#ComputerSystem.v1_2_0.ComputerSystem", "Actions": { "#ComputerSystem.Reset": { "ResetType@Redfish.AllowableValues": [ "On", "ForceOff", "ForceRestart", "Nmi", "PushPowerButton" ], "target": "/redfish/v1/Systems/1/Actions/ComputerSystem.Reset/" } }, "HostName": "", "Id": "1", "IndicatorLED": "Off", "Manufacturer": "HPE", "Name": "Computer System", "PowerState": "On", "Boot": { "BootSourceOverrideEnabled": "Once", "BootSourceOverrideMode": "UEFI", "BootSourceOverrideTarget": "Cd", "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Cd", "Hdd", "Usb", "SDCard", "Utilities", "Diags", "BiosSetup", "Pxe", "UefiShell", "UefiHttp", "UefiTarget" ], "UefiTargetBootSourceOverride": "None", "UefiTargetBootSourceOverride@Redfish.AllowableValues": [ "HD(1,GPT,4029CE09-5C2D-464D-9C2D-EC6E607F06A1,0x800,0x100000)/\\EFI\\redhat\\shim.efi", "HD(1,GPT,4029CE09-5C2D-464D-9C2D-EC6E607F06A1,0x800,0x100000)/\\EFI\\ubuntu\\shimx64.efi", "HD(1,GPT,7F14DF43-6600-420A-9950-C028836F6A5D,0x800,0x64000)/\\EFI\\centos\\shim.efi", "PciRoot(0x0)/Pci(0x17,0x0)/Sata(0x3,0x0,0x0)", "UsbClass(0xFFFF,0xFFFF,0xFF,0xFF,0xFF)" ] }, "SerialNumber": " ", "SKU": " ", "SystemType": "Physical", "UUID": "00000000-0000-0000-0000-000000000000", "MemorySummary": { "Status": { "HealthRollup": "OK" }, "TotalSystemMemoryGiB": 8 } }, "System_op_for_cdrom_persistent_boot": { "@odata.context": "/redfish/v1/$metadata#Systems/Members/$entity", "@odata.etag": "W/\"0E79655D\"", "@odata.id": "/redfish/v1/Systems/1/", "@odata.type": "#ComputerSystem.v1_2_0.ComputerSystem", "Actions": { "#ComputerSystem.Reset": { "ResetType@Redfish.AllowableValues": [ "On", "ForceOff", "ForceRestart", "Nmi", "PushPowerButton" ], "target": "/redfish/v1/Systems/1/Actions/ComputerSystem.Reset/" } }, "HostName": "", "Id": "1", "IndicatorLED": "Off", "Manufacturer": "HPE", "Name": "Computer System", "PowerState": "On", "Boot": { "BootSourceOverrideEnabled": "Continuous", "BootSourceOverrideMode": "UEFI", "BootSourceOverrideTarget": "Cd", "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Cd", "Hdd", "Usb", "SDCard", "Utilities", "Diags", "BiosSetup", "Pxe", "UefiShell", "UefiHttp", "UefiTarget" ], "UefiTargetBootSourceOverride": "None" }, "SerialNumber": " ", "SKU": " ", "SystemType": "Physical", "UUID": "00000000-0000-0000-0000-000000000000" }, "System_op_for_update_persistent_boot_uefi_target": { "@odata.context": "/redfish/v1/$metadata#Systems/Members/$entity", "@odata.etag": "W/\"0E79655D\"", "@odata.id": "/redfish/v1/Systems/1/", "@odata.type": "#ComputerSystem.v1_2_0.ComputerSystem", "Actions": { "#ComputerSystem.Reset": { "ResetType@Redfish.AllowableValues": [ "On", "ForceOff", "ForceRestart", "Nmi", "PushPowerButton" ], "target": "/redfish/v1/Systems/1/Actions/ComputerSystem.Reset/" } }, "HostName": "", "Id": "1", "IndicatorLED": "Off", "Manufacturer": "HPE", "Name": "Computer System", "PowerState": "On", "Boot": { "BootSourceOverrideEnabled": "Once", "BootSourceOverrideMode": "UEFI", "BootSourceOverrideTarget": "Cd", "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Cd", "Hdd", "Usb", "SDCard", "Utilities", "Diags", "BiosSetup", "Pxe", "UefiShell", "UefiHttp", "UefiTarget" ], "UefiTargetBootSourceOverride": "None", "UefiTargetBootSourceOverride@Redfish.AllowableValues": [ "HD(1,GPT,4029CE09-5C2D-464D-9C2D-EC6E607F06A1,0x800,0x100000)/\\EFI\\redhat\\shim.efi", "HD(1,GPT,4029CE09-5C2D-464D-9C2D-EC6E607F06A1,0x800,0x100000)/\\EFI\\ubuntu\\shimx64.efi", "HD(1,GPT,7F14DF43-6600-420A-9950-C028836F6A5D,0x800,0x64000)/\\EFI\\centos\\shim.efi", "PciRoot(0x0)/Pci(0x17,0x0)/Sata(0x3,0x0,0x0)", "PciRoot(0x3)/Pci(0x0,0x0)/Pci(0x0,0x0)/Scsi(0x0,0x0)", "PciRoot(0x0)/Pci(0x1C,0x0)/Pci(0x0,0x0)/MAC(98F2B3EEF886,0x0)/IPv4(172.17.1.32)/iSCSI(iqn.2001-04.com.paresh.boot:volume.bin,0x1,0x0,None,None,None,TCP)" ] }, "SerialNumber": " ", "SKU": " ", "SystemType": "Physical", "UUID": "00000000-0000-0000-0000-000000000000" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/tls_config.json0000664000175000017500000000520300000000000027752 0ustar00zuulzuul00000000000000 { "@Redfish.Settings": { "@odata.type": "#Settings.v1_0_0.Settings", "ETag": "", "Messages": [ { "MessageId": "Base.1.0.Success" } ], "SettingsObject": { "@odata.id": "/redfish/v1/systems/1/bios/tlsconfig/settings/" }, "Time": null }, "@odata.context": "/redfish/v1/$metadata#HpeTlsConfig.HpeTlsConfig", "@odata.etag": "W/\"32F7F4DB0288E0E0E071C693DD579D6C\"", "@odata.id": "/redfish/v1/systems/1/bios/tlsconfig/", "@odata.type": "#HpeTlsConfig.v1_0_0.HpeTlsConfig", "Certificates": [ { "FingerPrint": "1C:E7:B2:FD:9F:CB:14:EB:74:3F:EF:39:CC:81:DB:36:28:EF:D3:83:CD:B7:B3:63:7A:DB:C1:82:9A:84:A8:20", "Issuer": "C=AU, ST=Some-State, O=Internet Widgits Pty Ltd", "SerialNumber": "BD96C593395EA98", "Subject": "C=AU, ST=Some-State, O=Internet Widgits Pty Ltd", "ValidNotAfter": "02/23/2019 04:34", "ValidNotBefore": "02/23/2018 04:34" }, { "FingerPrint": "FA:3A:68:C7:7E:ED:90:21:D2:FA:3E:54:6B:0C:14:D3:2F:8D:43:50:F7:05:A7:0F:1C:68:35:DB:5C:D2:53:28", "Issuer": "C=IN, ST=Karnataka, L=Bengaluru, O=HPE, OU=BCOS, CN=Vinay Muddu, emailAddress=vinay.m.kumar@hpe.com", "SerialNumber": "92DF813625F950E5", "Subject": "C=IN, ST=Karnataka, L=Bengaluru, O=HPE, OU=BCOS, CN=Vinay Muddu, emailAddress=vinay.m.kumar@hpe.com", "ValidNotAfter": "06/08/2021 06:40", "ValidNotBefore": "06/08/2020 06:40" } ], "Ciphers": "AES128-SHA:AES256-SHA:AES128-SHA256:AES256-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384", "DeleteCertificates": [ ], "HostnameCheck": "Disabled", "Id": "tlsconfig", "Name": "TLS Current Settings", "NewCertificates": [ ], "Oem": { "Hpe": { "@odata.type": "#HpeBiosExt.v2_0_0.HpeBiosExt", "Links": { "BaseConfigs": { "@odata.id": "/redfish/v1/systems/1/bios/tlsconfig/baseconfigs/" } }, "SettingsObject": { "UnmodifiedETag": "W/\"28F385EA989AD0D0D053F745E614B9D6\"" } } }, "ProtocolVersion": "AUTO", "TlsCaCertificateCount": 0, "VerifyMode": "PEER" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/tls_config_settings.json0000664000175000017500000000437500000000000031703 0ustar00zuulzuul00000000000000 { "@Redfish.Settings": { "@odata.type": "#Settings.v1_0_0.Settings", "ETag": "C6239FAE", "Messages": [ { "MessageId": "Base.1.0.Success" } ], "SettingsObject": { "@odata.id": "/redfish/v1/systems/1/bios/tlsconfig/settings/" }, "Time": "2020-06-11T21:20:31+00:00" }, "@odata.context": "/redfish/v1/$metadata#HpeTlsConfig.HpeTlsConfig", "@odata.etag": "W/\"885481367F69969696DE63CCE9D97509\"", "@odata.id": "/redfish/v1/systems/1/bios/tlsconfig/", "@odata.type": "#HpeTlsConfig.v1_0_0.HpeTlsConfig", "Certificates": [ { "FingerPrint": "FA:3A:68:C7:7E:ED:90:21:D2:FA:3E:54:6B:0C:14:D3:2F:8D:43:50:F7:05:A7:0F:1C:68:35:DB:5C:D2:53:28", "Issuer": "C=IN, ST=Karnataka, L=Bengaluru, O=HPE, OU=BCOS, CN=Vinay Muddu, emailAddress=vinay.m.kumar@hpe.com", "SerialNumber": "92DF813625F950E5", "Subject": "C=IN, ST=Karnataka, L=Bengaluru, O=HPE, OU=BCOS, CN=Vinay Muddu, emailAddress=vinay.m.kumar@hpe.com", "ValidNotAfter": "06/08/2021 06:40", "ValidNotBefore": "06/08/2020 06:40" } ], "Ciphers": "AES128-SHA:AES256-SHA:AES128-SHA256:AES256-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384", "DeleteCertificates": [ ], "HostnameCheck": "Disabled", "Id": "tlsconfig", "Name": "TLS Current Settings", "NewCertificates": [ ], "Oem": { "Hpe": { "@odata.type": "#HpeBiosExt.v2_0_0.HpeBiosExt", "Links": { "BaseConfigs": { "@odata.id": "/redfish/v1/systems/1/bios/tlsconfig/baseconfigs/" } }, "SettingsObject": { "UnmodifiedETag": "W/\"89BE572CAA977F7F7FE56E1ADBF4F043\"" } } }, "ProtocolVersion": "AUTO", "TlsCaCertificateCount": 1, "VerifyMode": "PEER" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/update_service.json0000664000175000017500000000341000000000000030623 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#UpdateService", "@odata.etag": "W/\"505EF3C5\"", "@odata.id": "/redfish/v1/UpdateService/", "@odata.type": "#UpdateService.v1_1_0.UpdateService", "Actions": { "#UpdateService.SimpleUpdate": { "target": "/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate/" } }, "Description": "iLO Update Service", "FirmwareInventory": { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/" }, "HttpPushUri": "/cgi-bin/uploadFile", "Id": "UpdateService", "Name": "Update Service", "Oem": { "Hpe": { "@odata.type": "#HpeiLOUpdateServiceExt.v2_0_0.HpeiLOUpdateServiceExt", "Actions": { "#HpeiLOUpdateServiceExt.AddFromUri": { "target": "/redfish/v1/UpdateService/Actions/Oem/Hpe/HpeiLOUpdateServiceExt.AddFromUri/" }, "#HpeiLOUpdateServiceExt.StartFirmwareIntegrityCheck": { "target": "/redfish/v1/UpdateService/Actions/Oem/Hpe/HpeiLOUpdateServiceExt.StartFirmwareIntegrityCheck/" } }, "ComponentRepository": { "@odata.id": "/redfish/v1/UpdateService/ComponentRepository/" }, "CurrentTime": "2017-06-17T09:15:05Z", "FlashProgressPercent": 24, "InstallSets": { "@odata.id": "/redfish/v1/UpdateService/InstallSets/" }, "State": "Updating", "UpdateTaskQueue": { "@odata.id": "/redfish/v1/UpdateService/UpdateTaskQueue/" } } }, "ServiceEnabled": true, "SoftwareInventory": { "@odata.id": "/redfish/v1/UpdateService/SoftwareInventory/" } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/vmedia.json0000664000175000017500000000767000000000000027102 0ustar00zuulzuul00000000000000{ "default": { "@odata.context": "/redfish/v1/$metadata#Managers/Members/1/VirtualMedia/Members/$entity", "@odata.etag": "W/\"FD62A3AF\"", "@odata.id": "/redfish/v1/Managers/1/VirtualMedia/2/", "@odata.type": "#VirtualMedia.v1_0_0.VirtualMedia", "ConnectedVia": "NotConnected", "Description": "Virtual Removable Media", "Id": "2", "Image": "", "Inserted": false, "MediaTypes": [ "CD", "DVD" ], "Name": "VirtualMedia", "Oem": { "Hpe": { "@odata.type": "#HpeiLOVirtualMedia.v2_0_0.HpeiLOVirtualMedia", "Actions": { "#HpeiLOVirtualMedia.EjectVirtualMedia": { "target": "/redfish/v1/Managers/1/VirtualMedia/2/Actions/Oem/Hpe/HpeiLOVirtualMedia.EjectVirtualMedia/" }, "#HpeiLOVirtualMedia.InsertVirtualMedia": { "target": "/redfish/v1/Managers/1/VirtualMedia/2/Actions/Oem/Hpe/HpeiLOVirtualMedia.InsertVirtualMedia/" } }, "BootOnNextServerReset": false } }, "WriteProtected": true }, "vmedia_inserted": { "@odata.context": "/redfish/v1/$metadata#Managers/Members/1/VirtualMedia/Members/$entity", "@odata.etag": "W/\"402B70A4\"", "@odata.id": "/redfish/v1/Managers/1/VirtualMedia/2/", "@odata.type": "#VirtualMedia.v1_0_0.VirtualMedia", "ConnectedVia": "URI", "Description": "Virtual Removable Media", "Id": "1", "Image": "http://172.17.1.121:8081/test", "ImageName": "test", "Inserted": true, "MediaTypes": [ "CD", "DVD" ], "Name": "VirtualMedia", "Oem": { "Hpe": { "@odata.type": "#HpeiLOVirtualMedia.v2_0_0.HpeiLOVirtualMedia", "Actions": { "#HpeiLOVirtualMedia.EjectVirtualMedia": { "target": "/redfish/v1/Managers/1/VirtualMedia/2/Actions/Oem/Hpe/HpeiLOVirtualMedia.EjectVirtualMedia/" }, "#HpeiLOVirtualMedia.InsertVirtualMedia": { "target": "/redfish/v1/Managers/1/VirtualMedia/2/Actions/Oem/Hpe/HpeiLOVirtualMedia.InsertVirtualMedia/" }, "BootOnNextServerReset": false } } }, "WriteProtected": true }, "vmedia_floppy": { "@odata.context": "/redfish/v1/$metadata#Managers/Members/1/VirtualMedia/Members/$entity", "@odata.etag": "W/\"6C5A7D71\"", "@odata.id": "/redfish/v1/Managers/1/VirtualMedia/1/", "@odata.type": "#VirtualMedia.v1_0_0.VirtualMedia", "ConnectedVia": "NotConnected", "Description": "Virtual Removable Media", "Id": "1", "Image": "", "Inserted": false, "MediaTypes": [ "Floppy", "USBStick" ], "Name": "VirtualMedia", "Oem": { "Hpe": { "@odata.type": "#HpeiLOVirtualMedia.v2_0_0.HpeiLOVirtualMedia", "Actions": { "#HpeiLOVirtualMedia.EjectVirtualMedia": { "target": "/redfish/v1/Managers/1/VirtualMedia/1/Actions/Oem/Hpe/HpeiLOVirtualMedia.EjectVirtualMedia/" }, "#HpeiLOVirtualMedia.InsertVirtualMedia": { "target": "/redfish/v1/Managers/1/VirtualMedia/1/Actions/Oem/Hpe/HpeiLOVirtualMedia.InsertVirtualMedia/" } } } }, "WriteProtected": false } } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/vmedia_collection.json0000664000175000017500000000074700000000000031313 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#Managers/Members/1/VirtualMedia", "@odata.etag": "W/\"72D11D4D\"", "@odata.id": "/redfish/v1/Managers/1/VirtualMedia/", "@odata.type": "#VirtualMediaCollection.VirtualMediaCollection", "Description": "iLO Virtual Media Services Settings", "Members": [ { "@odata.id": "/redfish/v1/Managers/1/VirtualMedia/2/" } ], "Members@odata.count": 1, "Name": "Virtual Media Services" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/volume.json0000664000175000017500000000221700000000000027134 0ustar00zuulzuul00000000000000{ "@odata.type": "#Volume.v1_0_0.Volume", "Id": "1", "Name": "Virtual Disk 1", "Status": { "State": "Enabled", "Health": "OK" }, "Encrypted": false, "VolumeType": "Mirrored", "CapacityBytes": 899527000000, "Identifiers": [{ "DurableNameFormat": "VPD83type3", "DurableName": "690b11c02547001d96f0fbe6c1cb31" }, { "DurableNameFormat": "UUID", "DurableName": "38f1818b-111e-463a-aa19-fa54f792e468" }], "Links": { "Drives": [{ "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Drives/3F5A8C54207B7233" }, { "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Drives/35D38F11ACEF7BD3" }] }, "Actions": { "#Volume.Initialize": { "Target": "/redfish/v1/Systems/3/Storage/RAIDIntegrated/Volumes/1/Actions/Volume.Initialize", "InitializeType@Redfish.AllowableValues": [ "Fast", "Slow" ] } }, "@odata.context": "/redfish/v1/$metadata#Volume.Volume", "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes/1" } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/json_samples/volume_collection.json0000664000175000017500000000067600000000000031356 0ustar00zuulzuul00000000000000{ "@odata.context": "/redfish/v1/$metadata#VolumeCollection.VolumeCollection", "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes", "@odata.type": "#VolumeCollection.VolumeCollection", "Name": "Storage Volume Collection", "Description": "Storage Volume Collection", "Members@odata.count": 1, "Members": [{ "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes/1" }], "Oem": {} } ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2666647 proliantutils-2.16.0/proliantutils/tests/redfish/resources/0000775000175000017500000000000000000000000024245 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/__init__.py0000664000175000017500000000000000000000000026344 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2666647 proliantutils-2.16.0/proliantutils/tests/redfish/resources/account_service/0000775000175000017500000000000000000000000027421 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/account_service/__init__.py0000664000175000017500000000000000000000000031520 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/account_service/test_account.py0000664000175000017500000000511400000000000032467 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' import json from unittest import mock import testtools from proliantutils.redfish.resources.account_service import account class HPEAccountCollectionTestCase(testtools.TestCase): def setUp(self): super(HPEAccountCollectionTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/account_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) self.account_coll_obj = account.HPEAccountCollection( self.conn, '/redfish/v1/AccountService/Accounts', redfish_version='1.0.2') def test_get_member_details(self): with open('proliantutils/tests/redfish/' 'json_samples/account.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) obj = self.account_coll_obj.get_member_details('foo') self.assertIsInstance(obj, account.HPEAccount) self.assertIsNone(self.account_coll_obj.get_member_details('bar')) class HPEAccountTestCase(testtools.TestCase): def setUp(self): super(HPEAccountTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/account.json', 'r') as f: account_json = json.loads(f.read()) self.conn.get.return_value.json.return_value = account_json self.acc_inst = account.HPEAccount( self.conn, '/redfish/v1/AccountService/Accounts/1', redfish_version='1.0.2') def test_attributes(self): self.assertEqual('foo', self.acc_inst.username) def test_update_credentials(self): target_uri = '/redfish/v1/AccountService/Accounts/1' self.acc_inst.update_credentials('fake-password') self.acc_inst._conn.patch.assert_called_once_with( target_uri, data={'Password': 'fake-password'}) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/account_service/test_account_service.py0000664000175000017500000000710400000000000034210 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' import json from unittest import mock import testtools from proliantutils.redfish.resources.account_service import account from proliantutils.redfish.resources.account_service import account_service class HPEAccountServiceTestCase(testtools.TestCase): def setUp(self): super(HPEAccountServiceTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/account_service.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) self.acc_inst = account_service.HPEAccountService( self.conn, '/redfish/v1/AccountService', redfish_version='1.0.2') def test_accounts(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/account_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) self.assertIsInstance(self.acc_inst.accounts, account.HPEAccountCollection) def test_accounts_on_refresh(self): with open('proliantutils/tests/redfish/' 'json_samples/account_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) accounts = self.acc_inst.accounts self.assertIsInstance(accounts, account.HPEAccountCollection) with open('proliantutils/tests/redfish/' 'json_samples/account_service.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) self.acc_inst.invalidate() self.acc_inst.refresh(force=False) self.assertTrue(accounts._is_stale) with open('proliantutils/tests/redfish/' 'json_samples/account_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) self.assertIsInstance(self.acc_inst.accounts, account.HPEAccountCollection) self.assertFalse(accounts._is_stale) def test_update_min_passwd_length(self): self.acc_inst.update_min_passwd_length(passwd_length=10) data = {"Oem": {"Hpe": {"MinPasswordLength": 10}}} self.acc_inst._conn.patch.assert_called_once_with( '/redfish/v1/AccountService', data=data) def test_update_enforce_passwd_complexity(self): self.acc_inst.update_enforce_passwd_complexity(enable=True) data = {"Oem": {"Hpe": {"EnforcePasswordComplexity": True}}} self.acc_inst._conn.patch.assert_called_once_with( '/redfish/v1/AccountService', data=data) def test_update_auth_failure_logging(self): self.acc_inst.update_auth_failure_logging(logging_threshold=2) data = {"Oem": {"Hpe": {"AuthFailureLoggingThreshold": 2}}} self.acc_inst._conn.patch.assert_called_once_with( '/redfish/v1/AccountService', data=data) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2666647 proliantutils-2.16.0/proliantutils/tests/redfish/resources/chassis/0000775000175000017500000000000000000000000025702 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/chassis/test_chassis.py0000664000175000017500000000375200000000000030757 0ustar00zuulzuul00000000000000# Copyright 2021 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils.redfish.resources.chassis import chassis from proliantutils.redfish.resources.chassis import devices class HPEChassisTestCase(testtools.TestCase): def setUp(self): super(HPEChassisTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/chassis.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) self.chas_inst = chassis.HPEChassis( self.conn, '/redfish/v1/Chassis/1', redfish_version='1.0.2') def test_devices(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/devices_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) actual_devices = self.chas_inst.devices self.assertIsInstance(actual_devices, devices.DevicesCollection) self.conn.get.return_value.json.assert_called_once_with() # reset mock self.conn.get.return_value.json.reset_mock() self.assertIs(actual_devices, self.chas_inst.devices) self.conn.get.return_value.json.assert_not_called() ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/chassis/test_devices.py0000664000175000017500000001114700000000000030741 0ustar00zuulzuul00000000000000# Copyright 2021 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils.redfish.resources.chassis import devices class DevicesTestCase(testtools.TestCase): def setUp(self): super(DevicesTestCase, self).setUp() self.conn = mock.Mock() dev_file = 'proliantutils/tests/redfish/json_samples/devices.json' with open(dev_file, 'r') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc dev_path = "/redfish/v1/Chassis/1/Devices/9" self.dev = devices.Devices( self.conn, dev_path, '1.0.2', None) def test__parse_attributes(self): self.dev._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.dev.redfish_version) self.assertEqual('1', self.dev.identity) self.assertEqual('Embedded Video Controller', self.dev.name) self.assertEqual('', self.dev.manufacturer) class DevicesCollectionTestCase(testtools.TestCase): def setUp(self): super(DevicesCollectionTestCase, self).setUp() self.conn = mock.Mock() with open('proliantutils/tests/redfish/json_samples/' 'devices_collection.json') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc self.dev_col = devices.DevicesCollection( self.conn, '/redfish/v1/Chassis/1/Devices', redfish_version='1.0.2') def test__parse_attributes(self): self.dev_col._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.dev_col.redfish_version) self.assertEqual('Devices', self.dev_col.name) path = ('/redfish/v1/Chassis/1/Devices/9') self.assertEqual(path, self.dev_col.members_identities) @mock.patch.object(devices, 'Devices', autospec=True) def test_get_member(self, mock_dev): self.dev_col.get_member( '/redfish/v1/Chassis/1/Devices/9') mock_dev.assert_called_once_with( self.dev_col._conn, ('/redfish/v1/Chassis/1/Devices/9'), self.dev_col.redfish_version, None) @mock.patch.object(devices, 'Devices', autospec=True) def test_get_members(self, mock_dev): members = self.dev_col.get_members() path_list = ["/redfish/v1/Chassis/1/Devices/9"] calls = [ mock.call(self.dev_col._conn, path_list[0], self.dev_col.redfish_version, None) ] mock_dev.assert_has_calls(calls) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) def test_vendor_dict(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'devices.json') with open(path, 'r') as f: val.append(json.loads(f.read())) self.conn.get.return_value.json.side_effect = val expected = {'9': 'NULL'} actual = self.dev_col.vendor_dict self.assertEqual(expected, actual) def test_pci_devices_uris(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'devices.json') with open(path, 'r') as f: val.append(json.loads(f.read())) self.conn.get.return_value.json.side_effect = val expected = {'9': ["/redfish/v1/Systems/1/PCIDevices/6"]} actual = self.dev_col.pci_devices_uris self.assertEqual(expected, actual) def test_vendor_devices_dict(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'devices.json') with open(path, 'r') as f: val.append(json.loads(f.read())) self.conn.get.return_value.json.side_effect = val expected = {'9': 'Embedded Video Controller'} actual = self.dev_col.vendor_devices_dict self.assertEqual(expected, actual) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2666647 proliantutils-2.16.0/proliantutils/tests/redfish/resources/manager/0000775000175000017500000000000000000000000025657 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/manager/__init__.py0000664000175000017500000000000000000000000027756 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/manager/test_https_cert.py0000664000175000017500000001243500000000000031454 0ustar00zuulzuul00000000000000# Copyright 2020 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test Class for HttpsCertTestCase""" import json from unittest import mock import sushy import testtools from proliantutils import exception from proliantutils.redfish.resources.manager import https_cert class HttpsCertTestCase(testtools.TestCase): def setUp(self): super(HttpsCertTestCase, self).setUp() self.conn = mock.Mock() https_cert_file = ('proliantutils/tests/redfish/json_samples/' 'https_cert.json') with open(https_cert_file) as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = ( self.json_doc) path = ("/redfish/v1/Mangers/1/SecurityService/HttpsCert") self.https_cert_inst = https_cert.HttpsCert( self.conn, path, '1.0.2', None) def test__get_https_cert_uri_generate_csr(self): value = self.https_cert_inst._get_https_cert_uri('generate_csr') expected_url = ('/redfish/v1/Managers/1/SecurityService/HttpsCert/' 'Actions/HpeHttpsCert.GenerateCSR') self.assertEqual(expected_url, value.target_uri) def test__get_https_cert_uri_import_certificate(self): value = self.https_cert_inst._get_https_cert_uri('import_cert') expected_url = ('/redfish/v1/Managers/1/SecurityService/HttpsCert/' 'Actions/HpeHttpsCert.ImportCertificate') self.assertEqual(expected_url, value.target_uri) def test__get_https_cert_uri_missing_url(self): self.https_cert_inst._actions.generate_csr = None self.assertRaisesRegex( sushy.exceptions.MissingActionError, 'action #HpeHttpsCert.GenerateCSR', self.https_cert_inst._get_https_cert_uri, 'generate_csr') @mock.patch.object(https_cert.HttpsCert, 'wait_for_csr_to_create', autospec=True) def test_generate_csr(self, wait_for_csr_to_create_mock): target_uri = ('/redfish/v1/Managers/1/SecurityService/HttpsCert/' 'Actions/HpeHttpsCert.GenerateCSR') data = { "CommonName": '1.1.1.1', "Country": 'IN', "State": 'KA', "City": 'blr', "OrgName": 'HPE', "OrgUnit": None } self.https_cert_inst.generate_csr(data) self.https_cert_inst._conn.post.assert_called_once_with( target_uri, data=data) self.assertTrue(wait_for_csr_to_create_mock.called) def test_generate_csr_post_fails(self): data = { "CommonName": '1.1.1.1', "Country": 'IN', "State": 'KA', "City": 'blr', "OrgName": 'HPE', "OrgUnit": None } self.https_cert_inst._conn.post.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to generate CSR', self.https_cert_inst.generate_csr, data) def test_import_certificate(self): target_uri = ('/redfish/v1/Managers/1/SecurityService/HttpsCert/' 'Actions/HpeHttpsCert.ImportCertificate') data = { "Certificate": 'certificate' } self.https_cert_inst.import_certificate('certificate') self.https_cert_inst._conn.post.assert_called_once_with( target_uri, data=data) def test_import_certificate_post_fails(self): self.https_cert_inst._conn.post.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to import certificate. Error', self.https_cert_inst.import_certificate, 'certificate') @mock.patch('time.sleep', autospec=True) @mock.patch.object(https_cert.HttpsCert, 'get_generate_csr_refresh', autospec=True) def test_wait_for_csr_to_create_ok(self, get_generate_csr_refresh_mock, sleep_mock): self.cert_sign_request = 'certificate' self.https_cert_inst.wait_for_csr_to_create() self.assertTrue(get_generate_csr_refresh_mock.called) @mock.patch('time.sleep', autospec=True) @mock.patch.object(https_cert.HttpsCert, 'get_generate_csr_refresh', autospec=True) def test_wait_for_csr_to_create_fails(self, get_generate_csr_refresh_mock, sleep_mock): exc = exception.IloError('error') get_generate_csr_refresh_mock.side_effect = exc self.assertRaises(exception.IloError, self.https_cert_inst.wait_for_csr_to_create) self.assertEqual(10, get_generate_csr_refresh_mock.call_count) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/manager/test_manager.py0000664000175000017500000000757100000000000030714 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils.redfish.resources.manager import manager from proliantutils.redfish.resources.manager import virtual_media class HPEManagerTestCase(testtools.TestCase): def setUp(self): super(HPEManagerTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/manager.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) self.mgr_inst = manager.HPEManager( self.conn, '/redfish/v1/Managers/1', redfish_version='1.0.2') def test_set_license(self): self.mgr_inst.set_license('testkey') self.mgr_inst._conn.post.assert_called_once_with( '/redfish/v1/Managers/1/LicenseService/', data={'LicenseKey': 'testkey'}) def test_virtual_media(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/vmedia_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) actual_vmedia = self.mgr_inst.virtual_media self.assertIsInstance(actual_vmedia, virtual_media.VirtualMediaCollection) self.conn.get.return_value.json.assert_called_once_with() # reset mock self.conn.get.return_value.json.reset_mock() self.assertIs(actual_vmedia, self.mgr_inst.virtual_media) self.conn.get.return_value.json.assert_not_called() def test_virtual_media_on_refresh(self): with open('proliantutils/tests/redfish/' 'json_samples/vmedia_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) actual_vmedia = self.mgr_inst.virtual_media self.assertIsInstance(actual_vmedia, virtual_media.VirtualMediaCollection) with open('proliantutils/tests/redfish/' 'json_samples/manager.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) self.mgr_inst.invalidate() self.mgr_inst.refresh(force=False) self.assertTrue(actual_vmedia._is_stale) with open('proliantutils/tests/redfish/' 'json_samples/vmedia_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) self.assertIsInstance(self.mgr_inst.virtual_media, virtual_media.VirtualMediaCollection) self.assertFalse(actual_vmedia._is_stale) def test_update_login_for_ilo_rbsu(self): self.mgr_inst.update_login_for_ilo_rbsu(enable=True) data = {"Oem": {"Hpe": {"RequiredLoginForiLORBSU": True}}} self.mgr_inst._conn.patch.assert_called_once_with( '/redfish/v1/Managers/1', data=data) def test_update_host_authentication(self): self.mgr_inst.update_host_authentication(enable=True) data = {"Oem": {"Hpe": {"RequireHostAuthentication": True}}} self.mgr_inst._conn.patch.assert_called_once_with( '/redfish/v1/Managers/1', data=data) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/manager/test_security_dashboard.py0000664000175000017500000000320500000000000033146 0ustar00zuulzuul00000000000000# Copyright 2020 Hewlett Packard Enterprise Development LP. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test Class for SecurityDashboard.""" import json from unittest import mock import testtools from proliantutils.redfish.resources.manager import security_dashboard class SecurityDashboardTestCase(testtools.TestCase): def setUp(self): super(SecurityDashboardTestCase, self).setUp() self.conn = mock.Mock() security_param_file = ('proliantutils/tests/redfish/json_samples/' 'security_dashboard.json') with open(security_param_file) as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = ( self.json_doc) path = ("/redfish/v1/Mangers/1/SecurityService/" "SecurityDashboard") self.sec_dash = security_dashboard.SecurityDashboard( self.conn, path, '1.0.2', None) def test__parse_attributes(self): self.sec_dash._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sec_dash.redfish_version) self.assertEqual("Risk", self.sec_dash.overall_status) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/manager/test_security_params.py0000664000175000017500000001161400000000000032505 0ustar00zuulzuul00000000000000# Copyright 2020 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test Class for SecurityParamsTestCase""" import json from unittest import mock import testtools from proliantutils.redfish.resources.manager import security_params class SecurityParamsTestCase(testtools.TestCase): def setUp(self): super(SecurityParamsTestCase, self).setUp() self.conn = mock.Mock() security_param_file = ('proliantutils/tests/redfish/json_samples/' 'security_param.json') with open(security_param_file) as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = ( self.json_doc) path = ("/redfish/v1/Mangers/1/SecurityService/" "SecurityDashboard/SecurityParams") self.sec_param = security_params.SecurityParams( self.conn, path, redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sec_param._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sec_param.redfish_version) self.assertEqual("Security Override Switch", self.sec_param.name) self.assertEqual("Ok", self.sec_param.status) self.assertEqual("Off", self.sec_param.state) def test_update_security_param_ignore_status(self): self.sec_param.update_security_param_ignore_status(ignore=False) data = {"Ignore": False} target_uri = ('/redfish/v1/Mangers/1/SecurityService/' 'SecurityDashboard/SecurityParams') self.sec_param._conn.patch.assert_called_once_with( target_uri, data=data) class SecurityParamsCollectionTestCase(testtools.TestCase): def setUp(self): super(SecurityParamsCollectionTestCase, self).setUp() self.conn = mock.Mock() with open('proliantutils/tests/redfish/json_samples/' 'security_params_collection.json', 'r') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc self.sec_params_col = security_params.SecurityParamsCollection( self.conn, ('/redfish/v1/Managers/1/SecurityService/' 'SecurityDashboard/SecurityParams'), redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sec_params_col._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sec_params_col.redfish_version) self.assertEqual('Security Parameter Collection', self.sec_params_col.name) path = ('/redfish/v1/Managers/1/SecurityService/' 'SecurityDashboard/SecurityParams/0', '/redfish/v1/Managers/1/SecurityService/' 'SecurityDashboard/SecurityParams/1') self.assertEqual(path, self.sec_params_col.members_identities) @mock.patch.object(security_params, 'SecurityParams', autospec=True) def test_get_member(self, mock_eth): self.sec_params_col.get_member( '/redfish/v1/Managers/1/SecurityService/SecurityDashboard/' 'SecurityParams/1') mock_eth.assert_called_once_with( self.sec_params_col._conn, ('/redfish/v1/Managers/1/SecurityService/SecurityDashboard/' 'SecurityParams/1'), redfish_version=self.sec_params_col.redfish_version, registries=None, root=self.sec_params_col.root) @mock.patch.object(security_params, 'SecurityParams', autospec=True) def test_get_members(self, mock_eth): members = self.sec_params_col.get_members() path = ('/redfish/v1/Managers/1/SecurityService/SecurityDashboard/' 'SecurityParams/0') path2 = ('/redfish/v1/Managers/1/SecurityService/SecurityDashboard/' 'SecurityParams/1') calls = [mock.call(self.sec_params_col._conn, path, redfish_version=self.sec_params_col.redfish_version, registries=None, root=self.sec_params_col.root), mock.call(self.sec_params_col._conn, path2, redfish_version=self.sec_params_col.redfish_version, registries=None, root=self.sec_params_col.root)] mock_eth.assert_has_calls(calls) self.assertIsInstance(members, list) self.assertEqual(2, len(members)) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/manager/test_security_service.py0000664000175000017500000000277300000000000032670 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils.redfish.resources.manager import security_service class SecurityServiceTestCase(testtools.TestCase): def setUp(self): super(SecurityServiceTestCase, self).setUp() self.conn = mock.Mock() security_file = ('proliantutils/tests/redfish/json_samples/' 'security_service.json') with open(security_file) as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = ( self.json_doc) path = ("/redfish/v1/Mangers/1/SecurityService/") self.sec_serv = security_service.SecurityService( self.conn, path, '1.0.2', None) def test__parse_attributes(self): self.sec_serv._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sec_serv.redfish_version) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/manager/test_virtual_media.py0000664000175000017500000001352300000000000032121 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' import json from unittest import mock from sushy import exceptions from sushy.resources.manager import virtual_media as sushy_virt_media import testtools from proliantutils import exception from proliantutils.redfish.resources.manager import constants from proliantutils.redfish.resources.manager import virtual_media class VirtualMediaCollectionTestCase(testtools.TestCase): def setUp(self): super(VirtualMediaCollectionTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/vmedia_collection.json') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) self.vmedia_coll_inst = virtual_media.VirtualMediaCollection( self.conn, '/redfish/v1/Managers/1/VirtualMedia', redfish_version='1.0.2') def test_get_member_device(self): with open('proliantutils/tests/redfish/' 'json_samples/vmedia.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['default']) obj = self.vmedia_coll_inst.get_member_device( constants.VIRTUAL_MEDIA_CD) self.assertIsInstance(obj, virtual_media.VirtualMedia) class VirtualMediaTestCase(testtools.TestCase): def setUp(self): super(VirtualMediaTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/vmedia.json') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc[ 'default'] self.vmedia_inst = virtual_media.VirtualMedia( self.conn, '/redfish/v1/Managers/1/VirtualMedia/2', redfish_version='1.0.2') def test__parse_attributes(self): self.vmedia_inst._parse_attributes(self.json_doc['default']) self.assertEqual(['cd', 'dvd'], self.vmedia_inst.media_types) self.assertEqual(False, self.vmedia_inst.inserted) def test__parse_attributes_missing_actions(self): self.vmedia_inst.json.pop('Oem') self.assertRaisesRegex( exceptions.MissingAttributeError, 'attribute Oem/Hpe/Actions', self.vmedia_inst._parse_attributes, self.json_doc) def test__get_action_element_insert(self): value = self.vmedia_inst._get_action_element('insert') self.assertEqual("/redfish/v1/Managers/1/VirtualMedia/2/Actions/Oem/" "Hpe/HpeiLOVirtualMedia.InsertVirtualMedia/", value.target_uri) def test__get_action_element_missing_insert_action(self): self.vmedia_inst._hpe_actions.insert_vmedia = None self.assertRaisesRegex( exception.MissingAttributeError, 'attribute #HpeiLOVirtualMedia.InsertVirtualMedia', self.vmedia_inst._get_action_element, 'insert') def test__get_action_element_eject(self): value = self.vmedia_inst._get_action_element('eject') self.assertEqual("/redfish/v1/Managers/1/VirtualMedia/2/Actions/Oem/" "Hpe/HpeiLOVirtualMedia.EjectVirtualMedia/", value.target_uri) def test__get__action_element_missing_eject_action(self): self.vmedia_inst._hpe_actions.eject_vmedia = None self.assertRaisesRegex( exception.MissingAttributeError, 'attribute #HpeiLOVirtualMedia.EjectVirtualMedia', self.vmedia_inst._get_action_element, 'eject') @mock.patch.object(sushy_virt_media.VirtualMedia, 'insert_media') def test_insert_media_sushy(self, insert_mock): insert_mock.return_value = None url = "http://1.2.3.4:5678/xyz.iso" self.vmedia_inst.insert_media(url) insert_mock.assert_called_once_with(url, write_protected=True) @mock.patch.object(sushy_virt_media.VirtualMedia, 'insert_media') def test_insert_media(self, insert_mock): url = "http://1.2.3.4:5678/xyz.iso" insert_mock.side_effect = exceptions.SushyError self.vmedia_inst.insert_media(url) self.vmedia_inst._conn.post.assert_called_once_with( "/redfish/v1/Managers/1/VirtualMedia/2/Actions/Oem/Hpe/" "HpeiLOVirtualMedia.InsertVirtualMedia/", data={'Image': url}) @mock.patch.object(virtual_media.VirtualMedia, 'eject_media') def test_eject_media_sushy(self, eject_mock): eject_mock.return_value = None self.vmedia_inst.eject_media() self.vmedia_inst.eject_media.assert_called_once() @mock.patch.object(sushy_virt_media.VirtualMedia, 'eject_media') def test_eject_media(self, eject_mock): eject_mock.side_effect = exceptions.SushyError self.vmedia_inst.eject_media() self.vmedia_inst._conn.post.assert_called_once_with( "/redfish/v1/Managers/1/VirtualMedia/2/Actions/Oem/Hpe/" "HpeiLOVirtualMedia.EjectVirtualMedia/", data={}) def test_set_vm_status(self): value = {'Oem': {'Hpe': {'BootOnNextServerReset': True}}} self.vmedia_inst.set_vm_status(True) self.vmedia_inst._conn.patch.assert_called_once_with( "/redfish/v1/Managers/1/VirtualMedia/2", data=value) ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1693997949.270665 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/0000775000175000017500000000000000000000000025571 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/__init__.py0000664000175000017500000000000000000000000027670 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2746649 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/storage/0000775000175000017500000000000000000000000027235 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/storage/__init__.py0000664000175000017500000000000000000000000031334 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/storage/test_array_controller.py0000664000175000017500000003127200000000000034234 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils.redfish.resources.system.storage import array_controller class HPEArrayControllerTestCase(testtools.TestCase): def setUp(self): super(HPEArrayControllerTestCase, self).setUp() self.conn = mock.Mock() array_controller_file = ('proliantutils/tests/redfish/json_samples/' 'array_controller.json') with open(array_controller_file, 'r') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc path = ("/redfish/v1/Systems/1/SmartStorage/ArrayControllers") self.sys_stor = array_controller.HPEArrayController( self.conn, path, redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_stor._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sys_stor.redfish_version) self.assertEqual('HPE Smart Array P408i-a SR Gen10', self.sys_stor.model) self.assertEqual('Slot 0', self.sys_stor.location) def test_logical_drives(self): log_coll = None log_dr = None self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/logical_drive_collection.json') as f: log_coll = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/logical_drive.json') as f: log_dr = json.loads(f.read()) self.conn.get.return_value.json.side_effect = ( [log_coll, log_dr['logical_drive1'], log_dr['logical_drive2']]) actual_log_dr = self.sys_stor.logical_drives self.conn.get.return_value.json.reset_mock() self.assertIs(actual_log_dr, self.sys_stor.logical_drives) self.conn.get.return_value.json.assert_not_called() def test_physical_drives(self): disk_coll = None disk_dr = None self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/disk_drive_collection.json') as f: disk_coll = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/disk_drive.json') as f: disk_dr = json.loads(f.read()) self.conn.get.return_value.json.side_effect = [disk_coll, disk_dr] actual_log_dr = self.sys_stor.physical_drives self.conn.get.return_value.json.reset_mock() self.assertIs(actual_log_dr, self.sys_stor.physical_drives) self.conn.get.return_value.json.assert_not_called() class HPEArrayControllerCollectionTestCase(testtools.TestCase): def setUp(self): super(HPEArrayControllerCollectionTestCase, self).setUp() self.conn = mock.Mock() with open('proliantutils/tests/redfish/json_samples/' 'array_controller_collection.json', 'r') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc self.sys_stor_col = array_controller.HPEArrayControllerCollection( self.conn, '/redfish/v1/Systems/1/SmartStorage/ArrayControllers', redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_stor_col._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sys_stor_col.redfish_version) self.assertEqual('HpeSmartStorageArrayControllers', self.sys_stor_col.name) path = ('/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0',) self.assertEqual(path, self.sys_stor_col.members_identities) @mock.patch.object(array_controller, 'HPEArrayController', autospec=True) def test_get_member(self, mock_eth): self.sys_stor_col.get_member( '/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0') mock_eth.assert_called_once_with( self.sys_stor_col._conn, '/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0', redfish_version=self.sys_stor_col.redfish_version, registries=None, root=self.sys_stor_col.root) @mock.patch.object(array_controller, 'HPEArrayController', autospec=True) def test_get_members(self, mock_eth): members = self.sys_stor_col.get_members() path = ("/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0") calls = [ mock.call(self.sys_stor_col._conn, path, redfish_version=self.sys_stor_col.redfish_version, registries=None, root=self.sys_stor_col.root), ] mock_eth.assert_has_calls(calls) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) def test_logical_drives_maximum_size_mib(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'array_controller.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'logical_drive_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'logical_drive.json') with open(path, 'r') as f: f_data = json.loads(f.read()) val.append(f_data['logical_drive1']) val.append(f_data['logical_drive2']) self.conn.get.return_value.json.side_effect = val expected = 953837 actual = self.sys_stor_col.logical_drives_maximum_size_mib self.assertEqual(expected, actual) def test_logical_raid_levels(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'array_controller.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'logical_drive_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'logical_drive.json') with open(path, 'r') as f: f_data = json.loads(f.read()) val.append(f_data['logical_drive1']) val.append(f_data['logical_drive2']) self.conn.get.return_value.json.side_effect = val expected = set(['0', '1']) actual = self.sys_stor_col.logical_raid_levels self.assertEqual(expected, actual) def test_physical_drives_maximum_size_mib(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'array_controller.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) self.conn.get.return_value.json.side_effect = val expected = 572325 actual = self.sys_stor_col.physical_drives_maximum_size_mib self.assertEqual(expected, actual) def test_has_ssd(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'array_controller.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) self.conn.get.return_value.json.side_effect = val self.assertTrue(self.sys_stor_col.has_ssd) def test_has_rotational(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'array_controller.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) self.conn.get.return_value.json.side_effect = val self.assertTrue(self.sys_stor_col.has_rotational) def test_drive_rotational_speed_rpm(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'array_controller.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) self.conn.get.return_value.json.side_effect = val expected = set([10000]) self.assertEqual(expected, self.sys_stor_col.drive_rotational_speed_rpm) def test_get_default_controller(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/array_controller.json', 'r') as f: ac_json = json.loads(f.read()) self.conn.get.return_value.json.return_value = ac_json result_location = self.sys_stor_col.get_default_controller.location self.assertEqual(result_location, 'Slot 0') def test_array_controller_by_location(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/array_controller.json', 'r') as f: ac_json = json.loads(f.read()) self.conn.get.return_value.json.return_value = ac_json model_result = ( self.sys_stor_col.array_controller_by_location('Slot 0').model) self.assertEqual(model_result, 'HPE Smart Array P408i-a SR Gen10') def test_array_controller_by_model(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/array_controller.json', 'r') as f: ac_json = json.loads(f.read()) self.conn.get.return_value.json.return_value = ac_json model = 'HPE Smart Array P408i-a SR Gen10' result_model = self.sys_stor_col.array_controller_by_model(model).model self.assertEqual(result_model, model) def test_get_all_controllers_model(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/array_controller.json', 'r') as f: ac_json = json.loads(f.read()) self.conn.get.return_value.json.return_value = ac_json model = ['HPE Smart Array P408i-a SR Gen10'] result_model = self.sys_stor_col.get_all_controllers_model() self.assertEqual(result_model, model) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/storage/test_common.py0000664000175000017500000001462100000000000032142 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' from unittest import mock import ddt import sushy import testtools from proliantutils import exception from proliantutils.redfish.resources.system.storage import common @ddt.ddt class CommonMethodsTestCase(testtools.TestCase): def setUp(self): super(CommonMethodsTestCase, self).setUp() self.system_obj = mock.MagicMock() def _mock_property(self, value): if value is sushy.exceptions.SushyError: mock_value = mock.PropertyMock(side_effect=value) else: mock_value = mock.PropertyMock(return_value=value) return mock_value @ddt.data((953837, 60000, 60000, 60000, 60000, 930), (sushy.exceptions.SushyError, 1000169537536, 60000, 60000, 60000, 930), (953837, sushy.exceptions.SushyError, 60000, 60000, 60000, 930), (sushy.exceptions.SushyError, sushy.exceptions.SushyError, 953837, 60000, 40000, 930), (sushy.exceptions.SushyError, sushy.exceptions.SushyError, sushy.exceptions.SushyError, 1000169537536, 40000, 930), (sushy.exceptions.SushyError, sushy.exceptions.SushyError, sushy.exceptions.SushyError, sushy.exceptions.SushyError, 1000169537536, 930), (sushy.exceptions.SushyError, sushy.exceptions.SushyError, sushy.exceptions.SushyError, sushy.exceptions.SushyError, sushy.exceptions.SushyError, 0), ) @ddt.unpack def test_get_local_gb(self, logical_max, volume_max, physical_max, drive_max, simple_max, expected): system_obj = self.system_obj type(system_obj.smart_storage).logical_drives_maximum_size_mib = ( self._mock_property(logical_max)) type(system_obj.storages).volumes_maximum_size_bytes = ( self._mock_property(volume_max)) type(system_obj.smart_storage).physical_drives_maximum_size_mib = ( self._mock_property(physical_max)) type(system_obj.storages).drives_maximum_size_bytes = ( self._mock_property(drive_max)) type(system_obj.simple_storages).maximum_size_bytes = ( self._mock_property(simple_max)) actual = common.get_local_gb(system_obj) self.assertEqual(expected, actual) def test__get_attribute_value_of(self): system_obj = self.system_obj si_mock = mock.PropertyMock(return_value=1000169537536) type(system_obj.simple_storages).maximum_size_bytes = si_mock actual = common._get_attribute_value_of(system_obj.simple_storages, 'maximum_size_bytes') self.assertEqual(1000169537536, actual) def test__get_attribute_value_of_sushy_error(self): system_obj = self.system_obj si_mock = mock.PropertyMock(side_effect=sushy.exceptions.SushyError) type(system_obj.simple_storages).maximum_size_bytes = si_mock actual = common._get_attribute_value_of(system_obj.simple_storages, 'maximum_size_bytes', default=0) self.assertEqual(0, actual) def test__get_attribute_value_of_fail_missing_attribute(self): system_obj = self.system_obj si_mock = mock.PropertyMock( side_effect=exception.MissingAttributeError) type(system_obj.simple_storages).maximum_size_bytes = si_mock actual = common._get_attribute_value_of(system_obj.simple_storages, 'maximum_size_bytes') self.assertIsNone(actual) @ddt.data((True, False, True), (True, True, True), (False, True, True), (False, False, False)) @ddt.unpack def test_has_ssd(self, smart_value, storage_value, expected): system_obj = self.system_obj type(system_obj.smart_storage).has_ssd = ( self._mock_property(smart_value)) type(system_obj.storages).has_ssd = ( self._mock_property(storage_value)) actual = common.has_ssd(system_obj) self.assertEqual(expected, actual) @ddt.data((True, False, True), (True, True, True), (False, True, True), (False, False, False)) @ddt.unpack def test_has_rotational(self, smart_value, storage_value, expected): system_obj = self.system_obj type(system_obj.smart_storage).has_rotational = ( self._mock_property(smart_value)) type(system_obj.storages).has_rotational = ( self._mock_property(storage_value)) actual = common.has_rotational(system_obj) self.assertEqual(expected, actual) @ddt.data((False, False), (True, True)) @ddt.unpack def test_has_nvme_ssd(self, storage_value, expected): system_obj = self.system_obj type(system_obj.storages).has_nvme_ssd = ( self._mock_property(storage_value)) actual = common.has_nvme_ssd(system_obj) self.assertEqual(expected, actual) @ddt.data((set([10000]), set([15000]), set([10000, 15000])), (set([10000]), set(), set([10000])), (set(), set([15000]), set([15000])), (set(), set(), set())) @ddt.unpack def test_get_drive_rotational_speed_rpm(self, smart_value, storage_value, expected): system_obj = self.system_obj type(system_obj.smart_storage).drive_rotational_speed_rpm = ( self._mock_property(smart_value)) type(system_obj.storages).drive_rotational_speed_rpm = ( self._mock_property(storage_value)) actual = common.get_drive_rotational_speed_rpm(system_obj) self.assertEqual(expected, actual) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/storage/test_drive.py0000664000175000017500000000351300000000000031761 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils.redfish.resources.system.storage import constants from proliantutils.redfish.resources.system.storage import drive class DriveTestCase(testtools.TestCase): def setUp(self): super(DriveTestCase, self).setUp() self.conn = mock.Mock() drive_file = 'proliantutils/tests/redfish/json_samples/drive.json' with open(drive_file) as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = ( self.json_doc['drive1']) drive_path = ("/redfish/v1/Systems/437XR1138R2/Storage/1/" "Drives/35D38F11ACEF7BD3") self.sys_drive = drive.Drive( self.conn, drive_path, redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_drive._parse_attributes(self.json_doc['drive1']) self.assertEqual('1.0.2', self.sys_drive.redfish_version) self.assertEqual(899527000000, self.sys_drive.capacity_bytes) self.assertEqual(constants.PROTOCOL_SAS, self.sys_drive.protocol) self.assertEqual(constants.MEDIA_TYPE_HDD, self.sys_drive.media_type) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/storage/test_logical_drive.py0000664000175000017500000001231000000000000033446 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils.redfish.resources.system.storage import logical_drive class HPELogicalDriveTestCase(testtools.TestCase): def setUp(self): super(HPELogicalDriveTestCase, self).setUp() self.conn = mock.Mock() logical_file = ('proliantutils/tests/redfish/json_samples/' 'logical_drive.json') with open(logical_file) as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc path = ("/redfish/v1/Systems/1/SmartStorage/" "ArrayControllers/0/LogicalDrives") self.sys_stor = logical_drive.HPELogicalDrive( self.conn, path, '1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_stor._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sys_stor.redfish_version) class HPELogicalDriveCollectionTestCase(testtools.TestCase): def setUp(self): super(HPELogicalDriveCollectionTestCase, self).setUp() self.conn = mock.Mock() with open('proliantutils/tests/redfish/json_samples/' 'logical_drive_collection.json') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc self.sys_stor_col = logical_drive.HPELogicalDriveCollection( self.conn, ('/redfish/v1/Systems/1/SmartStorage/' 'ArrayControllers/0/LogicalDrives'), redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_stor_col._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sys_stor_col.redfish_version) self.assertEqual('HpeSmartStorageLogicalDrives', self.sys_stor_col.name) path = ('/redfish/v1/Systems/1/SmartStorage/' 'ArrayControllers/0/LogicalDrives/1', '/redfish/v1/Systems/1/SmartStorage/' 'ArrayControllers/0/LogicalDrives/2',) self.assertEqual(path, self.sys_stor_col.members_identities) @mock.patch.object(logical_drive, 'HPELogicalDrive', autospec=True) def test_get_member(self, mock_eth): self.sys_stor_col.get_member( ('/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/' 'LogicalDrives/1')) mock_eth.assert_called_once_with( self.sys_stor_col._conn, ('/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/' 'LogicalDrives/1'), redfish_version=self.sys_stor_col.redfish_version, registries=None, root=self.sys_stor_col.root) @mock.patch.object(logical_drive, 'HPELogicalDrive', autospec=True) def test_get_members(self, mock_eth): members = self.sys_stor_col.get_members() path1 = ("/redfish/v1/Systems/1/SmartStorage/ArrayControllers/" "0/LogicalDrives/1") path2 = ("/redfish/v1/Systems/1/SmartStorage/ArrayControllers/" "0/LogicalDrives/2") calls = [ mock.call(self.sys_stor_col._conn, path1, redfish_version=self.sys_stor_col.redfish_version, registries=None, root=self.sys_stor_col.root), mock.call(self.sys_stor_col._conn, path2, redfish_version=self.sys_stor_col.redfish_version, registries=None, root=self.sys_stor_col.root), ] mock_eth.assert_has_calls(calls) self.assertIsInstance(members, list) self.assertEqual(2, len(members)) def test_maximum_size_mib(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'logical_drive.json') with open(path, 'r') as f: val = json.loads(f.read()) self.conn.get.return_value.json.side_effect = ( [val['logical_drive1'], val['logical_drive2']]) expected = 953837 actual = self.sys_stor_col.maximum_size_mib self.assertEqual(expected, actual) def test_logical_raid_levels(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'logical_drive.json') with open(path, 'r') as f: val = json.loads(f.read()) self.conn.get.return_value.json.side_effect = ( [val['logical_drive1'], val['logical_drive2']]) expected = set(['0', '1']) actual = self.sys_stor_col.logical_raid_levels self.assertEqual(expected, actual) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/storage/test_physical_drive.py0000664000175000017500000002153600000000000033662 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils.redfish.resources.system.storage import physical_drive class HPEPhysicalDriveTestCase(testtools.TestCase): def setUp(self): super(HPEPhysicalDriveTestCase, self).setUp() self.conn = mock.Mock() logical_file = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(logical_file) as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = ( self.json_doc['drive1']) path = ("/redfish/v1/Systems/1/SmartStorage/" "ArrayControllers/0/DiskDrives") self.sys_stor = physical_drive.HPEPhysicalDrive( self.conn, path, redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_stor._parse_attributes(self.json_doc['drive1']) self.assertEqual('1.0.2', self.sys_stor.redfish_version) self.assertEqual(600, self.sys_stor.capacity_gb) self.assertEqual('KWGER73R', self.sys_stor.serial_number) class HPEPhysicalDriveCollectionTestCase(testtools.TestCase): def setUp(self): super(HPEPhysicalDriveCollectionTestCase, self).setUp() self.conn = mock.Mock() with open('proliantutils/tests/redfish/json_samples/' 'disk_drive_collection.json', 'r') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc self.sys_stor_col = physical_drive.HPEPhysicalDriveCollection( self.conn, ('/redfish/v1/Systems/1/SmartStorage/' 'ArrayControllers/0/DiskDrives'), redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_stor_col._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sys_stor_col.redfish_version) self.assertEqual('HpeSmartStorageDiskDrives', self.sys_stor_col.name) path = ('/redfish/v1/Systems/1/SmartStorage/' 'ArrayControllers/0/DiskDrives/3', '/redfish/v1/Systems/1/SmartStorage/' 'ArrayControllers/0/DiskDrives/4',) self.assertEqual(path, self.sys_stor_col.members_identities) @mock.patch.object(physical_drive, 'HPEPhysicalDrive', autospec=True) def test_get_member(self, mock_eth): self.sys_stor_col.get_member( ('/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/' 'DiskDrives/3')) mock_eth.assert_called_once_with( self.sys_stor_col._conn, ('/redfish/v1/Systems/1/SmartStorage/ArrayControllers/0/' 'DiskDrives/3'), redfish_version=self.sys_stor_col.redfish_version, registries=None, root=self.sys_stor_col.root) @mock.patch.object(physical_drive, 'HPEPhysicalDrive', autospec=True) def test_get_members(self, mock_eth): members = self.sys_stor_col.get_members() path = ("/redfish/v1/Systems/1/SmartStorage/ArrayControllers/" "0/DiskDrives/3") path2 = ("/redfish/v1/Systems/1/SmartStorage/ArrayControllers/" "0/DiskDrives/4") calls = [ mock.call(self.sys_stor_col._conn, path, redfish_version=self.sys_stor_col.redfish_version, registries=None, root=self.sys_stor_col.root), mock.call(self.sys_stor_col._conn, path2, redfish_version=self.sys_stor_col.redfish_version, registries=None, root=self.sys_stor_col.root), ] mock_eth.assert_has_calls(calls) self.assertIsInstance(members, list) self.assertEqual(2, len(members)) def test_maximum_size_mib(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val = [dr_json['drive1'], dr_json['drive2']] self.conn.get.return_value.json.side_effect = val expected = 572325 actual = self.sys_stor_col.maximum_size_mib self.assertEqual(expected, actual) def test_has_ssd(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val = [dr_json['drive1'], dr_json['drive2']] self.conn.get.return_value.json.side_effect = val actual = self.sys_stor_col.has_ssd self.assertTrue(actual) def test_get_all_hdd_drives_locations(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val = [dr_json['drive1'], dr_json['drive2']] self.conn.get.return_value.json.side_effect = val self.assertEqual(self.sys_stor_col.get_all_hdd_drives_locations(), ['1I:0:1']) def test_get_all_ssd_drives_locations(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val = [dr_json['drive1'], dr_json['drive2']] self.conn.get.return_value.json.side_effect = val self.assertEqual(self.sys_stor_col.get_all_ssd_drives_locations(), ['1I:0:1']) def test_has_disk_erase_completed_true(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) self.conn.get.return_value.json.return_value = dr_json[ 'disk-erase-completed'] self.assertTrue(self.sys_stor_col.has_disk_erase_completed) def test_has_disk_erase_completed_false(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) self.conn.get.return_value.json.return_value = dr_json[ 'disk-erase-progress'] self.assertFalse(self.sys_stor_col.has_disk_erase_completed) def test_has_rotational(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val = [dr_json['drive1'], dr_json['drive2']] self.conn.get.return_value.json.side_effect = val self.assertTrue(self.sys_stor_col.has_rotational) def test_drive_rotational_speed_rpm(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val = [dr_json['drive1'], dr_json['drive2']] self.conn.get.return_value.json.side_effect = val expected = set([10000]) self.assertEqual(expected, self.sys_stor_col.drive_rotational_speed_rpm) def test_get_disk_properties_by_drive_location(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val = [dr_json['drive1'], dr_json['drive2']] self.conn.get.return_value.json.side_effect = val result = { 'Serial number': 'KWGER73R', 'Size(GB)': 600, 'Media type': 'HDD', 'Location': '1I:0:1'} self.assertEqual(result, self.sys_stor_col. get_disk_properties_by_drive_location( '1I:0:1')) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/storage/test_simple_storage.py0000664000175000017500000001124700000000000033670 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils.redfish.resources.system.storage import simple_storage class SimpleStorageTestCase(testtools.TestCase): def setUp(self): super(SimpleStorageTestCase, self).setUp() self.conn = mock.Mock() simple_file = ('proliantutils/tests/redfish/json_samples/' 'simple_storage.json') with open(simple_file) as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc simple_path = ("/redfish/v1/Systems/437XR1138R2/SimpleStorage/1") self.sys_simple = simple_storage.SimpleStorage( self.conn, simple_path, redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_simple._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sys_simple.redfish_version) self.assertEqual('1', self.sys_simple.identity) self.assertEqual('Simple Storage Controller', self.sys_simple.name) self.assertEqual('System SATA', self.sys_simple.description) self.assertEqual(self.json_doc.get('Devices'), self.sys_simple.devices) def test_maximum_size_bytes(self): self.conn.get.return_value.json.reset_mock() expected = 8000000000000 actual = self.sys_simple.maximum_size_bytes self.assertEqual(expected, actual) def test_maximum_size_bytes_on_refresh(self): self.sys_simple.refresh() class SimpleStorageCollectionTestCase(testtools.TestCase): def setUp(self): super(SimpleStorageCollectionTestCase, self).setUp() self.conn = mock.Mock() with open('proliantutils/tests/redfish/json_samples/' 'simple_storage_collection.json', 'r') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc self.sys_simple_col = simple_storage.SimpleStorageCollection( self.conn, '/redfish/v1/Systems/437XR1138R2/SimpleStorage', redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_simple_col._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sys_simple_col.redfish_version) self.assertEqual('Simple Storage Collection', self.sys_simple_col.name) simple_path = ('/redfish/v1/Systems/437XR1138R2/SimpleStorage/1',) self.assertEqual(simple_path, self.sys_simple_col.members_identities) @mock.patch.object(simple_storage, 'SimpleStorage', autospec=True) def test_get_member(self, mock_simple): self.sys_simple_col.get_member( '/redfish/v1/Systems/437XR1138R2/SimpleStorage/1') mock_simple.assert_called_once_with( self.sys_simple_col._conn, '/redfish/v1/Systems/437XR1138R2/SimpleStorage/1', redfish_version=self.sys_simple_col.redfish_version, registries=None, root=self.sys_simple_col.root) @mock.patch.object(simple_storage, 'SimpleStorage', autospec=True) def test_get_members(self, mock_simple): members = self.sys_simple_col.get_members() simple_path = ("/redfish/v1/Systems/437XR1138R2/SimpleStorage/1") calls = [ mock.call(self.sys_simple_col._conn, simple_path, redfish_version=self.sys_simple_col.redfish_version, registries=None, root=self.sys_simple_col.root), ] mock_simple.assert_has_calls(calls) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) def test_maximum_size_bytes(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'simple_storage.json') with open(path, 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) expected = 8000000000000 actual = self.sys_simple_col.maximum_size_bytes self.assertEqual(expected, actual) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/storage/test_smart_storage.py0000664000175000017500000002136200000000000033524 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils.redfish.resources.system.storage import array_controller from proliantutils.redfish.resources.system.storage import smart_storage class HPESmartStorageTestCase(testtools.TestCase): def setUp(self): super(HPESmartStorageTestCase, self).setUp() self.conn = mock.Mock() storage_file = ('proliantutils/tests/redfish/json_samples' '/smart_storage.json') with open(storage_file, 'r') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc path = ("/redfish/v1/Systems/1/SmartStorage") self.sys_stor = smart_storage.HPESmartStorage( self.conn, path, '1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_stor._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sys_stor.redfish_version) def test_array_controllers(self): self.conn.get.return_value.json.reset_mock() coll = None value = None path = ('proliantutils/tests/redfish/json_samples/' 'array_controller_collection.json') with open(path, 'r') as f: coll = json.loads(f.read()) with open('proliantutils/tests/redfish/json_samples/' 'array_controller.json', 'r') as f: value = (json.loads(f.read())) self.conn.get.return_value.json.side_effect = [coll, value] self.assertIsInstance(self.sys_stor.array_controllers, array_controller.HPEArrayControllerCollection) def test_logical_drives_maximum_size_mib(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'array_controller_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'array_controller.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'logical_drive_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'logical_drive.json') with open(path, 'r') as f: logical_drive = json.loads(f.read()) val.append(logical_drive['logical_drive1']) val.append(logical_drive['logical_drive2']) self.conn.get.return_value.json.side_effect = val expected = 953837 actual = self.sys_stor.logical_drives_maximum_size_mib self.assertEqual(expected, actual) def test_logical_raid_levels(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'array_controller_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'array_controller.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'logical_drive_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'logical_drive.json') with open(path, 'r') as f: logical_drive = json.loads(f.read()) val.append(logical_drive['logical_drive1']) val.append(logical_drive['logical_drive2']) self.conn.get.return_value.json.side_effect = val expected = set(['0', '1']) actual = self.sys_stor.logical_raid_levels self.assertEqual(expected, actual) def test_physical_drives_maximum_size_mib(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'array_controller_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'array_controller.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) self.conn.get.return_value.json.side_effect = val expected = 572325 actual = self.sys_stor.physical_drives_maximum_size_mib self.assertEqual(expected, actual) def test_has_ssd(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'array_controller_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'array_controller.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) self.conn.get.return_value.json.side_effect = val self.assertTrue(self.sys_stor.has_ssd) def test_has_rotaional(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'array_controller_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'array_controller.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) self.conn.get.return_value.json.side_effect = val self.assertTrue(self.sys_stor.has_rotational) def test_drive_rotational_speed_rpm(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'array_controller_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'array_controller.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'disk_drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) self.conn.get.return_value.json.side_effect = val expected = set([10000]) self.assertEqual(expected, self.sys_stor.drive_rotational_speed_rpm) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/storage/test_storage.py0000664000175000017500000003006600000000000032317 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils.redfish.resources.system.storage import storage class StorageTestCase(testtools.TestCase): def setUp(self): super(StorageTestCase, self).setUp() self.conn = mock.Mock() storage_file = 'proliantutils/tests/redfish/json_samples/storage.json' with open(storage_file) as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc path = ("/redfish/v1/Systems/437XR1138R2/Storage/1") self.sys_stor = storage.Storage( self.conn, path, redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_stor._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sys_stor.redfish_version) self.assertEqual('1', self.sys_stor.identity) self.assertEqual('Local Storage Controller', self.sys_stor.name) self.assertEqual('Integrated RAID Controller', self.sys_stor.description) self.assertEqual(self.json_doc.get('Drives'), self.sys_stor.drives) def test_volumes(self): log_coll = None log_dr = None self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/volume_collection.json') as f: log_coll = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/volume.json') as f: log_dr = json.loads(f.read()) self.conn.get.return_value.json.side_effect = [log_coll, log_dr] actual_volumes = self.sys_stor.volumes self.assertIs(actual_volumes, self.sys_stor.volumes) self.sys_stor.invalidate() self.sys_stor.refresh(force=False) self.assertTrue(actual_volumes._is_stale) def test__drives_list(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/drive.json') as f: dr_json = json.loads(f.read()) self.conn.get.return_value.json.side_effect = [dr_json['drive1'], dr_json['drive2'], dr_json['drive3']] actual_dr = self.sys_stor._drives_list() self.assertIsInstance(actual_dr, list) def test_drives_maximum_size_bytes(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) val.append(dr_json['drive3']) self.conn.get.return_value.json.side_effect = val expected = 899527000000 actual = self.sys_stor.drives_maximum_size_bytes self.assertEqual(expected, actual) def test_has_ssd_true(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) val.append(dr_json['drive3']) self.conn.get.return_value.json.side_effect = val self.assertTrue(self.sys_stor.has_ssd) def test_has_rotational(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) val.append(dr_json['drive3']) self.conn.get.return_value.json.side_effect = val self.assertTrue(self.sys_stor.has_rotational) def test_has_nvme_ssd(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) val.append(dr_json['drive3']) self.conn.get.return_value.json.side_effect = val self.assertTrue(self.sys_stor.has_nvme_ssd) def test_drive_rotational_speed_rpm(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) val.append(dr_json['drive3']) self.conn.get.return_value.json.side_effect = val expected = set([15000, 10000]) self.assertEqual(expected, self.sys_stor.drive_rotational_speed_rpm) class StorageCollectionTestCase(testtools.TestCase): def setUp(self): super(StorageCollectionTestCase, self).setUp() self.conn = mock.Mock() with open('proliantutils/tests/redfish/json_samples/' 'storage_collection.json') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc self.sys_stor_col = storage.StorageCollection( self.conn, '/redfish/v1/Systems/437XR1138R2/Storage', redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_stor_col._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sys_stor_col.redfish_version) self.assertEqual('Storage Collection', self.sys_stor_col.name) path = ('/redfish/v1/Systems/437XR1138R2/Storage/1',) self.assertEqual(path, self.sys_stor_col.members_identities) @mock.patch.object(storage, 'Storage', autospec=True) def test_get_member(self, mock_eth): self.sys_stor_col.get_member( '/redfish/v1/Systems/437XR1138R2/Storage/1') mock_eth.assert_called_once_with( self.sys_stor_col._conn, ('/redfish/v1/Systems/437XR1138R2/Storage/1'), redfish_version=self.sys_stor_col.redfish_version, registries=None, root=self.sys_stor_col.root) @mock.patch.object(storage, 'Storage', autospec=True) def test_get_members(self, mock_eth): members = self.sys_stor_col.get_members() path = ("/redfish/v1/Systems/437XR1138R2/Storage/1") calls = [ mock.call(self.sys_stor_col._conn, path, redfish_version=self.sys_stor_col.redfish_version, registries=None, root=self.sys_stor_col.root), ] mock_eth.assert_has_calls(calls) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) def test_volumes_maximum_size_bytes(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'storage.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'volume_collection.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'volume.json') with open(path, 'r') as f: val.append(json.loads(f.read())) self.conn.get.return_value.json.side_effect = val expected = 899527000000 actual = self.sys_stor_col.volumes_maximum_size_bytes self.assertEqual(expected, actual) def test_drives_maximum_size_bytes(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'storage.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) val.append(dr_json['drive3']) self.conn.get.return_value.json.side_effect = val expected = 899527000000 actual = self.sys_stor_col.drives_maximum_size_bytes self.assertEqual(expected, actual) def test_has_ssd_true(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'storage.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) val.append(dr_json['drive3']) self.conn.get.return_value.json.side_effect = val self.assertTrue(self.sys_stor_col.has_ssd) def test_has_rotational(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'storage.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) val.append(dr_json['drive3']) self.conn.get.return_value.json.side_effect = val self.assertTrue(self.sys_stor_col.has_rotational) def test_has_nvme_ssd(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'storage.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) val.append(dr_json['drive3']) self.conn.get.return_value.json.side_effect = val self.assertTrue(self.sys_stor_col.has_nvme_ssd) def test_drive_rotational_speed_rpm(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'storage.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'drive.json') with open(path, 'r') as f: dr_json = json.loads(f.read()) val.append(dr_json['drive1']) val.append(dr_json['drive2']) val.append(dr_json['drive3']) self.conn.get.return_value.json.side_effect = val expected = set([15000, 10000]) self.assertEqual(expected, self.sys_stor_col.drive_rotational_speed_rpm) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/storage/test_volume.py0000664000175000017500000000774300000000000032170 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils.redfish.resources.system.storage import volume class VolumeTestCase(testtools.TestCase): def setUp(self): super(VolumeTestCase, self).setUp() self.conn = mock.Mock() vol_file = 'proliantutils/tests/redfish/json_samples/volume.json' with open(vol_file, 'r') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc vol_path = ("/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes/1") self.sys_vol = volume.Volume( self.conn, vol_path, redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_vol._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sys_vol.redfish_version) self.assertEqual('1', self.sys_vol.identity) self.assertEqual(899527000000, self.sys_vol.capacity_bytes) class VolumeCollectionTestCase(testtools.TestCase): def setUp(self): super(VolumeCollectionTestCase, self).setUp() self.conn = mock.Mock() with open('proliantutils/tests/redfish/json_samples/' 'volume_collection.json', 'r') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc self.sys_vol_col = volume.VolumeCollection( self.conn, '/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes', redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_vol_col._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sys_vol_col.redfish_version) self.assertEqual('Storage Volume Collection', self.sys_vol_col.name) vol_path = ('/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes/1',) self.assertEqual(vol_path, self.sys_vol_col.members_identities) @mock.patch.object(volume, 'Volume', autospec=True) def test_get_member(self, mock_vol): self.sys_vol_col.get_member( '/redfish/v1/Systems/437XR1138R2/Volumes/1') mock_vol.assert_called_once_with( self.sys_vol_col._conn, ('/redfish/v1/Systems/437XR1138R2/Volumes/1'), redfish_version=self.sys_vol_col.redfish_version, registries=None, root=self.sys_vol_col.root) @mock.patch.object(volume, 'Volume', autospec=True) def test_get_members(self, mock_vol): members = self.sys_vol_col.get_members() vol_path = ("/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes/1") calls = [ mock.call(self.sys_vol_col._conn, vol_path, redfish_version=self.sys_vol_col.redfish_version, registries=None, root=self.sys_vol_col.root), ] mock_vol.assert_has_calls(calls) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) def test_maximum_size_bytes(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'volume.json') with open(path, 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) expected = 899527000000 actual = self.sys_vol_col.maximum_size_bytes self.assertEqual(expected, actual) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/test_bios.py0000664000175000017500000005071500000000000030146 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import sushy import testtools from proliantutils import exception from proliantutils.redfish.resources.system import bios from proliantutils.redfish.resources.system import constants as sys_cons from proliantutils.redfish.resources.system import iscsi from proliantutils.redfish.resources.system import tls_config class BIOSSettingsTestCase(testtools.TestCase): def setUp(self): super(BIOSSettingsTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) self.bios_inst = bios.BIOSSettings( self.conn, '/redfish/v1/Systems/1/bios', redfish_version='1.0.2') def test_attributes(self): self.assertEqual(sys_cons.BIOS_BOOT_MODE_UEFI, self.bios_inst.boot_mode) self.assertEqual(sys_cons.SRIOV_ENABLED, self.bios_inst.sriov) self.assertEqual(sys_cons.CPUVT_ENABLED, self.bios_inst.cpu_vt) def test_pending_settings(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['BIOS_pending_settings_default']) actual_settings = self.bios_inst.pending_settings self.assertIsInstance(actual_settings, bios.BIOSPendingSettings) self.conn.get.return_value.json.assert_called_once_with() # reset mock self.conn.get.return_value.json.reset_mock() self.assertIs(actual_settings, self.bios_inst.pending_settings) self.conn.get.return_value.json.assert_not_called() def test_boot_settings(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/bios_boot.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) actual_settings = self.bios_inst.boot_settings self.assertIsInstance(actual_settings, bios.BIOSBootSettings) self.conn.get.return_value.json.assert_called_once_with() # reset mock self.conn.get.return_value.json.reset_mock() self.assertIs(actual_settings, self.bios_inst.boot_settings) self.conn.get.return_value.json.assert_not_called() def test_bios_mappings(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/bios_mappings.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) actual_settings = self.bios_inst.bios_mappings self.assertIsInstance(actual_settings, bios.BIOSMappings) self.conn.get.return_value.json.assert_called_once_with() # reset mock self.conn.get.return_value.json.reset_mock() self.assertIs(actual_settings, self.bios_inst.bios_mappings) self.conn.get.return_value.json.assert_not_called() def test_iscsi_resource(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/iscsi.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) actual_settings = self.bios_inst.iscsi_resource self.assertIsInstance(actual_settings, iscsi.ISCSIResource) self.conn.get.return_value.json.assert_called_once_with() # reset mock self.conn.get.return_value.json.reset_mock() self.assertIs(actual_settings, self.bios_inst.iscsi_resource) self.conn.get.return_value.json.assert_not_called() def test_tls_config(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/tls_config.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) actual_settings = self.bios_inst.tls_config self.assertIsInstance(actual_settings, tls_config.TLSConfig) self.conn.get.return_value.json.assert_called_once_with() # reset mock self.conn.get.return_value.json.reset_mock() self.assertIs(actual_settings, self.bios_inst.tls_config) self.conn.get.return_value.json.assert_not_called() def test__get_base_configs(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_base_configs.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) default_settings = self.bios_inst._get_base_configs() self.assertIsInstance(default_settings, bios.BIOSBaseConfigs) def test_pending_settings_on_refresh(self): with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['BIOS_pending_settings_default']) actual_settings = self.bios_inst.pending_settings self.assertIsInstance(actual_settings, bios.BIOSPendingSettings) with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) self.bios_inst.invalidate() self.bios_inst.refresh(force=False) self.assertTrue(actual_settings._is_stale) with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['BIOS_pending_settings_default']) self.assertIsInstance(self.bios_inst.pending_settings, bios.BIOSPendingSettings) self.assertFalse(actual_settings._is_stale) def test_boot_settings_on_refresh(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_boot.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) actual_settings = self.bios_inst.boot_settings self.assertIsInstance(actual_settings, bios.BIOSBootSettings) with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) self.bios_inst.invalidate() self.bios_inst.refresh(force=False) self.assertTrue(actual_settings._is_stale) with open('proliantutils/tests/redfish/' 'json_samples/bios_boot.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) self.assertIsInstance(self.bios_inst.boot_settings, bios.BIOSBootSettings) self.assertFalse(actual_settings._is_stale) def test_bios_mappings_on_refresh(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_mappings.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) actual_settings = self.bios_inst.bios_mappings self.assertIsInstance(actual_settings, bios.BIOSMappings) with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) self.bios_inst.invalidate() self.bios_inst.refresh(force=False) self.assertTrue(actual_settings._is_stale) with open('proliantutils/tests/redfish/' 'json_samples/bios_mappings.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) self.assertIsInstance(self.bios_inst.bios_mappings, bios.BIOSMappings) self.assertFalse(actual_settings._is_stale) def test_iscsi_resource_on_refresh(self): with open('proliantutils/tests/redfish/' 'json_samples/iscsi.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) actual_settings = self.bios_inst.iscsi_resource self.assertIsInstance(actual_settings, iscsi.ISCSIResource) with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) self.bios_inst.invalidate() self.bios_inst.refresh(force=False) self.assertTrue(actual_settings._is_stale) with open('proliantutils/tests/redfish/' 'json_samples/iscsi.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) self.assertIsInstance(self.bios_inst.iscsi_resource, iscsi.ISCSIResource) self.assertFalse(actual_settings._is_stale) def test__get_base_configs_on_refresh(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_base_configs.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) default_settings = self.bios_inst._get_base_configs() self.assertIsInstance(default_settings, bios.BIOSBaseConfigs) with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) self.bios_inst.invalidate() self.bios_inst.refresh(force=False) self.assertTrue(default_settings._is_stale) with open('proliantutils/tests/redfish/' 'json_samples/bios_base_configs.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) self.assertIsInstance(self.bios_inst._get_base_configs(), bios.BIOSBaseConfigs) self.assertFalse(default_settings._is_stale) class BIOSBaseConfigsTestCase(testtools.TestCase): def setUp(self): super(BIOSBaseConfigsTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/bios_base_configs.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) self.bios_base_inst = bios.BIOSBaseConfigs( self.conn, '/redfish/v1/Systems/1/bios/baseconfigs', redfish_version='1.0.2') def test_attributes(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_base_configs.json', 'r') as f: bios_default = json.loads(f.read())['BaseConfigs'][0]['default'] self.assertEqual(bios_default, self.bios_base_inst.default_config) class BIOSPendingSettingsTestCase(testtools.TestCase): def setUp(self): super(BIOSPendingSettingsTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['BIOS_pending_settings_default']) self.bios_settings_inst = bios.BIOSPendingSettings( self.conn, '/redfish/v1/Systems/1/bios/settings', redfish_version='1.0.2') def test_attributes(self): self.assertEqual(sys_cons.BIOS_BOOT_MODE_UEFI, self.bios_settings_inst.boot_mode) def test_set_pending_boot_mode_bios(self): self.bios_settings_inst.set_pending_boot_mode( sys_cons.BIOS_BOOT_MODE_LEGACY_BIOS) data = { 'Attributes': { 'BootMode': 'LegacyBios' } } self.bios_settings_inst._conn.patch.assert_called_once_with( '/redfish/v1/Systems/1/bios/settings', data=data) def test_set_pending_boot_mode_uefi(self): self.bios_settings_inst.set_pending_boot_mode( sys_cons.BIOS_BOOT_MODE_UEFI) data = { 'Attributes': { 'BootMode': 'Uefi', 'UefiOptimizedBoot': 'Enabled' } } self.bios_settings_inst._conn.patch.assert_called_once_with( '/redfish/v1/Systems/1/bios/settings', data=data) def test_update_bios_data_by_post(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_base_configs.json', 'r') as f: bios_settings = json.loads(f.read())['BaseConfigs'][0]['default'] target_uri = '/redfish/v1/Systems/1/bios/settings' data = { 'Attributes': bios_settings } self.bios_settings_inst.update_bios_data_by_post(bios_settings) self.bios_settings_inst._conn.post.assert_called_once_with(target_uri, data=data) def test_update_bios_data_by_patch(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_base_configs.json', 'r') as f: bios_settings = json.loads(f.read())['BaseConfigs'][0]['default'] target_uri = '/redfish/v1/Systems/1/bios/settings' data = { 'Attributes': bios_settings } self.bios_settings_inst.update_bios_data_by_patch(bios_settings) self.bios_settings_inst._conn.patch.assert_called_once_with(target_uri, data=data) class BIOSBootSettingsTestCase(testtools.TestCase): def setUp(self): super(BIOSBootSettingsTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/bios_boot.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) self.bios_boot_inst = bios.BIOSBootSettings( self.conn, '/redfish/v1/Systems/1/bios/boot', redfish_version='1.0.2') def test__attributes(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_boot.json', 'r') as f: boot_json = (json.loads(f.read())['Default']) self.assertEqual(boot_json['BootSources'], self.bios_boot_inst.boot_sources) self.assertEqual(boot_json['PersistentBootConfigOrder'], self.bios_boot_inst.persistent_boot_config_order) def test_get_persistent_boot_device(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_boot.json', 'r') as f: boot_json = (json.loads(f.read())['Default']) self.bios_boot_inst.persistent_boot_config_order = ( boot_json['PersistentBootConfigOrder']) self.bios_boot_inst.boot_sources = boot_json['BootSources'] result = self.bios_boot_inst.get_persistent_boot_device() self.assertEqual(result, sushy.BOOT_SOURCE_TARGET_HDD) def test_get_persistent_boot_device_without_boot(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_boot.json', 'r') as f: boot_json = (json.loads(f.read())['BIOS_boot_without_boot']) self.bios_boot_inst.boot_sources = boot_json['BootSources'] self.bios_boot_inst.persistent_boot_config_order = ( boot_json['PersistentBootConfigOrder']) self.assertRaisesRegex( exception.IloError, 'Persistent boot device failed, as no matched boot sources ' 'found for device:', self.bios_boot_inst.get_persistent_boot_device) def test_get_persistent_boot_device_none(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_boot.json', 'r') as f: boot_json = ( json.loads(f.read())['BIOS_persistent_boot_device_none']) self.bios_boot_inst.boot_sources = boot_json['BootSources'] self.bios_boot_inst.persistent_boot_config_order = ( boot_json['PersistentBootConfigOrder']) result = self.bios_boot_inst.get_persistent_boot_device() self.assertEqual(result, sushy.BOOT_SOURCE_TARGET_NONE) def test_get_persistent_boot_device_boot_sources_is_none(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_boot.json', 'r') as f: boot_json = ( json.loads(f.read())['BIOS_boot_without_boot_sources']) self.bios_boot_inst.boot_sources = boot_json['BootSources'] self.bios_boot_inst.persistent_boot_config_order = ( boot_json['PersistentBootConfigOrder']) self.assertRaisesRegex( exception.IloError, 'Boot sources or persistent boot config order not found', self.bios_boot_inst.get_persistent_boot_device) def test_get_uefi_boot_string(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_boot.json', 'r') as f: boot_json = (json.loads(f.read())['Default']) self.bios_boot_inst.boot_sources = boot_json['BootSources'] result = self.bios_boot_inst.get_uefi_boot_string('C4346BB7EF30') self.assertEqual(result, 'NIC.LOM.1.1.iSCSI') def test_get_uefi_boot_string_boot_sources_is_none(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_boot.json', 'r') as f: boot_json = ( json.loads(f.read())['BIOS_boot_without_boot_sources']) self.bios_boot_inst.boot_sources = boot_json['BootSources'] self.assertRaisesRegex( exception.IloError, 'Boot sources are not found', self.bios_boot_inst.get_uefi_boot_string, '123456') def test_get_uefi_boot_string_mac_invalid(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_boot.json', 'r') as f: boot_json = (json.loads(f.read())['Default']) self.bios_boot_inst.boot_sources = boot_json['BootSources'] self.assertRaisesRegex( exception.IloError, 'MAC provided "123456" is Invalid', self.bios_boot_inst.get_uefi_boot_string, '123456') class BIOSMappingsTestCase(testtools.TestCase): def setUp(self): super(BIOSMappingsTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/bios_mappings.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) self.bios_mappings_inst = bios.BIOSMappings( self.conn, '/redfish/v1/Systems/1/bios/mappings', redfish_version='1.0.2') def test_attributes(self): with open('proliantutils/tests/redfish/' 'json_samples/bios_mappings.json', 'r') as f: pci_settings_mappings = ( json.loads(f.read())['Default']['BiosPciSettingsMappings']) self.assertEqual( pci_settings_mappings, self.bios_mappings_inst.pci_settings_mappings) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/test_ethernet_interface.py0000664000175000017500000001351600000000000033046 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import sushy import testtools from proliantutils.redfish.resources.system import ethernet_interface class EthernetInterfaceTestCase(testtools.TestCase): def setUp(self): super(EthernetInterfaceTestCase, self).setUp() self.conn = mock.Mock() eth_file = ('proliantutils/tests/redfish/json_samples/' 'ethernet_interface.json') with open(eth_file, 'r') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc['default'] eth_path = ("/redfish/v1/Systems/437XR1138R2/EthernetInterfaces/" "12446A3B0411") self.sys_eth = ethernet_interface.EthernetInterface( self.conn, eth_path, redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_eth._parse_attributes(self.json_doc['default']) self.assertEqual('1.0.2', self.sys_eth.redfish_version) self.assertEqual('1', self.sys_eth.identity) self.assertEqual('Ethernet Interface', self.sys_eth.name) self.assertEqual('System NIC 1', self.sys_eth.description) self.assertEqual( '12:44:6A:3B:04:11', self.sys_eth.permanent_mac_address) self.assertEqual('12:44:6A:3B:04:11', self.sys_eth.mac_address) self.assertEqual(sushy.STATE_ENABLED, self.sys_eth.status.state) self.assertEqual(sushy.HEALTH_OK, self.sys_eth.status.health) self.assertEqual(1000, self.sys_eth.speed_mbps) class EthernetInterfaceCollectionTestCase(testtools.TestCase): def setUp(self): super(EthernetInterfaceCollectionTestCase, self).setUp() self.conn = mock.Mock() with open('proliantutils/tests/redfish/json_samples/' 'ethernet_interface_collection.json', 'r') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc self.sys_eth_col = ethernet_interface.EthernetInterfaceCollection( self.conn, '/redfish/v1/Systems/437XR1138R2/EthernetInterfaces', '1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_eth_col._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sys_eth_col.redfish_version) self.assertEqual('Ethernet Interface Collection', self.sys_eth_col.name) eth_path = ('/redfish/v1/Systems/437XR1138R2/EthernetInterfaces/' '12446A3B0411',) self.assertEqual(eth_path, self.sys_eth_col.members_identities) @mock.patch.object(ethernet_interface, 'EthernetInterface', autospec=True) def test_get_member(self, mock_eth): self.sys_eth_col.get_member( '/redfish/v1/Systems/437XR1138R2/EthernetInterfaces/' '12446A3B0411') mock_eth.assert_called_once_with( self.sys_eth_col._conn, ('/redfish/v1/Systems/437XR1138R2/EthernetInterfaces/' '12446A3B0411'), redfish_version=self.sys_eth_col.redfish_version, registries=None, root=self.sys_eth_col.root) @mock.patch.object(ethernet_interface, 'EthernetInterface', autospec=True) def test_get_members(self, mock_eth): members = self.sys_eth_col.get_members() eth_path = ("/redfish/v1/Systems/437XR1138R2/EthernetInterfaces/" "12446A3B0411") calls = [ mock.call(self.sys_eth_col._conn, eth_path, redfish_version=self.sys_eth_col.redfish_version, registries=None, root=self.sys_eth_col.root), ] mock_eth.assert_has_calls(calls) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) def test_summary(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'ethernet_interface.json') with open(path, 'r') as f: self.conn.get.return_value.json.return_value = json.loads( f.read())['default'] expected_summary = {'Port 1': '12:44:6A:3B:04:11'} actual_summary = self.sys_eth_col.summary self.assertEqual(expected_summary, actual_summary) def test_get_uefi_device_path_by_mac(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'ethernet_interface.json') with open(path, 'r') as f: self.conn.get.return_value.json.return_value = json.loads( f.read())['latest'] result = self.sys_eth_col.get_uefi_device_path_by_mac( '98:f2:b3:2a:0e:3d') self.assertEqual( 'PciRoot(0x0)/Pci(0x1C,0x0)/Pci(0x0,0x0)', result) def test_get_all_macs(self): self.conn.get.return_value.json.reset_mock() path = ('proliantutils/tests/redfish/json_samples/' 'ethernet_interface.json') with open(path, 'r') as f: self.conn.get.return_value.json.return_value = json.loads( f.read())['latest'] result = self.sys_eth_col.get_all_macs() self.assertEqual(['98:f2:b3:2a:0e:3d'], result) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/test_iscsi.py0000664000175000017500000001250000000000000030312 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import ddt import testtools from proliantutils.redfish.resources.system import iscsi from proliantutils.redfish import utils @ddt.ddt class ISCSIResourceTestCase(testtools.TestCase): def setUp(self): super(ISCSIResourceTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/iscsi.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) self.iscsi_inst = iscsi.ISCSIResource( self.conn, '/redfish/v1/Systems/1/bios/iscsi', redfish_version='1.0.2') @ddt.data((['GET', 'PATCH', 'POST', 'HEAD'], True), (['GET', 'HEAD'], False)) @ddt.unpack @mock.patch.object(utils, 'get_allowed_operations') def test_is_iscsi_boot_supported(self, allowed_method, expected, get_method_mock): get_method_mock.return_value = allowed_method ret_val = self.iscsi_inst.is_iscsi_boot_supported() self.assertEqual(ret_val, expected) def test_iscsi_settings(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/iscsi_settings.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) actual_settings = self.iscsi_inst.iscsi_settings self.assertIsInstance(actual_settings, iscsi.ISCSISettings) self.conn.get.return_value.json.assert_called_once_with() # reset mock self.conn.get.return_value.json.reset_mock() self.assertIs(actual_settings, self.iscsi_inst.iscsi_settings) self.conn.get.return_value.json.assert_not_called() def test_iscsi_settings_on_refresh(self): with open('proliantutils/tests/redfish/' 'json_samples/iscsi_settings.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) actual_settings = self.iscsi_inst.iscsi_settings self.assertIsInstance(actual_settings, iscsi.ISCSISettings) with open('proliantutils/tests/redfish/' 'json_samples/iscsi.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) self.iscsi_inst.invalidate() self.iscsi_inst.refresh(force=False) self.assertTrue(actual_settings._is_stale) with open('proliantutils/tests/redfish/' 'json_samples/iscsi_settings.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) self.assertIsInstance(self.iscsi_inst.iscsi_settings, iscsi.ISCSISettings) self.assertFalse(actual_settings._is_stale) def test_attributes(self): with open('proliantutils/tests/redfish/' 'json_samples/iscsi.json', 'r') as f: iscsi_initiator = ( json.loads(f.read())['iSCSIInitiatorName']) self.assertEqual( iscsi_initiator, self.iscsi_inst.iscsi_initiator) class ISCSISettingsTestCase(testtools.TestCase): def setUp(self): super(ISCSISettingsTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/iscsi_settings.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['Default']) self.iscsi_settings_inst = iscsi.ISCSISettings( self.conn, '/redfish/v1/Systems/1/bios/iscsi/settings', redfish_version='1.0.2') def test_update_iscsi_settings(self): target_uri = '/redfish/v1/Systems/1/bios/iscsi/settings' iscsi_data = {'iSCSITargetName': 'iqn.2011-07.com.example.server:test1', 'iSCSILUN': '1', 'iSCSITargetIpAddress': '10.10.1.30', 'iSCSITargetTcpPort': 3260, 'iSCSITargetInfoViaDHCP': False, 'iSCSIConnection': 'Enabled', 'iSCSIAttemptName': 'NicBoot1', 'iSCSINicSource': 'NicBoot1', 'iSCSIAttemptInstance': 1} data = { 'iSCSISources': iscsi_data } self.iscsi_settings_inst.update_iscsi_settings(data) self.iscsi_settings_inst._conn.patch.assert_called_once_with( target_uri, data=data) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/test_memory.py0000664000175000017500000000640200000000000030514 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils.redfish.resources.system import constants from proliantutils.redfish.resources.system import memory class MemoryTestCase(testtools.TestCase): def setUp(self): super(MemoryTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/logical_nvdimm.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['logical_nvdimm']) self.mem_inst = memory.Memory( self.conn, '/redfish/v1/Systems/1/Memory/proc1logicalnvdimm1/', redfish_version='1.0.2') def test_attributes(self): self.assertEqual('proc1logicalnvdimm1', self.mem_inst.identity) self.assertEqual('proc1logicalnvdimm1', self.mem_inst.name) self.assertEqual(constants.MEMORY_DEVICE_TYPE_LOGICAL, self.mem_inst.memory_device_type) self.assertEqual(constants.MEMORY_TYPE_NVDIMM_N, self.mem_inst.memory_type) class MemoryCollectionTestCase(testtools.TestCase): def setUp(self): super(MemoryCollectionTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/memory_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) self.mem_col_inst = memory.MemoryCollection( self.conn, '/redfish/v1/Systems/1/Memory/', redfish_version='1.0.2') def test_details_nvdimm_n(self): with open('proliantutils/tests/redfish/' 'json_samples/logical_nvdimm.json', 'r') as f: mem1 = ( json.loads(f.read())['default']) self.conn.get.return_value.json.return_value = mem1 ret = self.mem_col_inst.details() self.assertEqual(ret.has_persistent_memory, True) self.assertEqual(ret.has_nvdimm_n, True) self.assertEqual(ret.has_logical_nvdimm_n, False) def test_details_logical(self): with open('proliantutils/tests/redfish/' 'json_samples/logical_nvdimm.json', 'r') as f: mem1 = ( json.loads(f.read())['logical_nvdimm']) self.conn.get.return_value.json.return_value = mem1 ret = self.mem_col_inst.details() self.assertEqual(ret.has_persistent_memory, True) self.assertEqual(ret.has_nvdimm_n, True) self.assertEqual(ret.has_logical_nvdimm_n, True) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/test_pci_device.py0000664000175000017500000001365600000000000031307 0ustar00zuulzuul00000000000000# Copyright 2017-2022 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils.redfish.resources.system import pci_device class PCIDeviceTestCase(testtools.TestCase): def setUp(self): super(PCIDeviceTestCase, self).setUp() self.conn = mock.Mock() pci_file = 'proliantutils/tests/redfish/json_samples/pci_device.json' with open(pci_file, 'r') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc pci_path = "/redfish/v1/Systems/1/PCIDevices/1" self.sys_pci = pci_device.PCIDevice( self.conn, pci_path, redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_pci._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sys_pci.redfish_version) self.assertEqual('1', self.sys_pci.identity) self.assertEqual(1, self.sys_pci.nic_capacity) class PCIDeviceCollectionTestCase(testtools.TestCase): def setUp(self): super(PCIDeviceCollectionTestCase, self).setUp() self.conn = mock.Mock() with open('proliantutils/tests/redfish/json_samples/' 'pci_device_collection.json') as f: self.json_doc = json.load(f) self.conn.get.return_value.json.return_value = self.json_doc self.sys_pci_col = pci_device.PCIDeviceCollection( self.conn, '/redfish/v1/Systems/1/PCIDevices', redfish_version='1.0.2', registries=None, root=None) def test__parse_attributes(self): self.sys_pci_col._parse_attributes(self.json_doc) self.assertEqual('1.0.2', self.sys_pci_col.redfish_version) self.assertEqual('PciDevices', self.sys_pci_col.name) pci_path = ('/redfish/v1/Systems/1/PCIDevices/1', '/redfish/v1/Systems/1/PCIDevices/6') self.assertEqual(pci_path, self.sys_pci_col.members_identities) @mock.patch.object(pci_device, 'PCIDevice', autospec=True) def test_get_member(self, mock_pci): self.sys_pci_col.get_member( '/redfish/v1/Systems/1/PCIDevices/1') mock_pci.assert_called_once_with( self.sys_pci_col._conn, ('/redfish/v1/Systems/1/PCIDevices/1'), redfish_version=self.sys_pci_col.redfish_version, registries=None, root=self.sys_pci_col.root) @mock.patch.object(pci_device, 'PCIDevice', autospec=True) def test_get_members(self, mock_pci): members = self.sys_pci_col.get_members() path_list = ["/redfish/v1/Systems/1/PCIDevices/1", "/redfish/v1/Systems/1/PCIDevices/6"] calls = [ mock.call(self.sys_pci_col._conn, path_list[0], redfish_version=self.sys_pci_col.redfish_version, registries=None, root=self.sys_pci_col.root), mock.call(self.sys_pci_col._conn, path_list[1], redfish_version=self.sys_pci_col.redfish_version, registries=None, root=self.sys_pci_col.root) ] mock_pci.assert_has_calls(calls) self.assertIsInstance(members, list) self.assertEqual(2, len(members)) def test_gpu_devices(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'pci_device.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'pci_device1.json') with open(path, 'r') as f: val.append(json.loads(f.read())) self.conn.get.return_value.json.side_effect = val expected = ["/redfish/v1/Systems/1/PCIDevices/6/"] actual = self.sys_pci_col.gpu_devices self.assertEqual(1, len(actual)) self.assertEqual(expected, actual) def test_max_nic_capacity(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'pci_device.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'pci_device1.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'pci_device2.json') with open(path, 'r') as f: val.append(json.loads(f.read())) self.conn.get.return_value.json.side_effect = val actual_capacity = self.sys_pci_col.max_nic_capacity expected = '1Gb' self.assertEqual(expected, actual_capacity) def test_vendor_id(self): self.conn.get.return_value.json.reset_mock() val = [] path = ('proliantutils/tests/redfish/json_samples/' 'pci_device.json') with open(path, 'r') as f: val.append(json.loads(f.read())) path = ('proliantutils/tests/redfish/json_samples/' 'pci_device1.json') with open(path, 'r') as f: val.append(json.loads(f.read())) self.conn.get.return_value.json.side_effect = val expected_vendor_id = {'6': 4139} self.assertEqual(expected_vendor_id, self.sys_pci_col.vendor_id) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/test_secure_boot.py0000664000175000017500000001100200000000000031505 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils import exception from proliantutils.redfish.resources.system import constants as sys_cons from proliantutils.redfish.resources.system import secure_boot class SecureBootTestCase(testtools.TestCase): def setUp(self): super(SecureBootTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/secure_boot.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['default']) self.secure_boot_inst = secure_boot.SecureBoot( self.conn, '/redfish/v1/Systems/1/SecureBoot', redfish_version='1.0.2') def test_field_attributes(self): self.assertEqual('UEFI Secure Boot', self.secure_boot_inst.name) self.assertEqual(sys_cons.SECUREBOOT_CURRENT_BOOT_DISABLED, self.secure_boot_inst.current_boot) self.assertFalse(self.secure_boot_inst.enable) self.assertEqual('UserMode', self.secure_boot_inst.mode) def test_enable_secure_boot(self): self.secure_boot_inst.enable_secure_boot(True) self.secure_boot_inst._conn.patch.assert_called_once_with( '/redfish/v1/Systems/1/SecureBoot', data={'SecureBootEnable': True}) def test_enable_secure_boot_invalid_value(self): self.assertRaisesRegex( exception.InvalidInputError, 'The parameter "secure_boot_enable" value "some-non-boolean" is ' 'invalid. Valid values are: True/False.', self.secure_boot_inst.enable_secure_boot, 'some-non-boolean') def test__get_reset_keys_action_element(self): value = self.secure_boot_inst._get_reset_keys_action_element() self.assertEqual('/redfish/v1/Systems/1/SecureBoot/Actions/' 'SecureBoot.ResetKeys', value.target_uri) self.assertEqual(['ResetAllKeysToDefault', 'DeleteAllKeys', 'DeletePK'], value.allowed_values) def test__get_reset_keys_action_element_missing_action(self): self.secure_boot_inst._actions.reset_keys = None self.assertRaisesRegex( exception.MissingAttributeError, 'Actions/#SecureBoot.ResetKeys is missing', self.secure_boot_inst._get_reset_keys_action_element) def test_get_allowed_reset_keys_values(self): values = self.secure_boot_inst.get_allowed_reset_keys_values() expected = set([sys_cons.SECUREBOOT_RESET_KEYS_DEFAULT, sys_cons.SECUREBOOT_RESET_KEYS_DELETE_ALL, sys_cons.SECUREBOOT_RESET_KEYS_DELETE_PK]) self.assertEqual(expected, values) self.assertIsInstance(values, set) def test_get_allowed_reset_keys_values_no_values_specified(self): self.secure_boot_inst._actions.reset_keys.allowed_values = None values = self.secure_boot_inst.get_allowed_reset_keys_values() # Assert it returns all values if it can't get the specific ones expected = set([sys_cons.SECUREBOOT_RESET_KEYS_DEFAULT, sys_cons.SECUREBOOT_RESET_KEYS_DELETE_ALL, sys_cons.SECUREBOOT_RESET_KEYS_DELETE_PK]) self.assertEqual(expected, values) self.assertIsInstance(values, set) def test_reset_keys(self): self.secure_boot_inst.reset_keys( sys_cons.SECUREBOOT_RESET_KEYS_DEFAULT) self.secure_boot_inst._conn.post.assert_called_once_with( '/redfish/v1/Systems/1/SecureBoot/Actions/SecureBoot.ResetKeys', data={'ResetKeysType': 'ResetAllKeysToDefault'}) def test_reset_keys_invalid_value(self): self.assertRaises(exception.InvalidInputError, self.secure_boot_inst.reset_keys, 'invalid-value') ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/test_smart_storage_config.py0000664000175000017500000002724300000000000033411 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils import exception from proliantutils.hpssa import manager from proliantutils.redfish.resources.system import smart_storage_config from proliantutils.redfish.resources.system.storage import \ mappings as storage_map class HPESmartStorageConfigTestCase(testtools.TestCase): def setUp(self): super(HPESmartStorageConfigTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/smart_storage_config.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.load(f)) self.ssc_inst = smart_storage_config.HPESmartStorageConfig( self.conn, '/redfish/v1/Systems/1/smartstorageconfig', redfish_version='1.0.2') def test_attributes(self): physical_drive = [{'LegacyBootPriority': 'None', 'Location': '1I:1:2', 'LocationFormat': 'ControllerPort:Box:Bay'}] self.assertEqual('smartstorageconfig', self.ssc_inst.controller_id) self.assertEqual('Slot 0', self.ssc_inst.location) self.assertEqual(physical_drive, self.ssc_inst.physical_drives) self.assertEqual( '600508B1001C045A9BAAC9F4F49498AE', self.ssc_inst.logical_drives[0].volume_unique_identifier) self.assertEqual( ["2I:1:2", "2I:1:1"], self.ssc_inst.logical_drives[0].data_drives) self.assertEqual("/redfish/v1/systems/1/smartstorageconfig/settings/", self.ssc_inst.settings_uri) def test_delete_raid(self): settings_uri = "/redfish/v1/systems/1/smartstorageconfig/settings/" data = { "LogicalDrives": [{ "Actions": [{"Action": "LogicalDriveDelete"}], "VolumeUniqueIdentifier": "600508B1001C045A9BAAC9F4F49498AE"}], "DataGuard": "Permissive", } self.ssc_inst.delete_raid() self.ssc_inst._conn.put.assert_called_once_with(settings_uri, data=data) def test_delete_raid_logical_drive_not_found(self): type(self.ssc_inst).logical_drives = mock.PropertyMock( return_value=[]) self.assertRaises(exception.IloLogicalDriveNotFoundError, self.ssc_inst.delete_raid) @mock.patch.object(manager, 'validate', autospec=True) def test_create_raid(self, validate_mock): settings_uri = "/redfish/v1/systems/1/smartstorageconfig/settings/" ld1 = {'size_gb': 50, 'raid_level': '1', 'physical_disks': ['5I:1:1', '5I:1:2']} raid_config = {'logical_disks': [ld1]} validate_mock.return_value = True self.ssc_inst.create_raid(raid_config) data = {"DataGuard": "Disabled", "LogicalDrives": [ {"CapacityGiB": 50, "Raid": "Raid1", "DataDrives": ['5I:1:1', '5I:1:2']}]} validate_mock.assert_called_once_with(raid_config) self.ssc_inst._conn.put.assert_called_once_with(settings_uri, data=data) @mock.patch.object(manager, 'validate', autospec=True) def test_create_raid_multiple_logical_drives(self, validate_mock): settings_uri = "/redfish/v1/systems/1/smartstorageconfig/settings/" ld1 = {'size_gb': 50, 'raid_level': '0', 'physical_disks': ['5I:1:1']} ld2 = {'size_gb': 100, 'raid_level': '1', 'number_of_physical_disks': 2} raid_config = {'logical_disks': [ld1, ld2]} validate_mock.return_value = True self.ssc_inst.create_raid(raid_config) data = {"DataGuard": "Disabled", "LogicalDrives": [ {"CapacityGiB": 50, "Raid": "Raid0", "DataDrives": ['5I:1:1']}, {"CapacityGiB": 100, "Raid": "Raid1", "DataDrives": {"DataDriveCount": 2}}]} validate_mock.assert_called_once_with(raid_config) self.ssc_inst._conn.put.assert_called_once_with(settings_uri, data=data) def test__generic_format_delete_scenario(self): expected_data = [] raid_config = {"LogicalDrives": []} self.assertEqual(expected_data, self.ssc_inst._generic_format(raid_config)) def test__generic_format_create_scenario(self): expected_data = [{'controller': 'HPE Smart Array P408i-p SR Gen10', 'physical_disks': [u'2I:1:2', u'2I:1:1'], 'raid_level': u'0', 'root_device_hint': { 'wwn': u'0x600508B1001C045A9BAAC9F4F49498AE'}, 'size_gb': 2235, 'volume_name': u'01A27294PFJHD0ARCA218H 63E0'}] result = self.ssc_inst._generic_format( self.ssc_inst.json, controller='HPE Smart Array P408i-p SR Gen10') self.assertEqual(expected_data, result) def test__check_smart_storage_message(self): result, mesg = self.ssc_inst._check_smart_storage_message() self.assertEqual(True, result) self.assertEqual("", mesg) @mock.patch.object(smart_storage_config.HPESmartStorageConfig, '_check_smart_storage_message', autospec=True) @mock.patch.object(smart_storage_config.HPESmartStorageConfig, '_generic_format', autospec=True) def test_read_raid_post_create(self, format_mock, message_mock): message_mock.return_value = True, 'Success' ld1 = {"size_gb": 150, "raid_level": '0', "is_root_volume": True} type(self.ssc_inst).logical_drives = mock.PropertyMock( return_value=[ld1]) ld1['controller'] = 'HPE Smart Array P408i-p SR Gen10' format_mock.return_value = [ld1] expected = {'logical_disks': [ld1]} self.assertEqual( expected, self.ssc_inst.read_raid(controller=ld1['controller'])) self.assertTrue(message_mock.called) self.assertTrue(format_mock.called) @mock.patch.object(smart_storage_config.HPESmartStorageConfig, '_check_smart_storage_message', autospec=True) @mock.patch.object(smart_storage_config.HPESmartStorageConfig, '_generic_format', autospec=True) def test_read_raid_post_delete(self, format_mock, message_mock): message_mock.return_value = True, 'Success' format_mock.return_value = [] type(self.ssc_inst).logical_drives = mock.PropertyMock( return_value=[]) expected = {'logical_disks': []} self.assertEqual(expected, self.ssc_inst.read_raid()) self.assertTrue(message_mock.called) self.assertTrue(format_mock.called) @mock.patch.object(smart_storage_config.HPESmartStorageConfig, '_check_smart_storage_message', autospec=True) def test_read_raid_failed(self, message_mock): ld1 = {"size_gb": 150, "raid_level": '0', "is_root_volume": True} type(self.ssc_inst).logical_drives = mock.PropertyMock( return_value=[ld1]) ld1['controller'] = 'HPE Smart Array P408i-p SR Gen10' physical_drive = [{'LegacyBootPriority': 'None', 'Location': '1I:1:2', 'LocationFormat': 'ControllerPort:Box:Bay'}] type(self.ssc_inst).physical_drives = mock.PropertyMock( return_value=physical_drive) message_mock.return_value = False, 'err_mesg' self.assertRaisesRegex( exception.IloError, 'Failed to perform the create_raid operation successfully', self.ssc_inst.read_raid, ld1['controller']) def test_read_raid_logical_drive_not_found(self): type(self.ssc_inst).logical_drives = mock.PropertyMock( return_value=[]) model = 'HPE Smart Array P408i-p SR Gen10' self.assertRaises(exception.IloLogicalDriveNotFoundError, self.ssc_inst.read_raid, model) @mock.patch.object(smart_storage_config.HPESmartStorageConfig, '_check_smart_storage_message', autospec=True) @mock.patch.object(smart_storage_config.HPESmartStorageConfig, '_generic_format', autospec=True) def test_read_raid_controller_not_configured_post_delete( self, format_mock, message_mock): message_mock.return_value = False, '' type(self.ssc_inst).physical_drives = mock.PropertyMock( return_value=None) self.ssc_inst.read_raid() self.assertTrue(message_mock.called) self.assertFalse(format_mock.called) def test_disk_erase_hdd(self): settings_uri = "/redfish/v1/systems/1/smartstorageconfig/settings/" self.ssc_inst.disk_erase(['1I:0:1'], 'HDD', None) data = {"Actions": [{"Action": "PhysicalDriveErase", "ErasePattern": "SanitizeRestrictedOverwrite", "PhysicalDriveList": ['1I:0:1']}], "DataGuard": "Disabled"} self.ssc_inst._conn.patch.assert_called_once_with(settings_uri, data=data) def test_disk_erase_ssd(self): settings_uri = "/redfish/v1/systems/1/smartstorageconfig/settings/" self.ssc_inst.disk_erase(['1I:0:1', '1I:0:2'], 'SSD', None) data = {"Actions": [{"Action": "PhysicalDriveErase", "ErasePattern": "SanitizeRestrictedBlockErase", "PhysicalDriveList": ['1I:0:1', '1I:0:2']}], "DataGuard": "Disabled"} self.ssc_inst._conn.patch.assert_called_once_with(settings_uri, data=data) def test_disk_erase_ssd_user_pattern_zero(self): settings_uri = "/redfish/v1/systems/1/smartstorageconfig/settings/" self.ssc_inst.disk_erase(['1I:0:1', '1I:0:2'], 'SSD', 'zero') data = { "Actions": [{"Action": "PhysicalDriveErase", "ErasePattern": storage_map.DISK_ERASE_PATTERN[ 'zero'], "PhysicalDriveList": ['1I:0:1', '1I:0:2']}], "DataGuard": "Disabled"} self.ssc_inst._conn.patch.assert_called_once_with(settings_uri, data=data) def test_get_drives_has_raid(self): with open('proliantutils/tests/redfish/' 'json_samples/smart_storage_config.json', 'r') as f: ssc_json = json.loads(f.read()) ld_mock = mock.MagicMock( spec=smart_storage_config.LogicalDriveListField) ld_mock.data_drives = ssc_json['LogicalDrives'][0]['DataDrives'] type(self.ssc_inst).logical_drives = mock.PropertyMock( return_value=[ld_mock]) result = self.ssc_inst.get_drives_has_raid() self.assertEqual(result, ["2I:1:2", "2I:1:1"]) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/test_system.py0000664000175000017500000016603000000000000030534 0ustar00zuulzuul00000000000000# Copyright 2018-2022 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import sushy from sushy.resources.system import system as sushy_system import testtools from proliantutils import exception from proliantutils.redfish.resources.system import bios from proliantutils.redfish.resources.system import constants as sys_cons from proliantutils.redfish.resources.system import ethernet_interface from proliantutils.redfish.resources.system import memory from proliantutils.redfish.resources.system import secure_boot from proliantutils.redfish.resources.system import smart_storage_config from proliantutils.redfish.resources.system.storage import array_controller from proliantutils.redfish.resources.system.storage import simple_storage from proliantutils.redfish.resources.system.storage import smart_storage from proliantutils.redfish.resources.system.storage import storage from proliantutils.redfish.resources.system import system from proliantutils.redfish import utils class HPESystemTestCase(testtools.TestCase): def setUp(self): super(HPESystemTestCase, self).setUp() self.conn = mock.MagicMock() self.conn.get.return_value.headers = {'Allow': 'GET,HEAD'} with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) self.conn.get.return_value.json.return_value = system_json['default'] self.sys_inst = system.HPESystem( self.conn, '/redfish/v1/Systems/1', redfish_version='1.0.2') def test_attributes(self): self.assertEqual(sys_cons.SUPPORTED_LEGACY_BIOS_AND_UEFI, self.sys_inst.supported_boot_mode) def test__get_hpe_one_button_secure_erase_action_element(self): value = self.sys_inst._get_hpe_one_button_secure_erase_action_element() self.assertEqual("/redfish/v1/Systems/1/Actions/Oem/Hpe/" "HpeComputerSystemExt.SecureSystemErase", value.target_uri) def test__get_hpe_one_button_secure_erase_action_element_missing_action( self): (self.sys_inst._hpe_actions. computer_system_ext_one_button_secure_erase) = None self.assertRaisesRegex( exception.MissingAttributeError, 'Oem/Hpe/Actions/#HpeComputerSystemExt.SecureSystemErase is ' 'missing', self.sys_inst._get_hpe_one_button_secure_erase_action_element) def test__get_hpe_push_power_button_action_element(self): value = self.sys_inst._get_hpe_push_power_button_action_element() self.assertEqual("/redfish/v1/Systems/1/Actions/Oem/Hpe/" "HpeComputerSystemExt.PowerButton/", value.target_uri) self.assertEqual(["Press", "PressAndHold"], value.allowed_values) def test__get_hpe_push_power_button_action_element_missing_action(self): self.sys_inst._hpe_actions.computer_system_ext_powerbutton = None self.assertRaisesRegex( exception.MissingAttributeError, 'Oem/Hpe/Actions/#HpeComputerSystemExt.PowerButton is missing', self.sys_inst._get_hpe_push_power_button_action_element) def test_push_power_button(self): self.sys_inst.push_power_button( sys_cons.PUSH_POWER_BUTTON_PRESS) self.sys_inst._conn.post.assert_called_once_with( '/redfish/v1/Systems/1/Actions/Oem/Hpe/' 'HpeComputerSystemExt.PowerButton/', data={'PushType': 'Press'}) def test_push_power_button_invalid_value(self): self.assertRaises(exception.InvalidInputError, self.sys_inst.push_power_button, 'invalid-value') def test_bios_settings(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) actual_bios = self.sys_inst.bios_settings self.assertIsInstance(actual_bios, bios.BIOSSettings) self.conn.get.return_value.json.assert_called_once_with() # reset mock self.conn.get.return_value.json.reset_mock() self.assertIs(actual_bios, self.sys_inst.bios_settings) self.conn.get.return_value.json.assert_not_called() @mock.patch.object(sushy_system.System, 'set_system_boot_source') def test_update_persistent_boot_persistent(self, set_system_boot_source_mock): self.sys_inst.update_persistent_boot(['CDROM'], persistent=True) set_system_boot_source_mock.assert_called_once_with( sushy.BOOT_SOURCE_TARGET_CD, enabled=sushy.BOOT_SOURCE_ENABLED_CONTINUOUS) @mock.patch.object(sushy_system.System, 'set_system_boot_source') def test_update_persistent_boot_device_unknown_persistent( self, set_system_boot_source_mock): self.sys_inst.update_persistent_boot(['unknown'], persistent=True) set_system_boot_source_mock.assert_called_once_with( sushy.BOOT_SOURCE_TARGET_NONE, enabled=sushy.BOOT_SOURCE_ENABLED_CONTINUOUS) @mock.patch.object(sushy_system.System, 'set_system_boot_source') def test_update_persistent_boot_not_persistent( self, set_system_boot_source_mock): self.sys_inst.update_persistent_boot(['CDROM'], persistent=False) set_system_boot_source_mock.assert_called_once_with( sushy.BOOT_SOURCE_TARGET_CD, enabled=sushy.BOOT_SOURCE_ENABLED_ONCE) def test_bios_settings_on_refresh(self): # | GIVEN | with open('proliantutils/tests/redfish/json_samples/bios.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) # | WHEN & THEN | actual_bios_settings = self.sys_inst.bios_settings self.assertIsInstance(actual_bios_settings, bios.BIOSSettings) # On refreshing the system instance... with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['default']) self.sys_inst.invalidate() self.sys_inst.refresh(force=False) # | WHEN & THEN | self.assertTrue(actual_bios_settings._is_stale) # | GIVEN | with open('proliantutils/tests/redfish/json_samples/bios.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) # | WHEN & THEN | self.assertIsInstance(self.sys_inst.bios_settings, bios.BIOSSettings) self.assertFalse(actual_bios_settings._is_stale) def test_update_persistent_boot_uefi_target(self): with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = (json.loads(f.read())[ 'System_op_for_update_persistent_boot_uefi_target']) self.sys_inst.uefi_target_override_devices = (system_json[ 'Boot']['UefiTargetBootSourceOverride@Redfish.AllowableValues']) self.sys_inst.update_persistent_boot(['ISCSI'], persistent=True) uefi_boot_settings = { 'Boot': {'UefiTargetBootSourceOverride': 'PciRoot(0x0)/Pci(0x1C,0x0)/Pci(0x0,0x0)/MAC(98F2B3EEF886,0x0)/IPv4(172.17.1.32)/iSCSI(iqn.2001-04.com.paresh.boot:volume.bin,0x1,0x0,None,None,None,TCP)'} # noqa } calls = [mock.call('/redfish/v1/Systems/1', data=uefi_boot_settings), mock.call('/redfish/v1/Systems/1', data={'Boot': {'BootSourceOverrideTarget': 'UefiTarget', 'BootSourceOverrideEnabled': 'Continuous'}}, etag=None)] self.sys_inst._conn.patch.assert_has_calls(calls) def test_update_persistent_boot_uefi_no_iscsi_device(self): self.assertRaisesRegex( exception.IloError, 'No UEFI iSCSI bootable device found on system.', self.sys_inst.update_persistent_boot, ['ISCSI'], True) def test_update_persistent_boot_uefi_target_fail(self): update_mock = mock.PropertyMock( side_effect=sushy.exceptions.SushyError) type(self.sys_inst).uefi_target_override_devices = update_mock self.assertRaisesRegex( exception.IloError, 'Unable to get uefi target override devices.', self.sys_inst.update_persistent_boot, ['ISCSI'], True) del type(self.sys_inst).uefi_target_override_devices def test_pci_devices(self): pci_dev_return_value = None pci_dev1_return_value = None pci_coll_return_value = None self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/pci_device_collection.json') as f: pci_coll_return_value = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/pci_device.json') as f: pci_dev_return_value = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/pci_device1.json') as f: pci_dev1_return_value = json.loads(f.read()) self.conn.get.return_value.json.side_effect = ( [pci_coll_return_value, pci_dev_return_value, pci_dev1_return_value]) actual_pci = self.sys_inst.pci_devices self.conn.get.return_value.json.reset_mock() self.assertIs(actual_pci, self.sys_inst.pci_devices) self.conn.get.return_value.json.assert_not_called() def test_secure_boot_with_missing_path_attr(self): def _get_secure_boot(): return self.sys_inst.secure_boot self.sys_inst._json.pop('SecureBoot') self.assertRaisesRegex( exception.MissingAttributeError, 'attribute SecureBoot is missing', _get_secure_boot) def test_secure_boot(self): # | GIVEN | self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/json_samples/secure_boot.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['default']) # | WHEN | actual_secure_boot = self.sys_inst.secure_boot # | THEN | self.assertIsInstance(actual_secure_boot, secure_boot.SecureBoot) self.conn.get.return_value.json.assert_called_once_with() # reset mock self.conn.get.return_value.json.reset_mock() # | WHEN & THEN | # tests for same object on invoking subsequently self.assertIs(actual_secure_boot, self.sys_inst.secure_boot) self.conn.get.return_value.json.assert_not_called() def test_secure_boot_on_refresh(self): # | GIVEN | with open('proliantutils/tests/redfish/json_samples/secure_boot.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['default']) # | WHEN & THEN | actual_secure_boot = self.sys_inst.secure_boot self.assertIsInstance(actual_secure_boot, secure_boot.SecureBoot) # On refreshing the system instance... with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['default']) self.sys_inst.invalidate() self.sys_inst.refresh(force=False) # | WHEN & THEN | self.assertTrue(actual_secure_boot._is_stale) # | GIVEN | with open('proliantutils/tests/redfish/json_samples/secure_boot.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['default']) # | WHEN & THEN | self.assertIsInstance(self.sys_inst.secure_boot, secure_boot.SecureBoot) self.assertFalse(actual_secure_boot._is_stale) @mock.patch.object(utils, 'get_subresource_path_by') def test_get_hpe_sub_resource_collection_path(self, res_mock): res = 'EthernetInterfaces' res_mock.return_value = '/redfish/v1/Systems/1/EthernetInterfaces' path = self.sys_inst._get_hpe_sub_resource_collection_path(res) self.assertTrue(res_mock.called) self.assertEqual(path, res_mock.return_value) @mock.patch.object(utils, 'get_subresource_path_by') def test_get_hpe_sub_resource_collection_path_oem_path(self, res_mock): res = 'EthernetInterfaces' error_val = exception.MissingAttributeError oem_path = '/redfish/v1/Systems/1/EthernetInterfaces' res_mock.side_effect = [error_val, oem_path] path = self.sys_inst._get_hpe_sub_resource_collection_path(res) self.assertTrue(res_mock.called) self.assertEqual(path, oem_path) @mock.patch.object(utils, 'get_subresource_path_by') def test_get_hpe_sub_resource_collection_path_fail(self, res_mock): error_val = exception.MissingAttributeError res_mock.side_effect = [error_val, error_val] self.assertRaises( exception.MissingAttributeError, self.sys_inst._get_hpe_sub_resource_collection_path, 'EthernetInterfaces') self.assertTrue(res_mock.called) def test_ethernet_interfaces(self): self.conn.get.return_value.json.reset_mock() eth_coll = None eth_value = None path = ('proliantutils/tests/redfish/json_samples/' 'ethernet_interface_collection.json') with open(path, 'r') as f: eth_coll = json.loads(f.read()) with open('proliantutils/tests/redfish/json_samples/' 'ethernet_interface.json', 'r') as f: eth_value = (json.loads(f.read())['default']) self.conn.get.return_value.json.side_effect = [eth_coll, eth_value] actual_macs = self.sys_inst.ethernet_interfaces.summary self.assertEqual({'Port 1': '12:44:6A:3B:04:11'}, actual_macs) self.assertIsInstance(self.sys_inst.ethernet_interfaces, ethernet_interface.EthernetInterfaceCollection) def test_ethernet_interfaces_oem(self): self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) self.conn.get.return_value.json.return_value = ( system_json['System_for_oem_ethernet_interfaces']) self.sys_inst = system.HPESystem( self.conn, '/redfish/v1/Systems/1', redfish_version='1.0.2') self.conn.get.return_value.json.reset_mock() eth_coll = None eth_value = None path = ('proliantutils/tests/redfish/json_samples/' 'ethernet_interface_collection.json') with open(path, 'r') as f: eth_coll = json.loads(f.read()) with open('proliantutils/tests/redfish/json_samples/' 'ethernet_interface.json', 'r') as f: eth_value = (json.loads(f.read())['default']) self.conn.get.return_value.json.side_effect = [eth_coll, eth_value] actual_macs = self.sys_inst.ethernet_interfaces.summary self.assertEqual({'Port 1': '12:44:6A:3B:04:11'}, actual_macs) self.assertIsInstance(self.sys_inst.ethernet_interfaces, ethernet_interface.EthernetInterfaceCollection) def test_smart_storage(self): self.conn.get.return_value.json.reset_mock() value = None with open('proliantutils/tests/redfish/json_samples/' 'smart_storage.json', 'r') as f: value = (json.loads(f.read())) self.conn.get.return_value.json.return_value = value value = self.sys_inst.smart_storage self.assertIsInstance(value, smart_storage.HPESmartStorage) def test_storages(self): self.conn.get.return_value.json.reset_mock() coll = None value = None path = ('proliantutils/tests/redfish/json_samples/' 'storage_collection.json') with open(path, 'r') as f: coll = json.loads(f.read()) with open('proliantutils/tests/redfish/json_samples/' 'storage.json', 'r') as f: value = (json.loads(f.read())) self.conn.get.return_value.json.side_effect = [coll, value] self.assertIsInstance(self.sys_inst.storages, storage.StorageCollection) def test_simple_storages(self): self.conn.get.return_value.json.reset_mock() coll = None value = None path = ('proliantutils/tests/redfish/json_samples/' 'simple_storage_collection.json') with open(path, 'r') as f: coll = json.loads(f.read()) with open('proliantutils/tests/redfish/json_samples/' 'simple_storage.json', 'r') as f: value = (json.loads(f.read())) self.conn.get.return_value.json.side_effect = [coll, value] self.assertIsInstance(self.sys_inst.simple_storages, simple_storage.SimpleStorageCollection) def test_simple_storage_on_refresh(self): with open('proliantutils/tests/redfish/json_samples/' 'simple_storage_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) actual_simple_storages = self.sys_inst.simple_storages self.assertIsInstance(actual_simple_storages, simple_storage.SimpleStorageCollection) with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['default']) self.sys_inst.invalidate() self.sys_inst.refresh(force=False) self.assertTrue(actual_simple_storages._is_stale) with open('proliantutils/tests/redfish/json_samples/' 'simple_storage_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) self.assertIsInstance(self.sys_inst.simple_storages, simple_storage.SimpleStorageCollection) self.assertFalse(actual_simple_storages._is_stale) def test_memory(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/memory_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) actual_memory = self.sys_inst.memory self.assertIsInstance(actual_memory, memory.MemoryCollection) self.conn.get.return_value.json.assert_called_once_with() # reset mock self.conn.get.return_value.json.reset_mock() self.assertIs(actual_memory, self.sys_inst.memory) self.conn.get.return_value.json.assert_not_called() def test_memory_collection_on_refresh(self): # | GIVEN | with open('proliantutils/tests/redfish/json_samples/' 'memory_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) # | WHEN & THEN | actual_memory = self.sys_inst.memory self.assertIsInstance(actual_memory, memory.MemoryCollection) # On refreshing the system instance... with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['default']) self.sys_inst.invalidate() self.sys_inst.refresh(force=False) # | WHEN & THEN | self.assertTrue(actual_memory._is_stale) # | GIVEN | with open('proliantutils/tests/redfish/json_samples/' 'memory_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) # | WHEN & THEN | self.assertIsInstance(self.sys_inst.memory, memory.MemoryCollection) self.assertFalse(actual_memory._is_stale) def test_storage_on_refresh(self): with open('proliantutils/tests/redfish/json_samples/' 'storage_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) actual_storages = self.sys_inst.storages self.assertIsInstance(actual_storages, storage.StorageCollection) # On refreshing the system instance... with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())['default']) self.sys_inst.invalidate() self.sys_inst.refresh(force=False) self.assertTrue(actual_storages._is_stale) with open('proliantutils/tests/redfish/json_samples/' 'simple_storage_collection.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) self.assertIsInstance(self.sys_inst.storages, storage.StorageCollection) self.assertFalse(actual_storages._is_stale) def test_get_host_post_state(self): expected = sys_cons.POST_STATE_FINISHEDPOST self.assertEqual(expected, self.sys_inst.post_state) @mock.patch.object(smart_storage_config, 'HPESmartStorageConfig', autospec=True) def test_get_smart_storage_config(self, mock_ssc): ssc_element = '/redfish/v1/systems/1/smartstorageconfig/' ssc_inst = self.sys_inst.get_smart_storage_config(ssc_element) self.assertIsInstance(ssc_inst, smart_storage_config.HPESmartStorageConfig. __class__) mock_ssc.assert_called_once_with( self.conn, "/redfish/v1/systems/1/smartstorageconfig/", redfish_version='1.0.2') @mock.patch.object(system.HPESystem, 'get_smart_storage_config') def test_delete_raid(self, get_smart_storage_config_mock): config_id = ['/redfish/v1/systems/1/smartstorageconfig/'] type(self.sys_inst).smart_storage_config_identities = ( mock.PropertyMock(return_value=config_id)) self.sys_inst.delete_raid() get_smart_storage_config_mock.assert_called_once_with(config_id[0]) (get_smart_storage_config_mock.return_value. delete_raid.assert_called_once_with()) @mock.patch.object(system.HPESystem, 'get_smart_storage_config') def test_delete_raid_controller_failed(self, get_smart_storage_config_mock): config_id = ['/redfish/v1/systems/1/smartstorageconfig/', '/redfish/v1/systems/1/smartstorageconfig1/', '/redfish/v1/systems/1/smartstorageconfig2/'] type(self.sys_inst).smart_storage_config_identities = ( mock.PropertyMock(return_value=config_id)) get_smart_storage_config_mock.return_value.delete_raid.side_effect = ( [None, sushy.exceptions.SushyError, None]) self.assertRaisesRegex( exception.IloError, "The Redfish controller failed to delete the " "raid configuration in one or more controllers with", self.sys_inst.delete_raid) @mock.patch.object(system.HPESystem, 'get_smart_storage_config') def test_delete_raid_logical_drive_not_found( self, get_smart_storage_config_mock): config_id = ['/redfish/v1/systems/1/smartstorageconfig/', '/redfish/v1/systems/1/smartstorageconfig1/'] type(self.sys_inst).smart_storage_config_identities = ( mock.PropertyMock(return_value=config_id)) get_smart_storage_config_mock.return_value.delete_raid.side_effect = ( exception.IloLogicalDriveNotFoundError('No logical drive found')) self.assertRaisesRegex( exception.IloError, "No logical drives are found in any controllers. " "Nothing to delete.", self.sys_inst.delete_raid) def test_check_smart_storage_config_ids(self): type(self.sys_inst).smart_storage_config_identities = ( mock.PropertyMock(return_value=None)) self.assertRaisesRegex( exception.IloError, "The Redfish controller failed to get the SmartStorageConfig " "controller configurations", self.sys_inst.check_smart_storage_config_ids) @mock.patch.object(system.HPESystem, 'check_smart_storage_config_ids') @mock.patch.object(system.HPESystem, '_parse_raid_config_data') @mock.patch.object(system.HPESystem, '_get_smart_storage_config_by_controller_model') def test_create_raid(self, get_smart_storage_config_model_mock, parse_raid_config_mock, check_smart_storage_config_ids_mock): ld1 = {'raid_level': '0', 'is_root_volume': True, 'size_gb': 150, 'controller': 'HPE Smart Array P408i-p SR Gen10'} ld2 = {'raid_level': '1', 'size_gb': 200, 'controller': 'HPE Smart Array P408i-p SR Gen10'} raid_config = {'logical_disks': [ld1, ld2]} parse_data = {'HPE Smart Array P408i-p SR Gen10': [ld1, ld2]} parse_raid_config_mock.return_value = parse_data check_smart_storage_config_ids_mock.return_value = None self.sys_inst.create_raid(raid_config) get_smart_storage_config_model_mock.assert_called_once_with( 'HPE Smart Array P408i-p SR Gen10') (get_smart_storage_config_model_mock.return_value. create_raid.assert_called_once_with(raid_config)) @mock.patch.object(system.HPESystem, 'check_smart_storage_config_ids') @mock.patch.object(system.HPESystem, '_parse_raid_config_data') @mock.patch.object(system.HPESystem, '_get_smart_storage_config_by_controller_model') def test_create_raid_controller_not_found( self, get_smart_storage_config_model_mock, parse_raid_config_mock, check_smart_storage_config_ids_mock): with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller_collection.json', 'r') as f: acc_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller.json', 'r') as f: ac_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() self.conn.get.return_value.json.side_effect = [ ss_json, acc_json, ac_json] ld1 = {'raid_level': '1', 'size_gb': 200, 'controller': 'HPE Gen10 Controller'} raid_config = {'logical_disks': [ld1]} parse_data = {'HPE Gen10 Controller': [ld1]} parse_raid_config_mock.return_value = parse_data check_smart_storage_config_ids_mock.return_value = None get_smart_storage_config_model_mock.return_value = None self.assertRaisesRegex( exception.IloError, "The Redfish controller failed to create the raid " "configuration for one or more controllers with", self.sys_inst.create_raid, raid_config) @mock.patch.object(array_controller.HPEArrayControllerCollection, 'array_controller_by_location') @mock.patch.object(system.HPESystem, 'get_smart_storage_config') def test__post_delete_read_raid( self, get_smart_storage_config_mock, array_controller_by_location_mock): config_id = ['/redfish/v1/systems/1/smartstorageconfig/'] with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller_collection.json', 'r') as f: acc_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() self.conn.get.return_value.json.side_effect = [ss_json, acc_json] type(get_smart_storage_config_mock.return_value).location = 'Slot 0' model = 'HPE Smart Array P408i-a SR Gen10' type(array_controller_by_location_mock.return_value).model = model type(self.sys_inst).smart_storage_config_identities = ( mock.PropertyMock(return_value=config_id)) result = {'logical_disks': []} (get_smart_storage_config_mock. return_value.read_raid.return_value) = result self.assertEqual(result, self.sys_inst._post_delete_read_raid()) get_smart_storage_config_mock.assert_called_once_with(config_id[0]) @mock.patch.object(system.HPESystem, '_parse_raid_config_data') @mock.patch.object(system.HPESystem, '_get_smart_storage_config_by_controller_model') def test__post_create_read_raid( self, get_ssc_by_controller_model_mock, parse_raid_config_data_mock): ld1 = {'raid_level': '0', 'is_root_volume': True, 'size_gb': 150, 'controller': 'HPE Smart Array P408i-p SR Gen10'} raid_config = {'logical_disks': [ld1]} parse_data = {'HPE Smart Array P408i-p SR Gen10': [ld1]} parse_raid_config_data_mock.return_value = parse_data result_ld1 = [{'size_gb': 149, 'physical_disks': [u'2I:1:1'], 'raid_level': u'0', 'controller': 'HPE Smart Array P408i-p SR Gen10', 'root_device_hint': {'wwn': u'0x600508B'}, 'volume_name': u'01E6E63APFJHD'}] result = {'logical_disks': result_ld1} (get_ssc_by_controller_model_mock. return_value.read_raid.return_value) = result self.assertEqual( result, self.sys_inst._post_create_read_raid(raid_config=raid_config)) get_ssc_by_controller_model_mock.assert_called_once_with( ld1['controller']) @mock.patch.object(system.HPESystem, '_parse_raid_config_data') @mock.patch.object(system.HPESystem, '_get_smart_storage_config_by_controller_model') def test__post_create_read_raid_logical_drive_not_found( self, get_ssc_by_controller_model_mock, parse_raid_config_data_mock): ld1 = {'raid_level': '0', 'is_root_volume': True, 'size_gb': 150, 'controller': 'HPE Smart Array P408i-p SR Gen10'} raid_config = {'logical_disks': [ld1]} parse_data = {'HPE Smart Array P408i-p SR Gen10': [ld1]} parse_raid_config_data_mock.return_value = parse_data get_ssc_by_controller_model_mock.return_value.read_raid.side_effect = ( exception.IloLogicalDriveNotFoundError('No logical drive found')) self.assertRaisesRegex( exception.IloError, "No logical drives are found in any controllers.", self.sys_inst._post_create_read_raid, raid_config) @mock.patch.object(array_controller.HPEArrayControllerCollection, 'array_controller_by_location') @mock.patch.object(system.HPESystem, 'get_smart_storage_config') def test__post_delete_read_raid_failed( self, get_smart_storage_config_mock, array_controller_by_location_mock): config_id = ['/redfish/v1/systems/1/smartstorageconfig/'] with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller_collection.json', 'r') as f: acc_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() self.conn.get.return_value.json.side_effect = [ss_json, acc_json] model = 'HPE Smart Array P408i-a SR Gen10' type(array_controller_by_location_mock.return_value).model = model type(self.sys_inst).smart_storage_config_identities = ( mock.PropertyMock(return_value=config_id)) get_smart_storage_config_mock.return_value.read_raid.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, "The Redfish controller failed to read the " "raid configuration in one or more controllers with Error:", self.sys_inst._post_delete_read_raid) @mock.patch.object(system.HPESystem, 'check_smart_storage_config_ids') @mock.patch.object(system.HPESystem, '_parse_raid_config_data') @mock.patch.object(system.HPESystem, '_get_smart_storage_config_by_controller_model') def test_create_raid_failed(self, get_smart_storage_config_model_mock, parse_raid_config_mock, check_smart_storage_config_ids_mock): ld1 = {'raid_level': '0', 'is_root_volume': True, 'size_gb': 150, 'controller': 'HPE Smart Array P408i-p SR Gen10'} ld2 = {'raid_level': '1', 'size_gb': 200, 'controller': 'HPE Smart Array P408i-p SR Gen10'} raid_config = {'logical_disks': [ld1, ld2]} parse_data = {'HPE Smart Array P408i-p SR Gen10': [ld1, ld2]} check_smart_storage_config_ids_mock.return_value = None parse_raid_config_mock.return_value = parse_data (get_smart_storage_config_model_mock. return_value.create_raid.side_effect) = sushy.exceptions.SushyError self.assertRaisesRegex( exception.IloError, "The Redfish controller failed to create the " "raid configuration for one or more controllers with Error:", self.sys_inst.create_raid, raid_config) def test__parse_raid_config_data(self): ld1 = {'raid_level': '0', 'is_root_volume': True, 'size_gb': 150, 'controller': 'HPE Smart Array P408i-a SR Gen10'} ld2 = {'raid_level': '1', 'size_gb': 200, 'controller': 'HPE Smart Array P408i-a SR Gen10'} raid_config = {'logical_disks': [ld1, ld2]} with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller_collection.json', 'r') as f: acc_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller.json', 'r') as f: ac_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() self.conn.get.return_value.json.side_effect = [ ss_json, acc_json, ac_json] expected = {'HPE Smart Array P408i-a SR Gen10': [ld1, ld2]} self.assertEqual(expected, self.sys_inst._parse_raid_config_data(raid_config)) @mock.patch.object(array_controller.HPEArrayControllerCollection, 'array_controller_by_model') @mock.patch.object(system.HPESystem, 'get_smart_storage_config') def test__get_smart_storage_config_by_controller_model( self, get_smart_storage_config_mock, array_controller_by_model_mock): with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller_collection.json', 'r') as f: acc_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() self.conn.get.return_value.json.side_effect = [ss_json, acc_json] type(array_controller_by_model_mock.return_value).location = 'Slot 0' type(get_smart_storage_config_mock.return_value).location = 'Slot 0' self.assertEqual( 'Slot 0', self.sys_inst._get_smart_storage_config_by_controller_model( 'HPE Smart Array P408i-a SR Gen10').location) @mock.patch.object(system.HPESystem, '_parse_raid_config_data') @mock.patch.object(system.HPESystem, '_get_smart_storage_config_by_controller_model') def test__post_create_read_raid_failed_with_raid_config( self, get_ssc_by_controller_model_mock, parse_raid_config_data_mock): ld1 = {'raid_level': '0', 'is_root_volume': True, 'size_gb': 150, 'controller': 'HPE Smart Array P408i-p SR Gen10'} raid_config = {'logical_disks': [ld1]} parse_data = {'HPE Smart Array P408i-p SR Gen10': [ld1]} parse_raid_config_data_mock.return_value = parse_data (get_ssc_by_controller_model_mock. return_value.read_raid.side_effect) = sushy.exceptions.SushyError self.assertRaisesRegex( exception.IloError, "The Redfish controller failed to read the " "raid configuration in one or more controllers with Error:", self.sys_inst._post_create_read_raid, raid_config=raid_config) @mock.patch.object(system.HPESystem, '_post_create_read_raid') @mock.patch.object(system.HPESystem, 'check_smart_storage_config_ids') def test_read_raid_post_create( self, check_smart_storage_config_ids_mock, post_create_read_raid_mock): check_smart_storage_config_ids_mock.return_value = None ld1 = {'raid_level': '0', 'is_root_volume': True, 'size_gb': 150, 'controller': 'HPE Smart Array P408i-p SR Gen10'} raid_config = {'logical_disks': [ld1]} result_ld1 = [{'size_gb': 149, 'physical_disks': [u'2I:1:1'], 'raid_level': u'0', 'controller': 'HPE Smart Array P408i-p SR Gen10', 'root_device_hint': {'wwn': u'0x600508B'}, 'volume_name': u'01E6E63APFJHD'}] result = {'logical_disks': result_ld1} post_create_read_raid_mock.return_value = result self.assertEqual( result, self.sys_inst.read_raid(raid_config=raid_config)) @mock.patch.object(system.HPESystem, '_post_delete_read_raid') @mock.patch.object(system.HPESystem, 'check_smart_storage_config_ids') def test_read_raid_post_delete( self, check_smart_storage_config_ids_mock, post_delete_read_raid_mock): check_smart_storage_config_ids_mock.return_value = None result = {'logical_disks': []} post_delete_read_raid_mock.return_value = result self.assertEqual( result, self.sys_inst.read_raid()) @mock.patch.object(array_controller.HPEArrayControllerCollection, 'get_all_controllers_model') @mock.patch.object(array_controller.HPEArrayControllerCollection, 'array_controller_by_model') def test_has_disk_erase_completed_true( self, array_controller_by_model_mock, get_all_controllers_model_mock): get_all_controllers_model_mock.return_value = [ 'HPE Smart Array P408i-p SR Gen10'] with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller_collection.json', 'r') as f: acc_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() self.conn.get.return_value.json.side_effect = [ss_json, acc_json] type(array_controller_by_model_mock. return_value.physical_drives).has_disk_erase_completed = True self.assertEqual(True, self.sys_inst.has_disk_erase_completed()) @mock.patch.object(array_controller.HPEArrayControllerCollection, 'get_all_controllers_model') @mock.patch.object(array_controller.HPEArrayControllerCollection, 'array_controller_by_model') def test_has_disk_erase_completed_false( self, array_controller_by_model_mock, get_all_controllers_model_mock): get_all_controllers_model_mock.return_value = [ 'HPE Smart Array P408i-p SR Gen10'] with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller_collection.json', 'r') as f: acc_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() self.conn.get.return_value.json.side_effect = [ss_json, acc_json] type(array_controller_by_model_mock. return_value.physical_drives).has_disk_erase_completed = False self.assertEqual(False, self.sys_inst.has_disk_erase_completed()) @mock.patch.object(array_controller.HPEArrayControllerCollection, 'get_all_controllers_model') @mock.patch.object(array_controller.HPEArrayControllerCollection, 'array_controller_by_model') def test_has_disk_erase_completed_failed( self, array_controller_by_model_mock, get_all_controllers_model_mock): get_all_controllers_model_mock.return_value = [ 'HPE Smart Array P408i-p SR Gen10'] with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() (self.conn.get.return_value. json.side_effect) = [ss_json, sushy.exceptions.SushyError] self.assertRaisesRegex( exception.IloError, "The Redfish controller failed to get the status of sanitize disk " "erase. Error:", self.sys_inst.has_disk_erase_completed) @mock.patch.object(system.HPESystem, '_get_hpe_one_button_secure_erase_action_element') def test_do_one_button_secure_erase( self, secure_erase_action_mock): target_uri = ( '/redfish/v1/Systems/1/Actions/Oem/Hpe/' '#HpeComputerSystemExt.SecureSystemErase') data = { "SystemROMAndiLOErase": True, "UserDataErase": True} type(secure_erase_action_mock.return_value).target_uri = target_uri self.sys_inst.do_one_button_secure_erase() self.sys_inst._conn.post.assert_called_once_with(target_uri, data=data) @mock.patch.object(system.HPESystem, '_get_hpe_one_button_secure_erase_action_element') def test_do_one_button_secure_erase_failed( self, secure_erase_action_mock): target_uri = ( '/redfish/v1/Systems/1/Actions/Oem/Hpe/' '#HpeComputerSystemExt.SecureSystemErase') type(secure_erase_action_mock.return_value).target_uri = target_uri self.sys_inst._conn.post.side_effect = sushy.exceptions.SushyError self.assertRaisesRegex( exception.IloError, "The Redfish controller failed to perform one button " "secure erase operation on the hardware. Error:", self.sys_inst.do_one_button_secure_erase) @mock.patch.object(system.HPESystem, '_get_drives_has_raid') @mock.patch.object(array_controller.HPEArrayControllerCollection, 'get_all_controllers_model') @mock.patch.object(system.HPESystem, '_get_smart_storage_config_by_controller_model') @mock.patch.object(array_controller.HPEArrayControllerCollection, 'array_controller_by_model') def test_do_disk_erase_hdd( self, array_controller_by_model_mock, get_ssc_by_controller_model_mock, get_all_controllers_model_mock, drives_raid_mock): get_all_controllers_model_mock.return_value = [ 'HPE Smart Array P408i-p SR Gen10'] drives_raid_mock.return_value = [] with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller_collection.json', 'r') as f: acc_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() self.conn.get.return_value.json.side_effect = [ss_json, acc_json] (array_controller_by_model_mock.return_value.physical_drives. get_all_hdd_drives_locations.return_value) = ['2I:1:1'] self.sys_inst.do_disk_erase('HDD', None) get_ssc_by_controller_model_mock.assert_called_once_with( 'HPE Smart Array P408i-p SR Gen10') (get_ssc_by_controller_model_mock.return_value. disk_erase.assert_called_once_with(['2I:1:1'], 'HDD', None)) @mock.patch.object(system.HPESystem, '_get_drives_has_raid') @mock.patch.object(array_controller.HPEArrayControllerCollection, 'get_all_controllers_model') @mock.patch.object(system.HPESystem, '_get_smart_storage_config_by_controller_model') @mock.patch.object(array_controller.HPEArrayControllerCollection, 'array_controller_by_model') def test_do_disk_erase_ssd( self, array_controller_by_model_mock, get_ssc_by_controller_model_mock, get_all_controllers_model_mock, drives_raid_mock): drives_raid_mock.return_value = [] get_all_controllers_model_mock.return_value = [ 'HPE Smart Array P408i-p SR Gen10'] with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller_collection.json', 'r') as f: acc_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() self.conn.get.return_value.json.side_effect = [ss_json, acc_json] (array_controller_by_model_mock.return_value.physical_drives. get_all_ssd_drives_locations.return_value) = ['2I:1:1'] self.sys_inst.do_disk_erase('SSD', None) get_ssc_by_controller_model_mock.assert_called_once_with( 'HPE Smart Array P408i-p SR Gen10') (get_ssc_by_controller_model_mock.return_value. disk_erase.assert_called_once_with(['2I:1:1'], 'SSD', None)) @mock.patch.object(system.LOG, 'warn', autospec=True) @mock.patch.object(system.HPESystem, '_get_disk_properties_by_drive_location') @mock.patch.object(system.HPESystem, '_get_drives_has_raid') @mock.patch.object(array_controller.HPEArrayControllerCollection, 'get_all_controllers_model') @mock.patch.object(system.HPESystem, '_get_smart_storage_config_by_controller_model') @mock.patch.object(array_controller.HPEArrayControllerCollection, 'array_controller_by_model') def test_do_disk_erase_with_raid( self, array_controller_by_model_mock, get_ssc_by_controller_model_mock, get_all_controllers_model_mock, drives_raid_mock, get_disk_prop_mock, system_log_mock): get_all_controllers_model_mock.return_value = [ 'HPE Smart Array P408i-p SR Gen10'] drives_raid_mock.return_value = ['2I:1:2'] with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller_collection.json', 'r') as f: acc_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() self.conn.get.return_value.json.side_effect = [ss_json, acc_json] (array_controller_by_model_mock.return_value.physical_drives. get_all_hdd_drives_locations.return_value) = ['2I:1:1', '2I:1:2'] get_disk_prop_mock.return_value = { 'Serial number': 'KWGER73R', 'Size(GB)': 600, 'Media type': 'HDD', 'Location': '2I:1:2'} self.sys_inst.do_disk_erase('HDD', None) get_ssc_by_controller_model_mock.assert_called_once_with( 'HPE Smart Array P408i-p SR Gen10') (get_ssc_by_controller_model_mock.return_value. disk_erase.assert_called_once_with(['2I:1:1'], 'HDD', None)) disk_prop = {'Serial number': 'KWGER73R', 'Size(GB)': 600, 'Media type': 'HDD', 'Location': '2I:1:2'} system_log_mock.assert_called_once_with( "Skipping disk erase of %(disk_list)s " "with logical volumes on them." % {'disk_list': [disk_prop]}) @mock.patch.object(system.HPESystem, '_get_drives_has_raid') @mock.patch.object(array_controller.HPEArrayControllerCollection, 'get_all_controllers_model') @mock.patch.object(system.HPESystem, '_get_smart_storage_config_by_controller_model') @mock.patch.object(array_controller.HPEArrayControllerCollection, 'array_controller_by_model') @mock.patch.object(system.LOG, 'warn', autospec=True) def test_do_disk_erase_with_S_and_P_series_controller( self, system_log_mock, array_controller_by_model_mock, get_ssc_by_controller_model_mock, get_all_controllers_model_mock, drives_raid_mock): drives_raid_mock.return_value = [] get_all_controllers_model_mock.return_value = [ 'HPE Smart Array S100i SR Gen10', 'HPE Smart Array P408i-p SR Gen10'] with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller_collection.json', 'r') as f: acc_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() self.conn.get.return_value.json.side_effect = [ss_json, acc_json] (array_controller_by_model_mock.return_value.physical_drives. get_all_ssd_drives_locations.return_value) = ['2I:1:1'] self.sys_inst.do_disk_erase('SSD', None) get_ssc_by_controller_model_mock.assert_called_once_with( 'HPE Smart Array P408i-p SR Gen10') (get_ssc_by_controller_model_mock.return_value. disk_erase.assert_called_once_with(['2I:1:1'], 'SSD', None)) system_log_mock.assert_called_once_with( "Smart array controller: HPE Smart Array S100i SR Gen10, doesn't " "support sanitize disk erase. All the disks of the controller are " "ignored.") @mock.patch.object(array_controller.HPEArrayControllerCollection, 'get_all_controllers_model') def test_do_disk_erase_failed( self, get_all_controllers_model_mock): get_all_controllers_model_mock.return_value = [ 'HPE Smart Array P408i-p SR Gen10'] with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller_collection.json', 'r') as f: acc_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() (self.conn.get.return_value. json.side_effect) = [ss_json, acc_json, sushy.exceptions.SushyError] self.assertRaisesRegex( exception.IloError, "The Redfish controller failed to perform the sanitize disk erase " "on smart storage controller: HPE Smart Array P408i-p SR Gen10, " "on disk_type: SSD with error:", self.sys_inst.do_disk_erase, 'SSD', None) @mock.patch.object(system.HPESystem, 'get_smart_storage_config') def test__get_drives_has_raid( self, get_smart_storage_config_mock): config_id = ['/redfish/v1/systems/1/smartstorageconfig/'] with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() self.conn.get.return_value.json.side_effect = ss_json type(self.sys_inst).smart_storage_config_identities = ( mock.PropertyMock(return_value=config_id)) (get_smart_storage_config_mock. return_value.get_drives_has_raid.return_value) = ["2I:1:2", "2I:1:1"] result = self.sys_inst._get_drives_has_raid() self.assertEqual(result, ["2I:1:2", "2I:1:1"]) get_smart_storage_config_mock.assert_called_once_with(config_id[0]) @mock.patch.object(array_controller.HPEArrayControllerCollection, 'get_all_controllers_model') @mock.patch.object(array_controller.HPEArrayControllerCollection, 'array_controller_by_model') def test__get_disk_properties_by_drive_location( self, array_controller_by_model_mock, get_all_controllers_model_mock): get_all_controllers_model_mock.return_value = [ 'HPE Smart Array P408i-p SR Gen10'] with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller_collection.json', 'r') as f: acc_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() self.conn.get.return_value.json.side_effect = [ss_json, acc_json] prop = { 'Serial number': 'KWGER73R', 'Size(GB)': 600, 'Media type': 'HDD', 'Location': '2I:1:2'} (array_controller_by_model_mock.return_value.physical_drives. get_disk_properties_by_drive_location.return_value) = prop result = self.sys_inst._get_disk_properties_by_drive_location( '2I:1:1') self.assertEqual(result, prop) @mock.patch.object(array_controller.HPEArrayControllerCollection, 'get_all_controllers_model') @mock.patch.object(array_controller.HPEArrayControllerCollection, 'array_controller_by_model') def test_get_disk_types( self, array_controller_by_model_mock, get_all_controllers_model_mock): get_all_controllers_model_mock.return_value = [ 'HPE Smart Array P408i-p SR Gen10'] with open('proliantutils/tests/redfish/' 'json_samples/smart_storage.json', 'r') as f: ss_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/array_controller_collection.json', 'r') as f: acc_json = json.loads(f.read()) self.conn.get.return_value.json.reset_mock() self.conn.get.return_value.json.side_effect = [ss_json, acc_json] (array_controller_by_model_mock.return_value.physical_drives. has_hdd.return_value) = True (array_controller_by_model_mock.return_value.physical_drives. has_ssd.return_value) = False types = ['HDD', 'SSD'] self.assertEqual(list(set(types)), self.sys_inst.get_disk_types()) array_controller_by_model_mock.assert_called_once_with( 'HPE Smart Array P408i-p SR Gen10') @mock.patch.object(ethernet_interface.EthernetInterfaceCollection, 'get_uefi_device_path_by_mac') def test_get_nic_association_name_by_mac(self, uefi_device_path_mock): with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: bios_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/bios_mappings.json', 'r') as f: bios_mappings_json = json.loads(f.read()) path = ('proliantutils/tests/redfish/json_samples/' 'ethernet_interface_collection.json') with open(path, 'r') as f: eth_coll = json.loads(f.read()) self.conn.get.return_value.json.side_effect = [ bios_json['Default'], bios_mappings_json['Default'], eth_coll] (uefi_device_path_mock. return_value) = 'PciRoot(0x2)/Pci(0x0,0x0)/Pci(0x0,0x2)' result = self.sys_inst.get_nic_association_name_by_mac( '12:44:6A:3B:04:11') self.assertEqual(result, 'NicBoot1') @mock.patch.object(ethernet_interface.EthernetInterfaceCollection, 'get_all_macs') def test_validate_macs(self, get_all_macs_mock): path = ('proliantutils/tests/redfish/json_samples/' 'ethernet_interface_collection.json') with open(path, 'r') as f: eth_coll = json.loads(f.read()) self.conn.get.return_value.json.side_effect = [eth_coll] get_all_macs_mock.return_value = [ '12:44:6a:3b:04:11', '13:44:6a:3b:04:13'] result = self.sys_inst.validate_macs(['12:44:6a:3b:04:11']) self.assertEqual(result, None) @mock.patch.object(ethernet_interface.EthernetInterfaceCollection, 'get_all_macs') def test_validate_macs_failed(self, get_all_macs_mock): path = ('proliantutils/tests/redfish/json_samples/' 'ethernet_interface_collection.json') with open(path, 'r') as f: eth_coll = json.loads(f.read()) self.conn.get.return_value.json.side_effect = [eth_coll] get_all_macs_mock.return_value = [ '12:44:6a:3b:04:11', '13:44:6a:3b:04:13'] self.assertRaisesRegex( exception.InvalidInputError, r"Given macs: \['14:23:AD:3B:4C:78'\] not found in the system", self.sys_inst.validate_macs, ['12:44:6a:3b:04:11', '14:23:AD:3B:4C:78']) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/system/test_tls_config.py0000664000175000017500000001134700000000000031337 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock import testtools from proliantutils.redfish.resources.system import tls_config class TLSConfigTestCase(testtools.TestCase): def setUp(self): super(TLSConfigTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/tls_config.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) self.tls_config_inst = tls_config.TLSConfig( self.conn, '/redfish/v1/Systems/1/bios/tlsconfig', redfish_version='1.0.2') def test_tls_config_settings(self): self.conn.get.return_value.json.reset_mock() with open('proliantutils/tests/redfish/' 'json_samples/tls_config_settings.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) actual_settings = self.tls_config_inst.tls_config_settings self.assertIsInstance(actual_settings, tls_config.TLSConfigSettings) self.conn.get.return_value.json.assert_called_once_with() # reset mock self.conn.get.return_value.json.reset_mock() self.assertIs(actual_settings, self.tls_config_inst.tls_config_settings) self.conn.get.return_value.json.assert_not_called() def test_iscsi_settings_on_refresh(self): with open('proliantutils/tests/redfish/' 'json_samples/tls_config_settings.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) actual_settings = self.tls_config_inst.tls_config_settings self.assertIsInstance(actual_settings, tls_config.TLSConfigSettings) with open('proliantutils/tests/redfish/' 'json_samples/tls_config.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) self.tls_config_inst.invalidate() self.tls_config_inst.refresh(force=False) self.assertTrue(actual_settings._is_stale) with open('proliantutils/tests/redfish/' 'json_samples/tls_config_settings.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) self.assertIsInstance(self.tls_config_inst.tls_config_settings, tls_config.TLSConfigSettings) self.assertFalse(actual_settings._is_stale) class TLSConfigSettingsTestCase(testtools.TestCase): def setUp(self): super(TLSConfigSettingsTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/tls_config_settings.json', 'r') as f: self.conn.get.return_value.json.return_value = ( json.loads(f.read())) self.tls_config_settings_inst = tls_config.TLSConfigSettings( self.conn, '/redfish/v1/Systems/1/bios/tlsconfig/settings', redfish_version='1.0.2') def test_add_tls_certificate(self): target_uri = '/redfish/v1/Systems/1/bios/tlsconfig/settings' cert_data = { "NewCertificates": [ { "X509Certificate": "abc" } ] } self.tls_config_settings_inst.add_tls_certificate(cert_data) self.tls_config_settings_inst._conn.put.assert_called_once_with( target_uri, data=cert_data) def test_remove_tls_certificate(self): target_uri = '/redfish/v1/Systems/1/bios/tlsconfig/settings' fp = ('FA:3A:68:C7:7E:ED:90:21:D2:FA:3E:54:6B:0C:14:D3:' '2F:8D:43:50:F7:05:A7:0F:1C:68:35:DB:5C:D2:53:28') cert = {} del_cert_list = [{"FingerPrint": fp}] cert.update({"DeleteCertificates": del_cert_list}) self.tls_config_settings_inst.remove_tls_certificate(cert) self.tls_config_settings_inst._conn.put.assert_called_once_with( target_uri, data=cert) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/test_gpu_common.py0000664000175000017500000001034200000000000030021 0ustar00zuulzuul00000000000000# Copyright 2021 Hewlett Packard Enterprise Development LP # # 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. __author__ = 'HPE' from unittest import mock import ddt import sushy import testtools from proliantutils import exception from proliantutils.redfish.resources import gpu_common @ddt.ddt class GPUCommonMethodsTestCase(testtools.TestCase): def setUp(self): super(GPUCommonMethodsTestCase, self).setUp() self.system_obj = mock.MagicMock() self.chassis_obj = mock.MagicMock() def _mock_property(self, value): if value is sushy.exceptions.SushyError: mock_value = mock.PropertyMock(side_effect=value) else: mock_value = mock.PropertyMock(return_value=value) return mock_value @ddt.data((["/redfish/v1/Systems/1/PCIDevices/2"], {'1': 'NULL'}, {'1': ["/redfish/v1/Systems/1/PCIDevices/2"]}, {'1': "Embedded Video Controller"}, {'2': 4139}, [{'gpu_vendor_count': {'gpu_0x102b_count': 1}}, {'gpu_ven_dev_count': {'gpu_Embedded_Video_Controller_count': 1}}, {'gpu_ven_dev': {'gpu_Embedded_Video_Controller': True}}]), (["/redfish/v1/Systems/1/PCIDevices/2"], {'1': 'Nvidia'}, {'1': ["/redfish/v1/Systems/1/PCIDevices/2"]}, {'1': "Nvidia Tesla M10"}, {'2': 4139}, [{'gpu_vendor_count': {'gpu_Nvidia_count': 1}}, {'gpu_ven_dev_count': {'gpu_Nvidia_Tesla_M10_count': 1}}, {'gpu_ven_dev': {'gpu_Nvidia_Tesla_M10': True}}])) @ddt.unpack def test_gpu_capabilities(self, gpu_uris_list, ch_vendor_dict, pci_uris, device_names, pci_vendor_id, expected): system_obj = self.system_obj chassis_obj = self.chassis_obj type(system_obj.pci_devices).gpu_devices = ( self._mock_property(gpu_uris_list)) type(chassis_obj.devices).vendor_dict = ( self._mock_property(ch_vendor_dict)) type(chassis_obj.devices).pci_devices_uris = ( self._mock_property(pci_uris)) type(chassis_obj.devices).vendor_devices_dict = ( self._mock_property(device_names)) type(system_obj.pci_devices).vendor_id = ( self._mock_property(pci_vendor_id)) actual = gpu_common.gpu_capabilities(system_obj, chassis_obj) self.assertEqual(expected, actual) def test__get_attribute_value_of(self): system_obj = self.system_obj gpu_mock = mock.PropertyMock( return_value=['/redfish/v1/Systems/1/PCIDevices/6']) type(system_obj.pci_devices).gpu_devices = gpu_mock actual = gpu_common._get_attribute_value_of(system_obj.pci_devices, 'gpu_devices') self.assertEqual(['/redfish/v1/Systems/1/PCIDevices/6'], actual) def test__get_attribute_value_of_sushy_error(self): system_obj = self.system_obj gpu_mock = mock.PropertyMock(side_effect=sushy.exceptions.SushyError) type(system_obj.pci_devices).gpu_devices = gpu_mock actual = gpu_common._get_attribute_value_of(system_obj.pci_devices, 'gpu_devices', default=[]) self.assertEqual([], actual) def test__get_attribute_value_of_fail_missing_attribute(self): system_obj = self.system_obj gpu_mock = mock.PropertyMock( side_effect=exception.MissingAttributeError) type(system_obj.pci_devices).gpu_devices = gpu_mock actual = gpu_common._get_attribute_value_of(system_obj.pci_devices, 'gpu_devices') self.assertIsNone(actual) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/resources/test_update_service.py0000664000175000017500000002775700000000000030702 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json import time from unittest import mock import sushy import testtools from proliantutils import exception from proliantutils.ilo import common from proliantutils.redfish import main from proliantutils.redfish import redfish from proliantutils.redfish.resources import update_service class HPEUpdateServiceTestCase(testtools.TestCase): @mock.patch.object(main, 'HPESushy', autospec=True) def setUp(self, sushy_mock): super(HPEUpdateServiceTestCase, self).setUp() self.conn = mock.MagicMock() self.sushy = mock.MagicMock() sushy_mock.return_value = self.sushy with open('proliantutils/tests/redfish/' 'json_samples/update_service.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) self.rf_client = redfish.RedfishOperations( '1.2.3.4', username='foo', password='bar') self.us_inst = update_service.HPEUpdateService( self.conn, '/redfish/v1/UpdateService/1', redfish_version='1.0.2') def test__get_firmware_update_element(self): value = self.us_inst._get_firmware_update_element() expected_uri = ('/redfish/v1/UpdateService/Actions/' 'UpdateService.SimpleUpdate/') self.assertEqual(expected_uri, value.target_uri) def test__get_firmware_update_element_missing_url_action(self): self.us_inst._actions.update_firmware = None self.assertRaisesRegex( sushy.exceptions.MissingActionError, 'action #UpdateService.SimpleUpdate', self.us_inst._get_firmware_update_element) @mock.patch.object(time, 'sleep') @mock.patch.object(update_service.HPEUpdateService, 'get_firmware_update_progress', autospec=True) @mock.patch.object(update_service.HPEUpdateService, 'wait_for_redfish_firmware_update_to_complete', autospec=True) @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_flash_firmware(self, wait_for_redfish_firmware_update_to_complete_mock, get_firmware_update_progress_mock, sleep_mock): # | GIVEN | target_uri = ('/redfish/v1/UpdateService/Actions/' 'UpdateService.SimpleUpdate/') get_firmware_update_progress_mock.return_value = 'Complete', None # | WHEN | self.us_inst.flash_firmware(self.rf_client, 'web_url') # | THEN | self.us_inst._conn.post.assert_called_once_with( target_uri, data={'ImageURI': 'web_url'}) self.assertTrue(wait_for_redfish_firmware_update_to_complete_mock. called) self.assertTrue(get_firmware_update_progress_mock.called) @mock.patch.object(time, 'sleep') @mock.patch.object(update_service.HPEUpdateService, 'get_firmware_update_progress', autospec=True) @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_flash_firmware_post_fails(self, get_firmware_update_progress_mock, sleep_mock): get_firmware_update_progress_mock.return_value = 'Complete', None self.us_inst._conn.post.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to update firmware', self.us_inst.flash_firmware, self.rf_client, 'web_url') @mock.patch.object(time, 'sleep') @mock.patch.object(update_service.HPEUpdateService, 'get_firmware_update_progress', autospec=True) @mock.patch.object(update_service.HPEUpdateService, 'wait_for_redfish_firmware_update_to_complete', autospec=True) @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_flash_firmware_get_firmware_update_progress_throws_exception( self, wait_for_redfish_firmware_update_to_complete_mock, get_firmware_update_progress_mock, sleep_mock): # | GIVEN | self.us_inst._conn.post.return_value.status_code = 200 get_firmware_update_progress_mock.side_effect = ( sushy.exceptions.SushyError) # | WHEN & THEN| self.assertRaisesRegex( exception.IloError, 'Failed to get firmware progress update', self.us_inst.flash_firmware, self.rf_client, 'web_url') @mock.patch.object(time, 'sleep') @mock.patch.object(update_service.HPEUpdateService, 'get_firmware_update_progress', autospec=True) @mock.patch.object(update_service.HPEUpdateService, 'wait_for_redfish_firmware_update_to_complete', autospec=True) @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_flash_firmware_get_firmware_update_progress_in_error_state( self, wait_for_redfish_firmware_update_to_complete_mock, get_firmware_update_progress_mock, sleep_mock): # | GIVEN | self.us_inst._conn.post.return_value.status_code = 200 get_firmware_update_progress_mock.side_effect = [('Error', None)] # | WHEN & THEN| self.assertRaisesRegex( exception.IloError, 'Unable to update firmware', self.us_inst.flash_firmware, self.rf_client, 'web_url') @mock.patch.object(time, 'sleep') @mock.patch.object(update_service.HPEUpdateService, 'get_firmware_update_progress', autospec=True) @mock.patch.object(update_service.HPEUpdateService, 'wait_for_redfish_firmware_update_to_complete', autospec=True) @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_flash_firmware_get_firmware_update_progress_in_unknown_state( self, wait_for_redfish_firmware_update_to_complete_mock, get_firmware_update_progress_mock, sleep_mock): # | GIVEN | target_uri = ('/redfish/v1/UpdateService/Actions/' 'UpdateService.SimpleUpdate/') get_firmware_update_progress_mock.return_value = 'Unknown', None # | WHEN | self.us_inst.flash_firmware(self.rf_client, 'web_url') # | THEN | self.us_inst._conn.post.assert_called_once_with( target_uri, data={'ImageURI': 'web_url'}) self.assertTrue(wait_for_redfish_firmware_update_to_complete_mock. called) self.assertTrue(get_firmware_update_progress_mock.called) @mock.patch.object(time, 'sleep') @mock.patch.object(update_service.HPEUpdateService, 'get_firmware_update_progress', autospec=True) @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_wait_for_redfish_firmware_update_to_complete_ok( self, get_firmware_update_progress_mock, sleep_mock): # | GIVEN | get_firmware_update_progress_mock.side_effect = [('Updating', 25), ('Complete', None)] # | WHEN | (self.us_inst. wait_for_redfish_firmware_update_to_complete(self.rf_client)) # | THEN | self.assertEqual(2, get_firmware_update_progress_mock.call_count) @mock.patch.object(time, 'sleep') @mock.patch.object(update_service.HPEUpdateService, 'get_firmware_update_progress', autospec=True) @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_wait_for_redfish_firmware_update_to_complete_multiple_retries( self, get_firmware_update_progress_mock, sleep_mock): # | GIVEN | get_firmware_update_progress_mock.side_effect = [('Idle', 0), ('Updating', 25), ('Updating', 50), ('Updating', 75), ('Error', 0)] # | WHEN | (self.us_inst. wait_for_redfish_firmware_update_to_complete(self.rf_client)) # | THEN | self.assertEqual(5, get_firmware_update_progress_mock.call_count) @mock.patch.object(time, 'sleep') @mock.patch.object(update_service.HPEUpdateService, 'get_firmware_update_progress', autospec=True) @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_wait_for_redfish_firmware_update_to_complete_retry_on_exception( self, get_firmware_update_progress_mock, sleep_mock): # | GIVEN | exc = exception.IloError('error') get_firmware_update_progress_mock.side_effect = [('Updating', 25), exc, ('Complete', None)] # | WHEN | (self.us_inst. wait_for_redfish_firmware_update_to_complete(self.rf_client)) # | THEN | self.assertEqual(3, get_firmware_update_progress_mock.call_count) @mock.patch.object(time, 'sleep') @mock.patch.object(update_service.HPEUpdateService, 'get_firmware_update_progress', autospec=True) @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_wait_for_redfish_firmware_update_to_complete_very_quick_update( self, get_firmware_update_progress_mock, sleep_mock): # | GIVEN | get_firmware_update_progress_mock.side_effect = [('Complete', None)] # | WHEN | (self.us_inst. wait_for_redfish_firmware_update_to_complete(self.rf_client)) # | THEN | self.assertEqual(1, get_firmware_update_progress_mock.call_count) @mock.patch.object(time, 'sleep') @mock.patch.object(update_service.HPEUpdateService, 'get_firmware_update_progress', autospec=True) @mock.patch.object(common, 'wait_for_ilo_after_reset', lambda x: None) def test_wait_for_redfish_firmware_update_to_complete_fail( self, get_firmware_update_progress_mock, sleep_mock): # | GIVEN | exc = exception.IloError('error') get_firmware_update_progress_mock.side_effect = exc # | WHEN & THEN| self.assertRaises(exception.IloError, (self.us_inst. wait_for_redfish_firmware_update_to_complete), self.rf_client) self.assertEqual(10, get_firmware_update_progress_mock.call_count) @mock.patch.object(update_service.HPEUpdateService, 'refresh', autospec=True) def test_get_firmware_update_progress(self, refresh_mock): refresh_mock.return_value.status_code = 200 state, percent = self.us_inst.get_firmware_update_progress() self.assertEqual(('Updating', 24), (state, percent)) @mock.patch.object(update_service.HPEUpdateService, 'refresh', autospec=True) def test_get_firmware_update_progress_refresh_exception(self, refresh_mock): refresh_mock.side_effect = (sushy.exceptions.SushyError) state, percent = self.us_inst.get_firmware_update_progress() self.assertEqual(('Unknown', 'Unknown'), (state, percent)) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/test_connector.py0000664000175000017500000001062400000000000025641 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from unittest import mock from sushy import connector from sushy import exceptions import testtools from proliantutils.redfish import connector as hpe_connector class HPEConnectorTestCase(testtools.TestCase): def setUp(self): super(HPEConnectorTestCase, self).setUp() @mock.patch.object(connector.Connector, '_op', autospec=True) def test__op_no_exception(self, conn_mock): response = mock.MagicMock() type(response).status_code = mock.PropertyMock(return_value=200) conn_mock.side_effect = [response, exceptions.ConnectionError, response, response] hpe_conn = hpe_connector.HPEConnector( 'http://foo.bar:1234', verify=True) headers = {'X-Fake': 'header'} hpe_conn._op('GET', path='fake/path', data=None, headers=headers) conn_mock.assert_called_once_with(hpe_conn, 'GET', path='fake/path', data=None, headers=headers, blocking=False, timeout=60, allow_redirects=False) self.assertEqual(1, conn_mock.call_count) @mock.patch.object(connector.Connector, '_op', autospec=True) def test__op_with_exception(self, conn_mock): response = mock.MagicMock() type(response).status_code = mock.PropertyMock(return_value=501) conn_mock.side_effect = [exceptions.ConnectionError, exceptions.ConnectionError, response, response] hpe_conn = hpe_connector.HPEConnector( 'http://foo.bar:1234', verify=True) headers = {'X-Fake': 'header'} lval = hpe_conn._op('GET', path='fake/path', data=None, headers=headers) self.assertEqual(3, conn_mock.call_count) self.assertEqual(lval.status_code, 501) @mock.patch.object(connector.Connector, '_op', autospec=True) def test__op_all_exception(self, conn_mock): conn_mock.side_effect = [ exceptions.ConnectionError] * ( hpe_connector.HPEConnector.MAX_RETRY_ATTEMPTS) + ( ["Hello", "World"]) hpe_conn = hpe_connector.HPEConnector( 'http://foo.bar:1234', verify=True) headers = {'X-Fake': 'header'} self.assertRaises( exceptions.ConnectionError, hpe_conn._op, 'GET', path='fake/path', data=None, headers=headers) self.assertEqual(hpe_connector.HPEConnector.MAX_RETRY_ATTEMPTS, conn_mock.call_count) @mock.patch.object(connector.Connector, '_op', autospec=True) def test__op_with_redirection_false_status_308(self, conn_mock): response = mock.MagicMock() type(response).status_code = mock.PropertyMock(return_value=308) headers = {'X-Fake': 'header', 'Location': 'http://foo.bar:1234/new/path'} type(response).headers = headers response_redirect = mock.MagicMock() type(response_redirect).status_code = ( mock.PropertyMock(return_value=200)) conn_mock.side_effect = [response, response_redirect] hpe_conn = hpe_connector.HPEConnector( 'http://foo.bar:1234', verify=True) headers = {'X-Fake': 'header'} res = hpe_conn._op('GET', path='fake/path', data=None, headers=headers) calls = [mock.call(hpe_conn, 'GET', path='fake/path', data=None, headers=headers, blocking=False, timeout=60, allow_redirects=False), mock.call(hpe_conn, 'GET', path='/new/path', data=None, headers=headers)] conn_mock.assert_has_calls(calls) self.assertEqual(res.status_code, 200) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/test_main.py0000664000175000017500000001075000000000000024573 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import json from unittest import mock from sushy import auth as sushy_auth import testtools from proliantutils import exception from proliantutils.redfish import connector from proliantutils.redfish import main from proliantutils.redfish.resources.account_service import account_service from proliantutils.redfish.resources.manager import manager from proliantutils.redfish.resources.system import system from proliantutils.redfish.resources import update_service class HPESushyTestCase(testtools.TestCase): @mock.patch.object(sushy_auth, 'SessionOrBasicAuth', autospec=True) @mock.patch.object(connector, 'HPEConnector', autospec=True) def setUp(self, connector_mock, mock_auth): super(HPESushyTestCase, self).setUp() with open('proliantutils/tests/redfish/' 'json_samples/root.json', 'r') as f: root_json = json.loads(f.read()) connector_mock.return_value.get.return_value.json.return_value = ( root_json) self.hpe_sushy = main.HPESushy('https://1.2.3.4', username='foo', password='bar') def test_get_system_collection_path(self): self.assertEqual('/redfish/v1/Systems/', self.hpe_sushy.get_system_collection_path()) def test_get_system_collection_path_missing_systems_attr(self): self.hpe_sushy.json.pop('Systems') self.assertRaisesRegex( exception.MissingAttributeError, 'The attribute Systems is missing', self.hpe_sushy.get_system_collection_path) @mock.patch.object(system, 'HPESystem', autospec=True) def test_get_system(self, mock_system): sys_inst = self.hpe_sushy.get_system('1234') self.assertIsInstance(sys_inst, system.HPESystem.__class__) mock_system.assert_called_once_with(self.hpe_sushy._conn, '1234', self.hpe_sushy.redfish_version) def test_get_manager_collection_path(self): self.assertEqual('/redfish/v1/Managers/', self.hpe_sushy.get_manager_collection_path()) def test_get_manager_collection_path_missing_systems_attr(self): self.hpe_sushy.json.pop('Managers') self.assertRaisesRegex( exception.MissingAttributeError, 'The attribute Managers is missing', self.hpe_sushy.get_manager_collection_path) @mock.patch.object(manager, 'HPEManager', autospec=True) def test_get_manager(self, mock_manager): sys_inst = self.hpe_sushy.get_manager('1234') self.assertIsInstance(sys_inst, manager.HPEManager.__class__) mock_manager.assert_called_once_with(self.hpe_sushy._conn, '1234', self.hpe_sushy.redfish_version) @mock.patch.object(update_service, 'HPEUpdateService', autospec=True) def test_get_update_service(self, mock_update_service): us_inst = self.hpe_sushy.get_update_service() self.assertIsInstance(us_inst, update_service.HPEUpdateService.__class__) mock_update_service.assert_called_once_with( self.hpe_sushy._conn, "/redfish/v1/UpdateService/", self.hpe_sushy.redfish_version) @mock.patch.object(account_service, 'HPEAccountService', autospec=True) def test_get_account_service(self, mock_account_service): acc_inst = self.hpe_sushy.get_account_service() self.assertIsInstance(acc_inst, account_service.HPEAccountService.__class__) mock_account_service.assert_called_once_with( self.hpe_sushy._conn, "/redfish/v1/AccountService/", self.hpe_sushy.redfish_version) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/test_redfish.py0000664000175000017500000041210500000000000025273 0ustar00zuulzuul00000000000000# Copyright 2019-2022 Hewlett Packard Enterprise Development Company, L.P. # All Rights Reserved. # # 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 builtins import collections import io import json import os from unittest import mock import ddt import sushy from sushy.resources.system import system import testtools from proliantutils import exception from proliantutils.ilo import constants as ilo_cons from proliantutils.redfish import main from proliantutils.redfish import redfish from proliantutils.redfish.resources.account_service import account from proliantutils.redfish.resources.account_service import account_service from proliantutils.redfish.resources import gpu_common as common_gpu from proliantutils.redfish.resources.manager import manager from proliantutils.redfish.resources.manager import virtual_media from proliantutils.redfish.resources.system import bios from proliantutils.redfish.resources.system import constants as sys_cons from proliantutils.redfish.resources.system import iscsi from proliantutils.redfish.resources.system import memory from proliantutils.redfish.resources.system import pci_device from proliantutils.redfish.resources.system.storage import array_controller from proliantutils.redfish.resources.system.storage \ import common as common_storage from proliantutils.redfish.resources.system import system as pro_sys from proliantutils import utils as common_utils @ddt.ddt class RedfishOperationsTestCase(testtools.TestCase): @mock.patch.object(main, 'HPESushy', autospec=True) def setUp(self, sushy_mock): super(RedfishOperationsTestCase, self).setUp() self.sushy = mock.MagicMock() self.sushy.get_system_collection_path.return_value = ( '/redfish/v1/Systems') self.sushy.get_manager_collection_path.return_value = ( '/redfish/v1/Managers') sushy_mock.return_value = self.sushy with open('proliantutils/tests/redfish/' 'json_samples/root.json', 'r') as f: self.sushy.json = json.loads(f.read()) self.rf_client = redfish.RedfishOperations( '1.2.3.4', username='foo', password='bar') args, kwargs = sushy_mock.call_args self.assertEqual(('https://1.2.3.4',), args) self.assertFalse(kwargs.get('verify')) self.assertEqual('/redfish/v1/', kwargs.get('root_prefix')) self.assertEqual('foo', kwargs.get('username')) self.assertEqual('bar', kwargs.get('password')) @mock.patch.object(main, 'HPESushy', autospec=True) def test_sushy_init_fail(self, sushy_mock): sushy_mock.side_effect = sushy.exceptions.SushyError self.assertRaisesRegex( exception.IloConnectionError, 'The Redfish controller at "https://1.2.3.4" has thrown error', redfish.RedfishOperations, '1.2.3.4', username='foo', password='bar') def test__get_sushy_system_fail(self): self.rf_client._sushy.get_system.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish System "apple" was not found.', self.rf_client._get_sushy_system, 'apple') def test__get_sushy_manager_fail(self): self.rf_client._sushy.get_manager.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish Manager "banana" was not found.', self.rf_client._get_sushy_manager, 'banana') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_product_name(self, get_system_mock): product_mock = mock.PropertyMock(return_value='ProLiant DL180 Gen10') type(get_system_mock.return_value).model = product_mock product_name = self.rf_client.get_product_name() self.assertEqual('ProLiant DL180 Gen10', product_name) def test_get_host_power_status(self): self.sushy.get_system().power_state = sushy.SYSTEM_POWER_STATE_ON power_state = self.rf_client.get_host_power_status() self.assertEqual('ON', power_state) def test_reset_server(self): self.rf_client.reset_server() self.sushy.get_system().reset_system.assert_called_once_with( sushy.RESET_FORCE_RESTART) def test_reset_server_invalid_value(self): self.sushy.get_system().reset_system.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to reset server.', self.rf_client.reset_server) @mock.patch.object(redfish.RedfishOperations, 'get_host_power_status') def test_set_host_power_no_change(self, get_host_power_status_mock): get_host_power_status_mock.return_value = 'ON' self.rf_client.set_host_power('ON') self.assertTrue(get_host_power_status_mock.called) self.assertFalse(self.sushy.get_system().reset_system.called) @mock.patch.object(redfish.RedfishOperations, 'get_host_power_status') def test_set_host_power_failure(self, get_host_power_status_mock): get_host_power_status_mock.return_value = 'OFF' self.sushy.get_system().reset_system.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to set power state of server to ON', self.rf_client.set_host_power, 'ON') @mock.patch.object(redfish.RedfishOperations, 'get_host_power_status') def test_set_host_power_invalid_input(self, host_power_status_mock): self.assertRaisesRegex( exception.InvalidInputError, 'The parameter "target_value" value "Off" is invalid.', self.rf_client.set_host_power, 'Off') @mock.patch.object(redfish.RedfishOperations, 'get_host_power_status') def test_set_host_power_exc(self, host_power_status_mock): self.assertRaises(exception.InvalidInputError, self.rf_client.set_host_power, 'invalid') @mock.patch.object(redfish.RedfishOperations, 'get_host_power_status') @mock.patch.object(redfish.RedfishOperations, '_retry_until_powered_on') def test_set_host_power_off(self, retry_mock, host_power_status_mock): host_power_status_mock.return_value = 'ON' self.rf_client.set_host_power('OFF') host_power_status_mock.assert_called_once_with() self.assertTrue(retry_mock.called) @mock.patch.object(redfish.RedfishOperations, '_perform_power_op') @mock.patch.object(redfish.RedfishOperations, 'get_host_power_status') @mock.patch.object(redfish.RedfishOperations, '_retry_until_powered_on') def test_set_host_power_on(self, retry_mock, host_power_status_mock, perform_power_op_mock): host_power_status_mock.return_value = 'OFF' self.rf_client.set_host_power('ON') host_power_status_mock.assert_called_once_with() self.assertFalse(perform_power_op_mock.called) self.assertTrue(retry_mock.called) @mock.patch.object(redfish.RedfishOperations, '_perform_power_op') @mock.patch.object(redfish.RedfishOperations, 'get_host_power_status') def test_retry_until_powered_on_3times(self, host_power_status_mock, perform_power_mock): host_power_status_mock.side_effect = ['OFF', 'OFF', 'ON'] self.rf_client._retry_until_powered_on('ON') self.assertEqual(3, host_power_status_mock.call_count) @mock.patch.object(redfish.RedfishOperations, '_perform_power_op') @mock.patch.object(redfish.RedfishOperations, 'get_host_power_status') def test_retry_until_powered_on(self, host_power_status_mock, perform_power_mock): host_power_status_mock.return_value = 'ON' self.rf_client._retry_until_powered_on('ON') self.assertEqual(1, host_power_status_mock.call_count) def test_perform_power_op(self): self.rf_client._perform_power_op("ON") self.sushy.get_system().reset_system.assert_called_once_with( sushy.RESET_ON) def test_press_pwr_btn(self): self.rf_client.press_pwr_btn() self.sushy.get_system().push_power_button.assert_called_once_with( sys_cons.PUSH_POWER_BUTTON_PRESS) def test_press_pwr_btn_fail(self): self.sushy.get_system().push_power_button.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to press power button', self.rf_client.press_pwr_btn) def test_hold_pwr_btn(self): self.rf_client.hold_pwr_btn() self.sushy.get_system().push_power_button.assert_called_once_with( sys_cons.PUSH_POWER_BUTTON_PRESS_AND_HOLD) def test_hold_pwr_btn_fail(self): self.sushy.get_system().push_power_button.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to press and hold power button', self.rf_client.hold_pwr_btn) def test_get_one_time_boot_not_set(self): with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) self.sushy.get_system().json = system_json['default'] boot = self.rf_client.get_one_time_boot() self.assertEqual('Normal', boot) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_one_time_boot_set_cdrom(self, get_system_mock): with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) self.conn = mock.Mock() self.conn.get.return_value.json.return_value = system_json[ 'System_op_for_one_time_boot_cdrom'] self.sys_inst = system.System(self.conn, '/redfish/v1/Systems/437XR1138R2', redfish_version='1.0.2') get_system_mock.return_value = self.sys_inst ret = self.rf_client.get_one_time_boot() self.assertEqual(ret, 'CDROM') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_pending_boot_mode(self, get_system_mock): for cons_val in redfish.BOOT_MODE_MAP.keys(): (get_system_mock.return_value.bios_settings. pending_settings.boot_mode) = cons_val result = self.rf_client.get_pending_boot_mode() self.assertEqual(redfish.BOOT_MODE_MAP[cons_val], result) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_pending_boot_mode_fail(self, get_system_mock): bios_settings_mock = mock.PropertyMock( side_effect=sushy.exceptions.SushyError) type(get_system_mock.return_value.bios_settings).pending_settings = ( bios_settings_mock) self.assertRaisesRegex( exception.IloError, 'The pending BIOS Settings was not found.', self.rf_client.get_pending_boot_mode) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_current_boot_mode(self, get_system_mock): for cons_val in redfish.BOOT_MODE_MAP.keys(): get_system_mock.return_value.bios_settings.boot_mode = cons_val result = self.rf_client.get_current_boot_mode() self.assertEqual(redfish.BOOT_MODE_MAP[cons_val], result) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_current_boot_mode_fail(self, get_system_mock): bios_mock = mock.PropertyMock( side_effect=sushy.exceptions.SushyError) type(get_system_mock.return_value).bios_settings = bios_mock self.assertRaisesRegex( exception.IloError, 'The current BIOS Settings was not found.', self.rf_client.get_current_boot_mode) def test_activate_license(self): self.rf_client.activate_license('testkey') (self.sushy.get_manager.return_value.set_license. assert_called_once_with('testkey')) def test_activate_license_fail(self): self.sushy.get_manager.return_value.set_license.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to update the license', self.rf_client.activate_license, 'key') def _setup_virtual_media(self): self.conn = mock.Mock() with open('proliantutils/tests/redfish/' 'json_samples/manager.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) manager_mock = manager.HPEManager( self.conn, '/redfish/v1/Managers/1', redfish_version='1.0.2') with open('proliantutils/tests/redfish/' 'json_samples/vmedia_collection.json', 'r') as f: vmedia_collection_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/vmedia.json', 'r') as f: vmedia_json = json.loads(f.read()) return manager_mock, vmedia_collection_json, vmedia_json @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(virtual_media.VirtualMedia, 'eject_media') def test_eject_virtual_media(self, eject_mock, manager_mock): manager_mock.return_value, vmedia_collection_json, vmedia_json = ( self._setup_virtual_media()) self.conn.get.return_value.json.side_effect = [ vmedia_collection_json, vmedia_json['vmedia_inserted']] self.rf_client.eject_virtual_media('CDROM') eject_mock.assert_called_once_with() @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(virtual_media.VirtualMedia, 'eject_media') def test_eject_virtual_media_invalid_device(self, eject_mock, manager_mock): self.assertRaisesRegex( exception.IloError, "Invalid device 'XXXXX'. Valid devices: FLOPPY or CDROM.", self.rf_client.eject_virtual_media, 'XXXXX') self.assertFalse(eject_mock.called) self.assertFalse(manager_mock.called) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(virtual_media.VirtualMedia, 'eject_media') def test_eject_virtual_media_not_inserted(self, eject_mock, manager_mock): manager_mock.return_value, vmedia_collection_json, vmedia_json = ( self._setup_virtual_media()) self.conn.get.return_value.json.side_effect = [ vmedia_collection_json, vmedia_json['default']] self.rf_client.eject_virtual_media('CDROM') self.assertFalse(eject_mock.called) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(virtual_media.VirtualMedia, 'eject_media') def test_eject_virtual_media_floppy(self, eject_mock, manager_mock): manager_mock.return_value, vmedia_collection_json, vmedia_json = ( self._setup_virtual_media()) self.conn.get.return_value.json.side_effect = [ vmedia_collection_json, vmedia_json['vmedia_floppy']] self.rf_client.eject_virtual_media('FLOPPY') self.assertFalse(eject_mock.called) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(virtual_media.VirtualMedia, 'eject_media') def test_eject_virtual_media_fail(self, eject_mock, manager_mock): manager_mock.return_value, vmedia_collection_json, vmedia_json = ( self._setup_virtual_media()) eject_mock.side_effect = sushy.exceptions.SushyError self.conn.get.return_value.json.side_effect = [ vmedia_collection_json, vmedia_json['vmedia_inserted']] msg = ("The Redfish controller failed to eject the virtual" " media device 'CDROM'.") self.assertRaisesRegex(exception.IloError, msg, self.rf_client.eject_virtual_media, 'CDROM') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(virtual_media.VirtualMedia, 'eject_media') @mock.patch.object(virtual_media.VirtualMedia, 'insert_media') @mock.patch.object(common_utils, 'validate_href') def test_insert_virtual_media( self, validate_href_mock, insert_mock, eject_mock, manager_mock): manager_mock.return_value, vmedia_collection_json, vmedia_json = ( self._setup_virtual_media()) self.conn.get.return_value.json.side_effect = [ vmedia_collection_json, vmedia_json['default']] url = 'http://1.2.3.4:5678/xyz.iso' self.rf_client.insert_virtual_media(url, 'CDROM') self.assertFalse(eject_mock.called) insert_mock.assert_called_once_with(url) validate_href_mock.assert_called_once_with(url) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(virtual_media.VirtualMedia, 'eject_media') @mock.patch.object(virtual_media.VirtualMedia, 'insert_media') @mock.patch.object(common_utils, 'validate_href') def test_insert_virtual_media_floppy( self, validate_href_mock, insert_mock, eject_mock, manager_mock): manager_mock.return_value, vmedia_collection_json, vmedia_json = ( self._setup_virtual_media()) self.conn.get.return_value.json.side_effect = [ vmedia_collection_json, vmedia_json['vmedia_floppy']] url = 'http://1.2.3.4:5678/xyz.iso' self.rf_client.insert_virtual_media(url, 'FLOPPY') self.assertFalse(eject_mock.called) insert_mock.assert_called_once_with(url) validate_href_mock.assert_called_once_with(url) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(virtual_media.VirtualMedia, 'eject_media') @mock.patch.object(virtual_media.VirtualMedia, 'insert_media') @mock.patch.object(common_utils, 'validate_href') def test_insert_virtual_media_inserted( self, validate_href_mock, insert_mock, eject_mock, manager_mock): manager_mock.return_value, vmedia_collection_json, vmedia_json = ( self._setup_virtual_media()) self.conn.get.return_value.json.side_effect = [ vmedia_collection_json, vmedia_json['vmedia_inserted']] url = 'http://1.2.3.4:5678/xyz.iso' self.rf_client.insert_virtual_media(url, 'CDROM') eject_mock.assert_called_once_with() insert_mock.assert_called_once_with(url) validate_href_mock.assert_called_once_with(url) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(virtual_media.VirtualMedia, 'eject_media') @mock.patch.object(virtual_media.VirtualMedia, 'insert_media') @mock.patch.object(common_utils, 'validate_href') def test_insert_virtual_media_fail( self, validate_href_mock, insert_mock, eject_mock, manager_mock): manager_mock.return_value, vmedia_collection_json, vmedia_json = ( self._setup_virtual_media()) insert_mock.side_effect = sushy.exceptions.SushyError self.conn.get.return_value.json.side_effect = [ vmedia_collection_json, vmedia_json['vmedia_inserted']] url = 'http://1.2.3.4:5678/xyz.iso' msg = ("The Redfish controller failed to insert the media url " "%s in the virtual media device 'CDROM'.") % url self.assertRaisesRegex(exception.IloError, msg, self.rf_client.insert_virtual_media, url, 'CDROM') validate_href_mock.assert_called_once_with(url) @mock.patch.object(virtual_media.VirtualMedia, 'set_vm_status') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') def test_set_vm_status(self, manager_mock, set_mock): manager_mock.return_value, vmedia_collection_json, vmedia_json = ( self._setup_virtual_media()) self.conn.get.return_value.json.side_effect = [ vmedia_collection_json, vmedia_json['default']] self.rf_client.set_vm_status(device='CDROM') set_mock.assert_called_once_with(True) @mock.patch.object(virtual_media.VirtualMedia, 'set_vm_status') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') def test_set_vm_status_fail(self, manager_mock, set_mock): manager_mock.return_value, vmedia_collection_json, vmedia_json = ( self._setup_virtual_media()) set_mock.side_effect = sushy.exceptions.SushyError self.conn.get.return_value.json.side_effect = [ vmedia_collection_json, vmedia_json['default']] msg = ("The Redfish controller failed to set the virtual " "media status.") self.assertRaisesRegex(exception.IloError, msg, self.rf_client.set_vm_status, 'CDROM') @mock.patch.object(virtual_media.VirtualMedia, 'set_vm_status') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') def test_set_vm_status_not_supported_boot_option(self, manager_mock, set_mock): msg = ("Virtual media boot option 'XXXX' is invalid.") self.assertRaisesRegex(exception.IloInvalidInputError, msg, self.rf_client.set_vm_status, device='CDROM', boot_option='XXXX') self.assertFalse(manager_mock.called) self.assertFalse(set_mock.called) @mock.patch.object(virtual_media.VirtualMedia, 'set_vm_status') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') def test_set_vm_status_boot_option_connect(self, manager_mock, set_mock): self.rf_client.set_vm_status(device='CDROM', boot_option='CONNECT') self.assertFalse(manager_mock.called) self.assertFalse(set_mock.called) def test_update_firmware(self): self.rf_client.update_firmware('fw_file_url', 'ilo') (self.sushy.get_update_service.return_value.flash_firmware. assert_called_once_with(self.rf_client, 'fw_file_url')) def test_update_firmware_flash_firmware_fail(self): (self.sushy.get_update_service.return_value. flash_firmware.side_effect) = sushy.exceptions.SushyError self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to update firmware', self.rf_client.update_firmware, 'fw_file_url', 'cpld') def test_update_firmware_get_update_service_fail(self): self.sushy.get_update_service.side_effect = sushy.exceptions.SushyError self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to update firmware', self.rf_client.update_firmware, 'fw_file_url', 'cpld') @mock.patch.object(redfish.RedfishOperations, 'get_current_boot_mode') def test__is_boot_mode_uefi_uefi(self, get_current_boot_mode_mock): get_current_boot_mode_mock.return_value = ( redfish.BOOT_MODE_MAP.get(sys_cons.BIOS_BOOT_MODE_UEFI)) result = self.rf_client._is_boot_mode_uefi() self.assertTrue(result) @mock.patch.object(redfish.RedfishOperations, 'get_current_boot_mode') def test__is_boot_mode_uefi_bios(self, get_current_boot_mode_mock): get_current_boot_mode_mock.return_value = ( redfish.BOOT_MODE_MAP.get(sys_cons.BIOS_BOOT_MODE_LEGACY_BIOS)) result = self.rf_client._is_boot_mode_uefi() self.assertFalse(result) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_persistent_boot_device_uefi_cdrom(self, get_sushy_system_mock, _uefi_boot_mode_mock): (get_sushy_system_mock.return_value. bios_settings.boot_settings. get_persistent_boot_device.return_value) = (sushy. BOOT_SOURCE_TARGET_CD) _uefi_boot_mode_mock.return_value = True result = self.rf_client.get_persistent_boot_device() self.assertEqual( result, redfish.DEVICE_REDFISH_TO_COMMON.get(sushy.BOOT_SOURCE_TARGET_CD)) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_persistent_boot_device_bios(self, get_sushy_system_mock, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = False result = self.rf_client.get_persistent_boot_device() self.assertIsNone(result) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_persistent_boot_device_cdrom_continuous(self, get_system_mock): with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) self.conn = mock.Mock() self.conn.get.return_value.json.return_value = system_json[ 'System_op_for_cdrom_persistent_boot'] self.sys_inst = system.System(self.conn, '/redfish/v1/Systems/437XR1138R2', redfish_version='1.0.2') get_system_mock.return_value = self.sys_inst ret = self.rf_client.get_persistent_boot_device() self.assertEqual(ret, 'CDROM') @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_persistent_boot_device_exp(self, get_system_mock, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = True boot_mock = mock.PropertyMock( side_effect=sushy.exceptions.SushyError) type(get_system_mock.return_value.bios_settings).boot_settings = ( boot_mock) self.assertRaisesRegex( exception.IloError, 'The Redfish controller is unable to get persistent boot device.', self.rf_client.get_persistent_boot_device) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_pending_boot_mode(self, get_system_mock): self.rf_client.set_pending_boot_mode('uefi') (get_system_mock.return_value. bios_settings.pending_settings.set_pending_boot_mode. assert_called_once_with('uefi')) def test_set_pending_boot_mode_invalid_input(self): self.assertRaisesRegex( exception.IloInvalidInputError, 'Invalid Boot mode: "test" specified', self.rf_client.set_pending_boot_mode, 'test') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_pending_boot_mode_fail(self, get_system_mock): (get_system_mock.return_value.bios_settings. pending_settings.set_pending_boot_mode.side_effect) = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to set pending boot mode.', self.rf_client.set_pending_boot_mode, 'uefi') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_update_persistent_boot(self, get_system_mock): self.rf_client.update_persistent_boot(['NETWORK']) (get_system_mock.return_value.update_persistent_boot. assert_called_once_with(['NETWORK'], persistent=True)) def test_update_persistent_boot_invalid_input(self): self.assertRaisesRegex( exception.IloInvalidInputError, ('Invalid input "test". Valid devices: NETWORK, ' 'HDD, ISCSI, UEFIHTTP or CDROM.'), self.rf_client.update_persistent_boot, ['test']) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_update_persistent_boot_fail(self, get_system_mock): get_system_mock.return_value.update_persistent_boot.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to update persistent boot.', self.rf_client.update_persistent_boot, ['NETWORK']) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_one_time_boot(self, get_system_mock): self.rf_client.set_one_time_boot('CDROM') (get_system_mock.return_value.update_persistent_boot. assert_called_once_with(['CDROM'], persistent=False)) def test_set_one_time_boot_invalid_input(self): self.assertRaisesRegex( exception.IloInvalidInputError, ('Invalid input "test". Valid devices: NETWORK, ' 'HDD, ISCSI, UEFIHTTP or CDROM.'), self.rf_client.set_one_time_boot, 'test') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_one_time_boot_fail(self, get_system_mock): get_system_mock.return_value.update_persistent_boot.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to set one time boot.', self.rf_client.set_one_time_boot, 'CDROM') def _setup_reset_ilo_credential(self): self.conn = mock.Mock() with open('proliantutils/tests/redfish/' 'json_samples/account_service.json', 'r') as f: self.conn.get.return_value.json.return_value = json.loads(f.read()) account_mock = account_service.HPEAccountService( self.conn, '/redfish/v1/AccountService', redfish_version='1.0.2') with open('proliantutils/tests/redfish/' 'json_samples/account_collection.json', 'r') as f: account_collection_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/account.json', 'r') as f: account_json = json.loads(f.read()) return account_mock, account_collection_json, account_json @mock.patch.object(main.HPESushy, 'get_account_service') def test_reset_ilo_credential(self, account_mock): account_mock.return_value, account_collection_json, account_json = ( self._setup_reset_ilo_credential()) self.conn.get.return_value.json.side_effect = [ account_collection_json, account_json] self.rf_client.reset_ilo_credential('fake-password') (self.sushy.get_account_service.return_value. accounts.get_member_details.return_value. update_credentials.assert_called_once_with('fake-password')) @mock.patch.object(main.HPESushy, 'get_account_service') def test_reset_ilo_credential_fail(self, account_mock): account_mock.return_value, account_collection_json, account_json = ( self._setup_reset_ilo_credential()) self.conn.get.return_value.json.side_effect = [ account_collection_json, account_json] (self.sushy.get_account_service.return_value.accounts. get_member_details.return_value. update_credentials.side_effect) = sushy.exceptions.SushyError self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to update credentials', self.rf_client.reset_ilo_credential, 'fake-password') @mock.patch.object(account.HPEAccount, 'update_credentials') def test_reset_ilo_credential_get_account_service_fail(self, update_mock): account_service_not_found_error = sushy.exceptions.SushyError account_service_not_found_error.message = ( 'HPEAccountService not found!!') self.sushy.get_account_service.side_effect = ( account_service_not_found_error) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to update credentials for foo. ' 'Error HPEAccountService not found!!', self.rf_client.reset_ilo_credential, 'fake-password') self.assertFalse(update_mock.called) @mock.patch.object(main.HPESushy, 'get_account_service') def test_reset_ilo_credential_no_member(self, account_mock): (self.sushy.get_account_service.return_value.accounts. get_member_details.return_value) = None self.assertRaisesRegex( exception.IloError, 'No account found with username: foo', self.rf_client.reset_ilo_credential, 'fake-password') @ddt.data((sys_cons.SUPPORTED_LEGACY_BIOS_ONLY, ilo_cons.SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY), (sys_cons.SUPPORTED_UEFI_ONLY, ilo_cons.SUPPORTED_BOOT_MODE_UEFI_ONLY), (sys_cons.SUPPORTED_LEGACY_BIOS_AND_UEFI, ilo_cons.SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI)) @ddt.unpack @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_supported_boot_mode(self, supported_boot, expected_boot_val, get_system_mock): type(get_system_mock.return_value).supported_boot_mode = ( supported_boot) actual_val = self.rf_client.get_supported_boot_mode() self.assertEqual(expected_boot_val, actual_val) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_supported_boot_mode_error(self, get_system_mock): supported_boot_mode_mock = mock.PropertyMock( side_effect=sushy.exceptions.SushyError) type(get_system_mock.return_value).supported_boot_mode = ( supported_boot_mode_mock) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to get the supported boot modes.', self.rf_client.get_supported_boot_mode) @mock.patch.object(common_gpu, 'gpu_capabilities') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_chassis') @mock.patch.object(redfish.RedfishOperations, '_parse_security_dashboard_values_for_capabilities') @mock.patch.object(common_storage, 'get_drive_rotational_speed_rpm') @mock.patch.object(common_storage, 'has_nvme_ssd') @mock.patch.object(common_storage, 'has_rotational') @mock.patch.object(common_storage, 'has_ssd') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') def test_get_server_capabilities(self, get_manager_mock, get_system_mock, ssd_mock, rotational_mock, nvme_mock, speed_mock, sec_mock, get_chassis_mock, gpu_cap_mock): type(get_system_mock.return_value.pci_devices).gpu_devices = ( [mock.MagicMock(spec=pci_device.PCIDevice)]) type(get_system_mock.return_value.bios_settings).sriov = ( sys_cons.SRIOV_ENABLED) type(get_system_mock.return_value.bios_settings).cpu_vt = ( sys_cons.CPUVT_ENABLED) type(get_system_mock.return_value).secure_boot = ( mock.MagicMock(spec='Hey I am secure_boot')) type(get_system_mock.return_value).rom_version = ( 'U31 v1.00 (03/11/2017)') type(get_manager_mock.return_value).firmware_version = 'iLO 5 v1.15' type(get_system_mock.return_value).model = 'ProLiant DL180 Gen10' nic_mock = mock.PropertyMock(return_value='1Gb') type(get_system_mock.return_value.pci_devices).max_nic_capacity = ( nic_mock) tpm_mock = mock.PropertyMock(return_value=sys_cons.TPM_PRESENT_ENABLED) type(get_system_mock.return_value.bios_settings).tpm_state = ( tpm_mock) type(get_system_mock.return_value).supported_boot_mode = ( sys_cons.SUPPORTED_LEGACY_BIOS_AND_UEFI) iscsi_mock = mock.MagicMock(spec=iscsi.ISCSIResource) iscsi_mock.is_iscsi_boot_supported = mock.MagicMock(return_value=True) type(get_system_mock.return_value.bios_settings).iscsi_resource = ( iscsi_mock) type(get_system_mock.return_value.smart_storage. array_controllers).members_identities = [ mock.MagicMock(array_controller.HPEArrayController)] MemoryData = collections.namedtuple( 'MemoryData', ['has_persistent_memory', 'has_nvdimm_n', 'has_logical_nvdimm_n']) mem = MemoryData(has_persistent_memory=True, has_nvdimm_n=True, has_logical_nvdimm_n=False) memory_mock = mock.MagicMock(spec=memory.MemoryCollection) memory_mock.details = mock.MagicMock(return_value=mem) get_system_mock.return_value.memory = memory_mock ssd_mock.return_value = True rotational_mock.return_value = True nvme_mock.return_value = True raid_mock = mock.PropertyMock(return_value=set(['0', '1'])) type(get_system_mock.return_value. smart_storage).logical_raid_levels = (raid_mock) speed_mock.return_value = set(['10000', '15000']) sec_mock.return_value = {'overall_security_status': 'Risk', 'security_override_switch': 'Ok', 'last_firmware_scan_result': 'Ok'} gpu_cap_mock.return_value = ( [{'gpu_vendor_count': {'gpu_0x102b_count': 1}}, {'gpu_ven_dev_count': {'gpu_Embedded_Video_Controller_count': 1}}, {'gpu_ven_dev': {'gpu_Embedded_Video_Controller': 'true'}}]) actual = self.rf_client.get_server_capabilities() expected = {'pci_gpu_devices': 1, 'sriov_enabled': 'true', 'secure_boot': 'true', 'cpu_vt': 'true', 'rom_firmware_version': 'U31 v1.00 (03/11/2017)', 'ilo_firmware_version': 'iLO 5 v1.15', 'nic_capacity': '1Gb', 'trusted_boot': 'true', 'server_model': 'ProLiant DL180 Gen10', 'boot_mode_bios': 'true', 'boot_mode_uefi': 'true', 'iscsi_boot': 'true', 'hardware_supports_raid': 'true', 'persistent_memory': 'true', 'nvdimm_n': 'true', 'logical_nvdimm_n': 'false', 'has_ssd': 'true', 'has_rotational': 'true', 'has_nvme_ssd': 'true', 'logical_raid_level_0': 'true', 'logical_raid_level_1': 'true', 'drive_rotational_10000_rpm': 'true', 'drive_rotational_15000_rpm': 'true', 'overall_security_status': 'Risk', 'security_override_switch': 'Ok', 'last_firmware_scan_result': 'Ok', 'gpu_0x102b_count': 1, 'gpu_Embedded_Video_Controller_count': 1, 'gpu_Embedded_Video_Controller': 'true'} self.assertEqual(expected, actual) @mock.patch.object(common_gpu, 'gpu_capabilities') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_chassis') @mock.patch.object(redfish.RedfishOperations, '_parse_security_dashboard_values_for_capabilities') @mock.patch.object(common_storage, 'get_drive_rotational_speed_rpm') @mock.patch.object(common_storage, 'has_nvme_ssd') @mock.patch.object(common_storage, 'has_rotational') @mock.patch.object(common_storage, 'has_ssd') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') def test_get_server_capabilities_optional_capabilities_absent( self, get_manager_mock, get_system_mock, ssd_mock, rotational_mock, nvme_mock, speed_mock, sec_mock, get_chassis_mock, gpu_cap_mock): type(get_system_mock.return_value.pci_devices).gpu_devices = ( [mock.MagicMock(spec=pci_device.PCIDevice)]) type(get_system_mock.return_value.bios_settings).sriov = ( sys_cons.SRIOV_DISABLED) type(get_system_mock.return_value.bios_settings).cpu_vt = ( sys_cons.CPUVT_DISABLED) type(get_system_mock.return_value).secure_boot = ( mock.PropertyMock(side_effect=exception.MissingAttributeError)) type(get_system_mock.return_value).rom_version = ( 'U31 v1.00 (03/11/2017)') type(get_manager_mock.return_value).firmware_version = 'iLO 5 v1.15' type(get_system_mock.return_value).model = 'ProLiant DL180 Gen10' nic_mock = mock.PropertyMock(return_value='1Gb') type(get_system_mock.return_value.pci_devices).max_nic_capacity = ( nic_mock) type(get_system_mock.return_value.pci_devices).nic_capacity = ( nic_mock) tpm_mock = mock.PropertyMock(return_value=sys_cons.TPM_NOT_PRESENT) type(get_system_mock.return_value.bios_settings).tpm_state = ( tpm_mock) type(get_system_mock.return_value).supported_boot_mode = ( sys_cons.SUPPORTED_UEFI_ONLY) iscsi_mock = mock.MagicMock(spec=iscsi.ISCSIResource) iscsi_mock.is_iscsi_boot_supported = mock.MagicMock(return_value=False) type(get_system_mock.return_value.bios_settings).iscsi_resource = ( iscsi_mock) type(get_system_mock.return_value.smart_storage. array_controllers).members_identities = [] MemoryData = collections.namedtuple( 'MemoryData', ['has_persistent_memory', 'has_nvdimm_n', 'has_logical_nvdimm_n']) mem = MemoryData(has_persistent_memory=False, has_nvdimm_n=False, has_logical_nvdimm_n=False) memory_mock = mock.MagicMock(spec=memory.MemoryCollection) get_system_mock.return_value.memory = memory_mock memory_mock.details = mock.MagicMock(return_value=mem) ssd_mock.return_value = False rotational_mock.return_value = False nvme_mock.return_value = False raid_mock = mock.PropertyMock(return_value=set()) type(get_system_mock.return_value. smart_storage).logical_raid_levels = (raid_mock) speed_mock.return_value = set() sec_mock.return_value = {'overall_security_status': 'Risk', 'security_override_switch': 'Ok', 'last_firmware_scan_result': 'Ok'} gpu_cap_mock.return_value = ( [{'gpu_vendor_count': {'gpu_0x102b_count': 1}}, {'gpu_ven_dev_count': {'gpu_Embedded_Video_Controller_count': 1}}, {'gpu_ven_dev': {'gpu_Embedded_Video_Controller': 'true'}}]) actual = self.rf_client.get_server_capabilities() expected = {'pci_gpu_devices': 1, 'rom_firmware_version': 'U31 v1.00 (03/11/2017)', 'ilo_firmware_version': 'iLO 5 v1.15', 'nic_capacity': '1Gb', 'server_model': 'ProLiant DL180 Gen10', 'boot_mode_bios': 'false', 'boot_mode_uefi': 'true', 'overall_security_status': 'Risk', 'security_override_switch': 'Ok', 'last_firmware_scan_result': 'Ok', 'gpu_0x102b_count': 1, 'gpu_Embedded_Video_Controller_count': 1, 'gpu_Embedded_Video_Controller': 'true'} self.assertEqual(expected, actual) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_chassis') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_server_capabilities_gpu_fail(self, get_system_mock, get_chassis_mock): gpu_mock = mock.PropertyMock(side_effect=sushy.exceptions.SushyError) type(get_system_mock.return_value.pci_devices).gpu_devices = ( gpu_mock) type(get_chassis_mock.return_value.devices).vendor_dict = ( gpu_mock) self.assertRaises(exception.IloError, self.rf_client.get_server_capabilities) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') @mock.patch.object(bios.BIOSPendingSettings, 'update_bios_data_by_post') def test_reset_bios_to_default(self, update_bios_mock, get_system_mock): with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: bios_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/bios_base_configs.json', 'r') as f: bios_default_json = json.loads(f.read()) self.conn = mock.Mock() self.conn.get.return_value.json.side_effect = [ system_json['default'], bios_json['Default'], bios_json['BIOS_pending_settings_default'], bios_default_json] self.sys_inst = pro_sys.HPESystem(self.conn, '/redfish/v1/Systems/437XR1138R2', redfish_version='1.0.2') get_system_mock.return_value = self.sys_inst data = bios_default_json['BaseConfigs'][0]['default'] self.rf_client.reset_bios_to_default() update_bios_mock.assert_called_once_with(data) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_reset_bios_to_default_fail(self, get_system_mock): with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: bios_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/bios_base_configs.json', 'r') as f: bios_default_json = json.loads(f.read()) self.conn = mock.Mock() self.conn.get.return_value.json.side_effect = [ system_json['default'], bios_json['Default'], bios_json['BIOS_pending_settings_default'], bios_default_json] (get_system_mock.return_value.bios_settings. update_bios_to_default.side_effect) = sushy.exceptions.SushyError self.assertRaisesRegex( exception.IloError, "The Redfish controller is unable to update bios settings" " to default", self.rf_client.reset_bios_to_default) @mock.patch.object(redfish.LOG, 'debug', autospec=True) def test_get_secure_boot_mode(self, log_debug_mock): sushy_system_mock = self.sushy.get_system.return_value type(sushy_system_mock.secure_boot).current_boot = mock.PropertyMock( return_value=sys_cons.SECUREBOOT_CURRENT_BOOT_ENABLED) self.rf_client.get_secure_boot_mode() log_debug_mock.assert_called_once_with( '[iLO 1.2.3.4] Secure boot is Enabled') log_debug_mock.reset_mock() type(sushy_system_mock.secure_boot).current_boot = mock.PropertyMock( return_value=sys_cons.SECUREBOOT_CURRENT_BOOT_DISABLED) self.rf_client.get_secure_boot_mode() log_debug_mock.assert_called_once_with( '[iLO 1.2.3.4] Secure boot is Disabled') def test_get_secure_boot_mode_on_fail(self): sushy_system_mock = self.sushy.get_system.return_value type(sushy_system_mock).secure_boot = mock.PropertyMock( side_effect=sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloCommandNotSupportedError, 'The Redfish controller failed to provide ' 'information about secure boot on the server.', self.rf_client.get_secure_boot_mode) def test__has_secure_boot(self): sushy_system_mock = self.sushy.get_system.return_value type(sushy_system_mock).secure_boot = mock.PropertyMock( return_value='Hey I am secure_boot') self.assertTrue(self.rf_client._has_secure_boot()) def test__has_secure_boot_on_fail(self): sushy_system_mock = self.sushy.get_system.return_value type(sushy_system_mock).secure_boot = mock.PropertyMock( side_effect=sushy.exceptions.SushyError) self.assertFalse(self.rf_client._has_secure_boot()) type(sushy_system_mock).secure_boot = mock.PropertyMock( side_effect=exception.MissingAttributeError) self.assertFalse(self.rf_client._has_secure_boot()) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_set_secure_boot_mode(self, _is_boot_mode_uefi_mock): _is_boot_mode_uefi_mock.return_value = True self.rf_client.set_secure_boot_mode(True) secure_boot_mock = self.sushy.get_system.return_value.secure_boot secure_boot_mock.enable_secure_boot.assert_called_once_with(True) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_set_secure_boot_mode_in_bios(self, _is_boot_mode_uefi_mock): _is_boot_mode_uefi_mock.return_value = False self.assertRaisesRegex( exception.IloCommandNotSupportedInBiosError, 'System is not in UEFI boot mode. "SecureBoot" related resources ' 'cannot be changed.', self.rf_client.set_secure_boot_mode, True) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_set_secure_boot_mode_on_fail(self, _is_boot_mode_uefi_mock): _is_boot_mode_uefi_mock.return_value = True secure_boot_mock = self.sushy.get_system.return_value.secure_boot secure_boot_mock.enable_secure_boot.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to set secure boot settings ' 'on the server.', self.rf_client.set_secure_boot_mode, True) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_set_secure_boot_mode_for_invalid_value( self, _is_boot_mode_uefi_mock): _is_boot_mode_uefi_mock.return_value = True secure_boot_mock = self.sushy.get_system.return_value.secure_boot secure_boot_mock.enable_secure_boot.side_effect = ( exception.InvalidInputError('Invalid input')) self.assertRaises( exception.IloError, self.rf_client.set_secure_boot_mode, 'some-non-boolean') @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_reset_secure_boot_keys(self, _is_boot_mode_uefi_mock): _is_boot_mode_uefi_mock.return_value = True self.rf_client.reset_secure_boot_keys() sushy_system_mock = self.sushy.get_system.return_value sushy_system_mock.secure_boot.reset_keys.assert_called_once_with( sys_cons.SECUREBOOT_RESET_KEYS_DEFAULT) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_reset_secure_boot_keys_in_bios(self, _is_boot_mode_uefi_mock): _is_boot_mode_uefi_mock.return_value = False self.assertRaisesRegex( exception.IloCommandNotSupportedInBiosError, 'System is not in UEFI boot mode. "SecureBoot" related resources ' 'cannot be changed.', self.rf_client.reset_secure_boot_keys) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_reset_secure_boot_keys_on_fail(self, _is_boot_mode_uefi_mock): _is_boot_mode_uefi_mock.return_value = True sushy_system_mock = self.sushy.get_system.return_value sushy_system_mock.secure_boot.reset_keys.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to reset secure boot keys ' 'on the server.', self.rf_client.reset_secure_boot_keys) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_clear_secure_boot_keys(self, _is_boot_mode_uefi_mock): _is_boot_mode_uefi_mock.return_value = True self.rf_client.clear_secure_boot_keys() sushy_system_mock = self.sushy.get_system.return_value sushy_system_mock.secure_boot.reset_keys.assert_called_once_with( sys_cons.SECUREBOOT_RESET_KEYS_DELETE_ALL) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_clear_secure_boot_keys_in_bios(self, _is_boot_mode_uefi_mock): _is_boot_mode_uefi_mock.return_value = False self.assertRaisesRegex( exception.IloCommandNotSupportedInBiosError, 'System is not in UEFI boot mode. "SecureBoot" related resources ' 'cannot be changed.', self.rf_client.clear_secure_boot_keys) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_clear_secure_boot_keys_on_fail(self, _is_boot_mode_uefi_mock): _is_boot_mode_uefi_mock.return_value = True sushy_system_mock = self.sushy.get_system.return_value sushy_system_mock.secure_boot.reset_keys.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to clear secure boot keys ' 'on the server.', self.rf_client.clear_secure_boot_keys) @mock.patch.object(common_storage, 'get_local_gb') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_essential_properties(self, get_system_mock, local_gb_mock): memory_mock = mock.PropertyMock(return_value=20) type(get_system_mock.return_value.memory_summary).size_gib = ( memory_mock) count_mock = mock.PropertyMock(return_value=40) type(get_system_mock.return_value.processors.summary).count = ( count_mock) arch_mock = mock.PropertyMock(return_value=sushy.PROCESSOR_ARCH_x86) type(get_system_mock.return_value.processors.summary).architecture = ( arch_mock) type(get_system_mock.return_value.ethernet_interfaces).summary = ( {'1': '12:44:6A:3B:04:11'}) local_gb_mock.return_value = 600 actual = self.rf_client.get_essential_properties() expected = {'properties': {'cpus': 40, 'cpu_arch': 'x86_64', 'memory_mb': 20480, 'local_gb': 600}, 'macs': {'1': '12:44:6A:3B:04:11'}} self.assertEqual(expected, actual) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_essential_properties_fail(self, get_system_mock): memory_mock = mock.PropertyMock( side_effect=sushy.exceptions.SushyError) type(get_system_mock.return_value.memory_summary).size_gib = ( memory_mock) self.assertRaisesRegex( exception.IloError, "The Redfish controller failed to get the " "resource data. Error None", self.rf_client.get_essential_properties) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_set_iscsi_info_bios(self, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = False self.assertRaisesRegex(exception.IloCommandNotSupportedInBiosError, 'iSCSI boot is not supported ' 'in the BIOS boot mode', self.rf_client.set_iscsi_info, 'iqn.2011-07.com.example.server:test1', '1', '10.10.1.30') @mock.patch.object(redfish.RedfishOperations, '_change_iscsi_target_settings', autospec=True) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_set_iscsi_info_uefi(self, _uefi_boot_mode_mock, change_iscsi_target_settings_mock): _uefi_boot_mode_mock.return_value = True iscsi_variables = { 'iSCSITargetName': 'iqn.2011-07.com.example.server:test1', 'iSCSITargetInfoViaDHCP': False, 'iSCSILUN': '1', 'iSCSIConnection': 'Enabled', 'iSCSITargetIpAddress': '10.10.1.30', 'iSCSITargetTcpPort': 3260} self.rf_client.set_iscsi_info( 'iqn.2011-07.com.example.server:test1', '1', '10.10.1.30') change_iscsi_target_settings_mock.assert_called_once_with( self.rf_client, iscsi_variables, []) @mock.patch.object(redfish.RedfishOperations, '_change_iscsi_target_settings', autospec=True) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_set_iscsi_info_uefi_with_mac(self, _uefi_boot_mode_mock, change_iscsi_target_settings_mock): _uefi_boot_mode_mock.return_value = True iscsi_variables = { 'iSCSITargetName': 'iqn.2011-07.com.example.server:test1', 'iSCSITargetInfoViaDHCP': False, 'iSCSILUN': '1', 'iSCSIConnection': 'Enabled', 'iSCSITargetIpAddress': '10.10.1.30', 'iSCSITargetTcpPort': 3260} self.rf_client.set_iscsi_info( 'iqn.2011-07.com.example.server:test1', '1', '10.10.1.30', macs=['98:f2:b3:ee:f4:00']) change_iscsi_target_settings_mock.assert_called_once_with( self.rf_client, iscsi_variables, ['98:f2:b3:ee:f4:00']) @mock.patch.object(redfish.RedfishOperations, '_change_iscsi_target_settings', autospec=True) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_set_iscsi_info_uefi_with_chap( self, _uefi_boot_mode_mock, change_iscsi_target_settings_mock): _uefi_boot_mode_mock.return_value = True iscsi_variables = { 'iSCSITargetName': 'iqn.2011-07.com.example.server:test1', 'iSCSITargetInfoViaDHCP': False, 'iSCSILUN': '1', 'iSCSIConnection': 'Enabled', 'iSCSITargetIpAddress': '10.10.1.30', 'iSCSITargetTcpPort': 3260, 'iSCSIAuthenticationMethod': 'Chap', 'iSCSIChapUsername': 'admin', 'iSCSIChapSecret': 'password'} self.rf_client.set_iscsi_info( 'iqn.2011-07.com.example.server:test1', '1', '10.10.1.30', 3260, 'CHAP', 'admin', 'password') change_iscsi_target_settings_mock.assert_called_once_with( self.rf_client, iscsi_variables, []) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_unset_iscsi_info_bios(self, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = False self.assertRaisesRegex(exception.IloCommandNotSupportedInBiosError, "iSCSI boot is not supported " "in the BIOS boot mode", self.rf_client.unset_iscsi_info) @mock.patch.object(redfish.RedfishOperations, '_change_iscsi_target_settings', autospec=True) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_unset_iscsi_info_uefi(self, _uefi_boot_mode_mock, change_iscsi_target_settings_mock): _uefi_boot_mode_mock.return_value = True iscsi_variables = { 'iSCSIConnection': 'Disabled'} self.rf_client.unset_iscsi_info() change_iscsi_target_settings_mock.assert_called_once_with( self.rf_client, iscsi_variables, []) @mock.patch.object(redfish.RedfishOperations, '_change_iscsi_target_settings', autospec=True) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_unset_iscsi_info_uefi_with_mac(self, _uefi_boot_mode_mock, change_iscsi_target_settings_mock): _uefi_boot_mode_mock.return_value = True iscsi_variables = { 'iSCSIConnection': 'Disabled'} self.rf_client.unset_iscsi_info(['98:f2:b3:ee:f4:00']) change_iscsi_target_settings_mock.assert_called_once_with( self.rf_client, iscsi_variables, ['98:f2:b3:ee:f4:00']) @mock.patch.object(iscsi.ISCSISettings, 'update_iscsi_settings') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test__change_iscsi_target_settings( self, get_system_mock, update_iscsi_settings_mock): with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: bios_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/bios_mappings.json', 'r') as f: bios_mappings_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/iscsi.json', 'r') as f: iscsi_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/iscsi_settings.json', 'r') as f: iscsi_settings_json = json.loads(f.read()) self.conn = mock.Mock() self.conn.get.return_value.json.side_effect = [ system_json['default'], bios_json['Default'], bios_mappings_json['Default'], iscsi_json, iscsi_settings_json['Default']] self.sys_inst = pro_sys.HPESystem(self.conn, '/redfish/v1/Systems/437XR1138R2', redfish_version='1.0.2') get_system_mock.return_value = self.sys_inst iscsi_variable = {'iSCSITargetName': 'iqn.2011-07.com.example.server:test1', 'iSCSILUN': '1', 'iSCSITargetIpAddress': '10.10.1.30', 'iSCSITargetTcpPort': 3260, 'iSCSITargetInfoViaDHCP': False, 'iSCSIConnection': 'Enabled'} iscsi_data1 = {'iSCSITargetName': 'iqn.2011-07.com.example.server:test1', 'iSCSILUN': '1', 'iSCSITargetIpAddress': '10.10.1.30', 'iSCSITargetTcpPort': 3260, 'iSCSITargetInfoViaDHCP': False, 'iSCSIConnection': 'Enabled', 'iSCSIAttemptName': 'NicBoot1', 'iSCSINicSource': 'NicBoot1', 'iSCSIAttemptInstance': 1} iscsi_data2 = {'iSCSITargetName': 'iqn.2011-07.com.example.server:test1', 'iSCSILUN': '1', 'iSCSITargetIpAddress': '10.10.1.30', 'iSCSITargetTcpPort': 3260, 'iSCSITargetInfoViaDHCP': False, 'iSCSIConnection': 'Enabled', 'iSCSIAttemptName': 'NicBoot2', 'iSCSINicSource': 'NicBoot2', 'iSCSIAttemptInstance': 2} data = { 'iSCSISources': [iscsi_data1, iscsi_data2] } self.rf_client._change_iscsi_target_settings(iscsi_variable, []) update_iscsi_settings_mock.assert_called_once_with( data) @mock.patch.object(pro_sys.HPESystem, 'validate_macs') @mock.patch.object(pro_sys.HPESystem, 'get_nic_association_name_by_mac') @mock.patch.object(iscsi.ISCSISettings, 'update_iscsi_settings') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test__change_iscsi_target_settings_with_mac( self, get_system_mock, update_iscsi_settings_mock, get_nic_association_mock, validate_macs_mock): with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: bios_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/iscsi.json', 'r') as f: iscsi_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/iscsi_settings.json', 'r') as f: iscsi_settings_json = json.loads(f.read()) self.conn = mock.Mock() self.conn.get.return_value.json.side_effect = [ system_json['default'], bios_json['Default'], iscsi_json, iscsi_settings_json['Default']] self.sys_inst = pro_sys.HPESystem(self.conn, '/redfish/v1/Systems/437XR1138R2', redfish_version='1.0.2') get_system_mock.return_value = self.sys_inst get_nic_association_mock.return_value = 'NicBoot1' iscsi_variable = {'iSCSITargetName': 'iqn.2011-07.com.example.server:test1', 'iSCSILUN': '1', 'iSCSITargetIpAddress': '10.10.1.30', 'iSCSITargetTcpPort': 3260, 'iSCSITargetInfoViaDHCP': False, 'iSCSIConnection': 'Enabled'} iscsi_data = {'iSCSITargetName': 'iqn.2011-07.com.example.server:test1', 'iSCSILUN': '1', 'iSCSITargetIpAddress': '10.10.1.30', 'iSCSITargetTcpPort': 3260, 'iSCSITargetInfoViaDHCP': False, 'iSCSIConnection': 'Enabled', 'iSCSIAttemptName': 'NicBoot1', 'iSCSINicSource': 'NicBoot1', 'iSCSIAttemptInstance': 1} data = { 'iSCSISources': [iscsi_data] } self.rf_client._change_iscsi_target_settings( iscsi_variable, ['98:f2:b3:ee:f4:00']) update_iscsi_settings_mock.assert_called_once_with( data) validate_macs_mock.assert_called_once_with(['98:f2:b3:ee:f4:00']) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test__change_iscsi_target_settings_failed_getting_mappings( self, get_system_mock): mapping_mock = mock.PropertyMock( side_effect=sushy.exceptions.SushyError) type(get_system_mock.return_value.bios_settings).bios_mappings = ( mapping_mock) self.assertRaisesRegex( exception.IloError, "The Redfish controller failed to get the " "bios mappings. Error", self.rf_client._change_iscsi_target_settings, {}, []) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test__change_iscsi_target_settings_no_macs( self, get_system_mock): with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: bios_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/bios_mappings.json', 'r') as f: bios_mappings_json = json.loads(f.read()) self.conn = mock.Mock() self.conn.get.return_value.json.side_effect = [ system_json['default'], bios_json['Default'], bios_mappings_json['Mappings_without_nic']] self.sys_inst = pro_sys.HPESystem(self.conn, '/redfish/v1/Systems/437XR1138R2', redfish_version='1.0.2') get_system_mock.return_value = self.sys_inst self.assertRaisesRegex( exception.IloError, "No macs were found on the system", self.rf_client._change_iscsi_target_settings, {}, []) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test__change_iscsi_target_settings_mac_invalid( self, get_system_mock): msg = ("Given macs: %(macs)s not found in the system" % {'macs': str(['12:44:6A:3B:04:15'])}) get_system_mock.return_value.validate_macs.side_effect = ( exception.InvalidInputError(msg)) self.assertRaisesRegex( exception.InvalidInputError, r"Given macs: \['12:44:6A:3B:04:15'\] not found in the system", self.rf_client._change_iscsi_target_settings, {}, ['12:44:6A:3B:04:15']) @mock.patch.object(iscsi.ISCSISettings, 'update_iscsi_settings') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test__change_iscsi_target_settings_update_failed( self, get_system_mock, update_iscsi_settings_mock): with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: bios_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/bios_mappings.json', 'r') as f: bios_mappings_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/iscsi.json', 'r') as f: iscsi_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/iscsi_settings.json', 'r') as f: iscsi_settings_json = json.loads(f.read()) self.conn = mock.Mock() self.conn.get.return_value.json.side_effect = [ system_json['default'], bios_json['Default'], bios_mappings_json['Default'], iscsi_json, iscsi_settings_json['Default']] self.sys_inst = pro_sys.HPESystem(self.conn, '/redfish/v1/Systems/437XR1138R2', redfish_version='1.0.2') get_system_mock.return_value = self.sys_inst iscsi_variable = {'iSCSITargetName': 'iqn.2011-07.com.example.server:test1', 'iSCSILUN': '1', 'iSCSITargetIpAddress': '10.10.1.30', 'iSCSITargetTcpPort': 3260, 'iSCSITargetInfoViaDHCP': False, 'iSCSIConnection': 'Enabled'} update_iscsi_settings_mock.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller is failed to update iSCSI ' 'settings.', self.rf_client._change_iscsi_target_settings, iscsi_variable, []) @mock.patch.object(iscsi.ISCSISettings, 'update_iscsi_settings') @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_iscsi_initiator_info( self, get_system_mock, _uefi_boot_mode_mock, update_iscsi_settings_mock): with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: bios_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/iscsi.json', 'r') as f: iscsi_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/iscsi_settings.json', 'r') as f: iscsi_settings_json = json.loads(f.read()) self.conn = mock.Mock() self.conn.get.return_value.json.side_effect = [ system_json['default'], bios_json['Default'], iscsi_json, iscsi_settings_json['Default']] self.sys_inst = pro_sys.HPESystem(self.conn, '/redfish/v1/Systems/437XR1138R2', redfish_version='1.0.2') get_system_mock.return_value = self.sys_inst _uefi_boot_mode_mock.return_value = True initiator = 'iqn.2015-02.com.hpe:uefi-U31' data = {'iSCSIInitiatorName': initiator} self.rf_client.set_iscsi_initiator_info(initiator) update_iscsi_settings_mock.assert_called_once_with( data) @mock.patch.object(iscsi.ISCSISettings, 'update_iscsi_settings') @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_iscsi_initiator_info_update_failed( self, get_system_mock, _uefi_boot_mode_mock, update_iscsi_settings_mock): with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: bios_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/iscsi.json', 'r') as f: iscsi_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/iscsi_settings.json', 'r') as f: iscsi_settings_json = json.loads(f.read()) self.conn = mock.Mock() self.conn.get.return_value.json.side_effect = [ system_json['default'], bios_json['Default'], iscsi_json, iscsi_settings_json['Default']] self.sys_inst = pro_sys.HPESystem(self.conn, '/redfish/v1/Systems/437XR1138R2', redfish_version='1.0.2') get_system_mock.return_value = self.sys_inst _uefi_boot_mode_mock.return_value = True initiator = 'iqn.2015-02.com.hpe:uefi-U31' update_iscsi_settings_mock.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller has failed to update iSCSI ' 'settings.', self.rf_client.set_iscsi_initiator_info, initiator) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_set_iscsi_initiator_info_bios(self, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = False self.assertRaisesRegex(exception.IloCommandNotSupportedInBiosError, 'iSCSI initiator cannot be updated in ' 'BIOS boot mode', self.rf_client.set_iscsi_initiator_info, 'iqn.2015-02.com.hpe:uefi-U31') @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_iscsi_initiator_info( self, get_system_mock, _uefi_boot_mode_mock): with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: bios_json = json.loads(f.read()) with open('proliantutils/tests/redfish/' 'json_samples/iscsi.json', 'r') as f: iscsi_json = json.loads(f.read()) self.conn = mock.Mock() self.conn.get.return_value.json.side_effect = [ system_json['default'], bios_json['Default'], iscsi_json] self.sys_inst = pro_sys.HPESystem(self.conn, '/redfish/v1/Systems/437XR1138R2', redfish_version='1.0.2') get_system_mock.return_value = self.sys_inst _uefi_boot_mode_mock.return_value = True ret = self.rf_client.get_iscsi_initiator_info() self.assertEqual('iqn.2015-02.com.hpe:uefi-U31', ret) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_iscsi_initiator_info_failed( self, get_system_mock, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = True iscsi_resource_mock = mock.PropertyMock( side_effect=sushy.exceptions.SushyError) type(get_system_mock.return_value.bios_settings).iscsi_resource = ( iscsi_resource_mock) self.assertRaisesRegex( exception.IloError, 'The Redfish controller has failed to get the ' 'iSCSI initiator.', self.rf_client.get_iscsi_initiator_info) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi', autospec=True) def test_get_iscsi_initiator_info_bios(self, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = False self.assertRaisesRegex(exception.IloCommandNotSupportedInBiosError, 'iSCSI initiator cannot be retrieved in ' 'BIOS boot mode', self.rf_client.get_iscsi_initiator_info) def test_inject_nmi(self): self.sushy.get_system().power_state = sushy.SYSTEM_POWER_STATE_ON self.rf_client.inject_nmi() self.sushy.get_system().reset_system.assert_called_once_with( sushy.RESET_NMI) def test_inject_nmi_power_off(self): self.sushy.get_system().power_state = sushy.SYSTEM_POWER_STATE_OFF self.assertRaisesRegex( exception.IloError, 'Server is not in powered on state.', self.rf_client.inject_nmi) self.assertFalse(self.sushy.get_system().reset_system.called) def test_inject_nmi_sushy_exc(self): self.sushy.get_system().power_state = sushy.SYSTEM_POWER_STATE_ON self.sushy.get_system().reset_system.side_effect = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to inject nmi', self.rf_client.inject_nmi) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_current_bios_settings_filter_true(self, get_system_mock): only_allowed_settings = True with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: jsonval = json.loads(f.read()).get("Default") type( get_system_mock.return_value.bios_settings).json = ( mock.PropertyMock(return_value=jsonval)) settings = jsonval.get('Attributes') expected_value = {k: settings[k] for k in ( ilo_cons.SUPPORTED_REDFISH_BIOS_PROPERTIES) if k in settings} actual_value = self.rf_client.get_current_bios_settings( only_allowed_settings) self.assertEqual(expected_value, actual_value) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_current_bios_settings_filter_false(self, get_system_mock): only_allowed_settings = False with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: jsonval = json.loads(f.read()).get("Default") type( get_system_mock.return_value.bios_settings).json = ( mock.PropertyMock(return_value=jsonval)) settings = jsonval.get('Attributes') expected_value = settings actual_value = self.rf_client.get_current_bios_settings( only_allowed_settings) self.assertEqual(expected_value, actual_value) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_current_bios_settings_raises_exception(self, get_system_mock): only_allowed_settings = True bios_mock = mock.PropertyMock() bios_mock.side_effect = sushy.exceptions.SushyError type(get_system_mock.return_value.bios_settings).json = bios_mock self.assertRaisesRegex( exception.IloError, 'The current BIOS Settings were not found', self.rf_client.get_current_bios_settings, only_allowed_settings) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_pending_bios_settings_filter_true(self, system_mock): only_allowed_settings = True with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: jsonval = json.loads(f.read()).get("BIOS_pending_settings_default") type(system_mock.return_value.bios_settings.pending_settings).json = ( mock.PropertyMock(return_value=jsonval)) settings = jsonval.get('Attributes') expected_value = {k: settings[k] for k in ( ilo_cons.SUPPORTED_REDFISH_BIOS_PROPERTIES) if k in settings} actual_value = self.rf_client.get_pending_bios_settings( only_allowed_settings) self.assertEqual(expected_value, actual_value) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_pending_bios_settings_filter_false(self, system_mock): only_allowed_settings = False with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: jsonval = json.loads(f.read()).get("BIOS_pending_settings_default") type(system_mock.return_value.bios_settings.pending_settings).json = ( mock.PropertyMock(return_value=jsonval)) expected = jsonval.get('Attributes') actual = self.rf_client.get_pending_bios_settings( only_allowed_settings) self.assertEqual(expected, actual) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_pending_bios_settings_raises_exception(self, system_mock): only_allowed_settings = True bios_mock = mock.PropertyMock() bios_mock.side_effect = sushy.exceptions.SushyError type(system_mock.return_value.bios_settings.pending_settings).json = ( bios_mock) self.assertRaisesRegex( exception.IloError, 'The pending BIOS Settings were not found', self.rf_client.get_pending_bios_settings, only_allowed_settings) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_default_bios_settings_filter_true(self, get_system_mock): only_allowed_settings = True with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: jsonval = json.loads(f.read()).get("Default") settings = jsonval.get("Attributes") type(get_system_mock.return_value.bios_settings).default_settings = ( mock.PropertyMock(return_value=settings)) expected = {k: settings[k] for k in ( ilo_cons.SUPPORTED_REDFISH_BIOS_PROPERTIES) if k in settings} actual = self.rf_client.get_default_bios_settings( only_allowed_settings) self.assertEqual(expected, actual) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_default_bios_settings_filter_false(self, get_system_mock): only_allowed_settings = False with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: jsonval = json.loads(f.read()).get("Default") settings = jsonval.get("Attributes") type(get_system_mock.return_value.bios_settings).default_settings = ( mock.PropertyMock(return_value=settings)) expected = settings actual = self.rf_client.get_default_bios_settings( only_allowed_settings) self.assertEqual(expected, actual) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_default_bios_settings_raises_exception(self, get_system_mock): only_allowed_settings = True bios_mock = mock.PropertyMock(side_effect=sushy.exceptions.SushyError) type(get_system_mock.return_value.bios_settings).default_settings = ( bios_mock) self.assertRaisesRegex( exception.IloError, 'The default BIOS Settings were not found', self.rf_client.get_default_bios_settings, only_allowed_settings) @mock.patch.object(bios.BIOSPendingSettings, 'update_bios_data_by_patch') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_bios_settings_no_data(self, system_mock, update_data_mock): data = None apply_filter = True self.assertRaisesRegex( exception.IloError, "Could not apply settings with empty data", self.rf_client.set_bios_settings, data, apply_filter) update_data_mock.assert_not_called() system_mock.assert_not_called() @mock.patch.object(bios.BIOSPendingSettings, 'update_bios_data_by_patch') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_bios_settings_no_data_no_filter(self, system_mock, update_data_mock): data = None apply_filter = False self.assertRaisesRegex( exception.IloError, "Could not apply settings with empty data", self.rf_client.set_bios_settings, data, apply_filter) update_data_mock.assert_not_called() system_mock.assert_not_called() @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_bios_settings_filter_true_valid_data(self, system_mock): apply_filter = True data = { "BootOrderPolicy": "AttemptOnce", "IntelPerfMonitoring": "Enabled", "IntelProcVtd": "Disabled", "UefiOptimizedBoot": "Disabled", "PowerProfile": "MaxPerf", } bios_ps_mock = mock.MagicMock(spec=bios.BIOSPendingSettings) pending_settings_mock = mock.PropertyMock(return_value=bios_ps_mock) type(system_mock.return_value.bios_settings).pending_settings = ( pending_settings_mock) self.rf_client.set_bios_settings(data, apply_filter) bios_ps_mock.update_bios_data_by_patch.assert_called_once_with(data) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_bios_settings_filter_true_invalid_data(self, system_mock): apply_filter = True data = { "AdminName": "Administrator", "BootOrderPolicy": "AttemptOnce", "IntelPerfMonitoring": "Enabled", "IntelProcVtd": "Disabled", "UefiOptimizedBoot": "Disabled", "PowerProfile": "MaxPerf", "TimeZone": "Utc1" } self.assertRaisesRegex( exception.IloError, "Could not apply settings as one or more settings" " are not supported", self.rf_client.set_bios_settings, data, apply_filter) system_mock.assert_called_once_with(redfish.PROLIANT_SYSTEM_ID) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_bios_settings_filter_false(self, system_mock): apply_filter = False data = { "BootMode": "LEGACY", "ServerName": "Gen9 server", "TimeFormat": "Ist", "BootOrderPolicy": "RetryIndefinitely", "ChannelInterleaving": "Enabled", "CollabPowerControl": "Enabled", "ConsistentDevNaming": "LomsOnly", "CustomPostMessage": "" } bios_ps_mock = mock.MagicMock(spec=bios.BIOSPendingSettings) pending_settings_mock = mock.PropertyMock(return_value=bios_ps_mock) type(system_mock.return_value.bios_settings).pending_settings = ( pending_settings_mock) self.rf_client.set_bios_settings(data, apply_filter) bios_ps_mock.update_bios_data_by_patch.assert_called_once_with(data) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_bios_settings_raises_exception(self, system_mock): apply_filter = True data = { "BootOrderPolicy": "AttemptOnce", "IntelPerfMonitoring": "Enabled", "IntelProcVtd": "Disabled", "UefiOptimizedBoot": "Disabled", "PowerProfile": "MaxPerf" } pending_settings_mock = mock.PropertyMock( side_effect=sushy.exceptions.SushyError) type(system_mock.return_value.bios_settings).pending_settings = ( pending_settings_mock) self.assertRaisesRegex( exception.IloError, 'The pending BIOS Settings resource not found', self.rf_client.set_bios_settings, data, apply_filter) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_host_post_state(self, get_system_mock): post_state = mock.PropertyMock(return_value='poweroff') type(get_system_mock.return_value).post_state = post_state result = self.rf_client.get_host_post_state() self.assertEqual('PowerOff', result) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_do_one_button_secure_erase(self, get_system_mock): self.rf_client.do_one_button_secure_erase() (get_system_mock.return_value. do_one_button_secure_erase.assert_called_once()) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_do_disk_erase_hdd(self, get_system_mock): self.rf_client.do_disk_erase('HDD') get_system_mock.return_value.do_disk_erase.assert_called_once_with( 'HDD', None) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_do_disk_erase_ssd(self, get_system_mock): self.rf_client.do_disk_erase('SSD') get_system_mock.return_value.do_disk_erase.assert_called_once_with( 'SSD', None) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_do_disk_erase_ssd_pattern_zero(self, get_system_mock): self.rf_client.do_disk_erase('SSD', 'zero') get_system_mock.return_value.do_disk_erase.assert_called_once_with( 'SSD', 'zero') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_has_disk_erase_completed(self, get_system_mock): (get_system_mock.return_value. has_disk_erase_completed.return_value) = True self.assertEqual(True, self.rf_client.has_disk_erase_completed()) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_delete_raid_configuration(self, get_system_mock): self.rf_client.delete_raid_configuration() get_system_mock.return_value.delete_raid.assert_called_once_with() @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_create_raid_configuration(self, get_system_mock): ld1 = {"size_gb": 150, "raid_level": '0', "is_root_volume": True} raid_config = {"logical_disks": [ld1]} self.rf_client.create_raid_configuration(raid_config) get_system_mock.return_value.create_raid.assert_called_once_with( raid_config) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_read_raid_configuration(self, get_system_mock): result_ld1 = [{'size_gb': 149, 'physical_disks': [u'2I:1:1'], 'raid_level': u'0', 'root_device_hint': {'wwn': u'0x600508B'}, 'controller': u'Smart Storage Controller in Slot 1', 'volume_name': u'01E6E63APFJHD'}] config = {'logical_disks': result_ld1} expected = [('HPE Smart Array P408i-p SR Gen10', config)] get_system_mock.return_value.read_raid.return_value = expected self.assertEqual(expected, self.rf_client.read_raid_configuration()) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_bios_settings_result_failed(self, get_system_mock): with open('proliantutils/tests/redfish/' 'json_samples/bios_failed.json', 'r') as f: jsonval = json.loads(f.read()).get("Default") type(get_system_mock.return_value.bios_settings).messages = ( jsonval['@Redfish.Settings']['Messages']) expected_settings = [ { "MessageArgs": [ "MinProcIdlePkgState" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [ "MinProcIdlePower" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [ "EnergyPerfBias" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [ "PowerRegulator" ], "MessageID": "Base.1.0:PropertyNotWritable" }, { "MessageArgs": [], "MessageID": "Base.1.0:Success" } ] expected = {"status": "failed", "results": expected_settings} actual = self.rf_client.get_bios_settings_result() self.assertEqual(expected, actual) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_bios_settings_result_success(self, get_system_mock): with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: jsonval = json.loads(f.read()).get("Default") actual_settings = [ { "MessageId": "Base.1.0.Success" } ] type(get_system_mock.return_value.bios_settings).messages = ( jsonval['@Redfish.Settings']['Messages']) actual = self.rf_client.get_bios_settings_result() expected = {"status": "success", "results": actual_settings} self.assertEqual(expected, actual) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_available_disk_types(self, get_system_mock): get_system_mock.return_value.get_disk_types.return_value = ['HDD', 'SSD'] self.assertEqual( ['HDD', 'SSD'], self.rf_client.get_available_disk_types()) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_http_boot_url(self, get_system_mock): with open('proliantutils/tests/redfish/' 'json_samples/bios.json', 'r') as f: jsonval = json.loads(f.read()).get("Default") type( get_system_mock.return_value.bios_settings).json = ( mock.PropertyMock(return_value=jsonval)) settings = jsonval.get('Attributes') expected_url_boot_file = settings.get('UrlBootFile') actual_url_boot_file = self.rf_client.get_http_boot_url() self.assertEqual(expected_url_boot_file, actual_url_boot_file) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_get_http_boot_url_fail(self, get_system_mock): bios_mock = mock.PropertyMock( side_effect=sushy.exceptions.SushyError) type(get_system_mock.return_value).bios_settings = bios_mock self.assertRaisesRegex( exception.IloError, 'The attribute "UrlBootFile" not found.', self.rf_client.get_http_boot_url) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_http_boot_url_dhcp_default(self, system_mock): bios_ps_mock = mock.MagicMock(spec=bios.BIOSPendingSettings) pending_settings_mock = mock.PropertyMock(return_value=bios_ps_mock) type(system_mock.return_value.bios_settings).pending_settings = ( pending_settings_mock) url = 'a.b.c' expected_parameter = { 'PreBootNetwork': 'Auto', 'UrlBootFile': 'a.b.c', 'Dhcpv4': 'Enabled' } self.rf_client.set_http_boot_url(url) bios_ps_mock.update_bios_data_by_post.assert_called_once_with( expected_parameter) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_http_boot_url_dhcp_enabled(self, system_mock): bios_ps_mock = mock.MagicMock(spec=bios.BIOSPendingSettings) pending_settings_mock = mock.PropertyMock(return_value=bios_ps_mock) type(system_mock.return_value.bios_settings).pending_settings = ( pending_settings_mock) dhcp_enabled = True url = 'a.b.c' expected_parameter = { 'PreBootNetwork': 'Auto', 'UrlBootFile': 'a.b.c', 'Dhcpv4': 'Enabled' } self.rf_client.set_http_boot_url(url, dhcp_enabled) bios_ps_mock.update_bios_data_by_post.assert_called_once_with( expected_parameter) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_http_boot_url_dhcp_disabled(self, system_mock): bios_ps_mock = mock.MagicMock(spec=bios.BIOSPendingSettings) pending_settings_mock = mock.PropertyMock(return_value=bios_ps_mock) type(system_mock.return_value.bios_settings).pending_settings = ( pending_settings_mock) dhcp_enabled = False url = 'a.b.c' expected_parameter = { 'PreBootNetwork': 'Auto', 'UrlBootFile': 'a.b.c', 'Dhcpv4': 'Disabled' } self.rf_client.set_http_boot_url(url, dhcp_enabled) bios_ps_mock.update_bios_data_by_post.assert_called_once_with( expected_parameter) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_set_http_boot_url_raises_exception(self, system_mock): pending_settings_mock = mock.PropertyMock( side_effect=sushy.exceptions.SushyError) type(system_mock.return_value.bios_settings).pending_settings = ( pending_settings_mock) dhcp_enabled = True url = 'a.b.c' self.assertRaisesRegex( exception.IloError, 'Could not set HTTPS URL on the iLO.', self.rf_client.set_http_boot_url, url, dhcp_enabled) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_add_tls_certificate_bios(self, get_sushy_system_mock, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = False data = { "NewCertificates": [ { "X509Certificate": "Some data" } ] } self.assertRaisesRegex( exception.IloCommandNotSupportedInBiosError, 'TLS certificate cannot be upload in BIOS boot mode', self.rf_client.add_tls_certificate, data) @mock.patch.object(builtins, 'open') @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_add_tls_certificate(self, get_sushy_system_mock, _uefi_boot_mode_mock, open_mock): _uefi_boot_mode_mock.return_value = True data = ( "-----BEGIN CERTIFICATE-----\nMIID7TC\nCF" "g879\n-----END CERTIFICATE-----\n" "-----BEGIN CERTIFICATE-----\nKHY8UP\nGH" "f792\n-----END CERTIFICATE-----\n" ) fd_mock = mock.MagicMock(spec=io.BytesIO) open_mock.return_value = fd_mock fd_mock.__enter__.return_value = fd_mock fd_mock.read.return_value = data c_l = [ "-----BEGIN CERTIFICATE-----\r\nMIID7TC\r\nCF" "g879\r\n-----END CERTIFICATE-----", "-----BEGIN CERTIFICATE-----\r\nKHY8UP\r\nGH" "f792\r\n-----END CERTIFICATE-----" ] expected_data = { "NewCertificates": [ { "X509Certificate": c_l[0], }, { "X509Certificate": c_l[1], } ] } cert_file = '/path/to/certfile' self.rf_client.add_tls_certificate([cert_file]) (get_sushy_system_mock.return_value. bios_settings.tls_config.tls_config_settings. add_tls_certificate.assert_called_once_with(expected_data)) @mock.patch.object(builtins, 'open') @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_add_tls_certificate_no_certificate(self, get_sushy_system_mock, _uefi_boot_mode_mock, open_mock): _uefi_boot_mode_mock.return_value = True data = ( "-----UNFORMATED CERTIFICATE-----\nMIID7TC\nCF" "g879\n-----END CERTIFICATE-----\n" "-----UNFORMATED CERTIFICATE-----\nKHY8UP\nGH" "f792\n-----END CERTIFICATE-----\n" ) fd_mock = mock.MagicMock(spec=io.BytesIO) open_mock.return_value = fd_mock fd_mock.__enter__.return_value = fd_mock fd_mock.read.return_value = data cert_file = "/path/to/certfile" self.assertRaisesRegex( exception.IloError, "No valid certificate", self.rf_client.add_tls_certificate, [cert_file]) (get_sushy_system_mock.return_value. bios_settings.tls_config.tls_config_settings. add_tls_certificate.assert_not_called()) @mock.patch.object(builtins, 'open') @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_add_tls_certificate_raises_ilo_error(self, get_sushy_system_mock, _uefi_boot_mode_mock, open_mock): _uefi_boot_mode_mock.return_value = True data = ( "-----BEGIN CERTIFICATE-----\nMIID7TC\nCF" "g879\n-----END CERTIFICATE-----\n" "-----BEGIN CERTIFICATE-----\nKHY8UP\nGH" "f792\n-----END CERTIFICATE-----\n" ) fd_mock = mock.MagicMock(spec=io.BytesIO) open_mock.return_value = fd_mock fd_mock.__enter__.return_value = fd_mock fd_mock.read.return_value = data cert_file = '/path/to/certfile' (get_sushy_system_mock.return_value. bios_settings.tls_config.tls_config_settings. add_tls_certificate.side_effect) = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller has failed to upload TLS certificate.', self.rf_client.add_tls_certificate, [cert_file]) @mock.patch.object(redfish, 'load_certificate') @mock.patch.object(redfish, 'b64decode') @mock.patch.object(builtins, 'open') def test__get_fps_from_file(self, open_mock, decode_mock, load_cert_mock): data = ( "-----BEGIN CERTIFICATE-----\nMIID7TC\nCF" "g879\n-----END CERTIFICATE-----\n" "-----BEGIN CERTIFICATE-----\nKHY8UP\nGH" "f792\n-----END CERTIFICATE-----\n" ) decode_mock.side_effect = ['first decoded data', 'second decoded data'] fd_mock = mock.MagicMock(spec=io.BytesIO) open_mock.return_value = fd_mock fd_mock.__enter__.return_value = fd_mock fd_mock.read.return_value = data decode_calls = [ mock.call('MIID7TCCFg879'), mock.call('KHY8UPGHf792') ] load_cert_calls = [ mock.call(redfish.FILETYPE_ASN1, 'first decoded data'), mock.call(redfish.FILETYPE_ASN1, 'second decoded data') ] cert1_mock = mock.MagicMock() cert2_mock = mock.MagicMock() load_cert_mock.side_effect = [cert1_mock, cert2_mock] cert1_mock.digest.return_value.decode.return_value = "hickerydickery" cert2_mock.digest.return_value.decode.return_value = "humptydumpty" cert_file = '/path/to/certfile' expected_fp_list = ["hickerydickery", "humptydumpty"] actual_fp_list = self.rf_client._get_fps_from_file(cert_file) decode_mock.assert_has_calls(decode_calls) load_cert_mock.assert_has_calls(load_cert_calls) self.assertEqual(expected_fp_list, actual_fp_list) @mock.patch.object(redfish.RedfishOperations, '_get_fps_from_file') @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_remove_tls_certificate_default_exclude_list( self, get_sushy_system_mock, _uefi_boot_mode_mock, get_fps_mock): _uefi_boot_mode_mock.return_value = True get_fps_calls = [ mock.call('/path/to/certfile1'), mock.call('/path/to/certfile2') ] get_fps_mock.side_effect = [ ["AA:BB:CC", "DD:EE:FF"], ["XX:YY:ZZ"] ] expected = ["AA:BB:CC", "DD:EE:FF", "XX:YY:ZZ"] cert_file_list = ['/path/to/certfile1', '/path/to/certfile2'] remove_tls_mock = (get_sushy_system_mock.return_value. bios_settings.tls_config.tls_config_settings. remove_tls_certificate) self.rf_client.remove_tls_certificate(cert_file_list) get_fps_mock.assert_has_calls(get_fps_calls) val_delete_certs = remove_tls_mock.call_args[0][0].get( "DeleteCertificates") actual = [item.get("FingerPrint") for item in val_delete_certs] actual.sort() get_fps_mock.assert_has_calls(get_fps_calls) self.assertEqual(expected, actual) @mock.patch.object(redfish.RedfishOperations, '_get_fps_from_file') @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_remove_tls_certificate_empty_exclude_list( self, get_sushy_system_mock, _uefi_boot_mode_mock, get_fps_mock): _uefi_boot_mode_mock.return_value = True get_fps_calls = [ mock.call('/path/to/certfile1'), mock.call('/path/to/certfile2') ] get_fps_mock.side_effect = [ ["AA:BB:CC", "DD:EE:FF"], ["XX:YY:ZZ"] ] expected = ["AA:BB:CC", "DD:EE:FF", "XX:YY:ZZ"] cert_file_list = ['/path/to/certfile1', '/path/to/certfile2'] excl_cert_file_list = [] remove_tls_mock = (get_sushy_system_mock.return_value. bios_settings.tls_config.tls_config_settings. remove_tls_certificate) self.rf_client.remove_tls_certificate(cert_file_list, excl_cert_file_list) val_delete_certs = remove_tls_mock.call_args[0][0].get( "DeleteCertificates") actual = [item.get("FingerPrint") for item in val_delete_certs] actual.sort() get_fps_mock.assert_has_calls(get_fps_calls) self.assertEqual(expected, actual) @mock.patch.object(redfish.RedfishOperations, '_get_fps_from_file') @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_remove_tls_certificate_valid_exclude_list( self, get_sushy_system_mock, _uefi_boot_mode_mock, get_fps_mock): _uefi_boot_mode_mock.return_value = True get_fps_calls = [ mock.call('/path/to/certfile1'), mock.call('/path/to/certfile2') ] get_fps_mock.side_effect = [ ["DD:EE:FF", "KK:LL:MM"], ["AA:BB:CC", "DD:EE:FF"], ["XX:YY:ZZ"] ] expected = ["AA:BB:CC", "XX:YY:ZZ"] cert_file_list = ['/path/to/certfile1', '/path/to/certfile2'] excl_cert_file_list = ['/path/to/certfile3'] remove_tls_mock = (get_sushy_system_mock.return_value. bios_settings.tls_config.tls_config_settings. remove_tls_certificate) self.rf_client.remove_tls_certificate( cert_file_list, excl_cert_file_list) val_delete_certs = remove_tls_mock.call_args[0][0].get( "DeleteCertificates") actual = [item.get("FingerPrint") for item in val_delete_certs] actual.sort() get_fps_mock.assert_has_calls(get_fps_calls) self.assertEqual(expected, actual) @mock.patch.object(redfish.RedfishOperations, '_get_fps_from_file') @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_remove_tls_certificate_no_certificate( self, get_sushy_system_mock, _uefi_boot_mode_mock, get_fps_mock): _uefi_boot_mode_mock.return_value = True cert_file_list = ['/path/to/certfile1', '/path/to/certfile2'] get_fps_calls = [ mock.call('/path/to/certfile1'), mock.call('/path/to/certfile2') ] get_fps_mock.return_value = [] self.assertRaisesRegex( exception.IloError, "No valid certificate", self.rf_client.remove_tls_certificate, cert_file_list) get_fps_mock.assert_has_calls(get_fps_calls) (get_sushy_system_mock.return_value. bios_settings.tls_config.tls_config_settings. remove_tls_certificate.assert_not_called()) @mock.patch.object(redfish.RedfishOperations, '_get_fps_from_file') @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_remove_tls_certificate_raises_ilo_error( self, get_sushy_system_mock, _uefi_boot_mode_mock, get_fps_mock): _uefi_boot_mode_mock.return_value = True get_fps_calls = [ mock.call('/path/to/certfile1'), mock.call('/path/to/certfile2') ] get_fps_mock.side_effect = [ ["AA:BB:CC", "DD:EE:FF"], ["XX:YY:ZZ"] ] cert_file_list = ['/path/to/certfile1', '/path/to/certfile2'] (get_sushy_system_mock.return_value. bios_settings.tls_config.tls_config_settings. remove_tls_certificate.side_effect) = ( sushy.exceptions.SushyError) self.assertRaisesRegex( exception.IloError, 'The Redfish controller has failed to remove TLS certificate.', self.rf_client.remove_tls_certificate, cert_file_list) get_fps_mock.assert_has_calls(get_fps_calls) @mock.patch.object(redfish.RedfishOperations, '_is_boot_mode_uefi') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_system') def test_remove_tls_certificate_bios(self, get_sushy_system_mock, _uefi_boot_mode_mock): _uefi_boot_mode_mock.return_value = False fp = ('FA:3A:68:C7:7E:ED:90:21:D2:FA:3E:54:6B:0C:14:D3:' '2F:8D:43:50:F7:05:A7:0F:1C:68:35:DB:5C:D2:53:28') self.assertRaisesRegex( exception.IloCommandNotSupportedInBiosError, 'TLS certificates cannot be removed in BIOS boot mode', self.rf_client.remove_tls_certificate, fp) @mock.patch.object(redfish.RedfishOperations, '_update_security_parameter') @mock.patch.object(main.HPESushy, 'get_account_service') def test_update_password_complexity(self, account_mock, secure_mock): self.rf_client.update_password_complexity() (self.sushy.get_account_service.return_value. update_enforce_passwd_complexity.assert_called_once_with(True)) @mock.patch.object(redfish.RedfishOperations, '_update_security_parameter') @mock.patch.object(main.HPESushy, 'get_account_service') def test_update_password_complexity_fail(self, account_mock, secure_mock): (self.sushy.get_account_service.return_value. update_enforce_passwd_complexity. side_effect) = sushy.exceptions.SushyError self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to update the security dashboard ' 'parameter ``Password_Complexity``.', self.rf_client.update_password_complexity) @mock.patch.object(redfish.RedfishOperations, '_update_security_parameter') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') def test_update_require_login_for_ilo_rbsu(self, manager_mock, secure_mock): self.rf_client.update_require_login_for_ilo_rbsu() (manager_mock.return_value.update_login_for_ilo_rbsu. assert_called_once_with(True)) @mock.patch.object(redfish.RedfishOperations, '_update_security_parameter') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') def test_update_require_login_for_ilo_rbsu_fail(self, manager_mock, secure_mock): (manager_mock.return_value.update_login_for_ilo_rbsu. side_effect) = sushy.exceptions.SushyError msg = ("The Redfish controller failed to update the security dashboard" " parameter ``RequiredLoginForiLORBSU``.") self.assertRaisesRegex( exception.IloError, msg, self.rf_client.update_require_login_for_ilo_rbsu) @mock.patch.object(redfish.RedfishOperations, '_update_security_parameter') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') def test_update_require_host_authentication(self, manager_mock, secure_mock): self.rf_client.update_require_host_authentication() (manager_mock.return_value.update_host_authentication. assert_called_once_with(True)) @mock.patch.object(redfish.RedfishOperations, '_update_security_parameter') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') def test_update_require_host_authentication_fail(self, manager_mock, secure_mock): (manager_mock.return_value.update_host_authentication. side_effect) = sushy.exceptions.SushyError msg = ("The Redfish controller failed to update the " "security dashboard paramater ``RequireHostAuthentication``.") self.assertRaisesRegex( exception.IloError, msg, self.rf_client.update_require_host_authentication) @mock.patch.object(redfish.RedfishOperations, '_update_security_parameter') @mock.patch.object(main.HPESushy, 'get_account_service') def test_update_minimum_password_length(self, account_mock, secure_mock): self.rf_client.update_minimum_password_length(passwd_length=10) (self.sushy.get_account_service.return_value. update_min_passwd_length.assert_called_once_with(10)) @mock.patch.object(redfish.RedfishOperations, '_update_security_parameter') @mock.patch.object(main.HPESushy, 'get_account_service') def test_update_minimum_password_length_fail(self, account_mock, secure_mock): (self.sushy.get_account_service.return_value. update_min_passwd_length.side_effect) = sushy.exceptions.SushyError msg = ("The Redfish controller failed to update the " "security dashboard paramater ``MinPasswordLength``.") self.assertRaisesRegex( exception.IloError, msg, self.rf_client.update_minimum_password_length) @mock.patch.object(redfish.RedfishOperations, '_update_security_parameter') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') def test_update_ipmi_over_lan(self, manager_mock, secure_mock): self.rf_client.update_ipmi_over_lan() (manager_mock.return_value.networkprotocol.return_value. update_ipmi_enabled(False)) @mock.patch.object(redfish.RedfishOperations, '_update_security_parameter') @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') def test_update_ipmi_over_lan_fail(self, manager_mock, secure_mock): (manager_mock.return_value.networkprotocol. update_ipmi_enabled.side_effect) = sushy.exceptions.SushyError msg = ("The Redfish controller failed to update the " "security dashboard paramater ``IPMI/DCMI_Over_LAN``.") self.assertRaisesRegex( exception.IloError, msg, self.rf_client.update_ipmi_over_lan) @mock.patch.object(redfish.RedfishOperations, '_update_security_parameter') @mock.patch.object(main.HPESushy, 'get_account_service') def test_update_authentication_failure_logging(self, account_mock, secure_mock): self.rf_client.update_authentication_failure_logging() (self.sushy.get_account_service.return_value. update_auth_failure_logging.assert_called_once_with(None)) @mock.patch.object(redfish.RedfishOperations, '_update_security_parameter') @mock.patch.object(main.HPESushy, 'get_account_service') def test_update_authentication_failure_logging_fail(self, account_mock, secure_mock): (self.sushy.get_account_service.return_value. update_auth_failure_logging. side_effect) = sushy.exceptions.SushyError msg = ("The Redfish controller failed to update the security " "dashboard paramater ``Authentication_failure_Logging``.") self.assertRaisesRegex( exception.IloError, msg, self.rf_client.update_authentication_failure_logging) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') def test__create_csr(self, manager_mock): data = { "CommonName": '1.1.1.1', "Country": 'IN', "State": 'KA', "City": 'blr', "OrgName": 'HPE', "OrgUnit": None } (manager_mock.return_value.securityservice.https_certificate_uri. generate_csr.return_value) = 'certificate' self.rf_client._create_csr(data) (manager_mock.return_value.securityservice.https_certificate_uri. generate_csr.assert_called_once_with(data)) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') def test__create_csr_fail(self, manager_mock): data = { "CommonName": '1.1.1.1', "Country": 'IN', "State": 'KA', "City": 'blr', "OrgName": 'HPE', "OrgUnit": None } (manager_mock.return_value.securityservice.https_certificate_uri. generate_csr.side_effect) = sushy.exceptions.SushyError msg = ("The Redfish controller failed to create the " "certificate signing request. ") self.assertRaisesRegex( exception.IloError, msg, self.rf_client._create_csr, data) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(os, 'chmod', autospec=True) @mock.patch.object(os, 'makedirs', autospec=True) @mock.patch.object(builtins, 'open', autospec=True) def test_create_csr(self, open_mock, makedirs_mock, chmod_mock, manager_mock): data = { "CommonName": '1.1.1.1', "Country": 'IN', "State": 'KA', "City": 'blr', "OrgName": 'HPE', "OrgUnit": None } (manager_mock.return_value.securityservice.https_certificate_uri. generate_csr.return_value) = 'certificate' self.rf_client.create_csr('/httproot/', data) (manager_mock.return_value.securityservice.https_certificate_uri. generate_csr.assert_called_once_with(data)) makedirs_mock.assert_called_once_with('/httproot/', 0o755) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') def test_create_csr_fail(self, manager_mock): data = { "CommonName": '1.1.1.1', "Country": 'IN', "State": 'KA', "City": 'blr', "OrgName": 'HPE', "OrgUnit": None } (manager_mock.return_value.securityservice.https_certificate_uri. generate_csr.side_effect) = sushy.exceptions.SushyError msg = ("The Redfish controller failed to create the " "certificate signing request. ") self.assertRaisesRegex( exception.IloError, msg, self.rf_client.create_csr, '/httproot', data) @mock.patch.object(redfish.RedfishOperations, '_create_csr') @mock.patch.object(redfish.RedfishOperations, '_add_https_certificate') @mock.patch.object(builtins, 'open') @mock.patch('subprocess.Popen') def test_add_ssl_certificate(self, subprocess_mock, open_mock, https_cert_mock, create_mock): csr_params = { "CommonName": '1.1.1.1', "Country": 'IN', "State": 'KA', "City": 'blr', "OrgName": 'HPE', "OrgUnit": None } p_key = '/p_key.key' create_mock.return_value = '/tmp/csr_file' data = ( "-----BEGIN CERTIFICATE-----\nMIID7TC\nCF" "g879\n-----END CERTIFICATE-----\n" "-----BEGIN CERTIFICATE-----\nKHY8UP\nGH" "f792\n-----END CERTIFICATE-----\n" ) fd_mock = mock.MagicMock(spec=io.BytesIO) open_mock.return_value = fd_mock fd_mock.__enter__.return_value = fd_mock fd_mock.read.return_value = data process_mock = mock.Mock() attrs = {'communicate.return_value': ('output', 'error')} process_mock.configure_mock(**attrs) subprocess_mock.return_value = process_mock self.rf_client.add_ssl_certificate(csr_params, data, p_key, '1234') subprocess_mock.assert_called_once() https_cert_mock.assert_called_once() create_mock.assert_called_once() @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(builtins, 'open') def test__add_https_certificate(self, open_mock, manager_mock): data = ( "-----BEGIN CERTIFICATE-----\nMIID7TC\nCF" "g879\n-----END CERTIFICATE-----\n" "-----BEGIN CERTIFICATE-----\nKHY8UP\nGH" "f792\n-----END CERTIFICATE-----\n" ) fd_mock = mock.MagicMock(spec=io.BytesIO) open_mock.return_value = fd_mock fd_mock.__enter__.return_value = fd_mock fd_mock.read.return_value = data c_l = [ "-----BEGIN CERTIFICATE-----\r\nMIID7TC\r\nCF" "g879\r\n-----END CERTIFICATE-----", "-----BEGIN CERTIFICATE-----\r\nKHY8UP\r\nGH" "f792\r\n-----END CERTIFICATE-----" ] cert_file = '/path/to/certfile' self.rf_client._add_https_certificate(cert_file) (manager_mock.return_value.securityservice.https_certificate_uri. import_certificate.assert_called_once_with(c_l[0])) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(builtins, 'open') def test__add_https_certificate_no_certificate(self, open_mock, manager_mock): data = ( "-----UNFORMATED CERTIFICATE-----\nMIID7TC\nCF" "g879\n-----END CERTIFICATE-----\n" "-----UNFORMATED CERTIFICATE-----\nKHY8UP\nGH" "f792\n-----END CERTIFICATE-----\n" ) fd_mock = mock.MagicMock(spec=io.BytesIO) open_mock.return_value = fd_mock fd_mock.__enter__.return_value = fd_mock fd_mock.read.return_value = data cert_file = "/path/to/certfile" self.assertRaisesRegex( exception.IloError, "No valid certificate", self.rf_client._add_https_certificate, cert_file) (manager_mock.return_value.securityservice.https_certificate_uri. import_certificate.assert_not_called()) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(builtins, 'open') def test__add_https_certificate_fail(self, open_mock, manager_mock): data = ( "-----BEGIN CERTIFICATE-----\nMIID7TC\nCF" "g879\n-----END CERTIFICATE-----\n" "-----BEGIN CERTIFICATE-----\nKHY8UP\nGH" "f792\n-----END CERTIFICATE-----\n" ) fd_mock = mock.MagicMock(spec=io.BytesIO) open_mock.return_value = fd_mock fd_mock.__enter__.return_value = fd_mock fd_mock.read.return_value = data cert_file = '/path/to/certfile' (manager_mock.return_value.securityservice.https_certificate_uri. import_certificate.side_effect) = sushy.exceptions.SushyError self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to import the given ' 'certificate. ', self.rf_client._add_https_certificate, cert_file) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(builtins, 'open') def test_add_https_certificate(self, open_mock, manager_mock): data = ( "-----BEGIN CERTIFICATE-----\nMIID7TC\nCF" "g879\n-----END CERTIFICATE-----\n" "-----BEGIN CERTIFICATE-----\nKHY8UP\nGH" "f792\n-----END CERTIFICATE-----\n" ) fd_mock = mock.MagicMock(spec=io.BytesIO) open_mock.return_value = fd_mock fd_mock.__enter__.return_value = fd_mock fd_mock.read.return_value = data c_l = [ "-----BEGIN CERTIFICATE-----\r\nMIID7TC\r\nCF" "g879\r\n-----END CERTIFICATE-----", "-----BEGIN CERTIFICATE-----\r\nKHY8UP\r\nGH" "f792\r\n-----END CERTIFICATE-----" ] cert_file = '/path/to/certfile' self.rf_client.add_https_certificate(cert_file) (manager_mock.return_value.securityservice.https_certificate_uri. import_certificate.assert_called_once_with(c_l[0])) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(builtins, 'open') def test_add_https_certificate_no_certificate(self, open_mock, manager_mock): data = ( "-----UNFORMATED CERTIFICATE-----\nMIID7TC\nCF" "g879\n-----END CERTIFICATE-----\n" "-----UNFORMATED CERTIFICATE-----\nKHY8UP\nGH" "f792\n-----END CERTIFICATE-----\n" ) fd_mock = mock.MagicMock(spec=io.BytesIO) open_mock.return_value = fd_mock fd_mock.__enter__.return_value = fd_mock fd_mock.read.return_value = data cert_file = "/path/to/certfile" self.assertRaisesRegex( exception.IloError, "No valid certificate", self.rf_client.add_https_certificate, cert_file) (manager_mock.return_value.securityservice.https_certificate_uri. import_certificate.assert_not_called()) @mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager') @mock.patch.object(builtins, 'open') def test_add_https_certificate_fail(self, open_mock, manager_mock): data = ( "-----BEGIN CERTIFICATE-----\nMIID7TC\nCF" "g879\n-----END CERTIFICATE-----\n" "-----BEGIN CERTIFICATE-----\nKHY8UP\nGH" "f792\n-----END CERTIFICATE-----\n" ) fd_mock = mock.MagicMock(spec=io.BytesIO) open_mock.return_value = fd_mock fd_mock.__enter__.return_value = fd_mock fd_mock.read.return_value = data cert_file = '/path/to/certfile' (manager_mock.return_value.securityservice.https_certificate_uri. import_certificate.side_effect) = sushy.exceptions.SushyError self.assertRaisesRegex( exception.IloError, 'The Redfish controller failed to import the given ' 'certificate. ', self.rf_client.add_https_certificate, cert_file) @mock.patch.object(redfish.RedfishOperations, 'get_security_dashboard_values') def test__parse_security_dashboard_values_for_capabilities(self, sec_mock): desc1 = ('The Require Login for iLO RBSU setting is disabled. ' 'This configuration allows unauthenticated iLO access ' 'through the UEFI System Utilities.') act1 = ('Enable the Require Login for iLO RBSU setting.') desc2 = ('The Password Complexity setting is disabled. This ' 'configuration increases system vulnerability to attack.') act2 = ('Enable the "Password Complexity" setting.') desc3 = ('The UEFI Secure Boot setting is disabled. In this ' 'configuration, the UEFI system firmware does not ' 'validate the boot loader, Option ROM firmware, and ' 'other system software executables for trusted signatures. ' 'This configuration breaks the chain of trust established by ' 'iLO from power-on') act3 = ('Enable the Secure Boot setting in the UEFI System Utilities.') s = {'server_configuration_lock_status': 'Disabled', 'overall_security_status': 'Risk', 'security_parameters': {'Require Host Authentication': {'ignore': False, 'security_status': 'Ok', 'state': 'Disabled'}, 'Last Firmware Scan Result': {'ignore': False, 'security_status': 'Ok', 'state': 'Ok'}, 'Require Login for iLO RBSU': {'ignore': False, 'security_status': 'Risk', 'description': desc1, 'state': 'Disabled', 'recommended_action': act1}, 'Authentication Failure Logging': {'ignore': False, 'security_status': 'Ok', 'state': 'Enabled'}, 'Password Complexity': {'ignore': False, 'security_status': 'Risk', 'description': desc2, 'state': 'Disabled', 'recommended_action': act2}, 'IPMI/DCMI Over LAN': {'ignore': False, 'security_status': 'Ok', 'state': 'Disabled'}, 'Security Override Switch': {'ignore': False, 'security_status': 'Ok', 'state': 'Off'}, 'Minimum Password Length': {'ignore': False, 'security_status': 'Ok', 'state': 'Ok'}, 'Secure Boot': {'ignore': False, 'security_status': 'Risk', 'description': desc3, 'state': 'Disabled', 'recommended_action': act3}}} sec_mock.return_value = s expected = {'last_firmware_scan_result': 'Ok', 'overall_security_status': 'Risk', 'security_override_switch': 'Ok'} actual = ( self.rf_client._parse_security_dashboard_values_for_capabilities()) self.assertEqual(expected, actual) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/redfish/test_utils.py0000664000175000017500000001072000000000000025004 0ustar00zuulzuul00000000000000# Copyright 2016 Hewlett Packard Enterprise Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test class for Utils Module.""" import json from unittest import mock import ddt import testtools from proliantutils import exception from proliantutils.redfish.resources.system import constants as sys_cons from proliantutils.redfish.resources.system import system from proliantutils.redfish import utils @ddt.ddt class UtilsTestCase(testtools.TestCase): def setUp(self): super(UtilsTestCase, self).setUp() self.conn = mock.MagicMock() with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) self.conn.get.return_value.json.return_value = system_json['default'] self.sys_inst = system.HPESystem(self.conn, '/redfish/v1/Systems/1', redfish_version='1.0.2') @ddt.data(('SecureBoot', '/redfish/v1/Systems/1/SecureBoot/'), (['Oem', 'Hpe', 'Links', 'NetworkAdapters'], '/redfish/v1/Systems/1/NetworkAdapters/'), ) @ddt.unpack def test_get_subresource_path_by(self, subresource_path, expected_result): value = utils.get_subresource_path_by(self.sys_inst, subresource_path) self.assertEqual(expected_result, value) @ddt.data(('NonSecureBoot', 'attribute NonSecureBoot is missing'), (['Links', 'Chassis'], 'attribute Links/Chassis/@odata.id is missing'), ) @ddt.unpack def test_get_subresource_path_by_when_fails( self, subresource_path, expected_exception_string_subset): self.assertRaisesRegex( exception.MissingAttributeError, expected_exception_string_subset, utils.get_subresource_path_by, self.sys_inst, subresource_path) def test_get_subresource_path_by_fails_with_empty_path(self): self.assertRaisesRegex( ValueError, '"subresource_path" cannot be empty', utils.get_subresource_path_by, self.sys_inst, []) @ddt.data((sys_cons.SUPPORTED_LEGACY_BIOS_ONLY, ('true', 'false')), (sys_cons.SUPPORTED_UEFI_ONLY, ('false', 'true')), (sys_cons.SUPPORTED_LEGACY_BIOS_AND_UEFI, ('true', 'true'))) @ddt.unpack def test_get_supported_boot_modes(self, boot_mode, expected_boot_modes): actual_boot_modes = utils.get_supported_boot_mode(boot_mode) self.assertEqual(expected_boot_modes, actual_boot_modes) @ddt.data(('SecureBoot', ['HEAD', 'GET', 'PATCH', 'POST']), ('Bios', ['GET', 'HEAD'])) @ddt.unpack def test_get_allowed_operations(self, subresource_path, expected): response_mock = mock.MagicMock() response_mock.headers = {'Allow': expected} self.conn.get.return_value = response_mock ret_val = utils.get_allowed_operations(self.sys_inst, subresource_path) self.assertEqual(ret_val, expected) @ddt.data(('PATCH', 'SecureBoot', ['HEAD', 'GET', 'PATCH', 'POST'], True), ('POST', 'Bios', ['GET', 'HEAD'], False)) @ddt.unpack @mock.patch.object(utils, 'get_allowed_operations') def test_is_operation_allowed(self, method, subresource_path, allowed_operations, expected, get_method_mock): get_method_mock.return_value = allowed_operations ret_val = utils.is_operation_allowed(method, self.sys_inst, subresource_path) self.assertEqual(ret_val, expected) @ddt.data(([2, 4, 6], 6), ([], 0)) @ddt.unpack def test_max_safe(self, iterable, expected): actual = utils.max_safe(iterable) self.assertEqual(expected, actual) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2746649 proliantutils-2.16.0/proliantutils/tests/rest/0000775000175000017500000000000000000000000021564 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/rest/__init__.py0000664000175000017500000000000000000000000023663 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/rest/rest_sample_outputs.py0000775000175000017500000002070700000000000026270 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise Development Company, L.P. # All Rights Reserved. # # 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. RESPONSE_BODY_FOR_REST_OP = """ { "AssetTag": "", "AvailableActions": [ { "Action": "Reset", "Capabilities": [ { "AllowableValues": [ "On", "ForceOff", "ForceRestart", "Nmi", "PushPowerButton" ], "PropertyName": "ResetType" } ] } ], "Bios": { "Current": { "VersionString": "I36 v1.40 (01/28/2015)" } }, "Boot": { "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideSupported": [ "None", "Cd", "Hdd", "Usb", "Utilities", "Diags", "BiosSetup", "Pxe", "UefiShell", "UefiTarget" ], "BootSourceOverrideTarget": "None", "UefiTargetBootSourceOverride": "None", "UefiTargetBootSourceOverrideSupported": [ "HD.Emb.1.2", "Generic.USB.1.1", "NIC.FlexLOM.1.1.IPv4", "NIC.FlexLOM.1.1.IPv6", "CD.Virtual.2.1" ] }, "Description": "Computer System View", "HostCorrelation": { "HostMACAddress": [ "6c:c2:17:39:fe:80", "6c:c2:17:39:fe:88" ], "HostName": "", "IPAddress": [ "", "" ] }, "IndicatorLED": "Off", "Manufacturer": "HP", "Memory": { "TotalSystemMemoryGB": 16 }, "Model": "ProLiant BL460c Gen9", "Name": "Computer System", "Oem": { "Hp": { "AvailableActions": [ { "Action": "PowerButton", "Capabilities": [ { "AllowableValues": [ "Press", "PressAndHold" ], "PropertyName": "PushType" }, { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] }, { "Action": "SystemReset", "Capabilities": [ { "AllowableValues": [ "ColdBoot" ], "PropertyName": "ResetType" }, { "AllowableValues": [ "/Oem/Hp" ], "PropertyName": "Target" } ] } ], "Battery": [], "Bios": { "Backup": { "Date": "v1.40 (01/28/2015)", "Family": "I36", "VersionString": "I36 v1.40 (01/28/2015)" }, "Current": { "Date": "01/28/2015", "Family": "I36", "VersionString": "I36 v1.40 (01/28/2015)" }, "UefiClass": 2 }, "DeviceDiscoveryComplete": { "AMSDeviceDiscovery": "NoAMS", "SmartArrayDiscovery": "Initial", "vAuxDeviceDiscovery": "DataIncomplete", "vMainDeviceDiscovery": "ServerOff" }, "PostState": "PowerOff", "PowerAllocationLimit": 500, "PowerAutoOn": "PowerOn", "PowerOnDelay": "Minimum", "PowerRegulatorMode": "Dynamic", "PowerRegulatorModesSupported": [ "OSControl", "Dynamic", "Max", "Min" ], "ServerSignature": 0, "Type": "HpComputerSystemExt.0.10.1", "VirtualProfile": "Inactive", "VirtualUUID": null, "links": { "BIOS": { "href": "/rest/v1/systems/1/bios" }, "MEMORY": { "href": "/rest/v1/Systems/1/Memory" }, "PCIDevices": { "href": "/rest/v1/Systems/1/PCIDevices" }, "PCISlots": { "href": "/rest/v1/Systems/1/PCISlots" }, "SecureBoot": { "href": "/rest/v1/Systems/1/SecureBoot" } } } }, "Power": "Off", "Processors": { "Count": 1, "ProcessorFamily": "Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz", "Status": { "HealthRollUp": "OK" } }, "SKU": "727021-B21", "SerialNumber": "SGH449WNL3", "Status": { "Health": "OK", "State": "Disabled" }, "SystemType": "Physical", "Type": "ComputerSystem.0.9.6", "UUID": "30373237-3132-4753-4834-3439574E4C33", "links": { "Chassis": [ { "href": "/rest/v1/Chassis/1" } ], "Logs": { "href": "/rest/v1/Systems/1/Logs" }, "ManagedBy": [ { "href": "/rest/v1/Managers/1" } ], "self": { "href": "/rest/v1/Systems/1" } } } """ BASE64_GZIPPED_RESPONSE = """ H4sIAHN9ClUC/+1YW2/iOBR+51dEeZqR2pAQCoWnhUALGm5qSndXoz6YYMAaEyPHoWVH/e9r50JJ7ARajVbzsH0p8rnZ5xx/53MqPysa/9M7QQDZI1jrbU3Xr5K1PUAYLDDseAwRP+Cy75FE/P08/op1IxVh/QC5p8TFUeyAHVggjBiCWTdqd+9uMSYvYgtPAIcFpkflqZ8Lm5HeEerB6Wp1VocfgAHKyvQmW1QmnoXBZkZeIO2GjPGsKDWf1Q70GSU7SNlhArbwmM/Hww7Kbt4yK8+V7HoSQO8iIhL3nmHdCSmFPsssRoInSANeRpdR5EetMLQb2t4y6qb2xbSqtdtqzbRuvuq5SG9pJEKyTqMVl4Qi83tIKVrCvi/KuRTOeyiIf1+VGbjhbkcoi0yyxdcnxIdSpy3zK4OltDQPFtISS9szJ+ghsJYWRU5dyMJdXjB7lXY0hyvkbiDGKsEjoGt+XSqKrlDkItFuS0c/8SVbfVS/JOODntHfLgzLqOUPcw99SJFnzN0uF1t58WToGHcYvo6mYyE2hrN9/QKdhlTenvGEKAsBNmo8SiXb/Gkj9mDgUbRLIckh213IINXcQ8DgVntC8CUFuQEJmEP4fcAgUT9pXyEcd5zOcklhIKOP3vDaXq1tNdt2q72C7Vszv928wq260iJOet9PqzScFYbORypKxdBfIg8wQkf9nnD/joD6GPjhCngspJAK0WB2lMAtoYdsLh4JAzhOYCy+73IFq5GJNiZLiIUvjmIjBHymdUf1hulpvD1aqff0pLmypOIp/5mtwk5GqtLZdG6oHGfVKUgXwPHZyVUe7FOT7GQWiNpfXajY8ZcDgpd6qfpzuTdp/IhZpp4+xxlw9Z/mpMr7o8pb4peeMg/D5ZNWnrgluTjbhHH3q2jT79GEDu+paLL/0oyX0Jr/G+v5HNXL0xHAOI4KwP7+rGAqEnwmRt6PcKeUxUMUsOgICv5X0KZ3YIvwIeGNRUof5pgl7VDIZKVDvHv+fTYvOJiDQTTda5USbc5n9siDnC97hHO0gxicGEYHU9S1M3Zz+jEB5OuKY+nulj92OpSCQ0Z/6HO0AVhlse+Er4oIPNVg6Hvp3lSGY4B8haULKf8pmElpFmacJbksKWg0uuXnXLwu7r8X8bkR2iLRHjemqVQMGZm+UwHpBZku9zg9jLY6Rj7ahlul2gNch1hQLcGCoowcfN5U3nnloJhyx5TIdYjPKFGWQx0lYXivymWUe5PmQSMuiIvWPhDskG8qn70IuQVn3KUsLh5j/VdmmIZlyi+AhLZzgFwhDOMW4+QT7WGB5nw+FIzVDzHOKWDk/ygCteHULUaDDYUrEbnK6RKr7q1qEG06qFrVhcDJi67tuD+ePvz9gSDuMUjCqy8KM3OG8VUJPhXqxPzScC4m7NPBYuOLQrnQ400lfSy4NNiJ+Zkx+VbwnSK6gLnHEO9LnquA0Py3EhJG88U6eZYddU9mhs8g/vLwVfsLEl/8d2ZzrX9zXWuYLW1va39oltEy7wf/nD7vBJiFcsb1AQSYbR4IxvNdtM1vRV9c3G9zodCsNc2add2tpbdO3GCO3pNwu4hP6t4P6vXWn5ORfdSQgyeBk5C5jcLMJ5vsLqLapJAw2xwC/uRMseoIFVmg4CjRMtI5qyd3XbdNu2nX7Oa1bdm163rzxr6u39r1a7tut26a9X7dsY8HkFFAdzZ8miKZ7ymAQmqwxLZq6QU9dPpgH5G1om4lTRsZVBS3QrzCwRouu4dP7Tq2phduO4B49ZFtS21Xeav8C14gvWoyFgAA """ HEADERS_FOR_REST_OP = [('content-length', '2729'), ('server', 'HP-iLO-Server/1.30'), ('etag', 'W/"B61EB245"'), ('allow', 'GET, HEAD, POST, PATCH'), ('cache-control', 'no-cache'), ('date', 'Thu, 19 Mar 2015 06:55:59 GMT'), ('x_hp-chrp-service-version', '1.0.3'), ('content-type', 'application/json')] ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/rest/test_v1.py0000775000175000017500000002267700000000000023544 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise 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 base64 import json from unittest import mock import requests from requests.packages import urllib3 from requests.packages.urllib3 import exceptions as urllib3_exceptions import testtools from proliantutils import exception from proliantutils.rest import v1 from proliantutils.tests.rest import rest_sample_outputs as rest_outputs class RestConnectorBaseInitAndLowdashTestCase(testtools.TestCase): @mock.patch.object(urllib3, 'disable_warnings') def test_init(self, disable_warning_mock): rest_client = v1.RestConnectorBase( "x.x.x.x", "admin", "Admin", bios_password='foo', cacert='/somepath') self.assertEqual(rest_client.host, "x.x.x.x") self.assertEqual(rest_client.login, "admin") self.assertEqual(rest_client.password, "Admin") self.assertEqual(rest_client.bios_password, "foo") self.assertEqual({}, rest_client.message_registries) self.assertEqual(rest_client.cacert, '/somepath') @mock.patch.object(urllib3, 'disable_warnings') def test_init_without_cacert(self, disable_warning_mock): rest_client = v1.RestConnectorBase( "x.x.x.x", "admin", "Admin", bios_password='foo') self.assertEqual(rest_client.host, "x.x.x.x") self.assertEqual(rest_client.login, "admin") self.assertEqual(rest_client.password, "Admin") self.assertIsNone(rest_client.cacert) disable_warning_mock.assert_called_once_with( urllib3_exceptions.InsecureRequestWarning) def test__okay(self): rest_client = v1.RestConnectorBase("1.2.3.4", "admin", "Admin") self.assertEqual('[iLO 1.2.3.4] foo', rest_client._('foo')) class RestConnectorBaseTestCase(testtools.TestCase): def setUp(self): super(RestConnectorBaseTestCase, self).setUp() self.client = v1.RestConnectorBase("1.2.3.4", "admin", "Admin") @mock.patch.object(requests, 'get') def test__rest_op_okay(self, request_mock): sample_headers = rest_outputs.HEADERS_FOR_REST_OP exp_headers = dict((x.lower(), y) for x, y in sample_headers) sample_response_body = rest_outputs.RESPONSE_BODY_FOR_REST_OP response_mock_obj = mock.MagicMock( status_code=200, text=sample_response_body, headers=exp_headers) request_mock.return_value = response_mock_obj status, headers, response = self.client._rest_op( 'GET', '/v1/foo', None, None) self.assertEqual(200, status) self.assertEqual(exp_headers, headers) self.assertEqual(json.loads(sample_response_body), response) request_mock.assert_called_once_with( 'https://1.2.3.4/v1/foo', headers={'Authorization': 'BASIC YWRtaW46QWRtaW4='}, data="null", verify=False) @mock.patch.object(requests, 'get') def test__rest_op_request_error(self, request_mock): request_mock.side_effect = RuntimeError("boom") exc = self.assertRaises(exception.IloConnectionError, self.client._rest_op, 'GET', '/v1/foo', {}, None) request_mock.assert_called_once_with( 'https://1.2.3.4/v1/foo', headers={'Authorization': 'BASIC YWRtaW46QWRtaW4='}, data="null", verify=False) self.assertIn("boom", str(exc)) @mock.patch.object(requests, 'get') def test__rest_op_continous_redirection(self, request_mock): sample_response_body = rest_outputs.RESPONSE_BODY_FOR_REST_OP sample_headers = rest_outputs.HEADERS_FOR_REST_OP sample_headers.append(('location', 'https://foo')) exp_headers = dict((x.lower(), y) for x, y in sample_headers) response_mock_obj = mock.MagicMock( status_code=301, text=sample_response_body, headers=exp_headers) request_mock.side_effect = [response_mock_obj, response_mock_obj, response_mock_obj, response_mock_obj, response_mock_obj] exc = self.assertRaises(exception.IloConnectionError, self.client._rest_op, 'GET', '/v1/foo', {}, None) self.assertEqual(5, request_mock.call_count) self.assertIn('https://1.2.3.4/v1/foo', str(exc)) @mock.patch.object(requests, 'get') def test__rest_op_one_redirection(self, request_mock): sample_response_body = rest_outputs.RESPONSE_BODY_FOR_REST_OP sample_headers1 = rest_outputs.HEADERS_FOR_REST_OP sample_headers2 = rest_outputs.HEADERS_FOR_REST_OP sample_headers1.append(('location', 'https://5.6.7.8/v1/foo')) exp_headers1 = dict((x.lower(), y) for x, y in sample_headers1) exp_headers2 = dict((x.lower(), y) for x, y in sample_headers2) response_mock_obj1 = mock.MagicMock( status_code=301, text=sample_response_body, headers=exp_headers1) response_mock_obj2 = mock.MagicMock( status_code=200, text=sample_response_body, headers=exp_headers2) request_mock.side_effect = [response_mock_obj1, response_mock_obj2] status, headers, response = self.client._rest_op( 'GET', '/v1/foo', {}, None) exp_headers = dict((x.lower(), y) for x, y in sample_headers2) self.assertEqual(200, status) self.assertEqual(exp_headers, headers) self.assertEqual(json.loads(sample_response_body), response) request_mock.assert_has_calls([ mock.call('https://1.2.3.4/v1/foo', headers={'Authorization': 'BASIC YWRtaW46QWRtaW4='}, data="null", verify=False), mock.call('https://5.6.7.8/v1/foo', headers={'Authorization': 'BASIC YWRtaW46QWRtaW4='}, data="null", verify=False)]) @mock.patch.object(requests, 'get') def test__rest_op_response_decode_error(self, request_mock): sample_response_body = "{[wrong json" sample_headers = rest_outputs.HEADERS_FOR_REST_OP exp_headers = dict((x.lower(), y) for x, y in sample_headers) response_mock_obj = mock.MagicMock( status_code=200, text=sample_response_body, headers=exp_headers) request_mock.return_value = response_mock_obj self.assertRaises(exception.IloError, self.client._rest_op, 'GET', '/v1/foo', {}, None) request_mock.assert_called_once_with( 'https://1.2.3.4/v1/foo', headers={'Authorization': 'BASIC YWRtaW46QWRtaW4='}, data="null", verify=False) @mock.patch.object(requests, 'get') def test__rest_op_response_gzipped_response(self, request_mock): sample_response_body = rest_outputs.RESPONSE_BODY_FOR_REST_OP gzipped_response_body = base64.b64decode( rest_outputs.BASE64_GZIPPED_RESPONSE) sample_headers = rest_outputs.HEADERS_FOR_REST_OP exp_headers = dict((x.lower(), y) for x, y in sample_headers) response_mock_obj = mock.MagicMock( status_code=200, text=gzipped_response_body, headers=exp_headers) request_mock.return_value = response_mock_obj status, headers, response = self.client._rest_op( 'GET', '/v1/foo', {}, None) self.assertEqual(200, status) self.assertEqual(exp_headers, headers) self.assertEqual(json.loads(sample_response_body), response) @mock.patch.object(v1.RestConnectorBase, '_rest_op') def test__rest_get(self, _rest_op_mock): self.client._rest_get('/v1/foo', {}) _rest_op_mock.assert_called_once_with( 'GET', '/v1/foo', {}, None) @mock.patch.object(v1.RestConnectorBase, '_rest_op') def test__rest_patch(self, _rest_op_mock): self.client._rest_patch('/v1/foo', {}, {'data': 'Lorem ipsum'}) _rest_op_mock.assert_called_once_with( 'PATCH', '/v1/foo', {}, {'data': 'Lorem ipsum'}) @mock.patch.object(v1.RestConnectorBase, '_rest_op') def test__rest_put(self, _rest_op_mock): self.client._rest_put('/v1/foo', {}, {'data': 'Lorem ipsum'}) _rest_op_mock.assert_called_once_with( 'PUT', '/v1/foo', {}, {'data': 'Lorem ipsum'}) @mock.patch.object(v1.RestConnectorBase, '_rest_op') def test__rest_post(self, _rest_op_mock): self.client._rest_post('/v1/foo', {}, {'data': 'Lorem ipsum'}) _rest_op_mock.assert_called_once_with( 'POST', '/v1/foo', {}, {'data': 'Lorem ipsum'}) @mock.patch.object(v1.RestConnectorBase, '_rest_op') def test__rest_delete(self, _rest_op_mock): self.client._rest_delete('/v1/foo', None) _rest_op_mock.assert_called_once_with( 'DELETE', '/v1/foo', None, None) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2746649 proliantutils-2.16.0/proliantutils/tests/sum/0000775000175000017500000000000000000000000021413 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/sum/__init__.py0000664000175000017500000000000000000000000023512 0ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/sum/sum_sample_output.py0000664000175000017500000000534400000000000025560 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise 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. MODULE = "SUM" SUM_OUTPUT_DATA = """ Scouting completed, node type:LINUX Inventory started Inventory completed Analysis started Analysis completed Analysis started Analysis completed Deployment started Deploying component: hpsmh-7.6.0-11.x86_64.rpm Component Filename: hpsmh-7.6.0-11.x86_64.rpm Component Name: HPE System Management Homepage for Linux (AMD64/EM64T) Version: 7.6.0-11 Deployment Result: Success Deploying component: ssaducli-2.60-18.0.x86_64.rpm Component Filename: ssaducli-2.60-18.0.x86_64.rpm Component Name: HPE Smart Storage Administrator Diagnostic Utility Version: 2.60-18.0 Deployment Result: Success Deployment completed Deployed Components: Component Filename: hpsmh-7.6.0-11.x86_64.rpm Component Name: HPE System Management Homepage for Linux (AMD64/EM64T) Original Version: New Version: 7.6.0-11 Deployment Result: Success Component Filename: ssaducli-2.60-18.0.x86_64.rpm Component Name: HPE Smart Storage Administrator Diagnostic Utility Original Version: New Version: 2.60-18.0 Deployment Result: Success Exit status: 0 """ SUM_OUTPUT_DATA_FAILURE = """ Scouting completed, node type:LINUX Inventory started Inventory completed Analysis started Analysis completed Analysis started Analysis completed Deployment started Deploying component: hpsmh-7.6.0-11.x86_64.rpm Component Filename: hpsmh-7.6.0-11.x86_64.rpm Component Name: HPE System Management Homepage for Linux (AMD64/EM64T) Version: 7.6.0-11 Deployment Result: Success Deploying component: ssaducli-2.60-18.0.x86_64.rpm Component Filename: ssaducli-2.60-18.0.x86_64.rpm Component Name: HPE Smart Storage Administrator Diagnostic Utility Version: 2.60-18.0 Deployment Result: Success Deployment completed Deployed Components: Component Filename: hpsmh-7.6.0-11.x86_64.rpm Component Name: HPE System Management Homepage for Linux (AMD64/EM64T) Original Version: New Version: 7.6.0-11 Deployment Result: Success Component Filename: ssaducli-2.60-18.0.x86_64.rpm Component Name: HPE Smart Storage Administrator Diagnostic Utility Original Version: New Version: 2.60-18.0 Deployment Result: Update returned an error Exit status: 0 """ ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/sum/test_sum_controller.py0000664000175000017500000004167200000000000026105 0ustar00zuulzuul00000000000000# Copyright 2017 Hewlett Packard Enterprise 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 os import shutil import tarfile import tempfile import time from unittest import mock from oslo_concurrency import processutils from oslo_serialization import base64 import testtools from proliantutils import exception from proliantutils.sum import sum_controller from proliantutils.tests.sum import sum_sample_output as constants from proliantutils import utils class SUMFirmwareUpdateTest(testtools.TestCase): def setUp(self): super(SUMFirmwareUpdateTest, self).setUp() self.info = {'ilo_address': '1.2.3.4', 'ilo_password': '12345678', 'ilo_username': 'admin'} clean_step = { 'interface': 'management', 'step': 'update_firmware_sum', 'args': {'url': 'http://1.2.3.4/SPP.iso', 'checksum': '1234567890'}} self.node = {'driver_info': self.info, 'clean_step': clean_step} @mock.patch.object(sum_controller, '_get_log_file_data_as_encoded_content') @mock.patch.object(sum_controller, 'open', mock.mock_open(read_data=constants.SUM_OUTPUT_DATA)) @mock.patch.object(os.path, 'exists') @mock.patch.object(processutils, 'execute') def test_execute_sum(self, execute_mock, exists_mock, log_mock): exists_mock.return_value = True log_mock.return_value = "aaabbbcccdddd" value = ("hpsum_service_x64 started successfully. Sending Shutdown " "request to engine. Successfully shutdown the service.") execute_mock.side_effect = processutils.ProcessExecutionError( stdout=value, stderr=None, exit_code=0) ret_value = { 'Log Data': 'aaabbbcccdddd', 'Summary': ("The smart component was installed successfully." " Status of updated components: Total: 2 Success: 2 " "Failed: 0.") } stdout = sum_controller._execute_sum("hpsum", "/tmp/hpsum", components=None) self.assertEqual(ret_value, stdout) execute_mock.assert_called_once_with('hpsum', '--s', '--romonly', '') @mock.patch.object(processutils, 'execute') def test_execute_sum_with_args(self, execute_mock): value = ("hpsum_service_x64 started successfully. Sending Shutdown " "request to engine. Successfully shutdown the service.") execute_mock.side_effect = processutils.ProcessExecutionError( stdout=value, stderr=None, exit_code=3) ret_value = ("Summary: The smart component was not installed. Node is " "already up-to-date.") stdout = sum_controller._execute_sum("/tmp/sum/packages/smartupdate", "/tmp/sum", components=["foo", "bar"]) execute_mock.assert_called_once_with( "./launch_sum.sh", "--s", "--romonly", "--use_location", "/tmp/sum/packages", " --c foo --c bar", cwd='/tmp/sum') self.assertEqual(ret_value, stdout) @mock.patch.object(sum_controller, '_get_log_file_data_as_encoded_content') @mock.patch.object( sum_controller, 'open', mock.mock_open(read_data=constants.SUM_OUTPUT_DATA_FAILURE)) @mock.patch.object(os.path, 'exists') @mock.patch.object(processutils, 'execute') def test_execute_sum_update_fails(self, execute_mock, exists_mock, log_mock): exists_mock.return_value = True log_mock.return_value = "aaabbbcccdddd" ret = { 'Log Data': 'aaabbbcccdddd', 'Summary': ("The installation of the component failed. Status " "of updated components: Total: 2 Success: 1 " "Failed: 1.") } value = ("hpsum_service_x64 started successfully. Sending Shutdown " "request to engine. Successfully shutdown the service.") execute_mock.side_effect = processutils.ProcessExecutionError( stdout=value, stderr=None, exit_code=253) stdout = sum_controller._execute_sum("hpsum", "/tmp/hpsum", components=None) self.assertEqual(ret, stdout) execute_mock.assert_called_once_with( "hpsum", "--s", "--romonly", "") @mock.patch.object(os.path, 'exists') @mock.patch.object(processutils, 'execute') def test_execute_sum_fails(self, execute_mock, exists_mock): exists_mock.return_value = False value = ("Error: Cannot launch hpsum_service_x64 locally. Reason: " "General failure.") execute_mock.side_effect = processutils.ProcessExecutionError( stdout=value, stderr=None, exit_code=255) ex = self.assertRaises(exception.SUMOperationError, sum_controller._execute_sum, "hpsum", "/tmp/hpsum", None) self.assertIn(value, str(ex)) def test_get_log_file_data_as_encoded_content(self): log_file_content = b'Sample Data for testing SUM log output' file_object = tempfile.NamedTemporaryFile(delete=False) file_object.write(log_file_content) file_object.close() sum_controller.OUTPUT_FILES = [file_object.name] base64_encoded_text = (sum_controller. _get_log_file_data_as_encoded_content()) tar_gzipped_content = base64.decode_as_bytes(base64_encoded_text) tar_file = tempfile.NamedTemporaryFile(suffix='.tar.gz', delete=False) tar_file.write(tar_gzipped_content) tar_file.close() with tarfile.open(name=tar_file.name) as tar: f = tar.extractfile(file_object.name.lstrip('/')) self.assertEqual(log_file_content, f.read()) os.remove(file_object.name) os.remove(tar_file.name) @mock.patch.object(time, 'sleep') @mock.patch.object(utils, 'validate_href') @mock.patch.object(utils, 'verify_image_checksum') @mock.patch.object(sum_controller, '_execute_sum') @mock.patch.object(os, 'listdir') @mock.patch.object(shutil, 'rmtree', autospec=True) @mock.patch.object(tempfile, 'mkdtemp', autospec=True) @mock.patch.object(os.path, 'exists') @mock.patch.object(os, 'mkdir') @mock.patch.object(processutils, 'execute') def test_update_firmware(self, execute_mock, mkdir_mock, exists_mock, mkdtemp_mock, rmtree_mock, listdir_mock, execute_sum_mock, verify_image_mock, validate_mock, sleep_mock): execute_sum_mock.return_value = 'SUCCESS' listdir_mock.return_value = ['SPP_LABEL'] mkdtemp_mock.return_value = "/tempdir" null_output = ["", ""] exists_mock.side_effect = [True, False] execute_mock.side_effect = [null_output, null_output] url = "http://a.b.c.d/spp.iso" checksum = "12345678" components = ['abc', 'pqr'] ret_val = sum_controller.update_firmware(self.node, url, checksum, components) execute_mock.assert_any_call('mount', "/dev/disk/by-label/SPP_LABEL", "/tempdir") execute_sum_mock.assert_any_call('/tempdir/hp/swpackages/hpsum', '/tempdir', components=components) calls = [mock.call("/dev/disk/by-label/SPP_LABEL"), mock.call("/tempdir/packages/smartupdate")] exists_mock.assert_has_calls(calls, any_order=False) execute_mock.assert_any_call('umount', "/tempdir") mkdtemp_mock.assert_called_once_with() rmtree_mock.assert_called_once_with("/tempdir", ignore_errors=True) self.assertEqual('SUCCESS', ret_val) @mock.patch.object(time, 'sleep') @mock.patch.object(utils, 'validate_href') @mock.patch.object(utils, 'verify_image_checksum') @mock.patch.object(sum_controller, '_execute_sum') @mock.patch.object(os, 'listdir') @mock.patch.object(shutil, 'rmtree', autospec=True) @mock.patch.object(tempfile, 'mkdtemp', autospec=True) @mock.patch.object(os.path, 'exists') @mock.patch.object(os, 'mkdir') @mock.patch.object(processutils, 'execute') def test_update_firmware_sum(self, execute_mock, mkdir_mock, exists_mock, mkdtemp_mock, rmtree_mock, listdir_mock, execute_sum_mock, verify_image_mock, validate_mock, sleep_mock): execute_sum_mock.return_value = 'SUCCESS' listdir_mock.return_value = ['SPP_LABEL'] mkdtemp_mock.return_value = "/tempdir" null_output = ["", ""] exists_mock.side_effect = [True, True, True, True] execute_mock.side_effect = [null_output, null_output, null_output, null_output] url = "http://a.b.c.d/spp.iso" checksum = "12345678" ret_val = sum_controller.update_firmware( self.node, url, checksum) execute_mock.assert_any_call('mount', "/dev/disk/by-label/SPP_LABEL", "/tempdir") execute_sum_mock.assert_any_call('/tempdir/packages/smartupdate', '/tempdir', components=None) calls = [mock.call("/dev/disk/by-label/SPP_LABEL"), mock.call("/tempdir/packages/smartupdate")] exists_mock.assert_has_calls(calls, any_order=False) execute_mock.assert_any_call('umount', "/tempdir") mkdtemp_mock.assert_called_once_with() rmtree_mock.assert_called_once_with("/tempdir", ignore_errors=True) self.assertEqual('SUCCESS', ret_val) @mock.patch.object(utils, 'validate_href') def test_update_firmware_throws_for_nonexistent_file(self, validate_href_mock): invalid_file_path = '/some/invalid/file/path' url = "http://a.b.c.d/spp.iso" checksum = "12345678" components = ['abc', 'pqr'] value = ("Got HTTP code 503 instead of 200 in response to " "HEAD request.") validate_href_mock.side_effect = exception.ImageRefValidationFailed( reason=value, image_href=invalid_file_path) exc = self.assertRaises(exception.SUMOperationError, sum_controller.update_firmware, self.node, url, checksum, components) self.assertIn(value, str(exc)) @mock.patch.object(time, 'sleep') @mock.patch.object(utils, 'validate_href') @mock.patch.object(os.path, 'exists') @mock.patch.object(os, 'listdir') def test_update_firmware_device_file_not_found(self, listdir_mock, exists_mock, validate_mock, sleep_mock): listdir_mock.return_value = ['SPP_LABEL'] exists_mock.return_value = False url = "http://a.b.c.d/spp.iso" checksum = "12345678" components = ['abc', 'pqr'] msg = ("An error occurred while performing SUM based firmware " "update, reason: Unable to find the virtual media device " "for SUM") exc = self.assertRaises(exception.SUMOperationError, sum_controller.update_firmware, self.node, url, checksum, components=components) self.assertEqual(msg, str(exc)) exists_mock.assert_called_once_with("/dev/disk/by-label/SPP_LABEL") @mock.patch.object(time, 'sleep') @mock.patch.object(utils, 'validate_href') @mock.patch.object(utils, 'verify_image_checksum') @mock.patch.object(os, 'listdir') @mock.patch.object(os.path, 'exists') def test_update_firmware_invalid_checksum(self, exists_mock, listdir_mock, verify_image_mock, validate_mock, sleep_mock): listdir_mock.return_value = ['SPP_LABEL'] exists_mock.side_effect = [True, False] url = "http://1.2.3.4/SPP.iso" checksum = "1234567890" components = ['abc', 'pqr'] value = ("Error verifying image checksum. Image " "http://1.2.3.4/SPP.iso failed to verify against checksum " "123456789. Actual checksum is: xxxxxxxx") verify_image_mock.side_effect = exception.ImageRefValidationFailed( reason=value, image_href='http://1.2.3.4/SPP.iso') self.assertRaisesRegex(exception.SUMOperationError, value, sum_controller.update_firmware, self.node, url, checksum, components=components) verify_image_mock.assert_called_once_with( '/dev/disk/by-label/SPP_LABEL', '1234567890') exists_mock.assert_called_once_with("/dev/disk/by-label/SPP_LABEL") @mock.patch.object(time, 'sleep') @mock.patch.object(utils, 'validate_href') @mock.patch.object(utils, 'verify_image_checksum') @mock.patch.object(processutils, 'execute') @mock.patch.object(tempfile, 'mkdtemp', autospec=True) @mock.patch.object(os, 'mkdir') @mock.patch.object(os.path, 'exists') @mock.patch.object(os, 'listdir') def test_update_firmware_mount_fails(self, listdir_mock, exists_mock, mkdir_mock, mkdtemp_mock, execute_mock, verify_image_mock, validate_mock, sleep_mock): listdir_mock.return_value = ['SPP_LABEL'] exists_mock.return_value = True mkdtemp_mock.return_value = "/tempdir" execute_mock.side_effect = processutils.ProcessExecutionError url = "http://a.b.c.d/spp.iso" checksum = "12345678" msg = ("Unable to mount virtual media device " "/dev/disk/by-label/SPP_LABEL") exc = self.assertRaises(exception.SUMOperationError, sum_controller.update_firmware, self.node, url, checksum) self.assertIn(msg, str(exc)) exists_mock.assert_called_once_with("/dev/disk/by-label/SPP_LABEL") @mock.patch.object(sum_controller, '_get_log_file_data_as_encoded_content') @mock.patch.object(sum_controller, 'open', mock.mock_open(read_data=constants.SUM_OUTPUT_DATA)) @mock.patch.object(os.path, 'exists') def test__parse_sum_ouput(self, exists_mock, log_mock): exists_mock.return_value = True log_mock.return_value = "aaabbbcccdddd" expt_ret = {'Log Data': 'aaabbbcccdddd', 'Summary': ("The smart component was installed " "successfully. Status of updated components: " "Total: 2 Success: 2 Failed: 0.")} ret = sum_controller._parse_sum_ouput(0) exists_mock.assert_called_once_with(sum_controller.OUTPUT_FILES[0]) self.assertEqual(expt_ret, ret) @mock.patch.object(sum_controller, '_get_log_file_data_as_encoded_content') @mock.patch.object( sum_controller, 'open', mock.mock_open(read_data=constants.SUM_OUTPUT_DATA_FAILURE)) @mock.patch.object(os.path, 'exists') def test__parse_sum_ouput_some_failed(self, exists_mock, log_mock): exists_mock.return_value = True log_mock.return_value = "aaabbbcccdddd" expt_ret = {'Log Data': 'aaabbbcccdddd', 'Summary': ("The installation of the component failed. " "Status of updated components: Total: 2 " "Success: 1 Failed: 1.")} ret = sum_controller._parse_sum_ouput(253) exists_mock.assert_called_once_with(sum_controller.OUTPUT_FILES[0]) self.assertEqual(expt_ret, ret) @mock.patch.object(os.path, 'exists') def test__parse_sum_ouput_fails(self, exists_mock): exists_mock.return_value = False expt_ret = ("UPDATE STATUS: UNKNOWN") ret = sum_controller._parse_sum_ouput(1) exists_mock.assert_called_once_with(sum_controller.OUTPUT_FILES[0]) self.assertEqual(expt_ret, ret) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/test_exception.py0000664000175000017500000000466100000000000024225 0ustar00zuulzuul00000000000000# Copyright 2016 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test Class for Exception.""" import unittest import ddt from proliantutils import exception @ddt.ddt class ExceptionTestCase(unittest.TestCase): def setUp(self): super(ExceptionTestCase, self).setUp() @ddt.data(('check your input', # input - exception message None, # input - exception kwargs 'check your input'), # expected raised exception message ('check your input. %(reason)s', {'reason': 'invalid input provided'}, 'check your input. invalid input provided'), ('check your input. %(why)s', {'why': 'invalid input provided'}, 'check your input. invalid input provided'), ("just check your input.. that's all. no any reason given", {'reason': 'some reason'}, "just check your input.. that's all. no any reason given"), (None, {'reason': 'Input not supported'}, 'Invalid Input: Input not supported'), (None, None, 'Invalid Input: Unknown'),) @ddt.unpack def test_InvalidInputError(self, input_exc_message, input_exc_kwargs, expected_exc_message): # | GIVEN | def raising_invalid_input_error_exc_with(msg, **kwargs): raise exception.InvalidInputError(msg, **kwargs) input_exc_kwargs = input_exc_kwargs or {} # | WHEN | & | THEN | with self.assertRaises(exception.InvalidInputError) as cm: raising_invalid_input_error_exc_with(input_exc_message, **input_exc_kwargs) the_exception = cm.exception self.assertEqual(expected_exc_message, str(the_exception)) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/test_log.py0000664000175000017500000000447200000000000023010 0ustar00zuulzuul00000000000000# Copyright 2015 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test Class for Log.""" import unittest import ddt from proliantutils import log @ddt.ddt class LogTestCase(unittest.TestCase): def setUp(self): super(LogTestCase, self).setUp() @ddt.data(('pear',), ('apple',), ('banana',),) @ddt.unpack def test_get_logger_returns_the_same_logger_for_a_given_name( self, logger_name): # ----------------------------------------------------------------------- # WHEN # ----------------------------------------------------------------------- logger1 = log.get_logger(logger_name) logger2 = log.get_logger(logger_name) # ----------------------------------------------------------------------- # THEN # ----------------------------------------------------------------------- self.assertIs(logger1, logger2) def test_get_logger_returns_the_base_logger_for_no_name(self): # ----------------------------------------------------------------------- # GIVEN # ----------------------------------------------------------------------- base_logger = log.get_logger('proliantutils') # ----------------------------------------------------------------------- # WHEN # ----------------------------------------------------------------------- logger1 = log.get_logger(None) logger2 = log.get_logger('') # ----------------------------------------------------------------------- # THEN # ----------------------------------------------------------------------- self.assertIs(logger1, base_logger) self.assertIs(logger2, base_logger) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/tests/test_utils.py0000664000175000017500000003321700000000000023366 0ustar00zuulzuul00000000000000# Copyright 2016-2022 Hewlett Packard Enterprise Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Test class for Utils Module.""" import hashlib from unittest import mock import requests import six import six.moves.builtins as __builtin__ from six.moves import http_client import testtools from proliantutils import exception from proliantutils.ilo import client from proliantutils.ilo import firmware_controller from proliantutils.ilo import ribcl from proliantutils import utils class UtilsTestCase(testtools.TestCase): @mock.patch.object(ribcl.RIBCLOperations, 'get_product_name') def setUp(self, product_mock): super(UtilsTestCase, self).setUp() product_mock.return_value = 'Gen8' self.some_compact_fw_file = 'some_compact_fw_file.scexe' self.client = client.IloClient("1.2.3.4", "admin", "Admin") @mock.patch.object(firmware_controller, 'get_fw_extractor', spec_set=True, autospec=True) def test_process_firmware_image_throws_for_unknown_firmware_file_format( self, get_extractor_mock): # | GIVEN | get_extractor_mock.side_effect = exception.InvalidInputError # | WHEN | & | THEN | self.assertRaises(exception.InvalidInputError, utils.process_firmware_image, 'invalid_compact_fw_file', self.client) @mock.patch.object(firmware_controller, 'get_fw_extractor', spec_set=True, autospec=True) def test_process_firmware_image_throws_for_failed_extraction( self, get_extractor_mock): # | GIVEN | exc = exception.ImageExtractionFailed( image_ref='some_file', reason='God only knows!') get_extractor_mock.return_value.extract.side_effect = exc # | WHEN | & | THEN | self.assertRaises(exception.ImageExtractionFailed, utils.process_firmware_image, self.some_compact_fw_file, self.client) @mock.patch.object(firmware_controller, 'get_fw_extractor', spec_set=True, autospec=True) def test_process_firmware_image_calls_extract_of_fw_extractor_object( self, get_extractor_mock): # process_firmware_image calls extract on the firmware_extractor # instance # | GIVEN | get_extractor_mock.return_value.extract.return_value = ( 'core_fw_file.bin', True) # | WHEN | raw_fw_file, to_upload, is_extracted = ( utils.process_firmware_image(self.some_compact_fw_file, self.client)) # | THEN | get_extractor_mock.assert_called_once_with(self.some_compact_fw_file) get_extractor_mock.return_value.extract.assert_called_once_with() @mock.patch.object(firmware_controller, 'get_fw_extractor', spec_set=True, autospec=True) def test_process_firmware_image_asks_not_to_upload_firmware_file( self, get_extractor_mock): # | GIVEN | get_extractor_mock.return_value.extract.return_value = ( 'core_fw_file.bin', True) self.client.model = 'Gen8' # | WHEN | raw_fw_file, to_upload, is_extracted = ( utils.process_firmware_image(self.some_compact_fw_file, self.client)) # | THEN | self.assertEqual('core_fw_file.bin', raw_fw_file) self.assertFalse(to_upload) @mock.patch.object(firmware_controller, 'get_fw_extractor', spec_set=True, autospec=True) def test_process_firmware_image_asks_to_upload_firmware_file( self, get_extractor_mock): # if fw_version is greater than or equal to 2.0 # | GIVEN | get_extractor_mock.return_value.extract.return_value = ( 'core_fw_file.bin', True) self.client.model = 'Gen9' # | WHEN | raw_fw_file, to_upload, is_extracted = ( utils.process_firmware_image(self.some_compact_fw_file, self.client)) # | THEN | self.assertEqual('core_fw_file.bin', raw_fw_file) self.assertTrue(to_upload) @mock.patch.object(firmware_controller, 'get_fw_extractor', spec_set=True, autospec=True) def test_process_firmware_image_asks_to_upload_firmware_file_Gen10( self, get_extractor_mock): # if fw_version is greater than or equal to 2.0 # | GIVEN | get_extractor_mock.return_value.extract.return_value = ( 'core_fw_file.bin', True) self.client.model = 'Gen10' # | WHEN | raw_fw_file, to_upload, is_extracted = ( utils.process_firmware_image(self.some_compact_fw_file, self.client)) # | THEN | self.assertEqual('core_fw_file.bin', raw_fw_file) self.assertTrue(to_upload) @mock.patch.object(utils, 'hashlib', autospec=True) def test__get_hash_object(self, hashlib_mock): algorithms_available = ('md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512') hashlib_mock.algorithms_guaranteed = algorithms_available hashlib_mock.algorithms = algorithms_available # | WHEN | utils._get_hash_object('md5') utils._get_hash_object('sha1') utils._get_hash_object('sha224') utils._get_hash_object('sha256') utils._get_hash_object('sha384') utils._get_hash_object('sha512') # | THEN | calls = [mock.call.md5(), mock.call.sha1(), mock.call.sha224(), mock.call.sha256(), mock.call.sha384(), mock.call.sha512()] hashlib_mock.assert_has_calls(calls) def test__get_hash_object_throws_for_invalid_or_unsupported_hash_name( self): # | WHEN | & | THEN | self.assertRaises(exception.InvalidInputError, utils._get_hash_object, 'hickory-dickory-dock') def test_hash_file_for_md5(self): # | GIVEN | data = b'Mary had a little lamb, its fleece as white as snow' file_like_object = six.BytesIO(data) expected = hashlib.md5(data).hexdigest() # | WHEN | actual = utils.hash_file(file_like_object) # using default, 'md5' # | THEN | self.assertEqual(expected, actual) def test_hash_file_for_sha1(self): # | GIVEN | data = b'Mary had a little lamb, its fleece as white as snow' file_like_object = six.BytesIO(data) expected = hashlib.sha1(data).hexdigest() # | WHEN | actual = utils.hash_file(file_like_object, 'sha1') # | THEN | self.assertEqual(expected, actual) def test_hash_file_for_sha512(self): # | GIVEN | data = b'Mary had a little lamb, its fleece as white as snow' file_like_object = six.BytesIO(data) expected = hashlib.sha512(data).hexdigest() # | WHEN | actual = utils.hash_file(file_like_object, 'sha512') # | THEN | self.assertEqual(expected, actual) def test_hash_file_throws_for_invalid_or_unsupported_hash(self): # | GIVEN | data = b'Mary had a little lamb, its fleece as white as snow' file_like_object = six.BytesIO(data) # | WHEN | & | THEN | self.assertRaises(exception.InvalidInputError, utils.hash_file, file_like_object, 'hickory-dickory-dock') @mock.patch.object(__builtin__, 'open', autospec=True) def test_verify_image_checksum(self, open_mock): # | GIVEN | data = b'Yankee Doodle went to town riding on a pony;' file_like_object = six.BytesIO(data) open_mock().__enter__.return_value = file_like_object actual_hash = hashlib.md5(data).hexdigest() # | WHEN | utils.verify_image_checksum(file_like_object, actual_hash) # | THEN | # no any exception thrown def test_verify_image_checksum_throws_for_nonexistent_file(self): # | GIVEN | invalid_file_path = '/some/invalid/file/path' # | WHEN | & | THEN | self.assertRaises(exception.ImageRefValidationFailed, utils.verify_image_checksum, invalid_file_path, 'hash_xxx') @mock.patch.object(__builtin__, 'open', autospec=True) def test_verify_image_checksum_throws_for_failed_validation(self, open_mock): # | GIVEN | data = b'Yankee Doodle went to town riding on a pony;' file_like_object = six.BytesIO(data) open_mock().__enter__.return_value = file_like_object invalid_hash = 'invalid_hash_value' # | WHEN | & | THEN | self.assertRaises(exception.ImageRefValidationFailed, utils.verify_image_checksum, file_like_object, invalid_hash) @mock.patch.object(requests, 'head', autospec=True) def test_validate_href(self, head_mock): href = 'http://1.2.3.4/abc.iso' response = head_mock.return_value response.status_code = http_client.OK utils.validate_href(href) head_mock.assert_called_once_with(href) response.status_code = http_client.NO_CONTENT self.assertRaises(exception.ImageRefValidationFailed, utils.validate_href, href) response.status_code = http_client.BAD_REQUEST self.assertRaises(exception.ImageRefValidationFailed, utils.validate_href, href) @mock.patch.object(requests, 'head', autospec=True) def test_validate_href_error_code(self, head_mock): href = 'http://1.2.3.4/abc.iso' head_mock.return_value.status_code = http_client.BAD_REQUEST self.assertRaises(exception.ImageRefValidationFailed, utils.validate_href, href) head_mock.assert_called_once_with(href) @mock.patch.object(requests, 'head', autospec=True) def test_validate_href_error(self, head_mock): href = 'http://1.2.3.4/abc.iso' head_mock.side_effect = requests.ConnectionError() self.assertRaises(exception.ImageRefValidationFailed, utils.validate_href, href) head_mock.assert_called_once_with(href) @mock.patch.object(requests, 'head', autospec=True) def test_validate_href_error_no_base_image(self, head_mock): href = 'http://1.2.3.4/' head_mock.return_value.status_code = http_client.OK self.assertRaises(exception.ImageRefValidationFailed, utils.validate_href, href) head_mock.assert_called_once_with(href) def test_apply_bios_properties_filter(self): data = { "AdminName": "Administrator", "BootMode": "LEGACY", "ServerName": "Gen9 server", "TimeFormat": "Ist", "BootOrderPolicy": "RetryIndefinitely", "ChannelInterleaving": "Enabled", "CollabPowerControl": "Enabled", "ConsistentDevNaming": "LomsOnly", "CustomPostMessage": "" } filter_to_be_applied = { "AdminName", "BootMode", "ServerName", "TimeFormat", "CustomPostMessage" } expected = { "AdminName": "Administrator", "BootMode": "LEGACY", "ServerName": "Gen9 server", "TimeFormat": "Ist", "CustomPostMessage": "" } actual = utils.apply_bios_properties_filter( data, filter_to_be_applied) self.assertEqual(expected, actual) def test_apply_bios_properties_filter_no_filter(self): data = { "AdminName": "Administrator", "BootMode": "LEGACY", "ServerName": "Gen9 server", "TimeFormat": "Ist", "BootOrderPolicy": "RetryIndefinitely", "ChannelInterleaving": "Enabled", "CollabPowerControl": "Enabled", "ConsistentDevNaming": "LomsOnly", "CustomPostMessage": "" } filter_to_be_applied = None expected = { "AdminName": "Administrator", "BootMode": "LEGACY", "ServerName": "Gen9 server", "TimeFormat": "Ist", "BootOrderPolicy": "RetryIndefinitely", "ChannelInterleaving": "Enabled", "CollabPowerControl": "Enabled", "ConsistentDevNaming": "LomsOnly", "CustomPostMessage": "" } actual = utils.apply_bios_properties_filter( data, filter_to_be_applied) self.assertEqual(expected, actual) def test_apply_bios_properties_filter_no_settings(self): data = None filter_to_be_applied = { "AdminName", "BootMode", "ServerName", "TimeFormat", "CustomPostMessage" } expected = None actual = utils.apply_bios_properties_filter( data, filter_to_be_applied) self.assertEqual(expected, actual) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/proliantutils/utils.py0000664000175000017500000001604200000000000021162 0ustar00zuulzuul00000000000000# Copyright 2016-2022 Hewlett Packard Enterprise 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. """ Non-iLO related utilities and helper functions. """ import hashlib import os import re from urllib import parse import requests import six from six.moves import http_client from proliantutils import exception from proliantutils.ilo import firmware_controller from proliantutils import log LOG = log.get_logger(__name__) def process_firmware_image(compact_firmware_file, ilo_object): """Processes the firmware file. Processing the firmware file entails extracting the firmware file from its compact format. Along with the raw (extracted) firmware file, this method also sends out information of whether or not the extracted firmware file a) needs to be uploaded to http store b) is extracted in reality or the file was already in raw format :param compact_firmware_file: firmware file to extract from :param ilo_object: ilo client object (ribcl/ris object) :raises: InvalidInputError, for unsupported file types or raw firmware file not found from compact format. :raises: ImageExtractionFailed, for extraction related issues :returns: core(raw) firmware file :returns: to_upload, boolean to indicate whether to upload or not :returns: is_extracted, boolean to indicate firmware image is actually extracted or not. """ fw_img_extractor = firmware_controller.get_fw_extractor( compact_firmware_file) LOG.debug('Extracting firmware file: %s ...', compact_firmware_file) raw_fw_file_path, is_extracted = fw_img_extractor.extract() # Note(deray): Need to check if this processing is for RIS or RIBCL # based systems. For Gen9 machines (RIS based) the firmware file needs # to be on a http store, and hence requires the upload to happen for the # firmware file. to_upload = False m = re.search(r"Gen(\d+)", ilo_object.model) if int(m.group(1)) > 8: to_upload = True LOG.debug('Extracting firmware file: %s ... done', compact_firmware_file) msg = ('Firmware file %(fw_file)s is %(msg)s. Need hosting (on an http ' 'store): %(yes_or_no)s' % {'fw_file': compact_firmware_file, 'msg': ('extracted. Extracted file: %s' % raw_fw_file_path if is_extracted else 'already in raw format'), 'yes_or_no': 'Yes' if to_upload else 'No'}) LOG.info(msg) return raw_fw_file_path, to_upload, is_extracted def _get_hash_object(hash_algo_name): """Create a hash object based on given algorithm. :param hash_algo_name: name of the hashing algorithm. :raises: InvalidInputError, on unsupported or invalid input. :returns: a hash object based on the given named algorithm. """ algorithms = (hashlib.algorithms_guaranteed if six.PY3 else hashlib.algorithms) if hash_algo_name not in algorithms: msg = ("Unsupported/Invalid hash name '%s' provided." % hash_algo_name) raise exception.InvalidInputError(msg) return getattr(hashlib, hash_algo_name)() def hash_file(file_like_object, hash_algo='md5'): """Generate a hash for the contents of a file. It returns a hash of the file object as a string of double length, containing only hexadecimal digits. It supports all the algorithms hashlib does. :param file_like_object: file like object whose hash to be calculated. :param hash_algo: name of the hashing strategy, default being 'md5'. :raises: InvalidInputError, on unsupported or invalid input. :returns: a condensed digest of the bytes of contents. """ checksum = _get_hash_object(hash_algo) for chunk in iter(lambda: file_like_object.read(32768), b''): checksum.update(chunk) return checksum.hexdigest() def verify_image_checksum(image_location, expected_checksum): """Verifies checksum (md5) of image file against the expected one. This method generates the checksum of the image file on the fly and verifies it against the expected checksum provided as argument. :param image_location: location of image file whose checksum is verified. :param expected_checksum: checksum to be checked against :raises: ImageRefValidationFailed, if invalid file path or verification fails. """ try: with open(image_location, 'rb') as fd: actual_checksum = hash_file(fd) except IOError as e: raise exception.ImageRefValidationFailed(image_href=image_location, reason=e) if actual_checksum != expected_checksum: msg = ('Error verifying image checksum. Image %(image)s failed to ' 'verify against checksum %(checksum)s. Actual checksum is: ' '%(actual_checksum)s' % {'image': image_location, 'checksum': expected_checksum, 'actual_checksum': actual_checksum}) raise exception.ImageRefValidationFailed(image_href=image_location, reason=msg) def validate_href(image_href): """Validate HTTP image reference. :param image_href: Image reference. :raises: exception.ImageRefValidationFailed if HEAD request failed or returned response code not equal to 200. :returns: Response to HEAD request. """ try: response = requests.head(image_href) if response.status_code != http_client.OK: raise exception.ImageRefValidationFailed( image_href=image_href, reason=("Got HTTP code %s instead of 200 in response to " "HEAD request." % response.status_code)) path = parse.urlsplit(image_href).path if os.path.basename(path) == '': raise exception.ImageRefValidationFailed( image_href=image_href, reason=("Given URL is not reachable.")) except requests.RequestException as e: raise exception.ImageRefValidationFailed(image_href=image_href, reason=e) return response def apply_bios_properties_filter(settings, filter_to_be_applied): """Applies the filter to return the dict of filtered BIOS properties. :param settings: dict of BIOS settings on which filter to be applied. :param filter_to_be_applied: list of keys to be applied as filter. :returns: A dictionary of filtered BIOS settings. """ if not settings or not filter_to_be_applied: return settings return {k: settings[k] for k in filter_to_be_applied if k in settings} ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2266643 proliantutils-2.16.0/proliantutils.egg-info/0000775000175000017500000000000000000000000021137 5ustar00zuulzuul00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997949.0 proliantutils-2.16.0/proliantutils.egg-info/PKG-INFO0000664000175000017500000000444400000000000022242 0ustar00zuulzuul00000000000000Metadata-Version: 1.2 Name: proliantutils Version: 2.16.0 Summary: Client Library for interfacing with various devices in HP Proliant Servers. Home-page: https://opendev.org/x/proliantutils Author: Hewlett Packard Enterprise Author-email: proliantutils@gmail.com License: Apache License, Version 2.0 Description: proliantutils ============= **proliantutils** is a set of utility libraries for interfacing and managing various components (like iLO, HPSSA) for HPE Proliant Servers. This library is used by iLO drivers in Ironic for managing Proliant Servers (though the library can be used by anyone who wants to manage HPE Proliant servers). Please use launchpad_ to report bugs and ask questions. .. _launchpad: https://bugs.launchpad.net/proliantutils Installation ------------ Install the module from PyPI_. If you are using Ironic, install the module on Ironic conductor node:: pip install proliantutils .. _PyPI: https://pypi.python.org/pypi/proliantutils Some GNU/Linux distributions provide *python-proliantutils* package. Usage ----- iLO ~~~ For interfacing with the iLO, use *IloClient* object:: >>> from proliantutils.ilo import client >>> ilo_client = client.IloClient('10.10.1.57', 'Administrator', 'password') >>> ilo_client.get_host_power_status() 'OFF' >>> For operations supported on the client object, please refer *proliantutils.ilo.operations*. Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Environment :: Console Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Information Technology Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Requires-Python: >=3.6 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997949.0 proliantutils-2.16.0/proliantutils.egg-info/SOURCES.txt0000664000175000017500000002620200000000000023025 0ustar00zuulzuul00000000000000.stestr.conf .zuul.yaml AUTHORS ChangeLog LICENSE README.md README.rst requirements.txt setup.cfg setup.py test-requirements.txt tox.ini doc/Makefile doc/make.bat doc/proliantutils_api_reference.md doc/hpssa/index.rst doc/source/conf.py doc/source/index.rst proliantutils/__init__.py proliantutils/exception.py proliantutils/log.py proliantutils/utils.py proliantutils.egg-info/PKG-INFO proliantutils.egg-info/SOURCES.txt proliantutils.egg-info/dependency_links.txt proliantutils.egg-info/entry_points.txt proliantutils.egg-info/not-zip-safe proliantutils.egg-info/pbr.json proliantutils.egg-info/requires.txt proliantutils.egg-info/top_level.txt proliantutils/functests/__init__.py proliantutils/functests/test_hpssa.py proliantutils/hpssa/__init__.py proliantutils/hpssa/constants.py proliantutils/hpssa/disk_allocator.py proliantutils/hpssa/manager.py proliantutils/hpssa/objects.py proliantutils/hpssa/raid_config_schema.json proliantutils/ilo/__init__.py proliantutils/ilo/client.py proliantutils/ilo/common.py proliantutils/ilo/constants.py proliantutils/ilo/firmware_controller.py proliantutils/ilo/ipmi.py proliantutils/ilo/mappings.py proliantutils/ilo/operations.py proliantutils/ilo/ribcl.py proliantutils/ilo/ris.py proliantutils/ilo/snmp/__init__.py proliantutils/ilo/snmp/snmp_cpqdisk_sizes.py proliantutils/ilo/snmp/cpqdisk_mibs/CPQHOST-MIB.py proliantutils/ilo/snmp/cpqdisk_mibs/CPQIDA-MIB.py proliantutils/ilo/snmp/cpqdisk_mibs/CPQSCSI-MIB.py proliantutils/ilo/snmp/cpqdisk_mibs/IANAifType-MIB.py proliantutils/ilo/snmp/cpqdisk_mibs/IF-MIB.py proliantutils/ilo/snmp/cpqdisk_mibs/RFC1215-MIB.py proliantutils/ipa_hw_manager/__init__.py proliantutils/ipa_hw_manager/hardware_manager.py proliantutils/redfish/__init__.py proliantutils/redfish/connector.py proliantutils/redfish/main.py proliantutils/redfish/redfish.py proliantutils/redfish/utils.py proliantutils/redfish/resources/__init__.py proliantutils/redfish/resources/gpu_common.py proliantutils/redfish/resources/update_service.py proliantutils/redfish/resources/account_service/__init__.py proliantutils/redfish/resources/account_service/account.py proliantutils/redfish/resources/account_service/account_service.py proliantutils/redfish/resources/chassis/__init__.py proliantutils/redfish/resources/chassis/chassis.py proliantutils/redfish/resources/chassis/devices.py proliantutils/redfish/resources/manager/__init__.py proliantutils/redfish/resources/manager/constants.py proliantutils/redfish/resources/manager/https_cert.py proliantutils/redfish/resources/manager/manager.py proliantutils/redfish/resources/manager/mapping.py proliantutils/redfish/resources/manager/network_protocol.py proliantutils/redfish/resources/manager/security_dashboard.py proliantutils/redfish/resources/manager/security_params.py proliantutils/redfish/resources/manager/security_service.py proliantutils/redfish/resources/manager/virtual_media.py proliantutils/redfish/resources/system/__init__.py proliantutils/redfish/resources/system/bios.py proliantutils/redfish/resources/system/constants.py proliantutils/redfish/resources/system/ethernet_interface.py proliantutils/redfish/resources/system/iscsi.py proliantutils/redfish/resources/system/mappings.py proliantutils/redfish/resources/system/memory.py proliantutils/redfish/resources/system/pci_device.py proliantutils/redfish/resources/system/secure_boot.py proliantutils/redfish/resources/system/smart_storage_config.py proliantutils/redfish/resources/system/system.py proliantutils/redfish/resources/system/tls_config.py proliantutils/redfish/resources/system/storage/__init__.py proliantutils/redfish/resources/system/storage/array_controller.py proliantutils/redfish/resources/system/storage/common.py proliantutils/redfish/resources/system/storage/constants.py proliantutils/redfish/resources/system/storage/drive.py proliantutils/redfish/resources/system/storage/logical_drive.py proliantutils/redfish/resources/system/storage/mappings.py proliantutils/redfish/resources/system/storage/physical_drive.py proliantutils/redfish/resources/system/storage/simple_storage.py proliantutils/redfish/resources/system/storage/smart_storage.py proliantutils/redfish/resources/system/storage/storage.py proliantutils/redfish/resources/system/storage/volume.py proliantutils/rest/__init__.py proliantutils/rest/v1.py proliantutils/sum/__init__.py proliantutils/sum/sum_controller.py proliantutils/tests/__init__.py proliantutils/tests/test_exception.py proliantutils/tests/test_log.py proliantutils/tests/test_utils.py proliantutils/tests/hpssa/__init__.py proliantutils/tests/hpssa/raid_constants.py proliantutils/tests/hpssa/test_disk_allocator.py proliantutils/tests/hpssa/test_manager.py proliantutils/tests/hpssa/test_objects.py proliantutils/tests/ilo/__init__.py proliantutils/tests/ilo/ipmi_sample_outputs.py proliantutils/tests/ilo/ribcl_sample_outputs.py proliantutils/tests/ilo/ris_sample_outputs.py proliantutils/tests/ilo/test_client.py proliantutils/tests/ilo/test_common.py proliantutils/tests/ilo/test_firmware_controller.py proliantutils/tests/ilo/test_ipmi.py proliantutils/tests/ilo/test_operations.py proliantutils/tests/ilo/test_ribcl.py proliantutils/tests/ilo/test_ris.py proliantutils/tests/ilo/snmp/__init__.py proliantutils/tests/ilo/snmp/snmp_sample_output.py proliantutils/tests/ilo/snmp/test_snmp_cpqdisk_sizes.py proliantutils/tests/ipa_hw_manager/__init__.py proliantutils/tests/ipa_hw_manager/test_hardware_manager.py proliantutils/tests/redfish/__init__.py proliantutils/tests/redfish/test_connector.py proliantutils/tests/redfish/test_main.py proliantutils/tests/redfish/test_redfish.py proliantutils/tests/redfish/test_utils.py proliantutils/tests/redfish/json_samples/account.json proliantutils/tests/redfish/json_samples/account_collection.json proliantutils/tests/redfish/json_samples/account_service.json proliantutils/tests/redfish/json_samples/array_controller.json proliantutils/tests/redfish/json_samples/array_controller_collection.json proliantutils/tests/redfish/json_samples/bios.json proliantutils/tests/redfish/json_samples/bios_base_configs.json proliantutils/tests/redfish/json_samples/bios_boot.json proliantutils/tests/redfish/json_samples/bios_failed.json proliantutils/tests/redfish/json_samples/bios_mappings.json proliantutils/tests/redfish/json_samples/certfile.crt proliantutils/tests/redfish/json_samples/chassis.json proliantutils/tests/redfish/json_samples/devices.json proliantutils/tests/redfish/json_samples/devices_collection.json proliantutils/tests/redfish/json_samples/disk_drive.json proliantutils/tests/redfish/json_samples/disk_drive_collection.json proliantutils/tests/redfish/json_samples/drive.json proliantutils/tests/redfish/json_samples/ethernet_interface.json proliantutils/tests/redfish/json_samples/ethernet_interface_collection.json proliantutils/tests/redfish/json_samples/https_cert.json proliantutils/tests/redfish/json_samples/iscsi.json proliantutils/tests/redfish/json_samples/iscsi_settings.json proliantutils/tests/redfish/json_samples/logical_drive.json proliantutils/tests/redfish/json_samples/logical_drive_collection.json proliantutils/tests/redfish/json_samples/logical_nvdimm.json proliantutils/tests/redfish/json_samples/manager.json proliantutils/tests/redfish/json_samples/memory_collection.json proliantutils/tests/redfish/json_samples/pci_device.json proliantutils/tests/redfish/json_samples/pci_device1.json proliantutils/tests/redfish/json_samples/pci_device2.json proliantutils/tests/redfish/json_samples/pci_device_collection.json proliantutils/tests/redfish/json_samples/root.json proliantutils/tests/redfish/json_samples/secure_boot.json proliantutils/tests/redfish/json_samples/security_dashboard.json proliantutils/tests/redfish/json_samples/security_param.json proliantutils/tests/redfish/json_samples/security_param1.json proliantutils/tests/redfish/json_samples/security_params_collection.json proliantutils/tests/redfish/json_samples/security_service.json proliantutils/tests/redfish/json_samples/simple_storage.json proliantutils/tests/redfish/json_samples/simple_storage_collection.json proliantutils/tests/redfish/json_samples/smart_storage.json proliantutils/tests/redfish/json_samples/smart_storage_config.json proliantutils/tests/redfish/json_samples/storage.json proliantutils/tests/redfish/json_samples/storage_collection.json proliantutils/tests/redfish/json_samples/system.json proliantutils/tests/redfish/json_samples/tls_config.json proliantutils/tests/redfish/json_samples/tls_config_settings.json proliantutils/tests/redfish/json_samples/update_service.json proliantutils/tests/redfish/json_samples/vmedia.json proliantutils/tests/redfish/json_samples/vmedia_collection.json proliantutils/tests/redfish/json_samples/volume.json proliantutils/tests/redfish/json_samples/volume_collection.json proliantutils/tests/redfish/resources/__init__.py proliantutils/tests/redfish/resources/test_gpu_common.py proliantutils/tests/redfish/resources/test_update_service.py proliantutils/tests/redfish/resources/account_service/__init__.py proliantutils/tests/redfish/resources/account_service/test_account.py proliantutils/tests/redfish/resources/account_service/test_account_service.py proliantutils/tests/redfish/resources/chassis/test_chassis.py proliantutils/tests/redfish/resources/chassis/test_devices.py proliantutils/tests/redfish/resources/manager/__init__.py proliantutils/tests/redfish/resources/manager/test_https_cert.py proliantutils/tests/redfish/resources/manager/test_manager.py proliantutils/tests/redfish/resources/manager/test_security_dashboard.py proliantutils/tests/redfish/resources/manager/test_security_params.py proliantutils/tests/redfish/resources/manager/test_security_service.py proliantutils/tests/redfish/resources/manager/test_virtual_media.py proliantutils/tests/redfish/resources/system/__init__.py proliantutils/tests/redfish/resources/system/test_bios.py proliantutils/tests/redfish/resources/system/test_ethernet_interface.py proliantutils/tests/redfish/resources/system/test_iscsi.py proliantutils/tests/redfish/resources/system/test_memory.py proliantutils/tests/redfish/resources/system/test_pci_device.py proliantutils/tests/redfish/resources/system/test_secure_boot.py proliantutils/tests/redfish/resources/system/test_smart_storage_config.py proliantutils/tests/redfish/resources/system/test_system.py proliantutils/tests/redfish/resources/system/test_tls_config.py proliantutils/tests/redfish/resources/system/storage/__init__.py proliantutils/tests/redfish/resources/system/storage/test_array_controller.py proliantutils/tests/redfish/resources/system/storage/test_common.py proliantutils/tests/redfish/resources/system/storage/test_drive.py proliantutils/tests/redfish/resources/system/storage/test_logical_drive.py proliantutils/tests/redfish/resources/system/storage/test_physical_drive.py proliantutils/tests/redfish/resources/system/storage/test_simple_storage.py proliantutils/tests/redfish/resources/system/storage/test_smart_storage.py proliantutils/tests/redfish/resources/system/storage/test_storage.py proliantutils/tests/redfish/resources/system/storage/test_volume.py proliantutils/tests/rest/__init__.py proliantutils/tests/rest/rest_sample_outputs.py proliantutils/tests/rest/test_v1.py proliantutils/tests/sum/__init__.py proliantutils/tests/sum/sum_sample_output.py proliantutils/tests/sum/test_sum_controller.py././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997949.0 proliantutils-2.16.0/proliantutils.egg-info/dependency_links.txt0000664000175000017500000000000100000000000025205 0ustar00zuulzuul00000000000000 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997949.0 proliantutils-2.16.0/proliantutils.egg-info/entry_points.txt0000664000175000017500000000017500000000000024440 0ustar00zuulzuul00000000000000[ironic_python_agent.hardware_managers] hp-proliant = proliantutils.ipa_hw_manager.hardware_manager:ProliantHardwareManager ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997949.0 proliantutils-2.16.0/proliantutils.egg-info/not-zip-safe0000664000175000017500000000000100000000000023365 0ustar00zuulzuul00000000000000 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997949.0 proliantutils-2.16.0/proliantutils.egg-info/pbr.json0000664000175000017500000000005600000000000022616 0ustar00zuulzuul00000000000000{"git_version": "5839129", "is_release": true}././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997949.0 proliantutils-2.16.0/proliantutils.egg-info/requires.txt0000664000175000017500000000042500000000000023540 0ustar00zuulzuul00000000000000jsonschema>=2.6.0 oslo.concurrency>=3.8.0 oslo.serialization>=1.10.0 oslo.utils>=3.20.0 pbr>=2.0.0 pyOpenSSL>=19.1.0 pyasn1-lextudio>=1.1.0 pyasn1-modules-lextudio>=0.2.0 pysnmp-lextudio>=5.0.0 requests!=2.12.2,!=2.13.0,>=2.10.0 retrying!=1.3.0,>=1.2.3 six>=1.9.0 sushy>=4.5.0 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997949.0 proliantutils-2.16.0/proliantutils.egg-info/top_level.txt0000664000175000017500000000001600000000000023666 0ustar00zuulzuul00000000000000proliantutils ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/requirements.txt0000664000175000017500000000066100000000000020023 0ustar00zuulzuul00000000000000pbr>=2.0.0 # Apache-2.0 six>=1.9.0 # MIT oslo.concurrency>=3.8.0 # Apache-2.0 oslo.serialization>=1.10.0 # Apache-2.0 oslo.utils>=3.20.0 # Apache-2.0 jsonschema>=2.6.0 # MIT requests!=2.12.2,!=2.13.0,>=2.10.0 # Apache-2.0 retrying!=1.3.0,>=1.2.3 # Apache-2.0 pysnmp-lextudio>=5.0.0 # BSD pyasn1-lextudio>=1.1.0 # BSD pyasn1-modules-lextudio>=0.2.0 # BSD # Redfish communication uses the Sushy library sushy>=4.5.0 pyOpenSSL>=19.1.0 ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1693997949.2746649 proliantutils-2.16.0/setup.cfg0000664000175000017500000000176400000000000016365 0ustar00zuulzuul00000000000000[metadata] name = proliantutils summary = Client Library for interfacing with various devices in HP Proliant Servers. description-file = README.rst license = Apache License, Version 2.0 author = Hewlett Packard Enterprise author-email = proliantutils@gmail.com home-page = https://opendev.org/x/proliantutils python-requires = >=3.6 classifier = Development Status :: 4 - Beta Environment :: Console Environment :: Web Environment Intended Audience :: Developers Intended Audience :: Information Technology License :: OSI Approved :: Apache Software License Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 [files] packages = proliantutils [entry_points] ironic_python_agent.hardware_managers = hp-proliant = proliantutils.ipa_hw_manager.hardware_manager:ProliantHardwareManager [egg_info] tag_build = tag_date = 0 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/setup.py0000664000175000017500000000015500000000000016247 0ustar00zuulzuul00000000000000#!/usr/bin/env python import setuptools setuptools.setup( setup_requires=['pbr>=2.0.0'], pbr=True) ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/test-requirements.txt0000664000175000017500000000054300000000000020777 0ustar00zuulzuul00000000000000# The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. coverage!=4.4,>=4.0 # Apache-2.0 stestr>=2.0.0,!=2.3.0,!=3.0.0 # Apache-2.0 testtools>=2.2.0 # MIT ddt>=1.2.2 # MIT xmltodict>=0.12.0 # MIT././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1693997921.0 proliantutils-2.16.0/tox.ini0000664000175000017500000000333000000000000016046 0ustar00zuulzuul00000000000000[tox] minversion = 3.18.0 envlist = py3,pep8 ignore_basepython_conflict=true [testenv] basepython = python3 usedevelop = True setenv = VIRTUAL_ENV={envdir} PYTHONDONTWRITEBYTECODE = 1 LANGUAGE=en_US LC_ALL=en_US.UTF-8 PYTHONWARNINGS=default::DeprecationWarning TESTS_DIR=./proliantutils/tests/ deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = stestr run {posargs} passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:pep8] deps = hacking>=4.1.0,<5.0.0 # Apache-2.0 flake8-import-order>=0.17.1 # LGPLv3 pycodestyle>=2.0.0,<3.0.0 # MIT Pygments>=2.2.0 # BSD commands = flake8 {posargs} [testenv:cover] # After running this target, visit proliantutils/cover/index.html # in your browser, to see a nicer presentation report with annotated # HTML listings detailing missed lines. setenv = VIRTUAL_ENV={envdir} LANGUAGE=en_US PYTHON=coverage run --source proliantutils --omit='*tests*' --parallel-mode commands = coverage erase stestr run {posargs} coverage combine coverage report --omit='*tests*' coverage html -d ./cover --omit='*tests*' [flake8] show-source = True # [C901] function is too complex. # [E731] do not assign a lambda expression, use a def # [W503] Line break occurred before a binary operator. Conflicts with W504. ignore = C901,E731,W503 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,*cpqdisk_mibs max-complexity=15 import-order-style = pep8 application-import-names = proliantutils filename = *.py [testenv:venv] setenv = PYTHONHASHSEED=0 commands = {posargs}