Remove novaclient from shade's dependencies
All calls to nova are now done via REST. This means we can remove the dependency. Only two more to go ... Change-Id: I01a0afef5986b7452fd73e04c48568ebb9817681
This commit is contained in:
parent
56524c16a8
commit
3aee4f5e6e
@ -15,7 +15,6 @@
|
||||
# limitations under the License.
|
||||
|
||||
for lib in \
|
||||
python-novaclient \
|
||||
python-keystoneclient \
|
||||
python-ironicclient \
|
||||
os-client-config \
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
upgrade:
|
||||
- All Nova interactions are done via direct REST calls.
|
||||
python-novaclient is no longer a direct dependency of
|
||||
shade.
|
@ -21,7 +21,6 @@ iso8601>=0.1.11 # MIT
|
||||
|
||||
keystoneauth1>=2.21.0 # Apache-2.0
|
||||
netifaces>=0.10.4 # MIT
|
||||
python-novaclient>=9.0.0 # Apache-2.0
|
||||
python-keystoneclient>=3.8.0 # Apache-2.0
|
||||
python-ironicclient>=1.11.0 # Apache-2.0
|
||||
|
||||
|
@ -53,11 +53,6 @@ def simple_logging(debug=False, http_debug=False):
|
||||
log = _log.setup_logging('keystoneauth')
|
||||
log.addHandler(logging.StreamHandler())
|
||||
log.setLevel(log_level)
|
||||
# Enable HTTP level tracing of novaclient
|
||||
logger = logging.getLogger('novaclient')
|
||||
log.addHandler(logging.StreamHandler())
|
||||
log.setLevel(log_level)
|
||||
logger.propagate = False
|
||||
# We only want extra shade HTTP tracing in http debug mode
|
||||
log = _log.setup_logging('shade.http')
|
||||
log.setLevel(log_level)
|
||||
|
@ -65,8 +65,7 @@ class LegacyClientFactoryMixin(object):
|
||||
|
||||
@property
|
||||
def nova_client(self):
|
||||
return self._create_legacy_client(
|
||||
'nova', 'compute', version='2.0', deprecated=False)
|
||||
return self._create_legacy_client('nova', 'compute', version='2.0')
|
||||
|
||||
@property
|
||||
def glance_client(self):
|
||||
|
@ -25,7 +25,6 @@ import sys
|
||||
import time
|
||||
|
||||
from decorator import decorator
|
||||
from novaclient import exceptions as nova_exc
|
||||
|
||||
from shade import _log
|
||||
from shade import exc
|
||||
@ -445,10 +444,6 @@ def shade_exceptions(error_message=None):
|
||||
yield
|
||||
except exc.OpenStackCloudException:
|
||||
raise
|
||||
except nova_exc.BadRequest as e:
|
||||
if error_message is None:
|
||||
error_message = str(e)
|
||||
raise exc.OpenStackCloudBadRequest(error_message)
|
||||
except Exception as e:
|
||||
if error_message is None:
|
||||
error_message = str(e)
|
||||
|
@ -76,12 +76,6 @@ class TestCase(testtools.TestCase):
|
||||
logger.addHandler(handler)
|
||||
logger.propagate = False
|
||||
|
||||
# Enable HTTP level tracing
|
||||
logger = logging.getLogger('novaclient')
|
||||
logger.setLevel(logging.DEBUG)
|
||||
logger.addHandler(handler)
|
||||
logger.propagate = False
|
||||
|
||||
def assertEqual(self, first, second, *args, **kwargs):
|
||||
'''Munch aware wrapper'''
|
||||
if isinstance(first, munch.Munch):
|
||||
|
@ -31,8 +31,8 @@ class TestCreateServer(base.RequestsMockTestCase):
|
||||
|
||||
def test_create_server_with_get_exception(self):
|
||||
"""
|
||||
Test that an exception when attempting to get the server instance via
|
||||
the novaclient raises an exception in create_server.
|
||||
Test that a bad status code when attempting to get the server instance
|
||||
raises an exception in create_server.
|
||||
"""
|
||||
build_server = fakes.make_fake_server('1234', '', 'BUILD')
|
||||
self.register_uris([
|
||||
@ -173,7 +173,7 @@ class TestCreateServer(base.RequestsMockTestCase):
|
||||
def test_create_server_no_wait(self):
|
||||
"""
|
||||
Test that create_server with no wait and no exception in the
|
||||
novaclient create call returns the server instance.
|
||||
create call returns the server instance.
|
||||
"""
|
||||
fake_server = fakes.make_fake_server('1234', '', 'BUILD')
|
||||
self.register_uris([
|
||||
|
@ -41,7 +41,7 @@ class TestRebuildServer(base.RequestsMockTestCase):
|
||||
|
||||
def test_rebuild_server_rebuild_exception(self):
|
||||
"""
|
||||
Test that an exception in the novaclient rebuild raises an exception in
|
||||
Test that an exception in the rebuild raises an exception in
|
||||
rebuild_server.
|
||||
"""
|
||||
self.register_uris([
|
||||
@ -120,7 +120,7 @@ class TestRebuildServer(base.RequestsMockTestCase):
|
||||
def test_rebuild_server_no_wait(self):
|
||||
"""
|
||||
Test that rebuild_server with no wait and no exception in the
|
||||
novaclient rebuild call returns the server instance.
|
||||
rebuild call returns the server instance.
|
||||
"""
|
||||
self.register_uris([
|
||||
dict(method='POST',
|
||||
|
@ -34,10 +34,6 @@ class TestServerSetMetadata(base.RequestsMockTestCase):
|
||||
self.server_id, self.server_name)
|
||||
|
||||
def test_server_set_metadata_with_exception(self):
|
||||
"""
|
||||
Test that a generic exception in the novaclient delete_meta raises
|
||||
an exception in delete_server_metadata.
|
||||
"""
|
||||
self.register_uris([
|
||||
dict(method='GET',
|
||||
uri=self.get_mock_url(
|
||||
|
@ -36,7 +36,7 @@ class TestUpdateServer(base.RequestsMockTestCase):
|
||||
|
||||
def test_update_server_with_update_exception(self):
|
||||
"""
|
||||
Test that an exception in the novaclient update raises an exception in
|
||||
Test that an exception in the update raises an exception in
|
||||
update_server.
|
||||
"""
|
||||
self.register_uris([
|
||||
|
Loading…
Reference in New Issue
Block a user