summaryrefslogtreecommitdiff
path: root/ironic/objects
diff options
context:
space:
mode:
authorDerek Higgins <derekh@redhat.com>2020-12-01 09:11:41 +0000
committerJulia Kreger <juliaashleykreger@gmail.com>2021-01-08 15:16:53 +0000
commit7d85b35c8425f10a2fff64dfc82008a93c3a7b98 (patch)
treebbd5de7ae661f9028b2c7faa6a29f3c4e76c7ed1 /ironic/objects
parentfcf029a0ad078d96ef0da8859d7f361b2d2cac88 (diff)
downloadironic-7d85b35c8425f10a2fff64dfc82008a93c3a7b98.tar.gz
Register all hardware_interfaces together
Prevent each driver comming online one at a time. So that /driver returns nothign until all interfaces are registered Story: #2008423 Task: #41368 Change-Id: I6ef3e6e36b96106faf4581509d9219e5c535a6d8
Diffstat (limited to 'ironic/objects')
-rw-r--r--ironic/objects/conductor.py19
1 files changed, 7 insertions, 12 deletions
diff --git a/ironic/objects/conductor.py b/ironic/objects/conductor.py
index 0c0e991a6..ad381359b 100644
--- a/ironic/objects/conductor.py
+++ b/ironic/objects/conductor.py
@@ -156,21 +156,16 @@ class Conductor(base.IronicObject, object_base.VersionedObjectDictCompat):
self.unregister_all_hardware_interfaces()
self.dbapi.unregister_conductor(self.hostname)
- def register_hardware_interfaces(self, hardware_type, interface_type,
- interfaces, default_interface):
+ def register_hardware_interfaces(self, interfaces):
"""Register hardware interfaces with the conductor.
- :param hardware_type: Name of hardware type for the interfaces.
- :param interface_type: Type of interfaces, e.g. 'deploy' or 'boot'.
- :param interfaces: List of interface names to register.
- :param default_interface: String, the default interface for this
- hardware type and interface type.
+ :param interfaces: List of interface to register, each entry should
+ be a dictionary conaining "hardware_type", "interface_type",
+ "interface_name" and "default", e.g.
+ {'hardware_type': 'hardware-type', 'interface_type': 'deploy',
+ 'interface_name': 'iscsi', 'default': True}
"""
- self.dbapi.register_conductor_hardware_interfaces(self.id,
- hardware_type,
- interface_type,
- interfaces,
- default_interface)
+ self.dbapi.register_conductor_hardware_interfaces(self.id, interfaces)
def unregister_all_hardware_interfaces(self):
"""Unregister all hardware interfaces for this conductor."""