luci: go.chromium.org/luci/machine-db/client/cli Index | Files

package cli

import "go.chromium.org/luci/machine-db/client/cli"

Package cli contains the Machine Database command-line client.

Index

Package Files

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 Uses

func Main(params *Parameters, args []string) int

func New Uses

func New(params *Parameters) *cli.Application

New returns the Machine Database command-line application.

func StateFlag Uses

func StateFlag(s *common.State) flag.Value

StateFlag returns a flag.Value which reads flag values into the given *common.State.

func StateSliceFlag Uses

func StateSliceFlag(s *[]common.State) flag.Value

StateSliceFlag returns a flag.Value which appends flag values to the given *[]common.State.

type AddDRACCmd Uses

type AddDRACCmd struct {
    // contains filtered or unexported fields
}

AddDRACCmd is the command to add a DRAC.

func (*AddDRACCmd) Initialize Uses

func (c *AddDRACCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*AddDRACCmd) ModifyContext Uses

func (c *AddDRACCmd) ModifyContext(ctx context.Context) context.Context

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 (*AddDRACCmd) Run Uses

func (c *AddDRACCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to add a DRAC.

type AddMachineCmd Uses

type AddMachineCmd struct {
    // contains filtered or unexported fields
}

AddMachineCmd is the command to add a machine.

func (*AddMachineCmd) Initialize Uses

func (c *AddMachineCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*AddMachineCmd) ModifyContext Uses

func (c *AddMachineCmd) ModifyContext(ctx context.Context) context.Context

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 (*AddMachineCmd) Run Uses

func (c *AddMachineCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to add a machine.

type AddNICCmd Uses

type AddNICCmd struct {
    // contains filtered or unexported fields
}

AddNICCmd is the command to add a network interface.

func (*AddNICCmd) Initialize Uses

func (c *AddNICCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*AddNICCmd) ModifyContext Uses

func (c *AddNICCmd) ModifyContext(ctx context.Context) context.Context

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 (*AddNICCmd) Run Uses

func (c *AddNICCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to add a network interface.

type AddPhysicalHostCmd Uses

type AddPhysicalHostCmd struct {
    // contains filtered or unexported fields
}

AddPhysicalHostCmd is the command to add a physical host.

func (*AddPhysicalHostCmd) Initialize Uses

func (c *AddPhysicalHostCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*AddPhysicalHostCmd) ModifyContext Uses

func (c *AddPhysicalHostCmd) ModifyContext(ctx context.Context) context.Context

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 (*AddPhysicalHostCmd) Run Uses

func (c *AddPhysicalHostCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to add a physical host.

type AddVMCmd Uses

type AddVMCmd struct {
    // contains filtered or unexported fields
}

AddVMCmd is the command to add a VM.

func (*AddVMCmd) Initialize Uses

func (c *AddVMCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*AddVMCmd) ModifyContext Uses

func (c *AddVMCmd) ModifyContext(ctx context.Context) context.Context

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 (*AddVMCmd) Run Uses

func (c *AddVMCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to add a VM.

type CommonFlags Uses

type CommonFlags struct {
    // contains filtered or unexported fields
}

CommonFlags contains common flags for all commands.

func (*CommonFlags) Register Uses

func (f *CommonFlags) Register(flags *flag.FlagSet, params *Parameters)

Register registers common flags with the given flag.FlagSet.

type DeleteHostCmd Uses

type DeleteHostCmd struct {
    // contains filtered or unexported fields
}

DeleteHostCmd is the command to delete a host.

func (*DeleteHostCmd) Initialize Uses

func (c *DeleteHostCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*DeleteHostCmd) ModifyContext Uses

func (c *DeleteHostCmd) ModifyContext(ctx context.Context) context.Context

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 (*DeleteHostCmd) Run Uses

func (c *DeleteHostCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to delete a host.

type DeleteMachineCmd Uses

type DeleteMachineCmd struct {
    // contains filtered or unexported fields
}

DeleteMachineCmd is the command to delete a machine.

func (*DeleteMachineCmd) Initialize Uses

func (c *DeleteMachineCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*DeleteMachineCmd) ModifyContext Uses

func (c *DeleteMachineCmd) ModifyContext(ctx context.Context) context.Context

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 (*DeleteMachineCmd) Run Uses

func (c *DeleteMachineCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to delete a machine.

type DeleteNICCmd Uses

type DeleteNICCmd struct {
    // contains filtered or unexported fields
}

DeleteNICCmd is the command to delete a network interface.

func (*DeleteNICCmd) Initialize Uses

func (c *DeleteNICCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*DeleteNICCmd) ModifyContext Uses

func (c *DeleteNICCmd) ModifyContext(ctx context.Context) context.Context

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 (*DeleteNICCmd) Run Uses

func (c *DeleteNICCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to delete a network interface.

type EditDRACCmd Uses

type EditDRACCmd struct {
    // contains filtered or unexported fields
}

EditDRACCmd is the command to edit a DRAC.

func (*EditDRACCmd) Initialize Uses

func (c *EditDRACCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*EditDRACCmd) ModifyContext Uses

func (c *EditDRACCmd) ModifyContext(ctx context.Context) context.Context

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 (*EditDRACCmd) Run Uses

func (c *EditDRACCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to edit a DRAC.

type EditMachineCmd Uses

type EditMachineCmd struct {
    // contains filtered or unexported fields
}

EditMachineCmd is the command to edit a machine.

func (*EditMachineCmd) Initialize Uses

func (c *EditMachineCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*EditMachineCmd) ModifyContext Uses

func (c *EditMachineCmd) ModifyContext(ctx context.Context) context.Context

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 (*EditMachineCmd) Run Uses

func (c *EditMachineCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to edit a machine.

type EditNICCmd Uses

type EditNICCmd struct {
    // contains filtered or unexported fields
}

EditNICCmd is the command to edit a network interface.

func (*EditNICCmd) Initialize Uses

func (c *EditNICCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*EditNICCmd) ModifyContext Uses

func (c *EditNICCmd) ModifyContext(ctx context.Context) context.Context

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 (*EditNICCmd) Run Uses

func (c *EditNICCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to edit a network interface.

type EditPhysicalHostCmd Uses

type EditPhysicalHostCmd struct {
    // contains filtered or unexported fields
}

EditPhysicalHostCmd is the command to edit a physical host.

func (*EditPhysicalHostCmd) Initialize Uses

func (c *EditPhysicalHostCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*EditPhysicalHostCmd) ModifyContext Uses

func (c *EditPhysicalHostCmd) ModifyContext(ctx context.Context) context.Context

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 (*EditPhysicalHostCmd) Run Uses

func (c *EditPhysicalHostCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to edit a physical host.

type EditVMCmd Uses

type EditVMCmd struct {
    // contains filtered or unexported fields
}

EditVMCmd is the command to edit a VM.

func (*EditVMCmd) Initialize Uses

func (c *EditVMCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*EditVMCmd) ModifyContext Uses

func (c *EditVMCmd) ModifyContext(ctx context.Context) context.Context

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 (*EditVMCmd) Run Uses

func (c *EditVMCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to edit a physical host.

type GetDRACsCmd Uses

type GetDRACsCmd struct {
    // contains filtered or unexported fields
}

GetDRACsCmd is the command to get DRACs.

func (*GetDRACsCmd) Initialize Uses

func (c *GetDRACsCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*GetDRACsCmd) ModifyContext Uses

func (c *GetDRACsCmd) ModifyContext(ctx context.Context) context.Context

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 (*GetDRACsCmd) Run Uses

func (c *GetDRACsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to get DRACs.

type GetDatacentersCmd Uses

type GetDatacentersCmd struct {
    // contains filtered or unexported fields
}

GetDatacentersCmd is the command to get datacenters.

func (*GetDatacentersCmd) Initialize Uses

func (c *GetDatacentersCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*GetDatacentersCmd) ModifyContext Uses

func (c *GetDatacentersCmd) ModifyContext(ctx context.Context) context.Context

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 (*GetDatacentersCmd) Run Uses

func (c *GetDatacentersCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to get datacenters.

type GetIPsCmd Uses

type GetIPsCmd struct {
    // contains filtered or unexported fields
}

GetIPsCmd is the command to get free IP addresses.

func (*GetIPsCmd) Initialize Uses

func (c *GetIPsCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*GetIPsCmd) ModifyContext Uses

func (c *GetIPsCmd) ModifyContext(ctx context.Context) context.Context

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 (*GetIPsCmd) Run Uses

func (c *GetIPsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to get free IP addresses.

type GetKVMsCmd Uses

type GetKVMsCmd struct {
    // contains filtered or unexported fields
}

GetKVMsCmd is the command to get KVMs.

func (*GetKVMsCmd) Initialize Uses

func (c *GetKVMsCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*GetKVMsCmd) ModifyContext Uses

func (c *GetKVMsCmd) ModifyContext(ctx context.Context) context.Context

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 (*GetKVMsCmd) Run Uses

func (c *GetKVMsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to get KVMs.

type GetMachinesCmd Uses

type GetMachinesCmd struct {
    // contains filtered or unexported fields
}

GetMachinesCmd is the command to get machines.

func (*GetMachinesCmd) Initialize Uses

func (c *GetMachinesCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*GetMachinesCmd) ModifyContext Uses

func (c *GetMachinesCmd) ModifyContext(ctx context.Context) context.Context

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 (*GetMachinesCmd) Run Uses

func (c *GetMachinesCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to get machines.

type GetNICsCmd Uses

type GetNICsCmd struct {
    // contains filtered or unexported fields
}

GetNICsCmd is the command to get network interfaces.

func (*GetNICsCmd) Initialize Uses

func (c *GetNICsCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*GetNICsCmd) ModifyContext Uses

func (c *GetNICsCmd) ModifyContext(ctx context.Context) context.Context

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 (*GetNICsCmd) Run Uses

func (c *GetNICsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to get network interfaces.

type GetOSesCmd Uses

type GetOSesCmd struct {
    // contains filtered or unexported fields
}

GetOSesCmd is the command to get operating systems.

func (*GetOSesCmd) Initialize Uses

func (c *GetOSesCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*GetOSesCmd) ModifyContext Uses

func (c *GetOSesCmd) ModifyContext(ctx context.Context) context.Context

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 (*GetOSesCmd) Run Uses

func (c *GetOSesCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to get operating systems.

type GetPhysicalHostsCmd Uses

type GetPhysicalHostsCmd struct {
    // contains filtered or unexported fields
}

GetPhysicalHostsCmd is the command to get physical hosts.

func (*GetPhysicalHostsCmd) Initialize Uses

func (c *GetPhysicalHostsCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*GetPhysicalHostsCmd) ModifyContext Uses

func (c *GetPhysicalHostsCmd) ModifyContext(ctx context.Context) context.Context

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 (*GetPhysicalHostsCmd) Run Uses

func (c *GetPhysicalHostsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to get physical hosts.

type GetPlatformsCmd Uses

type GetPlatformsCmd struct {
    // contains filtered or unexported fields
}

GetPlatformsCmd is the command to get platforms.

func (*GetPlatformsCmd) Initialize Uses

func (c *GetPlatformsCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*GetPlatformsCmd) ModifyContext Uses

func (c *GetPlatformsCmd) ModifyContext(ctx context.Context) context.Context

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 (*GetPlatformsCmd) Run Uses

func (c *GetPlatformsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to get platforms.

type GetRacksCmd Uses

type GetRacksCmd struct {
    // contains filtered or unexported fields
}

GetRacksCmd is the command to get racks.

func (*GetRacksCmd) Initialize Uses

func (c *GetRacksCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*GetRacksCmd) ModifyContext Uses

func (c *GetRacksCmd) ModifyContext(ctx context.Context) context.Context

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 (*GetRacksCmd) Run Uses

func (c *GetRacksCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to get racks.

type GetStatesCmd Uses

type GetStatesCmd struct {
    // contains filtered or unexported fields
}

GetStatesCmd is the command to get states.

func (*GetStatesCmd) Initialize Uses

func (c *GetStatesCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*GetStatesCmd) ModifyContext Uses

func (c *GetStatesCmd) ModifyContext(ctx context.Context) context.Context

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 (*GetStatesCmd) Run Uses

func (c *GetStatesCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to get state.

type GetSwitchesCmd Uses

type GetSwitchesCmd struct {
    // contains filtered or unexported fields
}

GetSwitchesCmd is the command to get switches.

func (*GetSwitchesCmd) Initialize Uses

func (c *GetSwitchesCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*GetSwitchesCmd) ModifyContext Uses

func (c *GetSwitchesCmd) ModifyContext(ctx context.Context) context.Context

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 (*GetSwitchesCmd) Run Uses

func (c *GetSwitchesCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to get switches.

type GetVLANsCmd Uses

type GetVLANsCmd struct {
    // contains filtered or unexported fields
}

GetVLANsCmd is the command to get VLANs.

func (*GetVLANsCmd) Initialize Uses

func (c *GetVLANsCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*GetVLANsCmd) ModifyContext Uses

func (c *GetVLANsCmd) ModifyContext(ctx context.Context) context.Context

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 (*GetVLANsCmd) Run Uses

func (c *GetVLANsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to get VLANs.

type GetVMSlotsCmd Uses

type GetVMSlotsCmd struct {
    // contains filtered or unexported fields
}

GetVMSlotsCmd is the command to get available VM slots.

func (*GetVMSlotsCmd) Initialize Uses

func (c *GetVMSlotsCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*GetVMSlotsCmd) ModifyContext Uses

func (c *GetVMSlotsCmd) ModifyContext(ctx context.Context) context.Context

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 (*GetVMSlotsCmd) Run Uses

func (c *GetVMSlotsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to get available VM slots.

type GetVMsCmd Uses

type GetVMsCmd struct {
    // contains filtered or unexported fields
}

GetVMsCmd is the command to get VMs.

func (*GetVMsCmd) Initialize Uses

func (c *GetVMsCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*GetVMsCmd) ModifyContext Uses

func (c *GetVMsCmd) ModifyContext(ctx context.Context) context.Context

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 (*GetVMsCmd) Run Uses

func (c *GetVMsCmd) Run(app subcommands.Application, args []string, env subcommands.Env) int

Run runs the command to get VMs.

type Parameters Uses

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 Uses

type RenameMachineCmd struct {
    // contains filtered or unexported fields
}

RenameMachineCmd is the command to rename a machine.

func (*RenameMachineCmd) Initialize Uses

func (c *RenameMachineCmd) Initialize(params *Parameters)

Initialize initializes the commandBase instance, registering common flags.

func (*RenameMachineCmd) ModifyContext Uses

func (c *RenameMachineCmd) ModifyContext(ctx context.Context) context.Context

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 (*RenameMachineCmd) Run Uses

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 2018-12-17. Refresh now. Tools for package owners.