Metastatic: Copy cloud attribute from backing node

Like done with several other meta data, copy the `cloud` attribute from
the backing node to the metastatic node.

Change-Id: Id83b3e09147baaab8a85ace4d5beba77d1eb87bd
This commit is contained in:
Benjamin Schanzel 2024-02-23 14:20:09 +01:00
parent 46268e56ee
commit 4c4e8aefdb
No known key found for this signature in database
2 changed files with 2 additions and 0 deletions

View File

@ -117,6 +117,7 @@ class MetastaticInstance(statemachine.Instance):
self.private_ipv4 = backing_node.private_ipv4
self.az = backing_node.az
self.region = backing_node.region
self.cloud = backing_node.cloud
# Image overrides:
self.username = backing_node.username
self.python_path = backing_node.python_path

View File

@ -106,6 +106,7 @@ class TestDriverMetastatic(tests.DBTestCase):
self.assertEqual(bn1.python_path, node1.python_path)
self.assertEqual('auto', node1.python_path)
self.assertEqual(bn1.shell_type, node1.shell_type)
self.assertEqual(bn1.cloud, node1.cloud)
self.assertEqual(None, node1.shell_type)
self.assertEqual(bn1.host_keys, node1.host_keys)
self.assertEqual(['ssh-rsa FAKEKEY'], node1.host_keys)