summaryrefslogtreecommitdiff
path: root/ironic/drivers/modules/fake.py
Commit message (Collapse)AuthorAgeFilesLines
* Add configurable delays to the fake driversSteve Baker2022-10-131-0/+63
| | | | | | | | | | | | | | | | | | | | | | Simulating workloads with the fake driver currently misses the reality that some operations take time to complete, rather than occuring instantly. This makes it difficult to mock real workloads for performance and functional testing of ironic itself. This change adds configurable random wait times for fake drivers in a new ironic.conf [fake] section. Each supported driver having one configuration option controlling the delay. These delays are applied to operations which typically block in other drivers. The default value of zero continues the existing behaviour of no delay. A single integer value will result in a constant delay in seconds. Two values separated by a comma will result in a triangular distribution weighted by the first value, specifically in python[1]: random.triangular(a, b, a) Change-Id: I7cb1b50d035939e6c4538b3373002a309bfedea4 [1] https://docs.python.org/3/library/random.html#random.triangular
* Add indicator management harness to ManagementInterfaceIlya Etingof2019-08-261-0/+40
| | | | | | | | | | | | | | Adds ``get_indicator_state``, ``set_indicator_state`` and ``get_supported_indicators`` methods to driver management interface. Drivers can override these methods implementing indicators (e.g. LEDs) management calls against the BMC of the baremetal nodes being managed. The spec: https://review.opendev.org/#/c/655685/7/specs/approved/expose-hardware-indicators.rst Change-Id: I952de78312f09897e6b743e11c9cc5dac977dc36 Story: 2005342 Task: 30311
* ipxe boot interfaceJulia Kreger2018-10-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A long time ago, in a galaxy not so far away, the ironic comunity reached consensus that we should refactor the PXE interface such that we had separate PXE and iPXE interfaces. In looking at what it would take for something like a standalone deployment to have multiarchitecture support in their environment, it seems even more urgent and necessary that we begin to make this delineation. This is because while some ARM iPXE support exists, the binary is not a commonly shipped artifiact, so operators are largely only left with grubaa64.efi as their bootloader. A similar issue exists with ppc64le deployments where they must disable iPXE, as the ppc64le hardware expects reading a syslinux compatible file, similarlly no iPXE loader exists. To start this effort, we need to promote iPXE functionality to a dedicated interface, and remove the necessity of setting the [pxe]ipxe_enabled setting. Next steps, beyond this patch, would be to begin to tease out the common private method code in the underlying PXE interface that both the iPXE and PXE interfaces use, and appropriately relocate and refactor that code as necesary. During this process, we can create an [ipxe] configuration section, and migrate settings. Finally, once the deprecation cycle is complete, we will be able to remove the ipxe logic with-in the PXE interface. Change-Id: I392616417c48986e84e50a3ddc7567344bfe3571 Story: #1628069 Task: #10516
* Switch the "snmp" hardware type to "noop" managementDmitry Tantsur2018-08-071-1/+11
| | | | | | | | Support for "fake" is kept for backward compatibility and is deprecated. Change-Id: Ibee573e660e2ba4204ecb68c8d80ad8d1e0b9a74 Story: #2003203 Task: #23361
* Deploy steps - conductor & driversMark Goddard2018-07-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a 'deploy_step' decorator. A deploy step must take as the only positional argument, a TaskManager object. A step can be executed synchronously or asynchronously. A step should return None if the method has completed synchronously or states.DEPLOYWAIT if the step will continue to execute asynchronously. If the step executes asynchronously, it should issue a call to the 'continue_node_deploy' RPC, so the conductor can begin the next deploy step. Only steps with priorities greater than 0 are used. These steps are ordered by priority from highest value to lowest value. For steps with the same priority, they are ordered by driver interface priority (see conductor.manager.DEPLOYING_INTERFACE_PRIORITY). All in-tree DeployInterfaces are converted to have one big deploy_step (their existing deploy() method). A new RPC method 'continue_node_deploy' (RPC API version 1.45) is used by deploy steps to notify the conductor to continue node deployment (e.g. execute the next deploy step). Similar to cleaning, the conductor gets the node's deploy steps and executes them, one at a time (one deploy step right now). The conductor also handles out-of-tree drivers that don't have deploy steps yet; a warning is logged in these cases. Co-Authored-By: Ruby Loo <rloo@oath.com> Change-Id: I5feac3856cc4b87a850180b7fd0b3b9805f9225f Story: #1753128 Task: #22592
* Merge "BIOS Settings: add sync_node_setting"Zuul2018-06-211-5/+31
|\
| * BIOS Settings: add sync_node_settingZenghui Shi2018-06-201-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | sync_node_setting takes a list of bios settings as input and sorts out a tuple of lists of create, update, delete and nochange settings by comparing the given settings with node 'bios_settings' database table. This commit also modifies fake BIOS interface to use sync_node_setting for testing purpose. Change-Id: I831b3db8f4da24d88a81b4d85889f7fd6f83ffdb Story: #1712032
* | Remove the "fake" and "fake_soft_power" classic driversDmitry Tantsur2018-06-061-4/+0
| | | | | | | | | | | | The grenade configuration is updated to disable the fake driver. Change-Id: Ica2b466a1a22ca2e5d1362377692cc39ef53ce2c
* | Fix FakeBIOS to allow tempest testingYolanda Robla2018-06-041-0/+6
|/ | | | | | | | In order to start tempest testing using FakeBIOS, we need to fix some issues, like enabling it on the fake driver, and add the clean_steps decorators. Change-Id: I7c47187b823c3a0ce1784849d401bd6baafe2542
* BIOS Settings: Add BIOSInterfaceZenghui Shi2018-05-081-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adds 'bios' interface to 'BaseDriver' * Adds BIOSInterface driver class * Adds fake & no-bios drivers and entries * Implements it for 'fake-hardare' hardware type * Adds configuration parameters: + [DEFAULT]/enabled_bios_interfaces + [DEFAULT]/default_bios_interface * Adds 'bios_interface' field to Node object * Handle 'bios_interface' field in _convert_to_version * Adds bios in CLEANING_INTERFACE_PRIORITY Drivers can implement this interface to do BIOS configuration. Co-Authored-By: Yolanda Robla Mota <yroblamo@redhat.com> Co-Authored-By: Luong Anh Tuan <tuanla@vn.fujitsu.com> Change-Id: I7e57130242b6cab21b54e35dc3c0b7819bdc43c0 Story: #1712032
* Do not use async parameterOleksiy Petrenko2018-03-281-1/+1
| | | | | | | | | | | | We have method passthru that is accepting parameter async, but since python 3.7 use async as reserved word, the async parameter is deprecated, async_call should be used instead. async parameter will be removed in the next cycle. Change-Id: I6299aafd30faae9a93df2cb901c1505df47e6b45 Task: 9289 Story: 1751306
* Migrate the remaining classic drivers to hardware typesDmitry Tantsur2018-02-011-11/+4
| | | | | | | | | | | | | | | | | | | | I've tried my best to provide a correct matching for these, but there are two exceptions: * fake_drac uses iscsi deploy with None boot, which cannot work, so changing both to fake * some fake drivers are migrated to the 'fake' power interface, which is changed to include soft power as well. The latter means that all fake classic drivers now support fake soft power actions, while previously only fake_soft_power did. Now fake_soft_power is identical to fake and is left for backward compatibility Also wrote more tests to check correctness of this migration. Change-Id: I00c9c6ed698b10f035e65428e1a20d733c7e544a Partial-Bug: #1690185
* Agent rescue implementationShivanand Tendulker2018-01-251-2/+2
| | | | | | | | | | | | This implements agent based rescue interface. Partial-Bug: #1526449 Co-Authored-By: Mario Villaplana <mario.villaplana@gmail.com> Co-Authored-By: Aparna <aparnavtce@gmail.com> Co-Authored-By: Shivanand Tendulker <stendulker@gmail.com> Change-Id: I9b4c1278dc5fab7888fbfe586c15e31ed3958978
* Adds rescue_interface to base driver classShivanand Tendulker2017-12-211-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | This commit adds `rescue` interface to `BaseDriver` and implements it for `fake-hardware` hardware type. It adds configuration parameters '[DEFAULT]/enabled_rescue_interfaces' and '[DEFAULT]/default_rescue_interface'. The default value of configuration parameter '[DEFAULT]/enabled_rescue_interfaces' is `no-rescue`. It adds new rescue states and a new 'rescue' field to the Node object. It adds objects.node.Node._convert_to_version(). The method handles converting the new rescue_interface field between different versions of the Node. Partial-bug: #1526449 Co-Authored-By: Jay Faulkner <jay@jvf.cc> Co-Authored-By: Josh Gachnang <josh@pcsforeducation.com> Co-Authored-By: Jesse J. Cook <jesse.j.cook@member.fsf.org> Co-Authored-By: Mario Villaplana <mario.villaplana@gmail.com> Co-Authored-By: Aparna <aparnavtce@gmail.com> Co-Authored-By: Shivanand Tendulker <stendulker@gmail.com> Change-Id: I1534247bf207a20a7a58534988192aef392eaff2
* Add the timeout parameter to relevant methods in the fake power interfaceLucas Alvares Gomes2017-02-011-5/+2
| | | | | | | | | | | | | | | | | | In order to avoid a WARNING log such as: WARNING ironic.conductor.utils [req-99809e85-2cc0-4948-8665-7c5d3f1e5b47 - - - - -] The set_power_state method of fake doesn't support 'timeout' parameter. WARNING ironic.conductor.utils [req-0062c24d-36b4-447e-8823-cf3cc43752b9 - - - - -] The reboot method of fake doesn't support 'timeout' parameter. Over and over in the log files, this patch is adding the "timeout" parameter to the set_power_state() and reboot() methods of the fake power interface. Change-Id: I461e19c8552fe14bfa3e2c23f34bd37c83b8be22
* Generic power interface for soft reboot and soft power offNaohiro Tamura2017-01-041-1/+20
| | | | | | | | | This patch updates the generic power interface to support SOFT_REBOOT and SOFT_POWER_OFF. And also it introduces "timeout" optional parameter for all power operations. Partial-Bug: #1526226 Change-Id: I1c9bbd1f11f6a8565607c874b3c99aa10eeb62a5
* Add storage_interface to base driver classJulia Kreger2016-12-211-0/+19
| | | | | | | | | | | | | | | In order to properly support booting and maintenance of systems that boot from a remote storage device, we need an interface to associate the driver with. This commit adds a basic storage_interface and noop and fake interfaces along with the appropriate handling for configuration in the event that the driver list is blank, or is missing the noop driver. Co-Authored-By: Stephane Miller <stephane@alum.mit.edu> Change-Id: Ib21eda88f207f18675c8580cd7fd37eab6fd70bf Partial-Bug: #1559691
* Fix fake.FakeBoot.prepare_ramdisk() signatureIgor Kalnitsky2016-07-151-1/+1
| | | | | | | | | | | | | | | | | According to `BootInterface` [1], the `prepare_ramdisk` method must receive 3 arguments (self, task, ramdisk_params) while `FakeBoot` implementation receives only 2 arguments (self, task). This cause a runtime error when one wants one to use `FakeBoot` driver as a part of its own driver (for test purposes or in case of standalone Ironic with static PXE configuration). The reason why it works now is, no one use `FakeBoot` without other fake parts, so `prepare_ramdisk` is never called. [1]: http://git.openstack.org/cgit/openstack/ironic/tree/ironic/drivers/base.py#n416 Change-Id: I0a55bfaf8aa58747ad2cfcd14ec84430d139e68c
* Allow vendor drivers to acquire shared locksMario Villaplana2016-05-131-1/+7
| | | | | | | | | | | Previously, all node vendor passthru methods required an exclusive lock on the node to validate and start the task. This allows node vendor passthru methods to specify require_exclusive_lock=False in their passthru decorators to let the conductor acquire a shared lock on a node. Change-Id: I43cf43bc5c17f44a735e16c3c5cb744cf6911d27 Closes-Bug: #1481665
* Merge "Add RAIDInterface for RAID configuration"Jenkins2015-08-141-0/+14
|\
| * Add RAIDInterface for RAID configurationRamakrishnan G2015-08-121-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces a new standard interface of a driver - RAIDInterface. Drivers can implement this interface to do RAID configuration. This commit also introduces some common code to do validation of RAID configuration and updating the node after doing RAID configuration. Change-Id: I907447511e6f9ee9e1e3b96a94a0360e81f75cef Implements: blueprint ironic-generic-raid-interface
* | Merge "get_supported_boot_devices() returns static device list"Jenkins2015-08-121-2/+2
|\ \ | |/ |/|
| * get_supported_boot_devices() returns static device listMatt Keeann2015-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Returning a static device list currently is only applicable to x86 based architectures. If a node references for instance sparc architecture, then "pxe" boot is not supported, however "wanboot" is. The driver referenced by the node should be able to return a custom boot device list dependent on the architecture of the node. However to achieve this the task needs to be passed as an argument in get_supported_boot_devices() Change-Id: I5ae70ee84309dffb7d7bca4ac5cba28b01b7c414 Closes-Bug: #1391598 Implements: blueprint supported-boot-device-list
* | Add boot interface in IronicRamakrishnan G2015-06-151-0/+22
|/ | | | | | | | | This commit adds a new boot interface in Ironic which can be used by deploy drivers to set up the node to boot. Implements: blueprint new-boot-interface Change-Id: I0fdc0636c51a1b7803899dd09870806f1c81697e
* Enforce flake8 E123/6/7/8 in ironicSam Betts2015-06-041-2/+3
| | | | | | | | | | | | | | | | | This patch enforces the rules E123, E126, E127, and E128 in the ironic code base: E123 - closing bracket does not match indentation of opening bracket’s line E126 - continuation line over-indented for hanging indent E127 - continuation line over-indented for visual indent E128 - continuation line under-indented for visual indent This fixes any parts of the current code which fails these rules and removes these rules from the tox.ini flake8 ignore list. Change-Id: Ia96582b5e9abc088d6c1694afc93c59be4a4065c Closes-Bug: 1421522
* Add a missing comma and correct some typosZhenguo Niu2015-04-211-1/+1
| | | | Change-Id: I9c1717c386bc5587420d47f5b6e9d481e589cc2c
* Generic changes for Node InspectionNisha Agarwal2015-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | 1. Adds two new fields to table ``nodes``. 2. Enable changes in conductor and api to execute the methods for inspection. 3. Adds the default timeout `inspect_timeout` in ironic.conf.sample file. The new field 'last_inspected' has been renamed to 'inspection_finished_at' after discussion. The ironic-client changes for 'inspect' to be added to the list of node-set-provision-state valid actions are being addressed by https://review.openstack.org/#/c/148804 Implements : blueprint ironic-node-properties-discovery DocImpact Change-Id: If9aab90accf5a60ad3febbfc1f5d367eed987c13
* Add InspectInterface for node-introspectionNisha Agarwal2015-02-201-0/+14
| | | | | | | | Adds the InspectInterface to the base and fake driver. Implements: blueprint ironic-node-properties-discovery Change-Id: I103433c9e4aee7dfa3bcc049e469c812162e9ac6
* Make 'method' explicit for VendorInterface.validate()Tan Lin2015-01-141-4/+2
| | | | | | | Method should be more explicit than only having it via kwargs. Closes-Bug: #1394470 Change-Id: I6a55e1be013629e22c384b968699980e83ae0cd3
* Merge "Update drivers VendorInterface validate() method"Jenkins2014-11-191-13/+0
|\
| * Update drivers VendorInterface validate() methodLucas Alvares Gomes2014-11-191-13/+0
| | | | | | | | | | | | | | | | | | | | Update drivers VendorInterface validate() methods to remove the verification of whether a method called exist or not. This verification is now done by the conductor, validate() will always be called with a valid method for drivers that are decorating their vendor methods with the @passthru decorator. Change-Id: Ia542df8283007ea2a2a049311a6418313a5859b4
* | Make vendor methods discoverable via the Ironic APILucas Alvares Gomes2014-11-181-3/+6
|/ | | | | | | | | | | | | | The @passthru and @driver_passthru decorators were extended to support adding a description about the method being decorated which will also be returned by the API. That said two new endpoints to the API that returns the available methods for the given driver or node. * GET /v1/drivers/<driver name>/vendor_passthru/methods * GET /v1/nodes/<node uuid>/vendor_passthru/methods Implements: blueprint extended-vendor-passthru Change-Id: Idac6a433da1a9ae170dbe3d8ceb9e4c76fcdb1be
* Vendor endpoints to support different HTTP methodsLucas Alvares Gomes2014-11-171-6/+6
| | | | | | | | | | | | | | | | This patch extend the VendorPassthru and DriverVendorPasshtru endpoints to support to any HTTP method. When creating a new vendor function developers can specify which are the HTTP methods supported by each vendor function as a list, if the method request is not in the list Ironic will return a InvalidParameterValue (HTTP 400, Bad Request), otherwise the method will be invoked and the HTTP method request will be available to the vendor function as a parameters in kwargs called 'http_method'. Partial-Bug: #1382457 Implements: blueprint extended-vendor-passthru Change-Id: I01d9d7fdd7eaf9849db41d50fbb4a78fd31bbfdc
* Add sync and async support for passthru methodsLucas Alvares Gomes2014-11-121-2/+6
| | | | | | | | | | | | | | | | | | | | | | | This patch extend the @passthru and @driver_passthru decorators to add support to vendor to determine whether their methods should run synchronously or asynchronously. A new flag "async" was added to the decorators, if True (the default) run the method asynchronously if False synchronously. The RPC methods vendor_passthru() and driver_vendor_passthru() return values were updated to also return the mode that the vendor method was invoked. This is needed because the API should return a different HTTP code depending on the mode, which is 202 (Accepted) for async and 200 (OK) for sync. Before the driver_vendor_passthru() was always synchronously and the vendor_passthru() asynchronously, this patch makes things more consistent by supporting both modes on both endpoints. Partial-Bug: #1382457 Implements: blueprint extended-vendor-passthru Change-Id: I6e7f6c61e9933cba7411d4e9acca9dd8720e9bfe
* Add a mechanism to route vendor methodsLucas Alvares Gomes2014-11-111-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Each vendor class had to implement a custom method to invoke their own vendor functionalities, the commit e129faef1762b8335b226298554ed83204c2696a added a decorator @passthru() to decorate those vendor methods and guarantee that the errors and exceptions are being handled accordingly. This patch is extending that decorator to add some metadata to each vendor method and from that be able to generically build a way to invoke those without requiring vendor drivers to implement a custom method for that. The vendor_passthru() and driver_vendor_passthru() methods were removed from the VendorInterface base class. Now vendors that wants to implement a vendor method should now only care about implementing the method itself and decorating them with the @passthru() or @driver_passthru decorator. This patch also adds a backward compatibility layer for existing drivers out of the tree that may be using the old [driver_]vendor_passthru() methods. If the vendor class contains those methods we are going to call them just like before, otherwise we are going to use the new mechanism. All drivers in tree have been ported to the new mechanism. Implements: blueprint extended-vendor-passthru Partial-Bug: #1382457 Change-Id: I7770ccd9668d9c03e02f769aff7c54b33734a770
* Add logging to driver vendor_passthru functionsSam Betts2014-10-311-2/+4
| | | | | | | | | | | | | | Since the drivers' vendor_passthru are async. calls, any exceptions raised by them won't be handled. So all exceptions, even non-Ironic exceptions should be logged. This patch adds a decorator that can be used to wrap passthru function calls and ensure that any exceptions get logged correctly, also adds unit tests to ensure decorators functionality. Change-Id: I17006611fd59d5f4dc78fdaefdf802e9fb7caff2 Implements: blueprint extended-vendor-passthru Closes-Bug: 1372979
* Enable H405 PEP8 checkDavid Shrewsbury2014-10-101-2/+4
| | | | | | | | | | Fixes files with the PEP8 error: H405 multi line docstring summary not separated with an empty line and enables the PEP8 check in tox.ini. Change-Id: I632c89e2a1783be8305a8a8cea7ae9d3bb55b62c
* Remove gettextutils _ injectionVladyslav Drok2014-08-291-0/+1
| | | | | | | | | | Now that ironic supports oslo.i18n, using the install function to inject _ into the builtin has been deprecated. New i18n common module used instead. In one module _ was imported from gettextutils, now also changed to i18n import. Closes-bug: #1346406 Change-Id: I672a975d479991982c24031e834a26e2c2811890
* Raise MissingParameterValue instead of InvalidGhe Rivero2014-08-121-3/+3
| | | | | | | | There are several functions that were raising InvalidParameterValue, when it should be a MissingParamenteValue. This way we can differentiate both exceptions when needed. Change-Id: Ia5ce05e30b3fb00261854857aeef46238a8b00f8
* Implements send-data-to-ceilometerwhaom2014-08-011-0/+3
| | | | | | | | | | | | | | | | | | | | | This patch will define the sensor data collection interface and implement a driver based on IPMI to collect sensor data and send them to Ceilometer. The change covered by this patch: 1. Creates a new ironic.driver.base.ManagementInterface common method *get_sensors_data* for gathering hardware sensor data. 2. Implements the interface into 'ipmitool' driver to gather data via IPMI command call. 3. Adds periodic task to conductor which emits notification to Ceilometer by an interval. Spec: https://review.openstack.org/102435 Change-Id: I2c072321a662db0162c938b7d4f3b59ba07d4e08 Implements: blueprint send-data-to-ceilometer
* Add drivers.base.BaseDriver.get_properties()Ruby Loo2014-07-231-0/+20
| | | | | | | | | | | | | | | | Adds ironic.drivers.base.BaseDriver.get_properties() which returns a dictionary of <property>:<description> entries. The driver interfaces (DeployInterface, PowerInterface, ...) have a new get_properties() method that returns a dictionary of <property>:<description>. These changes are needed in order to provide an API to get driver_info properties. Change-Id: I5994e990deb26841633ca26de1a5fb63b743271a Blueprint: get-required-driver-info Partial-Bug: #1261915
* ManagementInterface {set, get}_boot_device() to support 'persistent'Lucas Alvares Gomes2014-07-091-2/+2
| | | | | | | | | | | | | | It's common for drivers to be able to set the boot device only for the next boot (that's the default behavior for the IPMITool for example) but it's also possible to set a boot device as persistent so that the configuration will persist across multiple boots. This patch is making the 'persistent' parameter to be part of the method signature of the set_boot_device() method and also making the get_boot_device() method to return whether the device is set as persistent or not as part of the response. Implements: blueprint new-management-interface Change-Id: Ia1f9c5449612871a379377d11fb0fe91b0958026
* Fix 'fake' driver unable to finish a deployDevananda van der Veen2014-06-261-2/+2
| | | | | | | | The 'fake' driver is not returning any status from driver.deploy or driver.tear_down, which prevents the completion of a provision state transition with this driver. Change-Id: I844dc03f35da23eb81235abdc16a79afc9835235
* Remove 'node' parameter from the validate() methodsLucas Alvares Gomes2014-06-161-4/+4
| | | | | | | | The node parameter is redundant since the node object is an attribute of the task object. Closes-Bug: #1312632 Change-Id: Ia4193ea561a31e54754049d9964c6c9021474caf
* Driver interface's validate should return nothingRuby Loo2014-06-121-2/+2
| | | | | | | | | | | | | | Some of the driver interface's validate(), eg pxe.VendorPassthru.validate() returns True. The expected behaviour is for them to raise an exception if validation isn't successful, or return nothing if validation succeeds. This is fixed. The docstrings for the validate functions in the base class have been updated to mention that they should return None. Change-Id: Ic8fb626874ed6cb11494c84dc184d70686441b0f Closes-Bug: #1288363
* Remove 'node' parameter from the Console and Rescue interfacesLucas Alvares Gomes2014-06-101-3/+3
| | | | | | | | The node parameter is redundant since the node object is an attribute of the task object. Partial-Bug: #1312632 Change-Id: Ic7bf898b7d881e36188511d75837e450f29f066c
* Remove 'node' parameter from the Power interfaceLucas Alvares Gomes2014-05-291-5/+5
| | | | | | | | The node parameter is redundant since the node object is an attribute of the task object. Partial-Bug: #1312632 Change-Id: I4baa8526768a250e0cf047f56322039157772376
* Remove 'node' parameter from the Deploy interfaceLucas Alvares Gomes2014-05-261-5/+5
| | | | | | | | | | | | The node parameter is redundant since the node object is an attribute of the task object. In the PXE driver, the helper functions _create_token_file, _remove_internal_attrs, _update_neutron and _create_pxe_config were also updated removing the 'node' parameter from the function definition. Partial-Bug: #1312632 Change-Id: I82b3078c00cdf6e417c3f379bf03f1c5cae533d7
* Remove 'node' parameter from the VendorPassthru interfaceLucas Alvares Gomes2014-04-301-8/+8
| | | | | | | | The node is redundant since the node object is an attribute of the task object. Partial-Bug: #1312632 Change-Id: I14f921023d020eb5a0b8caf1b3c5fa6f248b9ff6
* Add ManagementInterfaceLucas Alvares Gomes2014-04-281-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new driver ManagementInterface for management related actions, the new interface contains the following methods: * validate() - To validate driver-specific management information. (E.g if the node has the right credentials already set) * set_boot_device() - To set the boot device for a node. * get_boot_device() - To get the current boot device of a node. * get_supported_boot_devices() - To get a list of the supported boot devices by that driver. A new file common/boot_devices.py which contains the standardized names for the acceptable boot devices, the names are based on the IPMITool names (the default power driver). The idea is that clients won't need to know the specific boot device names for each driver, drivers which have different name options than the IPMITool have to translate it internally. As part of the work to add tests to the FakeManagement interface, other tests in test_fake.py were modified in order to remove the DB calls. blueprint: promote-set-boot-device Change-Id: If2e8074f2e0fbcf962d224024347a0319ac174cf