diff --git a/rsdns/client/dns_client.py b/rsdns/client/dns_client.py index 07878241fc..2042744893 100644 --- a/rsdns/client/dns_client.py +++ b/rsdns/client/dns_client.py @@ -30,7 +30,7 @@ except ImportError: from novaclient.client import HTTPClient -from novaclient.v1_1.client import Client +from novaclient.v2.client import Client LOG = logging.getLogger('rsdns.client.dns_client') diff --git a/trove/common/remote.py b/trove/common/remote.py index 08e29f4c35..8f516b26a4 100644 --- a/trove/common/remote.py +++ b/trove/common/remote.py @@ -22,7 +22,7 @@ from trove.common.strategies.cluster import strategy from cinderclient.v2 import client as CinderClient from heatclient.v1 import client as HeatClient from keystoneclient.service_catalog import ServiceCatalog -from novaclient.v1_1.client import Client +from novaclient.v2.client import Client from swiftclient.client import Connection CONF = cfg.CONF diff --git a/trove/instance/models.py b/trove/instance/models.py index 36ee49c1ff..d1d0a0ae8d 100644 --- a/trove/instance/models.py +++ b/trove/instance/models.py @@ -67,7 +67,7 @@ def load_server(context, instance_id, server_id): :type context: trove.common.context.TroveContext :type instance_id: unicode :type server_id: unicode - :rtype: novaclient.v1_1.servers.Server + :rtype: novaclient.v2.servers.Server """ client = create_nova_client(context) try: @@ -539,7 +539,7 @@ class BaseInstance(SimpleInstance): instance at it exists in the db :type context: trove.common.context.TroveContext :type db_info: trove.instance.models.DBInstance - :type server: novaclient.v1_1.servers.Server + :type server: novaclient.v2.servers.Server :typdatastore_statusus: trove.instance.models.InstanceServiceStatus """ super(BaseInstance, self).__init__(context, db_info, datastore_status) diff --git a/trove/tests/api/instances_resize.py b/trove/tests/api/instances_resize.py index f672064afb..7d6115aa7f 100644 --- a/trove/tests/api/instances_resize.py +++ b/trove/tests/api/instances_resize.py @@ -19,7 +19,7 @@ from testtools import TestCase from proboscis import test from novaclient.exceptions import BadRequest -from novaclient.v1_1.servers import Server +from novaclient.v2.servers import Server from oslo.messaging._drivers.common import RPCException from trove.common.exception import PollTimeOut diff --git a/trove/tests/api/mgmt/instances_actions.py b/trove/tests/api/mgmt/instances_actions.py index 8f12efba80..334e420fe9 100644 --- a/trove/tests/api/mgmt/instances_actions.py +++ b/trove/tests/api/mgmt/instances_actions.py @@ -25,7 +25,7 @@ from trove.tests.util import create_dbaas_client from trove.tests.util import test_config from trove.tests.util.users import Requirements -from novaclient.v1_1.servers import Server +from novaclient.v2.servers import Server from proboscis import test from proboscis import before_class diff --git a/trove/tests/config.py b/trove/tests/config.py index 209836d632..b5722fd77f 100644 --- a/trove/tests/config.py +++ b/trove/tests/config.py @@ -69,7 +69,7 @@ class TestConfig(object): 'trove_auth_url': "http://localhost:5000/v2.0/tokens", 'dbaas_url': "http://localhost:8775/v1.0/dbaas", 'version_url': "http://localhost:8775/", - 'nova_url': "http://localhost:8774/v1.1", + 'nova_url': "http://localhost:8774/v2", 'dbaas_datastore': "mysql", 'dbaas_datastore_id': "a00000a0-00a0-0a00-00a0-000a000000aa", 'dbaas_datastore_name_no_versions': "Test_Datastore_1", diff --git a/trove/tests/unittests/mgmt/test_models.py b/trove/tests/unittests/mgmt/test_models.py index 136f10393d..5ce79a87fe 100644 --- a/trove/tests/unittests/mgmt/test_models.py +++ b/trove/tests/unittests/mgmt/test_models.py @@ -18,9 +18,9 @@ from mock import MagicMock, patch, ANY from testtools import TestCase from testtools.matchers import Equals, Is, Not -from novaclient.v1_1 import Client -from novaclient.v1_1.flavors import FlavorManager, Flavor -from novaclient.v1_1.servers import Server, ServerManager +from novaclient.v2 import Client +from novaclient.v2.flavors import FlavorManager, Flavor +from novaclient.v2.servers import Server, ServerManager from oslo.config import cfg from trove.backup.models import Backup from trove.common.context import TroveContext diff --git a/trove/tests/unittests/taskmanager/test_models.py b/trove/tests/unittests/taskmanager/test_models.py index cf3157e22d..bcdb1ea8a3 100644 --- a/trove/tests/unittests/taskmanager/test_models.py +++ b/trove/tests/unittests/taskmanager/test_models.py @@ -18,8 +18,8 @@ from mock import Mock, MagicMock, patch from testtools.matchers import Equals, Is from cinderclient import exceptions as cinder_exceptions from novaclient import exceptions as nova_exceptions -import novaclient.v1_1.servers -import novaclient.v1_1.flavors +import novaclient.v2.servers +import novaclient.v2.flavors import cinderclient.v2.client as cinderclient from oslo.utils import timeutils import trove.backup.models @@ -533,27 +533,27 @@ class BuiltInstanceTasksTest(testtools.TestCase): self.instance_task._guest = MagicMock(spec=trove.guestagent.api.API) self.instance_task._nova_client = MagicMock( - spec=novaclient.v1_1.Client) + spec=novaclient.v2.Client) self.stub_server_mgr = MagicMock( - spec=novaclient.v1_1.servers.ServerManager) + spec=novaclient.v2.servers.ServerManager) self.stub_running_server = MagicMock( - spec=novaclient.v1_1.servers.Server) + spec=novaclient.v2.servers.Server) self.stub_running_server.status = 'ACTIVE' self.stub_running_server.flavor = {'id': 6, 'ram': 512} self.stub_verifying_server = MagicMock( - spec=novaclient.v1_1.servers.Server) + spec=novaclient.v2.servers.Server) self.stub_verifying_server.status = 'VERIFY_RESIZE' self.stub_verifying_server.flavor = {'id': 8, 'ram': 768} self.stub_server_mgr.get = MagicMock( return_value=self.stub_verifying_server) self.instance_task._nova_client.servers = self.stub_server_mgr stub_flavor_manager = MagicMock( - spec=novaclient.v1_1.flavors.FlavorManager) + spec=novaclient.v2.flavors.FlavorManager) self.instance_task._nova_client.flavors = stub_flavor_manager - nova_flavor = novaclient.v1_1.flavors.Flavor(stub_flavor_manager, - self.new_flavor, - True) + nova_flavor = novaclient.v2.flavors.Flavor(stub_flavor_manager, + self.new_flavor, + True) stub_flavor_manager.get = MagicMock(return_value=nova_flavor) answers = (status for status in diff --git a/trove/tests/util/__init__.py b/trove/tests/util/__init__.py index 6d93f8e5af..baf48131f2 100644 --- a/trove/tests/util/__init__.py +++ b/trove/tests/util/__init__.py @@ -166,7 +166,7 @@ def create_nova_client(user, service_type=None): if test_config.nova_client is None: raise SkipTest("No nova_client info specified in the Test Config " "so this test will be skipped.") - from novaclient.v1_1.client import Client + from novaclient.v2.client import Client if not service_type: service_type = test_config.nova_client['nova_service_type'] openstack = Client(user.auth_user, user.auth_key,