Skip to content

Commit b2f24d8

Browse files
committed
Revert "Add the option to filter by host when retrieving of unregistered VMs (apache#9925)"
This reverts commit aa6c581.
1 parent ee94ae5 commit b2f24d8

File tree

26 files changed

+821
-922
lines changed

26 files changed

+821
-922
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public class ApiConstants {
4646
public static final String BACKUP_OFFERING_NAME = "backupofferingname";
4747
public static final String BACKUP_OFFERING_ID = "backupofferingid";
4848
public static final String BASE64_IMAGE = "base64image";
49-
public static final String BATCH_SIZE = "batchsize";
5049
public static final String BITS = "bits";
5150
public static final String BOOTABLE = "bootable";
5251
public static final String BIND_DN = "binddn";
@@ -438,12 +437,11 @@ public class ApiConstants {
438437
public static final String STATE = "state";
439438
public static final String STATS = "stats";
440439
public static final String STATUS = "status";
440+
public static final String STORAGE_TYPE = "storagetype";
441+
public static final String STORAGE_POLICY = "storagepolicy";
442+
public static final String STORAGE_MOTION_ENABLED = "storagemotionenabled";
441443
public static final String STORAGE_CAPABILITIES = "storagecapabilities";
442444
public static final String STORAGE_CUSTOM_STATS = "storagecustomstats";
443-
public static final String STORAGE_MOTION_ENABLED = "storagemotionenabled";
444-
public static final String STORAGE_POLICY = "storagepolicy";
445-
public static final String STORAGE_POOL = "storagepool";
446-
public static final String STORAGE_TYPE = "storagetype";
447445
public static final String SUBNET = "subnet";
448446
public static final String OWNER = "owner";
449447
public static final String SWAP_OWNER = "swapowner";
@@ -1108,7 +1106,6 @@ public class ApiConstants {
11081106
public static final String PARAMETER_DESCRIPTION_IS_TAG_A_RULE = "Whether the informed tag is a JS interpretable rule or not.";
11091107

11101108
public static final String NFS_MOUNT_OPTIONS = "nfsmountopts";
1111-
public static final String VMWARE_DC = "vmwaredc";
11121109

11131110
/**
11141111
* This enum specifies IO Drivers, each option controls specific policies on I/O.

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")
@@ -395,7 +395,7 @@ public void setMemWithOverprovisioning(String memWithOverprovisioning){
395395
this.memWithOverprovisioning=memWithOverprovisioning;
396396
}
397397

398-
public void setMemoryAllocated(Long memoryAllocated) {
398+
public void setMemoryAllocated(long memoryAllocated) {
399399
this.memoryAllocated = memoryAllocated;
400400
}
401401

@@ -659,8 +659,8 @@ public Long getMemoryTotal() {
659659
return memoryTotal;
660660
}
661661

662-
public Long getMemoryAllocated() {
663-
return memoryAllocated == null ? 0 : memoryAllocated;
662+
public long getMemoryAllocated() {
663+
return memoryAllocated;
664664
}
665665

666666
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,14 +47,14 @@ 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 static final Logger LOGGER = Logger.getLogger(DynamicRoleBasedAPIAccessChecker.class.getName());
5353

5454
protected DynamicRoleBasedAPIAccessChecker() {
5555
super();
5656
for (RoleType roleType : RoleType.values()) {
57-
annotationRoleBasedApisMap.put(roleType, new HashSet<>());
57+
annotationRoleBasedApisMap.put(roleType, new HashSet<String>());
5858
}
5959
}
6060

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)