Merge "Fixing image snapshots server links"
This commit is contained in:
@@ -59,6 +59,8 @@ class ViewBuilder(common.ViewBuilder):
|
|||||||
if instance_uuid is not None:
|
if instance_uuid is not None:
|
||||||
server_ref = os.path.join(request.application_url, 'servers',
|
server_ref = os.path.join(request.application_url, 'servers',
|
||||||
instance_uuid)
|
instance_uuid)
|
||||||
|
server_ref = self._update_link_prefix(server_ref,
|
||||||
|
FLAGS.osapi_compute_link_prefix)
|
||||||
image_dict["server"] = {
|
image_dict["server"] = {
|
||||||
"id": instance_uuid,
|
"id": instance_uuid,
|
||||||
"links": [{
|
"links": [{
|
||||||
|
|||||||
@@ -123,8 +123,8 @@ class ImagesControllerTest(test.TestCase):
|
|||||||
bookmark = "https://zoo.com:42/fake/images/124"
|
bookmark = "https://zoo.com:42/fake/images/124"
|
||||||
alternate = "http://circus.com:34/fake/images/124"
|
alternate = "http://circus.com:34/fake/images/124"
|
||||||
server_uuid = "aa640691-d1a7-4a67-9d3c-d35ee6b3cc74"
|
server_uuid = "aa640691-d1a7-4a67-9d3c-d35ee6b3cc74"
|
||||||
server_href = "http://localhost/v2/servers/" + server_uuid
|
server_href = "https://zoo.com:42/v2/servers/" + server_uuid
|
||||||
server_bookmark = "http://localhost/servers/" + server_uuid
|
server_bookmark = "https://zoo.com:42/servers/" + server_uuid
|
||||||
|
|
||||||
expected_image = {
|
expected_image = {
|
||||||
"image": {
|
"image": {
|
||||||
|
|||||||
Reference in New Issue
Block a user