#9 Implement the 'instance list' handler to list existing instances
Closed: Fixed None Opened 9 years ago by roshi.

What's the best way to have a list of instances that testCloud has launched? Could be as simple as a prefix to the virsh domain.


This ticket had assigned some Differential requests:
D379

Do we want to have this list all existing instances or all running instances? I suppose both would be an option with a --all flag for list that behaves like virsh list --all.

If we want to list running VMs, how do we separate the testcloud-started VMs from other vms in qemu:///system? I can think of two reasonable ways to do this:
# use a prefix for all VM names (so f22rc3cloud would be named tc-f22rc3cloud as far as libvirt is concerned - assuming a tc- prefix)
# since the dirs in instances/ are the vm's name, filter the list of running vms to only include those which have instance dirs

1) is more idempotant and more difficult to confuse testcloud VMs with non-testcloud VMs as long as we're somewhat smart about the prefix we use. 2) makes fewer differences between what the user enters (instance name, in this case) and what the system has stored.

I'm leaning a bit towards 2) because I don't think there'll be much effort difference between the two options and it doesn't require any data mapping/translation. Thoughts?

I think 2 is probably the better option.

Metadata Update from @roshi:
- Issue marked as depending on: #1

6 years ago

Login to comment on this ticket.

Metadata