Skip to content

Commit 92aedff

Browse files
authored
Merge pull request #785 from sjyu1/ablestack-europa
20260305일자 europa 병합 오류 수정
2 parents dbe0a33 + aea27e2 commit 92aedff

55 files changed

Lines changed: 182 additions & 374 deletions

File tree

Some content is hidden

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

api/src/main/java/com/cloud/vm/VmDetailConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,5 @@ public interface VmDetailConstants {
134134
String EXTERNAL_DETAIL_PREFIX = "External:";
135135
String CLOUDSTACK_VM_DETAILS = "cloudstack.vm.details";
136136
String CLOUDSTACK_VLAN = "cloudstack.vlan";
137+
String KVM_GUEST_OS_MACHINE_TYPE = "kvm.guest.os.machine.type";
137138
}

api/src/main/java/org/apache/cloudstack/api/command/admin/ha/DisableHAForClusterCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE
9595
if (cluster == null) {
9696
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Unable to find cluster by ID: " + getClusterId());
9797
}
98-
final boolean result = haConfigManager.disableHA(cluster);
98+
final boolean result = haConfigManager.disableHA(cluster, includeHost());
9999
CallContext.current().setEventDetails("Cluster ID:" + cluster.getUuid() + " HA enabled: false");
100100
CallContext.current().putContextParameter(Cluster.class, cluster.getUuid());
101101

api/src/main/java/org/apache/cloudstack/api/command/admin/ha/EnableHAForClusterCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE
9696
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Unable to find cluster by ID: " + getClusterId());
9797
}
9898

