]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove generate_glance_url
authorgit-harry <git-harry@live.co.uk>
Wed, 24 Jun 2015 08:46:45 +0000 (09:46 +0100)
committergit-harry <git-harry@live.co.uk>
Wed, 24 Jun 2015 08:46:45 +0000 (09:46 +0100)
The function generate_glance_url is part of the inital fork from nova.
It is only called once and that is by a unit test designed to test the
function.

This commit removes generate_glance_url and its associated test because
they are not used by cinder.

Change-Id: I02a3632d258b7555284e66368eaf17af3b4b0a2f

cinder/tests/unit/test_utils.py
cinder/utils.py

index 38c4d5c4687575c93e4fbf23924d340562a5b9bc..b8a21f3f83ce1f19a64362971412ab46899ed65b 100644 (file)
@@ -324,12 +324,6 @@ class GenericUtilsTestCase(test.TestCase):
         self.assertTrue(utils.is_valid_boolstr(0))
         self.assertTrue(utils.is_valid_boolstr('0'))
 
-    def test_generate_glance_url(self):
-        generated_url = utils.generate_glance_url()
-        actual_url = "http://%s:%d" % (CONF.glance_host,
-                                       CONF.glance_port)
-        self.assertEqual(generated_url, actual_url)
-
     @mock.patch('os.path.join', side_effect=lambda x, y: '/'.join((x, y)))
     def test_make_dev_path(self, mock_join):
         self.assertEqual('/dev/xvda', utils.make_dev_path('xvda'))
index b204a62e882a1753752d7476d52c60386acb536f..d7bd9ae28fc25d6d2a41bc5900b7b1e1ccf57510 100644 (file)
@@ -435,13 +435,6 @@ def monkey_patch():
                         decorator("%s.%s" % (module, key), func))
 
 
-def generate_glance_url():
-    """Generate the URL to glance."""
-    # TODO(jk0): This will eventually need to take SSL into consideration
-    # when supported in glance.
-    return "http://%s:%d" % (CONF.glance_host, CONF.glance_port)
-
-
 def make_dev_path(dev, partition=None, base='/dev'):
     """Return a path to a particular device.