mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Broke up some long strings
This commit is contained in:
parent
d620df2bdd
commit
170f32f171
@ -49,7 +49,7 @@ public class DummyResource implements ServerResource {
|
|||||||
Host.Type _type;
|
Host.Type _type;
|
||||||
boolean _negative;
|
boolean _negative;
|
||||||
IAgentControl _agentControl;
|
IAgentControl _agentControl;
|
||||||
private Map<String, Object> _params;
|
Map<String, Object> _params;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void disconnected() {
|
public void disconnected() {
|
||||||
|
|||||||
@ -22,9 +22,9 @@ public class DhcpTO {
|
|||||||
String netmask;
|
String netmask;
|
||||||
String startIpOfSubnet;
|
String startIpOfSubnet;
|
||||||
|
|
||||||
public DhcpTO(String routerIp, String gateway, String netmask, String StartIpOfSubnet) {
|
public DhcpTO(String routerIp, String gateway, String netmask, String startIpOfSubnet) {
|
||||||
this.routerIp = routerIp;
|
this.routerIp = routerIp;
|
||||||
this.startIpOfSubnet = StartIpOfSubnet;
|
this.startIpOfSubnet = startIpOfSubnet;
|
||||||
this.gateway = gateway;
|
this.gateway = gateway;
|
||||||
this.netmask = netmask;
|
this.netmask = netmask;
|
||||||
|
|
||||||
|
|||||||
@ -77,15 +77,15 @@ public class LoadBalancerTO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public LoadBalancerTO(String id, String srcIp, int srcPort, String protocol, String algorithm, boolean revoked, boolean alreadyAdded, boolean inline,
|
public LoadBalancerTO(String id, String srcIp, int srcPort, String protocol, String algorithm, boolean revoked, boolean alreadyAdded, boolean inline,
|
||||||
List<LbDestination> arg_destinations, List<LbStickinessPolicy> stickinessPolicies) {
|
List<LbDestination> argDestinations, List<LbStickinessPolicy> stickinessPolicies) {
|
||||||
|
|
||||||
this(id, srcIp, srcPort, protocol, algorithm, revoked, alreadyAdded, inline, arg_destinations, stickinessPolicies, null, null, null);
|
this(id, srcIp, srcPort, protocol, algorithm, revoked, alreadyAdded, inline, argDestinations, stickinessPolicies, null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LoadBalancerTO(String id, String srcIp, int srcPort, String protocol, String algorithm, boolean revoked, boolean alreadyAdded, boolean inline,
|
public LoadBalancerTO(String id, String srcIp, int srcPort, String protocol, String algorithm, boolean revoked, boolean alreadyAdded, boolean inline,
|
||||||
List<LbDestination> arg_destinations, List<LbStickinessPolicy> stickinessPolicies, List<LbHealthCheckPolicy> healthCheckPolicies, LbSslCert sslCert,
|
List<LbDestination> argDestinations, List<LbStickinessPolicy> stickinessPolicies, List<LbHealthCheckPolicy> healthCheckPolicies, LbSslCert sslCert,
|
||||||
String lbProtocol) {
|
String lbProtocol) {
|
||||||
this(id, srcIp, srcPort, protocol, algorithm, revoked, alreadyAdded, inline, arg_destinations);
|
this(id, srcIp, srcPort, protocol, algorithm, revoked, alreadyAdded, inline, argDestinations);
|
||||||
this.stickinessPolicies = null;
|
this.stickinessPolicies = null;
|
||||||
this.healthCheckPolicies = null;
|
this.healthCheckPolicies = null;
|
||||||
if (stickinessPolicies != null && stickinessPolicies.size() > 0) {
|
if (stickinessPolicies != null && stickinessPolicies.size() > 0) {
|
||||||
|
|||||||
@ -53,7 +53,6 @@ public interface NetworkElement extends Adapter {
|
|||||||
* @param config fully specified network configuration.
|
* @param config fully specified network configuration.
|
||||||
* @param offering network offering that originated the network configuration.
|
* @param offering network offering that originated the network configuration.
|
||||||
* @return true if network configuration is now usable; false if not; null if not handled by this element.
|
* @return true if network configuration is now usable; false if not; null if not handled by this element.
|
||||||
* @throws InsufficientNetworkCapacityException TODO
|
|
||||||
*/
|
*/
|
||||||
boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
|
boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
|
||||||
ResourceUnavailableException, InsufficientCapacityException;
|
ResourceUnavailableException, InsufficientCapacityException;
|
||||||
|
|||||||
@ -21,7 +21,6 @@ import java.util.List;
|
|||||||
import com.cloud.deploy.DeployDestination;
|
import com.cloud.deploy.DeployDestination;
|
||||||
import com.cloud.exception.ConcurrentOperationException;
|
import com.cloud.exception.ConcurrentOperationException;
|
||||||
import com.cloud.exception.InsufficientCapacityException;
|
import com.cloud.exception.InsufficientCapacityException;
|
||||||
import com.cloud.exception.InsufficientNetworkCapacityException;
|
|
||||||
import com.cloud.exception.ResourceUnavailableException;
|
import com.cloud.exception.ResourceUnavailableException;
|
||||||
import com.cloud.network.vpc.NetworkACLItem;
|
import com.cloud.network.vpc.NetworkACLItem;
|
||||||
import com.cloud.network.vpc.PrivateGateway;
|
import com.cloud.network.vpc.PrivateGateway;
|
||||||
@ -33,7 +32,6 @@ public interface VpcProvider extends NetworkElement {
|
|||||||
/**
|
/**
|
||||||
* Start vpc element as specified
|
* Start vpc element as specified
|
||||||
* @param vpc fully specified vpc configuration.
|
* @param vpc fully specified vpc configuration.
|
||||||
* @throws InsufficientNetworkCapacityException TODO
|
|
||||||
*/
|
*/
|
||||||
boolean implementVpc(Vpc vpc, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException,
|
boolean implementVpc(Vpc vpc, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException,
|
||||||
InsufficientCapacityException;
|
InsufficientCapacityException;
|
||||||
|
|||||||
@ -20,7 +20,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.cloudstack.api.ServerApiException;
|
|
||||||
import org.apache.cloudstack.api.command.admin.cluster.ListClustersCmd;
|
import org.apache.cloudstack.api.command.admin.cluster.ListClustersCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.config.ListCfgsByCmd;
|
import org.apache.cloudstack.api.command.admin.config.ListCfgsByCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.domain.UpdateDomainCmd;
|
import org.apache.cloudstack.api.command.admin.domain.UpdateDomainCmd;
|
||||||
@ -250,8 +249,6 @@ public interface ManagementService {
|
|||||||
* @param cmd
|
* @param cmd
|
||||||
* -- upload certificate cmd
|
* -- upload certificate cmd
|
||||||
* @return -- returns a string on success
|
* @return -- returns a string on success
|
||||||
* @throws ServerApiException
|
|
||||||
* -- even if one of the console proxy patching fails, we throw back this exception
|
|
||||||
*/
|
*/
|
||||||
String uploadCertificate(UploadCustomCertificateCmd cmd);
|
String uploadCertificate(UploadCustomCertificateCmd cmd);
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,8 @@ public class ListVlanIpRangesCmd extends BaseListCmd {
|
|||||||
@Parameter(name = ApiConstants.DOMAIN_ID,
|
@Parameter(name = ApiConstants.DOMAIN_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = DomainResponse.class,
|
entityType = DomainResponse.class,
|
||||||
description = "the domain ID with which the VLAN IP range is associated. If used with the account parameter, returns all VLAN IP ranges for that account in the specified domain.")
|
description = "the domain ID with which the VLAN IP range is associated. If used with the account parameter, " +
|
||||||
|
"returns all VLAN IP ranges for that account in the specified domain.")
|
||||||
private Long domainId;
|
private Long domainId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VlanIpRangeResponse.class, required = false, description = "the ID of the VLAN IP range")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VlanIpRangeResponse.class, required = false, description = "the ID of the VLAN IP range")
|
||||||
@ -151,6 +152,6 @@ public class ListVlanIpRangesCmd extends BaseListCmd {
|
|||||||
|
|
||||||
response.setResponses(vlanResponses, vlans.second());
|
response.setResponses(vlanResponses, vlans.second());
|
||||||
response.setResponseName(getCommandName());
|
response.setResponseName(getCommandName());
|
||||||
this.setResponseObject(response);
|
setResponseObject(response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,14 +65,17 @@ public class AssignVMCmd extends BaseCmd {
|
|||||||
type = CommandType.LIST,
|
type = CommandType.LIST,
|
||||||
collectionType = CommandType.UUID,
|
collectionType = CommandType.UUID,
|
||||||
entityType = NetworkResponse.class,
|
entityType = NetworkResponse.class,
|
||||||
description = "list of new network ids in which the moved VM will participate. In case no network ids are provided the VM will be part of the default network for that zone. In case there is no network yet created for the new account the default network will be created.")
|
description = "list of new network ids in which the moved VM will participate. In case no network ids are provided the VM will be part of the default network for that zone. "
|
||||||
|
+
|
||||||
|
"In case there is no network yet created for the new account the default network will be created.")
|
||||||
private List<Long> networkIds;
|
private List<Long> networkIds;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.SECURITY_GROUP_IDS,
|
@Parameter(name = ApiConstants.SECURITY_GROUP_IDS,
|
||||||
type = CommandType.LIST,
|
type = CommandType.LIST,
|
||||||
collectionType = CommandType.UUID,
|
collectionType = CommandType.UUID,
|
||||||
entityType = SecurityGroupResponse.class,
|
entityType = SecurityGroupResponse.class,
|
||||||
description = "list of security group ids to be applied on the virtual machine. In case no security groups are provided the VM is part of the default security group.")
|
description = "list of security group ids to be applied on the virtual machine. " +
|
||||||
|
"In case no security groups are provided the VM is part of the default security group.")
|
||||||
private List<Long> securityGroupIdList;
|
private List<Long> securityGroupIdList;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
@ -117,7 +120,7 @@ public class AssignVMCmd extends BaseCmd {
|
|||||||
}
|
}
|
||||||
UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", userVm).get(0);
|
UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", userVm).get(0);
|
||||||
response.setResponseName(getCommandName());
|
response.setResponseName(getCommandName());
|
||||||
this.setResponseObject(response);
|
setResponseObject(response);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to move vm " + e.getMessage());
|
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to move vm " + e.getMessage());
|
||||||
|
|||||||
@ -188,7 +188,8 @@ public class HostForMigrationResponse extends BaseResponse {
|
|||||||
private Boolean hasEnoughCapacity;
|
private Boolean hasEnoughCapacity;
|
||||||
|
|
||||||
@SerializedName("suitableformigration")
|
@SerializedName("suitableformigration")
|
||||||
@Param(description = "true if this host is suitable(has enough capacity and satisfies all conditions like hosttags, max guests vm limit etc) to migrate a VM to it , false otherwise")
|
@Param(description = "true if this host is suitable(has enough capacity and satisfies all conditions like hosttags, " +
|
||||||
|
"max guests vm limit etc) to migrate a VM to it , false otherwise")
|
||||||
private Boolean suitableForMigration;
|
private Boolean suitableForMigration;
|
||||||
|
|
||||||
@SerializedName("requiresStorageMotion")
|
@SerializedName("requiresStorageMotion")
|
||||||
@ -209,7 +210,7 @@ public class HostForMigrationResponse extends BaseResponse {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getObjectId() {
|
public String getObjectId() {
|
||||||
return this.getId();
|
return getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -154,7 +154,8 @@ public class CloudOrchestrator implements OrchestrationService {
|
|||||||
int speed, long memory, Long diskSize, List<String> computeTags, List<String> rootDiskTags, Map<String, NicProfile> networkNicMap, DeploymentPlan plan,
|
int speed, long memory, Long diskSize, List<String> computeTags, List<String> rootDiskTags, Map<String, NicProfile> networkNicMap, DeploymentPlan plan,
|
||||||
Long rootDiskSize) throws InsufficientCapacityException {
|
Long rootDiskSize) throws InsufficientCapacityException {
|
||||||
|
|
||||||
// VirtualMachineEntityImpl vmEntity = new VirtualMachineEntityImpl(id, owner, hostName, displayName, cpu, speed, memory, computeTags, rootDiskTags, networks, vmEntityManager);
|
// VirtualMachineEntityImpl vmEntity = new VirtualMachineEntityImpl(id, owner, hostName, displayName, cpu, speed, memory, computeTags, rootDiskTags, networks,
|
||||||
|
// vmEntityManager);
|
||||||
|
|
||||||
LinkedHashMap<NetworkVO, NicProfile> networkIpMap = new LinkedHashMap<NetworkVO, NicProfile>();
|
LinkedHashMap<NetworkVO, NicProfile> networkIpMap = new LinkedHashMap<NetworkVO, NicProfile>();
|
||||||
for (String uuid : networkNicMap.keySet()) {
|
for (String uuid : networkNicMap.keySet()) {
|
||||||
|
|||||||
@ -163,10 +163,10 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||||||
* */
|
* */
|
||||||
private static final String LIST_CLUSTERS_CROSSING_THRESHOLD =
|
private static final String LIST_CLUSTERS_CROSSING_THRESHOLD =
|
||||||
"SELECT clusterList.cluster_id "
|
"SELECT clusterList.cluster_id "
|
||||||
+ "FROM ( SELECT cluster.cluster_id cluster_id, ( (sum(cluster.used) + sum(cluster.reserved) + ?)/sum(cluster.total) ) ratio, cluster.configValue value "
|
+ "FROM (SELECT cluster.cluster_id cluster_id, ( (sum(cluster.used) + sum(cluster.reserved) + ?)/sum(cluster.total) ) ratio, cluster.configValue value "
|
||||||
+ "FROM ( SELECT capacity.cluster_id cluster_id, capacity.used_capacity used, capacity.reserved_capacity reserved, capacity.total_capacity * overcommit.value total, "
|
+ "FROM (SELECT capacity.cluster_id cluster_id, capacity.used_capacity used, capacity.reserved_capacity reserved, capacity.total_capacity * overcommit.value total, "
|
||||||
+ "CASE (SELECT count(*) FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ? ) "
|
+ "CASE (SELECT count(*) FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ? ) "
|
||||||
+ "WHEN 1 THEN ( CASE WHEN (SELECT details.value FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ?) is NULL "
|
+ "WHEN 1 THEN (CASE WHEN (SELECT details.value FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ?) is NULL "
|
||||||
+ "THEN (SELECT config.value FROM `cloud`.`configuration` config WHERE config.name = ?)"
|
+ "THEN (SELECT config.value FROM `cloud`.`configuration` config WHERE config.name = ?)"
|
||||||
+ "ELSE (SELECT details.value FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ? ) END )"
|
+ "ELSE (SELECT details.value FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ? ) END )"
|
||||||
+ "ELSE ( SELECT config.value FROM `cloud`.`configuration` config WHERE config.name = ?) " + "END configValue "
|
+ "ELSE ( SELECT config.value FROM `cloud`.`configuration` config WHERE config.name = ?) " + "END configValue "
|
||||||
@ -561,7 +561,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||||||
|
|
||||||
public SummedCapacity(long sumUsed, long sumReserved, long sumTotal, short capacityType, Long clusterId, Long podId, Long zoneId) {
|
public SummedCapacity(long sumUsed, long sumReserved, long sumTotal, short capacityType, Long clusterId, Long podId, Long zoneId) {
|
||||||
this(sumUsed, sumReserved, sumTotal, capacityType, clusterId, podId);
|
this(sumUsed, sumReserved, sumTotal, capacityType, clusterId, podId);
|
||||||
this.dcId = zoneId;
|
dcId = zoneId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SummedCapacity(long sumUsed, long sumTotal, float percentUsed, short capacityType, Long zoneId, Long podId, Long clusterId) {
|
public SummedCapacity(long sumUsed, long sumTotal, float percentUsed, short capacityType, Long zoneId, Long podId, Long clusterId) {
|
||||||
@ -572,7 +572,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||||||
this.capacityType = capacityType;
|
this.capacityType = capacityType;
|
||||||
this.clusterId = clusterId;
|
this.clusterId = clusterId;
|
||||||
this.podId = podId;
|
this.podId = podId;
|
||||||
this.dcId = zoneId;
|
dcId = zoneId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SummedCapacity(long sumUsed, long sumReserved, long sumTotal, float percentUsed, short capacityType, Long zoneId, Long podId, Long clusterId) {
|
public SummedCapacity(long sumUsed, long sumReserved, long sumTotal, float percentUsed, short capacityType, Long zoneId, Long podId, Long clusterId) {
|
||||||
|
|||||||
@ -113,8 +113,8 @@ public class DataCenterIpAddressDaoImpl extends GenericDaoBase<DataCenterIpAddre
|
|||||||
@DB
|
@DB
|
||||||
public void addIpRange(long dcId, long podId, String start, String end) {
|
public void addIpRange(long dcId, long podId, String start, String end) {
|
||||||
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
String insertSql =
|
String insertSql = "INSERT INTO `cloud`.`op_dc_ip_address_alloc` (ip_address, data_center_id, pod_id, mac_address) " +
|
||||||
"INSERT INTO `cloud`.`op_dc_ip_address_alloc` (ip_address, data_center_id, pod_id, mac_address) VALUES (?, ?, ?, (select mac_address from `cloud`.`data_center` where id=?))";
|
"VALUES (?, ?, ?, (select mac_address from `cloud`.`data_center` where id=?))";
|
||||||
String updateSql = "UPDATE `cloud`.`data_center` set mac_address = mac_address+1 where id=?";
|
String updateSql = "UPDATE `cloud`.`data_center` set mac_address = mac_address+1 where id=?";
|
||||||
PreparedStatement stmt = null;
|
PreparedStatement stmt = null;
|
||||||
|
|
||||||
|
|||||||
@ -300,14 +300,15 @@ public class Upgrade2213to2214 implements DbUpgrade {
|
|||||||
DbUpgradeUtils.dropKeysIfExist(conn, "cloud.user_ip_address", keys, true);
|
DbUpgradeUtils.dropKeysIfExist(conn, "cloud.user_ip_address", keys, true);
|
||||||
DbUpgradeUtils.dropKeysIfExist(conn, "cloud.user_ip_address", keys, false);
|
DbUpgradeUtils.dropKeysIfExist(conn, "cloud.user_ip_address", keys, false);
|
||||||
try {
|
try {
|
||||||
PreparedStatement pstmt =
|
PreparedStatement pstmt = conn.prepareStatement(
|
||||||
conn.prepareStatement("ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__account_id` FOREIGN KEY (`account_id`) REFERENCES `account`(`id`)");
|
"ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__account_id` FOREIGN KEY (`account_id`) REFERENCES `account`(`id`)");
|
||||||
pstmt.executeUpdate();
|
pstmt.executeUpdate();
|
||||||
pstmt =
|
pstmt = conn.prepareStatement(
|
||||||
conn.prepareStatement("ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__vlan_db_id` FOREIGN KEY (`vlan_db_id`) REFERENCES `vlan`(`id`) ON DELETE CASCADE");
|
"ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__vlan_db_id` FOREIGN KEY (`vlan_db_id`) REFERENCES `vlan`(`id`) ON DELETE CASCADE");
|
||||||
pstmt.executeUpdate();
|
pstmt.executeUpdate();
|
||||||
pstmt =
|
pstmt = conn.prepareStatement(
|
||||||
conn.prepareStatement("ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__data_center_id` FOREIGN KEY (`data_center_id`) REFERENCES `data_center`(`id`) ON DELETE CASCADE");
|
"ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__data_center_id`" +
|
||||||
|
" FOREIGN KEY (`data_center_id`) REFERENCES `data_center`(`id`) ON DELETE CASCADE");
|
||||||
pstmt.executeUpdate();
|
pstmt.executeUpdate();
|
||||||
pstmt.close();
|
pstmt.close();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
|||||||
@ -183,26 +183,29 @@ public class Upgrade2214to30 extends Upgrade30xBase implements DbUpgrade {
|
|||||||
if (vnet != null) {
|
if (vnet != null) {
|
||||||
//check if any vnet is allocated and guest networks are using vnets.
|
//check if any vnet is allocated and guest networks are using vnets.
|
||||||
PreparedStatement pstmt4 =
|
PreparedStatement pstmt4 =
|
||||||
conn.prepareStatement("SELECT v.* FROM `cloud`.`op_dc_vnet_alloc` v JOIN `cloud`.`networks` n ON CONCAT('vlan://' , v.vnet) = n.broadcast_uri WHERE v.taken IS NOT NULL AND v.data_center_id = ? AND n.removed IS NULL");
|
conn.prepareStatement("SELECT v.* FROM `cloud`.`op_dc_vnet_alloc` v JOIN `cloud`.`networks` n ON CONCAT('vlan://' , v.vnet) = " +
|
||||||
|
"n.broadcast_uri WHERE v.taken IS NOT NULL AND v.data_center_id = ? AND n.removed IS NULL");
|
||||||
pstmt4.setLong(1, zoneId);
|
pstmt4.setLong(1, zoneId);
|
||||||
ResultSet rsVNet = pstmt4.executeQuery();
|
ResultSet rsVNet = pstmt4.executeQuery();
|
||||||
|
|
||||||
if (rsVNet.next()) {
|
if (rsVNet.next()) {
|
||||||
String message =
|
String message = "Cannot upgrade. Your setup has multiple Physical Networks and is using guest "
|
||||||
"Cannot upgrade. Your setup has multiple Physical Networks and is using guest Vnet that is assigned wrongly. To upgrade, first correct the setup by doing the following: \n"
|
+ "Vnet that is assigned wrongly. To upgrade, first correct the setup by doing the following: \n"
|
||||||
+ "1. Please rollback to your 2.2.14 setup\n"
|
+ "1. Please rollback to your 2.2.14 setup\n"
|
||||||
+ "2. Please stop all VMs using isolated(virtual) networks through CloudStack\n"
|
+ "2. Please stop all VMs using isolated(virtual) networks through CloudStack\n"
|
||||||
+ "3. Run following query to find if any networks still have nics allocated:\n\t"
|
+ "3. Run following query to find if any networks still have nics allocated:\n\t"
|
||||||
+ "a) check if any virtual guest networks still have allocated nics by running:\n\t"
|
+ "a) check if any virtual guest networks still have allocated nics by running:\n\t"
|
||||||
+ "SELECT DISTINCT op.id from `cloud`.`op_networks` op JOIN `cloud`.`networks` n on op.id=n.id WHERE nics_count != 0 AND guest_type = 'Virtual';\n\t"
|
+ "SELECT DISTINCT op.id from `cloud`.`op_networks` op JOIN `cloud`.`networks` n on "
|
||||||
+ "b) If this returns any networkd ids, then ensure that all VMs are stopped, no new VM is being started, and then shutdown management server\n\t"
|
+ "op.id=n.id WHERE nics_count != 0 AND guest_type = 'Virtual';\n\t"
|
||||||
+ "c) Clean up the nics count for the 'virtual' network id's returned in step (a) by running this:\n\t"
|
+ "b) If this returns any networkd ids, then ensure that all VMs are stopped, no new VM is being started, and then shutdown management server\n\t"
|
||||||
+ "UPDATE `cloud`.`op_networks` SET nics_count = 0 WHERE id = <enter id of virtual network>\n\t"
|
+ "c) Clean up the nics count for the 'virtual' network id's returned in step (a) by running this:\n\t"
|
||||||
+ "d) Restart management server and wait for all networks to shutdown. [Networks shutdown will be determined by network.gc.interval and network.gc.wait seconds] \n"
|
+ "UPDATE `cloud`.`op_networks` SET nics_count = 0 WHERE id = <enter id of virtual network>\n\t"
|
||||||
+ "4. Please ensure all networks are shutdown and all guest Vnet's are free.\n"
|
+ "d) Restart management server and wait for all networks to shutdown. [Networks shutdown will be "
|
||||||
+ "5. Run upgrade. This will allocate all your guest vnet range to first physical network. \n"
|
+ "determined by network.gc.interval and network.gc.wait seconds] \n"
|
||||||
+ "6. Reconfigure the vnet ranges for each physical network as desired by using updatePhysicalNetwork API \n"
|
+ "4. Please ensure all networks are shutdown and all guest Vnet's are free.\n"
|
||||||
+ "7. Start all your VMs";
|
+ "5. Run upgrade. This will allocate all your guest vnet range to first physical network. \n"
|
||||||
|
+ "6. Reconfigure the vnet ranges for each physical network as desired by using updatePhysicalNetwork API \n"
|
||||||
|
+ "7. Start all your VMs";
|
||||||
|
|
||||||
s_logger.error(message);
|
s_logger.error(message);
|
||||||
|
|
||||||
|
|||||||
@ -297,24 +297,25 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade {
|
|||||||
s_logger.error("Guest Vnet assignment is set wrongly . Cannot upgrade until that is corrected. Example- Vnet: " + vnet +
|
s_logger.error("Guest Vnet assignment is set wrongly . Cannot upgrade until that is corrected. Example- Vnet: " + vnet +
|
||||||
" has physical network id: " + vpid + " ,but the guest network: " + networkId + " that uses it has physical network id: " + npid);
|
" has physical network id: " + vpid + " ,but the guest network: " + networkId + " that uses it has physical network id: " + npid);
|
||||||
|
|
||||||
String message =
|
String message = "Cannot upgrade. Your setup has multiple Physical Networks and is using guest Vnet that is assigned wrongly. "
|
||||||
"Cannot upgrade. Your setup has multiple Physical Networks and is using guest Vnet that is assigned wrongly. To upgrade, first correct the setup by doing the following: \n"
|
+ "To upgrade, first correct the setup by doing the following: \n"
|
||||||
+ "1. Please rollback to your 2.2.14 setup\n"
|
+ "1. Please rollback to your 2.2.14 setup\n"
|
||||||
+ "2. Please stop all VMs using isolated(virtual) networks through CloudStack\n"
|
+ "2. Please stop all VMs using isolated(virtual) networks through CloudStack\n"
|
||||||
+ "3. Run following query to find if any networks still have nics allocated:\n\t"
|
+ "3. Run following query to find if any networks still have nics allocated:\n\t"
|
||||||
+ "a) check if any virtual guest networks still have allocated nics by running:\n\t"
|
+ "a) check if any virtual guest networks still have allocated nics by running:\n\t"
|
||||||
+ "SELECT DISTINCT op.id from `cloud`.`op_networks` op JOIN `cloud`.`networks` n on op.id=n.id WHERE nics_count != 0 AND guest_type = 'Virtual';\n\t"
|
+ "SELECT DISTINCT op.id from `cloud`.`op_networks` op JOIN `cloud`.`networks` n on op.id=n.id WHERE nics_count != 0 AND guest_type = 'Virtual';\n\t"
|
||||||
+ "b) If this returns any networkd ids, then ensure that all VMs are stopped, no new VM is being started, and then shutdown management server\n\t"
|
+ "b) If this returns any networkd ids, then ensure that all VMs are stopped, no new VM is being started, and then shutdown management server\n\t"
|
||||||
+ "c) Clean up the nics count for the 'virtual' network id's returned in step (a) by running this:\n\t"
|
+ "c) Clean up the nics count for the 'virtual' network id's returned in step (a) by running this:\n\t"
|
||||||
+ "UPDATE `cloud`.`op_networks` SET nics_count = 0 WHERE id = <enter id of virtual network>\n\t"
|
+ "UPDATE `cloud`.`op_networks` SET nics_count = 0 WHERE id = <enter id of virtual network>\n\t"
|
||||||
+ "d) Restart management server and wait for all networks to shutdown. [Networks shutdown will be determined by network.gc.interval and network.gc.wait seconds] \n"
|
+ "d) Restart management server and wait for all networks to shutdown. [Networks shutdown will be determined by "
|
||||||
+ "4. Please ensure all networks are shutdown and all guest Vnet's are free.\n"
|
+ "network.gc.interval and network.gc.wait seconds] \n"
|
||||||
+ "5. Run upgrade. This will allocate all your guest vnet range to first physical network. \n"
|
+ "4. Please ensure all networks are shutdown and all guest Vnet's are free.\n"
|
||||||
+ "6. Reconfigure the vnet ranges for each physical network as desired by using updatePhysicalNetwork API \n" + "7. Start all your VMs";
|
+ "5. Run upgrade. This will allocate all your guest vnet range to first physical network. \n"
|
||||||
|
+ "6. Reconfigure the vnet ranges for each physical network as desired by using updatePhysicalNetwork API \n" + "7. Start all your VMs";
|
||||||
|
|
||||||
s_logger.error(message);
|
s_logger.error(message);
|
||||||
throw new CloudRuntimeException(
|
throw new CloudRuntimeException("Cannot upgrade this setup since Guest Vnet assignment to the multiple physical " +
|
||||||
"Cannot upgrade this setup since Guest Vnet assignment to the multiple physical networks is incorrect. Please check the logs for details on how to proceed");
|
"networks is incorrect. Please check the logs for details on how to proceed");
|
||||||
|
|
||||||
}
|
}
|
||||||
rsVNet.close();
|
rsVNet.close();
|
||||||
|
|||||||
@ -268,24 +268,25 @@ public class Upgrade303to304 extends Upgrade30xBase implements DbUpgrade {
|
|||||||
s_logger.error("Guest Vnet assignment is set wrongly . Cannot upgrade until that is corrected. Example- Vnet: " + vnet +
|
s_logger.error("Guest Vnet assignment is set wrongly . Cannot upgrade until that is corrected. Example- Vnet: " + vnet +
|
||||||
" has physical network id: " + vpid + " ,but the guest network: " + networkId + " that uses it has physical network id: " + npid);
|
" has physical network id: " + vpid + " ,but the guest network: " + networkId + " that uses it has physical network id: " + npid);
|
||||||
|
|
||||||
String message =
|
String message = "Cannot upgrade. Your setup has multiple Physical Networks and is using guest Vnet that is assigned wrongly. "
|
||||||
"Cannot upgrade. Your setup has multiple Physical Networks and is using guest Vnet that is assigned wrongly. To upgrade, first correct the setup by doing the following: \n"
|
+ "To upgrade, first correct the setup by doing the following: \n"
|
||||||
+ "1. Please rollback to your 2.2.14 setup\n"
|
+ "1. Please rollback to your 2.2.14 setup\n"
|
||||||
+ "2. Please stop all VMs using isolated(virtual) networks through CloudStack\n"
|
+ "2. Please stop all VMs using isolated(virtual) networks through CloudStack\n"
|
||||||
+ "3. Run following query to find if any networks still have nics allocated:\n\t"
|
+ "3. Run following query to find if any networks still have nics allocated:\n\t"
|
||||||
+ "a) check if any virtual guest networks still have allocated nics by running:\n\t"
|
+ "a) check if any virtual guest networks still have allocated nics by running:\n\t"
|
||||||
+ "SELECT DISTINCT op.id from `cloud`.`op_networks` op JOIN `cloud`.`networks` n on op.id=n.id WHERE nics_count != 0 AND guest_type = 'Virtual';\n\t"
|
+ "SELECT DISTINCT op.id from `cloud`.`op_networks` op JOIN `cloud`.`networks` n on op.id=n.id WHERE nics_count != 0 AND guest_type = 'Virtual';\n\t"
|
||||||
+ "b) If this returns any networkd ids, then ensure that all VMs are stopped, no new VM is being started, and then shutdown management server\n\t"
|
+ "b) If this returns any networkd ids, then ensure that all VMs are stopped, no new VM is being started, and then shutdown management server\n\t"
|
||||||
+ "c) Clean up the nics count for the 'virtual' network id's returned in step (a) by running this:\n\t"
|
+ "c) Clean up the nics count for the 'virtual' network id's returned in step (a) by running this:\n\t"
|
||||||
+ "UPDATE `cloud`.`op_networks` SET nics_count = 0 WHERE id = <enter id of virtual network>\n\t"
|
+ "UPDATE `cloud`.`op_networks` SET nics_count = 0 WHERE id = <enter id of virtual network>\n\t"
|
||||||
+ "d) Restart management server and wait for all networks to shutdown. [Networks shutdown will be determined by network.gc.interval and network.gc.wait seconds] \n"
|
+ "d) Restart management server and wait for all networks to shutdown. "
|
||||||
+ "4. Please ensure all networks are shutdown and all guest Vnet's are free.\n"
|
+ "[Networks shutdown will be determined by network.gc.interval and network.gc.wait seconds] \n"
|
||||||
+ "5. Run upgrade. This will allocate all your guest vnet range to first physical network. \n"
|
+ "4. Please ensure all networks are shutdown and all guest Vnet's are free.\n"
|
||||||
+ "6. Reconfigure the vnet ranges for each physical network as desired by using updatePhysicalNetwork API \n" + "7. Start all your VMs";
|
+ "5. Run upgrade. This will allocate all your guest vnet range to first physical network. \n"
|
||||||
|
+ "6. Reconfigure the vnet ranges for each physical network as desired by using updatePhysicalNetwork API \n" + "7. Start all your VMs";
|
||||||
|
|
||||||
s_logger.error(message);
|
s_logger.error(message);
|
||||||
throw new CloudRuntimeException(
|
throw new CloudRuntimeException("Cannot upgrade this setup since Guest Vnet assignment to the multiple physical networks " +
|
||||||
"Cannot upgrade this setup since Guest Vnet assignment to the multiple physical networks is incorrect. Please check the logs for details on how to proceed");
|
"is incorrect. Please check the logs for details on how to proceed");
|
||||||
|
|
||||||
}
|
}
|
||||||
rsVNet.close();
|
rsVNet.close();
|
||||||
|
|||||||
@ -168,8 +168,8 @@ public class Upgrade305to306 extends Upgrade30xBase implements DbUpgrade {
|
|||||||
ResultSet rsNw = null;
|
ResultSet rsNw = null;
|
||||||
try {
|
try {
|
||||||
// update the existing ingress rules traffic type
|
// update the existing ingress rules traffic type
|
||||||
pstmt =
|
pstmt = conn.prepareStatement("update `cloud`.`firewall_rules`" +
|
||||||
conn.prepareStatement("update `cloud`.`firewall_rules` set traffic_type='Ingress' where purpose='Firewall' and ip_address_id is not null and traffic_type is null");
|
" set traffic_type='Ingress' where purpose='Firewall' and ip_address_id is not null and traffic_type is null");
|
||||||
s_logger.debug("Updating firewall Ingress rule traffic type: " + pstmt);
|
s_logger.debug("Updating firewall Ingress rule traffic type: " + pstmt);
|
||||||
pstmt.executeUpdate();
|
pstmt.executeUpdate();
|
||||||
|
|
||||||
@ -179,8 +179,8 @@ public class Upgrade305to306 extends Upgrade30xBase implements DbUpgrade {
|
|||||||
long netId = rs.getLong(1);
|
long netId = rs.getLong(1);
|
||||||
//When upgraded from 2.2.14 to 3.0.6 guest_type is updated to Isolated in the 2214to30 clean up sql. clean up executes
|
//When upgraded from 2.2.14 to 3.0.6 guest_type is updated to Isolated in the 2214to30 clean up sql. clean up executes
|
||||||
//after this. So checking for Isolated OR Virtual
|
//after this. So checking for Isolated OR Virtual
|
||||||
pstmt =
|
pstmt = conn.prepareStatement("select account_id, domain_id FROM `cloud`.`networks` where (guest_type='Isolated' OR guest_type='" +
|
||||||
conn.prepareStatement("select account_id, domain_id FROM `cloud`.`networks` where (guest_type='Isolated' OR guest_type='Virtual') and traffic_type='Guest' and vpc_id is NULL and (state='implemented' OR state='Shutdown') and id=? ");
|
"Virtual') and traffic_type='Guest' and vpc_id is NULL and (state='implemented' OR state='Shutdown') and id=? ");
|
||||||
pstmt.setLong(1, netId);
|
pstmt.setLong(1, netId);
|
||||||
s_logger.debug("Getting account_id, domain_id from networks table: " + pstmt);
|
s_logger.debug("Getting account_id, domain_id from networks table: " + pstmt);
|
||||||
rsNw = pstmt.executeQuery();
|
rsNw = pstmt.executeQuery();
|
||||||
|
|||||||
@ -109,8 +109,8 @@ public class Upgrade40to41 implements DbUpgrade {
|
|||||||
ResultSet rsNw = null;
|
ResultSet rsNw = null;
|
||||||
try {
|
try {
|
||||||
// update the existing ingress rules traffic type
|
// update the existing ingress rules traffic type
|
||||||
pstmt =
|
pstmt = conn.prepareStatement("update `cloud`.`firewall_rules` set traffic_type='Ingress' where purpose='Firewall' and ip_address_id is " +
|
||||||
conn.prepareStatement("update `cloud`.`firewall_rules` set traffic_type='Ingress' where purpose='Firewall' and ip_address_id is not null and traffic_type is null");
|
"not null and traffic_type is null");
|
||||||
s_logger.debug("Updating firewall Ingress rule traffic type: " + pstmt);
|
s_logger.debug("Updating firewall Ingress rule traffic type: " + pstmt);
|
||||||
pstmt.executeUpdate();
|
pstmt.executeUpdate();
|
||||||
|
|
||||||
@ -120,8 +120,9 @@ public class Upgrade40to41 implements DbUpgrade {
|
|||||||
long netId = rs.getLong(1);
|
long netId = rs.getLong(1);
|
||||||
//When upgraded from 2.2.14 to 3.0.6 guest_type is updated to Isolated in the 2214to30 clean up sql. clean up executes
|
//When upgraded from 2.2.14 to 3.0.6 guest_type is updated to Isolated in the 2214to30 clean up sql. clean up executes
|
||||||
//after this. So checking for Isolated OR Virtual
|
//after this. So checking for Isolated OR Virtual
|
||||||
pstmt =
|
pstmt = conn.prepareStatement("select account_id, domain_id FROM `cloud`.`networks` where (guest_type='Isolated' OR " +
|
||||||
conn.prepareStatement("select account_id, domain_id FROM `cloud`.`networks` where (guest_type='Isolated' OR guest_type='Virtual') and traffic_type='Guest' and vpc_id is NULL and (state='implemented' OR state='Shutdown') and id=? ");
|
"guest_type='Virtual') and traffic_type='Guest' and vpc_id is NULL and " +
|
||||||
|
"(state='implemented' OR state='Shutdown') and id=? ");
|
||||||
pstmt.setLong(1, netId);
|
pstmt.setLong(1, netId);
|
||||||
s_logger.debug("Getting account_id, domain_id from networks table: " + pstmt);
|
s_logger.debug("Getting account_id, domain_id from networks table: " + pstmt);
|
||||||
rsNw = pstmt.executeQuery();
|
rsNw = pstmt.executeQuery();
|
||||||
@ -132,8 +133,7 @@ public class Upgrade40to41 implements DbUpgrade {
|
|||||||
|
|
||||||
//Add new rule for the existing networks
|
//Add new rule for the existing networks
|
||||||
s_logger.debug("Adding default egress firewall rule for network " + netId);
|
s_logger.debug("Adding default egress firewall rule for network " + netId);
|
||||||
pstmt =
|
pstmt = conn.prepareStatement("INSERT INTO firewall_rules (uuid, state, protocol, purpose, account_id, domain_id, network_id, xid, created, traffic_type) VALUES (?, 'Active', 'all', 'Firewall', ?, ?, ?, ?, now(), 'Egress')");
|
||||||
conn.prepareStatement("INSERT INTO firewall_rules (uuid, state, protocol, purpose, account_id, domain_id, network_id, xid, created, traffic_type) VALUES (?, 'Active', 'all', 'Firewall', ?, ?, ?, ?, now(), 'Egress')");
|
|
||||||
pstmt.setString(1, UUID.randomUUID().toString());
|
pstmt.setString(1, UUID.randomUUID().toString());
|
||||||
pstmt.setLong(2, accountId);
|
pstmt.setLong(2, accountId);
|
||||||
pstmt.setLong(3, domainId);
|
pstmt.setLong(3, domainId);
|
||||||
|
|||||||
@ -2380,10 +2380,10 @@ public class Upgrade410to420 implements DbUpgrade {
|
|||||||
storeDetailInsert = conn.prepareStatement("INSERT INTO `cloud`.`image_store_details` (store_id, name, value) values(?, ?, ?)");
|
storeDetailInsert = conn.prepareStatement("INSERT INTO `cloud`.`image_store_details` (store_id, name, value) values(?, ?, ?)");
|
||||||
|
|
||||||
// migrate S3 to image_store
|
// migrate S3 to image_store
|
||||||
storeInsert =
|
storeInsert = conn.prepareStatement("INSERT INTO `cloud`.`image_store` (uuid, name, image_provider_name, protocol, scope, role, created) " +
|
||||||
conn.prepareStatement("INSERT INTO `cloud`.`image_store` (uuid, name, image_provider_name, protocol, scope, role, created) values(?, ?, 'S3', ?, 'REGION', 'Image', ?)");
|
"values(?, ?, 'S3', ?, 'REGION', 'Image', ?)");
|
||||||
s3Query =
|
s3Query = conn.prepareStatement("select id, uuid, access_key, secret_key, end_point, bucket, https, connection_timeout, " +
|
||||||
conn.prepareStatement("select id, uuid, access_key, secret_key, end_point, bucket, https, connection_timeout, max_error_retry, socket_timeout, created from `cloud`.`s3`");
|
"max_error_retry, socket_timeout, created from `cloud`.`s3`");
|
||||||
rs = s3Query.executeQuery();
|
rs = s3Query.executeQuery();
|
||||||
|
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
|
|||||||
@ -146,8 +146,8 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long> implements V
|
|||||||
} else {
|
} else {
|
||||||
pstmt = conn.prepareStatement("SELECT is_static_nat from firewall_rules");
|
pstmt = conn.prepareStatement("SELECT is_static_nat from firewall_rules");
|
||||||
pstmt.executeQuery();
|
pstmt.executeQuery();
|
||||||
throw new CloudRuntimeException(
|
throw new CloudRuntimeException("Unable to determine the current version, version table exists and empty, " +
|
||||||
"Unable to determine the current version, version table exists and empty, nics table doesn't exist, is_static_nat field exists in firewall_rules table");
|
"nics table doesn't exist, is_static_nat field exists in firewall_rules table");
|
||||||
}
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
s_logger.debug("Assuming the exception means static_nat field doesn't exist in firewall_rules table, returning version 2.2.2");
|
s_logger.debug("Assuming the exception means static_nat field doesn't exist in firewall_rules table, returning version 2.2.2");
|
||||||
|
|||||||
@ -69,9 +69,9 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
|
|||||||
private static final String UPDATE_VM_DISK_STATS =
|
private static final String UPDATE_VM_DISK_STATS =
|
||||||
"UPDATE cloud_usage.vm_disk_statistics SET net_io_read=?, net_io_write=?, current_io_read=?, current_io_write=?, agg_io_read=?, agg_io_write=?, "
|
"UPDATE cloud_usage.vm_disk_statistics SET net_io_read=?, net_io_write=?, current_io_read=?, current_io_write=?, agg_io_read=?, agg_io_write=?, "
|
||||||
+ "net_bytes_read=?, net_bytes_write=?, current_bytes_read=?, current_bytes_write=?, agg_bytes_read=?, agg_bytes_write=? WHERE id=?";
|
+ "net_bytes_read=?, net_bytes_write=?, current_bytes_read=?, current_bytes_write=?, agg_bytes_read=?, agg_bytes_write=? WHERE id=?";
|
||||||
private static final String INSERT_USGAE_RECORDS =
|
private static final String INSERT_USGAE_RECORDS = "INSERT INTO cloud_usage.cloud_usage (zone_id, account_id, domain_id, description, usage_display, " +
|
||||||
"INSERT INTO cloud_usage.cloud_usage (zone_id, account_id, domain_id, description, usage_display, usage_type, raw_usage, vm_instance_id, vm_name, offering_id, template_id, "
|
"usage_type, raw_usage, vm_instance_id, vm_name, offering_id, template_id, "
|
||||||
+ "usage_id, type, size, network_id, start_date, end_date, virtual_size) VALUES (?,?,?,?,?,?,?,?,?, ?, ?, ?,?,?,?,?,?,?)";
|
+ "usage_id, type, size, network_id, start_date, end_date, virtual_size) VALUES (?,?,?,?,?,?,?,?,?, ?, ?, ?,?,?,?,?,?,?)";
|
||||||
|
|
||||||
protected final static TimeZone s_gmtTimeZone = TimeZone.getTimeZone("GMT");
|
protected final static TimeZone s_gmtTimeZone = TimeZone.getTimeZone("GMT");
|
||||||
|
|
||||||
|
|||||||
@ -39,13 +39,13 @@ public class UsageVmDiskDaoImpl extends GenericDaoBase<UsageVmDiskVO, Long> impl
|
|||||||
private static final String SELECT_LATEST_STATS =
|
private static final String SELECT_LATEST_STATS =
|
||||||
"SELECT uvd.account_id, uvd.zone_id, uvd.vm_id, uvd.volume_id, uvd.io_read, uvd.io_write, uvd.agg_io_read, uvd.agg_io_write, "
|
"SELECT uvd.account_id, uvd.zone_id, uvd.vm_id, uvd.volume_id, uvd.io_read, uvd.io_write, uvd.agg_io_read, uvd.agg_io_write, "
|
||||||
+ "uvd.bytes_read, uvd.bytes_write, uvd.agg_bytes_read, uvd.agg_bytes_write, uvd.event_time_millis "
|
+ "uvd.bytes_read, uvd.bytes_write, uvd.agg_bytes_read, uvd.agg_bytes_write, uvd.event_time_millis "
|
||||||
+ "FROM cloud_usage.usage_vm_disk uvd INNER JOIN (SELECT vmdiskusage.account_id as acct_id, vmdiskusage.zone_id as z_id, max(vmdiskusage.event_time_millis) as max_date "
|
+ "FROM cloud_usage.usage_vm_disk uvd INNER JOIN (SELECT vmdiskusage.account_id as acct_id, vmdiskusage.zone_id as z_id, max(vmdiskusage.event_time_millis) as "
|
||||||
+ "FROM cloud_usage.usage_vm_disk vmdiskusage " + "GROUP BY vmdiskusage.account_id, vmdiskusage.zone_id "
|
+ "max_date FROM cloud_usage.usage_vm_disk vmdiskusage " + "GROUP BY vmdiskusage.account_id, vmdiskusage.zone_id "
|
||||||
+ ") joinnet on uvd.account_id = joinnet.acct_id and uvd.zone_id = joinnet.z_id and uvd.event_time_millis = joinnet.max_date";
|
+ ") joinnet on uvd.account_id = joinnet.acct_id and uvd.zone_id = joinnet.z_id and uvd.event_time_millis = joinnet.max_date";
|
||||||
private static final String DELETE_OLD_STATS = "DELETE FROM cloud_usage.usage_vm_disk WHERE event_time_millis < ?";
|
private static final String DELETE_OLD_STATS = "DELETE FROM cloud_usage.usage_vm_disk WHERE event_time_millis < ?";
|
||||||
|
|
||||||
private static final String INSERT_USAGE_VM_DISK =
|
private static final String INSERT_USAGE_VM_DISK = "INSERT INTO cloud_usage.usage_vm_disk (account_id, zone_id, vm_id, volume_id, io_read, io_write, agg_io_read," +
|
||||||
"INSERT INTO cloud_usage.usage_vm_disk (account_id, zone_id, vm_id, volume_id, io_read, io_write, agg_io_read, agg_io_write, bytes_read, bytes_write, agg_bytes_read, agg_bytes_write, event_time_millis) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
" agg_io_write, bytes_read, bytes_write, agg_bytes_read, agg_bytes_write, event_time_millis) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||||
|
|
||||||
public UsageVmDiskDaoImpl() {
|
public UsageVmDiskDaoImpl() {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -82,25 +82,25 @@ public class UserVmDaoImpl extends GenericDaoBase<UserVmVO, Long> implements Use
|
|||||||
"SELECT pod_id FROM cloud.vm_instance WHERE data_center_id = ? AND account_id = ? AND pod_id IS NOT NULL AND (state = 'Running' OR state = 'Stopped') "
|
"SELECT pod_id FROM cloud.vm_instance WHERE data_center_id = ? AND account_id = ? AND pod_id IS NOT NULL AND (state = 'Running' OR state = 'Stopped') "
|
||||||
+ "GROUP BY pod_id HAVING count(id) > 0 ORDER BY count(id) DESC";
|
+ "GROUP BY pod_id HAVING count(id) > 0 ORDER BY count(id) DESC";
|
||||||
|
|
||||||
private static String VM_DETAILS =
|
private static String VM_DETAILS = "select vm_instance.id, "
|
||||||
"select vm_instance.id, "
|
+ "account.id, account.account_name, account.type, domain.name, instance_group.id, instance_group.name,"
|
||||||
+ "account.id, account.account_name, account.type, domain.name, instance_group.id, instance_group.name,"
|
+ "data_center.id, data_center.name, data_center.is_security_group_enabled, host.id, host.name, "
|
||||||
+ "data_center.id, data_center.name, data_center.is_security_group_enabled, host.id, host.name, "
|
+ "vm_template.id, vm_template.name, vm_template.display_text, iso.id, iso.name, "
|
||||||
+ "vm_template.id, vm_template.name, vm_template.display_text, iso.id, iso.name, "
|
+ "vm_template.enable_password, service_offering.id, disk_offering.name, storage_pool.id, storage_pool.pool_type, "
|
||||||
+ "vm_template.enable_password, service_offering.id, disk_offering.name, storage_pool.id, storage_pool.pool_type, "
|
+ "service_offering.cpu, service_offering.speed, service_offering.ram_size, volumes.id, volumes.device_id, volumes.volume_type, security_group.id, security_group.name, "
|
||||||
+ "service_offering.cpu, service_offering.speed, service_offering.ram_size, volumes.id, volumes.device_id, volumes.volume_type, security_group.id, security_group.name, "
|
+ "security_group.description, nics.id, nics.ip4_address, nics.default_nic, nics.gateway, nics.network_id, nics.netmask, nics.mac_address, nics.broadcast_uri, " +
|
||||||
+ "security_group.description, nics.id, nics.ip4_address, nics.default_nic, nics.gateway, nics.network_id, nics.netmask, nics.mac_address, nics.broadcast_uri, nics.isolation_uri, "
|
"nics.isolation_uri, "
|
||||||
+ "networks.traffic_type, networks.guest_type, user_ip_address.id, user_ip_address.public_ip_address from vm_instance "
|
+ "networks.traffic_type, networks.guest_type, user_ip_address.id, user_ip_address.public_ip_address from vm_instance "
|
||||||
+ "left join account on vm_instance.account_id=account.id " + "left join domain on vm_instance.domain_id=domain.id "
|
+ "left join account on vm_instance.account_id=account.id " + "left join domain on vm_instance.domain_id=domain.id "
|
||||||
+ "left join instance_group_vm_map on vm_instance.id=instance_group_vm_map.instance_id "
|
+ "left join instance_group_vm_map on vm_instance.id=instance_group_vm_map.instance_id "
|
||||||
+ "left join instance_group on instance_group_vm_map.group_id=instance_group.id " + "left join data_center on vm_instance.data_center_id=data_center.id "
|
+ "left join instance_group on instance_group_vm_map.group_id=instance_group.id " + "left join data_center on vm_instance.data_center_id=data_center.id "
|
||||||
+ "left join host on vm_instance.host_id=host.id " + "left join vm_template on vm_instance.vm_template_id=vm_template.id "
|
+ "left join host on vm_instance.host_id=host.id " + "left join vm_template on vm_instance.vm_template_id=vm_template.id "
|
||||||
+ "left join user_vm on vm_instance.id=user_vm.id " + "left join vm_template iso on iso.id=user_vm.iso_id "
|
+ "left join user_vm on vm_instance.id=user_vm.id " + "left join vm_template iso on iso.id=user_vm.iso_id "
|
||||||
+ "left join service_offering on vm_instance.service_offering_id=service_offering.id "
|
+ "left join service_offering on vm_instance.service_offering_id=service_offering.id "
|
||||||
+ "left join disk_offering on vm_instance.service_offering_id=disk_offering.id " + "left join volumes on vm_instance.id=volumes.instance_id "
|
+ "left join disk_offering on vm_instance.service_offering_id=disk_offering.id " + "left join volumes on vm_instance.id=volumes.instance_id "
|
||||||
+ "left join storage_pool on volumes.pool_id=storage_pool.id " + "left join security_group_vm_map on vm_instance.id=security_group_vm_map.instance_id "
|
+ "left join storage_pool on volumes.pool_id=storage_pool.id " + "left join security_group_vm_map on vm_instance.id=security_group_vm_map.instance_id "
|
||||||
+ "left join security_group on security_group_vm_map.security_group_id=security_group.id " + "left join nics on vm_instance.id=nics.instance_id "
|
+ "left join security_group on security_group_vm_map.security_group_id=security_group.id " + "left join nics on vm_instance.id=nics.instance_id "
|
||||||
+ "left join networks on nics.network_id=networks.id " + "left join user_ip_address on user_ip_address.vm_id=vm_instance.id " + "where vm_instance.id in (";
|
+ "left join networks on nics.network_id=networks.id " + "left join user_ip_address on user_ip_address.vm_id=vm_instance.id " + "where vm_instance.id in (";
|
||||||
|
|
||||||
private static final int VM_DETAILS_BATCH_SIZE = 100;
|
private static final int VM_DETAILS_BATCH_SIZE = 100;
|
||||||
|
|
||||||
|
|||||||
@ -95,18 +95,18 @@ public class VMInstanceDaoImpl extends GenericDaoBase<VMInstanceVO, Long> implem
|
|||||||
|
|
||||||
protected Attribute _updateTimeAttr;
|
protected Attribute _updateTimeAttr;
|
||||||
|
|
||||||
private static final String ORDER_CLUSTERS_NUMBER_OF_VMS_FOR_ACCOUNT_PART1 =
|
private static final String ORDER_CLUSTERS_NUMBER_OF_VMS_FOR_ACCOUNT_PART1 = "SELECT host.cluster_id, SUM(IF(vm.state='Running' AND vm.account_id = ?, 1, 0)) " +
|
||||||
"SELECT host.cluster_id, SUM(IF(vm.state='Running' AND vm.account_id = ?, 1, 0)) FROM `cloud`.`host` host LEFT JOIN `cloud`.`vm_instance` vm ON host.id = vm.host_id WHERE ";
|
"FROM `cloud`.`host` host LEFT JOIN `cloud`.`vm_instance` vm ON host.id = vm.host_id WHERE ";
|
||||||
private static final String ORDER_CLUSTERS_NUMBER_OF_VMS_FOR_ACCOUNT_PART2 =
|
private static final String ORDER_CLUSTERS_NUMBER_OF_VMS_FOR_ACCOUNT_PART2 = " AND host.type = 'Routing' AND host.removed is null GROUP BY host.cluster_id " +
|
||||||
" AND host.type = 'Routing' AND host.removed is null GROUP BY host.cluster_id ORDER BY 2 ASC ";
|
"ORDER BY 2 ASC ";
|
||||||
|
|
||||||
private static final String ORDER_PODS_NUMBER_OF_VMS_FOR_ACCOUNT =
|
private static final String ORDER_PODS_NUMBER_OF_VMS_FOR_ACCOUNT = "SELECT pod.id, SUM(IF(vm.state='Running' AND vm.account_id = ?, 1, 0)) FROM `cloud`.`" +
|
||||||
"SELECT pod.id, SUM(IF(vm.state='Running' AND vm.account_id = ?, 1, 0)) FROM `cloud`.`host_pod_ref` pod LEFT JOIN `cloud`.`vm_instance` vm ON pod.id = vm.pod_id WHERE pod.data_center_id = ? AND pod.removed is null "
|
"host_pod_ref` pod LEFT JOIN `cloud`.`vm_instance` vm ON pod.id = vm.pod_id WHERE pod.data_center_id = ? AND pod.removed is null "
|
||||||
+ " GROUP BY pod.id ORDER BY 2 ASC ";
|
+ " GROUP BY pod.id ORDER BY 2 ASC ";
|
||||||
|
|
||||||
private static final String ORDER_HOSTS_NUMBER_OF_VMS_FOR_ACCOUNT =
|
private static final String ORDER_HOSTS_NUMBER_OF_VMS_FOR_ACCOUNT =
|
||||||
"SELECT host.id, SUM(IF(vm.state='Running' AND vm.account_id = ?, 1, 0)) FROM `cloud`.`host` host LEFT JOIN `cloud`.`vm_instance` vm ON host.id = vm.host_id WHERE host.data_center_id = ? "
|
"SELECT host.id, SUM(IF(vm.state='Running' AND vm.account_id = ?, 1, 0)) FROM `cloud`.`host` host LEFT JOIN `cloud`.`vm_instance` vm ON host.id = vm.host_id " +
|
||||||
+ " AND host.type = 'Routing' AND host.removed is null ";
|
"WHERE host.data_center_id = ? AND host.type = 'Routing' AND host.removed is null ";
|
||||||
|
|
||||||
private static final String ORDER_HOSTS_NUMBER_OF_VMS_FOR_ACCOUNT_PART2 = " GROUP BY host.id ORDER BY 2 ASC ";
|
private static final String ORDER_HOSTS_NUMBER_OF_VMS_FOR_ACCOUNT_PART2 = " GROUP BY host.id ORDER BY 2 ASC ";
|
||||||
|
|
||||||
|
|||||||
4
pom.xml
4
pom.xml
@ -445,6 +445,7 @@
|
|||||||
<outputDirectory>${basedir}/${cs.target.dir}/classes</outputDirectory>
|
<outputDirectory>${basedir}/${cs.target.dir}/classes</outputDirectory>
|
||||||
<testOutputDirectory>${basedir}/${cs.target.dir}/test-classes</testOutputDirectory>
|
<testOutputDirectory>${basedir}/${cs.target.dir}/test-classes</testOutputDirectory>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<!--
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||||
@ -471,9 +472,10 @@
|
|||||||
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||||
<sourceDirectory>${project.basedir}</sourceDirectory>
|
<sourceDirectory>${project.basedir}</sourceDirectory>
|
||||||
<includes>**\/*.java</includes>
|
<includes>**\/*.java</includes>
|
||||||
<excludes>**\/test\/,**\/target\/,**\/bin\/,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat</excludes>
|
<excludes>**\/deps\/,**\/test\/,**\/target\/,**\/bin\/,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
-->
|
||||||
</plugins>
|
</plugins>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|||||||
@ -327,7 +327,8 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager,
|
|||||||
/* alloc from free resource */
|
/* alloc from free resource */
|
||||||
if (!((reservedCpu + usedCpu + cpu <= totalCpu) && (reservedMem + usedMem + ram <= totalMem))) {
|
if (!((reservedCpu + usedCpu + cpu <= totalCpu) && (reservedMem + usedMem + ram <= totalMem))) {
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Host doesnt seem to have enough free capacity, but increasing the used capacity anyways, since the VM is already starting on this host ");
|
s_logger.debug("Host doesnt seem to have enough free capacity, but increasing the used capacity anyways, " +
|
||||||
|
"since the VM is already starting on this host ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -399,13 +399,14 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
|
|||||||
continue;
|
continue;
|
||||||
} else if (!oneOfRulesIsFirewall &&
|
} else if (!oneOfRulesIsFirewall &&
|
||||||
!(bothRulesFirewall && !duplicatedCidrs) &&
|
!(bothRulesFirewall && !duplicatedCidrs) &&
|
||||||
((rule.getSourcePortStart().intValue() <= newRule.getSourcePortStart().intValue() && rule.getSourcePortEnd().intValue() >= newRule.getSourcePortStart()
|
((rule.getSourcePortStart().intValue() <= newRule.getSourcePortStart().intValue() &&
|
||||||
.intValue()) ||
|
rule.getSourcePortEnd().intValue() >= newRule.getSourcePortStart().intValue()) ||
|
||||||
(rule.getSourcePortStart().intValue() <= newRule.getSourcePortEnd().intValue() && rule.getSourcePortEnd().intValue() >= newRule.getSourcePortEnd()
|
(rule.getSourcePortStart().intValue() <= newRule.getSourcePortEnd().intValue() &&
|
||||||
.intValue()) ||
|
rule.getSourcePortEnd().intValue() >= newRule.getSourcePortEnd().intValue()) ||
|
||||||
(newRule.getSourcePortStart().intValue() <= rule.getSourcePortStart().intValue() && newRule.getSourcePortEnd().intValue() >= rule.getSourcePortStart()
|
(newRule.getSourcePortStart().intValue() <= rule.getSourcePortStart().intValue() &&
|
||||||
.intValue()) || (newRule.getSourcePortStart().intValue() <= rule.getSourcePortEnd().intValue() && newRule.getSourcePortEnd().intValue() >= rule.getSourcePortEnd()
|
newRule.getSourcePortEnd().intValue() >= rule.getSourcePortStart().intValue()) ||
|
||||||
.intValue()))) {
|
(newRule.getSourcePortStart().intValue() <= rule.getSourcePortEnd().intValue() &&
|
||||||
|
newRule.getSourcePortEnd().intValue() >= rule.getSourcePortEnd().intValue()))) {
|
||||||
|
|
||||||
// we allow port forwarding rules with the same parameters but different protocols
|
// we allow port forwarding rules with the same parameters but different protocols
|
||||||
boolean allowPf =
|
boolean allowPf =
|
||||||
@ -928,7 +929,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public void setFirewallElements(List<FirewallServiceProvider> firewallElements) {
|
public void setFirewallElements(List<FirewallServiceProvider> firewallElements) {
|
||||||
this._firewallElements = firewallElements;
|
_firewallElements = firewallElements;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<PortForwardingServiceProvider> getPfElements() {
|
public List<PortForwardingServiceProvider> getPfElements() {
|
||||||
@ -937,7 +938,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public void setPfElements(List<PortForwardingServiceProvider> pfElements) {
|
public void setPfElements(List<PortForwardingServiceProvider> pfElements) {
|
||||||
this._pfElements = pfElements;
|
_pfElements = pfElements;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<StaticNatServiceProvider> getStaticNatElements() {
|
public List<StaticNatServiceProvider> getStaticNatElements() {
|
||||||
@ -946,7 +947,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public void setStaticNatElements(List<StaticNatServiceProvider> staticNatElements) {
|
public void setStaticNatElements(List<StaticNatServiceProvider> staticNatElements) {
|
||||||
this._staticNatElements = staticNatElements;
|
_staticNatElements = staticNatElements;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<NetworkACLServiceProvider> getNetworkAclElements() {
|
public List<NetworkACLServiceProvider> getNetworkAclElements() {
|
||||||
@ -955,7 +956,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public void setNetworkAclElements(List<NetworkACLServiceProvider> networkAclElements) {
|
public void setNetworkAclElements(List<NetworkACLServiceProvider> networkAclElements) {
|
||||||
this._networkAclElements = networkAclElements;
|
_networkAclElements = networkAclElements;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -658,9 +658,6 @@ public class MockNetworkManagerImpl extends ManagerBase implements NetworkOrches
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see com.cloud.network.NetworkManager#prepareNic(com.cloud.vm.VirtualMachineProfile, com.cloud.deploy.DeployDestination, com.cloud.vm.ReservationContext, long, com.cloud.network.NetworkVO)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public NicProfile prepareNic(VirtualMachineProfile vmProfile, DeployDestination dest, ReservationContext context, long nicId, Network network)
|
public NicProfile prepareNic(VirtualMachineProfile vmProfile, DeployDestination dest, ReservationContext context, long nicId, Network network)
|
||||||
throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
|
throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
|
||||||
|
|||||||
@ -29,15 +29,15 @@ public class PortForwardingTest extends TestCase {
|
|||||||
public static final Logger s_logger = Logger.getLogger(PortForwardingTest.class.getName());
|
public static final Logger s_logger = Logger.getLogger(PortForwardingTest.class.getName());
|
||||||
|
|
||||||
public PortForwardingTest() {
|
public PortForwardingTest() {
|
||||||
this.setClient();
|
setClient();
|
||||||
this.setParam(new HashMap<String, String>());
|
setParam(new HashMap<String, String>());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean executeTest() {
|
public boolean executeTest() {
|
||||||
|
|
||||||
int error = 0;
|
int error = 0;
|
||||||
Element rootElement = this.getInputFile().get(0).getDocumentElement();
|
Element rootElement = getInputFile().get(0).getDocumentElement();
|
||||||
NodeList commandLst = rootElement.getElementsByTagName("command");
|
NodeList commandLst = rootElement.getElementsByTagName("command");
|
||||||
|
|
||||||
//Analyze each command, send request and build the array list of api commands
|
//Analyze each command, send request and build the array list of api commands
|
||||||
@ -47,10 +47,10 @@ public class PortForwardingTest extends TestCase {
|
|||||||
Element fstElmnt = (Element)fstNode;
|
Element fstElmnt = (Element)fstNode;
|
||||||
|
|
||||||
//new command
|
//new command
|
||||||
ApiCommand api = new ApiCommand(fstElmnt, this.getParam(), this.getCommands());
|
ApiCommand api = new ApiCommand(fstElmnt, getParam(), getCommands());
|
||||||
|
|
||||||
//send a command
|
//send a command
|
||||||
api.sendCommand(this.getClient(), null);
|
api.sendCommand(getClient(), null);
|
||||||
|
|
||||||
//verify the response of the command
|
//verify the response of the command
|
||||||
if ((api.getResponseType() != ResponseType.ERROR) && (api.getResponseCode() == 200)) {
|
if ((api.getResponseType() != ResponseType.ERROR) && (api.getResponseCode() == 200)) {
|
||||||
@ -70,7 +70,7 @@ public class PortForwardingTest extends TestCase {
|
|||||||
s_logger.error("Test case " + api.getTestCaseInfo() + " failed. Non-empty response was expected. Command was sent with url " + api.getUrl());
|
s_logger.error("Test case " + api.getTestCaseInfo() + " failed. Non-empty response was expected. Command was sent with url " + api.getUrl());
|
||||||
else {
|
else {
|
||||||
//set parameters for the future use
|
//set parameters for the future use
|
||||||
if (api.setParam(this.getParam()) == false) {
|
if (api.setParam(getParam()) == false) {
|
||||||
s_logger.error("Exiting the test...Command " + api.getName() +
|
s_logger.error("Exiting the test...Command " + api.getName() +
|
||||||
" didn't return parameters needed for the future use. The command was sent with url " + api.getUrl());
|
" didn't return parameters needed for the future use. The command was sent with url " + api.getUrl());
|
||||||
return false;
|
return false;
|
||||||
@ -119,7 +119,8 @@ public class PortForwardingTest extends TestCase {
|
|||||||
// //try all private ports
|
// //try all private ports
|
||||||
// for (String portValue : port) {
|
// for (String portValue : port) {
|
||||||
// try {
|
// try {
|
||||||
// String url = this.getHost() + ":8096/?command=createOrUpdateIpForwardingRule&account=" + this.getParam().get("accountname") + "&publicip=" + this.getParam().get("boundaryip") +
|
// String url = this.getHost() + ":8096/?command=createOrUpdateIpForwardingRule&account=" +
|
||||||
|
// this.getParam().get("accountname") + "&publicip=" + this.getParam().get("boundaryip") +
|
||||||
// "&privateip=" + this.getParam().get("vmipaddress") + "&publicport=22&protocol=tcp&privateport=" + portValue;
|
// "&privateip=" + this.getParam().get("vmipaddress") + "&publicport=22&protocol=tcp&privateport=" + portValue;
|
||||||
// HttpClient client = new HttpClient();
|
// HttpClient client = new HttpClient();
|
||||||
// HttpMethod method = new GetMethod(url);
|
// HttpMethod method = new GetMethod(url);
|
||||||
|
|||||||
@ -540,7 +540,6 @@ public class VmwareContext {
|
|||||||
vmware-6.log</a></td><td align="right">15-Aug-2010 00:11</td><td align="right">59742</td></tr>
|
vmware-6.log</a></td><td align="right">15-Aug-2010 00:11</td><td align="right">59742</td></tr>
|
||||||
<tr><td><a href="/folder/Fedora%2dclone%2dtest/vmware%2d7%2elog?dcPath=cupertino&dsName=NFS%20datastore">
|
<tr><td><a href="/folder/Fedora%2dclone%2dtest/vmware%2d7%2elog?dcPath=cupertino&dsName=NFS%20datastore">
|
||||||
vmware-7.log</a></td><td align="right">15-Aug-2010 00:13</td><td align="right">59859</td></tr>
|
vmware-7.log</a></td><td align="right">15-Aug-2010 00:13</td><td align="right">59859</td></tr>
|
||||||
|
|
||||||
<tr><td><a href="/folder/Fedora%2dclone%2dtest/vmware%2elog?dcPath=cupertino&dsName=NFS%20datastore">
|
<tr><td><a href="/folder/Fedora%2dclone%2dtest/vmware%2elog?dcPath=cupertino&dsName=NFS%20datastore">
|
||||||
vmware.log</a></td><td align="right">15-Aug-2010 00:23</td><td align="right">47157</td></tr>
|
vmware.log</a></td><td align="right">15-Aug-2010 00:23</td><td align="right">47157</td></tr>
|
||||||
<tr><th colspan="5"><hr></th></tr>
|
<tr><th colspan="5"><hr></th></tr>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user