@@ -21,6 +21,7 @@ import (
21
21
"github.com/abiosoft/colima/environment/vm/lima"
22
22
"github.com/abiosoft/colima/environment/vm/lima/limautil"
23
23
"github.com/abiosoft/colima/util"
24
+ "github.com/docker/go-units"
24
25
log "github.com/sirupsen/logrus"
25
26
)
26
27
@@ -30,7 +31,7 @@ type App interface {
30
31
Stop (force bool ) error
31
32
Delete () error
32
33
SSH (layer bool , args ... string ) error
33
- Status () error
34
+ Status (extended bool ) error
34
35
Version () error
35
36
Runtime () (string , error )
36
37
Kubernetes () (environment.Container , error )
@@ -301,7 +302,7 @@ func (c colimaApp) SSH(layer bool, args ...string) error {
301
302
return cli .CommandInteractive ("ssh" , args ... ).Run ()
302
303
}
303
304
304
- func (c colimaApp ) Status () error {
305
+ func (c colimaApp ) Status (extended bool ) error {
305
306
ctx := context .Background ()
306
307
if ! c .guest .Running (ctx ) {
307
308
return fmt .Errorf ("%s is not running" , config .CurrentProfile ().DisplayName )
@@ -340,6 +341,17 @@ func (c colimaApp) Status() error {
340
341
log .Println ("kubernetes: enabled" )
341
342
}
342
343
344
+ // additional details
345
+ if extended {
346
+ log .Println ("networkDriver:" , conf .Network .Driver )
347
+
348
+ if inst , err := limautil .Instance (); err == nil {
349
+ log .Println ("cpu:" , inst .CPU )
350
+ log .Println ("mem:" , units .BytesSize (float64 (inst .Memory )))
351
+ log .Println ("disk:" , units .BytesSize (float64 (inst .Disk )))
352
+ }
353
+ }
354
+
343
355
return nil
344
356
}
345
357
0 commit comments