ignite icon indicating copy to clipboard operation
ignite copied to clipboard

Support formatting VM lists

Open robertojrojas opened this issue 6 years ago • 3 comments
trafficstars

It would be nice if one could run a command like:

ignite ps --format "table {{.ID}}\t{{.Mounts}}"

Similar to Docker's ps:

docker ps --format "table {{.ID}}\t{{.Mounts}}"

robertojrojas avatar Jul 19 '19 19:07 robertojrojas

+1 This would a great feature to support for all of our informational commands.

In the meantime here's a jq solution that might be helpful for somebody:

ignite ps -q | xargs -n1 ignite inspect vm \
  | jq -r '"\(.metadata.name) \n\t \(.status.ipAddresses) \t \(.spec.kernel.cmdLine)"'
rough-water 
	 ["172.18.1.70"] 	 console=ttyS0 reboot=k panic=1 pci=off ip=dhcp
dry-snowflake 
	 ["172.18.1.68"] 	 console=ttyS0 reboot=k panic=1 pci=off ip=dhcp
empty-resonance 
	 ["172.18.1.67"] 	 console=ttyS0 reboot=k panic=1 pci=off ip=dhcp
bitter-cherry 
	 ["172.18.1.69"] 	 console=ttyS0 reboot=k panic=1 pci=off ip=dhcp
ctrd_1 
	 ["172.18.1.63"] 	 console=ttyS0 reboot=k panic=1 pci=off ip=dhcp
hidden-dream 
	 ["172.18.1.66"] 	 console=ttyS0 reboot=k panic=1 pci=off ip=dhcp
small-wind 
	 ["172.18.1.65"] 	 console=ttyS0 reboot=k panic=1 pci=off ip=dhcp
crimson-river 
	 ["172.18.1.71"] 	 console=ttyS0 reboot=k panic=1 pci=off ip=dhcp
docker-cni 
	 ["172.18.1.64"] 	 console=ttyS0 reboot=k panic=1 pci=off ip=dhcp

stealthybox avatar Sep 19 '19 04:09 stealthybox

Also applies to ignite vm ls

stealthybox avatar Sep 25 '19 23:09 stealthybox

Hello, I am a student from the University of Texas at Austin. I wanted to know if a group of my colleagues and I could work on this issue as part of an assignment for my virtualization class. Thanks in advance!

Nit123 avatar Sep 14 '20 23:09 Nit123