diff --git a/neat/globals/manager.py b/neat/globals/manager.py index 40ff6c5..f183aea 100644 --- a/neat/globals/manager.py +++ b/neat/globals/manager.py @@ -74,7 +74,7 @@ from neat.contracts_extra import * import bottle from hashlib import sha1 import novaclient -from novaclient.v2 import client +from novaclient import client import time import subprocess @@ -270,7 +270,8 @@ def init_state(config): """ return {'previous_time': 0, 'db': init_db(config['sql_connection']), - 'nova': client.Client(config['os_admin_user'], + 'nova': client.Client(2, + config['os_admin_user'], config['os_admin_password'], config['os_admin_tenant_name'], config['os_auth_url'], diff --git a/tests/globals/test_manager.py b/tests/globals/test_manager.py index 27d26bc..90e1d8a 100644 --- a/tests/globals/test_manager.py +++ b/tests/globals/test_manager.py @@ -17,7 +17,7 @@ from pyqcy import * import bottle from hashlib import sha1 -from novaclient.v2 import client +from novaclient import client import time import subprocess @@ -195,7 +195,7 @@ class GlobalManager(TestCase): 'compute_hosts': 'host1, host2'} expect(manager).init_db('db').and_return(db).once() expect(client).Client( - 'user', 'password', 'tenant', 'url', + 2, 'user', 'password', 'tenant', 'url', service_type='compute'). \ and_return(nova).once() expect(common).parse_compute_hosts('host1, host2'). \