From c555310c2b6b086e47bbbd6abdf93544a61a3864 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Fri, 14 Jun 2013 00:03:58 +0200 Subject: [PATCH] CLOUDSTACK-1301: long -> Long --- api/src/com/cloud/agent/api/to/VolumeTO.java | 24 +++++++++---------- api/src/com/cloud/offering/DiskOffering.java | 16 ++++++------- api/src/com/cloud/vm/DiskProfile.java | 24 +++++++++---------- .../admin/offering/CreateDiskOfferingCmd.java | 8 +++---- .../offering/CreateServiceOfferingCmd.java | 8 +++---- .../api/response/DiskOfferingResponse.java | 8 +++---- .../api/response/ServiceOfferingResponse.java | 8 +++---- .../api/response/VolumeResponse.java | 16 ++++++------- .../cloud/agent/api/AttachVolumeCommand.java | 24 +++++++++---------- .../src/com/cloud/storage/DiskOfferingVO.java | 24 +++++++++---------- .../resource/LibvirtComputingResource.java | 2 +- .../hypervisor/kvm/resource/LibvirtVMDef.java | 8 +++---- .../api/query/vo/DiskOfferingJoinVO.java | 24 +++++++++---------- .../api/query/vo/ServiceOfferingJoinVO.java | 24 +++++++++---------- .../com/cloud/api/query/vo/VolumeJoinVO.java | 24 +++++++++---------- server/src/com/cloud/test/DatabaseConfig.java | 8 +++---- 16 files changed, 125 insertions(+), 125 deletions(-) diff --git a/api/src/com/cloud/agent/api/to/VolumeTO.java b/api/src/com/cloud/agent/api/to/VolumeTO.java index 0f1f9af4940..cc0e8182390 100644 --- a/api/src/com/cloud/agent/api/to/VolumeTO.java +++ b/api/src/com/cloud/agent/api/to/VolumeTO.java @@ -37,10 +37,10 @@ public class VolumeTO implements InternalIdentity { private long deviceId; private String chainInfo; private String guestOsType; - private long bytesReadRate; - private long bytesWriteRate; - private long iopsReadRate; - private long iopsWriteRate; + private Long bytesReadRate; + private Long bytesWriteRate; + private Long iopsReadRate; + private Long iopsWriteRate; public VolumeTO(long id, Volume.Type type, StoragePoolType poolType, String poolUuid, String name, String mountPoint, String path, long size, String chainInfo) { this.id = id; @@ -138,35 +138,35 @@ public class VolumeTO implements InternalIdentity { return new StringBuilder("Vol[").append(id).append("|").append(type).append("|").append(path).append("|").append(size).append("]").toString(); } - public void setBytesReadRate(long bytesReadRate) { + public void setBytesReadRate(Long bytesReadRate) { this.bytesReadRate = bytesReadRate; } - public long getBytesReadRate() { + public Long getBytesReadRate() { return bytesReadRate; } - public void setBytesWriteRate(long bytesWriteRate) { + public void setBytesWriteRate(Long bytesWriteRate) { this.bytesWriteRate = bytesWriteRate; } - public long getBytesWriteRate() { + public Long getBytesWriteRate() { return bytesWriteRate; } - public void setIopsReadRate(long iopsReadRate) { + public void setIopsReadRate(Long iopsReadRate) { this.iopsReadRate = iopsReadRate; } - public long getIopsReadRate() { + public Long getIopsReadRate() { return iopsReadRate; } - public void setIopsWriteRate(long iopsWriteRate) { + public void setIopsWriteRate(Long iopsWriteRate) { this.iopsWriteRate = iopsWriteRate; } - public long getIopsWriteRate() { + public Long getIopsWriteRate() { return iopsWriteRate; } diff --git a/api/src/com/cloud/offering/DiskOffering.java b/api/src/com/cloud/offering/DiskOffering.java index f4cd7b7c0b4..ae4528cc81a 100644 --- a/api/src/com/cloud/offering/DiskOffering.java +++ b/api/src/com/cloud/offering/DiskOffering.java @@ -53,19 +53,19 @@ public interface DiskOffering extends InfrastructureEntity, Identity, InternalId void setDiskSize(long diskSize); - void setBytesReadRate(long bytesReadRate); + void setBytesReadRate(Long bytesReadRate); - long getBytesReadRate(); + Long getBytesReadRate(); - void setBytesWriteRate(long bytesWriteRate); + void setBytesWriteRate(Long bytesWriteRate); - long getBytesWriteRate(); + Long getBytesWriteRate(); - void setIopsReadRate(long iopsReadRate); + void setIopsReadRate(Long iopsReadRate); - long getIopsReadRate(); + Long getIopsReadRate(); - void setIopsWriteRate(long iopsWriteRate); + void setIopsWriteRate(Long iopsWriteRate); - long getIopsWriteRate(); + Long getIopsWriteRate(); } diff --git a/api/src/com/cloud/vm/DiskProfile.java b/api/src/com/cloud/vm/DiskProfile.java index 4e3de7bce89..3d4c9e730f4 100644 --- a/api/src/com/cloud/vm/DiskProfile.java +++ b/api/src/com/cloud/vm/DiskProfile.java @@ -35,10 +35,10 @@ public class DiskProfile { private Long templateId; private long volumeId; private String path; - private long bytesReadRate; - private long bytesWriteRate; - private long iopsReadRate; - private long iopsWriteRate; + private Long bytesReadRate; + private Long bytesWriteRate; + private Long iopsReadRate; + private Long iopsWriteRate; private HypervisorType hyperType; @@ -159,35 +159,35 @@ public class DiskProfile { this.size = size; } - public void setBytesReadRate(long bytesReadRate) { + public void setBytesReadRate(Long bytesReadRate) { this.bytesReadRate = bytesReadRate; } - public long getBytesReadRate() { + public Long getBytesReadRate() { return bytesReadRate; } - public void setBytesWriteRate(long bytesWriteRate) { + public void setBytesWriteRate(Long bytesWriteRate) { this.bytesWriteRate = bytesWriteRate; } - public long getBytesWriteRate() { + public Long getBytesWriteRate() { return bytesWriteRate; } - public void setIopsReadRate(long iopsReadRate) { + public void setIopsReadRate(Long iopsReadRate) { this.iopsReadRate = iopsReadRate; } - public long getIopsReadRate() { + public Long getIopsReadRate() { return iopsReadRate; } - public void setIopsWriteRate(long iopsWriteRate) { + public void setIopsWriteRate(Long iopsWriteRate) { this.iopsWriteRate = iopsWriteRate; } - public long getIopsWriteRate() { + public Long getIopsWriteRate() { return iopsWriteRate; } } diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java index 8ffc4a701c1..43cc27604f2 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java @@ -105,19 +105,19 @@ public class CreateDiskOfferingCmd extends BaseCmd { return domainId; } - public long getBytesReadRate() { + public Long getBytesReadRate() { return (bytesReadRate == null) || (bytesReadRate < 0) ? 0 : bytesReadRate; } - public long getBytesWriteRate() { + public Long getBytesWriteRate() { return (bytesWriteRate == null) || (bytesWriteRate < 0) ? 0 : bytesWriteRate; } - public long getIopsReadRate() { + public Long getIopsReadRate() { return (iopsReadRate == null) || (iopsReadRate < 0) ? 0 : iopsReadRate; } - public long getIopsWriteRate() { + public Long getIopsWriteRate() { return (iopsWriteRate == null) || (iopsWriteRate < 0) ? 0 : iopsWriteRate; } diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java index 6efac4656ee..cad3f54b2da 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java @@ -183,19 +183,19 @@ public class CreateServiceOfferingCmd extends BaseCmd { return params; } - public long getBytesReadRate() { + public Long getBytesReadRate() { return (bytesReadRate == null) || (bytesReadRate < 0) ? 0 : bytesReadRate; } - public long getBytesWriteRate() { + public Long getBytesWriteRate() { return (bytesWriteRate == null) || (bytesWriteRate < 0) ? 0 : bytesWriteRate; } - public long getIopsReadRate() { + public Long getIopsReadRate() { return (iopsReadRate == null) || (iopsReadRate < 0) ? 0 : iopsReadRate; } - public long getIopsWriteRate() { + public Long getIopsWriteRate() { return (iopsWriteRate == null) || (iopsWriteRate < 0) ? 0 : iopsWriteRate; } diff --git a/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java b/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java index fd00f4e862c..35cf21a3b17 100644 --- a/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java +++ b/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java @@ -162,19 +162,19 @@ public class DiskOfferingResponse extends BaseResponse { this.storageType = storageType; } - public void setBytesReadRate(long bytesReadRate) { + public void setBytesReadRate(Long bytesReadRate) { this.bytesReadRate = bytesReadRate; } - public void setBytesWriteRate(long bytesWriteRate) { + public void setBytesWriteRate(Long bytesWriteRate) { this.bytesWriteRate = bytesWriteRate; } - public void setIopsReadRate(long iopsReadRate) { + public void setIopsReadRate(Long iopsReadRate) { this.iopsReadRate = iopsReadRate; } - public void setIopsWriteRate(long iopsWriteRate) { + public void setIopsWriteRate(Long iopsWriteRate) { this.iopsWriteRate = iopsWriteRate; } } diff --git a/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java b/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java index f12f35af602..288f76b4463 100644 --- a/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java @@ -261,19 +261,19 @@ public class ServiceOfferingResponse extends BaseResponse { this.isVolatile = isVolatile; } - public void setBytesReadRate(long bytesReadRate) { + public void setBytesReadRate(Long bytesReadRate) { this.bytesReadRate = bytesReadRate; } - public void setBytesWriteRate(long bytesWriteRate) { + public void setBytesWriteRate(Long bytesWriteRate) { this.bytesWriteRate = bytesWriteRate; } - public void setIopsReadRate(long iopsReadRate) { + public void setIopsReadRate(Long iopsReadRate) { this.iopsReadRate = iopsReadRate; } - public void setIopsWriteRate(long iopsWriteRate) { + public void setIopsWriteRate(Long iopsWriteRate) { this.iopsWriteRate = iopsWriteRate; } } diff --git a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java index dab5b3e7b7a..e3463bd24d5 100644 --- a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java +++ b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java @@ -270,35 +270,35 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity this.storageType = storageType; } - public void setBytesReadRate(long bytesReadRate) { + public void setBytesReadRate(Long bytesReadRate) { this.bytesReadRate = bytesReadRate; } - public long getBytesReadRate() { + public Long getBytesReadRate() { return bytesReadRate; } - public void setBytesWriteRate(long bytesWriteRate) { + public void setBytesWriteRate(Long bytesWriteRate) { this.bytesWriteRate = bytesWriteRate; } - public long getBytesWriteRate() { + public Long getBytesWriteRate() { return bytesWriteRate; } - public void setIopsReadRate(long iopsReadRate) { + public void setIopsReadRate(Long iopsReadRate) { this.iopsReadRate = iopsReadRate; } - public long getIopsReadRate() { + public Long getIopsReadRate() { return iopsReadRate; } - public void setIopsWriteRate(long iopsWriteRate) { + public void setIopsWriteRate(Long iopsWriteRate) { this.iopsWriteRate = iopsWriteRate; } - public long getIopsWriteRate() { + public Long getIopsWriteRate() { return iopsWriteRate; } diff --git a/core/src/com/cloud/agent/api/AttachVolumeCommand.java b/core/src/com/cloud/agent/api/AttachVolumeCommand.java index 987bb2172be..2658262a6cd 100644 --- a/core/src/com/cloud/agent/api/AttachVolumeCommand.java +++ b/core/src/com/cloud/agent/api/AttachVolumeCommand.java @@ -29,10 +29,10 @@ public class AttachVolumeCommand extends Command { String volumeName; Long deviceId; String chainInfo; - long bytesReadRate; - long bytesWriteRate; - long iopsReadRate; - long iopsWriteRate; + Long bytesReadRate; + Long bytesWriteRate; + Long iopsReadRate; + Long iopsWriteRate; protected AttachVolumeCommand() { } @@ -101,35 +101,35 @@ public class AttachVolumeCommand extends Command { return chainInfo; } - public void setBytesReadRate(long bytesReadRate) { + public void setBytesReadRate(Long bytesReadRate) { this.bytesReadRate = bytesReadRate; } - public long getBytesReadRate() { + public Long getBytesReadRate() { return bytesReadRate; } - public void setBytesWriteRate(long bytesWriteRate) { + public void setBytesWriteRate(Long bytesWriteRate) { this.bytesWriteRate = bytesWriteRate; } - public long getBytesWriteRate() { + public Long getBytesWriteRate() { return bytesWriteRate; } - public void setIopsReadRate(long iopsReadRate) { + public void setIopsReadRate(Long iopsReadRate) { this.iopsReadRate = iopsReadRate; } - public long getIopsReadRate() { + public Long getIopsReadRate() { return iopsReadRate; } - public void setIopsWriteRate(long iopsWriteRate) { + public void setIopsWriteRate(Long iopsWriteRate) { this.iopsWriteRate = iopsWriteRate; } - public long getIopsWriteRate() { + public Long getIopsWriteRate() { return iopsWriteRate; } } diff --git a/engine/schema/src/com/cloud/storage/DiskOfferingVO.java b/engine/schema/src/com/cloud/storage/DiskOfferingVO.java index 1554f18fc3a..44f9e8f7b1c 100755 --- a/engine/schema/src/com/cloud/storage/DiskOfferingVO.java +++ b/engine/schema/src/com/cloud/storage/DiskOfferingVO.java @@ -101,16 +101,16 @@ public class DiskOfferingVO implements DiskOffering { int sortKey; @Column(name="bytes_read_rate") - long bytesReadRate; + Long bytesReadRate; @Column(name="bytes_write_rate") - long bytesWriteRate; + Long bytesWriteRate; @Column(name="iops_read_rate") - long iopsReadRate; + Long iopsReadRate; @Column(name="iops_write_rate") - long iopsWriteRate; + Long iopsWriteRate; @Column(name="display_offering") boolean displayOffering; @@ -340,35 +340,35 @@ public class DiskOfferingVO implements DiskOffering { this.displayOffering = displayOffering; } - public void setBytesReadRate(long bytesReadRate) { + public void setBytesReadRate(Long bytesReadRate) { this.bytesReadRate = bytesReadRate; } - public long getBytesReadRate() { + public Long getBytesReadRate() { return bytesReadRate; } - public void setBytesWriteRate(long bytesWriteRate) { + public void setBytesWriteRate(Long bytesWriteRate) { this.bytesWriteRate = bytesWriteRate; } - public long getBytesWriteRate() { + public Long getBytesWriteRate() { return bytesWriteRate; } - public void setIopsReadRate(long iopsReadRate) { + public void setIopsReadRate(Long iopsReadRate) { this.iopsReadRate = iopsReadRate; } - public long getIopsReadRate() { + public Long getIopsReadRate() { return iopsReadRate; } - public void setIopsWriteRate(long iopsWriteRate) { + public void setIopsWriteRate(Long iopsWriteRate) { this.iopsWriteRate = iopsWriteRate; } - public long getIopsWriteRate() { + public Long getIopsWriteRate() { return iopsWriteRate; } } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java index 6a0032f2adf..817da0f85db 100755 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -3647,7 +3647,7 @@ ServerResource { protected synchronized String attachOrDetachDisk(Connect conn, boolean attach, String vmName, KVMPhysicalDisk attachingDisk, - int devId, long bytesReadRate, long bytesWriteRate, long iopsReadRate, long iopsWriteRate) throws LibvirtException, InternalErrorException { + int devId, Long bytesReadRate, Long bytesWriteRate, Long iopsReadRate, Long iopsWriteRate) throws LibvirtException, InternalErrorException { List disks = null; Domain dm = null; DiskDef diskdef = null; diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java index afa183fc5de..da554b051a7 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java @@ -592,19 +592,19 @@ public class LibvirtVMDef { return suffix - 'a'; } - public void setBytesReadRate(long bytesReadRate) { + public void setBytesReadRate(Long bytesReadRate) { _bytesReadRate = bytesReadRate; } - public void setBytesWriteRate(long bytesWriteRate) { + public void setBytesWriteRate(Long bytesWriteRate) { _bytesWriteRate = bytesWriteRate; } - public void setIopsReadRate(long iopsReadRate) { + public void setIopsReadRate(Long iopsReadRate) { _iopsReadRate = iopsReadRate; } - public void setIopsWriteRate(long iopsWriteRate) { + public void setIopsWriteRate(Long iopsWriteRate) { _iopsWriteRate = iopsWriteRate; } diff --git a/server/src/com/cloud/api/query/vo/DiskOfferingJoinVO.java b/server/src/com/cloud/api/query/vo/DiskOfferingJoinVO.java index baebc487744..2336a48ad14 100644 --- a/server/src/com/cloud/api/query/vo/DiskOfferingJoinVO.java +++ b/server/src/com/cloud/api/query/vo/DiskOfferingJoinVO.java @@ -65,16 +65,16 @@ public class DiskOfferingJoinVO extends BaseViewVO implements InternalIdentity, int sortKey; @Column(name="bytes_read_rate") - long bytesReadRate; + Long bytesReadRate; @Column(name="bytes_write_rate") - long bytesWriteRate; + Long bytesWriteRate; @Column(name="iops_read_rate") - long iopsReadRate; + Long iopsReadRate; @Column(name="iops_write_rate") - long iopsWriteRate; + Long iopsWriteRate; @Column(name="type") Type type; @@ -251,35 +251,35 @@ public class DiskOfferingJoinVO extends BaseViewVO implements InternalIdentity, this.type = type; } - public void setBytesReadRate(long bytesReadRate) { + public void setBytesReadRate(Long bytesReadRate) { this.bytesReadRate = bytesReadRate; } - public long getBytesReadRate() { + public Long getBytesReadRate() { return bytesReadRate; } - public void setBytesWriteRate(long bytesWriteRate) { + public void setBytesWriteRate(Long bytesWriteRate) { this.bytesWriteRate = bytesWriteRate; } - public long getBytesWriteRate() { + public Long getBytesWriteRate() { return bytesWriteRate; } - public void setIopsReadRate(long iopsReadRate) { + public void setIopsReadRate(Long iopsReadRate) { this.iopsReadRate = iopsReadRate; } - public long getIopsReadRate() { + public Long getIopsReadRate() { return iopsReadRate; } - public void setIopsWriteRate(long iopsWriteRate) { + public void setIopsWriteRate(Long iopsWriteRate) { this.iopsWriteRate = iopsWriteRate; } - public long getIopsWriteRate() { + public Long getIopsWriteRate() { return iopsWriteRate; } diff --git a/server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java b/server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java index 4011c6aaae8..05ff5f3f44a 100644 --- a/server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java +++ b/server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java @@ -91,16 +91,16 @@ public class ServiceOfferingJoinVO extends BaseViewVO implements InternalIdentit int sortKey; @Column(name="bytes_read_rate") - long bytesReadRate; + Long bytesReadRate; @Column(name="bytes_write_rate") - long bytesWriteRate; + Long bytesWriteRate; @Column(name="iops_read_rate") - long iopsReadRate; + Long iopsReadRate; @Column(name="iops_write_rate") - long iopsWriteRate; + Long iopsWriteRate; @Column(name=GenericDao.CREATED_COLUMN) private Date created; @@ -340,35 +340,35 @@ public class ServiceOfferingJoinVO extends BaseViewVO implements InternalIdentit this.volatileVm = volatileVm; } - public void setBytesReadRate(long bytesReadRate) { + public void setBytesReadRate(Long bytesReadRate) { this.bytesReadRate = bytesReadRate; } - public long getBytesReadRate() { + public Long getBytesReadRate() { return bytesReadRate; } - public void setBytesWriteRate(long bytesWriteRate) { + public void setBytesWriteRate(Long bytesWriteRate) { this.bytesWriteRate = bytesWriteRate; } - public long getBytesWriteRate() { + public Long getBytesWriteRate() { return bytesWriteRate; } - public void setIopsReadRate(long iopsReadRate) { + public void setIopsReadRate(Long iopsReadRate) { this.iopsReadRate = iopsReadRate; } - public long getIopsReadRate() { + public Long getIopsReadRate() { return iopsReadRate; } - public void setIopsWriteRate(long iopsWriteRate) { + public void setIopsWriteRate(Long iopsWriteRate) { this.iopsWriteRate = iopsWriteRate; } - public long getIopsWriteRate() { + public Long getIopsWriteRate() { return iopsWriteRate; } } diff --git a/server/src/com/cloud/api/query/vo/VolumeJoinVO.java b/server/src/com/cloud/api/query/vo/VolumeJoinVO.java index 7aeb0b3427d..735cf9ad08f 100644 --- a/server/src/com/cloud/api/query/vo/VolumeJoinVO.java +++ b/server/src/com/cloud/api/query/vo/VolumeJoinVO.java @@ -185,16 +185,16 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity { private boolean useLocalStorage; @Column(name="bytes_read_rate") - long bytesReadRate; + Long bytesReadRate; @Column(name="bytes_write_rate") - long bytesWriteRate; + Long bytesWriteRate; @Column(name="iops_read_rate") - long iopsReadRate; + Long iopsReadRate; @Column(name="iops_write_rate") - long iopsWriteRate; + Long iopsWriteRate; @Column(name="pool_id") private long poolId; @@ -754,35 +754,35 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity { } - public void setBytesReadRate(long bytesReadRate) { + public void setBytesReadRate(Long bytesReadRate) { this.bytesReadRate = bytesReadRate; } - public long getBytesReadRate() { + public Long getBytesReadRate() { return bytesReadRate; } - public void setBytesWriteRate(long bytesWriteRate) { + public void setBytesWriteRate(Long bytesWriteRate) { this.bytesWriteRate = bytesWriteRate; } - public long getBytesWriteRate() { + public Long getBytesWriteRate() { return bytesWriteRate; } - public void setIopsReadRate(long iopsReadRate) { + public void setIopsReadRate(Long iopsReadRate) { this.iopsReadRate = iopsReadRate; } - public long getIopsReadRate() { + public Long getIopsReadRate() { return iopsReadRate; } - public void setIopsWriteRate(long iopsWriteRate) { + public void setIopsWriteRate(Long iopsWriteRate) { this.iopsWriteRate = iopsWriteRate; } - public long getIopsWriteRate() { + public Long getIopsWriteRate() { return iopsWriteRate; } diff --git a/server/src/com/cloud/test/DatabaseConfig.java b/server/src/com/cloud/test/DatabaseConfig.java index 54e41f47ef1..ef0259d7c60 100755 --- a/server/src/com/cloud/test/DatabaseConfig.java +++ b/server/src/com/cloud/test/DatabaseConfig.java @@ -920,16 +920,16 @@ public class DatabaseConfig { ServiceOfferingVO serviceOffering = new ServiceOfferingVO(name, cpu, ramSize, speed, null, null, ha, displayText, useLocalStorage, false, null, false, null, false); Long bytesReadRate = Long.parseLong(_currentObjectParams.get("bytesReadRate")); - if (bytesReadRate != null && (bytesReadRate > 0)) + if ((bytesReadRate != null) && (bytesReadRate > 0)) serviceOffering.setBytesReadRate(bytesReadRate); Long bytesWriteRate = Long.parseLong(_currentObjectParams.get("bytesWriteRate")); - if (bytesWriteRate != null && (bytesWriteRate > 0)) + if ((bytesWriteRate != null) && (bytesWriteRate > 0)) serviceOffering.setBytesWriteRate(bytesWriteRate); Long iopsReadRate = Long.parseLong(_currentObjectParams.get("iopsReadRate")); - if (iopsReadRate != null && (iopsReadRate > 0)) + if ((iopsReadRate != null) && (iopsReadRate > 0)) serviceOffering.setIopsReadRate(iopsReadRate); Long iopsWriteRate = Long.parseLong(_currentObjectParams.get("iopsWriteRate")); - if (iopsWriteRate != null && (iopsWriteRate > 0)) + if ((iopsWriteRate != null) && (iopsWriteRate > 0)) serviceOffering.setIopsWriteRate(iopsWriteRate); ServiceOfferingDaoImpl dao = ComponentContext.inject(ServiceOfferingDaoImpl.class);