예제 #1
0
파일: add.go 프로젝트: vmware/vic
func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx)
	cmd.FolderFlag.Register(ctx, f)

	cmd.HostConnectFlag, ctx = flags.NewHostConnectFlag(ctx)
	cmd.HostConnectFlag.Register(ctx, f)

	f.BoolVar(&cmd.connect, "connect", true, "Immediately connect to host")
}
예제 #2
0
func (cmd *reconnect) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx)
	cmd.HostSystemFlag.Register(ctx, f)

	cmd.HostConnectFlag, ctx = flags.NewHostConnectFlag(ctx)
	cmd.HostConnectFlag.Register(ctx, f)

	cmd.HostSystemReconnectSpec.SyncState = types.NewBool(false)
	f.BoolVar(cmd.HostSystemReconnectSpec.SyncState, "sync-state", false, "Sync state")
}
예제 #3
0
파일: add.go 프로젝트: fdawg4l/govmomi
func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.ClientFlag, ctx = flags.NewClientFlag(ctx)
	cmd.ClientFlag.Register(ctx, f)

	cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx)
	cmd.DatacenterFlag.Register(ctx, f)

	cmd.HostConnectFlag, ctx = flags.NewHostConnectFlag(ctx)
	cmd.HostConnectFlag.Register(ctx, f)

	f.StringVar(&cmd.parent, "parent", "", "Path to folder to add the host to")
	f.BoolVar(&cmd.connect, "connect", true, "Immediately connect to host")
}
예제 #4
0
파일: add.go 프로젝트: vmware/vic
func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx)
	cmd.DatacenterFlag.Register(ctx, f)

	cmd.HostConnectFlag, ctx = flags.NewHostConnectFlag(ctx)
	cmd.HostConnectFlag.Register(ctx, f)

	f.StringVar(&cmd.cluster, "cluster", "*", "Path to cluster")

	f.StringVar(&cmd.license, "license", "", "Assign license key")

	f.BoolVar(&cmd.connect, "connect", true, "Immediately connect to host")
}