Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ip_power control for BareMetal platform #3550

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

paulli2017
Copy link
Contributor

No description provided.

@squirrelsc
Copy link
Member

Please rebase on latest main to avoid conflict.

from .schema import IPPowerSchema


class IPPower(subclasses.BaseClassWithRunbookMixin, ContextMixin, InitializableMixin):
Copy link
Member

@squirrelsc squirrelsc Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow SerialConsole's design, implement the logic in the feature, and call it in cluster, when it's needed.

class Ip9285(IPPower):
def __init__(self, runbook: IPPowerSchema) -> None:
super().__init__(runbook)
self._request_cmd = (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the P6 mean? If it's part of the port, move it to on/off, so it's clearer.


def on(self, port: int) -> None:
request_on = f"{self._request_cmd}{port}=1"
requests.get(request_on)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow the internal example to check the status, make sure it's reliable.

paull and others added 6 commits January 2, 2025 12:01
# This is the 1st commit message:

Added ip_power control for BareMetal platform

# The commit message microsoft#2 will be skipped:

# Added tftp deployment on BareMetal platform (microsoft#3422)
#
# Co-authored-by: paull <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants