Skip to content

Commit fb49fd4

Browse files
Merge branch 'main' into healthcheck-main
2 parents 477820a + 96b8e23 commit fb49fd4

File tree

173 files changed

+7913
-879
lines changed

Some content is hidden

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

173 files changed

+7913
-879
lines changed

api/src/main/java/com/cloud/configuration/ConfigurationService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,12 @@ public interface ConfigurationService {
201201
* TODO
202202
* @param allocationState
203203
* TODO
204+
* @param storageAccessGroups
204205
* @return the new pod if successful, null otherwise
205206
* @throws
206207
* @throws
207208
*/
208-
Pod createPod(long zoneId, String name, String startIp, String endIp, String gateway, String netmask, String allocationState);
209+
Pod createPod(long zoneId, String name, String startIp, String endIp, String gateway, String netmask, String allocationState, List<String> storageAccessGroups);
209210

210211
/**
211212
* Creates a mutual exclusive IP range in the pod with same gateway, netmask.

api/src/main/java/com/cloud/dc/Pod.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,6 @@ public interface Pod extends InfrastructureEntity, Grouping, Identity, InternalI
4343
AllocationState getAllocationState();
4444

4545
boolean getExternalDhcp();
46+
47+
String getStorageAccessGroups();
4648
}

api/src/main/java/com/cloud/deploy/DeploymentClusterPlanner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public interface DeploymentClusterPlanner extends DeploymentPlanner {
6262
"vm.allocation.algorithm",
6363
"Advanced",
6464
"random",
65-
"Order in which hosts within a cluster will be considered for VM/volume allocation. The value can be 'random', 'firstfit', 'userdispersing', 'userconcentratedpod_random', 'userconcentratedpod_firstfit', or 'firstfitleastconsumed'.",
65+
"Order in which hosts within a cluster will be considered for VM allocation. The value can be 'random', 'firstfit', 'userdispersing', 'userconcentratedpod_random', 'userconcentratedpod_firstfit', or 'firstfitleastconsumed'.",
6666
true,
6767
ConfigKey.Scope.Global, null, null, null, null, null,
6868
ConfigKey.Kind.Select,

api/src/main/java/com/cloud/event/EventTypes.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ public class EventTypes {
465465
public static final String EVENT_ENABLE_PRIMARY_STORAGE = "ENABLE.PS";
466466
public static final String EVENT_DISABLE_PRIMARY_STORAGE = "DISABLE.PS";
467467
public static final String EVENT_SYNC_STORAGE_POOL = "SYNC.STORAGE.POOL";
468+
public static final String EVENT_CONFIGURE_STORAGE_ACCESS = "CONFIGURE.STORAGE.ACCESS";
468469
public static final String EVENT_CHANGE_STORAGE_POOL_SCOPE = "CHANGE.STORAGE.POOL.SCOPE";
469470

470471
// VPN

api/src/main/java/com/cloud/host/Host.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,6 @@ public static String[] toStrings(Host.Type... types) {
213213
ResourceState getResourceState();
214214

215215
CPU.CPUArch getArch();
216+
217+
String getStorageAccessGroups();
216218
}

api/src/main/java/com/cloud/org/Cluster.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ public static enum ClusterType {
4141
ManagedState getManagedState();
4242

4343
CPU.CPUArch getArch();
44+
45+
String getStorageAccessGroups();
4446
}

api/src/main/java/com/cloud/resource/ResourceService.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,11 @@ public interface ResourceService {
9595

9696
boolean releaseHostReservation(Long hostId);
9797

98+
void updatePodStorageAccessGroups(long podId, List<String> newStorageAccessGroups);
99+
100+
void updateZoneStorageAccessGroups(long zoneId, List<String> newStorageAccessGroups);
101+
102+
void updateClusterStorageAccessGroups(Long clusterId, List<String> newStorageAccessGroups);
103+
104+
void updateHostStorageAccessGroups(Long hostId, List<String> newStorageAccessGroups);
98105
}

api/src/main/java/com/cloud/storage/StorageService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import org.apache.cloudstack.api.command.admin.storage.CancelPrimaryStorageMaintenanceCmd;
2424
import org.apache.cloudstack.api.command.admin.storage.ChangeStoragePoolScopeCmd;
25+
import org.apache.cloudstack.api.command.admin.storage.ConfigureStorageAccessCmd;
2526
import org.apache.cloudstack.api.command.admin.storage.CreateSecondaryStagingStoreCmd;
2627
import org.apache.cloudstack.api.command.admin.storage.CreateStoragePoolCmd;
2728
import org.apache.cloudstack.api.command.admin.storage.DeleteImageStoreCmd;
@@ -99,6 +100,8 @@ public interface StorageService {
99100

100101
StoragePool disablePrimaryStoragePool(Long id);
101102

103+
boolean configureStorageAccess(ConfigureStorageAccessCmd cmd);
104+
102105
StoragePool getStoragePool(long id);
103106

104107
boolean deleteImageStore(DeleteImageStoreCmd cmd);

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,11 @@ public class ApiConstants {
496496
public static final String SYSTEM_VM_TYPE = "systemvmtype";
497497
public static final String TAGS = "tags";
498498
public static final String STORAGE_TAGS = "storagetags";
499+
public static final String STORAGE_ACCESS_GROUPS = "storageaccessgroups";
500+
public static final String STORAGE_ACCESS_GROUP = "storageaccessgroup";
501+
public static final String CLUSTER_STORAGE_ACCESS_GROUPS = "clusterstorageaccessgroups";
502+
public static final String POD_STORAGE_ACCESS_GROUPS = "podstorageaccessgroups";
503+
public static final String ZONE_STORAGE_ACCESS_GROUPS = "zonestorageaccessgroups";
499504
public static final String SUCCESS = "success";
500505
public static final String SUITABLE_FOR_VM = "suitableforvirtualmachine";
501506
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);

0 commit comments

Comments
 (0)