summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Rollenhagen <jim@jimrollenhagen.com>2017-01-19 20:43:17 +0000
committerJim Rollenhagen <jim@jimrollenhagen.com>2017-01-20 19:07:50 +0000
commit1dc154033f294c34a4ea3f52d89522a59f31f26c (patch)
treed997ce2b87c7294ee4d7aaea71105d5ea070ae03
parent814cf5bf83daa98b5c471647ae80e014f4c6b4dc (diff)
downloadironic-1dc154033f294c34a4ea3f52d89522a59f31f26c.tar.gz
Turn NOTE into docstring
conductor.base_manager._register_and_validate_hardware_interfaces had a note at the top about what exceptions might be raised. Turn this into a proper docstring. Change-Id: I60b3e864f4cfba38ed7d12caf3bf723d73ab9e39 Partial-Bug: #1524745
-rw-r--r--ironic/conductor/base_manager.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/ironic/conductor/base_manager.py b/ironic/conductor/base_manager.py
index 2c409ccf0..0957923b2 100644
--- a/ironic/conductor/base_manager.py
+++ b/ironic/conductor/base_manager.py
@@ -235,10 +235,20 @@ class BaseConductorManager(object):
self._started = False
def _register_and_validate_hardware_interfaces(self):
- # NOTE(jroll) may raise ConductorHardwareInterfacesAlreadyRegistered
- # or InterfaceNotFoundInEntrypoint,
- # we intentionally let this bubble up to the caller.
+ """Register and validate hardware interfaces for this conductor.
+ Registers a row in the database for each combination of
+ (hardware type, interface type, interface) that is supported and
+ enabled.
+
+ TODO: Validates against other conductors to check if the
+ set of registered hardware interfaces for a given hardware type is the
+ same, and warns if not (we can't error out, otherwise all conductors
+ must be restarted at once to change configuration).
+
+ :raises: ConductorHardwareInterfacesAlreadyRegistered
+ :raises: InterfaceNotFoundInEntrypoint
+ """
# first unregister, in case we have cruft laying around
self.conductor.unregister_all_hardware_interfaces()