Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ public String getName() {
return _name;
}

private void launchConsoleProxy(final byte[] ksBits, final String ksPassword, final String encryptorPassword) {
private void launchConsoleProxy(final Byte[] ksBits, final String ksPassword, final String encryptorPassword) {
final Object resource = this;
if (_consoleProxyMain == null) {
_consoleProxyMain = new Thread(new ManagedContextRunnable() {
Expand Down
6 changes: 3 additions & 3 deletions api/src/com/cloud/agent/api/Answer.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.cloud.utils.exception.ExceptionUtil;

public class Answer extends Command {
protected boolean result;
protected Boolean result = false;
protected String details;

protected Answer() {
Expand All @@ -39,7 +39,7 @@ public Answer(final Command command, final Exception e) {
this(command, false, ExceptionUtil.toString(e));
}

public boolean getResult() {
public Boolean getResult() {
return result;
}

Expand All @@ -48,7 +48,7 @@ public String getDetails() {
}

@Override
public boolean executeInSequence() {
public Boolean executeInSequence() {
return false;
}

Expand Down
6 changes: 3 additions & 3 deletions api/src/com/cloud/agent/api/Command.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ public static enum OnError {
// allow command to carry over hypervisor or other environment related context info
@LogLevel(Log4jLevel.Trace)
protected Map<String, String> contextMap = new HashMap<String, String>();
private int wait; //in second
private Integer wait; //in second

protected Command() {
this.wait = 0;
}

public int getWait() {
public Integer getWait() {
return wait;
}

Expand All @@ -60,7 +60,7 @@ public final String toString() {
* When this is set to true, the commands are executed by a single
* thread on the agent.
*/
public abstract boolean executeInSequence();
public abstract Boolean executeInSequence();

public void setContextParam(String name, String value) {
contextMap.put(name, value);
Expand Down
2 changes: 1 addition & 1 deletion api/src/com/cloud/agent/api/PvlanSetupCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static public PvlanSetupCommand createVmSetup(String op, URI uri, String network
}

@Override
public boolean executeInSequence() {
public Boolean executeInSequence() {
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public CreateVolumeOVACommand(String secUrl, String volPath, String volName, Sto
}

@Override
public boolean executeInSequence() {
public Boolean executeInSequence() {
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public PrepareOVAPackingCommand(String secUrl, String templatePath) {
}

@Override
public boolean executeInSequence() {
public Boolean executeInSequence() {
return true;
}

Expand Down
6 changes: 3 additions & 3 deletions api/src/com/cloud/agent/api/to/DataTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
*/
package com.cloud.agent.api.to;

import org.apache.cloudstack.api.InternalIdentity;

import com.cloud.hypervisor.Hypervisor;

public interface DataTO {
public interface DataTO extends InternalIdentity{
public DataObjectType getObjectType();

public DataStoreTO getDataStore();
Expand All @@ -31,6 +33,4 @@ public interface DataTO {
* @return
*/
String getPath();

long getId();
}
35 changes: 18 additions & 17 deletions api/src/com/cloud/agent/api/to/FirewallRuleTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,32 @@
*
*/
public class FirewallRuleTO implements InternalIdentity {
long id;
private static final long serialVersionUID = 2L;
Long id = 0l;
String srcVlanTag;
String srcIp;
String protocol;
int[] srcPortRange;
boolean revoked;
boolean alreadyAdded;
Integer[] srcPortRange;
Boolean revoked = false;
Boolean alreadyAdded = false;
private List<String> sourceCidrList;
FirewallRule.Purpose purpose;
private Integer icmpType;
private Integer icmpCode;
private FirewallRule.TrafficType trafficType;
private String guestCidr;
private boolean defaultEgressPolicy;
private Boolean defaultEgressPolicy = false;
private FirewallRule.FirewallRuleType type;

protected FirewallRuleTO() {
}

public FirewallRuleTO(long id, String srcIp, String protocol, Integer srcPortStart, Integer srcPortEnd, boolean revoked, boolean alreadyAdded,
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,
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;
Expand All @@ -78,10 +79,10 @@ public FirewallRuleTO(long id, String srcVlanTag, String srcIp, String protocol,
portRange.add(srcPortEnd);
}

srcPortRange = new int[portRange.size()];
srcPortRange = new Integer[portRange.size()];
int i = 0;
for (Integer port : portRange) {
srcPortRange[i] = port.intValue();
srcPortRange[i] = port;
i++;
}
}
Expand Down Expand Up @@ -157,7 +158,7 @@ public FirewallRuleTO(FirewallRule rule, String srcVlanTag, String srcIp, Firewa
}

public FirewallRuleTO(FirewallRule rule, String srcVlanTag, String srcIp, FirewallRule.Purpose purpose, FirewallRule.TrafficType trafficType,
boolean defaultEgressPolicy) {
Boolean defaultEgressPolicy) {
this(rule.getId(),
srcVlanTag,
srcIp,
Expand All @@ -174,7 +175,7 @@ public FirewallRuleTO(FirewallRule rule, String srcVlanTag, String srcIp, Firewa
this.defaultEgressPolicy = defaultEgressPolicy;
}

public FirewallRuleTO(FirewallRule rule, String srcVlanTag, String srcIp, FirewallRule.Purpose purpose, boolean revokeState, boolean alreadyAdded) {
public FirewallRuleTO(FirewallRule rule, String srcVlanTag, String srcIp, FirewallRule.Purpose purpose, Boolean revokeState, Boolean alreadyAdded) {
this(rule.getId(),
srcVlanTag,
srcIp,
Expand All @@ -189,7 +190,7 @@ public FirewallRuleTO(FirewallRule rule, String srcVlanTag, String srcIp, Firewa
rule.getIcmpCode());
}

public FirewallRuleTO(FirewallRule rule, String guestVlanTag, FirewallRule.TrafficType trafficType, String guestCidr, boolean defaultEgressPolicy,
public FirewallRuleTO(FirewallRule rule, String guestVlanTag, FirewallRule.TrafficType trafficType, String guestCidr, Boolean defaultEgressPolicy,
FirewallRule.FirewallRuleType type) {
this(rule.getId(),
guestVlanTag,
Expand All @@ -214,7 +215,7 @@ public FirewallRule.TrafficType getTrafficType() {
}

@Override
public long getId() {
public Long getId() {
return id;
}

Expand All @@ -230,7 +231,7 @@ public String getProtocol() {
return protocol;
}

public int[] getSrcPortRange() {
public Integer[] getSrcPortRange() {
return srcPortRange;
}

Expand All @@ -249,23 +250,23 @@ public String getStringSrcPortRange() {
return NetUtils.portRangeToString(srcPortRange);
}

public boolean revoked() {
public Boolean revoked() {
return revoked;
}

public List<String> getSourceCidrList() {
return sourceCidrList;
}

public boolean isAlreadyAdded() {
public Boolean isAlreadyAdded() {
return alreadyAdded;
}

public FirewallRule.Purpose getPurpose() {
return purpose;
}

public boolean isDefaultEgressPolicy() {
public Boolean isDefaultEgressPolicy() {
return defaultEgressPolicy;
}

Expand Down
34 changes: 17 additions & 17 deletions api/src/com/cloud/agent/api/to/IpAddressTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@

public class IpAddressTO {

private long accountId;
private Long accountId = 0l;
private String publicIp;
private boolean sourceNat;
private boolean add;
private boolean oneToOneNat;
private boolean firstIP;
private Boolean sourceNat = false;
private Boolean add = false;
private Boolean oneToOneNat = false;
private Boolean firstIP = false;
private String broadcastUri;
private String vlanGateway;
private String vlanNetmask;
private String vifMacAddress;
private Integer networkRate;
private TrafficType trafficType;
private String networkName;
private Integer nicDevId;
private boolean newNic;
private Integer nicDevId = 0;
private Boolean newNic = false;

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;
Expand All @@ -54,7 +54,7 @@ public IpAddressTO(long accountId, String ipAddress, boolean add, boolean firstI
protected IpAddressTO() {
}

public long getAccountId() {
public Long getAccountId() {
return accountId;
}

Expand All @@ -78,23 +78,23 @@ public void setTrafficType(TrafficType trafficType) {
this.trafficType = trafficType;
}

public boolean isAdd() {
public Boolean isAdd() {
return add;
}

public boolean isOneToOneNat() {
public Boolean isOneToOneNat() {
return this.oneToOneNat;
}

public boolean isFirstIP() {
public Boolean isFirstIP() {
return firstIP;
}

public void setSourceNat(boolean sourceNat) {
public void setSourceNat(Boolean sourceNat) {
this.sourceNat = sourceNat;
}

public boolean isSourceNat() {
public Boolean isSourceNat() {
return sourceNat;
}

Expand Down Expand Up @@ -126,11 +126,11 @@ public void setNicDevId(Integer nicDevId) {
this.nicDevId = nicDevId;
}

public boolean isNewNic() {
public Boolean isNewNic() {
return newNic;
}

public void setNewNic(boolean newNic) {
public void setNewNic(Boolean newNic) {
this.newNic = newNic;
}
}
Loading