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
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'))
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.