Gandi/gandi.cli — pull request #34 by kalou (2014-10-06 10:31:49+00:00)
Title: core: enhance kernel list

we are currently basing kernel list on image.list()
some issues:
1. the list contains duplicates since we extract each kernel from all
images
2. if the kernel is not included on an image, we will not be able to set
it
example:
for grub, we currently don't have any image based on grub, so I had
to insert an empty image with the grub kernel in order to make it
work
3. we should check if the datacenter has the needed kernel before
setting it

this patch proposes to base the kernel list on the first datacenter
since for now, we may consider that all datacenter have the same
kernels.
This solution is not ideal but it avoids to insert an empty image with
the grub kernel which could confuse users.

A second patch should check the kernel depending on the disk's
datacenter.

Signed-off-by: William Dauchy