Skip to content

Commit d7dd344

Browse files
Added ListStorageAccessGroups API and storageaccessgroup parameter in list APIs
1 parent dc2152a commit d7dd344

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+973
-35
lines changed

api/src/main/java/org/apache/cloudstack/api/ApiConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ public class ApiConstants {
498498
public static final String TAGS = "tags";
499499
public static final String STORAGE_TAGS = "storagetags";
500500
public static final String STORAGE_ACCESS_GROUPS = "storageaccessgroups";
501+
public static final String STORAGE_ACCESS_GROUP = "storageaccessgroup";
501502
public static final String SUCCESS = "success";
502503
public static final String SUITABLE_FOR_VM = "suitableforvirtualmachine";
503504
public static final String SUPPORTS_STORAGE_SNAPSHOT = "supportsstoragesnapshot";

api/src/main/java/org/apache/cloudstack/api/ResponseGenerator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,8 @@ public interface ResponseGenerator {
310310

311311
PodResponse createPodResponse(Pod pod, Boolean showCapacities);
312312

313+
PodResponse createMinimalPodResponse(Pod pod);
314+
313315
ZoneResponse createZoneResponse(ResponseView view, DataCenter dataCenter, Boolean showCapacities, Boolean showResourceIcon);
314316

315317
DataCenterGuestIpv6PrefixResponse createDataCenterGuestIpv6PrefixResponse(DataCenterGuestIpv6Prefix prefix);
@@ -324,6 +326,8 @@ public interface ResponseGenerator {
324326

325327
ClusterResponse createClusterResponse(Cluster cluster, Boolean showCapacities);
326328

329+
ClusterResponse createMinimalClusterResponse(Cluster cluster);
330+
327331
FirewallRuleResponse createPortForwardingRuleResponse(PortForwardingRule fwRule);
328332

329333
IpForwardingRuleResponse createIpForwardingRuleResponse(StaticNatRule fwRule);

api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public class AddClusterCmd extends BaseCmd {
121121
@Parameter(name = ApiConstants.STORAGE_ACCESS_GROUPS,
122122
type = CommandType.LIST, collectionType = CommandType.STRING,
123123
description = "comma separated list of storage access groups for the hosts in the cluster",
124-
since = "4.18.1")
124+
since = "4.21.0")
125125
private List<String> storageAccessGroups;
126126

127127
public String getOvm3Pool() {

api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ public class ListClustersCmd extends BaseListCmd {
6868
@Parameter(name = ApiConstants.SHOW_CAPACITIES, type = CommandType.BOOLEAN, description = "flag to display the capacity of the clusters")
6969
private Boolean showCapacities;
7070

71+
@Parameter(name = ApiConstants.STORAGE_ACCESS_GROUP, type = CommandType.STRING, description = "the name of the storage access group")
72+
private String storageAccessGroup;
73+
7174
/////////////////////////////////////////////////////
7275
/////////////////// Accessors ///////////////////////
7376
/////////////////////////////////////////////////////
@@ -112,6 +115,18 @@ public Boolean getShowCapacities() {
112115
return showCapacities;
113116
}
114117

118+
public String getStorageAccessGroup() {
119+
return storageAccessGroup;
120+
}
121+
122+
public ListClustersCmd() {
123+
124+
}
125+
126+
public ListClustersCmd(String storageAccessGroup) {
127+
this.storageAccessGroup = storageAccessGroup;
128+
}
129+
115130
/////////////////////////////////////////////////////
116131
/////////////// API Implementation///////////////////
117132
/////////////////////////////////////////////////////

api/src/main/java/org/apache/cloudstack/api/command/admin/host/AddHostCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public class AddHostCmd extends BaseCmd {
7878
@Parameter(name = ApiConstants.STORAGE_ACCESS_GROUPS,
7979
type = CommandType.LIST, collectionType = CommandType.STRING,
8080
description = "comma separated list of storage access groups for the host",
81-
since = "4.18.1")
81+
since = "4.21.0")
8282
private List<String> storageAccessGroups;
8383

8484
/////////////////////////////////////////////////////

api/src/main/java/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ public class ListHostsCmd extends BaseListCmd {
109109
@Parameter(name = ApiConstants.MANAGEMENT_SERVER_ID, type = CommandType.UUID, entityType = ManagementServerResponse.class, description = "the id of the management server", since="4.21.0")
110110
private Long managementServerId;
111111

112+
@Parameter(name = ApiConstants.STORAGE_ACCESS_GROUP, type = CommandType.STRING, description = "the name of the storage access group")
113+
private String storageAccessGroup;
114+
112115
/////////////////////////////////////////////////////
113116
/////////////////// Accessors ///////////////////////
114117
/////////////////////////////////////////////////////
@@ -197,6 +200,18 @@ public Long getManagementServerId() {
197200
return managementServerId;
198201
}
199202

203+
public String getStorageAccessGroup() {
204+
return storageAccessGroup;
205+
}
206+
207+
public ListHostsCmd() {
208+
209+
}
210+
211+
public ListHostsCmd(String storageAccessGroup) {
212+
this.storageAccessGroup = storageAccessGroup;
213+
}
214+
200215
/////////////////////////////////////////////////////
201216
/////////////// API Implementation///////////////////
202217
/////////////////////////////////////////////////////

api/src/main/java/org/apache/cloudstack/api/command/admin/pod/CreatePodCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public class CreatePodCmd extends BaseCmd {
6868
@Parameter(name = ApiConstants.STORAGE_ACCESS_GROUPS,
6969
type = CommandType.LIST, collectionType = CommandType.STRING,
7070
description = "comma separated list of storage access groups for the hosts in the pod",
71-
since = "4.18.1")
71+
since = "4.21.0")
7272
private List<String> storageAccessGroups;
7373

7474
/////////////////////////////////////////////////////

api/src/main/java/org/apache/cloudstack/api/command/admin/pod/ListPodsByCmd.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ public class ListPodsByCmd extends BaseListCmd {
5555
@Parameter(name = ApiConstants.SHOW_CAPACITIES, type = CommandType.BOOLEAN, description = "flag to display the capacity of the pods")
5656
private Boolean showCapacities;
5757

58+
@Parameter(name = ApiConstants.STORAGE_ACCESS_GROUP, type = CommandType.STRING, description = "the name of the storage access group")
59+
private String storageAccessGroup;
60+
5861
/////////////////////////////////////////////////////
5962
/////////////////// Accessors ///////////////////////
6063
/////////////////////////////////////////////////////
@@ -79,6 +82,18 @@ public Boolean getShowCapacities() {
7982
return showCapacities;
8083
}
8184

85+
public String getStorageAccessGroup() {
86+
return storageAccessGroup;
87+
}
88+
89+
public ListPodsByCmd() {
90+
91+
}
92+
93+
public ListPodsByCmd(String storageAccessGroup) {
94+
this.storageAccessGroup = storageAccessGroup;
95+
}
96+
8297
/////////////////////////////////////////////////////
8398
/////////////// API Implementation///////////////////
8499
/////////////////////////////////////////////////////

api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ConfigureStorageAccessCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
import com.cloud.user.Account;
3838

39-
@APICommand(name = "configureStorageAccess", description = "Configure the storage access groups on zone/pod/cluster/host and storage, accordingly connections to the storage pools", responseObject = SuccessResponse.class, since = "4.18.1",
39+
@APICommand(name = "configureStorageAccess", description = "Configure the storage access groups on zone/pod/cluster/host and storage, accordingly connections to the storage pools", responseObject = SuccessResponse.class, since = "4.21.0",
4040
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
4141
public class ConfigureStorageAccessCmd extends BaseAsyncCmd {
4242

api/src/main/java/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class CreateStoragePoolCmd extends BaseCmd {
6262
private String tags;
6363

6464
@Parameter(name = ApiConstants.STORAGE_ACCESS_GROUPS, type = CommandType.STRING,
65-
description = "comma separated list of storage access groups for connecting to hosts having those specific groups", since = "4.18.1")
65+
description = "comma separated list of storage access groups for connecting to hosts having those specific groups", since = "4.21.0")
6666
private String storageAccessGroups;
6767

6868
@Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "the URL of the storage pool")

0 commit comments

Comments
 (0)