import "go.chromium.org/luci/machine-db/client/cli"
Package cli contains the Machine Database command-line client.
cli.go datacenters.go dracs.go flags.go hosts.go ips.go kvms.go machines.go nics.go oses.go physical_hosts.go platforms.go printer.go racks.go states.go switches.go vlans.go vm_slots.go vms.go
func Main(params *Parameters, args []string) int
func New(params *Parameters) *cli.Application
New returns the Machine Database command-line application.
StateFlag returns a flag.Value which reads flag values into the given *common.State.
StateSliceFlag returns a flag.Value which appends flag values to the given *[]common.State.
type AddDRACCmd struct {
// contains filtered or unexported fields
}
AddDRACCmd is the command to add a DRAC.
func (c *AddDRACCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *AddDRACCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to add a DRAC.
type AddMachineCmd struct {
// contains filtered or unexported fields
}
AddMachineCmd is the command to add a machine.
func (c *AddMachineCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *AddMachineCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to add a machine.
type AddNICCmd struct {
// contains filtered or unexported fields
}
AddNICCmd is the command to add a network interface.
func (c *AddNICCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *AddNICCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to add a network interface.
type AddPhysicalHostCmd struct {
// contains filtered or unexported fields
}
AddPhysicalHostCmd is the command to add a physical host.
func (c *AddPhysicalHostCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *AddPhysicalHostCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to add a physical host.
type AddVMCmd struct {
// contains filtered or unexported fields
}
AddVMCmd is the command to add a VM.
func (c *AddVMCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *AddVMCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to add a VM.
type CommonFlags struct {
// contains filtered or unexported fields
}
CommonFlags contains common flags for all commands.
func (f *CommonFlags) Register(flags *flag.FlagSet, params *Parameters)
Register registers common flags with the given flag.FlagSet.
type DeleteHostCmd struct {
// contains filtered or unexported fields
}
DeleteHostCmd is the command to delete a host.
func (c *DeleteHostCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *DeleteHostCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to delete a host.
type DeleteMachineCmd struct {
// contains filtered or unexported fields
}
DeleteMachineCmd is the command to delete a machine.
func (c *DeleteMachineCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *DeleteMachineCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to delete a machine.
type DeleteNICCmd struct {
// contains filtered or unexported fields
}
DeleteNICCmd is the command to delete a network interface.
func (c *DeleteNICCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *DeleteNICCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to delete a network interface.
type EditDRACCmd struct {
// contains filtered or unexported fields
}
EditDRACCmd is the command to edit a DRAC.
func (c *EditDRACCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *EditDRACCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to edit a DRAC.
type EditMachineCmd struct {
// contains filtered or unexported fields
}
EditMachineCmd is the command to edit a machine.
func (c *EditMachineCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *EditMachineCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to edit a machine.
type EditNICCmd struct {
// contains filtered or unexported fields
}
EditNICCmd is the command to edit a network interface.
func (c *EditNICCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *EditNICCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to edit a network interface.
type EditPhysicalHostCmd struct {
// contains filtered or unexported fields
}
EditPhysicalHostCmd is the command to edit a physical host.
func (c *EditPhysicalHostCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *EditPhysicalHostCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to edit a physical host.
type EditVMCmd struct {
// contains filtered or unexported fields
}
EditVMCmd is the command to edit a VM.
func (c *EditVMCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *EditVMCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to edit a physical host.
type GetDRACsCmd struct {
// contains filtered or unexported fields
}
GetDRACsCmd is the command to get DRACs.
func (c *GetDRACsCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *GetDRACsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to get DRACs.
type GetDatacentersCmd struct {
// contains filtered or unexported fields
}
GetDatacentersCmd is the command to get datacenters.
func (c *GetDatacentersCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *GetDatacentersCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to get datacenters.
type GetIPsCmd struct {
// contains filtered or unexported fields
}
GetIPsCmd is the command to get free IP addresses.
func (c *GetIPsCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *GetIPsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to get free IP addresses.
type GetKVMsCmd struct {
// contains filtered or unexported fields
}
GetKVMsCmd is the command to get KVMs.
func (c *GetKVMsCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *GetKVMsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to get KVMs.
type GetMachinesCmd struct {
// contains filtered or unexported fields
}
GetMachinesCmd is the command to get machines.
func (c *GetMachinesCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *GetMachinesCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to get machines.
type GetNICsCmd struct {
// contains filtered or unexported fields
}
GetNICsCmd is the command to get network interfaces.
func (c *GetNICsCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *GetNICsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to get network interfaces.
type GetOSesCmd struct {
// contains filtered or unexported fields
}
GetOSesCmd is the command to get operating systems.
func (c *GetOSesCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *GetOSesCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to get operating systems.
type GetPhysicalHostsCmd struct {
// contains filtered or unexported fields
}
GetPhysicalHostsCmd is the command to get physical hosts.
func (c *GetPhysicalHostsCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *GetPhysicalHostsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to get physical hosts.
type GetPlatformsCmd struct {
// contains filtered or unexported fields
}
GetPlatformsCmd is the command to get platforms.
func (c *GetPlatformsCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *GetPlatformsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to get platforms.
type GetRacksCmd struct {
// contains filtered or unexported fields
}
GetRacksCmd is the command to get racks.
func (c *GetRacksCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *GetRacksCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to get racks.
type GetStatesCmd struct {
// contains filtered or unexported fields
}
GetStatesCmd is the command to get states.
func (c *GetStatesCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *GetStatesCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to get state.
type GetSwitchesCmd struct {
// contains filtered or unexported fields
}
GetSwitchesCmd is the command to get switches.
func (c *GetSwitchesCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *GetSwitchesCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to get switches.
type GetVLANsCmd struct {
// contains filtered or unexported fields
}
GetVLANsCmd is the command to get VLANs.
func (c *GetVLANsCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *GetVLANsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to get VLANs.
type GetVMSlotsCmd struct {
// contains filtered or unexported fields
}
GetVMSlotsCmd is the command to get available VM slots.
func (c *GetVMSlotsCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *GetVMSlotsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to get available VM slots.
type GetVMsCmd struct {
// contains filtered or unexported fields
}
GetVMsCmd is the command to get VMs.
func (c *GetVMsCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *GetVMsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to get VMs.
type Parameters struct { // AuthOptions contains authentication-related options. AuthOptions auth.Options // Host is the Machine Database service to use. Host string }
Parameters contains parameters for constructing a new Machine Database command-line client.
type RenameMachineCmd struct {
// contains filtered or unexported fields
}
RenameMachineCmd is the command to rename a machine.
func (c *RenameMachineCmd) Initialize(params *Parameters)
Initialize initializes the commandBase instance, registering common flags.
ModifyContext returns a new context to be used with subcommands. Configures the context's logging and embeds the Machine Database RPC client. Implements cli.ContextModificator.
func (c *RenameMachineCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int
Run runs the command to rename a machine.
Package cli imports 20 packages (graph). Updated 2021-01-25. Refresh now. Tools for package owners.