launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #06678
[Merge] lp:~allenap/maas/power-type-in-papi-node into lp:maas
Gavin Panella has proposed merging lp:~allenap/maas/power-type-in-papi-node into lp:maas.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~allenap/maas/power-type-in-papi-node/+merge/97305
--
https://code.launchpad.net/~allenap/maas/power-type-in-papi-node/+merge/97305
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~allenap/maas/power-type-in-papi-node into lp:maas.
=== modified file 'src/provisioningserver/api.py'
--- src/provisioningserver/api.py 2012-03-13 04:33:13 +0000
+++ src/provisioningserver/api.py 2012-03-13 21:18:28 +0000
@@ -53,6 +53,7 @@
for mac_address in mac_addresses
if not mac_address.isspace()
],
+ "power_type": data["power_type"],
}
cobbler_mapping_to_papi_nodes = partial(
=== modified file 'src/provisioningserver/tests/test_api.py'
--- src/provisioningserver/tests/test_api.py 2012-03-13 14:13:08 +0000
+++ src/provisioningserver/tests/test_api.py 2012-03-13 21:18:28 +0000
@@ -102,12 +102,14 @@
"interfaces": {
"eth0": {"mac_address": "12:34:56:78:9a:bc"},
},
+ "power_type": "virsh",
"ju": "nk",
}
expected = {
"name": "iced",
"profile": "earth",
"mac_addresses": ["12:34:56:78:9a:bc"],
+ "power_type": "virsh",
}
observed = cobbler_to_papi_node(data)
self.assertEqual(expected, observed)
@@ -116,12 +118,14 @@
data = {
"name": "iced",
"profile": "earth",
+ "power_type": "ether_wake",
"ju": "nk",
}
expected = {
"name": "iced",
"profile": "earth",
"mac_addresses": [],
+ "power_type": "ether_wake",
}
observed = cobbler_to_papi_node(data)
self.assertEqual(expected, observed)