pdu

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2025 License: BSD-2-Clause Imports: 9 Imported by: 0

README

PDU

The PDU module provides basic power control of a Power Distribution Unit (PDU) via HTTP requests. It supports turning a power outlet on, off, toggling its state, and querying the current status.

Note: This module currently supports only Intellinet ATM PDUs.

This module is intended to be used as part of dutagent, allowing automated power control of a DUT (Device Under Test) through a network-accessible PDU.

Usage

pdu [on|off|toggle|status]
Commands
Command Description
on Power on the outlet
off Power off the outlet
toggle Toggle the current power state
status Report the current power state

If no command is provided, the module prints a usage message and exits.

See pdu-example-cfg.yml for examples.

Configuration Options

Option Type Description
host string Base URL of the PDU (e.g. 10.0.0.5)
user string (Optional) Username for HTTP Basic Auth
password string (Optional) Password for HTTP Basic Auth
outlet int Outlet number to control (0-15, defaults to 0)

Documentation

Overview

Package pdu provides a dutagent module that allows power control of a PDU via HTTP requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PDU

type PDU struct {
	Host     string // Host is the address of the PDU
	User     string // User is used for authentication, if supported by the PDU
	Password string // Password is used for authentication, if supported by the PDU
	Outlet   int    // Outlet is the outlet to control, if the PDU supports multiple outlets. Defaults to 0 (first outlet).
	// contains filtered or unexported fields
}

PDU is a module that provides basic power management functions for a PDU (Power Distribution Unit). NOTE: This implementation currently supports only Intellinet ATM PDUs.

func (*PDU) Deinit

func (p *PDU) Deinit() error

func (*PDU) Help

func (p *PDU) Help() string

func (*PDU) Init

func (p *PDU) Init() error

func (*PDU) Run

func (p *PDU) Run(ctx context.Context, s module.Session, args ...string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL