Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AddNicCmd = &subcommands.Command{ UsageLine: "nic [Options...]", ShortDesc: "Add a nic to a machine", LongDesc: cmdhelp.AddNicLongDesc, CommandRun: func() subcommands.CommandRun { c := &addNic{} c.authFlags.Register(&c.Flags, site.DefaultAuthOptions) c.envFlags.Register(&c.Flags) c.commonFlags.Register(&c.Flags) c.Flags.StringVar(&c.newSpecsFile, "f", "", cmdhelp.NicFileText) c.Flags.BoolVar(&c.interactive, "i", false, "enable interactive mode for input") c.Flags.StringVar(&c.machineName, "machine", "", "name of the machine to associate the nic") c.Flags.StringVar(&c.nicName, "name", "", "the name of the nic to add") c.Flags.StringVar(&c.macAddress, "mac", "", "the mac address of the nic to add") c.Flags.StringVar(&c.state, "state", "", cmdhelp.StateHelp) c.Flags.StringVar(&c.switchName, "switch", "", "the name of the switch that this nic is connected to") c.Flags.StringVar(&c.switchPort, "switch-port", "", "the port of the switch that this nic is connected to") c.Flags.Var(flag.StringSlice(&c.tags), "tag", "Name(s) of tag(s). Can be specified multiple times.") return c }, }
AddNicCmd add Nic in the lab.
View Source
var DeleteNicCmd = &subcommands.Command{ UsageLine: "nic {Nic name}", ShortDesc: "Delete a nic on a machine", LongDesc: `Delete a nic on a machine. Example: shivas delete nic {Nic name} Deletes the given nic.`, CommandRun: func() subcommands.CommandRun { c := &deleteNic{} c.authFlags.Register(&c.Flags, site.DefaultAuthOptions) c.envFlags.Register(&c.Flags) return c }, }
DeleteNicCmd delete Nic by given name.
View Source
var GetNicCmd = &subcommands.Command{ UsageLine: "nic ...", ShortDesc: "Get nic details by filters", LongDesc: `Get nic details by filters. Example: shivas get nic name1 name2 shivas get nic -mac mac1 -mac mac2 shivas get nic -n 10 Gets the nic and prints the output in the user-specified format.`, CommandRun: func() subcommands.CommandRun { c := &getNic{} 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.switches), "switch", "Name(s) of a switch to filter by. Can be specified multiple times.") c.Flags.Var(flag.StringSlice(&c.switchPorts), "switch-port", "Name(s) of a switch port to filter by. Can be specified multiple times.") c.Flags.Var(flag.StringSlice(&c.macs), "mac", "Name(s) of a mac to filter by. Can be specified multiple times.") c.Flags.Var(flag.StringSlice(&c.machines), "machine", "Name(s) of a machine 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.") return c }, }
GetNicCmd get nic by given name.
View Source
var RenameNicCmd = &subcommands.Command{ UsageLine: "nic ...", ShortDesc: "Rename nic with new name", LongDesc: `Rename nic with new name. Example: shivas rename nic -name {oldName} -new-name {newName} Renames the nic and prints the output in the user-specified format.`, CommandRun: func() subcommands.CommandRun { c := &renameNic{} 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 nic to rename") c.Flags.StringVar(&c.newName, "new-name", "", "the new name of the nic") return c }, }
RenameNicCmd rename nic by given name.
View Source
var UpdateNicCmd = &subcommands.Command{ UsageLine: "nic [Options...]", ShortDesc: "Update a nic on a machine", LongDesc: cmdhelp.UpdateNicLongDesc, CommandRun: func() subcommands.CommandRun { c := &updateNic{} c.authFlags.Register(&c.Flags, site.DefaultAuthOptions) c.envFlags.Register(&c.Flags) c.commonFlags.Register(&c.Flags) c.Flags.StringVar(&c.newSpecsFile, "f", "", cmdhelp.NicFileText) c.Flags.BoolVar(&c.interactive, "i", false, "enable interactive mode for input") c.Flags.StringVar(&c.machineName, "machine", "", "name of the machine to associate the nic") c.Flags.StringVar(&c.nicName, "name", "", "the name of the nic to update") c.Flags.StringVar(&c.macAddress, "mac", "", "the mac address of the nic to add."+cmdhelp.ClearFieldHelpText) c.Flags.StringVar(&c.state, "state", "", cmdhelp.StateHelp) c.Flags.StringVar(&c.switchName, "switch", "", "the name of the switch that this nic is connected to. "+cmdhelp.ClearFieldHelpText) c.Flags.StringVar(&c.switchPort, "switch-port", "", "the port of the switch that this nic is connected to. "+cmdhelp.ClearFieldHelpText) c.Flags.Var(flag.StringSlice(&c.tags), "tag", "Name(s) of tag(s). Can be specified multiple times. "+cmdhelp.ClearFieldHelpText) return c }, }
UpdateNicCmd Update nic by given name.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.