99-
final boolean result = haConfigManager.enableHA(cluster);
99+
final boolean result = haConfigManager.enableHA(cluster, includeHost());
100100
CallContext.current().setEventDetails("Cluster ID:" + cluster.getUuid() + " HA enabled: true");
101101
CallContext.current().putContextParameter(Cluster.class, cluster.getUuid());
102102

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public String getStorageAccessGroup() {
221221
public ListHostsCmd(String storageAccessGroup) {
222222
this.storageAccessGroup = storageAccessGroup;
223223
}
224-
224+
225225
public String getVersion() {
226226
return version;
227227
}

api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java

Lines changed: 0 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
import org.apache.cloudstack.api.response.UserVmResponse;
3434
import org.apache.cloudstack.api.response.VolumeResponse;
3535
import org.apache.cloudstack.context.CallContext;
36-
import org.apache.commons.collections.CollectionUtils;
37-
import org.apache.commons.collections.MapUtils;
38-
import org.apache.commons.lang3.BooleanUtils;
3936

4037
import com.cloud.exception.ConcurrentOperationException;
4138
import com.cloud.exception.InsufficientCapacityException;
@@ -44,9 +41,6 @@
4441
import com.cloud.exception.ResourceUnavailableException;
4542
import com.cloud.uservm.UserVm;
4643
import com.cloud.utils.exception.CloudRuntimeException;
47-
import com.cloud.utils.net.Dhcp;
48-
import com.cloud.utils.net.NetUtils;
49-
import com.cloud.utils.StringUtils;
5044
import com.cloud.vm.VirtualMachine;
5145

5246
@APICommand(name = "deployVirtualMachine", description = "Creates and automatically starts an Instance based on a service offering, disk offering, and Template.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class},
@@ -75,138 +69,6 @@ public class DeployVMCmd extends BaseDeployVMCmd {
7569
/////////////////// Accessors ///////////////////////
7670
/////////////////////////////////////////////////////
7771

78-
public String getAccountName() {
79-
if (accountName == null) {
80-
return CallContext.current().getCallingAccount().getAccountName();
81-
}
82-
return accountName;
83-
}
84-
85-
public Long getDiskOfferingId() {
86-
return diskOfferingId;
87-
}
88-
89-
public String getDeploymentPlanner() {
90-
return deploymentPlanner;
91-
}
92-
93-
public String getDisplayName() {
94-
if (StringUtils.isEmpty(displayName)) {
95-
displayName = name;
96-
}
97-
return displayName;
98-
}
99-
100-
public Long getDomainId() {
101-
if (domainId == null) {
102-
return CallContext.current().getCallingAccount().getDomainId();
103-
}
104-
return domainId;
105-
}
106-
107-
public ApiConstants.BootType getBootType() {
108-
if (StringUtils.isNotBlank(bootType)) {
109-
try {
110-
String type = bootType.trim().toUpperCase();
111-
return ApiConstants.BootType.valueOf(type);
112-
} catch (IllegalArgumentException e) {
113-
String errMesg = "Invalid bootType " + bootType + "Specified for Instance " + getName()
114-
+ " Valid values are: " + Arrays.toString(ApiConstants.BootType.values());
115-
logger.warn(errMesg);
116-
throw new InvalidParameterValueException(errMesg);
117-
}
118-
}
119-
return null;
120-
}
121-
122-
public ApiConstants.BootMode getBootMode() {
123-
if (StringUtils.isNotBlank(bootMode)) {
124-
try {
125-
String mode = bootMode.trim().toUpperCase();
126-
return ApiConstants.BootMode.valueOf(mode);
127-
} catch (IllegalArgumentException e) {
128-
String msg = String.format("Invalid %s: %s specified for Instance: %s. Valid values are: %s",
129-
ApiConstants.BOOT_MODE, bootMode, getName(), Arrays.toString(ApiConstants.BootMode.values()));
130-
logger.error(msg);
131-
throw new InvalidParameterValueException(msg);
132-
}
133-
}
134-
if (ApiConstants.BootType.UEFI.equals(getBootType())) {
135-
String msg = String.format("%s must be specified for the Instance with boot type: %s. Valid values are: %s",
136-
ApiConstants.BOOT_MODE, getBootType(), Arrays.toString(ApiConstants.BootMode.values()));
137-
logger.error(msg);
138-
throw new InvalidParameterValueException(msg);
139-
}
140-
return null;
141-
}
142-
143-
public Map<String, String> getVmProperties() {
144-
Map<String, String> map = new HashMap<>();
145-
if (MapUtils.isNotEmpty(vAppProperties)) {
146-
Collection parameterCollection = vAppProperties.values();
147-
Iterator iterator = parameterCollection.iterator();
148-
while (iterator.hasNext()) {
149-
HashMap<String, String> entry = (HashMap<String, String>)iterator.next();
150-
map.put(entry.get("key"), entry.get("value"));
151-
}
152-
}
153-
return map;
154-
}
155-
156-
public Map<Integer, Long> getVmNetworkMap() {
157-
Map<Integer, Long> map = new HashMap<>();
158-
if (MapUtils.isNotEmpty(vAppNetworks)) {
159-
Collection parameterCollection = vAppNetworks.values();
160-
Iterator iterator = parameterCollection.iterator();
161-
while (iterator.hasNext()) {
162-
HashMap<String, String> entry = (HashMap<String, String>) iterator.next();
163-
Integer nic;
164-
try {
165-
nic = Integer.valueOf(entry.get(VmDetailConstants.NIC));
166-
} catch (NumberFormatException nfe) {
167-
nic = null;
168-
}
169-
String networkUuid = entry.get(VmDetailConstants.NETWORK);
170-
if (logger.isTraceEnabled()) {
171-
logger.trace(String.format("nic, '%s', goes on net, '%s'", nic, networkUuid));
172-
}
173-
if (nic == null || StringUtils.isEmpty(networkUuid) || _entityMgr.findByUuid(Network.class, networkUuid) == null) {
174-
throw new InvalidParameterValueException(String.format("Network ID: %s for NIC ID: %s is invalid", networkUuid, nic));
175-
}
176-
map.put(nic, _entityMgr.findByUuid(Network.class, networkUuid).getId());
177-
}
178-
}
179-
return map;
180-
}
181-
182-
public String getGroup() {
183-
return group;
184-
}
185-
186-
public HypervisorType getHypervisor() {
187-
return HypervisorType.getType(hypervisor);
188-
}
189-
190-
public Boolean isDisplayVm() {
191-
return displayVm;
192-
}
193-
194-
@Override
195-
public boolean isDisplay() {
196-
if(displayVm == null)
197-
return true;
198-
else
199-
return displayVm;
200-
}
201-
202-
public List<String> getSecurityGroupNameList() {
203-
return securityGroupNameList;
204-
}
205-
206-
public List<Long> getSecurityGroupIdList() {
207-
return securityGroupIdList;
208-
}
209-
21072
public Long getServiceOfferingId() {
21173
return serviceOfferingId;
21274
}

api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMVolumeCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ public static String getResultObjectName() {
754754

755755
@Override
756756
public long getEntityOwnerId() {
757-
Long accountId = _accountService.finalyzeAccountId(accountName, domainId, projectId, true);
757+
Long accountId = _accountService.finalizeAccountId(accountName, domainId, projectId, true);
758758
if (accountId == null) {
759759
return CallContext.current().getCallingAccount().getId();
760760
}

api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@
2121
import com.cloud.exception.ResourceUnavailableException;
2222
import com.cloud.user.Account;
2323
import com.cloud.uservm.UserVm;
24-
import java.util.Collection;
25-
import java.util.HashMap;
26-
import java.util.List;
27-
import java.util.Map;
2824

29-
import com.cloud.utils.StringUtils;
3025
import com.cloud.utils.exception.CloudRuntimeException;
3126
import com.cloud.utils.net.Dhcp;
3227
import com.cloud.vm.VirtualMachine;

api/src/main/java/org/apache/cloudstack/api/response/LoginCmdResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public class LoginCmdResponse extends AuthenticationCmdResponse {
9797
@SerializedName(value = ApiConstants.EXTERNAL_ENTITY)
9898
@Param(description = "externalEntity")
9999
private String externalEntity;
100-
100+
101101
@SerializedName(value = ApiConstants.PASSWORD_CHANGE_REQUIRED)
102102
@Param(description = "Indicates whether the User is required to change password on next login.", since = "4.23.0")
103103
private Boolean passwordChangeRequired;
@@ -251,7 +251,7 @@ public String getExternalEntity() {
251251
public void setExternalEntity(String externalEntity) {
252252
this.externalEntity = externalEntity;
253253
}
254-
254+
255255
public Boolean getPasswordChangeRequired() {
256256
return passwordChangeRequired;
257257
}

api/src/main/java/org/apache/cloudstack/backup/BackupManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public interface BackupManager extends BackupService, Configurable, PluggableSer
252252
Capacity getBackupStorageUsedStats(Long zoneId);
253253

254254
void checkAndRemoveBackupOfferingBeforeExpunge(VirtualMachine vm);
255-
255+
256256
static void validateBackupProviderConfig(String value) {
257257
if (value != null && (value.contains(",") || value.trim().contains(" "))) {
258258
throw new IllegalArgumentException("Multiple backup provider plugins are not supported. Please provide a single plugin value.");

core/src/main/java/org/apache/cloudstack/backup/RestoreBackupCommand.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ public void setRestoreVolumePaths(List<String> restoreVolumePaths) {
9494
this.restoreVolumePaths = restoreVolumePaths;
9595
}
9696

97+
public List<String> getVolumePaths() {
98+
return volumePaths;
99+
}
100+
101+
public void setVolumePaths(List<String> volumePaths) {
102+
this.volumePaths = volumePaths;
103+
}
104+
97105
public List<String> getBackupFiles() {
98106
return backupFiles;
99107
}

0 commit comments

Comments
 (0)