Add no-vendor interface to the idrac hardware types
Vendor interfaces must not be mandatory. Missing no-vendor implementation means that we require operators to enable the idrac vendor interface when the idrac hardware type is enabled. Change-Id: I6768a37bc268e367eaf93b12660a80d31eeca0c0 Closes-Bug: #1732166
This commit is contained in:
parent
04015a0b51
commit
4432fa9950
@ -65,7 +65,7 @@ class IDRACHardware(generic.GenericHardware):
|
||||
@property
|
||||
def supported_vendor_interfaces(self):
|
||||
"""List of supported vendor interfaces."""
|
||||
return [vendor_passthru.DracVendorPassthru]
|
||||
return [vendor_passthru.DracVendorPassthru, noop.NoVendor]
|
||||
|
||||
|
||||
class PXEDracDriver(base.BaseDriver):
|
||||
|
@ -96,7 +96,7 @@ class IDRACHardwareTestCase(BaseIDRACTestCase):
|
||||
'idrac', 'inspector', 'no-inspect'],
|
||||
enabled_network_interfaces=['flat', 'neutron', 'noop'],
|
||||
enabled_raid_interfaces=['idrac', 'no-raid'],
|
||||
enabled_vendor_interfaces=['idrac'])
|
||||
enabled_vendor_interfaces=['idrac', 'no-vendor'])
|
||||
|
||||
def test_default_interfaces(self):
|
||||
node = obj_utils.create_test_node(self.context, driver='idrac')
|
||||
@ -129,6 +129,14 @@ class IDRACHardwareTestCase(BaseIDRACTestCase):
|
||||
console=noop.NoConsole,
|
||||
raid=noop.NoRAID)
|
||||
|
||||
def test_override_no_vendor(self):
|
||||
node = obj_utils.create_test_node(self.context, driver='idrac',
|
||||
vendor_interface='no-vendor')
|
||||
with task_manager.acquire(self.context, node.id) as task:
|
||||
self._validate_interfaces(task.driver,
|
||||
console=noop.NoConsole,
|
||||
vendor=noop.NoVendor)
|
||||
|
||||
|
||||
@mock.patch.object(importutils, 'try_import', spec_set=True, autospec=True)
|
||||
class DracClassicDriversTestCase(BaseIDRACTestCase):
|
||||
|
5
releasenotes/notes/idrac-no-vendor-911904dd69457826.yaml
Normal file
5
releasenotes/notes/idrac-no-vendor-911904dd69457826.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Adds missing ``no-vendor`` implementation to supported vendor interfaces
|
||||
of the ``idrac`` hardware type.
|
Loading…
Reference in New Issue
Block a user