Default host_keys to empty list in static driver
Everywhere in nodepool we default the host_keys to an empty list and zuul relies on this behavior. However the static driver sets this to None for non-ssh connections. Change this to return an empty list to match the behavior of the other drivers. Change-Id: I3f14803c35a2039d2c53f4939857a531ce900097
This commit is contained in:
parent
2427bfb277
commit
bcaa264712
|
@ -49,7 +49,7 @@ class StaticNodeProvider(Provider):
|
|||
node["name"], node["connection-port"]))
|
||||
|
||||
if not gather_hostkeys:
|
||||
return
|
||||
return []
|
||||
|
||||
# Check node host-key
|
||||
if set(node["host-key"]).issubset(set(keys)):
|
||||
|
|
|
@ -177,7 +177,7 @@ class TestDriverStatic(tests.DBTestCase):
|
|||
self.assertEqual(nodes[0].username, 'admin')
|
||||
self.assertEqual(nodes[0].connection_port, 5986)
|
||||
self.assertEqual(nodes[0].connection_type, 'winrm')
|
||||
self.assertEqual(nodes[0].host_keys, None)
|
||||
self.assertEqual(nodes[0].host_keys, [])
|
||||
|
||||
def test_static_multilabel(self):
|
||||
configfile = self.setup_config('static-multilabel.yaml')
|
||||
|
|
Loading…
Reference in New Issue