Merge "register-nodes: add support for pxe_ucs"
This commit is contained in:
commit
73b02563c7
@ -64,6 +64,11 @@ def _extract_driver_info(node):
|
||||
# The fake_pxe driver doesn't need any credentials since there's
|
||||
# no power management
|
||||
pass
|
||||
elif node["pm_type"] == "pxe_ucs":
|
||||
driver_info = {"ucs_hostname": node["pm_addr"],
|
||||
"ucs_username": node["pm_user"],
|
||||
"ucs_password": node["pm_password"],
|
||||
"ucs_service_profile": node["pm_service_profile"]}
|
||||
else:
|
||||
raise ValueError("Unknown pm_type: %s" % node["pm_type"])
|
||||
if "pxe" in node["pm_type"]:
|
||||
|
@ -125,6 +125,16 @@ class NodesTest(base.TestCase):
|
||||
"iboot_port": "8080"}
|
||||
self.assertEqual(expected, nodes._extract_driver_info(node))
|
||||
|
||||
def test_extract_driver_info_pxe_ucs(self):
|
||||
node = self._get_node()
|
||||
node["pm_type"] = "pxe_ucs"
|
||||
node["pm_service_profile"] = "foo_profile"
|
||||
expected = {"ucs_hostname": "foo.bar",
|
||||
"ucs_username": "test",
|
||||
"ucs_password": "random",
|
||||
"ucs_service_profile": "foo_profile"}
|
||||
self.assertEqual(expected, nodes._extract_driver_info(node))
|
||||
|
||||
def test_extract_driver_info_pxe_ipmi_with_kernel_ramdisk(self):
|
||||
node = self._get_node()
|
||||
node["pm_type"] = "pxe_ipmi"
|
||||
|
Loading…
x
Reference in New Issue
Block a user