Added provider option in cloud configuration file

The provider option will signify the provider to use. Multiple
clouds can have one provider, e.g. AWS, Eucalyptus etc.

Signed-off-by: Shashank Sahni <shredder12@gmail.com>
Added methods to dynamically import/init provider

Declared two functions in providers/__init__.py
* get_cloud_provider() loads the concerned provider's class
dynamically.
* initiate_cloud() initializes the provider class instance.

Signed-off-by: Shashank Sahni <shredder12@gmail.com>
Updated baseprovider class with four more methods

Removed release_public_ips() and added 4 new methods
* terminate_instances()
* release_public_ip()
* delete_keypair()
* delete_security_groups()

The __init__() method of BaseProvider class creates the cloud
entities - keypair name, SG name etc. using job's name instead of
an ec2_entities() as before.

Signed-off-by: Shashank Sahni <shredder12@gmail.com>
Added 4 new functions to ec2 module

Added the following functions:
* terminate_instances()
* release_public_ip()
* delete_keypair()
* delete_security_groups()

Signed-off-by: Shashank Sahni <shredder12@gmail.com>
cluster.create/delete() use abstracted provider

Updated create() and delete() in cluster.py to support the new
provider abstraction.

The cloud instance object is retrieved from current_app.cloud.

Signed-off-by: Shashank Sahni <shredder12@gmail.com>
Assigning and removing EIP before/after conf_slave

Instead of assigning public IPs to slave instances, its assigned
right before calling configure_slave and disassociated once its
done.

Signed-off-by: Shashank Sahni <shredder12@gmail.com>
Updated get_node_object to use prov. abstraction

get_node_objects() now uses cloud conn object from app context

Signed-off-by: Shashank Sahni <shredder12@gmail.com>