Skip to content

Commit bde7a13

Browse files
authored
Merge pull request #1203 from AkihiroSuda/ls-show-vmtype
limactl list: add "VMTYPE" column
2 parents d9f7d93 + 72dc082 commit bde7a13

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cmd/limactl/disk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func diskListAction(cmd *cobra.Command, args []string) error {
135135
}
136136

137137
w := tabwriter.NewWriter(cmd.OutOrStdout(), 4, 8, 4, ' ', 0)
138-
fmt.Fprintln(w, "NAME\tSIZE\tDIR\tIN USE BY")
138+
fmt.Fprintln(w, "NAME\tSIZE\tDIR\tIN-USE-BY")
139139

140140
if len(allDisks) == 0 {
141141
logrus.Warn("No disk found. Run `limactl disk create DISK --size SIZE` to create a disk.")

cmd/limactl/list.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func listAction(cmd *cobra.Command, args []string) error {
165165
}
166166

167167
w := tabwriter.NewWriter(cmd.OutOrStdout(), 4, 8, 4, ' ', 0)
168-
fmt.Fprintln(w, "NAME\tSTATUS\tSSH\tARCH\tCPUS\tMEMORY\tDISK\tDIR")
168+
fmt.Fprintln(w, "NAME\tSTATUS\tSSH\tVMTYPE\tARCH\tCPUS\tMEMORY\tDISK\tDIR")
169169

170170
if len(allinstances) == 0 {
171171
logrus.Warn("No instance found. Run `limactl start` to create an instance.")
@@ -180,10 +180,11 @@ func listAction(cmd *cobra.Command, args []string) error {
180180
if len(inst.Errors) > 0 {
181181
logrus.WithField("errors", inst.Errors).Warnf("instance %q has errors", instName)
182182
}
183-
fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%d\t%s\t%s\t%s\n",
183+
fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%d\t%s\t%s\t%s\n",
184184
inst.Name,
185185
inst.Status,
186186
fmt.Sprintf("127.0.0.1:%d", inst.SSHLocalPort),
187+
inst.VMType,
187188
inst.Arch,
188189
inst.CPUs,
189190
units.BytesSize(float64(inst.Memory)),

0 commit comments

Comments
 (0)