diff options
author | Lucas Alvares Gomes <lucasagomes@gmail.com> | 2014-07-09 14:19:57 +0100 |
---|---|---|
committer | Lucas Alvares Gomes <lucasagomes@gmail.com> | 2014-07-09 15:46:00 +0100 |
commit | 4b3276e918238d213510a353e232bd6039bf18ad (patch) | |
tree | e1701c16e00ee05f7dcd1e7b9130c9d4500f1098 /ironic/drivers/modules/fake.py | |
parent | 260a44f3f16fca2f8d3f91877d01bf543dae8312 (diff) | |
download | ironic-4b3276e918238d213510a353e232bd6039bf18ad.tar.gz |
ManagementInterface {set, get}_boot_device() to support 'persistent'
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
Diffstat (limited to 'ironic/drivers/modules/fake.py')
-rw-r--r-- | ironic/drivers/modules/fake.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ironic/drivers/modules/fake.py b/ironic/drivers/modules/fake.py index fbc710592..95c3bf530 100644 --- a/ironic/drivers/modules/fake.py +++ b/ironic/drivers/modules/fake.py @@ -155,10 +155,10 @@ class FakeManagement(base.ManagementInterface): def get_supported_boot_devices(self): return [boot_devices.PXE] - def set_boot_device(self, task, device, **kwargs): + def set_boot_device(self, task, device, persistent=False): if device not in self.get_supported_boot_devices(): raise exception.InvalidParameterValue(_( "Invalid boot device %s specified.") % device) def get_boot_device(self, task): - return boot_devices.PXE + return {'boot_device': boot_devices.PXE, 'persistent': False} |