drac

package
Version: v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddDracCmd = &subcommands.Command{
	UsageLine: "drac [Options...]",
	ShortDesc: "Add a drac to a machine",
	LongDesc:  cmdhelp.AddDracLongDesc,
	CommandRun: func() subcommands.CommandRun {
		c := &addDrac{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.envFlags.Register(&c.Flags)
		c.commonFlags.Register(&c.Flags)

		c.Flags.StringVar(&c.newSpecsFile, "f", "", cmdhelp.DracFileText)
		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 drac")
		c.Flags.StringVar(&c.dracName, "name", "", "the name of the drac to add")
		c.Flags.StringVar(&c.macAddress, "mac", "", "the mac address of the drac to add")
		c.Flags.StringVar(&c.switchName, "switch", "", "the name of the switch that this drac is connected to")
		c.Flags.StringVar(&c.switchPort, "switch-port", "", "the port of the switch that this drac is connected to")
		c.Flags.StringVar(&c.tags, "tags", "", "comma separated tags. You can only append/add new tags here.")
		return c
	},
}

AddDracCmd add Drac in the lab.

View Source
var DeleteDracCmd = &subcommands.Command{
	UsageLine: "drac {Drac Name}",
	ShortDesc: "Delete a drac on a machine",
	LongDesc: `Delete a drac on a machine.

Example:
shivas delete drac {Drac Name}
Deletes the given drac.`,
	CommandRun: func() subcommands.CommandRun {
		c := &deleteDrac{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.envFlags.Register(&c.Flags)
		return c
	},
}

DeleteDracCmd delete Drac by given name.

View Source
var GetDracCmd = &subcommands.Command{
	UsageLine: "drac ...",
	ShortDesc: "Get drac details by filters",
	LongDesc: `Get drac details by filters.

Example:

shivas get drac {name1} {name2}

shivas get drac -zone atl97 -rack rack1 -rack rack2

Gets the drac and prints the output in the user-specified format.`,
	CommandRun: func() subcommands.CommandRun {
		c := &getDrac{}
		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.machines), "machine", "Name(s) of a machine 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.tags), "tag", "Name(s) of a tag to filter by. Can be specified multiple times.")
		return c
	},
}

GetDracCmd get drac by given name.

View Source
var UpdateDracCmd = &subcommands.Command{
	UsageLine: "drac [Options...]",
	ShortDesc: "Update a drac on a machine",
	LongDesc:  cmdhelp.UpdateDracLongDesc,
	CommandRun: func() subcommands.CommandRun {
		c := &updateDrac{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.envFlags.Register(&c.Flags)
		c.commonFlags.Register(&c.Flags)

		c.Flags.StringVar(&c.newSpecsFile, "f", "", cmdhelp.DracFileText)
		c.Flags.BoolVar(&c.interactive, "i", false, "enable interactive mode for input")

		c.Flags.StringVar(&c.vlanName, "vlan", "", "the vlan to assign the drac to")
		c.Flags.BoolVar(&c.deleteVlan, "delete-vlan", false, "if deleting the ip assignment for the drac")
		c.Flags.StringVar(&c.ip, "ip", "", "the ip to assign the drac to")

		c.Flags.StringVar(&c.machineName, "machine", "", "name of the machine to update the association of the drac to a different machine")
		c.Flags.StringVar(&c.dracName, "name", "", "name of the drac to update")
		c.Flags.StringVar(&c.macAddress, "mac", "", "the mac address of the drac to add."+cmdhelp.ClearFieldHelpText)
		c.Flags.StringVar(&c.switchName, "switch", "", "the name of the switch that this drac is connected to. "+cmdhelp.ClearFieldHelpText)
		c.Flags.StringVar(&c.switchPort, "switch-port", "", "the port of the switch that this drac is connected to. "+cmdhelp.ClearFieldHelpText)
		c.Flags.StringVar(&c.tags, "tags", "", "comma separated tags. You can only append/add new tags here. "+cmdhelp.ClearFieldHelpText)
		return c
	},
}

UpdateDracCmd Update drac by given name.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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