mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
merge to master
This commit is contained in:
commit
9aec9c605c
@ -37,6 +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;
|
||||
|
||||
public VolumeTO(long id, Volume.Type type, StoragePoolType poolType, String poolUuid, String name, String mountPoint, String path, long size, String chainInfo) {
|
||||
this.id = id;
|
||||
@ -133,4 +137,37 @@ public class VolumeTO implements InternalIdentity {
|
||||
public String toString() {
|
||||
return new StringBuilder("Vol[").append(id).append("|").append(type).append("|").append(path).append("|").append(size).append("]").toString();
|
||||
}
|
||||
|
||||
public void setBytesReadRate(Long bytesReadRate) {
|
||||
this.bytesReadRate = bytesReadRate;
|
||||
}
|
||||
|
||||
public Long getBytesReadRate() {
|
||||
return bytesReadRate;
|
||||
}
|
||||
|
||||
public void setBytesWriteRate(Long bytesWriteRate) {
|
||||
this.bytesWriteRate = bytesWriteRate;
|
||||
}
|
||||
|
||||
public Long getBytesWriteRate() {
|
||||
return bytesWriteRate;
|
||||
}
|
||||
|
||||
public void setIopsReadRate(Long iopsReadRate) {
|
||||
this.iopsReadRate = iopsReadRate;
|
||||
}
|
||||
|
||||
public Long getIopsReadRate() {
|
||||
return iopsReadRate;
|
||||
}
|
||||
|
||||
public void setIopsWriteRate(Long iopsWriteRate) {
|
||||
this.iopsWriteRate = iopsWriteRate;
|
||||
}
|
||||
|
||||
public Long getIopsWriteRate() {
|
||||
return iopsWriteRate;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -274,4 +274,6 @@ public interface NetworkModel {
|
||||
Networks.IsolationType[] listNetworkIsolationMethods();
|
||||
|
||||
Nic getNicInNetworkIncludingRemoved(long vmId, long networkId);
|
||||
|
||||
boolean getExecuteInSeqNtwkElmtCmd();
|
||||
}
|
||||
@ -52,4 +52,20 @@ public interface DiskOffering extends InfrastructureEntity, Identity, InternalId
|
||||
boolean isCustomized();
|
||||
|
||||
void setDiskSize(long diskSize);
|
||||
|
||||
void setBytesReadRate(Long bytesReadRate);
|
||||
|
||||
Long getBytesReadRate();
|
||||
|
||||
void setBytesWriteRate(Long bytesWriteRate);
|
||||
|
||||
Long getBytesWriteRate();
|
||||
|
||||
void setIopsReadRate(Long iopsReadRate);
|
||||
|
||||
Long getIopsReadRate();
|
||||
|
||||
void setIopsWriteRate(Long iopsWriteRate);
|
||||
|
||||
Long getIopsWriteRate();
|
||||
}
|
||||
|
||||
@ -16,8 +16,6 @@
|
||||
// under the License.
|
||||
package com.cloud.offering;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cloudstack.acl.InfrastructureEntity;
|
||||
import org.apache.cloudstack.api.Identity;
|
||||
import org.apache.cloudstack.api.InternalIdentity;
|
||||
@ -61,6 +59,8 @@ public interface NetworkOffering extends InfrastructureEntity, InternalIdentity,
|
||||
public final static String DefaultSharedEIPandELBNetworkOffering = "DefaultSharedNetscalerEIPandELBNetworkOffering";
|
||||
public final static String DefaultIsolatedNetworkOfferingForVpcNetworks = "DefaultIsolatedNetworkOfferingForVpcNetworks";
|
||||
public final static String DefaultIsolatedNetworkOfferingForVpcNetworksNoLB = "DefaultIsolatedNetworkOfferingForVpcNetworksNoLB";
|
||||
public final static String DefaultIsolatedNetworkOfferingForVpcNetworksWithInternalLB = "DefaultIsolatedNetworkOfferingForVpcNetworksWithInternalLB";
|
||||
|
||||
|
||||
/**
|
||||
* @return name for the network offering.
|
||||
|
||||
@ -98,8 +98,8 @@ public class Storage {
|
||||
Iscsi(true), // for e.g., ZFS Comstar
|
||||
ISO(false), // for iso image
|
||||
LVM(false), // XenServer local LVM SR
|
||||
CLVM(true),
|
||||
RBD(true),
|
||||
CLVM(true),
|
||||
RBD(true), // http://libvirt.org/storage.html#StorageBackendRBD
|
||||
SharedMountPoint(true),
|
||||
VMFS(true), // VMware VMFS storage
|
||||
PreSetup(true), // for XenServer, Storage Pool is set up by customers.
|
||||
|
||||
@ -153,7 +153,7 @@ public interface Volume extends ControlledEntity, Identity, InternalIdentity, Ba
|
||||
|
||||
Date getCreated();
|
||||
|
||||
long getDiskOfferingId();
|
||||
Long getDiskOfferingId();
|
||||
|
||||
String getChainInfo();
|
||||
|
||||
|
||||
@ -35,6 +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 HypervisorType hyperType;
|
||||
|
||||
@ -154,4 +158,36 @@ public class DiskProfile {
|
||||
public void setSize(long size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public void setBytesReadRate(Long bytesReadRate) {
|
||||
this.bytesReadRate = bytesReadRate;
|
||||
}
|
||||
|
||||
public Long getBytesReadRate() {
|
||||
return bytesReadRate;
|
||||
}
|
||||
|
||||
public void setBytesWriteRate(Long bytesWriteRate) {
|
||||
this.bytesWriteRate = bytesWriteRate;
|
||||
}
|
||||
|
||||
public Long getBytesWriteRate() {
|
||||
return bytesWriteRate;
|
||||
}
|
||||
|
||||
public void setIopsReadRate(Long iopsReadRate) {
|
||||
this.iopsReadRate = iopsReadRate;
|
||||
}
|
||||
|
||||
public Long getIopsReadRate() {
|
||||
return iopsReadRate;
|
||||
}
|
||||
|
||||
public void setIopsWriteRate(Long iopsWriteRate) {
|
||||
this.iopsWriteRate = iopsWriteRate;
|
||||
}
|
||||
|
||||
public Long getIopsWriteRate() {
|
||||
return iopsWriteRate;
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,6 +31,8 @@ public class ApiConstants {
|
||||
public static final String BOOTABLE = "bootable";
|
||||
public static final String BIND_DN = "binddn";
|
||||
public static final String BIND_PASSWORD = "bindpass";
|
||||
public static final String BYTES_READ_RATE = "bytesreadrate";
|
||||
public static final String BYTES_WRITE_RATE = "byteswriterate";
|
||||
public static final String CATEGORY = "category";
|
||||
public static final String CERTIFICATE = "certificate";
|
||||
public static final String PRIVATE_KEY = "privatekey";
|
||||
@ -104,6 +106,8 @@ public class ApiConstants {
|
||||
public static final String INTERNAL_DNS1 = "internaldns1";
|
||||
public static final String INTERNAL_DNS2 = "internaldns2";
|
||||
public static final String INTERVAL_TYPE = "intervaltype";
|
||||
public static final String IOPS_READ_RATE = "iopsreadrate";
|
||||
public static final String IOPS_WRITE_RATE = "iopswriterate";
|
||||
public static final String IP_ADDRESS = "ipaddress";
|
||||
public static final String IP6_ADDRESS = "ip6address";
|
||||
public static final String IP_ADDRESS_ID = "ipaddressid";
|
||||
@ -241,8 +245,7 @@ public class ApiConstants {
|
||||
public static final String IS_VOLATILE = "isvolatile";
|
||||
public static final String VOLUME_ID = "volumeid";
|
||||
public static final String ZONE_ID = "zoneid";
|
||||
public static final String ZONE_NAME = "zonename";
|
||||
public static final String ZONE_TYPE = "zonetype";
|
||||
public static final String ZONE_NAME = "zonename";
|
||||
public static final String NETWORK_TYPE = "networktype";
|
||||
public static final String PAGE = "page";
|
||||
public static final String PAGE_SIZE = "pagesize";
|
||||
|
||||
@ -70,9 +70,6 @@ public class ListClustersCmd extends BaseListCmd {
|
||||
@Parameter(name=ApiConstants.MANAGED_STATE, type=CommandType.STRING, description="whether this cluster is managed by cloudstack")
|
||||
private String managedState;
|
||||
|
||||
@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to")
|
||||
private String zoneType;
|
||||
|
||||
@Parameter(name=ApiConstants.SHOW_CAPACITIES, type=CommandType.BOOLEAN, description="flag to display the capacity of the clusters")
|
||||
private Boolean showCapacities;
|
||||
|
||||
@ -117,10 +114,7 @@ public class ListClustersCmd extends BaseListCmd {
|
||||
this.managedState = managedstate;
|
||||
}
|
||||
|
||||
public String getZoneType() {
|
||||
return zoneType;
|
||||
}
|
||||
|
||||
|
||||
public Boolean getShowCapacities() {
|
||||
return showCapacities;
|
||||
}
|
||||
|
||||
@ -70,13 +70,12 @@ public class FindHostsForMigrationCmd extends BaseListCmd {
|
||||
public void execute() {
|
||||
ListResponse<HostForMigrationResponse> response = null;
|
||||
Pair<List<? extends Host>,Integer> result;
|
||||
List<? extends Host> hostsWithCapacity = new ArrayList<Host>();
|
||||
Map<Host, Boolean> hostsRequiringStorageMotion;
|
||||
|
||||
Ternary<Pair<List<? extends Host>,Integer>, List<? extends Host>, Map<Host, Boolean>> hostsForMigration =
|
||||
_mgr.listHostsForMigrationOfVM(getVirtualMachineId(), this.getStartIndex(), this.getPageSizeVal());
|
||||
result = hostsForMigration.first();
|
||||
hostsWithCapacity = hostsForMigration.second();
|
||||
List<? extends Host> hostsWithCapacity = hostsForMigration.second();
|
||||
hostsRequiringStorageMotion = hostsForMigration.third();
|
||||
|
||||
response = new ListResponse<HostForMigrationResponse>();
|
||||
|
||||
@ -171,11 +171,10 @@ public class ListHostsCmd extends BaseListCmd {
|
||||
response = _queryService.searchForServers(this);
|
||||
} else {
|
||||
Pair<List<? extends Host>,Integer> result;
|
||||
List<? extends Host> hostsWithCapacity = new ArrayList<Host>();
|
||||
Ternary<Pair<List<? extends Host>,Integer>, List<? extends Host>, Map<Host, Boolean>> hostsForMigration =
|
||||
_mgr.listHostsForMigrationOfVM(getVirtualMachineId(), this.getStartIndex(), this.getPageSizeVal());
|
||||
result = hostsForMigration.first();
|
||||
hostsWithCapacity = hostsForMigration.second();
|
||||
List<? extends Host> hostsWithCapacity = hostsForMigration.second();
|
||||
|
||||
response = new ListResponse<HostResponse>();
|
||||
List<HostResponse> hostResponses = new ArrayList<HostResponse>();
|
||||
|
||||
@ -75,10 +75,7 @@ public class ListInternalLBVMsCmd extends BaseListProjectAndAccountResourcesCmd
|
||||
|
||||
@Parameter(name=ApiConstants.FOR_VPC, type=CommandType.BOOLEAN, description="if true is passed for this parameter, list only VPC Internal LB VMs")
|
||||
private Boolean forVpc;
|
||||
|
||||
@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to")
|
||||
private String zoneType;
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////////// Accessors ///////////////////////
|
||||
@ -123,10 +120,7 @@ public class ListInternalLBVMsCmd extends BaseListProjectAndAccountResourcesCmd
|
||||
public String getRole() {
|
||||
return Role.INTERNAL_LB_VM.toString();
|
||||
}
|
||||
|
||||
public String getZoneType() {
|
||||
return zoneType;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////// API Implementation///////////////////
|
||||
|
||||
@ -43,10 +43,9 @@ public class LDAPConfigCmd extends BaseCmd {
|
||||
/////////////////////////////////////////////////////
|
||||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@Parameter(name=ApiConstants.LIST_ALL, type=CommandType.STRING, description="Hostname or ip address of the ldap server eg: my.ldap.com")
|
||||
private String listall;
|
||||
|
||||
@Parameter(name=ApiConstants.LIST_ALL, type=CommandType.BOOLEAN, description="If true return current LDAP configuration")
|
||||
private Boolean listAll;
|
||||
|
||||
@Parameter(name=ApiConstants.HOST_NAME, type=CommandType.STRING, description="Hostname or ip address of the ldap server eg: my.ldap.com")
|
||||
private String hostname;
|
||||
|
||||
@ -78,10 +77,10 @@ public class LDAPConfigCmd extends BaseCmd {
|
||||
/////////////////// Accessors ///////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
public String getListAll() {
|
||||
return listall == null ? "false" : listall;
|
||||
public Boolean getListAll() {
|
||||
return listAll == null ? Boolean.FALSE : listAll;
|
||||
}
|
||||
|
||||
|
||||
public String getBindPassword() {
|
||||
return bindPassword;
|
||||
}
|
||||
@ -156,16 +155,15 @@ public class LDAPConfigCmd extends BaseCmd {
|
||||
InsufficientCapacityException, ServerApiException,
|
||||
ConcurrentOperationException, ResourceAllocationException {
|
||||
try {
|
||||
if ("true".equalsIgnoreCase(getListAll())){
|
||||
if (getListAll()){
|
||||
// return the existing conf
|
||||
LDAPConfigCmd cmd = _configService.listLDAPConfig(this);
|
||||
LDAPConfigResponse lr = _responseGenerator.createLDAPConfigResponse(cmd.getHostname(), cmd.getPort(), cmd.getUseSSL(),
|
||||
cmd.getQueryFilter(), cmd.getSearchBase(), cmd.getBindDN());
|
||||
LDAPConfigResponse lr = _responseGenerator.createLDAPConfigResponse(cmd.getHostname(), cmd.getPort(), cmd.getUseSSL(), cmd.getQueryFilter(), cmd.getSearchBase(), cmd.getBindDN());
|
||||
lr.setResponseName(getCommandName());
|
||||
this.setResponseObject(lr);
|
||||
}
|
||||
else if (getHostname()==null || getSearchBase() == null || getQueryFilter() == null) {
|
||||
throw new InvalidParameterValueException("You need to provide hostname, serachbase and queryfilter to configure your LDAP server");
|
||||
throw new InvalidParameterValueException("You need to provide hostname, searchbase and queryfilter to configure your LDAP server");
|
||||
}
|
||||
else {
|
||||
boolean result = _configService.updateLDAP(this);
|
||||
|
||||
@ -95,7 +95,7 @@ public class CreateNetworkOfferingCmd extends BaseCmd {
|
||||
@Parameter(name=ApiConstants.IS_PERSISTENT, type=CommandType.BOOLEAN, description="true if network offering supports persistent networks; defaulted to false if not specified")
|
||||
private Boolean isPersistent;
|
||||
|
||||
@Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, since="4.2.0", description="Template details in key/value pairs." +
|
||||
@Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, since="4.2.0", description="Network offering details in key/value pairs." +
|
||||
" Supported keys are internallbprovider/publiclbprovider with service provider as a value")
|
||||
protected Map details;
|
||||
|
||||
|
||||
@ -62,6 +62,18 @@ public class CreateDiskOfferingCmd extends BaseCmd {
|
||||
@Parameter(name=ApiConstants.STORAGE_TYPE, type=CommandType.STRING, description="the storage type of the disk offering. Values are local and shared.")
|
||||
private String storageType = ServiceOffering.StorageType.shared.toString();
|
||||
|
||||
@Parameter(name=ApiConstants.BYTES_READ_RATE, type=CommandType.LONG, required=false, description="bytes read rate of the disk offering")
|
||||
private Long bytesReadRate;
|
||||
|
||||
@Parameter(name=ApiConstants.BYTES_WRITE_RATE, type=CommandType.LONG, required=false, description="bytes write rate of the disk offering")
|
||||
private Long bytesWriteRate;
|
||||
|
||||
@Parameter(name=ApiConstants.IOPS_READ_RATE, type=CommandType.LONG, required=false, description="io requests read rate of the disk offering")
|
||||
private Long iopsReadRate;
|
||||
|
||||
@Parameter(name=ApiConstants.IOPS_WRITE_RATE, type=CommandType.LONG, required=false, description="io requests write rate of the disk offering")
|
||||
private Long iopsWriteRate;
|
||||
|
||||
@Parameter(name=ApiConstants.DISPLAY_OFFERING, type=CommandType.BOOLEAN, description="an optional field, whether to display the offering to the end user or not.")
|
||||
private Boolean displayOffering;
|
||||
|
||||
@ -93,6 +105,22 @@ public class CreateDiskOfferingCmd extends BaseCmd {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
public Long getBytesReadRate() {
|
||||
return bytesReadRate;
|
||||
}
|
||||
|
||||
public Long getBytesWriteRate() {
|
||||
return bytesWriteRate;
|
||||
}
|
||||
|
||||
public Long getIopsReadRate() {
|
||||
return iopsReadRate;
|
||||
}
|
||||
|
||||
public Long getIopsWriteRate() {
|
||||
return iopsWriteRate;
|
||||
}
|
||||
|
||||
public String getStorageType() {
|
||||
return storageType;
|
||||
}
|
||||
|
||||
@ -93,6 +93,18 @@ public class CreateServiceOfferingCmd extends BaseCmd {
|
||||
@Parameter(name = ApiConstants.SERVICE_OFFERING_DETAILS, type = CommandType.MAP, description = "details for planner, used to store specific parameters")
|
||||
private Map<String, String> details;
|
||||
|
||||
@Parameter(name=ApiConstants.BYTES_READ_RATE, type=CommandType.LONG, required=false, description="bytes read rate of the disk offering")
|
||||
private Long bytesReadRate;
|
||||
|
||||
@Parameter(name=ApiConstants.BYTES_WRITE_RATE, type=CommandType.LONG, required=false, description="bytes write rate of the disk offering")
|
||||
private Long bytesWriteRate;
|
||||
|
||||
@Parameter(name=ApiConstants.IOPS_READ_RATE, type=CommandType.LONG, required=false, description="io requests read rate of the disk offering")
|
||||
private Long iopsReadRate;
|
||||
|
||||
@Parameter(name=ApiConstants.IOPS_WRITE_RATE, type=CommandType.LONG, required=false, description="io requests write rate of the disk offering")
|
||||
private Long iopsWriteRate;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////////// Accessors ///////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
@ -171,6 +183,22 @@ public class CreateServiceOfferingCmd extends BaseCmd {
|
||||
return params;
|
||||
}
|
||||
|
||||
public Long getBytesReadRate() {
|
||||
return bytesReadRate;
|
||||
}
|
||||
|
||||
public Long getBytesWriteRate() {
|
||||
return bytesWriteRate;
|
||||
}
|
||||
|
||||
public Long getIopsReadRate() {
|
||||
return iopsReadRate;
|
||||
}
|
||||
|
||||
public Long getIopsWriteRate() {
|
||||
return iopsWriteRate;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////// API Implementation///////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@ -55,9 +55,6 @@ public class ListPodsByCmd extends BaseListCmd {
|
||||
@Parameter(name=ApiConstants.ALLOCATION_STATE, type=CommandType.STRING, description="list pods by allocation state")
|
||||
private String allocationState;
|
||||
|
||||
@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to")
|
||||
private String zoneType;
|
||||
|
||||
@Parameter(name=ApiConstants.SHOW_CAPACITIES, type=CommandType.BOOLEAN, description="flag to display the capacity of the pods")
|
||||
private Boolean showCapacities;
|
||||
|
||||
@ -81,10 +78,6 @@ public class ListPodsByCmd extends BaseListCmd {
|
||||
return allocationState;
|
||||
}
|
||||
|
||||
public String getZoneType() {
|
||||
return zoneType;
|
||||
}
|
||||
|
||||
public Boolean getShowCapacities() {
|
||||
return showCapacities;
|
||||
}
|
||||
|
||||
@ -81,9 +81,8 @@ public class ListPortableIpRangesCmd extends BaseListCmd {
|
||||
public void execute(){
|
||||
ListResponse<PortableIpRangeResponse> response = new ListResponse<PortableIpRangeResponse>();
|
||||
List<PortableIpRangeResponse> responses = new ArrayList<PortableIpRangeResponse>();
|
||||
List<? extends PortableIpRange> portableIpRanges = new ArrayList<PortableIpRange>();
|
||||
|
||||
portableIpRanges = _configService.listPortableIpRanges(this);
|
||||
List<? extends PortableIpRange> portableIpRanges = _configService.listPortableIpRanges(this);
|
||||
if (portableIpRanges != null && !portableIpRanges.isEmpty()) {
|
||||
for (PortableIpRange range : portableIpRanges) {
|
||||
PortableIpRangeResponse rangeResponse = _responseGenerator.createPortableIPRangeResponse(range);
|
||||
|
||||
@ -65,9 +65,6 @@ public class ListRoutersCmd extends BaseListProjectAndAccountResourcesCmd {
|
||||
description="the Zone ID of the router")
|
||||
private Long zoneId;
|
||||
|
||||
@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to")
|
||||
private String zoneType;
|
||||
|
||||
@Parameter(name=ApiConstants.NETWORK_ID, type=CommandType.UUID, entityType=NetworkResponse.class,
|
||||
description="list by network id")
|
||||
private Long networkId;
|
||||
@ -107,10 +104,6 @@ public class ListRoutersCmd extends BaseListProjectAndAccountResourcesCmd {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
public String getZoneType() {
|
||||
return zoneType;
|
||||
}
|
||||
|
||||
public Long getNetworkId() {
|
||||
return networkId;
|
||||
}
|
||||
|
||||
@ -64,6 +64,10 @@ public class ListStoragePoolsCmd extends BaseListCmd {
|
||||
description="the ID of the storage pool")
|
||||
private Long id;
|
||||
|
||||
@Parameter(name=ApiConstants.SCOPE, type=CommandType.STRING, entityType = StoragePoolResponse.class,
|
||||
description="the ID of the storage pool")
|
||||
private String scope;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////////// Accessors ///////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
@ -115,4 +119,8 @@ public class ListStoragePoolsCmd extends BaseListCmd {
|
||||
response.setResponseName(getCommandName());
|
||||
this.setResponseObject(response);
|
||||
}
|
||||
|
||||
public String getScope() {
|
||||
return scope;
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,9 +74,6 @@ public class ListSystemVMsCmd extends BaseListCmd {
|
||||
description="the storage ID where vm's volumes belong to", since="3.0.1")
|
||||
private Long storageId;
|
||||
|
||||
@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to")
|
||||
private String zoneType;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////////// Accessors ///////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
@ -113,10 +110,6 @@ public class ListSystemVMsCmd extends BaseListCmd {
|
||||
return storageId;
|
||||
}
|
||||
|
||||
public String getZoneType() {
|
||||
return zoneType;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////// API Implementation///////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@ -78,9 +78,6 @@ public class ListIsosCmd extends BaseListTaggedResourcesCmd {
|
||||
description="the ID of the zone")
|
||||
private Long zoneId;
|
||||
|
||||
@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to")
|
||||
private String zoneType;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////////// Accessors ///////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
@ -118,10 +115,6 @@ public class ListIsosCmd extends BaseListTaggedResourcesCmd {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
public String getZoneType() {
|
||||
return zoneType;
|
||||
}
|
||||
|
||||
public boolean listInReadyState() {
|
||||
Account account = UserContext.current().getCaller();
|
||||
// It is account specific if account is admin type and domainId and accountName are not null
|
||||
|
||||
@ -48,9 +48,6 @@ public class ListNetworksCmd extends BaseListTaggedResourcesCmd {
|
||||
description="the Zone ID of the network")
|
||||
private Long zoneId;
|
||||
|
||||
@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to")
|
||||
private String zoneType;
|
||||
|
||||
@Parameter(name=ApiConstants.TYPE, type=CommandType.STRING, description="the type of the network. Supported values are: Isolated and Shared")
|
||||
private String guestIpType;
|
||||
|
||||
@ -99,10 +96,6 @@ public class ListNetworksCmd extends BaseListTaggedResourcesCmd {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
public String getZoneType() {
|
||||
return zoneType;
|
||||
}
|
||||
|
||||
public String getGuestIpType() {
|
||||
return guestIpType;
|
||||
}
|
||||
|
||||
@ -59,13 +59,11 @@ public class ListSnapshotsCmd extends BaseListTaggedResourcesCmd {
|
||||
@Parameter(name=ApiConstants.VOLUME_ID, type=CommandType.UUID, entityType = VolumeResponse.class,
|
||||
description="the ID of the disk volume")
|
||||
private Long volumeId;
|
||||
|
||||
@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to")
|
||||
private String zoneType;
|
||||
|
||||
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "list snapshots by zone id")
|
||||
private Long zoneId;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////////// Accessors ///////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
@ -90,14 +88,10 @@ public class ListSnapshotsCmd extends BaseListTaggedResourcesCmd {
|
||||
return volumeId;
|
||||
}
|
||||
|
||||
public String getZoneType() {
|
||||
return zoneType;
|
||||
}
|
||||
|
||||
public Long getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////// API Implementation///////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@ -69,10 +69,6 @@ public class ListTemplatesCmd extends BaseListTaggedResourcesCmd {
|
||||
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class,
|
||||
description="list templates by zoneId")
|
||||
private Long zoneId;
|
||||
|
||||
@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to")
|
||||
private String zoneType;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////////// Accessors ///////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
@ -97,10 +93,6 @@ public class ListTemplatesCmd extends BaseListTaggedResourcesCmd {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
public String getZoneType() {
|
||||
return zoneType;
|
||||
}
|
||||
|
||||
public boolean listInReadyState() {
|
||||
|
||||
Account account = UserContext.current().getCaller();
|
||||
|
||||
@ -57,8 +57,8 @@ public class ListZonesByCmd extends BaseListCmd {
|
||||
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the zone")
|
||||
private String name;
|
||||
|
||||
@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to")
|
||||
private String zoneType;
|
||||
@Parameter(name=ApiConstants.NETWORK_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to")
|
||||
private String networkType;
|
||||
|
||||
@Parameter(name=ApiConstants.SHOW_CAPACITIES, type=CommandType.BOOLEAN, description="flag to display the capacity of the zones")
|
||||
private Boolean showCapacities;
|
||||
@ -83,8 +83,8 @@ public class ListZonesByCmd extends BaseListCmd {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getZoneType() {
|
||||
return zoneType;
|
||||
public String getNetworkType() {
|
||||
return networkType;
|
||||
}
|
||||
|
||||
public Boolean getShowCapacities() {
|
||||
|
||||
@ -45,10 +45,7 @@ public class ClusterResponse extends BaseResponse {
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name of the cluster")
|
||||
private String zoneName;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
|
||||
private String zoneType;
|
||||
|
||||
|
||||
@SerializedName("hypervisortype") @Param(description="the hypervisor type of the cluster")
|
||||
private String hypervisorType;
|
||||
|
||||
@ -118,10 +115,6 @@ public class ClusterResponse extends BaseResponse {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
public String getClusterType() {
|
||||
return clusterType;
|
||||
}
|
||||
|
||||
@ -58,6 +58,18 @@ public class DiskOfferingResponse extends BaseResponse {
|
||||
@SerializedName("storagetype") @Param(description="the storage type for this disk offering")
|
||||
private String storageType;
|
||||
|
||||
@SerializedName("diskBytesReadRate") @Param(description="bytes read rate of the disk offering")
|
||||
private Long bytesReadRate;
|
||||
|
||||
@SerializedName("diskBytesWriteRate") @Param(description="bytes write rate of the disk offering")
|
||||
private Long bytesWriteRate;
|
||||
|
||||
@SerializedName("diskIopsReadRate") @Param(description="io requests read rate of the disk offering")
|
||||
private Long iopsReadRate;
|
||||
|
||||
@SerializedName("diskIopsWriteRate") @Param(description="io requests write rate of the disk offering")
|
||||
private Long iopsWriteRate;
|
||||
|
||||
@SerializedName("displayoffering") @Param(description="whether to display the offering to the end user or not.")
|
||||
private Boolean displayOffering;
|
||||
|
||||
@ -149,4 +161,20 @@ public class DiskOfferingResponse extends BaseResponse {
|
||||
public void setStorageType(String storageType) {
|
||||
this.storageType = storageType;
|
||||
}
|
||||
|
||||
public void setBytesReadRate(Long bytesReadRate) {
|
||||
this.bytesReadRate = bytesReadRate;
|
||||
}
|
||||
|
||||
public void setBytesWriteRate(Long bytesWriteRate) {
|
||||
this.bytesWriteRate = bytesWriteRate;
|
||||
}
|
||||
|
||||
public void setIopsReadRate(Long iopsReadRate) {
|
||||
this.iopsReadRate = iopsReadRate;
|
||||
}
|
||||
|
||||
public void setIopsWriteRate(Long iopsWriteRate) {
|
||||
this.iopsWriteRate = iopsWriteRate;
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,9 +42,6 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView
|
||||
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name for the router")
|
||||
private String zoneName;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
|
||||
private String zoneType;
|
||||
|
||||
@SerializedName(ApiConstants.DNS1) @Param(description="the first DNS for the router")
|
||||
private String dns1;
|
||||
|
||||
@ -188,14 +185,6 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public String getZoneType() {
|
||||
return zoneType;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
public void setDns1(String dns1) {
|
||||
this.dns1 = dns1;
|
||||
}
|
||||
|
||||
@ -59,10 +59,7 @@ public class HostResponse extends BaseResponse {
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name of the host")
|
||||
private String zoneName;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
|
||||
private String zoneType;
|
||||
|
||||
|
||||
@SerializedName(ApiConstants.POD_ID) @Param(description="the Pod ID of the host")
|
||||
private String podId;
|
||||
|
||||
@ -212,10 +209,6 @@ public class HostResponse extends BaseResponse {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
public void setPodId(String podId) {
|
||||
this.podId = podId;
|
||||
}
|
||||
|
||||
@ -66,9 +66,6 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the name of the zone the network belongs to")
|
||||
private String zoneName;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_TYPE) @Param(description="the networktype of the zone the network belongs to")
|
||||
private String zoneType;
|
||||
|
||||
@SerializedName("networkofferingid") @Param(description="network offering id the network is created from")
|
||||
private String networkOfferingId;
|
||||
@ -309,10 +306,6 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
public void setCidr(String cidr) {
|
||||
this.cidr = cidr;
|
||||
}
|
||||
|
||||
@ -36,13 +36,10 @@ public class PodResponse extends BaseResponse {
|
||||
|
||||
@SerializedName("zoneid") @Param(description="the Zone ID of the Pod")
|
||||
private String zoneId;
|
||||
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name of the Pod")
|
||||
private String zoneName;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
|
||||
private String zoneType;
|
||||
|
||||
@SerializedName("gateway") @Param(description="the gateway of the Pod")
|
||||
private String gateway;
|
||||
|
||||
@ -89,10 +86,6 @@ public class PodResponse extends BaseResponse {
|
||||
return zoneName;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
@ -87,6 +87,18 @@ public class ServiceOfferingResponse extends BaseResponse {
|
||||
@SerializedName(ApiConstants.NETWORKRATE) @Param(description="data transfer rate in megabits per second allowed.")
|
||||
private Integer networkRate;
|
||||
|
||||
@SerializedName("diskBytesReadRate") @Param(description="bytes read rate of the service offering")
|
||||
private Long bytesReadRate;
|
||||
|
||||
@SerializedName("diskBytesWriteRate") @Param(description="bytes write rate of the service offering")
|
||||
private Long bytesWriteRate;
|
||||
|
||||
@SerializedName("diskIopsReadRate") @Param(description="io requests read rate of the service offering")
|
||||
private Long iopsReadRate;
|
||||
|
||||
@SerializedName("diskIopsWriteRate") @Param(description="io requests write rate of the service offering")
|
||||
private Long iopsWriteRate;
|
||||
|
||||
@SerializedName(ApiConstants.DEPLOYMENT_PLANNER) @Param(description="deployment strategy used to deploy VM.")
|
||||
private String deploymentPlanner;
|
||||
|
||||
@ -248,4 +260,20 @@ public class ServiceOfferingResponse extends BaseResponse {
|
||||
public void setVolatileVm(boolean isVolatile) {
|
||||
this.isVolatile = isVolatile;
|
||||
}
|
||||
|
||||
public void setBytesReadRate(Long bytesReadRate) {
|
||||
this.bytesReadRate = bytesReadRate;
|
||||
}
|
||||
|
||||
public void setBytesWriteRate(Long bytesWriteRate) {
|
||||
this.bytesWriteRate = bytesWriteRate;
|
||||
}
|
||||
|
||||
public void setIopsReadRate(Long iopsReadRate) {
|
||||
this.iopsReadRate = iopsReadRate;
|
||||
}
|
||||
|
||||
public void setIopsWriteRate(Long iopsWriteRate) {
|
||||
this.iopsWriteRate = iopsWriteRate;
|
||||
}
|
||||
}
|
||||
|
||||
@ -97,14 +97,6 @@ public class SnapshotResponse extends BaseResponse implements ControlledEntityRe
|
||||
@Param(description = "id of the availability zone")
|
||||
private String zoneId;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_NAME)
|
||||
@Param(description = "name of the availability zone")
|
||||
private String zoneName;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_TYPE)
|
||||
@Param(description = "network type of the availability zone")
|
||||
private String zoneType;
|
||||
|
||||
@SerializedName(ApiConstants.TAGS) @Param(description="the list of resource tags associated with snapshot", responseObject = ResourceTagResponse.class)
|
||||
private List<ResourceTagResponse> tags;
|
||||
|
||||
@ -188,14 +180,7 @@ public class SnapshotResponse extends BaseResponse implements ControlledEntityRe
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
|
||||
public void setTags(List<ResourceTagResponse> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
@ -37,14 +37,12 @@ public class StoragePoolResponse extends BaseResponse {
|
||||
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name of the storage pool")
|
||||
private String zoneName;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
|
||||
private String zoneType;
|
||||
|
||||
@SerializedName("podid") @Param(description="the Pod ID of the storage pool")
|
||||
private String podId;
|
||||
|
||||
@SerializedName("podname") @Param(description="the Pod name of the storage pool")
|
||||
private String podName;
|
||||
private String podName;
|
||||
|
||||
@SerializedName("name") @Param(description="the name of the storage pool")
|
||||
private String name;
|
||||
@ -143,14 +141,6 @@ public class StoragePoolResponse extends BaseResponse {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public String getZoneType() {
|
||||
return zoneType;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
public String getPodId() {
|
||||
return podId;
|
||||
}
|
||||
|
||||
@ -46,9 +46,6 @@ public class SystemVmResponse extends BaseResponse {
|
||||
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name for the system VM")
|
||||
private String zoneName;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
|
||||
private String zoneType;
|
||||
|
||||
@SerializedName("dns1") @Param(description="the first DNS for the system VM")
|
||||
private String dns1;
|
||||
|
||||
@ -153,15 +150,7 @@ public class SystemVmResponse extends BaseResponse {
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public String getZoneType() {
|
||||
return zoneType;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
public String getDns1() {
|
||||
return dns1;
|
||||
}
|
||||
|
||||
@ -91,9 +91,6 @@ public class TemplateResponse extends BaseResponse implements ControlledViewEnti
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the name of the zone for this template")
|
||||
private String zoneName;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_TYPE) @Param(description="the networktype of the zone for this template")
|
||||
private String zoneType;
|
||||
|
||||
@SerializedName(ApiConstants.STATUS) @Param(description="the status of the template")
|
||||
private String status;
|
||||
@ -171,10 +168,6 @@ public class TemplateResponse extends BaseResponse implements ControlledViewEnti
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
public void setAccountId(String accountId) {
|
||||
this.accountId = accountId;
|
||||
}
|
||||
|
||||
@ -80,9 +80,6 @@ public class UserVmResponse extends BaseResponse implements ControlledEntityResp
|
||||
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the name of the availability zone for the virtual machine")
|
||||
private String zoneName;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_TYPE) @Param(description="the network type of the availability zone for the virtual machine")
|
||||
private String zoneType;
|
||||
|
||||
@SerializedName(ApiConstants.HOST_ID) @Param(description="the ID of the host for the virtual machine")
|
||||
private String hostId;
|
||||
|
||||
@ -273,10 +270,6 @@ public class UserVmResponse extends BaseResponse implements ControlledEntityResp
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
public void setHostId(String hostId) {
|
||||
this.hostId = hostId;
|
||||
}
|
||||
|
||||
@ -47,10 +47,6 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
|
||||
@SerializedName(ApiConstants.ZONE_NAME)
|
||||
@Param(description = "name of the availability zone")
|
||||
private String zoneName;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_TYPE)
|
||||
@Param(description = "network type of the availability zone")
|
||||
private String zoneType;
|
||||
|
||||
@SerializedName(ApiConstants.TYPE)
|
||||
@Param(description = "type of the disk volume (ROOT or DATADISK)")
|
||||
@ -110,6 +106,18 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
|
||||
@Param(description = "shared or local storage")
|
||||
private String storageType;
|
||||
|
||||
@SerializedName("diskBytesReadRate") @Param(description="bytes read rate of the disk volume")
|
||||
private Long bytesReadRate;
|
||||
|
||||
@SerializedName("diskBytesWriteRate") @Param(description="bytes write rate of the disk volume")
|
||||
private Long bytesWriteRate;
|
||||
|
||||
@SerializedName("diskIopsReadRate") @Param(description="io requests read rate of the disk volume")
|
||||
private Long iopsReadRate;
|
||||
|
||||
@SerializedName("diskIopsWriteRate") @Param(description="io requests write rate of the disk volume")
|
||||
private Long iopsWriteRate;
|
||||
|
||||
@SerializedName(ApiConstants.HYPERVISOR)
|
||||
@Param(description = "Hypervisor the volume belongs to")
|
||||
private String hypervisor;
|
||||
@ -205,10 +213,6 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
public void setVolumeType(String volumeType) {
|
||||
this.volumeType = volumeType;
|
||||
}
|
||||
@ -258,6 +262,38 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
|
||||
this.storageType = storageType;
|
||||
}
|
||||
|
||||
public void setBytesReadRate(Long bytesReadRate) {
|
||||
this.bytesReadRate = bytesReadRate;
|
||||
}
|
||||
|
||||
public Long getBytesReadRate() {
|
||||
return bytesReadRate;
|
||||
}
|
||||
|
||||
public void setBytesWriteRate(Long bytesWriteRate) {
|
||||
this.bytesWriteRate = bytesWriteRate;
|
||||
}
|
||||
|
||||
public Long getBytesWriteRate() {
|
||||
return bytesWriteRate;
|
||||
}
|
||||
|
||||
public void setIopsReadRate(Long iopsReadRate) {
|
||||
this.iopsReadRate = iopsReadRate;
|
||||
}
|
||||
|
||||
public Long getIopsReadRate() {
|
||||
return iopsReadRate;
|
||||
}
|
||||
|
||||
public void setIopsWriteRate(Long iopsWriteRate) {
|
||||
this.iopsWriteRate = iopsWriteRate;
|
||||
}
|
||||
|
||||
public Long getIopsWriteRate() {
|
||||
return iopsWriteRate;
|
||||
}
|
||||
|
||||
public void setHypervisor(String hypervisor) {
|
||||
this.hypervisor = hypervisor;
|
||||
}
|
||||
|
||||
@ -22,16 +22,17 @@
|
||||
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
|
||||
<web-app>
|
||||
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
<display-name>CloudBridge</display-name>
|
||||
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>classpath:applicationContext.xml</param-value>
|
||||
</context-param>
|
||||
|
||||
<display-name>CloudBridge</display-name>
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>EC2MainServlet</servlet-name>
|
||||
<display-name>EC2 Main Servlet</display-name>
|
||||
|
||||
@ -466,6 +466,10 @@ label.disable.vpn=Disable VPN
|
||||
label.disabled=Disabled
|
||||
label.disabling.vpn.access=Disabling VPN Access
|
||||
label.disk.allocated=Disk Allocated
|
||||
label.disk.bytes.read.rate=Disk Read Rate (BPS)
|
||||
label.disk.bytes.write.rate=Disk Write Rate (BPS)
|
||||
label.disk.iops.read.rate=Disk Read Rate (IOPS)
|
||||
label.disk.iops.write.rate=Disk Write Rate (IOPS)
|
||||
label.disk.offering=Disk Offering
|
||||
label.disk.read.bytes=Disk Read (Bytes)
|
||||
label.disk.read.io=Disk Read (IO)
|
||||
|
||||
@ -29,6 +29,10 @@ public class AttachVolumeCommand extends Command {
|
||||
String volumeName;
|
||||
Long deviceId;
|
||||
String chainInfo;
|
||||
Long bytesReadRate;
|
||||
Long bytesWriteRate;
|
||||
Long iopsReadRate;
|
||||
Long iopsWriteRate;
|
||||
|
||||
protected AttachVolumeCommand() {
|
||||
}
|
||||
@ -96,4 +100,36 @@ public class AttachVolumeCommand extends Command {
|
||||
public String getChainInfo() {
|
||||
return chainInfo;
|
||||
}
|
||||
|
||||
public void setBytesReadRate(Long bytesReadRate) {
|
||||
this.bytesReadRate = bytesReadRate;
|
||||
}
|
||||
|
||||
public Long getBytesReadRate() {
|
||||
return bytesReadRate;
|
||||
}
|
||||
|
||||
public void setBytesWriteRate(Long bytesWriteRate) {
|
||||
this.bytesWriteRate = bytesWriteRate;
|
||||
}
|
||||
|
||||
public Long getBytesWriteRate() {
|
||||
return bytesWriteRate;
|
||||
}
|
||||
|
||||
public void setIopsReadRate(Long iopsReadRate) {
|
||||
this.iopsReadRate = iopsReadRate;
|
||||
}
|
||||
|
||||
public Long getIopsReadRate() {
|
||||
return iopsReadRate;
|
||||
}
|
||||
|
||||
public void setIopsWriteRate(Long iopsWriteRate) {
|
||||
this.iopsWriteRate = iopsWriteRate;
|
||||
}
|
||||
|
||||
public Long getIopsWriteRate() {
|
||||
return iopsWriteRate;
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,6 +24,7 @@ import com.cloud.host.Host;
|
||||
public class StartCommand extends Command {
|
||||
VirtualMachineTO vm;
|
||||
String hostIp;
|
||||
boolean executeInSequence = false;
|
||||
|
||||
public VirtualMachineTO getVirtualMachine() {
|
||||
return vm;
|
||||
@ -31,19 +32,16 @@ public class StartCommand extends Command {
|
||||
|
||||
@Override
|
||||
public boolean executeInSequence() {
|
||||
return true;
|
||||
return executeInSequence;
|
||||
}
|
||||
|
||||
protected StartCommand() {
|
||||
}
|
||||
|
||||
public StartCommand(VirtualMachineTO vm) {
|
||||
this.vm = vm;
|
||||
}
|
||||
|
||||
public StartCommand(VirtualMachineTO vm, Host host) {
|
||||
public StartCommand(VirtualMachineTO vm, Host host, boolean executeInSequence) {
|
||||
this.vm = vm;
|
||||
this.hostIp = host.getPrivateIpAddress();
|
||||
this.executeInSequence = executeInSequence;
|
||||
}
|
||||
|
||||
public String getHostIp() {
|
||||
|
||||
@ -23,28 +23,33 @@ public class StopCommand extends RebootCommand {
|
||||
private boolean isProxy=false;
|
||||
private String urlPort=null;
|
||||
private String publicConsoleProxyIpAddress=null;
|
||||
boolean executeInSequence = false;
|
||||
|
||||
protected StopCommand() {
|
||||
}
|
||||
|
||||
public StopCommand(VirtualMachine vm, boolean isProxy, String urlPort, String publicConsoleProxyIpAddress) {
|
||||
public StopCommand(VirtualMachine vm, boolean isProxy, String urlPort, String publicConsoleProxyIpAddress, boolean executeInSequence) {
|
||||
super(vm);
|
||||
this.isProxy = isProxy;
|
||||
this.urlPort = urlPort;
|
||||
this.publicConsoleProxyIpAddress = publicConsoleProxyIpAddress;
|
||||
this.executeInSequence = executeInSequence;
|
||||
}
|
||||
|
||||
public StopCommand(VirtualMachine vm, String vnet) {
|
||||
public StopCommand(VirtualMachine vm, String vnet, boolean executeInSequence) {
|
||||
super(vm);
|
||||
this.vnet = vnet;
|
||||
this.executeInSequence = executeInSequence;
|
||||
}
|
||||
|
||||
public StopCommand(VirtualMachine vm) {
|
||||
public StopCommand(VirtualMachine vm, boolean executeInSequence) {
|
||||
super(vm);
|
||||
this.executeInSequence = executeInSequence;
|
||||
}
|
||||
|
||||
public StopCommand(String vmName) {
|
||||
public StopCommand(String vmName, boolean executeInSequence) {
|
||||
super(vmName);
|
||||
this.executeInSequence = executeInSequence;
|
||||
}
|
||||
|
||||
public String getVnet() {
|
||||
@ -53,7 +58,7 @@ public class StopCommand extends RebootCommand {
|
||||
|
||||
@Override
|
||||
public boolean executeInSequence() {
|
||||
return true;
|
||||
return executeInSequence;
|
||||
}
|
||||
|
||||
public boolean isProxy() {
|
||||
|
||||
@ -32,6 +32,7 @@ public class DhcpEntryCommand extends NetworkElementCommand {
|
||||
String ip6Gateway;
|
||||
String duid;
|
||||
private boolean isDefault;
|
||||
boolean executeInSequence = false;
|
||||
|
||||
protected DhcpEntryCommand() {
|
||||
|
||||
@ -39,19 +40,20 @@ public class DhcpEntryCommand extends NetworkElementCommand {
|
||||
|
||||
@Override
|
||||
public boolean executeInSequence() {
|
||||
return true;
|
||||
return executeInSequence;
|
||||
}
|
||||
|
||||
public DhcpEntryCommand(String vmMac, String vmIpAddress, String vmName, String vmIp6Address) {
|
||||
public DhcpEntryCommand(String vmMac, String vmIpAddress, String vmName, String vmIp6Address, boolean executeInSequence) {
|
||||
this.vmMac = vmMac;
|
||||
this.vmIpAddress = vmIpAddress;
|
||||
this.vmName = vmName;
|
||||
this.vmIp6Address = vmIp6Address;
|
||||
this.setDefault(true);
|
||||
this.executeInSequence = executeInSequence;
|
||||
}
|
||||
|
||||
public DhcpEntryCommand(String vmMac, String vmIpAddress, String vmName, String vmIp6Address, String dns, String gateway, String ip6Gateway) {
|
||||
this(vmMac, vmIpAddress, vmName, vmIp6Address);
|
||||
public DhcpEntryCommand(String vmMac, String vmIpAddress, String vmName, String vmIp6Address, String dns, String gateway, String ip6Gateway, boolean executeInSequence) {
|
||||
this(vmMac, vmIpAddress, vmName, vmIp6Address, executeInSequence);
|
||||
this.dns = dns;
|
||||
this.gateway = gateway;
|
||||
}
|
||||
|
||||
@ -22,19 +22,21 @@ public class SavePasswordCommand extends NetworkElementCommand {
|
||||
String password;
|
||||
String vmIpAddress;
|
||||
String vmName;
|
||||
boolean executeInSequence = false;
|
||||
|
||||
protected SavePasswordCommand() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean executeInSequence() {
|
||||
return true;
|
||||
return executeInSequence;
|
||||
}
|
||||
|
||||
public SavePasswordCommand(String password, String vmIpAddress, String vmName) {
|
||||
public SavePasswordCommand(String password, String vmIpAddress, String vmName, boolean executeInSequence) {
|
||||
this.password = password;
|
||||
this.vmIpAddress = vmIpAddress;
|
||||
this.vmName = vmName;
|
||||
this.executeInSequence = executeInSequence;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
|
||||
@ -23,6 +23,7 @@ public class UserDataCommand extends NetworkElementCommand {
|
||||
String vmIpAddress;
|
||||
String routerPrivateIpAddress;
|
||||
String vmName;
|
||||
boolean executeInSequence = false;
|
||||
|
||||
protected UserDataCommand() {
|
||||
|
||||
@ -30,14 +31,15 @@ public class UserDataCommand extends NetworkElementCommand {
|
||||
|
||||
@Override
|
||||
public boolean executeInSequence() {
|
||||
return true;
|
||||
return executeInSequence;
|
||||
}
|
||||
|
||||
public UserDataCommand(String userData, String vmIpAddress, String routerPrivateIpAddress, String vmName) {
|
||||
public UserDataCommand(String userData, String vmIpAddress, String routerPrivateIpAddress, String vmName, boolean executeInSequence) {
|
||||
this.userData = userData;
|
||||
this.vmIpAddress = vmIpAddress;
|
||||
this.routerPrivateIpAddress = routerPrivateIpAddress;
|
||||
this.vmName = vmName;
|
||||
this.executeInSequence = executeInSequence;
|
||||
}
|
||||
|
||||
public String getRouterPrivateIpAddress() {
|
||||
|
||||
@ -28,27 +28,29 @@ public class VmDataCommand extends NetworkElementCommand {
|
||||
String vmName;
|
||||
@LogLevel(Log4jLevel.Trace)
|
||||
List<String[]> vmData;
|
||||
boolean executeInSequence = false;
|
||||
|
||||
protected VmDataCommand() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean executeInSequence() {
|
||||
return true;
|
||||
return executeInSequence;
|
||||
}
|
||||
|
||||
public VmDataCommand(String vmIpAddress) {
|
||||
this(vmIpAddress, null);
|
||||
public VmDataCommand(String vmIpAddress, boolean executeInSequence) {
|
||||
this(vmIpAddress, null, executeInSequence);
|
||||
}
|
||||
|
||||
public String getVmName() {
|
||||
return vmName;
|
||||
}
|
||||
|
||||
public VmDataCommand(String vmIpAddress, String vmName) {
|
||||
public VmDataCommand(String vmIpAddress, String vmName, boolean executeInSequence) {
|
||||
this.vmName = vmName;
|
||||
this.vmIpAddress = vmIpAddress;
|
||||
this.vmData = new ArrayList<String[]>();
|
||||
this.executeInSequence = executeInSequence;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -28,22 +28,24 @@ public class CopyVolumeCommand extends Command {
|
||||
String secondaryStorageURL;
|
||||
boolean toSecondaryStorage;
|
||||
String vmName;
|
||||
boolean executeInSequence = false;
|
||||
|
||||
public CopyVolumeCommand() {
|
||||
}
|
||||
|
||||
public CopyVolumeCommand(long volumeId, String volumePath, StoragePool pool, String secondaryStorageURL, boolean toSecondaryStorage, int wait) {
|
||||
public CopyVolumeCommand(long volumeId, String volumePath, StoragePool pool, String secondaryStorageURL, boolean toSecondaryStorage, int wait, boolean executeInSequence) {
|
||||
this.volumeId = volumeId;
|
||||
this.volumePath = volumePath;
|
||||
this.pool = new StorageFilerTO(pool);
|
||||
this.secondaryStorageURL = secondaryStorageURL;
|
||||
this.toSecondaryStorage = toSecondaryStorage;
|
||||
setWait(wait);
|
||||
this.executeInSequence = executeInSequence;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean executeInSequence() {
|
||||
return true;
|
||||
return executeInSequence;
|
||||
}
|
||||
|
||||
public String getVolumePath() {
|
||||
|
||||
@ -26,6 +26,7 @@ public class CreateCommand extends Command {
|
||||
private StorageFilerTO pool;
|
||||
private DiskProfile diskCharacteristics;
|
||||
private String templateUrl;
|
||||
boolean executeInSequence = false;
|
||||
|
||||
protected CreateCommand() {
|
||||
super();
|
||||
@ -33,44 +34,47 @@ public class CreateCommand extends Command {
|
||||
|
||||
/**
|
||||
* Construction for template based volumes.
|
||||
*
|
||||
* @param vol
|
||||
* @param vm
|
||||
* @param diskCharacteristics
|
||||
* @param templateUrl
|
||||
* @param pool
|
||||
* @param executeInSequence TODO
|
||||
* @param vol
|
||||
* @param vm
|
||||
*/
|
||||
public CreateCommand(DiskProfile diskCharacteristics, String templateUrl, StorageFilerTO pool) {
|
||||
this(diskCharacteristics, pool);
|
||||
public CreateCommand(DiskProfile diskCharacteristics, String templateUrl, StorageFilerTO pool, boolean executeInSequence) {
|
||||
this(diskCharacteristics, pool, executeInSequence);
|
||||
this.templateUrl = templateUrl;
|
||||
this.executeInSequence = executeInSequence;
|
||||
}
|
||||
|
||||
/**
|
||||
* Construction for regular volumes.
|
||||
*
|
||||
* @param vol
|
||||
* @param vm
|
||||
* @param diskCharacteristics
|
||||
* @param pool
|
||||
* @param executeInSequence TODO
|
||||
* @param vol
|
||||
* @param vm
|
||||
*/
|
||||
public CreateCommand(DiskProfile diskCharacteristics, StorageFilerTO pool) {
|
||||
public CreateCommand(DiskProfile diskCharacteristics, StorageFilerTO pool, boolean executeInSequence) {
|
||||
this.volId = diskCharacteristics.getVolumeId();
|
||||
this.diskCharacteristics = diskCharacteristics;
|
||||
this.pool = pool;
|
||||
this.templateUrl = null;
|
||||
this.executeInSequence = executeInSequence;
|
||||
}
|
||||
|
||||
public CreateCommand(DiskProfile diskCharacteristics, String templateUrl, StoragePool pool) {
|
||||
this(diskCharacteristics, templateUrl, new StorageFilerTO(pool));
|
||||
public CreateCommand(DiskProfile diskCharacteristics, String templateUrl, StoragePool pool, boolean executeInSequence) {
|
||||
this(diskCharacteristics, templateUrl, new StorageFilerTO(pool), executeInSequence);
|
||||
}
|
||||
|
||||
public CreateCommand(DiskProfile diskCharacteristics, StoragePool pool) {
|
||||
this(diskCharacteristics, new StorageFilerTO(pool));
|
||||
public CreateCommand(DiskProfile diskCharacteristics, StoragePool pool, boolean executeInSequence) {
|
||||
this(diskCharacteristics, new StorageFilerTO(pool), executeInSequence);
|
||||
this.executeInSequence = executeInSequence;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean executeInSequence() {
|
||||
return true;
|
||||
return executeInSequence;
|
||||
}
|
||||
|
||||
public String getTemplateUrl() {
|
||||
|
||||
@ -33,7 +33,6 @@ import com.cloud.agent.api.to.LoadBalancerTO;
|
||||
import com.cloud.agent.api.to.PortForwardingRuleTO;
|
||||
import com.cloud.agent.api.to.LoadBalancerTO.DestinationTO;
|
||||
import com.cloud.agent.api.to.LoadBalancerTO.StickinessPolicyTO;
|
||||
import com.cloud.agent.resource.virtualnetwork.VirtualRoutingResource;
|
||||
import com.cloud.network.rules.LbStickinessMethod.StickinessMethodType;
|
||||
import com.cloud.utils.net.NetUtils;
|
||||
|
||||
@ -41,6 +40,7 @@ import com.cloud.utils.net.NetUtils;
|
||||
public class HAProxyConfigurator implements LoadBalancerConfigurator {
|
||||
|
||||
private static final Logger s_logger = Logger.getLogger(HAProxyConfigurator.class);
|
||||
private static final String blankLine = "\t ";
|
||||
private static String[] globalSection = { "global",
|
||||
"\tlog 127.0.0.1:3914 local0 warning",
|
||||
"\tmaxconn 4096",
|
||||
@ -86,9 +86,9 @@ public class HAProxyConfigurator implements LoadBalancerConfigurator {
|
||||
List<String> result = new ArrayList<String>();
|
||||
|
||||
result.addAll(Arrays.asList(globalSection));
|
||||
result.add(getBlankLine());
|
||||
result.add(blankLine);
|
||||
result.addAll(Arrays.asList(defaultsSection));
|
||||
result.add(getBlankLine());
|
||||
result.add(blankLine);
|
||||
|
||||
if (pools.isEmpty()) {
|
||||
// haproxy cannot handle empty listen / frontend or backend, so add
|
||||
@ -96,7 +96,7 @@ public class HAProxyConfigurator implements LoadBalancerConfigurator {
|
||||
// on port 9
|
||||
result.addAll(Arrays.asList(defaultListen));
|
||||
}
|
||||
result.add(getBlankLine());
|
||||
result.add(blankLine);
|
||||
|
||||
for (Map.Entry<String, List<PortForwardingRuleTO>> e : pools.entrySet()) {
|
||||
List<String> poolRules = getRulesForPool(e.getKey(), e.getValue());
|
||||
@ -143,7 +143,7 @@ public class HAProxyConfigurator implements LoadBalancerConfigurator {
|
||||
.append(rule.getDstPortRange()[0]).append(" check");
|
||||
result.add(sb.toString());
|
||||
}
|
||||
result.add(getBlankLine());
|
||||
result.add(blankLine);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -507,14 +507,10 @@ public class HAProxyConfigurator implements LoadBalancerConfigurator {
|
||||
result.add(sb.toString());
|
||||
}
|
||||
|
||||
result.add(getBlankLine());
|
||||
result.add(blankLine);
|
||||
return result;
|
||||
}
|
||||
|
||||
private String getBlankLine() {
|
||||
return new String("\t ");
|
||||
}
|
||||
|
||||
private String generateStatsRule(LoadBalancerConfigCommand lbCmd,
|
||||
String ruleName, String statsIp) {
|
||||
StringBuilder rule = new StringBuilder("\nlisten ").append(ruleName)
|
||||
@ -534,7 +530,7 @@ public class HAProxyConfigurator implements LoadBalancerConfigurator {
|
||||
List<String> result = new ArrayList<String>();
|
||||
|
||||
result.addAll(Arrays.asList(globalSection));
|
||||
result.add(getBlankLine());
|
||||
result.add(blankLine);
|
||||
result.addAll(Arrays.asList(defaultsSection));
|
||||
if (!lbCmd.lbStatsVisibility.equals("disabled")) {
|
||||
/* new rule : listen admin_page guestip/link-local:8081 */
|
||||
@ -568,7 +564,7 @@ public class HAProxyConfigurator implements LoadBalancerConfigurator {
|
||||
}
|
||||
|
||||
}
|
||||
result.add(getBlankLine());
|
||||
result.add(blankLine);
|
||||
boolean has_listener = false;
|
||||
for (LoadBalancerTO lbTO : lbCmd.getLoadBalancers()) {
|
||||
if ( lbTO.isRevoked() ) {
|
||||
@ -578,7 +574,7 @@ public class HAProxyConfigurator implements LoadBalancerConfigurator {
|
||||
result.addAll(poolRules);
|
||||
has_listener = true;
|
||||
}
|
||||
result.add(getBlankLine());
|
||||
result.add(blankLine);
|
||||
if ( !has_listener) {
|
||||
// haproxy cannot handle empty listen / frontend or backend, so add
|
||||
// a dummy listener
|
||||
|
||||
@ -50,5 +50,6 @@
|
||||
<xi:include href="gsoc-imduffy15.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="gsoc-dharmesh.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="gsoc-meng.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="gsoc-shiva.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
</book>
|
||||
|
||||
|
||||
@ -398,7 +398,7 @@ under the License.
|
||||
SSH keypair assigned to a virtual machine.</para>
|
||||
</section>
|
||||
</section>
|
||||
<section id="issues-fixed-4.0">
|
||||
<section id="issues-fixed-4.1">
|
||||
<title>Issues Fixed in 4.1.0</title>
|
||||
<para>Apache CloudStack uses <ulink url="https://issues.apache.org/jira/browse/CLOUDSTACK"
|
||||
>Jira</ulink> to track its issues. All new features and bugs for 4.1.0 have been tracked
|
||||
|
||||
@ -25,16 +25,16 @@
|
||||
External LB is nothing but a LB rule created to redirect the traffic received at a public IP of
|
||||
the VPC virtual router. The traffic is load balanced within a tier based on your configuration.
|
||||
Citrix NetScaler and VPC virtual router are supported for external LB. When you use internal LB
|
||||
service, traffic received at a tier is load balanced across different tiers within the VPC. For
|
||||
example, traffic reached at Web tier is redirected to Application tier. External load balancing
|
||||
devices are not supported for internal LB. The service is provided by a internal LB VM
|
||||
service, traffic received at a tier is load balanced across different VMs within that tier. For
|
||||
example, traffic reached at Web tier is redirected to another VM in that tier. External load
|
||||
balancing devices are not supported for internal LB. The service is provided by a internal LB VM
|
||||
configured on the target tier.</para>
|
||||
<section id="curent-lb-vpc">
|
||||
<title>Load Balancing Within a Tier (External LB)</title>
|
||||
<para>A &PRODUCT; user or administrator may create load balancing rules that balance traffic
|
||||
received at a public IP to one or more VMs that belong to a network tier that provides load
|
||||
balancing service in a VPC. A user creates a rule, specifies an algorithm, and assigns the
|
||||
rule to a set of VMs within a VPC.</para>
|
||||
rule to a set of VMs within a tier.</para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Log in to the &PRODUCT; UI as an administrator or end user.</para>
|
||||
|
||||
@ -27,6 +27,6 @@
|
||||
<para>The DevCloud appliance can be downloaded from the wiki at <ulink url="https://cwiki.apache.org/confluence/display/CLOUDSTACK/DevCloud"></ulink>. It can also be built from scratch. Code is being developed to provide this alternative build. It is based on <emphasis>veewee</emphasis>, <emphasis>Vagrant</emphasis> and <emphasis>Puppet</emphasis>.</para>
|
||||
<para>The goal is to automate the DevCloud build and make this automation capability available to all within the source release of &PRODUCT;</para>
|
||||
<warning><para>This is under heavy development. The code is located in the source tree under <emphasis>tools/devcloud</emphasis> </para>
|
||||
<para>A preliminary wiki page describes the build at <ulink url="https://cwiki.apache.org/CLOUDSTACK/building-devcloud.html">https://cwiki.pache.org/CLOUDSTACK/building-devcloud.html</ulink></para>
|
||||
<para>A preliminary wiki page describes the build at <ulink url="https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+DevCloud">https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+DevCloud</ulink></para>
|
||||
</warning>
|
||||
</section>
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
<title>DEB package repository</title>
|
||||
<para>You can add a DEB package repository to your apt sources with the following commands. Please note that only packages for Ubuntu 12.04 LTS (precise) are being built at this time.</para>
|
||||
<para>Use your preferred editor and open (or create) <filename>/etc/apt/sources.list.d/cloudstack.list</filename>. Add the community provided repository to the file:</para>
|
||||
<programlisting>deb http://cloudstack.apt-get.eu/ubuntu precise 4.0</programlisting>
|
||||
<programlisting>deb http://cloudstack.apt-get.eu/ubuntu precise 4.1</programlisting>
|
||||
<para>We now have to add the public key to the trusted keys.</para>
|
||||
<programlisting language="Bash"><prompt>$</prompt> <command>wget</command> -O - http://cloudstack.apt-get.eu/release.asc|apt-key add -</programlisting>
|
||||
<para>Now update your local apt cache.</para>
|
||||
@ -60,7 +60,7 @@
|
||||
<programlisting>
|
||||
[cloudstack]
|
||||
name=cloudstack
|
||||
baseurl=<replaceable>http://cloudstack.apt-get.eu/rhel/4.0/</replaceable>
|
||||
baseurl=<replaceable>http://cloudstack.apt-get.eu/rhel/4.1/</replaceable>
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
</programlisting>
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
-->
|
||||
<section id="create-vpn-connection-vpc">
|
||||
<title>Creating a VPN Connection</title>
|
||||
<note><para>&PRODUCT; supports creating up to 8 VPN connections.</para></note>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Log in to the &PRODUCT; UI as an administrator or end user.</para>
|
||||
@ -38,19 +39,37 @@
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Click the Settings icon.</para>
|
||||
<para>The following options are displayed.</para>
|
||||
<para>For each tier, the following options are displayed:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>IP Addresses</para>
|
||||
<para>Internal LB</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Gateways</para>
|
||||
<para>Public LB IP</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Site-to-Site VPN</para>
|
||||
<para>Static NAT</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Network ASLs</para>
|
||||
<para>Virtual Machines</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>CIDR</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>The following router information is displayed:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Private Gateways</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Public IP Addresses</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Site-to-Site VPNs</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Network ACL Lists</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
@ -100,4 +119,4 @@
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@ -38,19 +38,37 @@
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Click the Settings icon.</para>
|
||||
<para>The following options are displayed.</para>
|
||||
<para>For each tier, the following options are displayed:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>IP Addresses</para>
|
||||
<para>Internal LB</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Gateways</para>
|
||||
<para>Public LB IP</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Site-to-Site VPN</para>
|
||||
<para>Static NAT</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Network ACLs</para>
|
||||
<para>Virtual Machines</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>CIDR</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>The following router information is displayed:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Private Gateways</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Public IP Addresses</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Site-to-Site VPNs</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Network ACL Lists</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
@ -77,4 +95,4 @@
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@ -38,19 +38,37 @@
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Click the Settings icon.</para>
|
||||
<para>The following options are displayed.</para>
|
||||
<para>For each tier, the following options are displayed:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>IP Addresses</para>
|
||||
<para>Internal LB</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Gateways</para>
|
||||
<para>Public LB IP</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Site-to-Site VPN</para>
|
||||
<para>Static NAT</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Network ASLs</para>
|
||||
<para>Virtual Machines</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>CIDR</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>The following router information is displayed:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Private Gateways</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Public IP Addresses</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Site-to-Site VPNs</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Network ACL Lists</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
70
docs/en-US/gsoc-shiva.xml
Normal file
70
docs/en-US/gsoc-shiva.xml
Normal file
@ -0,0 +1,70 @@
|
||||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % BOOK_ENTITIES SYSTEM "CloudStack_GSoC_Guide.ent">
|
||||
%BOOK_ENTITIES;
|
||||
]>
|
||||
|
||||
<!-- Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<chapter id="gsoc-shiva">
|
||||
<title>Shiva Teja's 2013 GSoC Proposal</title>
|
||||
<para>This chapter describes Shiva Teja's 2013 Google Summer of Code project within the &PRODUCT; ASF project. It is a copy paste of the submitted proposal.</para>
|
||||
<section id="gsoc-abstract-shiva">
|
||||
<title>Abstract</title>
|
||||
<para>
|
||||
The aim of this project is to create a new modular UI for Apache CloudStack using Bootstrap by Twitter and Backbone.js. To achieve this easily, I'll be creating a RESTful wrapper API on top of the current CloudStack API. I hope this project will make custom UIs for CloudStack very easy.</para>
|
||||
|
||||
<para>Why does CloudStack need a new UI?</para>
|
||||
|
||||
<para>The current UI cannot be reused easliy to make a custom UI. The UI I will be making using backbone.js can be reused very easily to make custom UIs. The models, views, routers etc can remain the same in all the UIs. The user interface can be changed just by changing the templates. Check the implementation details below for further details.</para>
|
||||
|
||||
<para>Why does it need a RESTful wrapper API ?</para>
|
||||
|
||||
<para>Backbone.js heavily depends on RESTful architecture. Making a new UI with backbone.js using a query based API might not be easy.</para>
|
||||
</section>
|
||||
<section id="gsoc-deliverables-shiva">
|
||||
<title>List of deliverables</title>
|
||||
<orderedlist>
|
||||
<listitem><para>A new UI for CloudStack(with almost all features in the current UI and new ones, if any).</para></listitem>
|
||||
<listitem><para>A RESTful wrapper API on top of the CloudStack API</para></listitem>
|
||||
<listitem><para>Some documentation about using this UI to make a custom UI.</para></listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
<section id="gsoc-approach-shiva">
|
||||
<title>Approach</title>
|
||||
<para>Wrapper API: Backbone.js, by default, uses four HTTP methods(GET, PUT, POST, DELETE) for communicating with the server. It uses GET to fetch a resource from the server, POST to create a resource, PUT to update the resource and DELETE to delete the resource. A query based API can probably be used to make the UI by overriding backbone's<ulink url="http://backbonejs.org/#Sync"><citetitle> default sync function</citetitle></ulink>. But it makes more sense to have an API which supports the above mentioned method and is resource based. This RESTful API works on top of the CloudStack API. The main task is to map the combinations of these HTTP methods and the resources to appropriate CloudStack API command. The other task is to decide on how the URLs should look like. Say for starting a virtual machine, for it to be RESTful, we have to use POST as we are creating a resource, or a PUT as we are changing the state of a virtual machine. So the possible options on the URL could be to do a POST /runningvirtualmachines and respond with 201 Created code or a PUT on /virtualmachines/id and respond with 200 OK. If these are decided, the wrapper can be generated or be written manually, which can use defined patters to map to appropriate CloudStack API commands(Similar to what cloudmonkey does. See this <ulink url="https://github.com/shivateja/cloudstack-restful-api"><citetitle>prototype</citetitle></ulink>. I can use cloudmonkey's code to generate the required API entity verb relationships. Each verb will have a set of rules saying what method should be used in the RESTful API and how should it look like in the URL. Another possible way could be to group entities first manually and write the wrapper manually(something like zone/pods/cluster). Some possibilities have been discussed in <ulink url="http://mail-archives.apache.org/mod_mbox/cloudstack-dev/201304.mbox/%3CCAJrLSbaqa08uHw_xETt7Q59Nex%3DThQzvqEJyoXK8Q-OwN04Suw%40mail.gmail.com%3E"><citetitle>this thread</citetitle></ulink>.</para>
|
||||
|
||||
<para>UI: It will be a single page app. It'll use <ulink url="http://underscorejs.org/#template">client side templating</ulink> for rendering. This makes it very easy to make a custom UI because it can be achieved just by changing the templates. Backbone views will make use of these templates to render the appropriate models/collections. A completely new interface can be written just by changing the templates. Javascript code can completely remain the same. The views will take care of appropriate DOM events. Such event will correspond to appropriate model/collection chages, thus causing appropriate API calls.</para>
|
||||
</section>
|
||||
<section id="gsoc-schedule-shiva">
|
||||
<title>Approximate Schedle</title>
|
||||
<para>Till June 17 - Decide on how the RESTful API should look like and design algorithms to generate the wrapper.</para>
|
||||
<para>July 5(soft deadline), July 10(hard deadline) : Wrapper API will be ready.</para>
|
||||
<para>July 12(soft) - July 15(hard): Make basic wireframes and designs for the website and get them approved.</para>
|
||||
<para>July 29(mid term evaluation) : All the basic models, views, routes of the UI should be ready along with a few templates.</para>
|
||||
<para>August 15(hard deadline, shouldn't take much time actually) - A basic usable UI where users can just list all the entities which are present in the current UI's main navigation( Like Instances, Templates, Accounts etc)</para>
|
||||
<para>September 1(hard) - From this UI, users should be able to launch instances, edit settings of most of the entities.</para>
|
||||
<para>September 16(Pencil down!) - Fix some design tweaks and finish a completely usable interface with functions similar to current UI.</para>
|
||||
<para>September 23 - Finish the documentation on how to use this UI to make custom UIs.</para>
|
||||
</section>
|
||||
<section id="gsoc-aboutme-shiva">
|
||||
<title>About Me</title>
|
||||
<para> I am a 2nd year computer science undergrad studying at IIT Mandi, India. I've been using Python for an year and a half now. I've used Django, Flask and Tornado for my small projects. Along with Python, I use C++ for competitive programming. Recently, I fell in love with Haskell. I've always been fascinated about web technologies.</para>
|
||||
</section>
|
||||
</chapter>
|
||||
@ -143,6 +143,14 @@ binlog-format = 'ROW'</programlisting>
|
||||
-i <management_server_ip></programlisting>
|
||||
<para>When this script is finished, you should see a message like “Successfully initialized
|
||||
the database.”</para>
|
||||
<note>
|
||||
<para>If the script is unable to connect to the MySQL database, check
|
||||
the "localhost" loopback address in <filename>/etc/hosts</filename>. It should
|
||||
be pointing to the IPv4 loopback address "127.0.0.1" and not the IPv6 loopback
|
||||
address ::1. Alternatively, reconfigure MySQL to bind to the IPv6 loopback
|
||||
interface.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>If you are running the KVM hypervisor on the same machine with the Management Server,
|
||||
|
||||
@ -28,8 +28,8 @@
|
||||
<para>Prior to the 4.0.0 incubating release, Ant was used to build &PRODUCT;. A migration to Maven started in the 4.0.0 cycle, and has completed in 4.1.0.</para>
|
||||
<para>The website and the wiki contain up to date information on the build procedure at:</para>
|
||||
<itemizedlist>
|
||||
<listitem><para><ulink url="https://cwiki.apache.org/CLOUDSTACK/building-with-maven.html">https://cwiki.apache.org/CLOUDSTACK/building-with-maven.html</ulink></para></listitem>
|
||||
<listitem><para><ulink url="https://cwiki.apache.org/CLOUDSTACK/setting-up-cloudstack-development-environment.html">https://cwiki.apache.org/CLOUDSTACK/setting-up-cloudstack-development-environment.html</ulink></para></listitem>
|
||||
<listitem><para><ulink url="https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+on+master+branch">https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+on+master+branch</ulink></para></listitem>
|
||||
<listitem><para><ulink url="https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment">https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment</ulink></para></listitem>
|
||||
</itemizedlist>
|
||||
</note>
|
||||
<para>The overarching steps to build &PRODUCT; are:.</para>
|
||||
|
||||
@ -60,7 +60,7 @@ msgstr ""
|
||||
|
||||
#. Tag: programlisting
|
||||
#, no-c-format
|
||||
msgid "deb http://cloudstack.apt-get.eu/ubuntu precise 4.0"
|
||||
msgid "deb http://cloudstack.apt-get.eu/ubuntu precise 4.1"
|
||||
msgstr ""
|
||||
|
||||
#. Tag: para
|
||||
@ -118,7 +118,7 @@ msgstr ""
|
||||
msgid "\n"
|
||||
"[cloudstack]\n"
|
||||
"name=cloudstack\n"
|
||||
"baseurl=<replaceable>http://cloudstack.apt-get.eu/rhel/4.0/</replaceable>\n"
|
||||
"baseurl=<replaceable>http://cloudstack.apt-get.eu/rhel/4.1/</replaceable>\n"
|
||||
"enabled=1\n"
|
||||
"gpgcheck=0\n"
|
||||
" "
|
||||
|
||||
@ -40,4 +40,9 @@ public interface VolumeInfo extends DataObject, Volume {
|
||||
void processEventOnly(ObjectInDataStoreStateMachine.Event event, Answer answer);
|
||||
|
||||
boolean stateTransit(Volume.Event event);
|
||||
|
||||
Long getBytesReadRate();
|
||||
Long getBytesWriteRate();
|
||||
Long getIopsReadRate();
|
||||
Long getIopsWriteRate();
|
||||
}
|
||||
|
||||
@ -37,6 +37,10 @@ public class VolumeObjectTO implements DataTO {
|
||||
private String chainInfo;
|
||||
private Storage.ImageFormat format;
|
||||
private long id;
|
||||
private Long bytesReadRate;
|
||||
private Long bytesWriteRate;
|
||||
private Long iopsReadRate;
|
||||
private Long iopsWriteRate;
|
||||
|
||||
public VolumeObjectTO() {
|
||||
|
||||
@ -59,6 +63,10 @@ public class VolumeObjectTO implements DataTO {
|
||||
this.name = volume.getName();
|
||||
this.setId(volume.getId());
|
||||
this.format = volume.getFormat();
|
||||
this.bytesReadRate = volume.getBytesReadRate();
|
||||
this.bytesWriteRate = volume.getBytesWriteRate();
|
||||
this.iopsReadRate = volume.getIopsReadRate();
|
||||
this.iopsWriteRate = volume.getIopsWriteRate();
|
||||
}
|
||||
|
||||
public String getUuid() {
|
||||
@ -172,4 +180,36 @@ public class VolumeObjectTO implements DataTO {
|
||||
.append("|datastore=").append(dataStore).append("]").toString();
|
||||
}
|
||||
|
||||
public void setBytesReadRate(Long bytesReadRate) {
|
||||
this.bytesReadRate = bytesReadRate;
|
||||
}
|
||||
|
||||
public Long getBytesReadRate() {
|
||||
return bytesReadRate;
|
||||
}
|
||||
|
||||
public void setBytesWriteRate(Long bytesWriteRate) {
|
||||
this.bytesWriteRate = bytesWriteRate;
|
||||
}
|
||||
|
||||
public Long getBytesWriteRate() {
|
||||
return bytesWriteRate;
|
||||
}
|
||||
|
||||
public void setIopsReadRate(Long iopsReadRate) {
|
||||
this.iopsReadRate = iopsReadRate;
|
||||
}
|
||||
|
||||
public Long getIopsReadRate() {
|
||||
return iopsReadRate;
|
||||
}
|
||||
|
||||
public void setIopsWriteRate(Long iopsWriteRate) {
|
||||
this.iopsWriteRate = iopsWriteRate;
|
||||
}
|
||||
|
||||
public Long getIopsWriteRate() {
|
||||
return iopsWriteRate;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ public interface DataCenterDao extends GenericDao<DataCenterVO, Long> {
|
||||
Pair<String, Long> allocatePrivateIpAddress(long id, long podId, long instanceId, String reservationId);
|
||||
DataCenterIpAddressVO allocatePrivateIpAddress(long id, String reservationId);
|
||||
String allocateLinkLocalIpAddress(long id, long podId, long instanceId, String reservationId);
|
||||
String allocateVnet(long dcId, long physicalNetworkId, long accountId, String reservationId);
|
||||
String allocateVnet(long dcId, long physicalNetworkId, long accountId, String reservationId, boolean canUseSystemGuestVlans);
|
||||
|
||||
void releaseVnet(String vnet, long dcId, long physicalNetworkId, long accountId, String reservationId);
|
||||
void releasePrivateIpAddress(String ipAddress, long dcId, Long instanceId);
|
||||
|
||||
@ -192,22 +192,27 @@ public class DataCenterDaoImpl extends GenericDaoBase<DataCenterVO, Long> implem
|
||||
}
|
||||
|
||||
@Override
|
||||
public String allocateVnet(long dataCenterId, long physicalNetworkId, long accountId, String reservationId) {
|
||||
public String allocateVnet(long dataCenterId, long physicalNetworkId, long accountId, String reservationId,
|
||||
boolean canUseSystemGuestVlans) {
|
||||
ArrayList<Long> dedicatedVlanDbIds = new ArrayList<Long>();
|
||||
boolean useDedicatedGuestVlans = false;
|
||||
List<AccountGuestVlanMapVO> maps = _accountGuestVlanMapDao.listAccountGuestVlanMapsByAccount(accountId);
|
||||
for (AccountGuestVlanMapVO map : maps) {
|
||||
dedicatedVlanDbIds.add(map.getId());
|
||||
}
|
||||
if (dedicatedVlanDbIds != null && !dedicatedVlanDbIds.isEmpty()) {
|
||||
useDedicatedGuestVlans = true;
|
||||
DataCenterVnetVO vo = _vnetAllocDao.take(physicalNetworkId, accountId, reservationId, dedicatedVlanDbIds);
|
||||
if (vo != null)
|
||||
return vo.getVnet();
|
||||
}
|
||||
DataCenterVnetVO vo = _vnetAllocDao.take(physicalNetworkId, accountId, reservationId, null);
|
||||
if (vo == null) {
|
||||
return null;
|
||||
if (!useDedicatedGuestVlans || (useDedicatedGuestVlans && canUseSystemGuestVlans)) {
|
||||
DataCenterVnetVO vo = _vnetAllocDao.take(physicalNetworkId, accountId, reservationId, null);
|
||||
if (vo != null) {
|
||||
return vo.getVnet();
|
||||
}
|
||||
}
|
||||
return vo.getVnet();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -414,4 +414,8 @@ public class NetworkOfferingVO implements NetworkOffering {
|
||||
return publicLb;
|
||||
}
|
||||
|
||||
public void setInternalLb(boolean internalLb) {
|
||||
this.internalLb = internalLb;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -97,7 +97,19 @@ public class DiskOfferingVO implements DiskOffering {
|
||||
@Column(name = "sort_key")
|
||||
int sortKey;
|
||||
|
||||
@Column(name = "display_offering")
|
||||
@Column(name="bytes_read_rate")
|
||||
Long bytesReadRate;
|
||||
|
||||
@Column(name="bytes_write_rate")
|
||||
Long bytesWriteRate;
|
||||
|
||||
@Column(name="iops_read_rate")
|
||||
Long iopsReadRate;
|
||||
|
||||
@Column(name="iops_write_rate")
|
||||
Long iopsWriteRate;
|
||||
|
||||
@Column(name="display_offering")
|
||||
boolean displayOffering;
|
||||
|
||||
public DiskOfferingVO() {
|
||||
@ -327,4 +339,36 @@ public class DiskOfferingVO implements DiskOffering {
|
||||
public void setDisplayOffering(boolean displayOffering) {
|
||||
this.displayOffering = displayOffering;
|
||||
}
|
||||
|
||||
public void setBytesReadRate(Long bytesReadRate) {
|
||||
this.bytesReadRate = bytesReadRate;
|
||||
}
|
||||
|
||||
public Long getBytesReadRate() {
|
||||
return bytesReadRate;
|
||||
}
|
||||
|
||||
public void setBytesWriteRate(Long bytesWriteRate) {
|
||||
this.bytesWriteRate = bytesWriteRate;
|
||||
}
|
||||
|
||||
public Long getBytesWriteRate() {
|
||||
return bytesWriteRate;
|
||||
}
|
||||
|
||||
public void setIopsReadRate(Long iopsReadRate) {
|
||||
this.iopsReadRate = iopsReadRate;
|
||||
}
|
||||
|
||||
public Long getIopsReadRate() {
|
||||
return iopsReadRate;
|
||||
}
|
||||
|
||||
public void setIopsWriteRate(Long iopsWriteRate) {
|
||||
this.iopsWriteRate = iopsWriteRate;
|
||||
}
|
||||
|
||||
public Long getIopsWriteRate() {
|
||||
return iopsWriteRate;
|
||||
}
|
||||
}
|
||||
|
||||
@ -351,7 +351,7 @@ public class VolumeVO implements Volume {
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getDiskOfferingId() {
|
||||
public Long getDiskOfferingId() {
|
||||
return diskOfferingId;
|
||||
}
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
// under the License.
|
||||
package com.cloud.vm.dao;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
@ -44,6 +45,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.JoinBuilder.JoinType;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
import com.cloud.utils.db.SearchCriteria;
|
||||
import com.cloud.utils.db.SearchCriteria.Func;
|
||||
import com.cloud.utils.db.SearchCriteria.Op;
|
||||
import com.cloud.utils.db.Transaction;
|
||||
import com.cloud.utils.db.UpdateBuilder;
|
||||
@ -103,6 +105,7 @@ public class DomainRouterDaoImpl extends GenericDaoBase<DomainRouterVO, Long> im
|
||||
IdNetworkIdStatesSearch.done();
|
||||
|
||||
HostUpSearch = createSearchBuilder();
|
||||
HostUpSearch.select(null, Func.DISTINCT, HostUpSearch.entity().getId());
|
||||
HostUpSearch.and("host", HostUpSearch.entity().getHostId(), Op.EQ);
|
||||
HostUpSearch.and("states", HostUpSearch.entity().getState(), Op.NIN);
|
||||
SearchBuilder<RouterNetworkVO> joinRouterNetwork3 = _routerNetworkDao.createSearchBuilder();
|
||||
@ -112,6 +115,7 @@ public class DomainRouterDaoImpl extends GenericDaoBase<DomainRouterVO, Long> im
|
||||
HostUpSearch.done();
|
||||
|
||||
StateNetworkTypeSearch = createSearchBuilder();
|
||||
StateNetworkTypeSearch.select(null, Func.DISTINCT, StateNetworkTypeSearch.entity().getId());
|
||||
StateNetworkTypeSearch.and("state", StateNetworkTypeSearch.entity().getState(), Op.EQ);
|
||||
SearchBuilder<RouterNetworkVO> joinRouterNetwork4 = _routerNetworkDao.createSearchBuilder();
|
||||
joinRouterNetwork4.and("networkId", joinRouterNetwork4.entity().getNetworkId(), Op.EQ);
|
||||
@ -214,7 +218,12 @@ public class DomainRouterDaoImpl extends GenericDaoBase<DomainRouterVO, Long> im
|
||||
sc.setParameters("host", hostId);
|
||||
}
|
||||
sc.setJoinParameters("networkRouter", "type", Network.GuestType.Isolated);
|
||||
return listBy(sc);
|
||||
List<DomainRouterVO> routerIds = listBy(sc);
|
||||
List<DomainRouterVO> routers = new ArrayList<DomainRouterVO>();
|
||||
for (DomainRouterVO router : routerIds) {
|
||||
routers.add(findById(router.getId()));
|
||||
}
|
||||
return routers;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -253,7 +262,12 @@ public class DomainRouterDaoImpl extends GenericDaoBase<DomainRouterVO, Long> im
|
||||
sc.setParameters("state", state);
|
||||
sc.setJoinParameters("networkRouter", "type", type);
|
||||
sc.setJoinParameters("host", "mgmtServerId", mgmtSrvrId);
|
||||
return listBy(sc);
|
||||
List<DomainRouterVO> routerIds = listBy(sc);
|
||||
List<DomainRouterVO> routers = new ArrayList<DomainRouterVO>();
|
||||
for (DomainRouterVO router : routerIds) {
|
||||
routers.add(findById(router.getId()));
|
||||
}
|
||||
return routers;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -20,6 +20,8 @@ import java.util.Date;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import com.cloud.storage.DiskOfferingVO;
|
||||
import com.cloud.storage.dao.DiskOfferingDao;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
|
||||
@ -63,6 +65,8 @@ public class VolumeObject implements VolumeInfo {
|
||||
ObjectInDataStoreManager objectInStoreMgr;
|
||||
@Inject
|
||||
VMInstanceDao vmInstanceDao;
|
||||
@Inject
|
||||
DiskOfferingDao diskOfferingDao;
|
||||
private Object payload;
|
||||
|
||||
public VolumeObject() {
|
||||
@ -141,6 +145,50 @@ public class VolumeObject implements VolumeInfo {
|
||||
return result;
|
||||
}
|
||||
|
||||
private DiskOfferingVO getDiskOfferingVO() {
|
||||
if (getDiskOfferingId() != null) {
|
||||
DiskOfferingVO diskOfferingVO = diskOfferingDao.findById(getDiskOfferingId());
|
||||
return diskOfferingVO;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getBytesReadRate() {
|
||||
DiskOfferingVO diskOfferingVO = getDiskOfferingVO();
|
||||
if (diskOfferingVO != null) {
|
||||
return diskOfferingVO.getBytesReadRate();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getBytesWriteRate() {
|
||||
DiskOfferingVO diskOfferingVO = getDiskOfferingVO();
|
||||
if (diskOfferingVO != null) {
|
||||
return diskOfferingVO.getBytesWriteRate();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getIopsReadRate() {
|
||||
DiskOfferingVO diskOfferingVO = getDiskOfferingVO();
|
||||
if (diskOfferingVO != null) {
|
||||
return diskOfferingVO.getIopsReadRate();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getIopsWriteRate() {
|
||||
DiskOfferingVO diskOfferingVO = getDiskOfferingVO();
|
||||
if (diskOfferingVO != null) {
|
||||
return diskOfferingVO.getIopsWriteRate();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void update() {
|
||||
volumeDao.update(volumeVO.getId(), volumeVO);
|
||||
volumeVO = volumeDao.findById(volumeVO.getId());
|
||||
@ -313,7 +361,7 @@ public class VolumeObject implements VolumeInfo {
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getDiskOfferingId() {
|
||||
public Long getDiskOfferingId() {
|
||||
return this.volumeVO.getDiskOfferingId();
|
||||
}
|
||||
|
||||
|
||||
@ -69,7 +69,9 @@ HOSTS=/etc/hosts
|
||||
source /root/func.sh
|
||||
|
||||
lock="biglock"
|
||||
locked=$(getLockFile $lock)
|
||||
#default timeout value is 30 mins as DhcpEntryCommand is not synchronized on agent side any more,
|
||||
#and multiple commands can be sent to the same VR at a time
|
||||
locked=$(getLockFile $lock 1800)
|
||||
if [ "$locked" != "1" ]
|
||||
then
|
||||
exit 1
|
||||
|
||||
@ -25,7 +25,9 @@
|
||||
source /root/func.sh
|
||||
|
||||
lock="passwdlock"
|
||||
locked=$(getLockFile $lock)
|
||||
#default timeout value is 30 mins as password reset command is not synchronized on agent side any more,
|
||||
#and multiple commands can be sent to the same VR at a time
|
||||
locked=$(getLockFile $lock 1800)
|
||||
if [ "$locked" != "1" ]
|
||||
then
|
||||
exit 1
|
||||
|
||||
@ -21,7 +21,9 @@
|
||||
source /root/func.sh
|
||||
|
||||
lock="biglock"
|
||||
locked=$(getLockFile $lock)
|
||||
#default timeout value is 30 mins as userdata command is not synchronized on agent side any more,
|
||||
#and multiple commands can be sent to the same VR at a time
|
||||
locked=$(getLockFile $lock 1800)
|
||||
if [ "$locked" != "1" ]
|
||||
then
|
||||
exit 1
|
||||
|
||||
@ -53,6 +53,7 @@ import com.cloud.host.Host.Type;
|
||||
import com.cloud.host.HostVO;
|
||||
import com.cloud.host.dao.HostDao;
|
||||
import com.cloud.network.Network;
|
||||
import com.cloud.network.NetworkModel;
|
||||
import com.cloud.network.PhysicalNetworkServiceProvider;
|
||||
import com.cloud.network.dao.PhysicalNetworkDao;
|
||||
import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
|
||||
@ -100,6 +101,8 @@ public class BaremetalDhcpManagerImpl extends ManagerBase implements BaremetalDh
|
||||
PhysicalNetworkServiceProviderDao _physicalNetworkServiceProviderDao;
|
||||
@Inject
|
||||
BaremetalDhcpDao _extDhcpDao;
|
||||
@Inject
|
||||
NetworkModel _ntwkModel;
|
||||
|
||||
@Override
|
||||
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
|
||||
@ -147,7 +150,7 @@ public class BaremetalDhcpManagerImpl extends ManagerBase implements BaremetalDh
|
||||
dns = nic.getDns2();
|
||||
}
|
||||
DhcpEntryCommand dhcpCommand = new DhcpEntryCommand(nic.getMacAddress(), nic.getIp4Address(), profile.getVirtualMachine().getHostName(), null, dns,
|
||||
nic.getGateway(), null);
|
||||
nic.getGateway(), null, _ntwkModel.getExecuteInSeqNtwkElmtCmd());
|
||||
String errMsg = String.format("Set dhcp entry on external DHCP %1$s failed(ip=%2$s, mac=%3$s, vmname=%4$s)", h.getPrivateIpAddress(),
|
||||
nic.getIp4Address(), nic.getMacAddress(), profile.getVirtualMachine().getHostName());
|
||||
// prepareBareMetalDhcpEntry(nic, dhcpCommand);
|
||||
|
||||
@ -45,6 +45,7 @@ import com.cloud.deploy.DeployDestination;
|
||||
import com.cloud.host.Host;
|
||||
import com.cloud.host.HostVO;
|
||||
import com.cloud.host.dao.HostDao;
|
||||
import com.cloud.network.NetworkModel;
|
||||
import com.cloud.network.dao.PhysicalNetworkDao;
|
||||
import com.cloud.network.dao.PhysicalNetworkVO;
|
||||
import com.cloud.resource.ResourceManager;
|
||||
@ -81,6 +82,7 @@ public class BaremetalPxeManagerImpl extends ManagerBase implements BaremetalPxe
|
||||
@Inject NicDao _nicDao;
|
||||
@Inject ConfigurationDao _configDao;
|
||||
@Inject PhysicalNetworkDao _phynwDao;
|
||||
@Inject NetworkModel _ntwkModel;
|
||||
|
||||
@Override
|
||||
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
|
||||
@ -184,7 +186,7 @@ public class BaremetalPxeManagerImpl extends ManagerBase implements BaremetalPxe
|
||||
String serviceOffering = _serviceOfferingDao.findByIdIncludingRemoved(vm.getServiceOfferingId()).getDisplayText();
|
||||
String zoneName = _dcDao.findById(vm.getDataCenterId()).getName();
|
||||
NicVO nvo = _nicDao.findById(nic.getId());
|
||||
VmDataCommand cmd = new VmDataCommand(nvo.getIp4Address(), vm.getInstanceName());
|
||||
VmDataCommand cmd = new VmDataCommand(nvo.getIp4Address(), vm.getInstanceName(), _ntwkModel.getExecuteInSeqNtwkElmtCmd());
|
||||
cmd.addVmData("userdata", "user-data", vm.getUserData());
|
||||
cmd.addVmData("metadata", "service-offering", StringUtils.unicodeEscape(serviceOffering));
|
||||
cmd.addVmData("metadata", "availability-zone", StringUtils.unicodeEscape(zoneName));
|
||||
|
||||
@ -58,6 +58,7 @@ import javax.naming.ConfigurationException;
|
||||
|
||||
import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
|
||||
import org.apache.cloudstack.storage.to.PrimaryDataStoreTO;
|
||||
import org.apache.cloudstack.storage.to.VolumeObjectTO;
|
||||
import org.apache.cloudstack.utils.qemu.QemuImg;
|
||||
import org.apache.cloudstack.utils.qemu.QemuImg.PhysicalDiskFormat;
|
||||
import org.apache.cloudstack.utils.qemu.QemuImgException;
|
||||
@ -342,6 +343,8 @@ ServerResource {
|
||||
|
||||
protected HypervisorType _hypervisorType;
|
||||
protected String _hypervisorURI;
|
||||
protected long _hypervisorLibvirtVersion;
|
||||
protected long _hypervisorQemuVersion;
|
||||
protected String _hypervisorPath;
|
||||
protected String _networkDirectSourceMode;
|
||||
protected String _networkDirectDevice;
|
||||
@ -742,6 +745,8 @@ ServerResource {
|
||||
try {
|
||||
_hvVersion = conn.getVersion();
|
||||
_hvVersion = (_hvVersion % 1000000) / 1000;
|
||||
_hypervisorLibvirtVersion = conn.getLibVirVersion();
|
||||
_hypervisorQemuVersion = conn.getVersion();
|
||||
} catch (LibvirtException e) {
|
||||
s_logger.trace("Ignoring libvirt error.", e);
|
||||
}
|
||||
@ -1419,6 +1424,10 @@ ServerResource {
|
||||
VolumeTO volume = new VolumeTO(cmd.getVolumeId(), dskch.getType(),
|
||||
pool.getType(), pool.getUuid(), pool.getPath(),
|
||||
vol.getName(), vol.getName(), disksize, null);
|
||||
volume.setBytesReadRate(dskch.getBytesReadRate());
|
||||
volume.setBytesWriteRate(dskch.getBytesWriteRate());
|
||||
volume.setIopsReadRate(dskch.getIopsReadRate());
|
||||
volume.setIopsWriteRate(dskch.getIopsWriteRate());
|
||||
return new CreateAnswer(cmd, volume);
|
||||
} catch (CloudRuntimeException e) {
|
||||
s_logger.debug("Failed to create volume: " + e.toString());
|
||||
@ -2557,7 +2566,7 @@ ServerResource {
|
||||
cmd.getPoolUuid());
|
||||
KVMPhysicalDisk disk = primary.getPhysicalDisk(cmd.getVolumePath());
|
||||
attachOrDetachDisk(conn, cmd.getAttach(), cmd.getVmName(), disk,
|
||||
cmd.getDeviceId().intValue());
|
||||
cmd.getDeviceId().intValue(), cmd.getBytesReadRate(), cmd.getBytesWriteRate(), cmd.getIopsReadRate(), cmd.getIopsWriteRate());
|
||||
} catch (LibvirtException e) {
|
||||
return new AttachVolumeAnswer(cmd, e.toString());
|
||||
} catch (InternalErrorException e) {
|
||||
@ -3155,6 +3164,8 @@ ServerResource {
|
||||
} else {
|
||||
guest.setGuestType(GuestDef.guestType.KVM);
|
||||
vm.setHvsType(HypervisorType.KVM.toString().toLowerCase());
|
||||
vm.setLibvirtVersion(_hypervisorLibvirtVersion);
|
||||
vm.setQemuVersion(_hypervisorQemuVersion);
|
||||
}
|
||||
guest.setGuestArch(vmTO.getArch());
|
||||
guest.setMachineType("pc");
|
||||
@ -3435,6 +3446,17 @@ ServerResource {
|
||||
|
||||
}
|
||||
|
||||
VolumeObjectTO volumeObjectTO = (VolumeObjectTO)data;
|
||||
|
||||
if ((volumeObjectTO.getBytesReadRate() != null) && (volumeObjectTO.getBytesReadRate() > 0))
|
||||
disk.setBytesReadRate(volumeObjectTO.getBytesReadRate());
|
||||
if ((volumeObjectTO.getBytesWriteRate() != null) && (volumeObjectTO.getBytesWriteRate() > 0))
|
||||
disk.setBytesWriteRate(volumeObjectTO.getBytesWriteRate());
|
||||
if ((volumeObjectTO.getIopsReadRate() != null) && (volumeObjectTO.getIopsReadRate() > 0))
|
||||
disk.setIopsReadRate(volumeObjectTO.getIopsReadRate());
|
||||
if ((volumeObjectTO.getIopsWriteRate() != null) && (volumeObjectTO.getIopsWriteRate() > 0))
|
||||
disk.setIopsWriteRate(volumeObjectTO.getIopsWriteRate());
|
||||
|
||||
vm.getDevices().addDevice(disk);
|
||||
}
|
||||
|
||||
@ -3560,7 +3582,7 @@ ServerResource {
|
||||
|
||||
protected synchronized String attachOrDetachDisk(Connect conn,
|
||||
boolean attach, String vmName, KVMPhysicalDisk attachingDisk,
|
||||
int devId) throws LibvirtException, InternalErrorException {
|
||||
int devId, Long bytesReadRate, Long bytesWriteRate, Long iopsReadRate, Long iopsWriteRate) throws LibvirtException, InternalErrorException {
|
||||
List<DiskDef> disks = null;
|
||||
Domain dm = null;
|
||||
DiskDef diskdef = null;
|
||||
@ -3600,6 +3622,14 @@ ServerResource {
|
||||
diskdef.defBlockBasedDisk(attachingDisk.getPath(), devId,
|
||||
DiskDef.diskBus.VIRTIO);
|
||||
}
|
||||
if ((bytesReadRate != null) && (bytesReadRate > 0))
|
||||
diskdef.setBytesReadRate(bytesReadRate);
|
||||
if ((bytesWriteRate != null) && (bytesWriteRate > 0))
|
||||
diskdef.setBytesWriteRate(bytesWriteRate);
|
||||
if ((iopsReadRate != null) && (iopsReadRate > 0))
|
||||
diskdef.setIopsReadRate(iopsReadRate);
|
||||
if ((iopsWriteRate != null) && (iopsWriteRate > 0))
|
||||
diskdef.setIopsWriteRate(iopsWriteRate);
|
||||
}
|
||||
|
||||
String xml = diskdef.toString();
|
||||
|
||||
@ -105,6 +105,31 @@ public class LibvirtDomainXMLParser {
|
||||
DiskDef.diskBus.valueOf(bus.toUpperCase()));
|
||||
}
|
||||
}
|
||||
|
||||
NodeList iotune = disk.getElementsByTagName("iotune");
|
||||
if ((iotune != null) && (iotune.getLength() !=0)) {
|
||||
String bytesReadRateStr = getTagValue("read_bytes_sec", (Element)iotune.item(0));
|
||||
if (bytesReadRateStr != null) {
|
||||
Long bytesReadRate = Long.parseLong(bytesReadRateStr);
|
||||
def.setBytesReadRate(bytesReadRate);
|
||||
}
|
||||
String bytesWriteRateStr = getTagValue("write_bytes_sec", (Element)iotune.item(0));
|
||||
if (bytesWriteRateStr != null) {
|
||||
Long bytesWriteRate = Long.parseLong(bytesWriteRateStr);
|
||||
def.setBytesWriteRate(bytesWriteRate);
|
||||
}
|
||||
String iopsReadRateStr = getTagValue("read_iops_sec", (Element)iotune.item(0));
|
||||
if (iopsReadRateStr != null) {
|
||||
Long iopsReadRate = Long.parseLong(iopsReadRateStr);
|
||||
def.setIopsReadRate(iopsReadRate);
|
||||
}
|
||||
String iopsWriteRateStr = getTagValue("write_iops_sec", (Element)iotune.item(0));
|
||||
if (iopsWriteRateStr != null) {
|
||||
Long iopsWriteRate = Long.parseLong(iopsWriteRateStr);
|
||||
def.setIopsWriteRate(iopsWriteRate);
|
||||
}
|
||||
}
|
||||
|
||||
diskDefs.add(def);
|
||||
}
|
||||
|
||||
|
||||
@ -22,8 +22,12 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.cloud.utils.script.Script;
|
||||
|
||||
public class LibvirtVMDef {
|
||||
private String _hvsType;
|
||||
private static long _libvirtVersion;
|
||||
private static long _qemuVersion;
|
||||
private String _domName;
|
||||
private String _domUUID;
|
||||
private String _desc;
|
||||
@ -439,6 +443,10 @@ public class LibvirtVMDef {
|
||||
private boolean _readonly = false;
|
||||
private boolean _shareable = false;
|
||||
private boolean _deferAttach = false;
|
||||
private Long _bytesReadRate;
|
||||
private Long _bytesWriteRate;
|
||||
private Long _iopsReadRate;
|
||||
private Long _iopsWriteRate;
|
||||
|
||||
public void setDeviceType(deviceType deviceType) {
|
||||
_deviceType = deviceType;
|
||||
@ -584,6 +592,22 @@ public class LibvirtVMDef {
|
||||
return suffix - 'a';
|
||||
}
|
||||
|
||||
public void setBytesReadRate(Long bytesReadRate) {
|
||||
_bytesReadRate = bytesReadRate;
|
||||
}
|
||||
|
||||
public void setBytesWriteRate(Long bytesWriteRate) {
|
||||
_bytesWriteRate = bytesWriteRate;
|
||||
}
|
||||
|
||||
public void setIopsReadRate(Long iopsReadRate) {
|
||||
_iopsReadRate = iopsReadRate;
|
||||
}
|
||||
|
||||
public void setIopsWriteRate(Long iopsWriteRate) {
|
||||
_iopsWriteRate = iopsWriteRate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder diskBuilder = new StringBuilder();
|
||||
@ -627,6 +651,22 @@ public class LibvirtVMDef {
|
||||
diskBuilder.append(" bus='" + _bus + "'");
|
||||
}
|
||||
diskBuilder.append("/>\n");
|
||||
|
||||
if ((_deviceType != deviceType.CDROM) && (_libvirtVersion >= 9008) && (_qemuVersion >= 1001000)
|
||||
&& (((_bytesReadRate != null) && (_bytesReadRate > 0)) || ((_bytesWriteRate != null) && (_bytesWriteRate > 0))
|
||||
|| ((_iopsReadRate != null) && (_iopsReadRate > 0)) || ((_iopsWriteRate != null) && (_iopsWriteRate > 0)) )) { // not CDROM, from libvirt 0.9.8 and QEMU 1.1.0
|
||||
diskBuilder.append("<iotune>\n");
|
||||
if ((_bytesReadRate != null) && (_bytesReadRate > 0))
|
||||
diskBuilder.append("<read_bytes_sec>" + _bytesReadRate + "</read_bytes_sec>\n");
|
||||
if ((_bytesWriteRate != null) && (_bytesWriteRate > 0))
|
||||
diskBuilder.append("<write_bytes_sec>" + _bytesWriteRate + "</write_bytes_sec>\n");
|
||||
if ((_iopsReadRate != null) && (_iopsReadRate > 0))
|
||||
diskBuilder.append("<read_iops_sec>" + _iopsReadRate + "</read_iops_sec>\n");
|
||||
if ((_iopsWriteRate != null) && (_iopsWriteRate > 0))
|
||||
diskBuilder.append("<write_iops_sec>" + _iopsWriteRate + "</write_iops_sec>\n");
|
||||
diskBuilder.append("</iotune>\n");
|
||||
}
|
||||
|
||||
diskBuilder.append("</disk>\n");
|
||||
return diskBuilder.toString();
|
||||
}
|
||||
@ -1012,6 +1052,14 @@ public class LibvirtVMDef {
|
||||
return _hvsType;
|
||||
}
|
||||
|
||||
public void setLibvirtVersion(long libvirtVersion) {
|
||||
_libvirtVersion = libvirtVersion;
|
||||
}
|
||||
|
||||
public void setQemuVersion(long qemuVersion) {
|
||||
_qemuVersion = qemuVersion;
|
||||
}
|
||||
|
||||
public void setDomainName(String domainName) {
|
||||
_domName = domainName;
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ public class BigSwitchVnsGuestNetworkGuru extends GuestNetworkGuru {
|
||||
}
|
||||
|
||||
String vnet = _dcDao.allocateVnet(dcId, physicalNetworkId,
|
||||
network.getAccountId(), context.getReservationId());
|
||||
network.getAccountId(), context.getReservationId(), canUseSystemGuestVlan(network.getAccountId()));
|
||||
if (vnet == null) {
|
||||
throw new InsufficientVirtualNetworkCapcityException("Unable to allocate vnet as a " +
|
||||
"part of network " + network + " implement ", DataCenter.class, dcId);
|
||||
|
||||
@ -94,7 +94,8 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
|
||||
protected void allocateVnet(Network network, NetworkVO implemented, long dcId,
|
||||
long physicalNetworkId, String reservationId) throws InsufficientVirtualNetworkCapcityException {
|
||||
if (network.getBroadcastUri() == null) {
|
||||
String vnet = _dcDao.allocateVnet(dcId, physicalNetworkId, network.getAccountId(), reservationId);
|
||||
String vnet = _dcDao.allocateVnet(dcId, physicalNetworkId, network.getAccountId(), reservationId,
|
||||
canUseSystemGuestVlan(network.getAccountId()));
|
||||
if (vnet == null) {
|
||||
throw new InsufficientVirtualNetworkCapcityException("Unable to allocate vnet as a part of network " + network + " implement ", DataCenter.class, dcId);
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ class networkConfig:
|
||||
if os.path.exists("/proc/sys/net/bridge"):
|
||||
return True
|
||||
|
||||
return bash("modprobe bridge").isSucess()
|
||||
return bash("modprobe -b bridge").isSucess()
|
||||
|
||||
@staticmethod
|
||||
def isNetworkDev(devName):
|
||||
|
||||
@ -173,8 +173,8 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust
|
||||
s_logger.trace("Begin scanning directly connected hosts");
|
||||
}
|
||||
|
||||
// for agents that are self-managed, threshold to be considered as disconnected is 3 ping intervals
|
||||
long cutSeconds = (System.currentTimeMillis() >> 10) - (_pingInterval * 3);
|
||||
// for agents that are self-managed, threshold to be considered as disconnected after pingtimeout
|
||||
long cutSeconds = (System.currentTimeMillis() >> 10) - (_pingTimeout);
|
||||
List<HostVO> hosts = _hostDao.findAndUpdateDirectAgentToLoad(cutSeconds, _loadSize, _nodeId);
|
||||
List<HostVO> appliances = _hostDao.findAndUpdateApplianceToLoad(cutSeconds, _nodeId);
|
||||
hosts.addAll(appliances);
|
||||
|
||||
@ -433,13 +433,6 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
snapshotResponse.setVolumeId(volume.getUuid());
|
||||
snapshotResponse.setVolumeName(volume.getName());
|
||||
snapshotResponse.setVolumeType(volume.getVolumeType().name());
|
||||
|
||||
DataCenter zone = ApiDBUtils.findZoneById(volume.getDataCenterId());
|
||||
if (zone != null) {
|
||||
snapshotResponse.setZoneName(zone.getName());
|
||||
snapshotResponse.setZoneType(zone.getNetworkType().toString());
|
||||
snapshotResponse.setZoneId(zone.getUuid());
|
||||
}
|
||||
}
|
||||
snapshotResponse.setCreated(snapshot.getCreated());
|
||||
snapshotResponse.setName(snapshot.getName());
|
||||
@ -823,7 +816,6 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
if (zone != null) {
|
||||
podResponse.setZoneId(zone.getUuid());
|
||||
podResponse.setZoneName(zone.getName());
|
||||
podResponse.setZoneType(zone.getNetworkType().toString());
|
||||
}
|
||||
podResponse.setNetmask(NetUtils.getCidrNetmask(pod.getCidrSize()));
|
||||
podResponse.setStartIp(ipRange[0]);
|
||||
@ -981,7 +973,6 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
if (dc != null) {
|
||||
clusterResponse.setZoneId(dc.getUuid());
|
||||
clusterResponse.setZoneName(dc.getName());
|
||||
clusterResponse.setZoneType(dc.getNetworkType().toString());
|
||||
}
|
||||
clusterResponse.setHypervisorType(cluster.getHypervisorType().toString());
|
||||
clusterResponse.setClusterType(cluster.getClusterType().toString());
|
||||
@ -1182,7 +1173,6 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
if (zone != null) {
|
||||
vmResponse.setZoneId(zone.getUuid());
|
||||
vmResponse.setZoneName(zone.getName());
|
||||
vmResponse.setZoneType(zone.getNetworkType().toString());
|
||||
vmResponse.setDns1(zone.getDns1());
|
||||
vmResponse.setDns2(zone.getDns2());
|
||||
}
|
||||
@ -1539,7 +1529,6 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
if (datacenter != null) {
|
||||
isoResponse.setZoneId(datacenter.getUuid());
|
||||
isoResponse.setZoneName(datacenter.getName());
|
||||
isoResponse.setZoneType(datacenter.getNetworkType().toString());
|
||||
}
|
||||
|
||||
// If the user is an admin, add the template download status
|
||||
@ -2208,7 +2197,6 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
if (zone != null) {
|
||||
response.setZoneId(zone.getUuid());
|
||||
response.setZoneName(zone.getName());
|
||||
response.setZoneType(zone.getNetworkType().toString());
|
||||
}
|
||||
if (network.getPhysicalNetworkId() != null) {
|
||||
PhysicalNetworkVO pnet = ApiDBUtils.findPhysicalNetworkById(network.getPhysicalNetworkId());
|
||||
|
||||
@ -27,6 +27,7 @@ import java.util.Set;
|
||||
import javax.ejb.Local;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import com.cloud.storage.*;
|
||||
import org.apache.cloudstack.affinity.AffinityGroupResponse;
|
||||
import org.apache.cloudstack.affinity.AffinityGroupVMMapVO;
|
||||
import org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDao;
|
||||
@ -54,28 +55,7 @@ import org.apache.cloudstack.api.command.user.vmgroup.ListVMGroupsCmd;
|
||||
import org.apache.cloudstack.api.command.user.volume.ListResourceDetailsCmd;
|
||||
import org.apache.cloudstack.api.command.user.volume.ListVolumesCmd;
|
||||
import org.apache.cloudstack.api.command.user.zone.ListZonesByCmd;
|
||||
import org.apache.cloudstack.api.response.AccountResponse;
|
||||
import org.apache.cloudstack.api.response.AsyncJobResponse;
|
||||
import org.apache.cloudstack.api.response.DiskOfferingResponse;
|
||||
import org.apache.cloudstack.api.response.DomainRouterResponse;
|
||||
import org.apache.cloudstack.api.response.EventResponse;
|
||||
import org.apache.cloudstack.api.response.HostResponse;
|
||||
import org.apache.cloudstack.api.response.ImageStoreResponse;
|
||||
import org.apache.cloudstack.api.response.InstanceGroupResponse;
|
||||
import org.apache.cloudstack.api.response.ListResponse;
|
||||
import org.apache.cloudstack.api.response.ProjectAccountResponse;
|
||||
import org.apache.cloudstack.api.response.ProjectInvitationResponse;
|
||||
import org.apache.cloudstack.api.response.ProjectResponse;
|
||||
import org.apache.cloudstack.api.response.ResourceDetailResponse;
|
||||
import org.apache.cloudstack.api.response.ResourceTagResponse;
|
||||
import org.apache.cloudstack.api.response.SecurityGroupResponse;
|
||||
import org.apache.cloudstack.api.response.ServiceOfferingResponse;
|
||||
import org.apache.cloudstack.api.response.StoragePoolResponse;
|
||||
import org.apache.cloudstack.api.response.TemplateResponse;
|
||||
import org.apache.cloudstack.api.response.UserResponse;
|
||||
import org.apache.cloudstack.api.response.UserVmResponse;
|
||||
import org.apache.cloudstack.api.response.VolumeResponse;
|
||||
import org.apache.cloudstack.api.response.ZoneResponse;
|
||||
import org.apache.cloudstack.api.response.*;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.TemplateState;
|
||||
import org.apache.cloudstack.query.QueryService;
|
||||
import org.apache.log4j.Logger;
|
||||
@ -151,12 +131,7 @@ import com.cloud.server.ResourceTag.TaggedResourceType;
|
||||
import com.cloud.server.TaggedResourceService;
|
||||
import com.cloud.service.ServiceOfferingVO;
|
||||
import com.cloud.service.dao.ServiceOfferingDao;
|
||||
import com.cloud.storage.DataStoreRole;
|
||||
import com.cloud.storage.Storage;
|
||||
import com.cloud.storage.Storage.ImageFormat;
|
||||
import com.cloud.storage.VMTemplateVO;
|
||||
import com.cloud.storage.Volume;
|
||||
import com.cloud.storage.VolumeDetailVO;
|
||||
import com.cloud.storage.dao.VMTemplateDao;
|
||||
import com.cloud.storage.dao.VolumeDetailsDao;
|
||||
import com.cloud.template.VirtualMachineTemplate.TemplateFilter;
|
||||
@ -1061,9 +1036,9 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
|
||||
|
||||
@Override
|
||||
public ListResponse<DomainRouterResponse> searchForRouters(ListRoutersCmd cmd) {
|
||||
Pair<List<DomainRouterJoinVO>, Integer> result = searchForRoutersInternal(cmd, cmd.getId(),
|
||||
cmd.getRouterName(), cmd.getState(), cmd.getZoneId(), cmd.getPodId(), cmd.getHostId(),
|
||||
cmd.getKeyword(), cmd.getNetworkId(), cmd.getVpcId(), cmd.getForVpc(), cmd.getRole(), cmd.getZoneType());
|
||||
Pair<List<DomainRouterJoinVO>, Integer> result = searchForRoutersInternal(cmd, cmd.getId(), cmd.getRouterName(),
|
||||
cmd.getState(), cmd.getZoneId(), cmd.getPodId(), cmd.getHostId(), cmd.getKeyword(), cmd.getNetworkId(),
|
||||
cmd.getVpcId(), cmd.getForVpc(), cmd.getRole());
|
||||
ListResponse<DomainRouterResponse> response = new ListResponse<DomainRouterResponse>();
|
||||
|
||||
List<DomainRouterResponse> routerResponses = ViewResponseHelper.createDomainRouterResponse(result.first()
|
||||
@ -1074,9 +1049,9 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
|
||||
|
||||
@Override
|
||||
public ListResponse<DomainRouterResponse> searchForInternalLbVms(ListInternalLBVMsCmd cmd) {
|
||||
Pair<List<DomainRouterJoinVO>, Integer> result = searchForRoutersInternal(cmd, cmd.getId(),
|
||||
cmd.getRouterName(), cmd.getState(), cmd.getZoneId(), cmd.getPodId(), cmd.getHostId(),
|
||||
cmd.getKeyword(), cmd.getNetworkId(), cmd.getVpcId(), cmd.getForVpc(), cmd.getRole(), cmd.getZoneType());
|
||||
Pair<List<DomainRouterJoinVO>, Integer> result = searchForRoutersInternal(cmd, cmd.getId(), cmd.getRouterName(),
|
||||
cmd.getState(), cmd.getZoneId(), cmd.getPodId(), cmd.getHostId(), cmd.getKeyword(), cmd.getNetworkId(),
|
||||
cmd.getVpcId(), cmd.getForVpc(), cmd.getRole());
|
||||
ListResponse<DomainRouterResponse> response = new ListResponse<DomainRouterResponse>();
|
||||
|
||||
List<DomainRouterResponse> routerResponses = ViewResponseHelper.createDomainRouterResponse(result.first()
|
||||
@ -1085,10 +1060,9 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
|
||||
return response;
|
||||
}
|
||||
|
||||
private Pair<List<DomainRouterJoinVO>, Integer> searchForRoutersInternal(BaseListProjectAndAccountResourcesCmd cmd,
|
||||
Long id, String name, String state, Long zoneId, Long podId, Long hostId, String keyword, Long networkId,
|
||||
Long vpcId, Boolean forVpc, String role, String zoneType) {
|
||||
|
||||
private Pair<List<DomainRouterJoinVO>, Integer> searchForRoutersInternal(BaseListProjectAndAccountResourcesCmd cmd, Long id,
|
||||
String name, String state, Long zoneId, Long podId, Long hostId, String keyword, Long networkId, Long vpcId, Boolean forVpc, String role) {
|
||||
|
||||
Account caller = UserContext.current().getCaller();
|
||||
List<Long> permittedAccounts = new ArrayList<Long>();
|
||||
|
||||
@ -1117,7 +1091,6 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
|
||||
sb.and("accountId", sb.entity().getAccountId(), SearchCriteria.Op.IN);
|
||||
sb.and("state", sb.entity().getState(), SearchCriteria.Op.EQ);
|
||||
sb.and("dataCenterId", sb.entity().getDataCenterId(), SearchCriteria.Op.EQ);
|
||||
sb.and("dataCenterType", sb.entity().getDataCenterType(), SearchCriteria.Op.EQ);
|
||||
sb.and("podId", sb.entity().getPodId(), SearchCriteria.Op.EQ);
|
||||
sb.and("hostId", sb.entity().getHostId(), SearchCriteria.Op.EQ);
|
||||
sb.and("vpcId", sb.entity().getVpcId(), SearchCriteria.Op.EQ);
|
||||
@ -1168,10 +1141,6 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
|
||||
sc.setParameters("podId", podId);
|
||||
}
|
||||
|
||||
if (zoneType != null) {
|
||||
sc.setParameters("dataCenterType", zoneType);
|
||||
}
|
||||
|
||||
if (hostId != null) {
|
||||
sc.setParameters("hostId", hostId);
|
||||
}
|
||||
@ -1969,6 +1938,14 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
|
||||
}
|
||||
|
||||
private Pair<List<StoragePoolJoinVO>, Integer> searchForStoragePoolsInternal(ListStoragePoolsCmd cmd) {
|
||||
ScopeType scopeType = null;
|
||||
if (cmd.getScope() != null) {
|
||||
try {
|
||||
scopeType = Enum.valueOf(ScopeType.class, cmd.getScope().toUpperCase());
|
||||
} catch (Exception e) {
|
||||
throw new InvalidParameterValueException("Invalid scope type: " + cmd.getScope());
|
||||
}
|
||||
}
|
||||
|
||||
Long zoneId = _accountMgr.checkAccessAndSpecifyAuthority(UserContext.current().getCaller(), cmd.getZoneId());
|
||||
Object id = cmd.getId();
|
||||
@ -2027,6 +2004,9 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
|
||||
if (cluster != null) {
|
||||
sc.setParameters("clusterId", cluster);
|
||||
}
|
||||
if (scopeType != null) {
|
||||
sc.setParameters("scope", scopeType.toString());
|
||||
}
|
||||
|
||||
// search Pool details by ids
|
||||
Pair<List<StoragePoolJoinVO>, Integer> uniquePoolPair = _poolJoinDao.searchAndCount(sc, searchFilter);
|
||||
@ -2401,7 +2381,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
|
||||
Long id = cmd.getId();
|
||||
String keyword = cmd.getKeyword();
|
||||
String name = cmd.getName();
|
||||
String networkType = cmd.getZoneType();
|
||||
String networkType = cmd.getNetworkType();
|
||||
|
||||
Filter searchFilter = new Filter(DataCenterJoinVO.class, null, false, cmd.getStartIndex(), cmd.getPageSizeVal());
|
||||
SearchCriteria<DataCenterJoinVO> sc = _dcJoinDao.createSearchCriteria();
|
||||
|
||||
@ -75,7 +75,12 @@ public class DiskOfferingJoinDaoImpl extends GenericDaoBase<DiskOfferingJoinVO,
|
||||
diskOfferingResponse.setTags(offering.getTags());
|
||||
diskOfferingResponse.setCustomized(offering.isCustomized());
|
||||
diskOfferingResponse.setStorageType(offering.isUseLocalStorage() ? ServiceOffering.StorageType.local.toString() : ServiceOffering.StorageType.shared.toString());
|
||||
diskOfferingResponse.setBytesReadRate(offering.getBytesReadRate());
|
||||
diskOfferingResponse.setBytesWriteRate(offering.getBytesWriteRate());
|
||||
diskOfferingResponse.setIopsReadRate(offering.getIopsReadRate());
|
||||
diskOfferingResponse.setIopsWriteRate(offering.getIopsWriteRate());
|
||||
diskOfferingResponse.setObjectName("diskoffering");
|
||||
|
||||
return diskOfferingResponse;
|
||||
}
|
||||
|
||||
|
||||
@ -149,7 +149,6 @@ public class DomainRouterJoinDaoImpl extends GenericDaoBase<DomainRouterJoinVO,
|
||||
routerResponse.setDomainName(router.getDomainName());
|
||||
|
||||
routerResponse.setZoneName(router.getDataCenterName());
|
||||
routerResponse.setZoneType(router.getDataCenterType());
|
||||
routerResponse.setDns1(router.getDns1());
|
||||
routerResponse.setDns2(router.getDns2());
|
||||
|
||||
|
||||
@ -99,7 +99,6 @@ public class HostJoinDaoImpl extends GenericDaoBase<HostJoinVO, Long> implements
|
||||
hostResponse.setOsCategoryId(host.getOsCategoryUuid());
|
||||
hostResponse.setOsCategoryName(host.getOsCategoryName());
|
||||
hostResponse.setZoneName(host.getZoneName());
|
||||
hostResponse.setZoneType(host.getZoneType().toString());
|
||||
hostResponse.setPodName(host.getPodName());
|
||||
if ( host.getClusterId() > 0) {
|
||||
hostResponse.setClusterName(host.getClusterName());
|
||||
|
||||
@ -75,6 +75,10 @@ public class ServiceOfferingJoinDaoImpl extends GenericDaoBase<ServiceOfferingJo
|
||||
offeringResponse.setNetworkRate(offering.getRateMbps());
|
||||
offeringResponse.setHostTag(offering.getHostTag());
|
||||
offeringResponse.setDeploymentPlanner(offering.getDeploymentPlanner());
|
||||
offeringResponse.setBytesReadRate(offering.getBytesReadRate());
|
||||
offeringResponse.setBytesWriteRate(offering.getBytesWriteRate());
|
||||
offeringResponse.setIopsReadRate(offering.getIopsReadRate());
|
||||
offeringResponse.setIopsWriteRate(offering.getIopsWriteRate());
|
||||
offeringResponse.setObjectName("serviceoffering");
|
||||
|
||||
return offeringResponse;
|
||||
|
||||
@ -21,7 +21,6 @@ import java.util.List;
|
||||
|
||||
import javax.ejb.Local;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.cloudstack.api.response.StoragePoolResponse;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.stereotype.Component;
|
||||
@ -72,10 +71,7 @@ public class StoragePoolJoinDaoImpl extends GenericDaoBase<StoragePoolJoinVO, Lo
|
||||
poolResponse.setIpAddress(pool.getHostAddress());
|
||||
poolResponse.setZoneId(pool.getZoneUuid());
|
||||
poolResponse.setZoneName(pool.getZoneName());
|
||||
poolResponse.setZoneType(pool.getZoneType());
|
||||
if (pool.getPoolType() != null) {
|
||||
poolResponse.setType(pool.getPoolType().toString());
|
||||
}
|
||||
poolResponse.setType(pool.getPoolType().toString());
|
||||
poolResponse.setPodId(pool.getPodUuid());
|
||||
poolResponse.setPodName(pool.getPodName());
|
||||
poolResponse.setCreated(pool.getCreated());
|
||||
|
||||
@ -120,7 +120,6 @@ public class UserVmJoinDaoImpl extends GenericDaoBase<UserVmJoinVO, Long> implem
|
||||
}
|
||||
userVmResponse.setZoneId(userVm.getDataCenterUuid());
|
||||
userVmResponse.setZoneName(userVm.getDataCenterName());
|
||||
userVmResponse.setZoneType(userVm.getDataCenterType());
|
||||
if ((caller == null) || (caller.getType() == Account.ACCOUNT_TYPE_ADMIN)) {
|
||||
userVmResponse.setInstanceName(userVm.getInstanceName());
|
||||
userVmResponse.setHostId(userVm.getHostUuid());
|
||||
@ -141,6 +140,8 @@ public class UserVmJoinDaoImpl extends GenericDaoBase<UserVmJoinVO, Long> implem
|
||||
if (details.contains(VMDetails.all) || details.contains(VMDetails.servoff)) {
|
||||
userVmResponse.setServiceOfferingId(userVm.getServiceOfferingUuid());
|
||||
userVmResponse.setServiceOfferingName(userVm.getServiceOfferingName());
|
||||
}
|
||||
if (details.contains(VMDetails.all) || details.contains(VMDetails.servoff) || details.contains(VMDetails.stats)) {
|
||||
userVmResponse.setCpuNumber(userVm.getCpu());
|
||||
userVmResponse.setCpuSpeed(userVm.getSpeed());
|
||||
userVmResponse.setMemory(userVm.getRamSize());
|
||||
|
||||
@ -86,8 +86,7 @@ public class VolumeJoinDaoImpl extends GenericDaoBase<VolumeJoinVO, Long> implem
|
||||
|
||||
volResponse.setZoneId(volume.getDataCenterUuid());
|
||||
volResponse.setZoneName(volume.getDataCenterName());
|
||||
volResponse.setZoneType(volume.getDataCenterType());
|
||||
|
||||
|
||||
volResponse.setVolumeType(volume.getVolumeType().toString());
|
||||
volResponse.setDeviceId(volume.getDeviceId());
|
||||
|
||||
@ -160,6 +159,11 @@ public class VolumeJoinDaoImpl extends GenericDaoBase<VolumeJoinVO, Long> implem
|
||||
}
|
||||
volResponse.setStorageType(volume.isUseLocalStorage() ? ServiceOffering.StorageType.local.toString() : ServiceOffering.StorageType.shared
|
||||
.toString());
|
||||
volResponse.setBytesReadRate(volume.getBytesReadRate());
|
||||
volResponse.setBytesWriteRate(volume.getBytesReadRate());
|
||||
volResponse.setIopsReadRate(volume.getIopsWriteRate());
|
||||
volResponse.setIopsWriteRate(volume.getIopsWriteRate());
|
||||
|
||||
}
|
||||
Long poolId = volume.getPoolId();
|
||||
String poolName = (poolId == null) ? "none" : volume.getPoolName();
|
||||
|
||||
@ -64,6 +64,18 @@ public class DiskOfferingJoinVO extends BaseViewVO implements InternalIdentity,
|
||||
@Column(name="sort_key")
|
||||
int sortKey;
|
||||
|
||||
@Column(name="bytes_read_rate")
|
||||
Long bytesReadRate;
|
||||
|
||||
@Column(name="bytes_write_rate")
|
||||
Long bytesWriteRate;
|
||||
|
||||
@Column(name="iops_read_rate")
|
||||
Long iopsReadRate;
|
||||
|
||||
@Column(name="iops_write_rate")
|
||||
Long iopsWriteRate;
|
||||
|
||||
@Column(name="type")
|
||||
Type type;
|
||||
|
||||
@ -239,6 +251,36 @@ public class DiskOfferingJoinVO extends BaseViewVO implements InternalIdentity,
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public void setBytesReadRate(Long bytesReadRate) {
|
||||
this.bytesReadRate = bytesReadRate;
|
||||
}
|
||||
|
||||
public Long getBytesReadRate() {
|
||||
return bytesReadRate;
|
||||
}
|
||||
|
||||
public void setBytesWriteRate(Long bytesWriteRate) {
|
||||
this.bytesWriteRate = bytesWriteRate;
|
||||
}
|
||||
|
||||
public Long getBytesWriteRate() {
|
||||
return bytesWriteRate;
|
||||
}
|
||||
|
||||
public void setIopsReadRate(Long iopsReadRate) {
|
||||
this.iopsReadRate = iopsReadRate;
|
||||
}
|
||||
|
||||
public Long getIopsReadRate() {
|
||||
return iopsReadRate;
|
||||
}
|
||||
|
||||
public void setIopsWriteRate(Long iopsWriteRate) {
|
||||
this.iopsWriteRate = iopsWriteRate;
|
||||
}
|
||||
|
||||
public Long getIopsWriteRate() {
|
||||
return iopsWriteRate;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -102,9 +102,6 @@ public class DomainRouterJoinVO extends BaseViewVO implements ControlledViewEnti
|
||||
@Column(name="data_center_name")
|
||||
private String dataCenterName = null;
|
||||
|
||||
@Column(name="data_center_type")
|
||||
private String dataCenterType;
|
||||
|
||||
@Column(name="dns1")
|
||||
private String dns1 = null;
|
||||
|
||||
@ -453,15 +450,6 @@ public class DomainRouterJoinVO extends BaseViewVO implements ControlledViewEnti
|
||||
this.dataCenterName = zoneName;
|
||||
}
|
||||
|
||||
|
||||
public String getDataCenterType() {
|
||||
return dataCenterType;
|
||||
}
|
||||
|
||||
public void setDataCenterType(String dataCenterType) {
|
||||
this.dataCenterType = dataCenterType;
|
||||
}
|
||||
|
||||
|
||||
public Long getHostId() {
|
||||
return hostId;
|
||||
|
||||
@ -130,9 +130,6 @@ public class HostJoinVO extends BaseViewVO implements InternalIdentity, Identity
|
||||
@Column(name="data_center_name")
|
||||
private String zoneName;
|
||||
|
||||
@Column(name="data_center_type")
|
||||
private String zoneType;
|
||||
|
||||
@Column(name="pod_id")
|
||||
private long podId;
|
||||
|
||||
@ -234,15 +231,7 @@ public class HostJoinVO extends BaseViewVO implements InternalIdentity, Identity
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public String getZoneType() {
|
||||
return zoneType;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@ -90,6 +90,17 @@ public class ServiceOfferingJoinVO extends BaseViewVO implements InternalIdentit
|
||||
@Column(name="sort_key")
|
||||
int sortKey;
|
||||
|
||||
@Column(name="bytes_read_rate")
|
||||
Long bytesReadRate;
|
||||
|
||||
@Column(name="bytes_write_rate")
|
||||
Long bytesWriteRate;
|
||||
|
||||
@Column(name="iops_read_rate")
|
||||
Long iopsReadRate;
|
||||
|
||||
@Column(name="iops_write_rate")
|
||||
Long iopsWriteRate;
|
||||
|
||||
@Column(name=GenericDao.CREATED_COLUMN)
|
||||
private Date created;
|
||||
@ -329,5 +340,35 @@ public class ServiceOfferingJoinVO extends BaseViewVO implements InternalIdentit
|
||||
this.volatileVm = volatileVm;
|
||||
}
|
||||
|
||||
public void setBytesReadRate(Long bytesReadRate) {
|
||||
this.bytesReadRate = bytesReadRate;
|
||||
}
|
||||
|
||||
public Long getBytesReadRate() {
|
||||
return bytesReadRate;
|
||||
}
|
||||
|
||||
public void setBytesWriteRate(Long bytesWriteRate) {
|
||||
this.bytesWriteRate = bytesWriteRate;
|
||||
}
|
||||
|
||||
public Long getBytesWriteRate() {
|
||||
return bytesWriteRate;
|
||||
}
|
||||
|
||||
public void setIopsReadRate(Long iopsReadRate) {
|
||||
this.iopsReadRate = iopsReadRate;
|
||||
}
|
||||
|
||||
public Long getIopsReadRate() {
|
||||
return iopsReadRate;
|
||||
}
|
||||
|
||||
public void setIopsWriteRate(Long iopsWriteRate) {
|
||||
this.iopsWriteRate = iopsWriteRate;
|
||||
}
|
||||
|
||||
public Long getIopsWriteRate() {
|
||||
return iopsWriteRate;
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,9 +100,6 @@ public class StoragePoolJoinVO extends BaseViewVO implements InternalIdentity, I
|
||||
@Column(name="data_center_name")
|
||||
private String zoneName;
|
||||
|
||||
@Column(name="data_center_type")
|
||||
private String zoneType;
|
||||
|
||||
@Column(name="pod_id")
|
||||
private long podId;
|
||||
|
||||
@ -302,14 +299,6 @@ public class StoragePoolJoinVO extends BaseViewVO implements InternalIdentity, I
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public String getZoneType() {
|
||||
return zoneType;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
public long getPodId() {
|
||||
return podId;
|
||||
}
|
||||
|
||||
@ -156,9 +156,6 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity {
|
||||
@Column(name="data_center_name")
|
||||
private String dataCenterName = null;
|
||||
|
||||
@Column(name="data_center_type")
|
||||
private String dataCenterType = null;
|
||||
|
||||
@Column(name="security_group_enabled")
|
||||
private boolean securityGroupEnabled;
|
||||
|
||||
@ -813,18 +810,8 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity {
|
||||
public void setDataCenterName(String zoneName) {
|
||||
this.dataCenterName = zoneName;
|
||||
}
|
||||
|
||||
|
||||
public String getDataCenterType() {
|
||||
return dataCenterType;
|
||||
}
|
||||
|
||||
|
||||
public void setDataCenterType(String zoneType) {
|
||||
this.dataCenterType = zoneType;
|
||||
}
|
||||
|
||||
|
||||
public boolean isSecurityGroupEnabled() {
|
||||
return securityGroupEnabled;
|
||||
}
|
||||
|
||||
@ -117,9 +117,6 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
|
||||
|
||||
@Column(name="data_center_name")
|
||||
private String dataCenterName;
|
||||
|
||||
@Column(name="data_center_type")
|
||||
private String dataCenterType;
|
||||
|
||||
@Column(name="vm_id")
|
||||
private long vmId;
|
||||
@ -184,6 +181,18 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
|
||||
@Column(name="use_local_storage")
|
||||
private boolean useLocalStorage;
|
||||
|
||||
@Column(name="bytes_read_rate")
|
||||
Long bytesReadRate;
|
||||
|
||||
@Column(name="bytes_write_rate")
|
||||
Long bytesWriteRate;
|
||||
|
||||
@Column(name="iops_read_rate")
|
||||
Long iopsReadRate;
|
||||
|
||||
@Column(name="iops_write_rate")
|
||||
Long iopsWriteRate;
|
||||
|
||||
@Column(name="pool_id")
|
||||
private long poolId;
|
||||
|
||||
@ -742,6 +751,37 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
|
||||
}
|
||||
|
||||
|
||||
public void setBytesReadRate(Long bytesReadRate) {
|
||||
this.bytesReadRate = bytesReadRate;
|
||||
}
|
||||
|
||||
public Long getBytesReadRate() {
|
||||
return bytesReadRate;
|
||||
}
|
||||
|
||||
public void setBytesWriteRate(Long bytesWriteRate) {
|
||||
this.bytesWriteRate = bytesWriteRate;
|
||||
}
|
||||
|
||||
public Long getBytesWriteRate() {
|
||||
return bytesWriteRate;
|
||||
}
|
||||
|
||||
public void setIopsReadRate(Long iopsReadRate) {
|
||||
this.iopsReadRate = iopsReadRate;
|
||||
}
|
||||
|
||||
public Long getIopsReadRate() {
|
||||
return iopsReadRate;
|
||||
}
|
||||
|
||||
public void setIopsWriteRate(Long iopsWriteRate) {
|
||||
this.iopsWriteRate = iopsWriteRate;
|
||||
}
|
||||
|
||||
public Long getIopsWriteRate() {
|
||||
return iopsWriteRate;
|
||||
}
|
||||
|
||||
public long getPoolId() {
|
||||
return poolId;
|
||||
@ -1017,20 +1057,8 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
|
||||
this.dataCenterName = dataCenterName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getDataCenterType() {
|
||||
return dataCenterType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setDataCenterType(String dataCenterType) {
|
||||
this.dataCenterType = dataCenterType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public long getPodId() {
|
||||
return podId;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user