Skip to content

Commit 86eff0e

Browse files
authored
Merge branch '4.20' into 4.20-fiberchannel-patches
2 parents 6a97d69 + f24b175 commit 86eff0e

File tree

204 files changed

+2867
-2312
lines changed

Some content is hidden

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

204 files changed

+2867
-2312
lines changed

.github/workflows/ui.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
npm run test:unit
5757
5858
- uses: codecov/codecov-action@v4
59+
if: github.repository == 'apache/cloudstack'
5960
with:
6061
working-directory: ui
6162
files: ./coverage/lcov.info

agent/src/main/java/com/cloud/agent/properties/AgentProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ public static class Property <T>{
823823
private T defaultValue;
824824
private Class<T> typeClass;
825825

826-
Property(String name, T value) {
826+
public Property(String name, T value) {
827827
init(name, value);
828828
}
829829

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,12 @@ public static String[] toStrings(Host.Type... types) {
5353
return strs;
5454
}
5555
}
56-
public static final String HOST_UEFI_ENABLE = "host.uefi.enable";
57-
public static final String HOST_VOLUME_ENCRYPTION = "host.volume.encryption";
58-
public static final String HOST_INSTANCE_CONVERSION = "host.instance.conversion";
56+
57+
String HOST_UEFI_ENABLE = "host.uefi.enable";
58+
String HOST_VOLUME_ENCRYPTION = "host.volume.encryption";
59+
String HOST_INSTANCE_CONVERSION = "host.instance.conversion";
60+
String HOST_OVFTOOL_VERSION = "host.ovftool.version";
61+
String HOST_VIRTV2V_VERSION = "host.virtv2v.version";
5962

6063
/**
6164
* @return name of the machine.

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,13 @@ Volume updateVolume(long volumeId, String path, String state, Long storageId,
171171
* </table>
172172
*/
173173
boolean doesStoragePoolSupportDiskOffering(StoragePool destPool, DiskOffering diskOffering);
174+
175+
/**
176+
* Checks if the storage pool supports the required disk offering tags
177+
* destPool the storage pool to check the disk offering tags
178+
* diskOfferingTags the tags that should be supported
179+
* return whether the tags are supported in the storage pool
180+
*/
174181
boolean doesStoragePoolSupportDiskOfferingTags(StoragePool destPool, String diskOfferingTags);
175182

176183
Volume destroyVolume(long volumeId, Account caller, boolean expunge, boolean forceExpunge);

api/src/main/java/com/cloud/user/AccountService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ User createUser(String userName, String password, String firstName, String lastN
8787

8888
boolean isDomainAdmin(Long accountId);
8989

90+
boolean isResourceDomainAdmin(Long accountId);
91+
9092
boolean isNormalUser(long accountId);
9193

9294
User getActiveUserByRegistrationToken(String registrationToken);

api/src/main/java/org/apache/cloudstack/api/command/admin/acl/project/ListProjectRolesCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public String getRoleName() {
7272

7373
@Override
7474
public void execute() {
75-
List<ProjectRole> projectRoles;
75+
List<ProjectRole> projectRoles = new ArrayList<>();
7676
if (getProjectId() != null && getProjectRoleId() != null) {
7777
projectRoles = Collections.singletonList(projRoleService.findProjectRole(getProjectRoleId(), getProjectId()));
7878
} else if (StringUtils.isNotBlank(getRoleName())) {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,19 +128,19 @@ public CPU.CPUArch getArch() {
128128

129129
protected Pair<List<ClusterResponse>, Integer> getClusterResponses() {
130130
Pair<List<? extends Cluster>, Integer> result = _mgr.searchForClusters(this);
131-
List<ClusterResponse> clusterResponses = new ArrayList<ClusterResponse>();
131+
List<ClusterResponse> clusterResponses = new ArrayList<>();
132132
for (Cluster cluster : result.first()) {
133133
ClusterResponse clusterResponse = _responseGenerator.createClusterResponse(cluster, showCapacities);
134134
clusterResponse.setObjectName("cluster");
135135
clusterResponses.add(clusterResponse);
136136
}
137-
return new Pair<List<ClusterResponse>, Integer>(clusterResponses, result.second());
137+
return new Pair<>(clusterResponses, result.second());
138138
}
139139

140140
@Override
141141
public void execute() {
142142
Pair<List<ClusterResponse>, Integer> clusterResponses = getClusterResponses();
143-
ListResponse<ClusterResponse> response = new ListResponse<ClusterResponse>();
143+
ListResponse<ClusterResponse> response = new ListResponse<>();
144144
response.setResponses(clusterResponses.first(), clusterResponses.second());
145145
response.setResponseName(getCommandName());
146146
this.setResponseObject(response);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ public Boolean getShowCapacities() {
8686
@Override
8787
public void execute() {
8888
Pair<List<? extends Pod>, Integer> result = _mgr.searchForPods(this);
89-
ListResponse<PodResponse> response = new ListResponse<PodResponse>();
90-
List<PodResponse> podResponses = new ArrayList<PodResponse>();
89+
ListResponse<PodResponse> response = new ListResponse<>();
90+
List<PodResponse> podResponses = new ArrayList<>();
9191
for (Pod pod : result.first()) {
9292
PodResponse podResponse = _responseGenerator.createPodResponse(pod, showCapacities);
9393
podResponse.setObjectName("pod");

api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,16 @@ public void execute() {
132132
Collections.sort(capacityResponses, new Comparator<CapacityResponse>() {
133133
public int compare(CapacityResponse resp1, CapacityResponse resp2) {
134134
int res = resp1.getZoneName().compareTo(resp2.getZoneName());
135+
// Group by zone
135136
if (res != 0) {
136137
return res;
137-
} else {
138-
return resp1.getCapacityType().compareTo(resp2.getCapacityType());
139138
}
139+
// Sort by capacity type only if not already sorted by usage
140+
return (getSortBy() != null) ? 0 : resp1.getCapacityType().compareTo(resp2.getCapacityType());
140141
}
141142
});
142143

144+
143145
response.setResponses(capacityResponses);
144146
response.setResponseName(getCommandName());
145147
this.setResponseObject(response);

api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public Long getServiceOfferingId() {
7474
}
7575

7676
public Map<String, String> getDetails() {
77-
return details;
77+
return convertDetailsToMap(details);
7878
}
7979

8080
/////////////////////////////////////////////////////

0 commit comments

Comments
 (0)