kvm

package
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 AddKVMCmd = &subcommands.Command{
	UsageLine: "kvm [Options...]",
	ShortDesc: "Add a kvm to a rack",
	LongDesc:  cmdhelp.AddKVMLongDesc,
	CommandRun: func() subcommands.CommandRun {
		c := &addKVM{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.envFlags.Register(&c.Flags)
		c.commonFlags.Register(&c.Flags)

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

		c.Flags.StringVar(&c.rackName, "rack", "", "name of the rack to associate the kvm")
		c.Flags.StringVar(&c.kvmName, "name", "", "the name of the kvm to add")
		c.Flags.StringVar(&c.macAddress, "mac", "", "the mac address of the kvm to add")
		c.Flags.StringVar(&c.platform, "platform", "", "the platform of the kvm to add")
		c.Flags.StringVar(&c.tags, "tags", "", "comma separated tags. You can only append/add new tags here.")
		return c
	},
}

AddKVMCmd add KVM in the lab.

View Source
var DeleteKVMCmd = &subcommands.Command{
	UsageLine: "kvm {KVM Name}",
	ShortDesc: "Delete a kvm on a rack",
	LongDesc: `Delete a kvm on a rack.

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

DeleteKVMCmd delete KVM by given name.

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

Example:

shivas get kvm {name1} {name2}

shivas get kvm -platform platform1 -zone mtv97 -rack rack1 -rack rack2 -rack rack3

Gets the kvm and prints the output in the user-specified format.`,
	CommandRun: func() subcommands.CommandRun {
		c := &getKVM{}
		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.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.macs), "mac", "Name(s) of a mac 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)
		return c
	},
}

GetKVMCmd get kvm by given name.

View Source
var UpdateKVMCmd = &subcommands.Command{
	UsageLine: "kvm [Options...]",
	ShortDesc: "Update a kvm on a rack",
	LongDesc:  cmdhelp.UpdateKVMLongDesc,
	CommandRun: func() subcommands.CommandRun {
		c := &updateKVM{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.envFlags.Register(&c.Flags)
		c.commonFlags.Register(&c.Flags)

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

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

		c.Flags.StringVar(&c.rackName, "rack", "", "name of the rack to associate the kvm.")
		c.Flags.StringVar(&c.kvmName, "name", "", "the name of the kvm to update")
		c.Flags.StringVar(&c.macAddress, "mac", "", "the mac address of the kvm to update"+cmdhelp.ClearFieldHelpText)
		c.Flags.StringVar(&c.platform, "platform", "", "the platform of the kvm to update. "+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.description, "desc", "", "description for the kvm. "+cmdhelp.ClearFieldHelpText)
		c.Flags.StringVar(&c.state, "state", "", cmdhelp.StateHelp)

		return c
	},
}

UpdateKVMCmd Update kvm 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