summaryrefslogtreecommitdiff
path: root/ironic/common
diff options
context:
space:
mode:
authorJim Rollenhagen <jim@jimrollenhagen.com>2017-01-11 16:59:13 +0000
committerJim Rollenhagen <jim@jimrollenhagen.com>2017-01-19 20:35:05 +0000
commit3c45f2fd1b8ca90ecc02ec32206eadab0333c7a1 (patch)
tree4d07d0e1c674c0b6d8e89ca9eacb924f7b88d618 /ironic/common
parentda6b0f2aad7b38b18c1886e30d9517ded66297d1 (diff)
downloadironic-3c45f2fd1b8ca90ecc02ec32206eadab0333c7a1.tar.gz
Add hardware types to the hash ring
This loads hardware types into the hash ring, along with the drivers that are currently there. This allows us to make RPC calls for nodes that are using a dynamic driver. Adds a dbapi method `get_active_hardware_type_dict`, similar to `get_active_driver_dict`, to get a mapping of hardware types to active conductors. Change-Id: I50c1428568bd8cbe4ef252d56a6278f1a54dfcdb Partial-Bug: #1524745
Diffstat (limited to 'ironic/common')
-rw-r--r--ironic/common/hash_ring.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/ironic/common/hash_ring.py b/ironic/common/hash_ring.py
index 95cfbdef3..61e1b385f 100644
--- a/ironic/common/hash_ring.py
+++ b/ironic/common/hash_ring.py
@@ -50,6 +50,7 @@ class HashRingManager(object):
def _load_hash_rings(self):
rings = {}
d2c = self.dbapi.get_active_driver_dict()
+ d2c.update(self.dbapi.get_active_hardware_type_dict())
for driver_name, hosts in d2c.items():
rings[driver_name] = hashring.HashRing(