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.
|
# limitations under the License.
|
||||||
|
|
||||||
for lib in \
|
for lib in \
|
||||||
python-novaclient \
|
|
||||||
python-keystoneclient \
|
python-keystoneclient \
|
||||||
python-ironicclient \
|
python-ironicclient \
|
||||||
os-client-config \
|
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
|
keystoneauth1>=2.21.0 # Apache-2.0
|
||||||
netifaces>=0.10.4 # MIT
|
netifaces>=0.10.4 # MIT
|
||||||
python-novaclient>=9.0.0 # Apache-2.0
|
|
||||||
python-keystoneclient>=3.8.0 # Apache-2.0
|
python-keystoneclient>=3.8.0 # Apache-2.0
|
||||||
python-ironicclient>=1.11.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 = _log.setup_logging('keystoneauth')
|
||||||
log.addHandler(logging.StreamHandler())
|
log.addHandler(logging.StreamHandler())
|
||||||
log.setLevel(log_level)
|
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
|
# We only want extra shade HTTP tracing in http debug mode
|
||||||
log = _log.setup_logging('shade.http')
|
log = _log.setup_logging('shade.http')
|
||||||
log.setLevel(log_level)
|
log.setLevel(log_level)
|
||||||
|
@ -65,8 +65,7 @@ class LegacyClientFactoryMixin(object):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def nova_client(self):
|
def nova_client(self):
|
||||||
return self._create_legacy_client(
|
return self._create_legacy_client('nova', 'compute', version='2.0')
|
||||||
'nova', 'compute', version='2.0', deprecated=False)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def glance_client(self):
|
def glance_client(self):
|
||||||
|
@ -25,7 +25,6 @@ import sys
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
from decorator import decorator
|
from decorator import decorator
|
||||||
from novaclient import exceptions as nova_exc
|
|
||||||
|
|
||||||
from shade import _log
|
from shade import _log
|
||||||
from shade import exc
|
from shade import exc
|
||||||
@ -445,10 +444,6 @@ def shade_exceptions(error_message=None):
|
|||||||
yield
|
yield
|
||||||
except exc.OpenStackCloudException:
|
except exc.OpenStackCloudException:
|
||||||
raise
|
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:
|
except Exception as e:
|
||||||
if error_message is None:
|
if error_message is None:
|
||||||
error_message = str(e)
|
error_message = str(e)
|
||||||
|
@ -76,12 +76,6 @@ class TestCase(testtools.TestCase):
|
|||||||
logger.addHandler(handler)
|
logger.addHandler(handler)
|
||||||
logger.propagate = False
|
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):
|
def assertEqual(self, first, second, *args, **kwargs):
|
||||||
'''Munch aware wrapper'''
|
'''Munch aware wrapper'''
|
||||||
if isinstance(first, munch.Munch):
|
if isinstance(first, munch.Munch):
|
||||||
|
@ -31,8 +31,8 @@ class TestCreateServer(base.RequestsMockTestCase):
|
|||||||
|
|
||||||
def test_create_server_with_get_exception(self):
|
def test_create_server_with_get_exception(self):
|
||||||
"""
|
"""
|
||||||
Test that an exception when attempting to get the server instance via
|
Test that a bad status code when attempting to get the server instance
|
||||||
the novaclient raises an exception in create_server.
|
raises an exception in create_server.
|
||||||
"""
|
"""
|
||||||
build_server = fakes.make_fake_server('1234', '', 'BUILD')
|
build_server = fakes.make_fake_server('1234', '', 'BUILD')
|
||||||
self.register_uris([
|
self.register_uris([
|
||||||
@ -173,7 +173,7 @@ class TestCreateServer(base.RequestsMockTestCase):
|
|||||||
def test_create_server_no_wait(self):
|
def test_create_server_no_wait(self):
|
||||||
"""
|
"""
|
||||||
Test that create_server with no wait and no exception in the
|
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')
|
fake_server = fakes.make_fake_server('1234', '', 'BUILD')
|
||||||
self.register_uris([
|
self.register_uris([
|
||||||
|
@ -41,7 +41,7 @@ class TestRebuildServer(base.RequestsMockTestCase):
|
|||||||
|
|
||||||
def test_rebuild_server_rebuild_exception(self):
|
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.
|
rebuild_server.
|
||||||
"""
|
"""
|
||||||
self.register_uris([
|
self.register_uris([
|
||||||
@ -120,7 +120,7 @@ class TestRebuildServer(base.RequestsMockTestCase):
|
|||||||
def test_rebuild_server_no_wait(self):
|
def test_rebuild_server_no_wait(self):
|
||||||
"""
|
"""
|
||||||
Test that rebuild_server with no wait and no exception in the
|
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([
|
self.register_uris([
|
||||||
dict(method='POST',
|
dict(method='POST',
|
||||||
|
@ -34,10 +34,6 @@ class TestServerSetMetadata(base.RequestsMockTestCase):
|
|||||||
self.server_id, self.server_name)
|
self.server_id, self.server_name)
|
||||||
|
|
||||||
def test_server_set_metadata_with_exception(self):
|
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([
|
self.register_uris([
|
||||||
dict(method='GET',
|
dict(method='GET',
|
||||||
uri=self.get_mock_url(
|
uri=self.get_mock_url(
|
||||||
|
@ -36,7 +36,7 @@ class TestUpdateServer(base.RequestsMockTestCase):
|
|||||||
|
|
||||||
def test_update_server_with_update_exception(self):
|
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.
|
update_server.
|
||||||
"""
|
"""
|
||||||
self.register_uris([
|
self.register_uris([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user