本文整理汇总了Golang中github.com/vmware/govmomi/govc/flags.NewSearchFlag函数的典型用法代码示例。如果您正苦于以下问题:Golang NewSearchFlag函数的具体用法?Golang NewSearchFlag怎么用?Golang NewSearchFlag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewSearchFlag函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: Register
func (cmd *unregister) Register(ctx context.Context, f *flag.FlagSet) {
cmd.ClientFlag, ctx = flags.NewClientFlag(ctx)
cmd.ClientFlag.Register(ctx, f)
cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines)
cmd.SearchFlag.Register(ctx, f)
}
开发者ID:vmware,项目名称:vic,代码行数:7,代码来源:unregister.go
示例2: Register
func (cmd *markasvm) Register(ctx context.Context, f *flag.FlagSet) {
cmd.ClientFlag, ctx = flags.NewClientFlag(ctx)
cmd.ClientFlag.Register(ctx, f)
cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines)
cmd.SearchFlag.Register(ctx, f)
cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx)
cmd.HostSystemFlag.Register(ctx, f)
}
开发者ID:vmware,项目名称:vic,代码行数:8,代码来源:markasvm.go
示例3: Register
func (cmd *info) Register(f *flag.FlagSet) {
cmd.SearchFlag = flags.NewSearchFlag(flags.SearchVirtualMachines)
f.BoolVar(&cmd.WaitForIP, "waitip", false, "Wait for VM to acquire IP address")
f.BoolVar(&cmd.General, "g", true, "Show general summary")
f.BoolVar(&cmd.ExtraConfig, "e", false, "Show ExtraConfig")
f.BoolVar(&cmd.Resources, "r", false, "Show resource summary")
}
开发者ID:runner-mei,项目名称:govmomi,代码行数:8,代码来源:info.go
示例4: Register
func (cmd *vnc) Register(f *flag.FlagSet) {
cmd.SearchFlag = flags.NewSearchFlag(flags.SearchVirtualMachines)
f.BoolVar(&cmd.Enable, "enable", false, "Enable VNC")
f.BoolVar(&cmd.Disable, "disable", false, "Disable VNC")
f.IntVar(&cmd.Port, "port", -1, "VNC port (-1 for auto-select)")
f.Var(&cmd.PortRange, "port-range", "VNC port auto-select range")
f.StringVar(&cmd.Password, "password", "", "VNC password")
}
开发者ID:MerlinDMC,项目名称:machine,代码行数:9,代码来源:vnc.go
示例5: Register
func (cmd *ip) Register(ctx context.Context, f *flag.FlagSet) {
cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
cmd.OutputFlag.Register(ctx, f)
cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines)
cmd.SearchFlag.Register(ctx, f)
f.BoolVar(&cmd.esx, "esxcli", false, "Use esxcli instead of guest tools")
}
开发者ID:robvanmieghem,项目名称:machine,代码行数:9,代码来源:ip.go
示例6: Register
func (cmd *power) Register(ctx context.Context, f *flag.FlagSet) {
cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualApps)
cmd.SearchFlag.Register(ctx, f)
f.BoolVar(&cmd.On, "on", false, "Power on")
f.BoolVar(&cmd.Off, "off", false, "Power off")
f.BoolVar(&cmd.Suspend, "suspend", false, "Power suspend")
f.BoolVar(&cmd.Force, "force", false, "Force (If force is false, the shutdown order in the vApp is executed. If force is true, all virtual machines are powered-off (regardless of shutdown order))")
}
开发者ID:vmware,项目名称:vic,代码行数:9,代码来源:power.go
示例7: Register
func (cmd *power) Register(f *flag.FlagSet) {
cmd.SearchFlag = flags.NewSearchFlag(flags.SearchVirtualMachines)
f.BoolVar(&cmd.On, "on", false, "Power on")
f.BoolVar(&cmd.Off, "off", false, "Power off")
f.BoolVar(&cmd.Reset, "reset", false, "Power reset")
f.BoolVar(&cmd.Suspend, "suspend", false, "Power suspend")
f.BoolVar(&cmd.Reboot, "r", false, "Reboot guest")
f.BoolVar(&cmd.Shutdown, "s", false, "Shutdown guest")
f.BoolVar(&cmd.Force, "force", false, "Force (ignore state error and hard shutdown/reboot if tools unavailable)")
}
开发者ID:hickeng,项目名称:govmomi,代码行数:11,代码来源:power.go
示例8: Register
func (cmd *massSnapshotCreate) Register(ctx context.Context, f *flag.FlagSet) {
//cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx)
//cmd.VirtualMachineFlag.Register(ctx, f)
cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines)
cmd.SearchFlag.Register(ctx, f)
f.BoolVar(&cmd.memory, "m", true, "Include memory state")
f.BoolVar(&cmd.quiesce, "q", false, "Quiesce guest file system")
f.StringVar(&cmd.description, "d", "", "Snapshot description")
}
开发者ID:frapposelli,项目名称:govmomi,代码行数:11,代码来源:create.go
示例9: Register
func (cmd *ip) Register(ctx context.Context, f *flag.FlagSet) {
cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
cmd.OutputFlag.Register(ctx, f)
cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines)
cmd.SearchFlag.Register(ctx, f)
f.BoolVar(&cmd.esx, "esxcli", false, "Use esxcli instead of guest tools")
f.BoolVar(&cmd.all, "a", false, "Wait for an IP address on all NICs")
f.BoolVar(&cmd.v4, "v4", false, "Only report IPv4 addresses")
}
开发者ID:hmahmood,项目名称:govmomi,代码行数:11,代码来源:ip.go
示例10: Register
func (cmd *migrate) Register(ctx context.Context, f *flag.FlagSet) {
cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines)
cmd.SearchFlag.Register(ctx, f)
cmd.ResourcePoolFlag, ctx = flags.NewResourcePoolFlag(ctx)
cmd.ResourcePoolFlag.Register(ctx, f)
cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx)
cmd.HostSystemFlag.Register(ctx, f)
f.StringVar((*string)(&cmd.priority), "priority", string(types.VirtualMachineMovePriorityDefaultPriority), "The task priority")
f.StringVar((*string)(&cmd.state), "state", "", "If specified, the VM migrates only if its state matches")
}
开发者ID:frapposelli,项目名称:govmomi,代码行数:13,代码来源:migrate.go
示例11: Register
func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) {
cmd.ClientFlag, ctx = flags.NewClientFlag(ctx)
cmd.ClientFlag.Register(ctx, f)
cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
cmd.OutputFlag.Register(ctx, f)
cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines)
cmd.SearchFlag.Register(ctx, f)
f.BoolVar(&cmd.WaitForIP, "waitip", false, "Wait for VM to acquire IP address")
f.BoolVar(&cmd.General, "g", true, "Show general summary")
f.BoolVar(&cmd.ExtraConfig, "e", false, "Show ExtraConfig")
f.BoolVar(&cmd.Resources, "r", false, "Show resource summary")
}
开发者ID:hmahmood,项目名称:govmomi,代码行数:15,代码来源:info.go
示例12: Register
func (cmd *info) Register(f *flag.FlagSet) {
cmd.SearchFlag = flags.NewSearchFlag(flags.SearchVirtualMachines)
f.BoolVar(&cmd.WaitForIP, "waitip", false, "Wait for VM to acquire IP address")
}
开发者ID:EricYT,项目名称:govmomi,代码行数:5,代码来源:info.go
示例13: Register
func (cmd *destroy) Register(f *flag.FlagSet) {
cmd.SearchFlag = flags.NewSearchFlag(flags.SearchVirtualMachines)
}
开发者ID:MerlinDMC,项目名称:machine,代码行数:3,代码来源:destroy.go
示例14: Register
func (cmd *ip) Register(f *flag.FlagSet) {
cmd.SearchFlag = flags.NewSearchFlag(flags.SearchVirtualMachines)
f.BoolVar(&cmd.esx, "esxcli", false, "Use esxcli instead of guest tools")
}
开发者ID:MerlinDMC,项目名称:machine,代码行数:4,代码来源:ip.go
注:本文中的github.com/vmware/govmomi/govc/flags.NewSearchFlag函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论