Merge ~syntroniks/maas:cps-pdu-power-driver into maas:master

Proposed by none none
Status: Needs review
Proposed branch: ~syntroniks/maas:cps-pdu-power-driver
Merge into: maas:master
Diff against target: 291 lines (+279/-0)
2 files modified
src/provisioningserver/drivers/power/cps.py (+130/-0)
src/provisioningserver/drivers/power/tests/test_cps.py (+149/-0)
Reviewer Review Type Date Requested Status
MAAS Lander Needs Fixing
Jack Lloyd-Walters Approve
Review via email: mp+434995@code.staging.launchpad.net

Commit message

Add CyberPower PDU support

Description of the change

This implements simple CyberPower switched PDU control as a power option

To post a comment you must log in.
Revision history for this message
none none (syntroniks) wrote :

Hi all,

This is my first contribution to a Canonical project. I have included the desired functionality as well as python tests associated.

If there is any more documentation or demonstration of functionality required, please let me know. I would be happy to provide it.

The specific device this functionality is being developed for is the CyberPower PDU81007

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

UNIT TESTS
-b cps-pdu-power-driver lp:~syntroniks/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 629335a3a6f4f4eac2fa39fec97fde6e10d917b5

review: Approve
Revision history for this message
Jack Lloyd-Walters (lloydwaltersj) wrote :

Inline nit/questions, looks good elsewhere though.

review: Needs Fixing
Revision history for this message
none none (syntroniks) wrote :

I believe I have addressed your comments so far.

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

UNIT TESTS
-b cps-pdu-power-driver lp:~syntroniks/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: FAILED
LOG: http://maas-ci.internal:8080/job/maas-tester/1768/consoleText
COMMIT: c538a7d48dec640d225a7bf9928b44aacf363890

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

UNIT TESTS
-b cps-pdu-power-driver lp:~syntroniks/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: FAILED
LOG: http://maas-ci.internal:8080/job/maas-tester/1769/consoleText
COMMIT: c38d51baf525c3d856096d386e1b77b72121b090

review: Needs Fixing
Revision history for this message
Jack Lloyd-Walters (lloydwaltersj) wrote :

Most recent review just seems to need a file reformat, nothing major

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

UNIT TESTS
-b cps-pdu-power-driver lp:~syntroniks/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: FAILED
LOG: http://maas-ci.internal:8080/job/maas-tester/1775/consoleText
COMMIT: e9261e848817556f90616418f060d5a6962da98d

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

UNIT TESTS
-b cps-pdu-power-driver lp:~syntroniks/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: FAILED
LOG: http://maas-ci.internal:8080/job/maas-tester/1776/consoleText
COMMIT: d173b03ebf2e25b118ff10434f1f77882c1b7dc2

review: Needs Fixing
Revision history for this message
none none (syntroniks) wrote :

I'm seeing some test failures that I do not think are related to my code. Can you share what may still be holding up this merge?

Thanks :)

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

jenkins: !test

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

UNIT TESTS
-b cps-pdu-power-driver lp:~syntroniks/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: FAILED
LOG: http://maas-ci.internal:8080/job/maas-tester/1779/consoleText
COMMIT: d173b03ebf2e25b118ff10434f1f77882c1b7dc2

review: Needs Fixing
Revision history for this message
Jack Lloyd-Walters (lloydwaltersj) wrote :

jenkins: !test

Revision history for this message
Jack Lloyd-Walters (lloydwaltersj) wrote :

hit some flaky tests there

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

UNIT TESTS
-b cps-pdu-power-driver lp:~syntroniks/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: d173b03ebf2e25b118ff10434f1f77882c1b7dc2

review: Approve
Revision history for this message
Jack Lloyd-Walters (lloydwaltersj) :
review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :
Revision history for this message
Jack Lloyd-Walters (lloydwaltersj) wrote :

Needs to run `make format`

Revision history for this message
none none (syntroniks) wrote :

I have done so and do not see any changes:

user in maas # make format
format installed: black==22.6.0,click==8.1.3,cogapp==3.3.0,flake8==5.0.4,isort==5.7.0,mccabe==0.7.0,mypy-extensions==1.0.0,pathspec==0.11.1,platformdirs==3.1.1,pycodestyle==2.9.1,pyflakes==2.5.0,tomli==2.0.1
format run-test-pre: PYTHONHASHSEED='1431972820'
format run-test: commands[0] | isort setup.py src/apiclient src/maascli src/maasperf src/maasserver src/maastesting src/metadataserver src/provisioningserver src/provisioningserver/refresh/50-maas-01-commissioning utilities/bin2python.py utilities/check-imports utilities/check-oapi utilities/import-db-dump utilities/python_standard_libs.py utilities/snap-bind-mounts
format run-test: commands[1] | black -q setup.py src/apiclient src/maascli src/maasperf src/maasserver src/maastesting src/metadataserver src/provisioningserver src/provisioningserver/refresh/50-maas-01-commissioning utilities/bin2python.py utilities/check-imports utilities/check-oapi utilities/import-db-dump utilities/python_standard_libs.py utilities/snap-bind-mounts
format run-test: commands[2] | cog -r --verbosity=1 src/maastesting/pytest.dirs pyproject.toml
__________________________________________________________________________________ summary __________________________________________________________________________________
  format: commands succeeded
  congratulations :)
make[1]: Entering directory '/home/user/gh/maas/src/host-info'
go: downloading github.com/lxc/lxd v0.0.0-20221208170020-4c88904d2cf0
...snip
go: downloading github.com/google/uuid v1.3.0
make[1]: Leaving directory '/home/user/gh/maas/src/host-info'
user in maas # git status
On branch cps-pdu-power-driver
Your branch is up to date with 'origin/cps-pdu-power-driver'.

nothing to commit, working tree clean

Revision history for this message
Eline Maaike De Weerd (emdw) wrote :

That's using an older version of black, which was bumped to 23.1 recently. Can you try rebase master and then make format? There might be a minor formatting change to be done

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

UNIT TESTS
-b cps-pdu-power-driver lp:~syntroniks/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: FAILED
LOG: http://maas-ci.internal:8080/job/maas-tester/2205/consoleText
COMMIT: 2984d73ecdb85d8d23772f4ccace8fd0f72c08c0

review: Needs Fixing

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches