servers

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: BSD-3-Clause, MIT Imports: 12 Imported by: 0

Documentation

Overview

Package servers holds the SDK-backed server subcommands added for PD-6075: power actions, rescue mode and lock/unlock access. Each command talks to the API through lsh.NewClient() and renders through the shared renderer so -o json/yaml and --query work everywhere.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExitRescueModeCmd

func NewExitRescueModeCmd() *cobra.Command

NewExitRescueModeCmd builds `lsh servers exit-rescue-mode <id>`.

func NewLockCmd

func NewLockCmd() *cobra.Command

NewLockCmd builds `lsh servers lock <id>`.

func NewPowerOffCmd

func NewPowerOffCmd() *cobra.Command

NewPowerOffCmd builds `lsh servers power-off <server_id>`.

func NewPowerOnCmd

func NewPowerOnCmd() *cobra.Command

NewPowerOnCmd builds `lsh servers power-on <server_id>`.

func NewRebootCmd

func NewRebootCmd() *cobra.Command

NewRebootCmd builds `lsh servers reboot <server_id>`.

func NewRescueModeCmd

func NewRescueModeCmd() *cobra.Command

NewRescueModeCmd builds `lsh servers rescue-mode <id>`.

func NewUnlockCmd

func NewUnlockCmd() *cobra.Command

NewUnlockCmd builds `lsh servers unlock <id>`.

Types

type ServerActionModel

type ServerActionModel struct {
	ServerID string
	Action   string
	Data     *components.ServerActionData
}

ServerActionModel renders the response of a server power action.

func (*ServerActionModel) GetData

func (m *ServerActionModel) GetData() []renderer.ResponseData

func (*ServerActionModel) TableRow

func (m *ServerActionModel) TableRow() table.Row

type SimpleServerModel

type SimpleServerModel struct {
	ServerID string
	State    string
}

SimpleServerModel renders a one-line outcome for state changes (lock/unlock, rescue mode) that return no body of their own.

func (*SimpleServerModel) GetData

func (m *SimpleServerModel) GetData() []renderer.ResponseData

func (*SimpleServerModel) TableRow

func (m *SimpleServerModel) TableRow() table.Row

Jump to

Keyboard shortcuts

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