cli

package
v0.0.0-...-35d8de9 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package cli contains the Machine Database command-line client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

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

func New

func New(params *Parameters) *cli.Application

New returns the Machine Database command-line application.

func StateFlag

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

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

func StateSliceFlag

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

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

Types

type AddDRACCmd

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

AddDRACCmd is the command to add a DRAC.

func (*AddDRACCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*AddDRACCmd) ModifyContext

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

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

Run runs the command to add a DRAC.

type AddMachineCmd

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

AddMachineCmd is the command to add a machine.

func (*AddMachineCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*AddMachineCmd) ModifyContext

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

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

Run runs the command to add a machine.

type AddNICCmd

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

AddNICCmd is the command to add a network interface.

func (*AddNICCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*AddNICCmd) ModifyContext

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

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

Run runs the command to add a network interface.

type AddPhysicalHostCmd

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

AddPhysicalHostCmd is the command to add a physical host.

func (*AddPhysicalHostCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*AddPhysicalHostCmd) ModifyContext

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

Run runs the command to add a physical host.

type AddVMCmd

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

AddVMCmd is the command to add a VM.

func (*AddVMCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*AddVMCmd) ModifyContext

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

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

Run runs the command to add a VM.

type CommonFlags

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

CommonFlags contains common flags for all commands.

func (*CommonFlags) Register

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

Register registers common flags with the given flag.FlagSet.

type DeleteHostCmd

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

DeleteHostCmd is the command to delete a host.

func (*DeleteHostCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*DeleteHostCmd) ModifyContext

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

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

Run runs the command to delete a host.

type DeleteMachineCmd

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

DeleteMachineCmd is the command to delete a machine.

func (*DeleteMachineCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*DeleteMachineCmd) ModifyContext

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

Run runs the command to delete a machine.

type DeleteNICCmd

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

DeleteNICCmd is the command to delete a network interface.

func (*DeleteNICCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*DeleteNICCmd) ModifyContext

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

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

Run runs the command to delete a network interface.

type EditDRACCmd

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

EditDRACCmd is the command to edit a DRAC.

func (*EditDRACCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*EditDRACCmd) ModifyContext

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

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

Run runs the command to edit a DRAC.

type EditMachineCmd

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

EditMachineCmd is the command to edit a machine.

func (*EditMachineCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*EditMachineCmd) ModifyContext

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

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

Run runs the command to edit a machine.

type EditNICCmd

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

EditNICCmd is the command to edit a network interface.

func (*EditNICCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*EditNICCmd) ModifyContext

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

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

Run runs the command to edit a network interface.

type EditPhysicalHostCmd

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

EditPhysicalHostCmd is the command to edit a physical host.

func (*EditPhysicalHostCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*EditPhysicalHostCmd) ModifyContext

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

Run runs the command to edit a physical host.

type EditVMCmd

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

EditVMCmd is the command to edit a VM.

func (*EditVMCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*EditVMCmd) ModifyContext

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

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

Run runs the command to edit a physical host.

type GetDRACsCmd

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

GetDRACsCmd is the command to get DRACs.

func (*GetDRACsCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*GetDRACsCmd) ModifyContext

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

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

Run runs the command to get DRACs.

type GetDatacentersCmd

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

GetDatacentersCmd is the command to get datacenters.

func (*GetDatacentersCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*GetDatacentersCmd) ModifyContext

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

Run runs the command to get datacenters.

type GetIPsCmd

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

GetIPsCmd is the command to get free IP addresses.

func (*GetIPsCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*GetIPsCmd) ModifyContext

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

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

Run runs the command to get free IP addresses.

type GetKVMsCmd

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

GetKVMsCmd is the command to get KVMs.

func (*GetKVMsCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*GetKVMsCmd) ModifyContext

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

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

Run runs the command to get KVMs.

type GetMachinesCmd

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

GetMachinesCmd is the command to get machines.

func (*GetMachinesCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*GetMachinesCmd) ModifyContext

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

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

Run runs the command to get machines.

type GetNICsCmd

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

GetNICsCmd is the command to get network interfaces.

func (*GetNICsCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*GetNICsCmd) ModifyContext

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

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

Run runs the command to get network interfaces.

type GetOSesCmd

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

GetOSesCmd is the command to get operating systems.

func (*GetOSesCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*GetOSesCmd) ModifyContext

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

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

Run runs the command to get operating systems.

type GetPhysicalHostsCmd

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

GetPhysicalHostsCmd is the command to get physical hosts.

func (*GetPhysicalHostsCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*GetPhysicalHostsCmd) ModifyContext

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

Run runs the command to get physical hosts.

type GetPlatformsCmd

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

GetPlatformsCmd is the command to get platforms.

func (*GetPlatformsCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*GetPlatformsCmd) ModifyContext

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

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

Run runs the command to get platforms.

type GetRacksCmd

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

GetRacksCmd is the command to get racks.

func (*GetRacksCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*GetRacksCmd) ModifyContext

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

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

Run runs the command to get racks.

type GetStatesCmd

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

GetStatesCmd is the command to get states.

func (*GetStatesCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*GetStatesCmd) ModifyContext

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

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

Run runs the command to get state.

type GetSwitchesCmd

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

GetSwitchesCmd is the command to get switches.

func (*GetSwitchesCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*GetSwitchesCmd) ModifyContext

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

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

Run runs the command to get switches.

type GetVLANsCmd

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

GetVLANsCmd is the command to get VLANs.

func (*GetVLANsCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*GetVLANsCmd) ModifyContext

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

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

Run runs the command to get VLANs.

type GetVMSlotsCmd

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

GetVMSlotsCmd is the command to get available VM slots.

func (*GetVMSlotsCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*GetVMSlotsCmd) ModifyContext

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

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

Run runs the command to get available VM slots.

type GetVMsCmd

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

GetVMsCmd is the command to get VMs.

func (*GetVMsCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*GetVMsCmd) ModifyContext

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

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

Run runs the command to get VMs.

type Parameters

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

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

RenameMachineCmd is the command to rename a machine.

func (*RenameMachineCmd) Initialize

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

Initialize initializes the commandBase instance, registering common flags.

func (*RenameMachineCmd) ModifyContext

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

Run runs the command to rename a machine.

Jump to

Keyboard shortcuts

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