Fix novaclient connect

Now,the project can't be compiled because of
the wrong import of novaclient.

Change-Id: Icc68b97f630d4afc99790b4ca555447b88d44c76
This commit is contained in:
wangxiyuan 2015-04-29 09:58:48 +08:00
parent f1a8fb44b9
commit 449267025d
2 changed files with 5 additions and 4 deletions

View File

@ -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'],

View File

@ -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'). \