You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ah...@apache.org on 2013/11/20 16:35:36 UTC
[49/51] [partial] Reformat all source code. Added checkstyle to check
the source code
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/storage/PasswordAuth.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/storage/PasswordAuth.java b/api/src/com/cloud/agent/api/storage/PasswordAuth.java
index f03c584..865ced9 100644
--- a/api/src/com/cloud/agent/api/storage/PasswordAuth.java
+++ b/api/src/com/cloud/agent/api/storage/PasswordAuth.java
@@ -23,16 +23,20 @@ public class PasswordAuth {
String userName;
String password;
+
public PasswordAuth() {
}
+
public PasswordAuth(String user, String password) {
this.userName = user;
this.password = password;
}
+
public String getUserName() {
return userName;
}
+
public String getPassword() {
return password;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/storage/PrepareOVAPackingCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/storage/PrepareOVAPackingCommand.java b/api/src/com/cloud/agent/api/storage/PrepareOVAPackingCommand.java
index 29fa26d..7bd22e4 100755
--- a/api/src/com/cloud/agent/api/storage/PrepareOVAPackingCommand.java
+++ b/api/src/com/cloud/agent/api/storage/PrepareOVAPackingCommand.java
@@ -19,30 +19,28 @@ package com.cloud.agent.api.storage;
import com.cloud.agent.api.Command;
public class PrepareOVAPackingCommand extends Command {
- private String templatePath;
- private String secUrl;
+ private String templatePath;
+ private String secUrl;
- public PrepareOVAPackingCommand() {
- }
+ public PrepareOVAPackingCommand() {
+ }
- public PrepareOVAPackingCommand(String secUrl, String templatePath) {
- this.secUrl = secUrl;
- this.templatePath = templatePath;
- }
+ public PrepareOVAPackingCommand(String secUrl, String templatePath) {
+ this.secUrl = secUrl;
+ this.templatePath = templatePath;
+ }
- @Override
- public boolean executeInSequence() {
- return true;
- }
+ @Override
+ public boolean executeInSequence() {
+ return true;
+ }
- public String getTemplatePath() {
- return this.templatePath;
- }
+ public String getTemplatePath() {
+ return this.templatePath;
+ }
- public String getSecondaryStorageUrl() {
- return this.secUrl;
- }
+ public String getSecondaryStorageUrl() {
+ return this.secUrl;
+ }
}
-
-
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/DataObjectType.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/DataObjectType.java b/api/src/com/cloud/agent/api/to/DataObjectType.java
index 6f7a007..9addd71 100644
--- a/api/src/com/cloud/agent/api/to/DataObjectType.java
+++ b/api/src/com/cloud/agent/api/to/DataObjectType.java
@@ -19,7 +19,5 @@
package com.cloud.agent.api.to;
public enum DataObjectType {
- VOLUME,
- SNAPSHOT,
- TEMPLATE
+ VOLUME, SNAPSHOT, TEMPLATE
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/DataStoreTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/DataStoreTO.java b/api/src/com/cloud/agent/api/to/DataStoreTO.java
index 199740d..8d47adc 100644
--- a/api/src/com/cloud/agent/api/to/DataStoreTO.java
+++ b/api/src/com/cloud/agent/api/to/DataStoreTO.java
@@ -22,6 +22,8 @@ import com.cloud.storage.DataStoreRole;
public interface DataStoreTO {
DataStoreRole getRole();
+
String getUuid();
+
String getUrl();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/DataTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/DataTO.java b/api/src/com/cloud/agent/api/to/DataTO.java
index 8d24a05..af43aa1 100644
--- a/api/src/com/cloud/agent/api/to/DataTO.java
+++ b/api/src/com/cloud/agent/api/to/DataTO.java
@@ -22,8 +22,11 @@ import com.cloud.hypervisor.Hypervisor;
public interface DataTO {
public DataObjectType getObjectType();
+
public DataStoreTO getDataStore();
+
public Hypervisor.HypervisorType getHypervisorType();
+
/**
* @return
*/
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/DhcpTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/DhcpTO.java b/api/src/com/cloud/agent/api/to/DhcpTO.java
index b0d6c7a..56f6b47 100644
--- a/api/src/com/cloud/agent/api/to/DhcpTO.java
+++ b/api/src/com/cloud/agent/api/to/DhcpTO.java
@@ -26,11 +26,11 @@ public class DhcpTO {
this.routerIp = routerIp;
this.startIpOfSubnet = StartIpOfSubnet;
this.gateway = gateway;
- this.netmask =netmask;
+ this.netmask = netmask;
}
- public void setRouterIp(String routerIp){
+ public void setRouterIp(String routerIp) {
this.routerIp = routerIp;
}
@@ -39,10 +39,10 @@ public class DhcpTO {
}
public void setNetmask(String netmask) {
- this.netmask = netmask ;
+ this.netmask = netmask;
}
- public void setStartIpOfSubnet( String ipOfSubNet) {
+ public void setStartIpOfSubnet(String ipOfSubNet) {
startIpOfSubnet = ipOfSubNet;
}
@@ -57,6 +57,7 @@ public class DhcpTO {
public String getNetmask() {
return netmask;
}
+
public String getStartIpOfSubnet() {
return startIpOfSubnet;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/DiskTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/DiskTO.java b/api/src/com/cloud/agent/api/to/DiskTO.java
index a577689..5901367 100644
--- a/api/src/com/cloud/agent/api/to/DiskTO.java
+++ b/api/src/com/cloud/agent/api/to/DiskTO.java
@@ -40,9 +40,9 @@ public class DiskTO {
private Map<String, String> _details;
public DiskTO() {
-
+
}
-
+
public DiskTO(DataTO data, Long diskSeq, String path, Volume.Type type) {
this.data = data;
this.diskSeq = diskSeq;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/FirewallRuleTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/FirewallRuleTO.java b/api/src/com/cloud/agent/api/to/FirewallRuleTO.java
index 8c7b552..baba89d 100644
--- a/api/src/com/cloud/agent/api/to/FirewallRuleTO.java
+++ b/api/src/com/cloud/agent/api/to/FirewallRuleTO.java
@@ -60,10 +60,13 @@ public class FirewallRuleTO implements InternalIdentity {
protected FirewallRuleTO() {
}
- public FirewallRuleTO(long id, String srcIp, String protocol, Integer srcPortStart, Integer srcPortEnd, boolean revoked, boolean alreadyAdded, FirewallRule.Purpose purpose, List<String> sourceCidr,Integer icmpType,Integer icmpCode) {
- this(id,null,srcIp,protocol,srcPortStart,srcPortEnd,revoked,alreadyAdded,purpose,sourceCidr,icmpType,icmpCode);
+ public FirewallRuleTO(long id, String srcIp, String protocol, Integer srcPortStart, Integer srcPortEnd, boolean revoked, boolean alreadyAdded, FirewallRule.Purpose purpose,
+ List<String> sourceCidr, Integer icmpType, Integer icmpCode) {
+ this(id, null, srcIp, protocol, srcPortStart, srcPortEnd, revoked, alreadyAdded, purpose, sourceCidr, icmpType, icmpCode);
}
- public FirewallRuleTO(long id,String srcVlanTag, String srcIp, String protocol, Integer srcPortStart, Integer srcPortEnd, boolean revoked, boolean alreadyAdded, FirewallRule.Purpose purpose, List<String> sourceCidr,Integer icmpType,Integer icmpCode) {
+
+ public FirewallRuleTO(long id, String srcVlanTag, String srcIp, String protocol, Integer srcPortStart, Integer srcPortEnd, boolean revoked, boolean alreadyAdded,
+ FirewallRule.Purpose purpose, List<String> sourceCidr, Integer icmpType, Integer icmpCode) {
this.id = id;
this.srcVlanTag = srcVlanTag;
this.srcIp = srcIp;
@@ -80,7 +83,7 @@ public class FirewallRuleTO implements InternalIdentity {
int i = 0;
for (Integer port : portRange) {
srcPortRange[i] = port.intValue();
- i ++;
+ i++;
}
}
@@ -92,42 +95,121 @@ public class FirewallRuleTO implements InternalIdentity {
this.icmpCode = icmpCode;
this.trafficType = null;
}
+
public FirewallRuleTO(FirewallRule rule, String srcVlanTag, String srcIp) {
- this(rule.getId(),srcVlanTag, srcIp, rule.getProtocol(), rule.getSourcePortStart(), rule.getSourcePortEnd(), rule.getState()==State.Revoke, rule.getState()==State.Active, rule.getPurpose(),rule.getSourceCidrList(),rule.getIcmpType(),rule.getIcmpCode());
+ this(rule.getId(),
+ srcVlanTag,
+ srcIp,
+ rule.getProtocol(),
+ rule.getSourcePortStart(),
+ rule.getSourcePortEnd(),
+ rule.getState() == State.Revoke,
+ rule.getState() == State.Active,
+ rule.getPurpose(),
+ rule.getSourceCidrList(),
+ rule.getIcmpType(),
+ rule.getIcmpCode());
}
public FirewallRuleTO(FirewallRule rule, String srcIp) {
- this(rule.getId(),null, srcIp, rule.getProtocol(), rule.getSourcePortStart(), rule.getSourcePortEnd(), rule.getState()==State.Revoke, rule.getState()==State.Active, rule.getPurpose(),rule.getSourceCidrList(),rule.getIcmpType(),rule.getIcmpCode());
+ this(rule.getId(),
+ null,
+ srcIp,
+ rule.getProtocol(),
+ rule.getSourcePortStart(),
+ rule.getSourcePortEnd(),
+ rule.getState() == State.Revoke,
+ rule.getState() == State.Active,
+ rule.getPurpose(),
+ rule.getSourceCidrList(),
+ rule.getIcmpType(),
+ rule.getIcmpCode());
}
public FirewallRuleTO(FirewallRule rule, String srcVlanTag, String srcIp, FirewallRule.Purpose purpose) {
- this(rule.getId(),srcVlanTag, srcIp, rule.getProtocol(), rule.getSourcePortStart(), rule.getSourcePortEnd(), rule.getState()==State.Revoke, rule.getState()==State.Active, purpose,rule.getSourceCidrList(),rule.getIcmpType(),rule.getIcmpCode());
+ this(rule.getId(),
+ srcVlanTag,
+ srcIp,
+ rule.getProtocol(),
+ rule.getSourcePortStart(),
+ rule.getSourcePortEnd(),
+ rule.getState() == State.Revoke,
+ rule.getState() == State.Active,
+ purpose,
+ rule.getSourceCidrList(),
+ rule.getIcmpType(),
+ rule.getIcmpCode());
}
public FirewallRuleTO(FirewallRule rule, String srcVlanTag, String srcIp, FirewallRule.Purpose purpose, FirewallRule.TrafficType trafficType) {
- this(rule.getId(),srcVlanTag, srcIp, rule.getProtocol(), rule.getSourcePortStart(), rule.getSourcePortEnd(), rule.getState()==State.Revoke, rule.getState()==State.Active, purpose,rule.getSourceCidrList(),rule.getIcmpType(),rule.getIcmpCode());
+ this(rule.getId(),
+ srcVlanTag,
+ srcIp,
+ rule.getProtocol(),
+ rule.getSourcePortStart(),
+ rule.getSourcePortEnd(),
+ rule.getState() == State.Revoke,
+ rule.getState() == State.Active,
+ purpose,
+ rule.getSourceCidrList(),
+ rule.getIcmpType(),
+ rule.getIcmpCode());
this.trafficType = trafficType;
}
public FirewallRuleTO(FirewallRule rule, String srcVlanTag, String srcIp, FirewallRule.Purpose purpose, FirewallRule.TrafficType trafficType, boolean defaultEgressPolicy) {
- this(rule.getId(),srcVlanTag, srcIp, rule.getProtocol(), rule.getSourcePortStart(), rule.getSourcePortEnd(), rule.getState()==State.Revoke, rule.getState()==State.Active, purpose,rule.getSourceCidrList(),rule.getIcmpType(),rule.getIcmpCode());
+ this(rule.getId(),
+ srcVlanTag,
+ srcIp,
+ rule.getProtocol(),
+ rule.getSourcePortStart(),
+ rule.getSourcePortEnd(),
+ rule.getState() == State.Revoke,
+ rule.getState() == State.Active,
+ purpose,
+ rule.getSourceCidrList(),
+ rule.getIcmpType(),
+ rule.getIcmpCode());
this.trafficType = trafficType;
this.defaultEgressPolicy = defaultEgressPolicy;
}
public FirewallRuleTO(FirewallRule rule, String srcVlanTag, String srcIp, FirewallRule.Purpose purpose, boolean revokeState, boolean alreadyAdded) {
- this(rule.getId(),srcVlanTag, srcIp, rule.getProtocol(), rule.getSourcePortStart(), rule.getSourcePortEnd(), revokeState, alreadyAdded, purpose,rule.getSourceCidrList(),rule.getIcmpType(),rule.getIcmpCode());
+ this(rule.getId(),
+ srcVlanTag,
+ srcIp,
+ rule.getProtocol(),
+ rule.getSourcePortStart(),
+ rule.getSourcePortEnd(),
+ revokeState,
+ alreadyAdded,
+ purpose,
+ rule.getSourceCidrList(),
+ rule.getIcmpType(),
+ rule.getIcmpCode());
}
- public FirewallRuleTO(FirewallRule rule, String guestVlanTag, FirewallRule.TrafficType trafficType, String guestCidr, boolean defaultEgressPolicy, FirewallRule.FirewallRuleType type) {
- this(rule.getId(), guestVlanTag, null, rule.getProtocol(), rule.getSourcePortStart(), rule.getSourcePortEnd(), rule.getState()==State.Revoke, rule.getState()==State.Active, rule.getPurpose(), rule.getSourceCidrList(), rule.getIcmpType(), rule.getIcmpCode());
+ public FirewallRuleTO(FirewallRule rule, String guestVlanTag, FirewallRule.TrafficType trafficType, String guestCidr, boolean defaultEgressPolicy,
+ FirewallRule.FirewallRuleType type) {
+ this(rule.getId(),
+ guestVlanTag,
+ null,
+ rule.getProtocol(),
+ rule.getSourcePortStart(),
+ rule.getSourcePortEnd(),
+ rule.getState() == State.Revoke,
+ rule.getState() == State.Active,
+ rule.getPurpose(),
+ rule.getSourceCidrList(),
+ rule.getIcmpType(),
+ rule.getIcmpCode());
this.trafficType = trafficType;
this.defaultEgressPolicy = defaultEgressPolicy;
this.guestCidr = guestCidr;
this.type = type;
}
- public FirewallRule.TrafficType getTrafficType(){
+ public FirewallRule.TrafficType getTrafficType() {
return trafficType;
}
@@ -136,7 +218,7 @@ public class FirewallRuleTO implements InternalIdentity {
}
public String getSrcVlanTag() {
- return srcVlanTag;
+ return srcVlanTag;
}
public String getSrcIp() {
@@ -151,19 +233,19 @@ public class FirewallRuleTO implements InternalIdentity {
return srcPortRange;
}
- public Integer getIcmpType(){
- return icmpType;
+ public Integer getIcmpType() {
+ return icmpType;
}
- public Integer getIcmpCode(){
- return icmpCode;
+ public Integer getIcmpCode() {
+ return icmpCode;
}
public String getStringSrcPortRange() {
- if (srcPortRange == null || srcPortRange.length < 2)
- return "0:0";
- else
- return NetUtils.portRangeToString(srcPortRange);
+ if (srcPortRange == null || srcPortRange.length < 2)
+ return "0:0";
+ else
+ return NetUtils.portRangeToString(srcPortRange);
}
public boolean revoked() {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/IpAddressTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/IpAddressTO.java b/api/src/com/cloud/agent/api/to/IpAddressTO.java
index 3191ecc..5f31313 100644
--- a/api/src/com/cloud/agent/api/to/IpAddressTO.java
+++ b/api/src/com/cloud/agent/api/to/IpAddressTO.java
@@ -34,8 +34,8 @@ public class IpAddressTO {
private TrafficType trafficType;
private String networkName;
- public IpAddressTO(long accountId, String ipAddress, boolean add, boolean firstIP, boolean sourceNat, String broadcastUri,
- String vlanGateway, String vlanNetmask, String vifMacAddress, Integer networkRate, boolean isOneToOneNat) {
+ public IpAddressTO(long accountId, String ipAddress, boolean add, boolean firstIP, boolean sourceNat, String broadcastUri, String vlanGateway, String vlanNetmask,
+ String vifMacAddress, Integer networkRate, boolean isOneToOneNat) {
this.accountId = accountId;
this.publicIp = ipAddress;
this.add = add;
@@ -72,7 +72,6 @@ public class IpAddressTO {
return networkName;
}
-
public void setTrafficType(TrafficType trafficType) {
this.trafficType = trafficType;
}
@@ -81,7 +80,7 @@ public class IpAddressTO {
return add;
}
- public boolean isOneToOneNat(){
+ public boolean isOneToOneNat() {
return this.oneToOneNat;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/LoadBalancerTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/LoadBalancerTO.java b/api/src/com/cloud/agent/api/to/LoadBalancerTO.java
index 4caa1b2..777e507 100644
--- a/api/src/com/cloud/agent/api/to/LoadBalancerTO.java
+++ b/api/src/com/cloud/agent/api/to/LoadBalancerTO.java
@@ -16,7 +16,6 @@
// under the License.
package com.cloud.agent.api.to;
-
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@@ -36,7 +35,6 @@ import com.cloud.network.lb.LoadBalancingRule.LbStickinessPolicy;
import com.cloud.network.lb.LoadBalancingRule.LbSslCert;
import com.cloud.utils.Pair;
-
public class LoadBalancerTO {
String uuid;
String srcIp;
@@ -55,7 +53,8 @@ public class LoadBalancerTO {
final static int MAX_STICKINESS_POLICIES = 1;
final static int MAX_HEALTHCHECK_POLICIES = 1;
- public LoadBalancerTO(String uuid, String srcIp, int srcPort, String protocol, String algorithm, boolean revoked, boolean alreadyAdded, boolean inline, List<LbDestination> destinations) {
+ public LoadBalancerTO(String uuid, String srcIp, int srcPort, String protocol, String algorithm, boolean revoked, boolean alreadyAdded, boolean inline,
+ List<LbDestination> destinations) {
if (destinations == null) { // for autoscaleconfig destinations will be null;
destinations = new ArrayList<LbDestination>();
}
@@ -77,17 +76,14 @@ public class LoadBalancerTO {
}
}
- 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) {
+ 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) {
- this(id, srcIp, srcPort, protocol, algorithm, revoked, alreadyAdded, inline, arg_destinations,
- stickinessPolicies, null, null, null);
+ this(id, srcIp, srcPort, protocol, algorithm, revoked, alreadyAdded, inline, arg_destinations, stickinessPolicies, null, null, null);
}
- 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, String lbProtocol) {
+ 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, String lbProtocol) {
this(id, srcIp, srcPort, protocol, algorithm, revoked, alreadyAdded, inline, arg_destinations);
this.stickinessPolicies = null;
this.healthCheckPolicies = null;
@@ -96,8 +92,7 @@ public class LoadBalancerTO {
int index = 0;
for (LbStickinessPolicy stickinesspolicy : stickinessPolicies) {
if (!stickinesspolicy.isRevoked()) {
- this.stickinessPolicies[index] = new StickinessPolicyTO(stickinesspolicy.getMethodName(),
- stickinesspolicy.getParams());
+ this.stickinessPolicies[index] = new StickinessPolicyTO(stickinesspolicy.getMethodName(), stickinesspolicy.getParams());
index++;
if (index == MAX_STICKINESS_POLICIES)
break;
@@ -111,12 +106,11 @@ public class LoadBalancerTO {
this.healthCheckPolicies = new HealthCheckPolicyTO[MAX_HEALTHCHECK_POLICIES];
int index = 0;
for (LbHealthCheckPolicy hcp : healthCheckPolicies) {
- this.healthCheckPolicies[0] = new HealthCheckPolicyTO(hcp.getpingpath(), hcp.getDescription(),
- hcp.getResponseTime(), hcp.getHealthcheckInterval(), hcp.getHealthcheckThresshold(),
- hcp.getUnhealthThresshold(), hcp.isRevoked());
- index++;
- if (index == MAX_HEALTHCHECK_POLICIES)
- break;
+ this.healthCheckPolicies[0] = new HealthCheckPolicyTO(hcp.getpingpath(), hcp.getDescription(), hcp.getResponseTime(), hcp.getHealthcheckInterval(),
+ hcp.getHealthcheckThresshold(), hcp.getUnhealthThresshold(), hcp.isRevoked());
+ index++;
+ if (index == MAX_HEALTHCHECK_POLICIES)
+ break;
}
if (index == 0)
@@ -190,8 +184,8 @@ public class LoadBalancerTO {
return this.autoScaleVmGroupTO != null;
}
- public LbSslCert getSslCert(){
- return this.sslCert;
+ public LbSslCert getSslCert() {
+ return this.sslCert;
}
public static class StickinessPolicyTO {
@@ -210,7 +204,7 @@ public class LoadBalancerTO {
this._methodName = methodName;
this._paramsList = paramsList;
}
- }
+ }
public static class HealthCheckPolicyTO {
private String pingPath;
@@ -221,8 +215,7 @@ public class LoadBalancerTO {
private int unhealthThresshold;
private boolean revoke = false;
- public HealthCheckPolicyTO(String pingPath, String description, int responseTime, int healthcheckInterval,
- int healthcheckThresshold, int unhealthThresshold, boolean revoke) {
+ public HealthCheckPolicyTO(String pingPath, String description, int responseTime, int healthcheckInterval, int healthcheckThresshold, int unhealthThresshold, boolean revoke) {
this.description = description;
this.pingPath = pingPath;
@@ -277,6 +270,7 @@ public class LoadBalancerTO {
boolean revoked;
boolean alreadyAdded;
String monitorState;
+
public DestinationTO(String destIp, int destPort, boolean revoked, boolean alreadyAdded) {
this.destIp = destIp;
this.destPort = destPort;
@@ -311,8 +305,8 @@ public class LoadBalancerTO {
return monitorState;
}
-
}
+
public static class CounterTO implements Serializable {
private final String name;
private final String source;
@@ -342,8 +336,7 @@ public class LoadBalancerTO {
private final String relationalOperator;
private final CounterTO counter;
- public ConditionTO(long threshold, String relationalOperator, CounterTO counter)
- {
+ public ConditionTO(long threshold, String relationalOperator, CounterTO counter) {
this.threshold = threshold;
this.relationalOperator = relationalOperator;
this.counter = counter;
@@ -494,8 +487,8 @@ public class LoadBalancerTO {
private final String state;
private final String currentState;
- AutoScaleVmGroupTO(String uuid, int minMembers, int maxMembers, int memberPort, int interval, List<AutoScalePolicyTO> policies, AutoScaleVmProfileTO profile, String state, String currentState)
- {
+ AutoScaleVmGroupTO(String uuid, int minMembers, int maxMembers, int memberPort, int interval, List<AutoScalePolicyTO> policies, AutoScaleVmProfileTO profile, String state,
+ String currentState) {
this.uuid = uuid;
this.minMembers = minMembers;
this.maxMembers = maxMembers;
@@ -544,8 +537,7 @@ public class LoadBalancerTO {
}
}
- public void setAutoScaleVmGroup(LbAutoScaleVmGroup lbAutoScaleVmGroup)
- {
+ public void setAutoScaleVmGroup(LbAutoScaleVmGroup lbAutoScaleVmGroup) {
List<LbAutoScalePolicy> lbAutoScalePolicies = lbAutoScaleVmGroup.getPolicies();
List<AutoScalePolicyTO> autoScalePolicyTOs = new ArrayList<AutoScalePolicyTO>(lbAutoScalePolicies.size());
for (LbAutoScalePolicy lbAutoScalePolicy : lbAutoScalePolicies) {
@@ -559,21 +551,20 @@ public class LoadBalancerTO {
conditionTOs.add(conditionTO);
}
AutoScalePolicy autoScalePolicy = lbAutoScalePolicy.getPolicy();
- autoScalePolicyTOs.add(new AutoScalePolicyTO(autoScalePolicy.getId(), autoScalePolicy.getDuration(),
- autoScalePolicy.getQuietTime(), autoScalePolicy.getAction(),
- conditionTOs, lbAutoScalePolicy.isRevoked()));
+ autoScalePolicyTOs.add(new AutoScalePolicyTO(autoScalePolicy.getId(), autoScalePolicy.getDuration(), autoScalePolicy.getQuietTime(), autoScalePolicy.getAction(),
+ conditionTOs, lbAutoScalePolicy.isRevoked()));
}
LbAutoScaleVmProfile lbAutoScaleVmProfile = lbAutoScaleVmGroup.getProfile();
AutoScaleVmProfile autoScaleVmProfile = lbAutoScaleVmProfile.getProfile();
- AutoScaleVmProfileTO autoScaleVmProfileTO = new AutoScaleVmProfileTO(lbAutoScaleVmProfile.getZoneId(), lbAutoScaleVmProfile.getDomainId(),
- lbAutoScaleVmProfile.getCsUrl(), lbAutoScaleVmProfile.getAutoScaleUserApiKey(), lbAutoScaleVmProfile.getAutoScaleUserSecretKey(),
- lbAutoScaleVmProfile.getServiceOfferingId(), lbAutoScaleVmProfile.getTemplateId(), lbAutoScaleVmProfile.getVmName(),
- lbAutoScaleVmProfile.getNetworkId(),autoScaleVmProfile.getOtherDeployParams(), autoScaleVmProfile.getCounterParams(),
- autoScaleVmProfile.getDestroyVmGraceperiod());
+ AutoScaleVmProfileTO autoScaleVmProfileTO = new AutoScaleVmProfileTO(lbAutoScaleVmProfile.getZoneId(), lbAutoScaleVmProfile.getDomainId(), lbAutoScaleVmProfile.getCsUrl(),
+ lbAutoScaleVmProfile.getAutoScaleUserApiKey(), lbAutoScaleVmProfile.getAutoScaleUserSecretKey(), lbAutoScaleVmProfile.getServiceOfferingId(),
+ lbAutoScaleVmProfile.getTemplateId(), lbAutoScaleVmProfile.getVmName(), lbAutoScaleVmProfile.getNetworkId(), autoScaleVmProfile.getOtherDeployParams(),
+ autoScaleVmProfile.getCounterParams(), autoScaleVmProfile.getDestroyVmGraceperiod());
AutoScaleVmGroup autoScaleVmGroup = lbAutoScaleVmGroup.getVmGroup();
- autoScaleVmGroupTO = new AutoScaleVmGroupTO(autoScaleVmGroup.getUuid(), autoScaleVmGroup.getMinMembers(), autoScaleVmGroup.getMaxMembers(), autoScaleVmGroup.getMemberPort(),
- autoScaleVmGroup.getInterval(), autoScalePolicyTOs, autoScaleVmProfileTO, autoScaleVmGroup.getState(), lbAutoScaleVmGroup.getCurrentState());
+ autoScaleVmGroupTO = new AutoScaleVmGroupTO(autoScaleVmGroup.getUuid(), autoScaleVmGroup.getMinMembers(), autoScaleVmGroup.getMaxMembers(),
+ autoScaleVmGroup.getMemberPort(), autoScaleVmGroup.getInterval(), autoScalePolicyTOs, autoScaleVmProfileTO, autoScaleVmGroup.getState(),
+ lbAutoScaleVmGroup.getCurrentState());
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/MonitorServiceTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/MonitorServiceTO.java b/api/src/com/cloud/agent/api/to/MonitorServiceTO.java
index deced16..b9a2810 100644
--- a/api/src/com/cloud/agent/api/to/MonitorServiceTO.java
+++ b/api/src/com/cloud/agent/api/to/MonitorServiceTO.java
@@ -30,7 +30,7 @@ public class MonitorServiceTO implements InternalIdentity {
protected MonitorServiceTO() {
}
- public MonitorServiceTO (String service, String processname, String serviceName, String servicepath, String pidFile, boolean isDefault) {
+ public MonitorServiceTO(String service, String processname, String serviceName, String servicepath, String pidFile, boolean isDefault) {
this.service = service;
this.processname = processname;
this.serviceName = serviceName;
@@ -39,8 +39,6 @@ public class MonitorServiceTO implements InternalIdentity {
this.isDefault = isDefault;
}
-
-
public boolean isDefault() {
return isDefault;
}
@@ -54,7 +52,6 @@ public class MonitorServiceTO implements InternalIdentity {
return id;
}
-
public String getService() {
return service;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/NetworkACLTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/NetworkACLTO.java b/api/src/com/cloud/agent/api/to/NetworkACLTO.java
index 398591b..fc7aac4 100644
--- a/api/src/com/cloud/agent/api/to/NetworkACLTO.java
+++ b/api/src/com/cloud/agent/api/to/NetworkACLTO.java
@@ -26,7 +26,6 @@ import org.apache.cloudstack.api.InternalIdentity;
import com.cloud.utils.net.NetUtils;
-
public class NetworkACLTO implements InternalIdentity {
long id;
String vlanTag;
@@ -44,9 +43,8 @@ public class NetworkACLTO implements InternalIdentity {
protected NetworkACLTO() {
}
-
- public NetworkACLTO(long id,String vlanTag, String protocol, Integer portStart, Integer portEnd, boolean revoked,
- boolean alreadyAdded, List<String> cidrList, Integer icmpType,Integer icmpCode,TrafficType trafficType, boolean allow, int number) {
+ public NetworkACLTO(long id, String vlanTag, String protocol, Integer portStart, Integer portEnd, boolean revoked, boolean alreadyAdded, List<String> cidrList,
+ Integer icmpType, Integer icmpCode, TrafficType trafficType, boolean allow, int number) {
this.vlanTag = vlanTag;
this.protocol = protocol;
@@ -61,7 +59,7 @@ public class NetworkACLTO implements InternalIdentity {
int i = 0;
for (Integer port : range) {
portRange[i] = port.intValue();
- i ++;
+ i++;
}
}
@@ -72,7 +70,7 @@ public class NetworkACLTO implements InternalIdentity {
this.icmpCode = icmpCode;
this.trafficType = trafficType;
- if(!allow){
+ if (!allow) {
this.action = "DROP";
} else {
this.action = "ACCEPT";
@@ -81,10 +79,20 @@ public class NetworkACLTO implements InternalIdentity {
this.number = number;
}
- public NetworkACLTO(NetworkACLItem rule, String vlanTag, NetworkACLItem.TrafficType trafficType ) {
- this(rule.getId(), vlanTag, rule.getProtocol(), rule.getSourcePortStart(), rule.getSourcePortEnd(),
- rule.getState() == NetworkACLItem.State.Revoke, rule.getState() == NetworkACLItem.State.Active,
- rule.getSourceCidrList() ,rule.getIcmpType(), rule.getIcmpCode(),trafficType, rule.getAction() == NetworkACLItem.Action.Allow, rule.getNumber());
+ public NetworkACLTO(NetworkACLItem rule, String vlanTag, NetworkACLItem.TrafficType trafficType) {
+ this(rule.getId(),
+ vlanTag,
+ rule.getProtocol(),
+ rule.getSourcePortStart(),
+ rule.getSourcePortEnd(),
+ rule.getState() == NetworkACLItem.State.Revoke,
+ rule.getState() == NetworkACLItem.State.Active,
+ rule.getSourceCidrList(),
+ rule.getIcmpType(),
+ rule.getIcmpCode(),
+ trafficType,
+ rule.getAction() == NetworkACLItem.Action.Allow,
+ rule.getNumber());
}
public long getId() {
@@ -103,11 +111,11 @@ public class NetworkACLTO implements InternalIdentity {
return portRange;
}
- public Integer getIcmpType(){
+ public Integer getIcmpType() {
return icmpType;
}
- public Integer getIcmpCode(){
+ public Integer getIcmpCode() {
return icmpCode;
}
@@ -138,7 +146,7 @@ public class NetworkACLTO implements InternalIdentity {
return action;
}
- public int getNumber(){
+ public int getNumber() {
return number;
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/NetworkTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/NetworkTO.java b/api/src/com/cloud/agent/api/to/NetworkTO.java
index 8775f62..be11dea 100644
--- a/api/src/com/cloud/agent/api/to/NetworkTO.java
+++ b/api/src/com/cloud/agent/api/to/NetworkTO.java
@@ -164,7 +164,7 @@ public class NetworkTO {
public void setBroadcastUri(URI broadcastUri) {
// only do this if the scheme needs aligning with the broadcastUri
- if(broadcastUri != null && getBroadcastType() == null) {
+ if (broadcastUri != null && getBroadcastType() == null) {
setBroadcastType(BroadcastDomainType.getSchemeValue(broadcastUri));
}
this.broadcastUri = broadcastUri;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/NicTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/NicTO.java b/api/src/com/cloud/agent/api/to/NicTO.java
index ccebe11..bd8f24e 100644
--- a/api/src/com/cloud/agent/api/to/NicTO.java
+++ b/api/src/com/cloud/agent/api/to/NicTO.java
@@ -24,7 +24,7 @@ public class NicTO extends NetworkTO {
Integer networkRateMulticastMbps;
boolean defaultNic;
String uuid;
- List <String> nicSecIps;
+ List<String> nicSecIps;
public NicTO() {
super();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/PortForwardingRuleTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/PortForwardingRuleTO.java b/api/src/com/cloud/agent/api/to/PortForwardingRuleTO.java
index c23dce8..1310734 100644
--- a/api/src/com/cloud/agent/api/to/PortForwardingRuleTO.java
+++ b/api/src/com/cloud/agent/api/to/PortForwardingRuleTO.java
@@ -36,13 +36,14 @@ public class PortForwardingRuleTO extends FirewallRuleTO {
public PortForwardingRuleTO(PortForwardingRule rule, String srcVlanTag, String srcIp) {
super(rule, srcVlanTag, srcIp);
this.dstIp = rule.getDestinationIpAddress().addr();
- this.dstPortRange = new int[] { rule.getDestinationPortStart(), rule.getDestinationPortEnd() };
+ this.dstPortRange = new int[] {rule.getDestinationPortStart(), rule.getDestinationPortEnd()};
}
- public PortForwardingRuleTO(long id, String srcIp, int srcPortStart, int srcPortEnd, String dstIp, int dstPortStart, int dstPortEnd, String protocol, boolean revoked, boolean alreadyAdded) {
- super(id, null, srcIp, protocol, srcPortStart, srcPortEnd, revoked, alreadyAdded, FirewallRule.Purpose.PortForwarding, null,0,0);
+ public PortForwardingRuleTO(long id, String srcIp, int srcPortStart, int srcPortEnd, String dstIp, int dstPortStart, int dstPortEnd, String protocol, boolean revoked,
+ boolean alreadyAdded) {
+ super(id, null, srcIp, protocol, srcPortStart, srcPortEnd, revoked, alreadyAdded, FirewallRule.Purpose.PortForwarding, null, 0, 0);
this.dstIp = dstIp;
- this.dstPortRange = new int[] { dstPortStart, dstPortEnd };
+ this.dstPortRange = new int[] {dstPortStart, dstPortEnd};
}
public String getDstIp() {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/S3TO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/S3TO.java b/api/src/com/cloud/agent/api/to/S3TO.java
index 0dabb8f..700d998 100644
--- a/api/src/com/cloud/agent/api/to/S3TO.java
+++ b/api/src/com/cloud/agent/api/to/S3TO.java
@@ -47,11 +47,8 @@ public final class S3TO implements S3Utils.ClientOptions, DataStoreTO {
}
- public S3TO(final Long id, final String uuid, final String accessKey,
- final String secretKey, final String endPoint,
- final String bucketName, final Boolean httpsFlag,
- final Integer connectionTimeout, final Integer maxErrorRetry,
- final Integer socketTimeout, final Date created, final boolean enableRRS, final long maxUploadSize) {
+ public S3TO(final Long id, final String uuid, final String accessKey, final String secretKey, final String endPoint, final String bucketName, final Boolean httpsFlag,
+ final Integer connectionTimeout, final Integer maxErrorRetry, final Integer socketTimeout, final Date created, final boolean enableRRS, final long maxUploadSize) {
super();
@@ -81,26 +78,21 @@ public final class S3TO implements S3Utils.ClientOptions, DataStoreTO {
return false;
}
- final S3TO thatS3TO = (S3TO) thatObject;
+ final S3TO thatS3TO = (S3TO)thatObject;
- if (httpsFlag != null ? !httpsFlag.equals(thatS3TO.httpsFlag)
- : thatS3TO.httpsFlag != null) {
+ if (httpsFlag != null ? !httpsFlag.equals(thatS3TO.httpsFlag) : thatS3TO.httpsFlag != null) {
return false;
}
- if (accessKey != null ? !accessKey.equals(thatS3TO.accessKey)
- : thatS3TO.accessKey != null) {
+ if (accessKey != null ? !accessKey.equals(thatS3TO.accessKey) : thatS3TO.accessKey != null) {
return false;
}
- if (connectionTimeout != null ? !connectionTimeout
- .equals(thatS3TO.connectionTimeout)
- : thatS3TO.connectionTimeout != null) {
+ if (connectionTimeout != null ? !connectionTimeout.equals(thatS3TO.connectionTimeout) : thatS3TO.connectionTimeout != null) {
return false;
}
- if (endPoint != null ? !endPoint.equals(thatS3TO.endPoint)
- : thatS3TO.endPoint != null) {
+ if (endPoint != null ? !endPoint.equals(thatS3TO.endPoint) : thatS3TO.endPoint != null) {
return false;
}
@@ -112,30 +104,23 @@ public final class S3TO implements S3Utils.ClientOptions, DataStoreTO {
return false;
}
- if (maxErrorRetry != null ? !maxErrorRetry
- .equals(thatS3TO.maxErrorRetry)
- : thatS3TO.maxErrorRetry != null) {
+ if (maxErrorRetry != null ? !maxErrorRetry.equals(thatS3TO.maxErrorRetry) : thatS3TO.maxErrorRetry != null) {
return false;
}
- if (secretKey != null ? !secretKey.equals(thatS3TO.secretKey)
- : thatS3TO.secretKey != null) {
+ if (secretKey != null ? !secretKey.equals(thatS3TO.secretKey) : thatS3TO.secretKey != null) {
return false;
}
- if (socketTimeout != null ? !socketTimeout
- .equals(thatS3TO.socketTimeout)
- : thatS3TO.socketTimeout != null) {
+ if (socketTimeout != null ? !socketTimeout.equals(thatS3TO.socketTimeout) : thatS3TO.socketTimeout != null) {
return false;
}
- if (bucketName != null ? !bucketName.equals(thatS3TO.bucketName)
- : thatS3TO.bucketName != null) {
+ if (bucketName != null ? !bucketName.equals(thatS3TO.bucketName) : thatS3TO.bucketName != null) {
return false;
}
- if (created != null ? !created.equals(thatS3TO.created)
- : thatS3TO.created != null) {
+ if (created != null ? !created.equals(thatS3TO.created) : thatS3TO.created != null) {
return false;
}
@@ -157,13 +142,9 @@ public final class S3TO implements S3Utils.ClientOptions, DataStoreTO {
result = 31 * result + (endPoint != null ? endPoint.hashCode() : 0);
result = 31 * result + (bucketName != null ? bucketName.hashCode() : 0);
result = 31 * result + (httpsFlag ? 1 : 0);
- result = 31
- * result
- + (connectionTimeout != null ? connectionTimeout.hashCode() : 0);
- result = 31 * result
- + (maxErrorRetry != null ? maxErrorRetry.hashCode() : 0);
- result = 31 * result
- + (socketTimeout != null ? socketTimeout.hashCode() : 0);
+ result = 31 * result + (connectionTimeout != null ? connectionTimeout.hashCode() : 0);
+ result = 31 * result + (maxErrorRetry != null ? maxErrorRetry.hashCode() : 0);
+ result = 31 * result + (socketTimeout != null ? socketTimeout.hashCode() : 0);
return result;
@@ -274,7 +255,6 @@ public final class S3TO implements S3Utils.ClientOptions, DataStoreTO {
return DataStoreRole.Image;
}
-
public boolean getEnableRRS() {
return enableRRS;
}
@@ -291,20 +271,20 @@ public final class S3TO implements S3Utils.ClientOptions, DataStoreTO {
this.maxSingleUploadSizeInBytes = maxSingleUploadSizeInBytes;
}
- public boolean getSingleUpload(long objSize){
- if ( maxSingleUploadSizeInBytes < 0 ){
+ public boolean getSingleUpload(long objSize) {
+ if (maxSingleUploadSizeInBytes < 0) {
// always use single part upload
return true;
- } else if ( maxSingleUploadSizeInBytes == 0 ){
+ } else if (maxSingleUploadSizeInBytes == 0) {
// always use multi part upload
return false;
} else {
// check object size to set flag
- if (objSize < maxSingleUploadSizeInBytes){
+ if (objSize < maxSingleUploadSizeInBytes) {
return true;
- } else{
+ } else {
return false;
}
- }
+ }
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/StaticNatRuleTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/StaticNatRuleTO.java b/api/src/com/cloud/agent/api/to/StaticNatRuleTO.java
index 64ca266..8064c30 100644
--- a/api/src/com/cloud/agent/api/to/StaticNatRuleTO.java
+++ b/api/src/com/cloud/agent/api/to/StaticNatRuleTO.java
@@ -26,30 +26,52 @@ import com.cloud.network.rules.StaticNatRule;
*
*/
-public class StaticNatRuleTO extends FirewallRuleTO{
+public class StaticNatRuleTO extends FirewallRuleTO {
String dstIp;
protected StaticNatRuleTO() {
}
public StaticNatRuleTO(StaticNatRule rule, String srcVlanTag, String srcIp, String dstIp) {
- super(rule.getId(),srcVlanTag, srcIp, rule.getProtocol(), rule.getSourcePortStart(), rule.getSourcePortEnd(),rule.getState()==State.Revoke, rule.getState()==State.Active, rule.getPurpose(), null,0,0);
+ super(rule.getId(),
+ srcVlanTag,
+ srcIp,
+ rule.getProtocol(),
+ rule.getSourcePortStart(),
+ rule.getSourcePortEnd(),
+ rule.getState() == State.Revoke,
+ rule.getState() == State.Active,
+ rule.getPurpose(),
+ null,
+ 0,
+ 0);
this.dstIp = dstIp;
}
public StaticNatRuleTO(StaticNatRule rule, String scrIp, String dstIp) {
- super(rule.getId(), scrIp, rule.getProtocol(), rule.getSourcePortStart(), rule.getSourcePortEnd(),rule.getState()==State.Revoke, rule.getState()==State.Active, rule.getPurpose(), null,0,0);
+ super(rule.getId(),
+ scrIp,
+ rule.getProtocol(),
+ rule.getSourcePortStart(),
+ rule.getSourcePortEnd(),
+ rule.getState() == State.Revoke,
+ rule.getState() == State.Active,
+ rule.getPurpose(),
+ null,
+ 0,
+ 0);
this.dstIp = dstIp;
}
-
- public StaticNatRuleTO(long id, String srcIp, Integer srcPortStart, Integer srcPortEnd, String dstIp, Integer dstPortStart, Integer dstPortEnd, String protocol, boolean revoked, boolean alreadyAdded) {
- super(id, srcIp, protocol, srcPortStart, srcPortEnd, revoked, alreadyAdded, FirewallRule.Purpose.StaticNat, null,0,0);
+ public StaticNatRuleTO(long id, String srcIp, Integer srcPortStart, Integer srcPortEnd, String dstIp, Integer dstPortStart, Integer dstPortEnd, String protocol,
+ boolean revoked, boolean alreadyAdded) {
+ super(id, srcIp, protocol, srcPortStart, srcPortEnd, revoked, alreadyAdded, FirewallRule.Purpose.StaticNat, null, 0, 0);
this.dstIp = dstIp;
}
-
- public StaticNatRuleTO(long id,String srcVlanTag, String srcIp, Integer srcPortStart, Integer srcPortEnd, String dstIp, Integer dstPortStart, Integer dstPortEnd, String protocol, boolean revoked, boolean alreadyAdded) {
- super(id, srcVlanTag, srcIp, protocol, srcPortStart, srcPortEnd, revoked, alreadyAdded, FirewallRule.Purpose.StaticNat, null,0,0);
+
+ public StaticNatRuleTO(long id, String srcVlanTag, String srcIp, Integer srcPortStart, Integer srcPortEnd, String dstIp, Integer dstPortStart, Integer dstPortEnd,
+ String protocol, boolean revoked, boolean alreadyAdded) {
+ super(id, srcVlanTag, srcIp, protocol, srcPortStart, srcPortEnd, revoked, alreadyAdded, FirewallRule.Purpose.StaticNat, null, 0, 0);
this.dstIp = dstIp;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/SwiftTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/SwiftTO.java b/api/src/com/cloud/agent/api/to/SwiftTO.java
index 3ad131a..5823192 100644
--- a/api/src/com/cloud/agent/api/to/SwiftTO.java
+++ b/api/src/com/cloud/agent/api/to/SwiftTO.java
@@ -27,7 +27,8 @@ public class SwiftTO implements DataStoreTO, SwiftUtil.SwiftClientCfg {
String userName;
String key;
- public SwiftTO() { }
+ public SwiftTO() {
+ }
public SwiftTO(Long id, String url, String account, String userName, String key) {
this.id = id;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/VirtualMachineTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/VirtualMachineTO.java b/api/src/com/cloud/agent/api/to/VirtualMachineTO.java
index e6240ff..4b5b35c 100644
--- a/api/src/com/cloud/agent/api/to/VirtualMachineTO.java
+++ b/api/src/com/cloud/agent/api/to/VirtualMachineTO.java
@@ -61,7 +61,8 @@ public class VirtualMachineTO {
DiskTO[] disks;
NicTO[] nics;
- public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer speed, long minRam, long maxRam, BootloaderType bootloader, String os, boolean enableHA, boolean limitCpuUse, String vncPassword) {
+ public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer speed, long minRam, long maxRam, BootloaderType bootloader, String os,
+ boolean enableHA, boolean limitCpuUse, String vncPassword) {
this.id = id;
this.name = instanceName;
this.type = type;
@@ -76,7 +77,8 @@ public class VirtualMachineTO {
this.vncPassword = vncPassword;
}
- public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer minSpeed, Integer maxSpeed, long minRam, long maxRam, BootloaderType bootloader, String os, boolean enableHA, boolean limitCpuUse, String vncPassword) {
+ public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer minSpeed, Integer maxSpeed, long minRam, long maxRam,
+ BootloaderType bootloader, String os, boolean enableHA, boolean limitCpuUse, String vncPassword) {
this.id = id;
this.name = instanceName;
this.type = type;
@@ -150,8 +152,9 @@ public class VirtualMachineTO {
public Integer getMaxSpeed() {
return maxSpeed;
}
+
public boolean getLimitCpuUse() {
- return limitCpuUse;
+ return limitCpuUse;
}
public long getMinRam() {
@@ -232,11 +235,11 @@ public class VirtualMachineTO {
}
public String getVncPassword() {
- return this.vncPassword;
+ return this.vncPassword;
}
public void setVncPassword(String vncPassword) {
- this.vncPassword = vncPassword;
+ this.vncPassword = vncPassword;
}
public String getVncAddr() {
@@ -248,11 +251,11 @@ public class VirtualMachineTO {
}
public Map<String, String> getDetails() {
- return params;
+ return params;
}
public void setDetails(Map<String, String> params) {
- this.params = params;
+ this.params = params;
}
public String getUuid() {
@@ -263,5 +266,4 @@ public class VirtualMachineTO {
this.uuid = uuid;
}
-
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/api/to/VolumeTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/VolumeTO.java b/api/src/com/cloud/agent/api/to/VolumeTO.java
index fb08384..b2df439 100644
--- a/api/src/com/cloud/agent/api/to/VolumeTO.java
+++ b/api/src/com/cloud/agent/api/to/VolumeTO.java
@@ -55,7 +55,8 @@ public class VolumeTO implements InternalIdentity {
this.chainInfo = chainInfo;
}
- public VolumeTO(long id, Volume.Type type, StoragePoolType poolType, String poolUuid, String name, String mountPoint, String path, long size, String chainInfo, String guestOsType) {
+ public VolumeTO(long id, Volume.Type type, StoragePoolType poolType, String poolUuid, String name, String mountPoint, String path, long size, String chainInfo,
+ String guestOsType) {
this.id = id;
this.name = name;
this.path = path;
@@ -126,16 +127,16 @@ public class VolumeTO implements InternalIdentity {
public String getChainInfo() {
return chainInfo;
}
-
+
public void setChainInfo(String chainInfo) {
- this.chainInfo = chainInfo;
+ this.chainInfo = chainInfo;
}
public String getOsType() {
return guestOsType;
}
-
- public void setPath(String path){
+
+ public void setPath(String path) {
this.path = path;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/manager/allocator/HostAllocator.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/manager/allocator/HostAllocator.java b/api/src/com/cloud/agent/manager/allocator/HostAllocator.java
index f21455e..9827425 100755
--- a/api/src/com/cloud/agent/manager/allocator/HostAllocator.java
+++ b/api/src/com/cloud/agent/manager/allocator/HostAllocator.java
@@ -29,25 +29,25 @@ import com.cloud.vm.VirtualMachineProfile;
public interface HostAllocator extends Adapter {
- /**
- * @param UserVm vm
- * @param ServiceOffering offering
- **/
- boolean isVirtualMachineUpgradable(final VirtualMachine vm, final ServiceOffering offering);
+ /**
+ * @param UserVm vm
+ * @param ServiceOffering offering
+ **/
+ boolean isVirtualMachineUpgradable(final VirtualMachine vm, final ServiceOffering offering);
- /**
- * Determines which physical hosts are suitable to
- * allocate the guest virtual machines on
- *
- * @param VirtualMachineProfile vmProfile
- * @param DeploymentPlan plan
- * @param GuestType type
- * @param ExcludeList avoid
- * @param int returnUpTo (use -1 to return all possible hosts)
- * @return List<Host> List of hosts that are suitable for VM allocation
- **/
+ /**
+ * Determines which physical hosts are suitable to
+ * allocate the guest virtual machines on
+ *
+ * @param VirtualMachineProfile vmProfile
+ * @param DeploymentPlan plan
+ * @param GuestType type
+ * @param ExcludeList avoid
+ * @param int returnUpTo (use -1 to return all possible hosts)
+ * @return List<Host> List of hosts that are suitable for VM allocation
+ **/
- public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo);
+ public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo);
/**
* Determines which physical hosts are suitable to allocate the guest
@@ -99,9 +99,9 @@ public interface HostAllocator extends Adapter {
* capacity)
* @return List<Host> List of hosts that are suitable for VM allocation
**/
- public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, List<? extends Host> hosts,
- int returnUpTo, boolean considerReservedCapacity);
+ public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, List<? extends Host> hosts, int returnUpTo,
+ boolean considerReservedCapacity);
- public static int RETURN_UPTO_ALL = -1;
+ public static int RETURN_UPTO_ALL = -1;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/agent/manager/allocator/PodAllocator.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/manager/allocator/PodAllocator.java b/api/src/com/cloud/agent/manager/allocator/PodAllocator.java
index 44cf640..0df2710 100755
--- a/api/src/com/cloud/agent/manager/allocator/PodAllocator.java
+++ b/api/src/com/cloud/agent/manager/allocator/PodAllocator.java
@@ -28,6 +28,6 @@ import com.cloud.vm.VirtualMachineProfile;
public interface PodAllocator extends Adapter {
Pair<Pod, Long> allocateTo(VirtualMachineTemplate template, ServiceOffering offering, DataCenter dc, long userId, Set<Long> avoids);
-
+
Pod allocateTo(VirtualMachineProfile vm, DataCenter dc, Set<? extends Pod> avoids);
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/alert/Alert.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/alert/Alert.java b/api/src/com/cloud/alert/Alert.java
index 31768cf..d835bf8 100644
--- a/api/src/com/cloud/alert/Alert.java
+++ b/api/src/com/cloud/alert/Alert.java
@@ -23,12 +23,20 @@ import org.apache.cloudstack.api.InternalIdentity;
public interface Alert extends Identity, InternalIdentity {
short getType();
+
String getSubject();
+
Long getPodId();
+
long getDataCenterId();
+
int getSentCount();
+
Date getCreatedDate();
+
Date getLastSent();
+
Date getResolved();
+
boolean getArchived();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java b/api/src/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java
index 3efd4c5..d34c09c 100644
--- a/api/src/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java
+++ b/api/src/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java
@@ -35,10 +35,10 @@ public class ListRecurringSnapshotScheduleCmd extends BaseListCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
- @Parameter(name=ApiConstants.SNAPSHOT_POLICY_ID, type=CommandType.LONG, description="lists recurring snapshots by snapshot policy ID")
+ @Parameter(name = ApiConstants.SNAPSHOT_POLICY_ID, type = CommandType.LONG, description = "lists recurring snapshots by snapshot policy ID")
private Long snapshotPolicyId;
- @Parameter(name=ApiConstants.VOLUME_ID, type=CommandType.LONG, required=true, description="list recurring snapshots by volume ID")
+ @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.LONG, required = true, description = "list recurring snapshots by volume ID")
private Long volumeId;
/////////////////////////////////////////////////////
@@ -63,7 +63,7 @@ public class ListRecurringSnapshotScheduleCmd extends BaseListCmd {
}
@Override
- public void execute(){
+ public void execute() {
List<? extends SnapshotSchedule> snapshotSchedules = _snapshotService.findRecurringSnapshotSchedule(this);
ListResponse<SnapshotScheduleResponse> response = new ListResponse<SnapshotScheduleResponse>();
List<SnapshotScheduleResponse> snapshotScheduleResponses = new ArrayList<SnapshotScheduleResponse>();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/capacity/CapacityState.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/capacity/CapacityState.java b/api/src/com/cloud/capacity/CapacityState.java
index b368567..040f8c3 100755
--- a/api/src/com/cloud/capacity/CapacityState.java
+++ b/api/src/com/cloud/capacity/CapacityState.java
@@ -18,8 +18,6 @@ package com.cloud.capacity;
public enum CapacityState {
- Enabled,
- Disabled,
- Maintenance,
+ Enabled, Disabled, Maintenance,
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/configuration/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/configuration/ConfigurationService.java b/api/src/com/cloud/configuration/ConfigurationService.java
index d3dc90c..32f2247 100644
--- a/api/src/com/cloud/configuration/ConfigurationService.java
+++ b/api/src/com/cloud/configuration/ConfigurationService.java
@@ -226,7 +226,8 @@ public interface ConfigurationService {
* @throws
* @return The new Vlan object
*/
- Vlan createVlanAndPublicIpRange(CreateVlanIpRangeCmd cmd) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, ResourceAllocationException;
+ Vlan createVlanAndPublicIpRange(CreateVlanIpRangeCmd cmd) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException,
+ ResourceAllocationException;
/**
* Marks the the account with the default zone-id.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/dc/DataCenter.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/dc/DataCenter.java b/api/src/com/cloud/dc/DataCenter.java
index 5f32988..4ee95e6 100644
--- a/api/src/com/cloud/dc/DataCenter.java
+++ b/api/src/com/cloud/dc/DataCenter.java
@@ -29,8 +29,7 @@ import com.cloud.org.Grouping;
*/
public interface DataCenter extends InfrastructureEntity, Grouping, Identity, InternalIdentity {
public enum NetworkType {
- Basic,
- Advanced,
+ Basic, Advanced,
}
String getDns1();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/dc/DedicatedResources.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/dc/DedicatedResources.java b/api/src/com/cloud/dc/DedicatedResources.java
index b3aea50..ed351fd 100755
--- a/api/src/com/cloud/dc/DedicatedResources.java
+++ b/api/src/com/cloud/dc/DedicatedResources.java
@@ -20,14 +20,22 @@ import org.apache.cloudstack.acl.InfrastructureEntity;
import org.apache.cloudstack.api.Identity;
import org.apache.cloudstack.api.InternalIdentity;
-public interface DedicatedResources extends InfrastructureEntity, InternalIdentity, Identity{
+public interface DedicatedResources extends InfrastructureEntity, InternalIdentity, Identity {
long getId();
+
Long getDataCenterId();
+
Long getPodId();
+
Long getClusterId();
+
Long getHostId();
+
Long getDomainId();
+
Long getAccountId();
+
String getUuid();
+
long getAffinityGroupId();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/dc/Vlan.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/dc/Vlan.java b/api/src/com/cloud/dc/Vlan.java
index 790195f..ac9acda 100644
--- a/api/src/com/cloud/dc/Vlan.java
+++ b/api/src/com/cloud/dc/Vlan.java
@@ -22,8 +22,7 @@ import org.apache.cloudstack.api.InternalIdentity;
public interface Vlan extends InfrastructureEntity, InternalIdentity, Identity {
public enum VlanType {
- DirectAttached,
- VirtualNetwork
+ DirectAttached, VirtualNetwork
}
public final static String UNTAGGED = "untagged";
@@ -44,9 +43,9 @@ public interface Vlan extends InfrastructureEntity, InternalIdentity, Identity {
public Long getPhysicalNetworkId();
- public String getIp6Gateway();
+ public String getIp6Gateway();
- public String getIp6Cidr();
+ public String getIp6Cidr();
- public String getIp6Range();
+ public String getIp6Range();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/deploy/DeployDestination.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/deploy/DeployDestination.java b/api/src/com/cloud/deploy/DeployDestination.java
index e00d3c6..05625d6 100644
--- a/api/src/com/cloud/deploy/DeployDestination.java
+++ b/api/src/com/cloud/deploy/DeployDestination.java
@@ -75,7 +75,7 @@ public class DeployDestination {
@Override
public boolean equals(Object obj) {
- DeployDestination that = (DeployDestination) obj;
+ DeployDestination that = (DeployDestination)obj;
if (this._dc == null || that._dc == null) {
return false;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/deploy/DeploymentClusterPlanner.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/deploy/DeploymentClusterPlanner.java b/api/src/com/cloud/deploy/DeploymentClusterPlanner.java
index b478223..a9fdb79 100644
--- a/api/src/com/cloud/deploy/DeploymentClusterPlanner.java
+++ b/api/src/com/cloud/deploy/DeploymentClusterPlanner.java
@@ -29,10 +29,20 @@ public interface DeploymentClusterPlanner extends DeploymentPlanner {
static final String ClusterCPUCapacityDisableThresholdCK = "cluster.cpu.allocated.capacity.disablethreshold";
static final String ClusterMemoryCapacityDisableThresholdCK = "cluster.memory.allocated.capacity.disablethreshold";
- static final ConfigKey<Float> ClusterCPUCapacityDisableThreshold = new ConfigKey<Float>(Float.class, ClusterCPUCapacityDisableThresholdCK, "Alert", "0.85",
- "Percentage (as a value between 0 and 1) of cpu utilization above which allocators will disable using the cluster for low cpu available. Keep the corresponding notification threshold lower than this to be notified beforehand.", true, ConfigKey.Scope.Cluster, null);
- static final ConfigKey<Float> ClusterMemoryCapacityDisableThreshold = new ConfigKey<Float>(Float.class, ClusterMemoryCapacityDisableThresholdCK, "Alert", "0.85",
- "Percentage (as a value between 0 and 1) of memory utilization above which allocators will disable using the cluster for low memory available. Keep the corresponding notification threshold lower than this to be notified beforehand.", true, ConfigKey.Scope.Cluster, null);
+ static final ConfigKey<Float> ClusterCPUCapacityDisableThreshold = new ConfigKey<Float>(
+ Float.class,
+ ClusterCPUCapacityDisableThresholdCK,
+ "Alert",
+ "0.85",
+ "Percentage (as a value between 0 and 1) of cpu utilization above which allocators will disable using the cluster for low cpu available. Keep the corresponding notification threshold lower than this to be notified beforehand.",
+ true, ConfigKey.Scope.Cluster, null);
+ static final ConfigKey<Float> ClusterMemoryCapacityDisableThreshold = new ConfigKey<Float>(
+ Float.class,
+ ClusterMemoryCapacityDisableThresholdCK,
+ "Alert",
+ "0.85",
+ "Percentage (as a value between 0 and 1) of memory utilization above which allocators will disable using the cluster for low memory available. Keep the corresponding notification threshold lower than this to be notified beforehand.",
+ true, ConfigKey.Scope.Cluster, null);
/**
* This is called to determine list of possible clusters where a virtual
@@ -46,10 +56,8 @@ public interface DeploymentClusterPlanner extends DeploymentPlanner {
* avoid these data centers, pods, clusters, or hosts.
* @return DeployDestination for that virtual machine.
*/
- List<Long> orderClusters(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid)
- throws InsufficientServerCapacityException;
+ List<Long> orderClusters(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid) throws InsufficientServerCapacityException;
- PlannerResourceUsage getResourceUsage(VirtualMachineProfile vmProfile,
- DeploymentPlan plan, ExcludeList avoid) throws InsufficientServerCapacityException;
+ PlannerResourceUsage getResourceUsage(VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid) throws InsufficientServerCapacityException;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/deploy/DeploymentPlanner.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/deploy/DeploymentPlanner.java b/api/src/com/cloud/deploy/DeploymentPlanner.java
index 88cfc74..6916a5b 100644
--- a/api/src/com/cloud/deploy/DeploymentPlanner.java
+++ b/api/src/com/cloud/deploy/DeploymentPlanner.java
@@ -82,11 +82,7 @@ public interface DeploymentPlanner extends Adapter {
boolean canHandle(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid);
public enum AllocationAlgorithm {
- random,
- firstfit,
- userdispersing,
- userconcentratedpod_random,
- userconcentratedpod_firstfit;
+ random, firstfit, userdispersing, userconcentratedpod_random, userconcentratedpod_firstfit;
}
public enum PlannerResourceUsage {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/domain/Domain.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/domain/Domain.java b/api/src/com/cloud/domain/Domain.java
index befed07..612ecd6 100644
--- a/api/src/com/cloud/domain/Domain.java
+++ b/api/src/com/cloud/domain/Domain.java
@@ -59,7 +59,7 @@ public interface Domain extends OwnedBy, Identity, InternalIdentity {
void setState(State state);
String getNetworkDomain();
-
+
public String getUuid();
-
+
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/event/ActionEvent.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/event/ActionEvent.java b/api/src/com/cloud/event/ActionEvent.java
index bef4f50..8fe14dd 100644
--- a/api/src/com/cloud/event/ActionEvent.java
+++ b/api/src/com/cloud/event/ActionEvent.java
@@ -23,7 +23,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-@Target({ TYPE, METHOD })
+@Target({TYPE, METHOD})
@Retention(RUNTIME)
public @interface ActionEvent {
boolean create() default false;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/event/ActionEvents.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/event/ActionEvents.java b/api/src/com/cloud/event/ActionEvents.java
index 9560920..db535b6 100644
--- a/api/src/com/cloud/event/ActionEvents.java
+++ b/api/src/com/cloud/event/ActionEvents.java
@@ -24,7 +24,7 @@ import static java.lang.annotation.RetentionPolicy.*;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-@Target({ TYPE, METHOD })
+@Target({TYPE, METHOD})
@Retention(RUNTIME)
public @interface ActionEvents {
ActionEvent[] value();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/event/Event.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/event/Event.java b/api/src/com/cloud/event/Event.java
index b8def4c..bd86a7f 100644
--- a/api/src/com/cloud/event/Event.java
+++ b/api/src/com/cloud/event/Event.java
@@ -24,21 +24,26 @@ import org.apache.cloudstack.api.InternalIdentity;
public interface Event extends ControlledEntity, Identity, InternalIdentity {
public enum State {
- Created,
- Scheduled,
- Started,
- Completed;
+ Created, Scheduled, Started, Completed;
}
String getType();
+
State getState();
String getDescription();
+
Date getCreateDate();
+
long getUserId();
+
int getTotalSize();
+
String getLevel();
+
long getStartId();
+
String getParameters();
+
boolean getArchived();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/event/EventCategory.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/event/EventCategory.java b/api/src/com/cloud/event/EventCategory.java
index 47a1cf1..891a1c5 100644
--- a/api/src/com/cloud/event/EventCategory.java
+++ b/api/src/com/cloud/event/EventCategory.java
@@ -26,7 +26,7 @@ public class EventCategory {
private static List<EventCategory> eventCategories = new ArrayList<EventCategory>();
private String eventCategoryName;
- public EventCategory(String categoryName) {
+ public EventCategory(String categoryName) {
this.eventCategoryName = categoryName;
eventCategories.add(this);
}
@@ -49,8 +49,8 @@ public class EventCategory {
}
public static final EventCategory ACTION_EVENT = new EventCategory("ActionEvent");
- public static final EventCategory ALERT_EVENT = new EventCategory("AlertEvent");
- public static final EventCategory USAGE_EVENT = new EventCategory("UsageEvent");
+ public static final EventCategory ALERT_EVENT = new EventCategory("AlertEvent");
+ public static final EventCategory USAGE_EVENT = new EventCategory("UsageEvent");
public static final EventCategory RESOURCE_STATE_CHANGE_EVENT = new EventCategory("ResourceStateEvent");
public static final EventCategory ASYNC_JOB_CHANGE_EVENT = new EventCategory("AsyncJobEvent");
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/event/EventTypes.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/event/EventTypes.java b/api/src/com/cloud/event/EventTypes.java
index a3e45fa..0554d7a 100755
--- a/api/src/com/cloud/event/EventTypes.java
+++ b/api/src/com/cloud/event/EventTypes.java
@@ -95,7 +95,6 @@ public class EventTypes {
public static final String EVENT_PROXY_REBOOT = "PROXY.REBOOT";
public static final String EVENT_PROXY_HA = "PROXY.HA";
-
// VNC Console Events
public static final String EVENT_VNC_CONNECT = "VNC.CONNECT";
public static final String EVENT_VNC_DISCONNECT = "VNC.DISCONNECT";
@@ -122,7 +121,6 @@ public class EventTypes {
public static final String EVENT_NIC_DETAIL_UPDATE = "NIC.DETAIL.UPDATE";
public static final String EVENT_NIC_DETAIL_REMOVE = "NIC.DETAIL.REMOVE";
-
// Load Balancers
public static final String EVENT_ASSIGN_TO_LOAD_BALANCER_RULE = "LB.ASSIGN.TO.RULE";
public static final String EVENT_REMOVE_FROM_LOAD_BALANCER_RULE = "LB.REMOVE.FROM.RULE";
@@ -195,7 +193,6 @@ public class EventTypes {
public static final String EVENT_VOLUME_DETAIL_REMOVE = "VOLUME.DETAIL.REMOVE";
public static final String EVENT_VOLUME_UPDATE = "VOLUME.UPDATE";
-
// Domains
public static final String EVENT_DOMAIN_CREATE = "DOMAIN.CREATE";
public static final String EVENT_DOMAIN_DELETE = "DOMAIN.DELETE";
@@ -353,7 +350,6 @@ public class EventTypes {
public static final String EVENT_EXTERNAL_SWITCH_MGMT_DEVICE_ENABLE = "SWITCH.MGMT.ENABLE";
public static final String EVENT_EXTERNAL_SWITCH_MGMT_DEVICE_DISABLE = "SWITCH.MGMT.DISABLE";
-
public static final String EVENT_EXTERNAL_FIREWALL_DEVICE_ADD = "PHYSICAL.FIREWALL.ADD";
public static final String EVENT_EXTERNAL_FIREWALL_DEVICE_DELETE = "PHYSICAL.FIREWALL.DELETE";
public static final String EVENT_EXTERNAL_FIREWALL_DEVICE_CONFIGURE = "PHYSICAL.FIREWALL.CONFIGURE";
@@ -420,7 +416,6 @@ public class EventTypes {
public static final String EVENT_AUTOSCALEVMGROUP_ENABLE = "AUTOSCALEVMGROUP.ENABLE";
public static final String EVENT_AUTOSCALEVMGROUP_DISABLE = "AUTOSCALEVMGROUP.DISABLE";
-
public static final String EVENT_BAREMETAL_DHCP_SERVER_ADD = "PHYSICAL.DHCP.ADD";
public static final String EVENT_BAREMETAL_DHCP_SERVER_DELETE = "PHYSICAL.DHCP.DELETE";
public static final String EVENT_BAREMETAL_PXE_SERVER_ADD = "PHYSICAL.PXE.ADD";
@@ -437,9 +432,8 @@ public class EventTypes {
public static final String EVENT_HOST_RESERVATION_RELEASE = "HOST.RESERVATION.RELEASE";
// Dedicated guest vlan range
- public static final String EVENT_GUEST_VLAN_RANGE_DEDICATE = "GUESTVLANRANGE.DEDICATE";
- public static final String EVENT_DEDICATED_GUEST_VLAN_RANGE_RELEASE = "GUESTVLANRANGE.RELEASE";
-
+ public static final String EVENT_GUEST_VLAN_RANGE_DEDICATE = "GUESTVLANRANGE.DEDICATE";
+ public static final String EVENT_DEDICATED_GUEST_VLAN_RANGE_RELEASE = "GUESTVLANRANGE.RELEASE";
public static final String EVENT_PORTABLE_IP_RANGE_CREATE = "PORTABLE.IP.RANGE.CREATE";
public static final String EVENT_PORTABLE_IP_RANGE_DELETE = "PORTABLE.IP.RANGE.DELETE";
@@ -616,9 +610,9 @@ public class EventTypes {
// VLANs/IP ranges
entityEventDetails.put(EVENT_VLAN_IP_RANGE_CREATE, Vlan.class.getName());
- entityEventDetails.put(EVENT_VLAN_IP_RANGE_DELETE,Vlan.class.getName());
+ entityEventDetails.put(EVENT_VLAN_IP_RANGE_DELETE, Vlan.class.getName());
entityEventDetails.put(EVENT_VLAN_IP_RANGE_DEDICATE, Vlan.class.getName());
- entityEventDetails.put(EVENT_VLAN_IP_RANGE_RELEASE,Vlan.class.getName());
+ entityEventDetails.put(EVENT_VLAN_IP_RANGE_RELEASE, Vlan.class.getName());
entityEventDetails.put(EVENT_STORAGE_IP_RANGE_CREATE, StorageNetworkIpRange.class.getName());
entityEventDetails.put(EVENT_STORAGE_IP_RANGE_DELETE, StorageNetworkIpRange.class.getName());
@@ -638,13 +632,13 @@ public class EventTypes {
entityEventDetails.put(EVENT_SECURITY_GROUP_REMOVE, SecurityGroup.class.getName());
// Host
- entityEventDetails.put(EVENT_HOST_RECONNECT, Host.class.getName());
+ entityEventDetails.put(EVENT_HOST_RECONNECT, Host.class.getName());
// Maintenance
- entityEventDetails.put(EVENT_MAINTENANCE_CANCEL, Host.class.getName());
- entityEventDetails.put(EVENT_MAINTENANCE_CANCEL_PRIMARY_STORAGE, Host.class.getName());
- entityEventDetails.put(EVENT_MAINTENANCE_PREPARE, Host.class.getName());
- entityEventDetails.put(EVENT_MAINTENANCE_PREPARE_PRIMARY_STORAGE, Host.class.getName());
+ entityEventDetails.put(EVENT_MAINTENANCE_CANCEL, Host.class.getName());
+ entityEventDetails.put(EVENT_MAINTENANCE_CANCEL_PRIMARY_STORAGE, Host.class.getName());
+ entityEventDetails.put(EVENT_MAINTENANCE_PREPARE, Host.class.getName());
+ entityEventDetails.put(EVENT_MAINTENANCE_PREPARE_PRIMARY_STORAGE, Host.class.getName());
// VPN
entityEventDetails.put(EVENT_REMOTE_ACCESS_VPN_CREATE, RemoteAccessVpn.class.getName());
@@ -667,8 +661,8 @@ public class EventTypes {
entityEventDetails.put(EVENT_ENABLE_STATIC_NAT, StaticNat.class.getName());
entityEventDetails.put(EVENT_DISABLE_STATIC_NAT, StaticNat.class.getName());
- entityEventDetails.put(EVENT_ZONE_VLAN_ASSIGN,Vlan.class.getName());
- entityEventDetails.put(EVENT_ZONE_VLAN_RELEASE,Vlan.class.getName());
+ entityEventDetails.put(EVENT_ZONE_VLAN_ASSIGN, Vlan.class.getName());
+ entityEventDetails.put(EVENT_ZONE_VLAN_RELEASE, Vlan.class.getName());
// Projects
entityEventDetails.put(EVENT_PROJECT_CREATE, Project.class.getName());
@@ -682,7 +676,7 @@ public class EventTypes {
entityEventDetails.put(EVENT_PROJECT_ACCOUNT_REMOVE, Project.class.getName());
// Network as a Service
- entityEventDetails.put(EVENT_NETWORK_ELEMENT_CONFIGURE,Network.class.getName());
+ entityEventDetails.put(EVENT_NETWORK_ELEMENT_CONFIGURE, Network.class.getName());
// Physical Network Events
entityEventDetails.put(EVENT_PHYSICAL_NETWORK_CREATE, PhysicalNetwork.class.getName());
@@ -711,7 +705,6 @@ public class EventTypes {
entityEventDetails.put(EVENT_EXTERNAL_SWITCH_MGMT_DEVICE_ENABLE, "Nexus1000v");
entityEventDetails.put(EVENT_EXTERNAL_SWITCH_MGMT_DEVICE_DISABLE, "Nexus1000v");
-
entityEventDetails.put(EVENT_EXTERNAL_FIREWALL_DEVICE_ADD, PhysicalNetwork.class.getName());
entityEventDetails.put(EVENT_EXTERNAL_FIREWALL_DEVICE_DELETE, PhysicalNetwork.class.getName());
entityEventDetails.put(EVENT_EXTERNAL_FIREWALL_DEVICE_CONFIGURE, PhysicalNetwork.class.getName());
@@ -740,8 +733,8 @@ public class EventTypes {
entityEventDetails.put(EVENT_TAGS_DELETE, "tag");
// external network device events
- entityEventDetails.put(EVENT_EXTERNAL_NVP_CONTROLLER_ADD, "NvpController");
- entityEventDetails.put(EVENT_EXTERNAL_NVP_CONTROLLER_DELETE, "NvpController");
+ entityEventDetails.put(EVENT_EXTERNAL_NVP_CONTROLLER_ADD, "NvpController");
+ entityEventDetails.put(EVENT_EXTERNAL_NVP_CONTROLLER_DELETE, "NvpController");
entityEventDetails.put(EVENT_EXTERNAL_NVP_CONTROLLER_CONFIGURE, "NvpController");
// AutoScale
@@ -764,7 +757,7 @@ public class EventTypes {
entityEventDetails.put(EVENT_DEDICATED_GUEST_VLAN_RANGE_RELEASE, GuestVlan.class.getName());
}
- public static String getEntityForEvent (String eventName) {
+ public static String getEntityForEvent(String eventName) {
String entityClassName = entityEventDetails.get(eventName);
if (entityClassName == null || entityClassName.isEmpty()) {
return null;
@@ -772,7 +765,7 @@ public class EventTypes {
int index = entityClassName.lastIndexOf(".");
String entityName = entityClassName;
if (index != -1) {
- entityName = entityClassName.substring(index+1);
+ entityName = entityClassName.substring(index + 1);
}
return entityName;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/event/UsageEvent.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/event/UsageEvent.java b/api/src/com/cloud/event/UsageEvent.java
index 0d4ef17..9e0952c 100644
--- a/api/src/com/cloud/event/UsageEvent.java
+++ b/api/src/com/cloud/event/UsageEvent.java
@@ -24,10 +24,16 @@ public interface UsageEvent extends InternalIdentity {
String getType();
Date getCreateDate();
+
long getAccountId();
+
Long getSize();
+
Long getTemplateId();
+
Long getOfferingId();
+
long getResourceId();
+
long getZoneId();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/exception/AgentControlChannelException.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/exception/AgentControlChannelException.java b/api/src/com/cloud/exception/AgentControlChannelException.java
index 50b84d4..ea3cafb 100644
--- a/api/src/com/cloud/exception/AgentControlChannelException.java
+++ b/api/src/com/cloud/exception/AgentControlChannelException.java
@@ -19,9 +19,9 @@ package com.cloud.exception;
import com.cloud.exception.CloudException;
public class AgentControlChannelException extends CloudException {
- private static final long serialVersionUID = -310647782960500466L;
-
- public AgentControlChannelException(String msg) {
- super(msg);
- }
+ private static final long serialVersionUID = -310647782960500466L;
+
+ public AgentControlChannelException(String msg) {
+ super(msg);
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/exception/CloudException.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/exception/CloudException.java b/api/src/com/cloud/exception/CloudException.java
index 0b71ce8..f898719 100644
--- a/api/src/com/cloud/exception/CloudException.java
+++ b/api/src/com/cloud/exception/CloudException.java
@@ -28,42 +28,40 @@ import com.cloud.utils.exception.CSExceptionErrorCode;
public class CloudException extends Exception {
- // This holds a list of uuids and their names. Add uuid:fieldname pairs
- protected ArrayList<String> idList = new ArrayList<String>();
+ // This holds a list of uuids and their names. Add uuid:fieldname pairs
+ protected ArrayList<String> idList = new ArrayList<String>();
- protected Integer csErrorCode;
+ protected Integer csErrorCode;
- public CloudException(String message) {
- super(message);
- setCSErrorCode(CSExceptionErrorCode.getCSErrCode(this.getClass().getName()));
- }
+ public CloudException(String message) {
+ super(message);
+ setCSErrorCode(CSExceptionErrorCode.getCSErrCode(this.getClass().getName()));
+ }
public CloudException(String message, Throwable cause) {
super(message, cause);
setCSErrorCode(CSExceptionErrorCode.getCSErrCode(this.getClass().getName()));
}
+ public CloudException() {
+ super();
+ setCSErrorCode(CSExceptionErrorCode.getCSErrCode(this.getClass().getName()));
+ }
+ public void addProxyObject(String uuid) {
+ idList.add(uuid);
+ return;
+ }
- public CloudException() {
- super();
- setCSErrorCode(CSExceptionErrorCode.getCSErrCode(this.getClass().getName()));
- }
-
- public void addProxyObject(String uuid) {
- idList.add(uuid);
- return;
- }
-
- public ArrayList<String> getIdProxyList() {
- return idList;
- }
+ public ArrayList<String> getIdProxyList() {
+ return idList;
+ }
- public void setCSErrorCode(int cserrcode) {
- this.csErrorCode = cserrcode;
- }
+ public void setCSErrorCode(int cserrcode) {
+ this.csErrorCode = cserrcode;
+ }
- public int getCSErrorCode() {
- return this.csErrorCode;
- }
+ public int getCSErrorCode() {
+ return this.csErrorCode;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/exception/InsufficientCapacityException.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/exception/InsufficientCapacityException.java b/api/src/com/cloud/exception/InsufficientCapacityException.java
index 51a4e59..4065259 100755
--- a/api/src/com/cloud/exception/InsufficientCapacityException.java
+++ b/api/src/com/cloud/exception/InsufficientCapacityException.java
@@ -56,7 +56,8 @@ public abstract class InsufficientCapacityException extends CloudException {
return id;
}
- @Override public String toString() {
+ @Override
+ public String toString() {
String str = super.toString();
return str + "Scope=" + scope + "; id=" + id;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/exception/MissingParameterValueException.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/exception/MissingParameterValueException.java b/api/src/com/cloud/exception/MissingParameterValueException.java
index 231541d..4bcaa56 100644
--- a/api/src/com/cloud/exception/MissingParameterValueException.java
+++ b/api/src/com/cloud/exception/MissingParameterValueException.java
@@ -17,6 +17,7 @@
package com.cloud.exception;
import com.cloud.utils.exception.CloudRuntimeException;
+
public class MissingParameterValueException extends CloudRuntimeException {
public MissingParameterValueException(String message) {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/exception/NetworkRuleConflictException.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/exception/NetworkRuleConflictException.java b/api/src/com/cloud/exception/NetworkRuleConflictException.java
index c988b83..5bcc273 100644
--- a/api/src/com/cloud/exception/NetworkRuleConflictException.java
+++ b/api/src/com/cloud/exception/NetworkRuleConflictException.java
@@ -16,8 +16,7 @@
// under the License.
package com.cloud.exception;
-public class NetworkRuleConflictException extends
- ManagementServerException {
+public class NetworkRuleConflictException extends ManagementServerException {
private static final long serialVersionUID = -294905017911859479L;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/exception/OperationTimedoutException.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/exception/OperationTimedoutException.java b/api/src/com/cloud/exception/OperationTimedoutException.java
index 2eeec37..d531c32 100644
--- a/api/src/com/cloud/exception/OperationTimedoutException.java
+++ b/api/src/com/cloud/exception/OperationTimedoutException.java
@@ -24,13 +24,13 @@ import com.cloud.utils.SerialVersionUID;
*/
public class OperationTimedoutException extends CloudException {
private static final long serialVersionUID = SerialVersionUID.OperationTimedoutException;
-
+
long _agentId;
long _seqId;
int _time;
Command[] _cmds;
boolean _isActive;
-
+
public OperationTimedoutException(Command[] cmds, long agentId, long seqId, int time, boolean isActive) {
super("Commands " + seqId + " to Host " + agentId + " timed out after " + time);
_agentId = agentId;
@@ -39,24 +39,24 @@ public class OperationTimedoutException extends CloudException {
_cmds = cmds;
_isActive = isActive;
}
-
+
public long getAgentId() {
return _agentId;
}
-
+
public long getSequenceId() {
return _seqId;
}
-
+
public int getWaitTime() {
return _time;
}
-
+
public Command[] getCommands() {
return _cmds;
}
-
+
public boolean isActive() {
- return _isActive;
+ return _isActive;
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/exception/PermissionDeniedException.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/exception/PermissionDeniedException.java b/api/src/com/cloud/exception/PermissionDeniedException.java
index 718de0d..b785043 100644
--- a/api/src/com/cloud/exception/PermissionDeniedException.java
+++ b/api/src/com/cloud/exception/PermissionDeniedException.java
@@ -32,7 +32,7 @@ public class PermissionDeniedException extends CloudRuntimeException {
super(message);
}
- public PermissionDeniedException(String message, Throwable cause){
+ public PermissionDeniedException(String message, Throwable cause) {
super(message, cause);
}