Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/cmd/vm_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (r *runners) InitVMCreate(parent *cobra.Command) *cobra.Command {
cmd.Flags().StringVar(&r.args.createClusterTTL, "ttl", "", "VM TTL (duration, max 48h)")
cmd.Flags().DurationVar(&r.args.createClusterWaitDuration, "wait", time.Second*0, "Wait duration for VM to be ready (leave empty to not wait)")
cmd.Flags().StringVar(&r.args.createClusterInstanceType, "instance-type", "", "The type of instance to use (e.g. r1.medium)")
cmd.Flags().StringArrayVar(&r.args.createClusterNodeGroups, "nodegroup", []string{}, "Node group to create (name=?,instance-type=?,nodes=?,disk=? format, can be specified multiple times). For each nodegroup, one of the following flags must be specified: name, instance-type, nodes or disk.")
cmd.Flags().StringArrayVar(&r.args.createClusterNodeGroups, "group", []string{}, "Group to create (name=?,instance-type=?,nodes=?,disk=? format, can be specified multiple times). For each group, one of the following flags must be specified: name, instance-type, nodes or disk.")

cmd.Flags().StringArrayVar(&r.args.createClusterTags, "tag", []string{}, "Tag to apply to the VM (key=value format, can be specified multiple times)")

Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/vm_group_ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func (r *runners) InitVMGroupList(parent *cobra.Command) *cobra.Command {
Short: "List groups for a vm",
Long: `List groups for a vm`,
Args: cobra.ExactArgs(1),
RunE: r.listVMNodeGroups,
RunE: r.listVMGroups,
ValidArgsFunction: r.completeVMIDs,
}
parent.AddCommand(cmd)
Expand All @@ -23,7 +23,7 @@ func (r *runners) InitVMGroupList(parent *cobra.Command) *cobra.Command {
return cmd
}

func (r *runners) listVMNodeGroups(cmd *cobra.Command, args []string) error {
func (r *runners) listVMGroups(cmd *cobra.Command, args []string) error {
if len(args) < 1 {
return errors.New("vm id is required")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/kotsclient/vm_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type CreateVMRequest struct {
NodeCount int `json:"node_count"`
DiskGiB int64 `json:"disk_gib"`
TTL string `json:"ttl"`
NodeGroups []VMNodeGroup `json:"node_groups"`
NodeGroups []VMNodeGroup `json:"groups"`
InstanceType string `json:"instance_type"`
Tags []types.Tag `json:"tags"`
}
Expand Down
9 changes: 9 additions & 0 deletions pkg/types/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ type NodeGroup struct {

TotalCredits int64 `json:"total_credits,omitempty"` // this is only present after the cluster is stopped
MinutesBilled int64 `json:"minutes_billed"`

Nodes []*Node `json:"nodes"`
}

type Node struct {
Index int `json:"node_index"`

SSHPort int64 `json:"ssh_port,omitempty"`
SSHEndpoint string `json:"ssh_endpoint,omitempty"`
}

type ClusterDistributionStatus struct {
Expand Down
Loading