+ @staticmethod
+ def remove_cloud(name):
+ """Deletes an existing cloud from the Kamaki configuration file"""
+ config.remove_option('cloud', name)
+ config.write()
+
+ @staticmethod
+ def create_account(url, token):
+ """Given a valid (URL, tokens) pair this method returns an Astakos
+ client instance
+ """
+ client = AstakosClient(url, token)
+ try:
+ client.authenticate()
+ except ClientError:
+ return None
+
+ return client
+
+ @staticmethod
+ def get_account(cloud_name):
+ """Given a saved cloud name this method returns an Astakos client
+ instance
+ """
+ cloud = config.get('cloud', cloud_name)
+ assert cloud, "cloud: `%s' does not exist" % cloud_name
+ assert 'url' in cloud, "url attr is missing in %s" % cloud_name
+ assert 'token' in cloud, "token attr is missing in %s" % cloud_name
+
+ return Kamaki.create_account(cloud['url'], cloud['token'])
+
+ def __init__(self, account, output):
+ """Create a Kamaki instance"""