vmware-archive / vcd-cli

Command Line Interface for VMware vCloud Director
https://vmware.github.io/vcd-cli
Other
163 stars 104 forks source link

vcd vm list still not implented #270

Open daydrim opened 5 years ago

daydrim commented 5 years ago

function in vm.py: def list_vms(ctx): still returns: raise Exception('not implemented')

Expected behavior: Funtion returns list of all vms in the vDC

coffeejoshua commented 5 years ago

Right now I am working around this with vcd search vm. Should this be the same output?

swerveshot commented 4 years ago

I'm amazed vcd search vm returns data @coffeejoshua. When I execute it, vcd only reports not found as output.

When I use a VM name (exact or wildcard) an extra argument error message is displayed.

vcd search vm my-vm
Usage: vcd search [OPTIONS] [resource-type]
Try "vcd search -h" for help.

Error: Got unexpected extra argument (my-vm)

Not having the ability to list VMs is a great annoyance. I hope this will get fixed soon.

cnolick commented 4 years ago

2 years... this problem still not resolve...

whoamiUNIX commented 2 years ago

Any update?

Dentrax commented 1 year ago

As an end-user, just installed vcd-cli first time to list VMs and hit this issue. $ vcd vm list was my first command.

Any updates on this? How can I list VMs in simple manner? If I can not list VMs this way, I think the only way is to use web dashboard. It would be great to prioritize this issue.

cc @pacogomez @kkkothari

zinderic commented 5 months ago

Just went through a similar experience. Initially I thought I could just vcd vapp list but not all VMs I have are in a vApp. Eventually I managed to workaround not having vcd vm list like that:

vcd search vm -f 'isVAppTemplate==false'

This lists all VM objects that are not vApp templates. Looks like -f accepts multiple filters so one can have something like that too:

vcd search vm -f 'numberOfCpus=gt=0;isVAppTemplate==false'

which also filters just those with more than 0 CPUs which are again practically all. I hope this will be useful to whoever else comes to this issue. Note that when you get some output from this you can use the names of the columns as filters in case you need to craft something a bit more special for your use case.