Skip to content

Commit e201297

Browse files
DaanHooglanddhslove
authored andcommitted
Revert "Add the option to filter by host when retrieving of unregistered VMs (apache#9925)" (apache#10647)
This reverts commit aa6c581.
1 parent 431df14 commit e201297

File tree

26 files changed

+791
-908
lines changed

26 files changed

+791
-908
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -493,12 +493,11 @@ public class ApiConstants {
493493
public static final String STATE = "state";
494494
public static final String STATS = "stats";
495495
public static final String STATUS = "status";
496+
public static final String STORAGE_TYPE = "storagetype";
497+
public static final String STORAGE_POLICY = "storagepolicy";
498+
public static final String STORAGE_MOTION_ENABLED = "storagemotionenabled";
496499
public static final String STORAGE_CAPABILITIES = "storagecapabilities";
497500
public static final String STORAGE_CUSTOM_STATS = "storagecustomstats";
498-
public static final String STORAGE_MOTION_ENABLED = "storagemotionenabled";
499-
public static final String STORAGE_POLICY = "storagepolicy";
500-
public static final String STORAGE_POOL = "storagepool";
501-
public static final String STORAGE_TYPE = "storagetype";
502501
public static final String SUBNET = "subnet";
503502
public static final String OWNER = "owner";
504503
public static final String SWAP_OWNER = "swapowner";
@@ -970,7 +969,6 @@ public class ApiConstants {
970969
public static final String AUTOSCALE_VMGROUP_NAME = "autoscalevmgroupname";
971970
public static final String BAREMETAL_DISCOVER_NAME = "baremetaldiscovername";
972971
public static final String BAREMETAL_RCT_URL = "baremetalrcturl";
973-
public static final String BATCH_SIZE = "batchsize";
974972
public static final String UCS_DN = "ucsdn";
975973
public static final String GSLB_PROVIDER = "gslbprovider";
976974
public static final String EXCLUSIVE_GSLB_PROVIDER = "isexclusivegslbprovider";

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public class HostResponse extends BaseResponseWithAnnotations {
152152
@Deprecated
153153
@SerializedName("memoryallocated")
154154
@Param(description = "the amount of the host's memory currently allocated")
155-
private Long memoryAllocated;
155+
private long memoryAllocated;
156156

157157
@SerializedName("memoryallocatedpercentage")
158158
@Param(description = "the amount of the host's memory currently allocated in percentage")
@@ -419,7 +419,7 @@ public void setMemWithOverprovisioning(String memWithOverprovisioning){
419419
this.memWithOverprovisioning=memWithOverprovisioning;
420420
}
421421

422-
public void setMemoryAllocated(Long memoryAllocated) {
422+
public void setMemoryAllocated(long memoryAllocated) {
423423
this.memoryAllocated = memoryAllocated;
424424
}
425425

@@ -707,8 +707,8 @@ public Long getMemoryTotal() {
707707
return memoryTotal;
708708
}
709709

710-
public Long getMemoryAllocated() {
711-
return memoryAllocated == null ? 0 : memoryAllocated;
710+
public long getMemoryAllocated() {
711+
return memoryAllocated;
712712
}
713713

714714
public void setMemoryAllocatedPercentage(String memoryAllocatedPercentage) {

plugins/acl/dynamic-role-based/src/main/java/org/apache/cloudstack/acl/DynamicRoleBasedAPIAccessChecker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class DynamicRoleBasedAPIAccessChecker extends AdapterBase implements API
4747
private RoleService roleService;
4848

4949
private List<PluggableService> services;
50-
private Map<RoleType, Set<String>> annotationRoleBasedApisMap = new HashMap<>();
50+
private Map<RoleType, Set<String>> annotationRoleBasedApisMap = new HashMap<RoleType, Set<String>>();
5151

5252
private LazyCache<Long, Account> accountCache;
5353
private LazyCache<Long, Pair<Role, List<RolePermission>>> rolePermissionsCache;
@@ -56,7 +56,7 @@ public class DynamicRoleBasedAPIAccessChecker extends AdapterBase implements API
5656
protected DynamicRoleBasedAPIAccessChecker() {
5757
super();
5858
for (RoleType roleType : RoleType.values()) {
59-
annotationRoleBasedApisMap.put(roleType, new HashSet<>());
59+
annotationRoleBasedApisMap.put(roleType, new HashSet<String>());
6060
}
6161
}
6262

plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/VmwareDatacenterService.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@
2222
import com.cloud.dc.VsphereStoragePolicy;
2323
import com.cloud.exception.DiscoveryException;
2424
import com.cloud.exception.ResourceInUseException;
25-
import com.cloud.hypervisor.vmware.mo.HostMO;
2625
import com.cloud.storage.StoragePool;
27-
import com.cloud.utils.Pair;
2826
import com.cloud.utils.component.PluggableService;
2927
import com.cloud.utils.exception.CloudRuntimeException;
3028
import org.apache.cloudstack.api.command.admin.zone.AddVmwareDcCmd;
3129
import org.apache.cloudstack.api.command.admin.zone.ImportVsphereStoragePoliciesCmd;
3230
import org.apache.cloudstack.api.command.admin.zone.ListVmwareDcVmsCmd;
33-
import org.apache.cloudstack.api.command.admin.zone.ListVmwareDcHostsCmd;
3431
import org.apache.cloudstack.api.command.admin.zone.ListVmwareDcsCmd;
3532
import org.apache.cloudstack.api.command.admin.zone.ListVsphereStoragePoliciesCmd;
3633
import org.apache.cloudstack.api.command.admin.zone.ListVsphereStoragePolicyCompatiblePoolsCmd;
@@ -56,7 +53,5 @@ public interface VmwareDatacenterService extends PluggableService {
5653

5754
List<StoragePool> listVsphereStoragePolicyCompatibleStoragePools(ListVsphereStoragePolicyCompatiblePoolsCmd cmd);
5855

59-
List<HostMO> listHostsInDatacenter(ListVmwareDcHostsCmd cmd);
60-
61-
Pair<String, List<UnmanagedInstanceTO>> listVMsInDatacenter(ListVmwareDcVmsCmd cmd);
56+
List<UnmanagedInstanceTO> listVMsInDatacenter(ListVmwareDcVmsCmd cmd);
6257
}

0 commit comments

Comments
 (0)