~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to debian/patches/upstream/0001-fix-bug-where-nova-ignores-glance-host-in-imageref.patch

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-05-24 13:12:53 UTC
  • mfrom: (1.1.55)
  • Revision ID: package-import@ubuntu.com-20120524131253-ommql08fg1en06ut
Tags: 2012.2~f1-0ubuntu1
* New upstream release.
* Prepare for quantal:
  - Dropped debian/patches/upstream/0006-Use-project_id-in-ec2.cloud._format_image.patch
  - Dropped debian/patches/upstream/0005-Populate-image-properties-with-project_id-again.patch
  - Dropped debian/patches/upstream/0004-Fixed-bug-962840-added-a-test-case.patch
  - Dropped debian/patches/upstream/0003-Allow-unprivileged-RADOS-users-to-access-rbd-volumes.patch
  - Dropped debian/patches/upstream/0002-Stop-libvirt-test-from-deleting-instances-dir.patch
  - Dropped debian/patches/upstream/0001-fix-bug-where-nova-ignores-glance-host-in-imageref.patch 
  - Dropped debian/patches/0001-fix-useexisting-deprecation-warnings.patch
* debian/control: Add python-keystone as a dependency. (LP: #907197)
* debian/patches/kombu_tests_timeout.patch: Refreshed.
* debian/nova.conf, debian/nova-common.postinst: Convert to new ini
  file configuration
* debian/patches/nova-manage_flagfile_location.patch: Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From 155c7b2a8f05e75a9b08764bb4f9404c26036f99 Mon Sep 17 00:00:00 2001
2
 
From: Mike Lundy <mike@pistoncloud.com>
3
 
Date: Wed, 4 Apr 2012 11:38:54 -0700
4
 
Subject: [PATCH 1/5] fix bug where nova ignores glance host in imageref
5
 
 
6
 
This is related to bug 883328.
7
 
 
8
 
Change-Id: Iadd1aec8d1bda3bd75bd0ab7f6797b643626db90
9
 
---
10
 
 nova/image/glance.py            |    8 ++++----
11
 
 nova/tests/image/test_glance.py |    3 ++-
12
 
 2 files changed, 6 insertions(+), 5 deletions(-)
13
 
 
14
 
diff --git a/nova/image/glance.py b/nova/image/glance.py
15
 
index a5f9e68..97a60cb 100644
16
 
--- a/nova/image/glance.py
17
 
+++ b/nova/image/glance.py
18
 
@@ -111,13 +111,13 @@ def get_glance_client(context, image_href):
19
 
 
20
 
     else:
21
 
         try:
22
 
-            (image_id, host, port) = _parse_image_ref(image_href)
23
 
+            (image_id, glance_host, glance_port) = _parse_image_ref(image_href)
24
 
+            glance_client = _create_glance_client(context,
25
 
+                                                  glance_host,
26
 
+                                                  glance_port)
27
 
         except ValueError:
28
 
             raise exception.InvalidImageRef(image_href=image_href)
29
 
 
30
 
-        glance_client = _create_glance_client(context,
31
 
-                                              glance_host,
32
 
-                                              glance_port)
33
 
         return (glance_client, image_id)
34
 
 
35
 
 
36
 
diff --git a/nova/tests/image/test_glance.py b/nova/tests/image/test_glance.py
37
 
index bc5969a..8fa136a 100644
38
 
--- a/nova/tests/image/test_glance.py
39
 
+++ b/nova/tests/image/test_glance.py
40
 
@@ -578,6 +578,7 @@ class TestGlanceImageService(test.TestCase):
41
 
     def test_glance_client_image_ref(self):
42
 
         fixture = self._make_fixture(name='test image')
43
 
         image_id = self.service.create(self.context, fixture)['id']
44
 
-        image_url = 'http://foo/%s' % image_id
45
 
+        image_url = 'http://something-less-likely/%s' % image_id
46
 
         client, same_id = glance.get_glance_client(self.context, image_url)
47
 
         self.assertEquals(same_id, image_id)
48
 
+        self.assertEquals(client.host, 'something-less-likely')
49
 
1.7.9.1
50