You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CLOUDSTACK-10276: listVolumes not working when storage UUID is not a UUID (#2639)
When configuring a pre-setup primary storage we can enter the name-label of the storage that is going to be used by ACS and is already set up in the host. The problem is that we can use any String of characters there, and this String does not need to be a UUID. When listing volumes from a primary storage that has such conditions, the list will return all of the volumes in the cloud because the “API framework” will ignore that value as it is not a UUID type.
@@ -55,7 +55,7 @@ public class ListVolumesCmd extends BaseListTaggedResourcesCmd {
55
55
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VolumeResponse.class, description = "the ID of the disk volume")
56
56
privateLongid;
57
57
58
-
@Parameter(name=ApiConstants.IDS, type=CommandType.LIST, collectionType=CommandType.UUID, entityType=VolumeResponse.class, description="the IDs of the volumes, mutually exclusive with id", since = "4.9")
58
+
@Parameter(name = ApiConstants.IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = VolumeResponse.class, description = "the IDs of the volumes, mutually exclusive with id", since = "4.9")
59
59
privateList<Long> ids;
60
60
61
61
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the disk volume")
@@ -76,22 +76,15 @@ public class ListVolumesCmd extends BaseListTaggedResourcesCmd {
76
76
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the ID of the availability zone")
77
77
privateLongzoneId;
78
78
79
-
@Parameter(name = ApiConstants.STORAGE_ID,
80
-
type = CommandType.UUID,
81
-
entityType = StoragePoolResponse.class,
82
-
description = "the ID of the storage pool, available to ROOT admin only",
83
-
since = "4.3",
84
-
authorized = {RoleType.Admin})
85
-
privateLongstorageId;
86
-
87
-
@Parameter(name = ApiConstants.DISK_OFFERING_ID,
88
-
type = CommandType.UUID,
89
-
entityType = DiskOfferingResponse.class,
90
-
description = "list volumes by disk offering",
91
-
since = "4.4")
79
+
@Parameter(name = ApiConstants.STORAGE_ID, type = CommandType.STRING, entityType = StoragePoolResponse.class, description = "the ID of the storage pool, available to ROOT admin only", since = "4.3", authorized = {
80
+
RoleType.Admin})
81
+
privateStringstorageId;
82
+
83
+
@Parameter(name = ApiConstants.DISK_OFFERING_ID, type = CommandType.UUID, entityType = DiskOfferingResponse.class, description = "list volumes by disk offering", since = "4.4")
92
84
privateLongdiskOfferingId;
93
85
94
-
@Parameter(name = ApiConstants.DISPLAY_VOLUME, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin})
86
+
@Parameter(name = ApiConstants.DISPLAY_VOLUME, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {
0 commit comments