Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AddMachineCmd = &subcommands.Command{ UsageLine: "machine [Options...]", ShortDesc: "Add a machine(Hardware asset: ChromeBook, Bare metal server, Macbook.)", LongDesc: cmdhelp.AddMachineLongDesc, CommandRun: func() subcommands.CommandRun { c := &addMachine{} c.authFlags.Register(&c.Flags, site.DefaultAuthOptions) c.envFlags.Register(&c.Flags) c.commonFlags.Register(&c.Flags) c.Flags.StringVar(&c.newSpecsFile, "f", "", cmdhelp.MachineRegistrationFileText) c.Flags.StringVar(&c.machineName, "name", "", "the name of the machine to add") c.Flags.StringVar(&c.zoneName, "zone", "", cmdhelp.ZoneHelpText) c.Flags.StringVar(&c.rackName, "rack", "", "the rack to add the machine to") c.Flags.StringVar(&c.platform, "platform", "", "the platform of this machine") c.Flags.StringVar(&c.kvm, "kvm", "", "the name of the kvm that this machine uses") c.Flags.StringVar(&c.kvmPort, "kvm-port", "", "the port of the kvm that this machine uses") c.Flags.StringVar(&c.deploymentTicket, "ticket", "", "the deployment ticket for this machine") c.Flags.StringVar(&c.serialNumber, "serial", "", "the serial number for this machine") c.Flags.StringVar(&c.tags, "tags", "", "comma separated tags. You can only append/add new tags here.") return c }, }
AddMachineCmd add Machine to the system.
View Source
var DeleteMachineCmd = &subcommands.Command{ UsageLine: "machine {Machine Name}", ShortDesc: "Delete a machine(Hardware asset: ChromeBook, Bare metal server, Macbook.)", LongDesc: `Delete a machine(Hardware asset: ChromeBook, Bare metal server, Macbook.). Example: shivas delete machine {Machine Name} Deletes the given machine and deletes the nics and drac associated with this machine.`, CommandRun: func() subcommands.CommandRun { c := &deleteMachine{} c.authFlags.Register(&c.Flags, site.DefaultAuthOptions) c.envFlags.Register(&c.Flags) c.commonFlags.Register(&c.Flags) return c }, }
DeleteMachineCmd delete Machine by given name.
View Source
var GetMachineCmd = &subcommands.Command{ UsageLine: "machine ...", ShortDesc: "Get machine details by filters", LongDesc: `Get machine details by filters. Example: shivas get machine {name1} {name2} shivas get machine -platform platform1 -state serving -state needs_repair -zone atl97 Gets the machine and prints the output in the user-specified format.`, CommandRun: func() subcommands.CommandRun { c := &getMachine{} c.authFlags.Register(&c.Flags, site.DefaultAuthOptions) c.envFlags.Register(&c.Flags) c.commonFlags.Register(&c.Flags) c.outputFlags.Register(&c.Flags) c.Flags.IntVar(&c.pageSize, "n", 0, cmdhelp.ListPageSizeDesc) c.Flags.BoolVar(&c.keysOnly, "keys", false, cmdhelp.KeysOnlyText) c.Flags.Var(flag.StringSlice(&c.zones), "zone", "Name(s) of a zone to filter by. Can be specified multiple times."+cmdhelp.ZoneFilterHelpText) c.Flags.Var(flag.StringSlice(&c.racks), "rack", "Name(s) of a rack to filter by. Can be specified multiple times.") c.Flags.Var(flag.StringSlice(&c.kvms), "kvm", "Name(s) of a kvm to filter by. Can be specified multiple times.") c.Flags.Var(flag.StringSlice(&c.kvmPorts), "kvm-port", "Name(s) of a kvm port to filter by. Can be specified multiple times.") c.Flags.Var(flag.StringSlice(&c.platforms), "platform", "Name(s) of a platform to filter by. Can be specified multiple times.") c.Flags.Var(flag.StringSlice(&c.tags), "tag", "Name(s) of a tag to filter by. Can be specified multiple times.") c.Flags.Var(flag.StringSlice(&c.states), "state", "Name(s) of a state to filter by. Can be specified multiple times."+cmdhelp.StateFilterHelpText) c.Flags.Var(flag.StringSlice(&c.devicetypes), "devicetype", "Name(s) of a devicetype to filter by. Can be specified multiple times."+cmdhelp.DeviceTypeFilterHelpText) c.Flags.Var(flag.StringSlice(&c.models), "model", "Name(s) of a model to filter by. Can be specified multiple times.") c.Flags.Var(flag.StringSlice(&c.buildTargets), "target", "Name(s) of a build target to filter by. Can be specified multiple times.") c.Flags.Var(flag.StringSlice(&c.phases), "phase", "Name(s) of a phase to filter by. Can be specified multiple times.") return c }, }
GetMachineCmd get machine by given name.
View Source
var RenameMachineCmd = &subcommands.Command{ UsageLine: "machine ...", ShortDesc: "Rename machine with new name", LongDesc: `Rename machine with new name. Example: shivas rename machine -name {oldName} -new-name {newName} Renames the machine and prints the output in the user-specified format.`, CommandRun: func() subcommands.CommandRun { c := &renameMachine{} c.authFlags.Register(&c.Flags, site.DefaultAuthOptions) c.envFlags.Register(&c.Flags) c.commonFlags.Register(&c.Flags) c.outputFlags.Register(&c.Flags) c.Flags.StringVar(&c.name, "name", "", "the name of the machine to rename") c.Flags.StringVar(&c.newName, "new-name", "", "the new name of the machine") return c }, }
RenameMachineCmd rename machine by given name.
View Source
var UpdateMachineCmd = &subcommands.Command{ UsageLine: "machine [Options...]", ShortDesc: "Update a machine(Hardware asset: ChromeBook, Bare metal server, Macbook.)", LongDesc: cmdhelp.UpdateMachineLongDesc, CommandRun: func() subcommands.CommandRun { c := &updateMachine{} c.authFlags.Register(&c.Flags, site.DefaultAuthOptions) c.envFlags.Register(&c.Flags) c.commonFlags.Register(&c.Flags) c.Flags.StringVar(&c.newSpecsFile, "f", "", cmdhelp.MachineFileText) c.Flags.BoolVar(&c.interactive, "i", false, "enable interactive mode for input") c.Flags.StringVar(&c.machineName, "name", "", "the name of the machine to update") c.Flags.StringVar(&c.zoneName, "zone", "", cmdhelp.ZoneHelpText) c.Flags.StringVar(&c.rackName, "rack", "", "the rack to add the machine to. "+cmdhelp.ClearFieldHelpText) c.Flags.StringVar(&c.platform, "platform", "", "the platform of this machine. "+cmdhelp.ClearFieldHelpText) c.Flags.StringVar(&c.kvm, "kvm", "", "the name of the kvm that this machine uses. "+cmdhelp.ClearFieldHelpText) c.Flags.StringVar(&c.kvmPort, "kvm-port", "", "the port of the kvm that this machine uses"+cmdhelp.ClearFieldHelpText) c.Flags.StringVar(&c.deploymentTicket, "ticket", "", "the deployment ticket for this machine. "+cmdhelp.ClearFieldHelpText) c.Flags.StringVar(&c.serialNumber, "serial", "", "the serial number for this machine. "+cmdhelp.ClearFieldHelpText) c.Flags.StringVar(&c.tags, "tags", "", "comma separated tags. You can only append/add new tags here. "+cmdhelp.ClearFieldHelpText) c.Flags.StringVar(&c.state, "state", "", cmdhelp.StateHelp) c.Flags.StringVar(&c.description, "desc", "", "description for the machine. "+cmdhelp.ClearFieldHelpText) return c }, }
UpdateMachineCmd update Machine by given name.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.