summaryrefslogtreecommitdiff
path: root/ironic/tests/unit/drivers/modules/ilo/test_boot.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Modify test code to avoid CONF modification affection"Zuul2022-08-091-10/+8
|\
| * Modify test code to avoid CONF modification affectionVanou Ishii2022-08-091-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Few unit tests change attribute of CONF variable via Python assignment. This changes attribute of CONF, which is instance of XxxOpt class defined in oslo_config, to Python literal value. This affects result of another unit test. To avoid this, we should change attribute of CONF variable with set_override method. Change-Id: I4bd8b1b4ea974834f1149fcaa79de85d24f5f7d1 Story: 2010214 Task: 45956 Depends-On: https://review.opendev.org/c/openstack/ironic/+/852253
* | Finally remove support for netboot and the boot_option capabilityDmitry Tantsur2022-08-021-79/+44
|/ | | | | | | | | | | Instance network boot (not to be confused with ramdisk, iSCSI or anaconda deploy methods) is insecure, underused and difficult to maintain. This change removes a lot of related code from Ironic. The so called "netboot fallback" is still supported for legacy boot when boot device management is not available or is unreliable. Change-Id: Ia8510e4acac6dec0a1e4f5cb0e07008548a00c52
* Clean step to remove CA certificates from iLOvinay50muddu2021-09-081-1/+20
| | | | | | | | | Implements clean step "clear_ca_certificates" to remove any 3rd party expired/revoked CA certificates from iLO. Change-Id: I0a3c1da9b94e4037a53ade100354ac51ca08db35 Story: #2008784 Task: #42175
* Increase version of hacking and pycodestyleRiccardo Pittau2021-07-281-1/+1
| | | | | | Fix errors in unit tests Change-Id: Ib5a75fc5e5b6b5661d36e3a27796c3c02ed90056
* Bring boot_iso/deploy_iso handling in iLO closer to RedfishDmitry Tantsur2021-07-071-48/+44
| | | | | | | | | | | | | | | | | | | | The iLO version is, as far as I remember, the oldest implementation of virtual media in Ironic. Since then a few cool feature have been developed in this area, but they are limited to the code using image_utils (e.g. Redfish). The iLO boot interface only uses image_utils when an ISO needs to be built, but not when one is provided. This patch changes that. There are a few visible side-effects to that: 1) file:/// images are now supported 2) ramdisk_image_download_source is now supported 3) the default caching behavior changes to caching http:// links (previously they were passed to the BMC directly). 4) glance images are supported with backends other than swift Story: #2008987 Task: #42638 Change-Id: I23c21188776c511eddcdaf66a222ce64876678e2
* Refactor deploy_utils.validate_image_propertiesDmitry Tantsur2021-06-281-109/+6
| | | | | | | | This function has a confusing public interface and is always preceeded by roughly the same logic, copy-pasted across boot interfaces. Move this logic inside of the function and streamline its interface. Change-Id: I4fc63be4e3cd4656d0ca7e893d4f3a98c07a8b4c
* Rename ilo_boot_iso -> boot_isoDmitry Tantsur2021-06-141-35/+35
| | | | Change-Id: Ie758cccdf8a7bc30389cd5d4cd83ea80dbae040f
* Clean up vendor prefixes for iLO bootDmitry Tantsur2021-06-141-158/+115
| | | | | | | | | | | | Generic fields, such as deploy_{kernel,ramdisk,iso) and bootloader should not have vendor prefixes. This patch removes them from the iLO boot interfaces with deprecation. Also clean up the code a bit for less repetition. Change-Id: Ib23203fa01837ee96f8a38ab50fa8252334c8cb8 Story: #2008880 Task: #42430
* Clean up kernel_append_params for Redfish and iLODmitry Tantsur2021-05-171-12/+12
| | | | | | | | | | | | | | | | Currently handling of kernel_append_params is very inconsistent. This change applies a straightforward process: 1. instance_info[kernel_append_params] 2. driver_info[kernel_append_params] 3. [$driver]kernel_append_params The existing ilo_kernel_append_params is declared but never implemented, so it's removed without deprecation in favor of the new option. Story: #2008902 Task: #42470 Task: #42471 Change-Id: I0fcd7c63a4bc41110eb7f4cd4031580ef98d9a19
* Bye-bye iSCSI deploy, you served us wellDmitry Tantsur2021-05-041-1/+1
| | | | | | | | | | | | The iSCSI deploy was very easy to start with, but it has since become apparently that it suffers from scalability and maintenance issues. It was deprecated in the Victoria cycle and can now be removed. Hide the guide to upgrade to hardware types since it's very outdated. I had to remove the iBMC diagram since my SVG-fu is not enough to fix it. Change-Id: I2cd6bf7b27fe0be2c08104b0cc37654b506b2e62
* Always add 'boot_method' vmedia in redfish/ilo vmedia bootJulia Kreger2021-03-291-1/+2
| | | | | | | | | | The inclusion of a boot_method=vmedia kernel command line argument is mandatory singnaling so IPA understands it has been booted via virtual media, and to act accordingly. Change-Id: I92751a3f4305fe0ded9ff379643b45132fe66157 Story: 2008749 Task: 42181
* Adds config parameter kernel_append_param for iLOankit2021-03-021-7/+19
| | | | | | | This commit adds a new config parameter kernel_append_param for iLO. Change-Id: Ie962672ef81c58f651c2395439a3c69e98c1a4c0
* Merge "Add support to manage certificates in iLO"Zuul2021-03-011-6/+52
|\
| * Add support to manage certificates in iLOvmud2132021-02-101-6/+52
| | | | | | | | | | | | | | | | | | | | Adds methods to export and clear certificates on the node during node provisioning. Also enables to implement clean/deploy steps for certificate management through these APIs. Change-Id: Idc86d7b78854e0618f62c7e4c1a88670dc4561b0 Story: #2008297 Task: #41182
* | Switch iLO and iRMC to the new secure boot frameworkDmitry Tantsur2021-02-251-74/+42
| | | | | | | | | | | | | | | | | | No longer explicit handle secure boot in PXE/iPXE derivatives since it's now handled there. Change-Id: I13b1d53578285b7171bfadb53bb2a7f69e7b53e3 Story: #2008270 Task: #41567
* | Trivial: fix incorrect ordering in iLO testsDmitry Tantsur2021-02-191-8/+8
|/ | | | Change-Id: Ic1d951897a96cb9a98fbda59258bd9ed813cfe7e
* ilo: do not change deploy_boot_mode in instance_infoDmitry Tantsur2021-02-021-3/+5
| | | | | | | instance_info is the input from an operator, we should not change that. Use driver_internal_info instead. Change-Id: I12b4bc0d4599ccf5ef6fdca91f54f4294b127f9d
* Add secure boot support to ilo-uefi-httpsvmud2132020-11-261-4/+16
| | | | | | | | Adds secure boot support to ilo-uefi-https boot interface. Change-Id: I1d08b88496764bbee5cf0a1d306eb7be31d0d373 Story: #2008258 Task: #41114
* Adding changes for iso less vmedia supportankit2020-09-251-344/+141
| | | | | | | | | | | This commit allows virtual media deployment/rescue using kernel/ramdisk pair by creating iso on the fly for ilo and ilo5 hardware types. Also it adds support of dhcp less deploy to ilo and ilo5 hardware type. Change-Id: I08e37a9f5268c15ba954b34ad706b900e5430da6 Story: #2006691 Task: #40893
* Adds ilo-uefi-https boot interface to ilo5vmud2132020-09-171-0/+749
| | | | | | Change-Id: I224eca4d8b331711369b17903098daa9fec27d7d Story: #2008073 Task: #40761
* Switch to unittest mockIury Gregory Melo Ferreira2020-04-301-1/+1
| | | | | | | Python3 have a standard library for mock in the unittest module, let's drop the mock requirement and switch tests to unittest mock. Change-Id: I4f1b3e25c8adbc24cdda51c73da3b66967f7ef23
* Merge "Revert "Generalize ISO building for virtual media driver""Zuul2020-04-221-61/+285
|\
| * Revert "Generalize ISO building for virtual media driver"Ilya Etingof2020-04-201-61/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c4d9984c51b15680ab4bfe38764942278ece5e1f. As per upstream/IRC discussion to address the problems documented here [1]. Besides minor hiccups (documented in the story), the proposal is to avoid building a swiss-army-knife function, but to either decompose the code onto smaller functional pieces and call them as appropriate or to introduce some overridable methods/properties for the vendor drivers to define/override. 1. https://storyboard.openstack.org/#!/story/2007576 Change-Id: Iff7fc267c3ed28b1adb270e9d5da16549be532a7
* | Merge "Generalize ISO building for virtual media driver"Zuul2020-04-171-285/+61
|\ \ | |/
| * Generalize ISO building for virtual media driverankit2020-04-111-285/+61
| | | | | | | | | | | | | | | | | | | | Restructures code for virtual media deployment which creates deploy/rescue/boot iso out of common kernel/ramdisk pair. Currently hardware type ilo and redfish use this code. Change-Id: Ifb66524c762ebe30e5c61b0c77ced65a817bbf19 Story: #2006437 Task: #36352
* | Change [deploy]/default_boot_option to localJulia Kreger2020-04-151-0/+2
|/ | | | | | | | | | | | | | The default value of "netboot" was introduced to this configuration variable as part of commit 93f947c852409af2c56a499428b09ff69ab345a1 in Ocata release. This patch changes the default value of configuration parameter '[deploy]/default_boot_option' and devstack variable 'IRONIC_DEFAULT_BOOT_OPTION' to 'local'. Change-Id: I9bf56a7088281bbe20b8b6c2e47c6ab6559bfea4 Story: #1619339 Task: #10505
* Enable agent_token for virtual media bootJulia Kreger2020-03-091-1/+2
| | | | | | | | | | | | | | | | | | This provides an embedded agent_token through out of band means which ensures greater security for such deployments. Also some changes to the redfish virtual media boot unit tests as the entirety of conductor utilties was mocked. Downside with the pregenerated token, the logic had to be slightly revised as the existence of a token with an older client is a case that virtual media deployments will hit. This was addressed, and tests updated as a result. Story: 2007025 Task: 37819 Change-Id: Iaa2a52c2e53534cbf6998ad24f1f1184c0f222d8
* Implement managed in-band inspection boot for ilo-virtual-mediaShivanand Tendulker2020-01-081-0/+16
| | | | | | Change-Id: I30ae85430b5b056abe870985d20915cf84393c17 Story: #1528920 Task: #37983
* Stop using six libraryRiccardo Pittau2019-12-231-11/+7
| | | | | | | | | | Since we've dropped support for Python 2.7, it's time to look at the bright future that Python 3.x will bring and stop forcing compatibility with older versions. This patch removes the six library from requirements, not looking back. Change-Id: Ib546f16965475c32b2f8caabd560e2c7d382ac5a
* Add iPXE boot interface to 'ilo' hardware typeShivanand Tendulker2019-08-161-0/+184
| | | | | | | | | This commit adds new boot interface 'ilo-ipxe' to support booting of iPXE instances using 'ilo' hardware type. Change-Id: I3abebc77cbc57344a74759e0a8b99e8cacac6f6b Story: 2006408 Task: 36292
* Build ISO out of EFI system partition imageIlya Etingof2019-01-231-24/+18
| | | | | | | | | | | | | | | | | | | When ironic builds UEFI-bootable ISO image, it extracts EFI system partition image (`efiboot.img`) from the `deploy_iso` ISO image. This change allows supplying EFI system partition image to the ISO image building routines in form of a local file or UUID or URI reference. The motivation behind this change is to make UEFI-bootable image building process more efficient and functional. This change is thought of as a prerequisite for the upcoming Redfish-based virtual media boot feature. Story: 1526753 Task: 28098 Change-Id: Idf912ff2146434b666fdb4250dc1ecad39bc5a04
* Adds support for 'ramdisk' deploy with 'ilo-virtual-media' bootShivanand Tendulker2018-09-181-0/+121
| | | | | | | | | Adds support for ramdisk boot using 'ramdisk' deploy interface with 'ilo-virtual-media' boot interface for 'ilo' hardware type. Change-Id: Ifc187f9a7a5e086b3c609f619edd09423c1692a0 Story: #2003573 Task: #24867
* Remove the ilo classic driversDmitry Tantsur2018-06-221-39/+10
| | | | | | | This removes pxe_ilo, iscsi_ilo and agent_ilo. Also removed is the whole documentation section dedicated to them. Change-Id: Ie6f8a65d68ce4eb9c8467c416df5f3a35f0abe98
* Move boot-related code to boot_mode_utils.pyIlya Etingof2018-06-201-6/+7
| | | | | | | | | This change collects boot-relalated functions into the `boot_mode_utils.py` module to improve code clarity. Change-Id: I1a2225d503deb382ba6021a6073c81cd03ca3175 Story: 1734131 Task: 10640
* Remove excessive usage of mock_the_extension_manager in unit tests - part 2Dmitry Tantsur2018-05-241-4/+3
| | | | | | | | | Also fixes incorrect oneview tests that apparently used to be hidden by that. Similarly, insufficient mocking in the PXE boot interface tests was fixed. Now only test_manager uses mock_the_extension_manager. Change-Id: Iaef9555337919706cd165adbbb2e1be9322f80b7
* Stop removing root uuid in vendor interfacesHironori Shiina2018-04-181-8/+0
| | | | | | | | Now that driver_internal_info.root_uuid_or_disk_id is removed by the conductor when tearing down a node, it is no longer necessary to remove it in each vendor interface. Change-Id: I7a6a41cda4d009e077261b3fee707cd601142f86
* Updates boot mode on the baremetal as per `boot_mode`mallikarjuna.kolagatla2018-02-221-25/+5
| | | | | | | | | This patch modifies the ilo drivers to use the `boot_mode` capability for cleaning and update the same on the baremetal. Change-Id: I5b095cac47890e117866f0569f69148deff173b7 Closes-Bug: #1559835
* Implements validate_rescue() for IloVirtualMediaBootAparna2018-02-141-14/+75
| | | | | | | | | | | | | | | | This commit implements validate_rescue() for 'ilo-virtual-media' boot interface of 'ilo' hardware type. With this it enables 'agent' rescue interface for 'ilo' hardware type when corresponding boot interface being used is 'ilo-virtual-media'. Support already exists for the 'agent' rescue interface with 'ilo-pxe' boot interface. Co-Authored-By: Aparna <aparnavtce@gmail.com> Co-Authored-By: Shivanand Tendulker <stendulker@gmail.com> Closes-Bug: #1674899 Change-Id: Ia1d879e1356de18c5f14f032ddd195f4b48f0378
* Remove mode argument from boot.(prepare|clean_up)_ramdiskJim Rollenhagen2018-02-011-9/+6
| | | | | | | | | | | | | | | | | | | | | Ideally, the boot interface shouldn't care if it's booting an image for deploy or rescue. The first step to unwinding this is not passing the mode argument into the boot interface - for now, we infer it from the state. Also stop validating whether the boot interface methods have a mode argument, as this is totally broken anyway (due to the decorator on the method). The rest of the boot interface's knowledge about deploy vs rescue can be eliminated in the future, as we shouldn't rework too much of that during feature freeze. We fix the bug in validation this way for now, for two reasons: * This argument really doesn't belong, and it's only been on master for six days. Get it out before people use it. * Library updates are currently frozen; fixing the decorator isn't an option right now. Change-Id: Icdeb870e9fd9cf836ff7ab97624189c8436adaba Closes-Bug: #1746730
* Merge "Follow-up for Implementation for UEFI iSCSI boot for ILO"Zuul2018-01-311-34/+53
|\
| * Follow-up for Implementation for UEFI iSCSI boot for ILOparesh-sao2018-01-301-34/+53
| | | | | | | | | | | | | | This patch addresses outstanding comments for commit 87636372559fa6d83bb51eaaae075ac5e5575c17 Change-Id: I106f36cc3e9be2dee862e13d8e6621328e4f7959
* | Add support for preparing rescue ramdisk in iLO PXEShivanand Tendulker2018-01-261-10/+19
|/ | | | | | | | | Adds support to prepare rescue ramdisk to 'ilo-pxe' boot interface, which is a subclass of 'pxe' boot interface by adding the new argument. Change-Id: Ie486476bfb2ef3ccb30e4b3bb13ec2ee350bfcfd Related-Bug: #1526449
* Implementation for UEFI iSCSI boot for ILOkesper2018-01-251-7/+251
| | | | | | | | | This change adds new methods in management interface and enhance boot interface of 'ilo' hardware type to support boot from iSCSI volume in UEFI boot mode. Change-Id: I585e0ef90f4397af1f09920c3a1bc47ddbcb1a97 Related-Bug: #1526861
* Minor clean up in iLO drivers unit testsShivanand Tendulker2017-05-171-4/+1
| | | | | | | Removed mocks for LOG.debug and updated 'spec_set' and 'autospec' flags to some of the mock objects. Change-Id: I87c535ea6dc3a7fb4afb0343f7d5272b423883b3
* Follow-up patch of 7f12be1b14e371e269464883cb7dbcb75910e16fShivanand Tendulker2017-04-191-4/+6
| | | | | | | This commit addresses outstanding minor comments of the review 7f12be1b14e371e269464883cb7dbcb75910e16f. Change-Id: I6c3511dd9366daf12ab578f60cc6f106a4aa43c4
* Merge "Changes 'deploy' and 'boot' interface for 'pxe_ilo' driver"Jenkins2017-04-151-0/+75
|\
| * Changes 'deploy' and 'boot' interface for 'pxe_ilo' driverShivanand Tendulker2017-04-041-0/+75
| | | | | | | | | | | | | | | | | | Code of 'pxe_ilo' drivers has been refactored to change 'deploy' and 'boot' interfaces to iscsi_deploy.ISCSIDeploy() and ilo.boot.IloPXEBoot() respectively. Change-Id: Iebfc78e24ee9481ffb615cc6afea12519635645e Partial-Bug: #1666787
* | Merge "Use standard deploy interfaces for iscsi_ilo and agent_ilo"Jenkins2017-04-151-19/+53
|\ \ | |/
| * Use standard deploy interfaces for iscsi_ilo and agent_iloShivanand Tendulker2017-04-041-19/+53
| | | | | | | | | | | | | | | | | | Refactored iLO classic drivers 'iscsi_ilo' and 'agent_ilo' to change 'deploy' interfaces to iscsi_deploy.ISCSIDeploy() and agent.AgentDeploy() respectively. Change-Id: Id38dcf6b64a15caa9d6cf4d2021ffeb264d12b5e Partial-Bug: #1666787