Update glanceclient imports and version req
* Update references to glanceclient.v1.client.Client to glanceclient.Client * Update references to glanceclient.common.exceptions to glanceclient.exc * Update version requirement of python-glanceclient to v0.2.X Change-Id: I9478f16dd7d31edebaa88de244b542eb05cb24fa
This commit is contained in:
parent
6b3545ef70
commit
c28ce3b798
@ -26,7 +26,7 @@ import urlparse
|
|||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
from glanceclient.v1 import client as glance_client
|
import glanceclient as glance_client
|
||||||
|
|
||||||
from horizon.api.base import url_for
|
from horizon.api.base import url_for
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ def glanceclient(request):
|
|||||||
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
|
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
|
||||||
LOG.debug('glanceclient connection created using token "%s" and url "%s"'
|
LOG.debug('glanceclient connection created using token "%s" and url "%s"'
|
||||||
% (request.user.token.id, url))
|
% (request.user.token.id, url))
|
||||||
return glance_client.Client(endpoint=url, token=request.user.token.id,
|
return glance_client.Client('1', url, token=request.user.token.id,
|
||||||
insecure=insecure)
|
insecure=insecure)
|
||||||
|
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ class Server(APIResourceWrapper):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def image_name(self):
|
def image_name(self):
|
||||||
from glanceclient.common import exceptions as glance_exceptions
|
import glanceclient.exc as glance_exceptions
|
||||||
from horizon.api import glance
|
from horizon.api import glance
|
||||||
try:
|
try:
|
||||||
image = glance.image_get(self.request, self.image['id'])
|
image = glance.image_get(self.request, self.image['id'])
|
||||||
|
@ -32,7 +32,7 @@ from django.core.handlers import wsgi
|
|||||||
from django.test.client import RequestFactory
|
from django.test.client import RequestFactory
|
||||||
from django.utils import unittest
|
from django.utils import unittest
|
||||||
|
|
||||||
from glanceclient.v1 import client as glance_client
|
import glanceclient
|
||||||
from keystoneclient.v2_0 import client as keystone_client
|
from keystoneclient.v2_0 import client as keystone_client
|
||||||
from novaclient.v1_1 import client as nova_client
|
from novaclient.v1_1 import client as nova_client
|
||||||
from selenium.webdriver.firefox.webdriver import WebDriver
|
from selenium.webdriver.firefox.webdriver import WebDriver
|
||||||
@ -316,8 +316,8 @@ class APITestCase(TestCase):
|
|||||||
|
|
||||||
def stub_glanceclient(self):
|
def stub_glanceclient(self):
|
||||||
if not hasattr(self, "glanceclient"):
|
if not hasattr(self, "glanceclient"):
|
||||||
self.mox.StubOutWithMock(glance_client, 'Client')
|
self.mox.StubOutWithMock(glanceclient, 'Client')
|
||||||
self.glanceclient = self.mox.CreateMock(glance_client.Client)
|
self.glanceclient = self.mox.CreateMock(glanceclient.Client)
|
||||||
return self.glanceclient
|
return self.glanceclient
|
||||||
|
|
||||||
def stub_swiftclient(self, expected_calls=1):
|
def stub_swiftclient(self, expected_calls=1):
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from glanceclient.common import exceptions as glance_exceptions
|
import glanceclient.exc as glance_exceptions
|
||||||
from keystoneclient import exceptions as keystone_exceptions
|
from keystoneclient import exceptions as keystone_exceptions
|
||||||
from novaclient import exceptions as nova_exceptions
|
from novaclient import exceptions as nova_exceptions
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ Django>=1.4
|
|||||||
django_compressor
|
django_compressor
|
||||||
django_openstack_auth
|
django_openstack_auth
|
||||||
python-cloudfiles
|
python-cloudfiles
|
||||||
python-glanceclient
|
python-glanceclient>=0.2,<0.3
|
||||||
python-keystoneclient
|
python-keystoneclient
|
||||||
python-novaclient
|
python-novaclient
|
||||||
pytz
|
pytz
|
||||||
|
Loading…
x
Reference in New Issue
Block a user