Support mounting freebsd ufs filesystems
[snf-image-creator] / image_creator / kamaki_wrapper.py
index 5963990..3f809d0 100644 (file)
@@ -39,8 +39,6 @@ from kamaki.clients.image import ImageClient
 from kamaki.clients.pithos import PithosClient
 from kamaki.clients.astakos import AstakosClient
 
-from image_creator.util import FatalError
-
 
 class Kamaki(object):
 
@@ -48,19 +46,22 @@ class Kamaki(object):
 
     @staticmethod
     def get_token():
+        """Get the saved token"""
         config = Config()
         return config.get('global', 'token')
 
     @staticmethod
     def save_token(token):
+        """Save this token to the configuration file"""
         config = Config()
         config.set('global', 'token', token)
         config.write()
 
     @staticmethod
     def get_account(token):
+        """Return the account corresponding to this token"""
         config = Config()
-        astakos = AstakosClient(config.get('astakos', 'url'), token)
+        astakos = AstakosClient(config.get('user', 'url'), token)
         try:
             account = astakos.info()
         except ClientError as e:
@@ -71,12 +72,13 @@ class Kamaki(object):
         return account
 
     def __init__(self, account, output):
+        """Create a Kamaki instance"""
         self.account = account
         self.out = output
 
         config = Config()
 
-        pithos_url = config.get('store', 'url')
+        pithos_url = config.get('file', 'url')
         self.pithos_client = PithosClient(
             pithos_url, self.account['auth_token'], self.account['uuid'],
             self.CONTAINER)