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
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions agent/src/com/cloud/agent/Agent.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public Agent(final IAgentShell shell) {
Runtime.getRuntime().addShutdownHook(new ShutdownThread(this));

_ugentTaskPool =
new ThreadPoolExecutor(shell.getPingRetries(), 2 * shell.getPingRetries(), 10, TimeUnit.MINUTES, new SynchronousQueue<Runnable>(), new NamedThreadFactory(
new ThreadPoolExecutor(_shell.getPingRetries(), 2 * _shell.getPingRetries(), 10, TimeUnit.MINUTES, new SynchronousQueue<Runnable>(), new NamedThreadFactory(
"UgentTask"));

_executor =
Expand All @@ -148,7 +148,7 @@ public Agent(final IAgentShell shell, final int localAgentId, final ServerResour
_resource = resource;
_link = null;

resource.setAgentControl(this);
_resource.setAgentControl(this);

final String value = _shell.getPersistentProperty(getResourceName(), "id");
_id = value != null ? Long.parseLong(value) : null;
Expand All @@ -173,7 +173,7 @@ public Agent(final IAgentShell shell, final int localAgentId, final ServerResour
Runtime.getRuntime().addShutdownHook(new ShutdownThread(this));

_ugentTaskPool =
new ThreadPoolExecutor(shell.getPingRetries(), 2 * shell.getPingRetries(), 10, TimeUnit.MINUTES, new SynchronousQueue<Runnable>(), new NamedThreadFactory(
new ThreadPoolExecutor(_shell.getPingRetries(), 2 * _shell.getPingRetries(), 10, TimeUnit.MINUTES, new SynchronousQueue<Runnable>(), new NamedThreadFactory(
"UgentTask"));

_executor =
Expand Down
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
2 changes: 1 addition & 1 deletion api/src/com/cloud/agent/api/to/DataTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ public interface DataTO {
*/
String getPath();

long getId();
Long getId();
}
34 changes: 17 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,31 @@
*
*/
public class FirewallRuleTO implements InternalIdentity {
long id;
Long id;
String srcVlanTag;
String srcIp;
String protocol;
int[] srcPortRange;
boolean revoked;
boolean alreadyAdded;
Integer[] srcPortRange;
Boolean revoked;
Boolean alreadyAdded;
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 +78,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 +157,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 +174,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 +189,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 +214,7 @@ public FirewallRule.TrafficType getTrafficType() {
}

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

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

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

Expand All @@ -249,23 +249,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: 18 additions & 16 deletions api/src/com/cloud/agent/api/to/IpAddressTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@

public class IpAddressTO {

private long accountId;
private Long accountId;
private String publicIp;
private boolean sourceNat;
private boolean add;
private boolean oneToOneNat;
private boolean firstIP;
private Boolean sourceNat;
private Boolean add;
private Boolean oneToOneNat;
private Boolean firstIP;
private String broadcastUri;
private String vlanGateway;
private String vlanNetmask;
Expand All @@ -34,10 +34,10 @@ public class IpAddressTO {
private TrafficType trafficType;
private String networkName;
private Integer nicDevId;
private boolean newNic;
private Boolean newNic;

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 @@ -49,12 +49,14 @@ public IpAddressTO(long accountId, String ipAddress, boolean add, boolean firstI
this.vifMacAddress = vifMacAddress;
this.networkRate = networkRate;
this.oneToOneNat = isOneToOneNat;
setNicDevId(0);
setNewNic(false);
}

protected IpAddressTO() {
}

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

Expand All @@ -78,23 +80,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 +128,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