Handle automatic dry_runs in GandiModule.call.

Passing a dry_run=True param to GandiModule.call will now automatically call
the dry_run if a call fail, to have more imformations on why it failed, and
will display it.
Use dry_run=True attribute for vhost.create.
Merge branch 'stable'
Update RPM specfile for 0.9 version

- Use RPM macros
- Build python module using setuptools
- Reorganize %files section and dependencies
- Buildroot declaration compliant with Fedora/CentOS policy
Update PEP references to www.python.org

Update from legacy.python.org to www.python.org (which currently
redirects to legacy.python.org :p)

legacy.python.org will probably exist for a while, but the actual PEP
URLs should stay www IMHO
Merge pull request #32 from ptitoliv/wip/rpm

Update RPM specfile for 0.9 version
Merge pull request #33 from romuald/no-legacy-url

Update PEP references to www.python.org
Merge branch 'stable'
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 <william@gandi.net>
Merge branch 'stable'
Revert "we are currently basing kernel list on image.list()"

This reverts commit 3f3143b0f517abc0c8019a104620a2300948deac.
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 <william@gandi.net>
Revert "we are currently basing kernel list on image.list()"

This reverts commit 3f3143b0f517abc0c8019a104620a2300948deac.
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 <william@gandi.net>
add build dependency to requests
use requests, not httplib transport for xmlrpclib

httplib does not validate the SSL connection, leading to
potential MITM attacks on the CLI. This is even worse since
it can be mixed with well-known xmlrpc issues.

requests does validate and seems a good replacement.

Issue reported by Erik Romijn
fix sshkey parameter type

sshkey module convert_sshkey method expects a list of keys

fixes:
pb@foo:~/git$ gandi paas update --sshkey kalou tests
Usage: gandi paas update [OPTIONS] RESOURCE

Error: unknown identifier k
Merge pull request #38 from kalou/security

Validate server certificate using request as xmlrpc transport
iaas: be more verbose when logging step infos

when deleting several VM the log was describing all operation one
after another without showing which VM concerned.
I thought it was a good this to add such info.
I expanded it to all `echo` for the IAAS module.

Reviewed-by: sayoun <sayoun@gandi.net>
Signed-off-by: William Dauchy <william@gandi.net>
cli: cleaning trailing whitespaces

Signed-off-by: William Dauchy <william@gandi.net>