Merge ~dekarl/maas:fix-power-apc into maas:master

Proposed by Karl Egly
Status: Merged
Approved by: Adam Collard
Approved revision: 6064c9af8ae27f35f7232ade8d3c911192739457
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~dekarl/maas:fix-power-apc
Merge into: maas:master
Diff against target: 25 lines (+1/-2)
2 files modified
src/maasserver/models/tests/test_node.py (+1/-1)
src/provisioningserver/drivers/power/apc.py (+0/-1)
Reviewer Review Type Date Requested Status
Adam Collard Approve
MAAS Lander Approve
Review via email: mp+390334@code.launchpad.net

Commit message

Mark APC Power Driver as queryable

Description of the change

Mark APC Power Driver Queryable

Inspired by Vamsidhar Juvvigunta on the Forum at
https://discourse.maas.io/t/power-type-apc-in-maas-2-7-2-8-query-fails-but-on-off-works/1948

To post a comment you must log in.
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b fix-power-apc lp:~dekarl/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: FAILED
LOG: http://maas-ci.internal:8080/job/maas/job/branch-tester/8241/console
COMMIT: 1e346460f85caf7043e39f50ce3a05f9e1e1a611

review: Needs Fixing
Revision history for this message
Adam Collard (adam-collard) wrote :

> UNIT TESTS
> -b fix-power-apc lp:~dekarl/maas/+git/maas into -b master lp:~maas-
> committers/maas
>
> STATUS: FAILED
> LOG: http://maas-ci.internal:8080/job/maas/job/branch-tester/8241/console
> COMMIT: 1e346460f85caf7043e39f50ce3a05f9e1e1a611

Thanks for the contribution - the test that is failing is https://paste.ubuntu.com/p/d6BRvHBVdr/ and the error is https://paste.ubuntu.com/p/2jbfqrq3Jq/

Can you update your branch to change the power type in the test to "manual"?

Revision history for this message
Adam Collard (adam-collard) :
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b fix-power-apc lp:~dekarl/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 6064c9af8ae27f35f7232ade8d3c911192739457

review: Approve
Revision history for this message
Karl Egly (dekarl) wrote :

Hi Adam, thank you for taking the time to look into the failing test. I have applied the suggested changes.

Revision history for this message
Adam Collard (adam-collard) :
review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNABLE TO START LANDING

STATUS: MISSING COMMIT MESSAGE

Revision history for this message
MAAS Lander (maas-lander) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasserver/models/tests/test_node.py b/src/maasserver/models/tests/test_node.py
2index 8e53695..adfb86a 100644
3--- a/src/maasserver/models/tests/test_node.py
4+++ b/src/maasserver/models/tests/test_node.py
5@@ -9206,7 +9206,7 @@ class TestNode_PowerQuery(MAASTransactionServerTestCase):
6 def test_updates_power_state_unknown_for_non_queryable_power_type(self):
7 node = yield deferToDatabase(
8 transactional(factory.make_Node),
9- power_type="apc",
10+ power_type="manual",
11 power_state=POWER_STATE.ON,
12 )
13 mock_power_control = self.patch(node, "_power_control_node")
14diff --git a/src/provisioningserver/drivers/power/apc.py b/src/provisioningserver/drivers/power/apc.py
15index 1fe8505..4a2710f 100644
16--- a/src/provisioningserver/drivers/power/apc.py
17+++ b/src/provisioningserver/drivers/power/apc.py
18@@ -44,7 +44,6 @@ class APCPowerDriver(PowerDriver):
19 ),
20 ]
21 ip_extractor = make_ip_extractor("power_address")
22- queryable = False
23
24 def detect_missing_packages(self):
25 binary, package = ["snmpset", "snmp"]

Subscribers

People subscribed via source and target branches