From 2af9381bc7c6b1bbe5fab53a39cccad26a2e4136 Mon Sep 17 00:00:00 2001 From: Alberto Murillo Date: Tue, 6 Sep 2016 18:15:49 -0500 Subject: [PATCH] ciao-controller: Return an empty volumes list OpenStack blockstorage v2 api state that the return value for /v2/tenant/volumes/detail should be a list of volumes, however, ciao was returning {"volumes":null}. With this fix ciao now returns the correct response as {"volumes": []} Signed-off-by: Alberto Murillo --- ciao-controller/openstack_volume.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ciao-controller/openstack_volume.go b/ciao-controller/openstack_volume.go index 5cfd10b2f..0f6b0c06e 100644 --- a/ciao-controller/openstack_volume.go +++ b/ciao-controller/openstack_volume.go @@ -279,7 +279,7 @@ func (c *controller) ListVolumes(tenant string) ([]block.ListVolume, error) { } func (c *controller) ListVolumesDetail(tenant string) ([]block.VolumeDetail, error) { - var vols []block.VolumeDetail + vols := []block.VolumeDetail{} err := c.confirmTenant(tenant) if err != nil {