Merge "Migrate to nova api version 2.1"
This commit is contained in:
commit
e1a6c072a1
@ -40,7 +40,7 @@ from heat.engine import constraints
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
NOVACLIENT_VERSION = "2"
|
||||
NOVA_API_VERSION = "2.1"
|
||||
CLIENT_NAME = 'nova'
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ class NovaClientPlugin(client_plugin.ClientPlugin):
|
||||
endpoint_type = self._get_client_option(CLIENT_NAME, 'endpoint_type')
|
||||
management_url = self.url_for(service_type=self.COMPUTE,
|
||||
endpoint_type=endpoint_type)
|
||||
extensions = nc.discover_extensions(NOVACLIENT_VERSION)
|
||||
extensions = nc.discover_extensions(NOVA_API_VERSION)
|
||||
|
||||
args = {
|
||||
'project_id': self.context.tenant_id,
|
||||
@ -82,7 +82,7 @@ class NovaClientPlugin(client_plugin.ClientPlugin):
|
||||
'insecure': self._get_client_option(CLIENT_NAME, 'insecure')
|
||||
}
|
||||
|
||||
client = nc.Client(NOVACLIENT_VERSION, **args)
|
||||
client = nc.Client(NOVA_API_VERSION, **args)
|
||||
|
||||
client.client.set_management_url(management_url)
|
||||
|
||||
|
@ -49,7 +49,7 @@ class NovaClientPluginTest(NovaClientPluginTestCase):
|
||||
ext_mock = self.patchobject(nc, 'discover_extensions')
|
||||
plugin = context.clients.client_plugin('nova')
|
||||
client = plugin.client()
|
||||
ext_mock.assert_called_once_with('2')
|
||||
ext_mock.assert_called_once_with('2.1')
|
||||
self.assertIsNotNone(client.servers)
|
||||
|
||||
def test_get_ip(self):
|
||||
|
@ -24,9 +24,9 @@ from six.moves.urllib import parse as urlparse
|
||||
from heat.tests import fakes
|
||||
|
||||
|
||||
NOVACLIENT_VERSION = "2"
|
||||
NOVA_API_VERSION = "2.1"
|
||||
|
||||
Client = base_client.Client(NOVACLIENT_VERSION).__class__
|
||||
Client = base_client.Client(NOVA_API_VERSION).__class__
|
||||
|
||||
|
||||
def fake_exception(status_code=404, message=None, details=None):
|
||||
|
@ -64,7 +64,7 @@ class ClientManager(object):
|
||||
|
||||
CINDERCLIENT_VERSION = '2'
|
||||
HEATCLIENT_VERSION = '1'
|
||||
NOVACLIENT_VERSION = '2'
|
||||
NOVA_API_VERSION = '2.1'
|
||||
CEILOMETER_VERSION = '2'
|
||||
|
||||
def __init__(self, conf):
|
||||
@ -142,7 +142,7 @@ class ClientManager(object):
|
||||
|
||||
# Create our default Nova client to use in testing
|
||||
return nova_client.Client(
|
||||
self.NOVACLIENT_VERSION,
|
||||
self.NOVA_API_VERSION,
|
||||
*client_args,
|
||||
service_type='compute',
|
||||
endpoint_type='publicURL',
|
||||
|
Loading…
Reference in New Issue
Block a user