You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ml...@apache.org on 2013/01/10 01:48:36 UTC
[50/52] [partial] Summary: Fixes for api_refactoring
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/acl/ControlledEntity.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/acl/ControlledEntity.java b/api/src/com/cloud/acl/ControlledEntity.java
deleted file mode 100644
index 190dd41..0000000
--- a/api/src/com/cloud/acl/ControlledEntity.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.acl;
-
-import com.cloud.domain.PartOf;
-import com.cloud.user.OwnedBy;
-
-/**
- * ControlledEntity defines an object for which the access from an
- * access must inherit this interface.
- *
- */
-public interface ControlledEntity extends OwnedBy, PartOf {
- public enum ACLType {
- Account,
- Domain
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/acl/SecurityChecker.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/acl/SecurityChecker.java b/api/src/com/cloud/acl/SecurityChecker.java
deleted file mode 100644
index 3f76da9..0000000
--- a/api/src/com/cloud/acl/SecurityChecker.java
+++ /dev/null
@@ -1,99 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.acl;
-
-import com.cloud.dc.DataCenter;
-import com.cloud.domain.Domain;
-import com.cloud.exception.PermissionDeniedException;
-import com.cloud.offering.DiskOffering;
-import com.cloud.offering.ServiceOffering;
-import com.cloud.user.Account;
-import com.cloud.user.User;
-import com.cloud.utils.component.Adapter;
-
-/**
- * SecurityChecker checks the ownership and access control to objects within
- */
-public interface SecurityChecker extends Adapter {
-
- public enum AccessType {
- ListEntry,
- ModifyEntry,
- ModifyProject,
- UseNetwork
- }
-
- /**
- * Checks if the account owns the object.
- *
- * @param caller
- * account to check against.
- * @param object
- * object that the account is trying to access.
- * @return true if access allowed. false if this adapter cannot authenticate ownership.
- * @throws PermissionDeniedException
- * if this adapter is suppose to authenticate ownership and the check failed.
- */
- boolean checkAccess(Account caller, Domain domain) throws PermissionDeniedException;
-
- /**
- * Checks if the user belongs to an account that owns the object.
- *
- * @param user
- * user to check against.
- * @param object
- * object that the account is trying to access.
- * @return true if access allowed. false if this adapter cannot authenticate ownership.
- * @throws PermissionDeniedException
- * if this adapter is suppose to authenticate ownership and the check failed.
- */
- boolean checkAccess(User user, Domain domain) throws PermissionDeniedException;
-
- /**
- * Checks if the account can access the object.
- *
- * @param caller
- * account to check against.
- * @param entity
- * object that the account is trying to access.
- * @param accessType
- * TODO
- * @return true if access allowed. false if this adapter cannot provide permission.
- * @throws PermissionDeniedException
- * if this adapter is suppose to authenticate ownership and the check failed.
- */
- boolean checkAccess(Account caller, ControlledEntity entity, AccessType accessType) throws PermissionDeniedException;
-
- /**
- * Checks if the user belongs to an account that can access the object.
- *
- * @param user
- * user to check against.
- * @param entity
- * object that the account is trying to access.
- * @return true if access allowed. false if this adapter cannot authenticate ownership.
- * @throws PermissionDeniedException
- * if this adapter is suppose to authenticate ownership and the check failed.
- */
- boolean checkAccess(User user, ControlledEntity entity) throws PermissionDeniedException;
-
- boolean checkAccess(Account account, DataCenter zone) throws PermissionDeniedException;
-
- public boolean checkAccess(Account account, ServiceOffering so) throws PermissionDeniedException;
-
- boolean checkAccess(Account account, DiskOffering dof) throws PermissionDeniedException;
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/AgentControlAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/AgentControlAnswer.java b/api/src/com/cloud/agent/api/AgentControlAnswer.java
index 1cdcc1e..7dbf7b5 100644
--- a/api/src/com/cloud/agent/api/AgentControlAnswer.java
+++ b/api/src/com/cloud/agent/api/AgentControlAnswer.java
@@ -19,11 +19,11 @@ package com.cloud.agent.api;
public class AgentControlAnswer extends Answer {
public AgentControlAnswer() {
}
-
+
public AgentControlAnswer(Command command) {
super(command);
}
-
+
public AgentControlAnswer(Command command, boolean success, String details) {
super(command, success, details);
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/AgentControlCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/AgentControlCommand.java b/api/src/com/cloud/agent/api/AgentControlCommand.java
index 6cc8e6f..da187ac 100644
--- a/api/src/com/cloud/agent/api/AgentControlCommand.java
+++ b/api/src/com/cloud/agent/api/AgentControlCommand.java
@@ -17,10 +17,10 @@
package com.cloud.agent.api;
public class AgentControlCommand extends Command {
-
+
public AgentControlCommand() {
}
-
+
public boolean executeInSequence() {
return false;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/Answer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/Answer.java b/api/src/com/cloud/agent/api/Answer.java
index 932da23..655f447 100755
--- a/api/src/com/cloud/agent/api/Answer.java
+++ b/api/src/com/cloud/agent/api/Answer.java
@@ -21,40 +21,40 @@ import com.cloud.utils.exception.ExceptionUtil;
public class Answer extends Command {
protected boolean result;
protected String details;
-
+
protected Answer() {
}
-
+
public Answer(Command command) {
this(command, true, null);
}
-
+
public Answer(Command command, boolean success, String details) {
result = success;
this.details = details;
}
-
+
public Answer(Command command, Exception e) {
this(command, false, ExceptionUtil.toString(e));
}
-
+
public boolean getResult() {
return result;
}
-
+
public String getDetails() {
return details;
}
-
+
@Override
public boolean executeInSequence() {
return false;
}
-
+
public static UnsupportedAnswer createUnsupportedCommandAnswer(Command cmd) {
return new UnsupportedAnswer(cmd, "Unsupported command issued:" + cmd.toString() + ". Are you sure you got the right type of server?");
}
-
+
public static UnsupportedAnswer createUnsupportedVersionAnswer(Command cmd) {
return new UnsupportedAnswer(cmd, "Unsuppored Version.");
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/AttachIsoCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/AttachIsoCommand.java b/api/src/com/cloud/agent/api/AttachIsoCommand.java
index ff9da83..c6f0b61 100644
--- a/api/src/com/cloud/agent/api/AttachIsoCommand.java
+++ b/api/src/com/cloud/agent/api/AttachIsoCommand.java
@@ -48,11 +48,11 @@ public class AttachIsoCommand extends Command {
public boolean isAttach() {
return attach;
}
-
+
public String getStoreUrl() {
return storeUrl;
}
-
+
public void setStoreUrl(String url) {
storeUrl = url;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/AttachVolumeAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/AttachVolumeAnswer.java b/api/src/com/cloud/agent/api/AttachVolumeAnswer.java
index 253b444..b377b7c 100644
--- a/api/src/com/cloud/agent/api/AttachVolumeAnswer.java
+++ b/api/src/com/cloud/agent/api/AttachVolumeAnswer.java
@@ -20,38 +20,38 @@ package com.cloud.agent.api;
public class AttachVolumeAnswer extends Answer {
private Long deviceId;
private String chainInfo;
-
+
protected AttachVolumeAnswer() {
-
+
}
-
+
public AttachVolumeAnswer(AttachVolumeCommand cmd, String result) {
super(cmd, false, result);
this.deviceId = null;
}
-
+
public AttachVolumeAnswer(AttachVolumeCommand cmd, Long deviceId) {
super(cmd);
this.deviceId = deviceId;
}
-
+
public AttachVolumeAnswer(AttachVolumeCommand cmd) {
super(cmd);
this.deviceId = null;
}
-
+
/**
* @return the deviceId
*/
public Long getDeviceId() {
return deviceId;
}
-
+
public void setChainInfo(String chainInfo) {
this.chainInfo = chainInfo;
}
-
+
public String getChainInfo() {
return chainInfo;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/AttachVolumeCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/AttachVolumeCommand.java b/api/src/com/cloud/agent/api/AttachVolumeCommand.java
index 98bfb2e..302b8f8 100644
--- a/api/src/com/cloud/agent/api/AttachVolumeCommand.java
+++ b/api/src/com/cloud/agent/api/AttachVolumeCommand.java
@@ -19,7 +19,7 @@ package com.cloud.agent.api;
import com.cloud.storage.Storage.StoragePoolType;
public class AttachVolumeCommand extends Command {
-
+
boolean attach;
String vmName;
StoragePoolType pooltype;
@@ -29,10 +29,10 @@ public class AttachVolumeCommand extends Command {
String volumeName;
Long deviceId;
String chainInfo;
-
+
protected AttachVolumeCommand() {
}
-
+
public AttachVolumeCommand(boolean attach, String vmName, StoragePoolType pooltype, String volumeFolder, String volumePath, String volumeName, Long deviceId, String chainInfo) {
this.attach = attach;
this.vmName = vmName;
@@ -43,20 +43,20 @@ public class AttachVolumeCommand extends Command {
this.deviceId = deviceId;
this.chainInfo = chainInfo;
}
-
+
@Override
public boolean executeInSequence() {
return true;
}
-
+
public boolean getAttach() {
return attach;
}
-
+
public String getVmName() {
return vmName;
}
-
+
public StoragePoolType getPooltype() {
return pooltype;
}
@@ -68,11 +68,11 @@ public class AttachVolumeCommand extends Command {
public String getVolumeFolder() {
return volumeFolder;
}
-
+
public String getVolumePath() {
return volumePath;
}
-
+
public String getVolumeName() {
return volumeName;
}
@@ -84,15 +84,15 @@ public class AttachVolumeCommand extends Command {
public void setDeviceId(Long deviceId) {
this.deviceId = deviceId;
}
-
+
public String getPoolUuid() {
return poolUuid;
}
-
+
public void setPoolUuid(String poolUuid) {
this.poolUuid = poolUuid;
}
-
+
public String getChainInfo() {
return chainInfo;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/BackupSnapshotAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/BackupSnapshotAnswer.java b/api/src/com/cloud/agent/api/BackupSnapshotAnswer.java
index 707092f..9e35db6 100644
--- a/api/src/com/cloud/agent/api/BackupSnapshotAnswer.java
+++ b/api/src/com/cloud/agent/api/BackupSnapshotAnswer.java
@@ -20,11 +20,11 @@ package com.cloud.agent.api;
public class BackupSnapshotAnswer extends Answer {
private String backupSnapshotName;
private boolean full;
-
+
protected BackupSnapshotAnswer() {
-
+
}
-
+
public BackupSnapshotAnswer(BackupSnapshotCommand cmd, boolean success, String result, String backupSnapshotName, boolean full) {
super(cmd, success, result);
this.backupSnapshotName = backupSnapshotName;
@@ -37,7 +37,7 @@ public class BackupSnapshotAnswer extends Answer {
public String getBackupSnapshotName() {
return backupSnapshotName;
}
-
+
public boolean isFull() {
return full;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/BackupSnapshotCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/BackupSnapshotCommand.java b/api/src/com/cloud/agent/api/BackupSnapshotCommand.java
index 7ea7835..a0ac8d7 100644
--- a/api/src/com/cloud/agent/api/BackupSnapshotCommand.java
+++ b/api/src/com/cloud/agent/api/BackupSnapshotCommand.java
@@ -23,7 +23,7 @@ import com.cloud.agent.api.to.SwiftTO;
import com.cloud.storage.StoragePool;
/**
- * This currently assumes that both primary and secondary storage are mounted on the XenServer.
+ * This currently assumes that both primary and secondary storage are mounted on the XenServer.
*/
public class BackupSnapshotCommand extends SnapshotCommand {
private String prevSnapshotUuid;
@@ -37,18 +37,18 @@ public class BackupSnapshotCommand extends SnapshotCommand {
StorageFilerTO pool;
protected BackupSnapshotCommand() {
-
+
}
-
+
/**
* @param primaryStoragePoolNameLabel The UUID of the primary storage Pool
* @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage.
* @param snapshotUuid The UUID of the snapshot which is going to be backed up
* @param prevSnapshotUuid The UUID of the previous snapshot for this volume. This will be destroyed on the primary storage.
* @param prevBackupUuid This is the UUID of the vhd file which was last backed up on secondary storage.
- * @param firstBackupUuid This is the backup of the first ever snapshot taken by the volume.
+ * @param firstBackupUuid This is the backup of the first ever snapshot taken by the volume.
* @param isFirstSnapshotOfRootVolume true if this is the first snapshot of a root volume. Set the parent of the backup to null.
- * @param isVolumeInactive True if the volume belongs to a VM that is not running or is detached.
+ * @param isVolumeInactive True if the volume belongs to a VM that is not running or is detached.
*/
public BackupSnapshotCommand(String secondaryStoragePoolURL,
Long dcId,
@@ -63,7 +63,7 @@ public class BackupSnapshotCommand extends SnapshotCommand {
String prevBackupUuid,
boolean isVolumeInactive,
String vmName,
- int wait)
+ int wait)
{
super(pool, secondaryStoragePoolURL, snapshotUuid, snapshotName, dcId, accountId, volumeId);
this.snapshotId = snapshotId;
@@ -82,11 +82,11 @@ public class BackupSnapshotCommand extends SnapshotCommand {
public String getPrevBackupUuid() {
return prevBackupUuid;
}
-
+
public boolean isVolumeInactive() {
return isVolumeInactive;
}
-
+
public String getVmName() {
return vmName;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CancelCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CancelCommand.java b/api/src/com/cloud/agent/api/CancelCommand.java
index 7638273..0692055 100644
--- a/api/src/com/cloud/agent/api/CancelCommand.java
+++ b/api/src/com/cloud/agent/api/CancelCommand.java
@@ -21,19 +21,19 @@ package com.cloud.agent.api;
public class CancelCommand extends Command {
protected long sequence;
protected String reason;
-
+
protected CancelCommand() {
}
-
+
public CancelCommand(long sequence, String reason) {
this.sequence = sequence;
this.reason = reason;
}
-
+
public long getSequence() {
return sequence;
}
-
+
public String getReason() {
return reason;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/ChangeAgentAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ChangeAgentAnswer.java b/api/src/com/cloud/agent/api/ChangeAgentAnswer.java
index 4b3f103..537eabe 100644
--- a/api/src/com/cloud/agent/api/ChangeAgentAnswer.java
+++ b/api/src/com/cloud/agent/api/ChangeAgentAnswer.java
@@ -19,7 +19,7 @@ package com.cloud.agent.api;
public class ChangeAgentAnswer extends Answer {
protected ChangeAgentAnswer() {
}
-
+
public ChangeAgentAnswer(ChangeAgentCommand cmd, boolean result) {
super(cmd, result, null);
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/ChangeAgentCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ChangeAgentCommand.java b/api/src/com/cloud/agent/api/ChangeAgentCommand.java
index 1b7f8c8..abdb60a 100644
--- a/api/src/com/cloud/agent/api/ChangeAgentCommand.java
+++ b/api/src/com/cloud/agent/api/ChangeAgentCommand.java
@@ -21,19 +21,19 @@ import com.cloud.host.Status.Event;
public class ChangeAgentCommand extends Command {
long agentId;
Event event;
-
+
protected ChangeAgentCommand() {
}
-
+
public ChangeAgentCommand(long agentId, Event event) {
this.agentId = agentId;
this.event = event;
}
-
+
public long getAgentId() {
return agentId;
}
-
+
public Event getEvent() {
return event;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CheckHealthCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CheckHealthCommand.java b/api/src/com/cloud/agent/api/CheckHealthCommand.java
index 5298f5a..ff42276 100644
--- a/api/src/com/cloud/agent/api/CheckHealthCommand.java
+++ b/api/src/com/cloud/agent/api/CheckHealthCommand.java
@@ -22,7 +22,7 @@ public class CheckHealthCommand extends Command {
setWait(50);
}
-
+
@Override
public boolean executeInSequence() {
return false;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CheckNetworkAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CheckNetworkAnswer.java b/api/src/com/cloud/agent/api/CheckNetworkAnswer.java
index 2188fa6..52825fd 100644
--- a/api/src/com/cloud/agent/api/CheckNetworkAnswer.java
+++ b/api/src/com/cloud/agent/api/CheckNetworkAnswer.java
@@ -20,7 +20,7 @@ public class CheckNetworkAnswer extends Answer {
// indicate if agent reconnect is needed after setupNetworkNames command
private boolean _reconnect;
public CheckNetworkAnswer() {}
-
+
public CheckNetworkAnswer(CheckNetworkCommand cmd, boolean result, String details, boolean reconnect) {
super(cmd, result, details);
@@ -34,5 +34,5 @@ public class CheckNetworkAnswer extends Answer {
public boolean needReconnect() {
return _reconnect;
}
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CheckOnHostAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CheckOnHostAnswer.java b/api/src/com/cloud/agent/api/CheckOnHostAnswer.java
index 2a053fd..e5325e3 100644
--- a/api/src/com/cloud/agent/api/CheckOnHostAnswer.java
+++ b/api/src/com/cloud/agent/api/CheckOnHostAnswer.java
@@ -19,10 +19,10 @@ package com.cloud.agent.api;
public class CheckOnHostAnswer extends Answer {
boolean determined;
boolean alive;
-
+
protected CheckOnHostAnswer() {
}
-
+
public CheckOnHostAnswer(CheckOnHostCommand cmd, Boolean alive, String details) {
super(cmd, true, details);
if (alive == null) {
@@ -32,7 +32,7 @@ public class CheckOnHostAnswer extends Answer {
this.alive = alive;
}
}
-
+
public CheckOnHostAnswer(CheckOnHostCommand cmd, String details) {
super(cmd, false, details);
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CheckOnHostCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CheckOnHostCommand.java b/api/src/com/cloud/agent/api/CheckOnHostCommand.java
index 3aadebd..596a532 100644
--- a/api/src/com/cloud/agent/api/CheckOnHostCommand.java
+++ b/api/src/com/cloud/agent/api/CheckOnHostCommand.java
@@ -24,17 +24,17 @@ public class CheckOnHostCommand extends Command {
protected CheckOnHostCommand() {
}
-
-
+
+
public CheckOnHostCommand(Host host) {
this.host = new HostTO(host);
setWait(20);
}
-
+
public HostTO getHost() {
return host;
}
-
+
@Override
public boolean executeInSequence() {
return false;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CheckRouterAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CheckRouterAnswer.java b/api/src/com/cloud/agent/api/CheckRouterAnswer.java
index 7240ba1..da8189f 100644
--- a/api/src/com/cloud/agent/api/CheckRouterAnswer.java
+++ b/api/src/com/cloud/agent/api/CheckRouterAnswer.java
@@ -23,10 +23,10 @@ public class CheckRouterAnswer extends Answer {
public static final String ROUTER_IP = "router.ip";
RedundantState state;
boolean isBumped;
-
+
protected CheckRouterAnswer() {
}
-
+
public CheckRouterAnswer(CheckRouterCommand cmd, String details, boolean parse) {
super(cmd, true, details);
if (parse) {
@@ -35,7 +35,7 @@ public class CheckRouterAnswer extends Answer {
}
}
}
-
+
public CheckRouterAnswer(CheckRouterCommand cmd, String details) {
super(cmd, false, details);
}
@@ -61,11 +61,11 @@ public class CheckRouterAnswer extends Answer {
}
return true;
}
-
+
public void setState(RedundantState state) {
this.state = state;
}
-
+
public RedundantState getState() {
return state;
}
@@ -73,9 +73,9 @@ public class CheckRouterAnswer extends Answer {
public boolean isBumped() {
return isBumped;
}
-
+
public void setIsBumped(boolean isBumped) {
this.isBumped = isBumped;
}
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CheckS2SVpnConnectionsAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CheckS2SVpnConnectionsAnswer.java b/api/src/com/cloud/agent/api/CheckS2SVpnConnectionsAnswer.java
index ef3be81..0e9db96 100644
--- a/api/src/com/cloud/agent/api/CheckS2SVpnConnectionsAnswer.java
+++ b/api/src/com/cloud/agent/api/CheckS2SVpnConnectionsAnswer.java
@@ -5,7 +5,7 @@
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
-//
+//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
@@ -23,12 +23,12 @@ public class CheckS2SVpnConnectionsAnswer extends Answer {
Map<String, Boolean> ipToConnected;
Map<String, String> ipToDetail;
String details;
-
+
protected CheckS2SVpnConnectionsAnswer() {
ipToConnected = new HashMap<String, Boolean>();
ipToDetail = new HashMap<String, String>();
}
-
+
public CheckS2SVpnConnectionsAnswer(CheckS2SVpnConnectionsCommand cmd, boolean result, String details) {
super(cmd, result, details);
ipToConnected = new HashMap<String, Boolean>();
@@ -38,7 +38,7 @@ public class CheckS2SVpnConnectionsAnswer extends Answer {
parseDetails(details);
}
}
-
+
protected void parseDetails(String details) {
String[] lines = details.split("&");
for (String line : lines) {
@@ -54,14 +54,14 @@ public class CheckS2SVpnConnectionsAnswer extends Answer {
ipToDetail.put(ip, detail);
}
}
-
+
public boolean isConnected(String ip) {
if (this.getResult()) {
return ipToConnected.get(ip);
}
return false;
}
-
+
public String getDetail(String ip) {
if (this.getResult()) {
return ipToDetail.get(ip);
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CheckS2SVpnConnectionsCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CheckS2SVpnConnectionsCommand.java b/api/src/com/cloud/agent/api/CheckS2SVpnConnectionsCommand.java
index a736eab..9cfb53b 100644
--- a/api/src/com/cloud/agent/api/CheckS2SVpnConnectionsCommand.java
+++ b/api/src/com/cloud/agent/api/CheckS2SVpnConnectionsCommand.java
@@ -5,7 +5,7 @@
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
-//
+//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
@@ -22,17 +22,17 @@ import com.cloud.agent.api.routing.NetworkElementCommand;
public class CheckS2SVpnConnectionsCommand extends NetworkElementCommand {
List<String> vpnIps;
-
+
@Override
public boolean executeInSequence() {
return true;
}
-
+
public CheckS2SVpnConnectionsCommand(List<String> vpnIps) {
super();
this.vpnIps = vpnIps;
}
-
+
public List<String> getVpnIps() {
return vpnIps;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CheckStateAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CheckStateAnswer.java b/api/src/com/cloud/agent/api/CheckStateAnswer.java
index 4864e39..bf8ae0f 100755
--- a/api/src/com/cloud/agent/api/CheckStateAnswer.java
+++ b/api/src/com/cloud/agent/api/CheckStateAnswer.java
@@ -28,17 +28,17 @@ public class CheckStateAnswer extends Answer {
public CheckStateAnswer(CheckStateCommand cmd, State state) {
this(cmd, state, null);
}
-
+
public CheckStateAnswer(CheckStateCommand cmd, String details) {
super(cmd, false, details);
this.state = null;
}
-
+
public CheckStateAnswer(CheckStateCommand cmd, State state, String details) {
super(cmd, true, details);
this.state = state;
}
-
+
public State getState() {
return state;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CheckStateCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CheckStateCommand.java b/api/src/com/cloud/agent/api/CheckStateCommand.java
index 31c341d..89fc773 100755
--- a/api/src/com/cloud/agent/api/CheckStateCommand.java
+++ b/api/src/com/cloud/agent/api/CheckStateCommand.java
@@ -17,7 +17,7 @@
package com.cloud.agent.api;
/**
- *
+ *
*
*/
public class CheckStateCommand extends Command {
@@ -28,12 +28,12 @@ public class CheckStateCommand extends Command {
public CheckStateCommand(String vmName) {
this.vmName = vmName;
}
-
+
@Override
public boolean executeInSequence() {
return true;
}
-
+
public String getVmName() {
return vmName;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CheckVirtualMachineAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CheckVirtualMachineAnswer.java b/api/src/com/cloud/agent/api/CheckVirtualMachineAnswer.java
index 555b0ff..3f0ffdb 100644
--- a/api/src/com/cloud/agent/api/CheckVirtualMachineAnswer.java
+++ b/api/src/com/cloud/agent/api/CheckVirtualMachineAnswer.java
@@ -19,33 +19,33 @@ package com.cloud.agent.api;
import com.cloud.vm.VirtualMachine.State;
public class CheckVirtualMachineAnswer extends Answer {
-
+
Integer vncPort;
State state;
-
-
+
+
protected CheckVirtualMachineAnswer() {
}
-
+
public CheckVirtualMachineAnswer(CheckVirtualMachineCommand cmd, State state, Integer vncPort, String detail) {
super(cmd, true, detail);
this.state = state;
this.vncPort = vncPort;
}
-
+
public CheckVirtualMachineAnswer(CheckVirtualMachineCommand cmd, State state, Integer vncPort) {
this(cmd, state, vncPort, null);
}
-
+
public CheckVirtualMachineAnswer(CheckVirtualMachineCommand cmd, String detail) {
super(cmd, false, detail);
}
-
+
public Integer getVncPort() {
return vncPort;
}
-
+
public State getState() {
return state;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CheckVirtualMachineCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CheckVirtualMachineCommand.java b/api/src/com/cloud/agent/api/CheckVirtualMachineCommand.java
index 9e63a93..62f4420 100644
--- a/api/src/com/cloud/agent/api/CheckVirtualMachineCommand.java
+++ b/api/src/com/cloud/agent/api/CheckVirtualMachineCommand.java
@@ -17,18 +17,18 @@
package com.cloud.agent.api;
public class CheckVirtualMachineCommand extends Command {
-
+
private String vmName;
-
+
protected CheckVirtualMachineCommand() {
-
+
}
-
+
public CheckVirtualMachineCommand(String vmName) {
this.vmName = vmName;
setWait(20);
}
-
+
public String getVmName() {
return vmName;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CleanupNetworkRulesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CleanupNetworkRulesCmd.java b/api/src/com/cloud/agent/api/CleanupNetworkRulesCmd.java
index 6302443..8b5172d 100644
--- a/api/src/com/cloud/agent/api/CleanupNetworkRulesCmd.java
+++ b/api/src/com/cloud/agent/api/CleanupNetworkRulesCmd.java
@@ -20,22 +20,22 @@ package com.cloud.agent.api;
public class CleanupNetworkRulesCmd extends Command implements CronCommand {
private int interval = 10*60;
-
+
@Override
public boolean executeInSequence() {
return false;
}
-
-
+
+
public CleanupNetworkRulesCmd(int intervalSecs) {
super();
interval = intervalSecs;
}
-
+
public CleanupNetworkRulesCmd() {
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CleanupSnapshotBackupCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CleanupSnapshotBackupCommand.java b/api/src/com/cloud/agent/api/CleanupSnapshotBackupCommand.java
index aa85c3d..ae65a52 100644
--- a/api/src/com/cloud/agent/api/CleanupSnapshotBackupCommand.java
+++ b/api/src/com/cloud/agent/api/CleanupSnapshotBackupCommand.java
@@ -26,20 +26,20 @@ public class CleanupSnapshotBackupCommand extends Command {
private List<String> validBackupUUIDs;
protected CleanupSnapshotBackupCommand() {
-
+
}
-
- /*
- * @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage.
+
+ /*
+ * @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage.
* In the code, it is present as: In the vmops.host_details table, there is a field mount.parent. This is the value of that field
- * If you have better ideas on how to get it, you are welcome.
- * @param validBackupUUID The VHD which are valid
+ * If you have better ideas on how to get it, you are welcome.
+ * @param validBackupUUID The VHD which are valid
*/
public CleanupSnapshotBackupCommand(String secondaryStoragePoolURL,
Long dcId,
Long accountId,
Long volumeId,
- List<String> validBackupUUIDs)
+ List<String> validBackupUUIDs)
{
this.secondaryStoragePoolURL = secondaryStoragePoolURL;
this.dcId = dcId;
@@ -67,9 +67,9 @@ public class CleanupSnapshotBackupCommand extends Command {
public List<String> getValidBackupUUIDs() {
return validBackupUUIDs;
}
-
+
@Override
public boolean executeInSequence() {
return false;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/ClusterSyncAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ClusterSyncAnswer.java b/api/src/com/cloud/agent/api/ClusterSyncAnswer.java
index ea83109..99fee2a 100644
--- a/api/src/com/cloud/agent/api/ClusterSyncAnswer.java
+++ b/api/src/com/cloud/agent/api/ClusterSyncAnswer.java
@@ -25,31 +25,31 @@ public class ClusterSyncAnswer extends Answer {
private long _clusterId;
private HashMap<String, Pair<String, State>> _newStates;
private boolean _isExecuted=false;
-
+
// this is here because a cron command answer is being sent twice
// AgentAttache.processAnswers
// AgentManagerImpl.notifyAnswersToMonitors
public boolean isExceuted(){
return _isExecuted;
}
-
+
public void setExecuted(){
_isExecuted = true;
}
-
+
public ClusterSyncAnswer(long clusterId, HashMap<String, Pair<String, State>> newStates){
_clusterId = clusterId;
_newStates = newStates;
result = true;
}
-
+
public long getClusterId() {
return _clusterId;
}
-
+
public HashMap<String, Pair<String, State>> getNewStates() {
return _newStates;
- }
+ }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/ClusterSyncCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ClusterSyncCommand.java b/api/src/com/cloud/agent/api/ClusterSyncCommand.java
index e3a0da5..17dbbd8 100644
--- a/api/src/com/cloud/agent/api/ClusterSyncCommand.java
+++ b/api/src/com/cloud/agent/api/ClusterSyncCommand.java
@@ -21,10 +21,10 @@ public class ClusterSyncCommand extends Command implements CronCommand {
int _interval;
long _clusterId;
-
+
public ClusterSyncCommand() {
}
-
+
public ClusterSyncCommand(int interval, long clusterId){
_interval = interval;
_clusterId = clusterId;
@@ -34,7 +34,7 @@ public class ClusterSyncCommand extends Command implements CronCommand {
public int getInterval() {
return _interval;
}
-
+
public long getClusterId() {
return _clusterId;
}
@@ -43,5 +43,5 @@ public class ClusterSyncCommand extends Command implements CronCommand {
public boolean executeInSequence() {
return false;
}
-
-}
\ No newline at end of file
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/Command.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/Command.java b/api/src/com/cloud/agent/api/Command.java
index 4c3810e..9cd6749 100755
--- a/api/src/com/cloud/agent/api/Command.java
+++ b/api/src/com/cloud/agent/api/Command.java
@@ -23,9 +23,9 @@ import com.cloud.agent.api.LogLevel.Log4jLevel;
/**
* implemented by classes that extends the Command class. Command specifies
- *
+ *
*/
-public abstract class Command {
+public abstract class Command {
// allow command to carry over hypervisor or other environment related context info
@LogLevel(Log4jLevel.Trace)
@@ -63,7 +63,7 @@ public abstract class Command {
public String getContextParam(String name) {
return contextMap.get(name);
}
-
+
public boolean allowCaching() {
return true;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/ComputeChecksumCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ComputeChecksumCommand.java b/api/src/com/cloud/agent/api/ComputeChecksumCommand.java
index f0771a8..a2c88c4 100755
--- a/api/src/com/cloud/agent/api/ComputeChecksumCommand.java
+++ b/api/src/com/cloud/agent/api/ComputeChecksumCommand.java
@@ -26,12 +26,12 @@ public class ComputeChecksumCommand extends ssCommand {
public ComputeChecksumCommand() {
super();
}
-
+
public ComputeChecksumCommand(String secUrl, String templatePath) {
super(secUrl);
this.templatePath = templatePath;
- }
-
+ }
+
public String getTemplatePath() {
return templatePath;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/ConsoleAccessAuthenticationAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ConsoleAccessAuthenticationAnswer.java b/api/src/com/cloud/agent/api/ConsoleAccessAuthenticationAnswer.java
index 53a975f..9f50a2f 100644
--- a/api/src/com/cloud/agent/api/ConsoleAccessAuthenticationAnswer.java
+++ b/api/src/com/cloud/agent/api/ConsoleAccessAuthenticationAnswer.java
@@ -14,75 +14,75 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
-package com.cloud.agent.api;
-
-public class ConsoleAccessAuthenticationAnswer extends AgentControlAnswer {
-
+package com.cloud.agent.api;
+
+public class ConsoleAccessAuthenticationAnswer extends AgentControlAnswer {
+
private boolean _success;
-
+
private boolean _isReauthenticating;
private String _host;
private int _port;
-
+
private String _tunnelUrl;
private String _tunnelSession;
-
+
public ConsoleAccessAuthenticationAnswer() {
_success = false;
_isReauthenticating = false;
- _port = 0;
- }
-
- public ConsoleAccessAuthenticationAnswer(Command cmd, boolean success) {
- super(cmd);
- _success = success;
- }
-
- public boolean succeeded() {
- return _success;
+ _port = 0;
}
-
+
+ public ConsoleAccessAuthenticationAnswer(Command cmd, boolean success) {
+ super(cmd);
+ _success = success;
+ }
+
+ public boolean succeeded() {
+ return _success;
+ }
+
public void setSuccess(boolean value) {
_success = value;
}
-
+
public boolean isReauthenticating() {
return _isReauthenticating;
}
-
+
public void setReauthenticating(boolean value) {
_isReauthenticating = value;
}
-
+
public String getHost() {
return _host;
}
-
+
public void setHost(String host) {
_host = host;
}
-
+
public int getPort() {
return _port;
}
-
+
public void setPort(int port) {
_port = port;
}
-
+
public String getTunnelUrl() {
return _tunnelUrl;
}
-
+
public void setTunnelUrl(String tunnelUrl) {
- _tunnelUrl = tunnelUrl;
+ _tunnelUrl = tunnelUrl;
}
-
+
public String getTunnelSession() {
return _tunnelSession;
}
-
+
public void setTunnelSession(String tunnelSession) {
_tunnelSession = tunnelSession;
- }
-}
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/ConsoleAccessAuthenticationCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ConsoleAccessAuthenticationCommand.java b/api/src/com/cloud/agent/api/ConsoleAccessAuthenticationCommand.java
index acbc181..bd8093c 100644
--- a/api/src/com/cloud/agent/api/ConsoleAccessAuthenticationCommand.java
+++ b/api/src/com/cloud/agent/api/ConsoleAccessAuthenticationCommand.java
@@ -17,19 +17,19 @@
package com.cloud.agent.api;
public class ConsoleAccessAuthenticationCommand extends AgentControlCommand {
-
+
private String _host;
private String _port;
private String _vmId;
private String _sid;
private String _ticket;
-
- private boolean _isReauthenticating;
-
+
+ private boolean _isReauthenticating;
+
public ConsoleAccessAuthenticationCommand() {
- _isReauthenticating = false;
- }
-
+ _isReauthenticating = false;
+ }
+
public ConsoleAccessAuthenticationCommand(String host, String port, String vmId, String sid, String ticket) {
_host = host;
_port = port;
@@ -37,32 +37,32 @@ public class ConsoleAccessAuthenticationCommand extends AgentControlCommand {
_sid = sid;
_ticket = ticket;
}
-
+
public String getHost() {
return _host;
}
-
+
public String getPort() {
return _port;
}
-
+
public String getVmId() {
return _vmId;
}
-
+
public String getSid() {
return _sid;
}
-
+
public String getTicket() {
return _ticket;
}
-
+
public boolean isReauthenticating() {
return _isReauthenticating;
}
-
+
public void setReauthenticating(boolean value) {
_isReauthenticating = value;
- }
-}
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/ConsoleProxyLoadReportCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ConsoleProxyLoadReportCommand.java b/api/src/com/cloud/agent/api/ConsoleProxyLoadReportCommand.java
index d4b101a..ebb06b6 100644
--- a/api/src/com/cloud/agent/api/ConsoleProxyLoadReportCommand.java
+++ b/api/src/com/cloud/agent/api/ConsoleProxyLoadReportCommand.java
@@ -17,22 +17,22 @@
package com.cloud.agent.api;
public class ConsoleProxyLoadReportCommand extends AgentControlCommand {
-
+
private long _proxyVmId;
private String _loadInfo;
-
+
public ConsoleProxyLoadReportCommand() {
}
-
+
public ConsoleProxyLoadReportCommand(long proxyVmId, String loadInfo) {
_proxyVmId = proxyVmId;
_loadInfo = loadInfo;
}
-
+
public long getProxyVmId() {
return _proxyVmId;
}
-
+
public String getLoadInfo() {
return _loadInfo;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CreatePrivateTemplateFromSnapshotCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CreatePrivateTemplateFromSnapshotCommand.java b/api/src/com/cloud/agent/api/CreatePrivateTemplateFromSnapshotCommand.java
index 0140a4e..9e2680e 100644
--- a/api/src/com/cloud/agent/api/CreatePrivateTemplateFromSnapshotCommand.java
+++ b/api/src/com/cloud/agent/api/CreatePrivateTemplateFromSnapshotCommand.java
@@ -19,28 +19,28 @@ package com.cloud.agent.api;
import com.cloud.storage.StoragePool;
/**
- * This currently assumes that both primary and secondary storage are mounted on the XenServer.
+ * This currently assumes that both primary and secondary storage are mounted on the XenServer.
*/
public class CreatePrivateTemplateFromSnapshotCommand extends SnapshotCommand {
private String origTemplateInstallPath;
private Long newTemplateId;
private String templateName;
-
+
protected CreatePrivateTemplateFromSnapshotCommand() {
-
+
}
-
+
/**
* Given the UUID of a backed up snapshot VHD file on the secondary storage, the execute of this command does
* 1) Get the parent chain of this VHD all the way up to the root, say VHDList
* 2) Copy all the files in the VHDlist to some temp location
* 3) Coalesce all the VHDs to one VHD which contains all the data of the volume. This invokes the DeletePreviousBackupCommand for each VHD
* 4) Rename the UUID of this VHD
- * @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage.
+ * @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage.
* In the code, it is present as: In the vmops.host_details table, there is a field mount.parent. This is the value of that field
* If you have better ideas on how to get it, you are welcome.
* It may not be the UUID of the base copy of the snapshot, if no data was written since last snapshot.
- * @param origTemplateInstallPath The install path of the original template VHD on the secondary
+ * @param origTemplateInstallPath The install path of the original template VHD on the secondary
*/
public CreatePrivateTemplateFromSnapshotCommand(StoragePool pool,
@@ -53,7 +53,7 @@ public class CreatePrivateTemplateFromSnapshotCommand extends SnapshotCommand {
String origTemplateInstallPath,
Long newTemplateId,
String templateName,
- int wait)
+ int wait)
{
super(pool, secondaryStoragePoolURL, backedUpSnapshotUuid, backedUpSnapshotName, dcId, accountId, volumeId);
this.origTemplateInstallPath = origTemplateInstallPath;
@@ -68,7 +68,7 @@ public class CreatePrivateTemplateFromSnapshotCommand extends SnapshotCommand {
public String getOrigTemplateInstallPath() {
return origTemplateInstallPath;
}
-
+
public Long getNewTemplateId() {
return newTemplateId;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CreateStoragePoolCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CreateStoragePoolCommand.java b/api/src/com/cloud/agent/api/CreateStoragePoolCommand.java
index ecba6c2..7a4d768 100644
--- a/api/src/com/cloud/agent/api/CreateStoragePoolCommand.java
+++ b/api/src/com/cloud/agent/api/CreateStoragePoolCommand.java
@@ -20,10 +20,10 @@ import com.cloud.storage.StoragePool;
public class CreateStoragePoolCommand extends ModifyStoragePoolCommand {
-
+
public CreateStoragePoolCommand() {
}
-
+
public CreateStoragePoolCommand(boolean add, StoragePool pool) {
super(add, pool);
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CreateVolumeFromSnapshotAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CreateVolumeFromSnapshotAnswer.java b/api/src/com/cloud/agent/api/CreateVolumeFromSnapshotAnswer.java
index a57d6fa..2f7cd94 100644
--- a/api/src/com/cloud/agent/api/CreateVolumeFromSnapshotAnswer.java
+++ b/api/src/com/cloud/agent/api/CreateVolumeFromSnapshotAnswer.java
@@ -19,11 +19,11 @@ package com.cloud.agent.api;
public class CreateVolumeFromSnapshotAnswer extends Answer {
private String vdiUUID;
-
+
protected CreateVolumeFromSnapshotAnswer() {
-
+
}
-
+
public CreateVolumeFromSnapshotAnswer(CreateVolumeFromSnapshotCommand cmd, boolean success, String result, String vdiUUID) {
super(cmd, success, result);
this.vdiUUID = vdiUUID;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/CreateVolumeFromSnapshotCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/CreateVolumeFromSnapshotCommand.java b/api/src/com/cloud/agent/api/CreateVolumeFromSnapshotCommand.java
index 9bc9b36..a19d344 100644
--- a/api/src/com/cloud/agent/api/CreateVolumeFromSnapshotCommand.java
+++ b/api/src/com/cloud/agent/api/CreateVolumeFromSnapshotCommand.java
@@ -19,14 +19,14 @@ package com.cloud.agent.api;
import com.cloud.storage.StoragePool;
/**
- * This currently assumes that both primary and secondary storage are mounted on the XenServer.
+ * This currently assumes that both primary and secondary storage are mounted on the XenServer.
*/
public class CreateVolumeFromSnapshotCommand extends SnapshotCommand {
-
+
protected CreateVolumeFromSnapshotCommand() {
-
+
}
-
+
/**
* Given the UUID of a backed up snapshot VHD file on the secondary storage, the execute of this command does
* 1) Get the parent chain of this VHD all the way up to the root, say VHDList
@@ -35,11 +35,11 @@ public class CreateVolumeFromSnapshotCommand extends SnapshotCommand {
* 4) Rename the UUID of this VHD
* 5) Move this VHD to primary storage
* @param primaryStoragePoolNameLabel The primary storage Pool
- * @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage.
+ * @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage.
* In the code, it is present as: In the vmops.host_details table, there is a field mount.parent. This is the value of that field
* If you have better ideas on how to get it, you are welcome.
* It may not be the UUID of the base copy of the snapshot, if no data was written since last snapshot.
- * @param templatePath The install path of the template VHD on the secondary, if this a root volume
+ * @param templatePath The install path of the template VHD on the secondary, if this a root volume
*/
public CreateVolumeFromSnapshotCommand(StoragePool pool,
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/DeleteObjectFromSwiftCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/DeleteObjectFromSwiftCommand.java b/api/src/com/cloud/agent/api/DeleteObjectFromSwiftCommand.java
index 01de891..3d62c50 100644
--- a/api/src/com/cloud/agent/api/DeleteObjectFromSwiftCommand.java
+++ b/api/src/com/cloud/agent/api/DeleteObjectFromSwiftCommand.java
@@ -20,8 +20,8 @@ import com.cloud.agent.api.LogLevel.Log4jLevel;
import com.cloud.agent.api.to.SwiftTO;
/**
- *
- *
+ *
+ *
*/
public class DeleteObjectFromSwiftCommand extends Command {
@@ -31,9 +31,9 @@ public class DeleteObjectFromSwiftCommand extends Command {
private String object;
protected DeleteObjectFromSwiftCommand() {
-
+
}
-
+
public DeleteObjectFromSwiftCommand(SwiftTO swift, String container, String object) {
this.swift = swift;
this.container = container;
@@ -58,4 +58,4 @@ public class DeleteObjectFromSwiftCommand extends Command {
return true;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/DeleteSnapshotBackupAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/DeleteSnapshotBackupAnswer.java b/api/src/com/cloud/agent/api/DeleteSnapshotBackupAnswer.java
index b458aa0..9a895d8 100644
--- a/api/src/com/cloud/agent/api/DeleteSnapshotBackupAnswer.java
+++ b/api/src/com/cloud/agent/api/DeleteSnapshotBackupAnswer.java
@@ -18,15 +18,15 @@ package com.cloud.agent.api;
public class DeleteSnapshotBackupAnswer extends Answer {
-
+
protected DeleteSnapshotBackupAnswer() {
-
+
}
public DeleteSnapshotBackupAnswer(DeleteSnapshotBackupCommand cmd, boolean success, String details) {
super(cmd, success, details);
}
-
-
-
+
+
+
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/DeleteSnapshotBackupCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/DeleteSnapshotBackupCommand.java b/api/src/com/cloud/agent/api/DeleteSnapshotBackupCommand.java
index 5e55570..6114148 100644
--- a/api/src/com/cloud/agent/api/DeleteSnapshotBackupCommand.java
+++ b/api/src/com/cloud/agent/api/DeleteSnapshotBackupCommand.java
@@ -22,7 +22,7 @@ import com.cloud.agent.api.to.SwiftTO;
/**
* This command encapsulates a primitive operation which enables coalescing the backed up VHD snapshots on the secondary server
- * This currently assumes that the secondary storage are mounted on the XenServer.
+ * This currently assumes that the secondary storage are mounted on the XenServer.
*/
public class DeleteSnapshotBackupCommand extends SnapshotCommand {
@LogLevel(Log4jLevel.Off)
@@ -52,31 +52,31 @@ public class DeleteSnapshotBackupCommand extends SnapshotCommand {
protected DeleteSnapshotBackupCommand() {
}
-
+
/**
* Given 2 VHD files on the secondary storage which are linked in a parent chain as follows:
* backupUUID = parent(childUUID)
- * It gets another VHD
+ * It gets another VHD
* previousBackupVHD = parent(backupUUID)
- *
+ *
* And
* 1) it coalesces backupUuid into its parent.
* 2) It deletes the VHD file corresponding to backupUuid
* 3) It sets the parent VHD of childUUID to that of previousBackupUuid
- *
+ *
* It takes care of the cases when
* 1) childUUID is null. - Step 3 is not done.
- * 2) previousBackupUUID is null
+ * 2) previousBackupUUID is null
* - Merge childUUID into its parent backupUUID
* - Set the UUID of the resultant VHD to childUUID
- * - Essentially we are deleting the oldest VHD file and setting the current oldest VHD to childUUID
- *
- * @param volumeName The name of the volume whose snapshot was taken (something like i-3-SV-ROOT)
- * @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage.
+ * - Essentially we are deleting the oldest VHD file and setting the current oldest VHD to childUUID
+ *
+ * @param volumeName The name of the volume whose snapshot was taken (something like i-3-SV-ROOT)
+ * @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage.
* In the code, it is present as: In the vmops.host_details table, there is a field mount.parent. This is the value of that field
- * If you have better ideas on how to get it, you are welcome.
- * @param backupUUID The VHD which has to be deleted
- * @param childUUID The child VHD file of the backup whose parent is reset to its grandparent.
+ * If you have better ideas on how to get it, you are welcome.
+ * @param backupUUID The VHD which has to be deleted
+ * @param childUUID The child VHD file of the backup whose parent is reset to its grandparent.
*/
public DeleteSnapshotBackupCommand(SwiftTO swift,
S3TO s3,
@@ -91,4 +91,4 @@ public class DeleteSnapshotBackupCommand extends SnapshotCommand {
this.s3 = s3;
setAll(all);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/DeleteSnapshotsDirCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/DeleteSnapshotsDirCommand.java b/api/src/com/cloud/agent/api/DeleteSnapshotsDirCommand.java
index 6879d23..e2071d7 100644
--- a/api/src/com/cloud/agent/api/DeleteSnapshotsDirCommand.java
+++ b/api/src/com/cloud/agent/api/DeleteSnapshotsDirCommand.java
@@ -18,18 +18,18 @@ package com.cloud.agent.api;
/**
* This command encapsulates a primitive operation which enables coalescing the backed up VHD snapshots on the secondary server
- * This currently assumes that the secondary storage are mounted on the XenServer.
+ * This currently assumes that the secondary storage are mounted on the XenServer.
*/
public class DeleteSnapshotsDirCommand extends Command {
String secondaryStorageUrl;
Long dcId;
Long accountId;
Long volumeId;
-
+
protected DeleteSnapshotsDirCommand() {
-
+
}
-
+
public DeleteSnapshotsDirCommand(String secondaryStorageUrl,
Long dcId, Long accountId, Long volumeId)
{
@@ -60,4 +60,4 @@ public class DeleteSnapshotsDirCommand extends Command {
return volumeId;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/DeleteStoragePoolCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/DeleteStoragePoolCommand.java b/api/src/com/cloud/agent/api/DeleteStoragePoolCommand.java
index 7fa60ad..4618d59 100644
--- a/api/src/com/cloud/agent/api/DeleteStoragePoolCommand.java
+++ b/api/src/com/cloud/agent/api/DeleteStoragePoolCommand.java
@@ -23,20 +23,20 @@ import com.cloud.agent.api.to.StorageFilerTO;
import com.cloud.storage.StoragePool;
public class DeleteStoragePoolCommand extends Command {
-
+
StorageFilerTO pool;
public static final String LOCAL_PATH_PREFIX="/mnt/";
String localPath;
-
+
public DeleteStoragePoolCommand() {
-
+
}
-
+
public DeleteStoragePoolCommand(StoragePool pool, String localPath) {
this.pool = new StorageFilerTO(pool);
this.localPath = localPath;
}
-
+
public DeleteStoragePoolCommand(StoragePool pool) {
this(pool, LOCAL_PATH_PREFIX + File.separator + UUID.nameUUIDFromBytes((pool.getHostAddress() + pool.getPath()).getBytes()));
}
@@ -48,7 +48,7 @@ public class DeleteStoragePoolCommand extends Command {
public void setPool(StoragePool pool) {
this.pool = new StorageFilerTO(pool);
}
-
+
@Override
public boolean executeInSequence() {
return false;
@@ -57,5 +57,5 @@ public class DeleteStoragePoolCommand extends Command {
public String getLocalPath() {
return localPath;
}
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/FenceAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/FenceAnswer.java b/api/src/com/cloud/agent/api/FenceAnswer.java
index 13ee301..7af18f5 100644
--- a/api/src/com/cloud/agent/api/FenceAnswer.java
+++ b/api/src/com/cloud/agent/api/FenceAnswer.java
@@ -20,15 +20,15 @@ public class FenceAnswer extends Answer {
public FenceAnswer() {
super();
}
-
+
public FenceAnswer(FenceCommand cmd) {
super(cmd, true, null);
}
-
+
public FenceAnswer(FenceCommand cmd, String details) {
super(cmd, true, details);
}
-
+
public FenceAnswer(FenceCommand cmd, boolean result, String details) {
super(cmd, result, details);
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/FenceCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/FenceCommand.java b/api/src/com/cloud/agent/api/FenceCommand.java
index 5ba293a..a891944 100644
--- a/api/src/com/cloud/agent/api/FenceCommand.java
+++ b/api/src/com/cloud/agent/api/FenceCommand.java
@@ -20,16 +20,16 @@ import com.cloud.host.Host;
import com.cloud.vm.VirtualMachine;
public class FenceCommand extends Command {
-
+
public FenceCommand() {
super();
}
-
+
String vmName;
String hostGuid;
String hostIp;
boolean inSeq;
-
+
public FenceCommand(VirtualMachine vm, Host host) {
super();
vmName = vm.getInstanceName();
@@ -37,19 +37,19 @@ public class FenceCommand extends Command {
hostIp = host.getPrivateIpAddress();
inSeq = false;
}
-
+
public void setSeq(boolean inseq) {
inSeq = inseq;
}
-
+
public String getVmName() {
return vmName;
}
-
+
public String getHostGuid() {
return hostGuid;
}
-
+
public String getHostIp() {
return hostIp;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/GetDomRVersionAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/GetDomRVersionAnswer.java b/api/src/com/cloud/agent/api/GetDomRVersionAnswer.java
index 992b507..7487b57 100644
--- a/api/src/com/cloud/agent/api/GetDomRVersionAnswer.java
+++ b/api/src/com/cloud/agent/api/GetDomRVersionAnswer.java
@@ -21,24 +21,24 @@ public class GetDomRVersionAnswer extends Answer {
public static final String ROUTER_IP = "router.ip";
String templateVersion;
String scriptsVersion;
-
+
protected GetDomRVersionAnswer() {
}
-
+
public GetDomRVersionAnswer(GetDomRVersionCmd cmd, String details, String templateVersion, String scriptsVersion) {
super(cmd, true, details);
this.templateVersion = templateVersion;
this.scriptsVersion = scriptsVersion;
}
-
+
public GetDomRVersionAnswer(GetDomRVersionCmd cmd, String details) {
super(cmd, false, details);
}
-
+
public String getTemplateVersion() {
return this.templateVersion;
}
-
+
public String getScriptsVersion() {
return this.scriptsVersion;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/GetVncPortAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/GetVncPortAnswer.java b/api/src/com/cloud/agent/api/GetVncPortAnswer.java
index da46426..5e94a18 100644
--- a/api/src/com/cloud/agent/api/GetVncPortAnswer.java
+++ b/api/src/com/cloud/agent/api/GetVncPortAnswer.java
@@ -19,29 +19,29 @@ package com.cloud.agent.api;
public class GetVncPortAnswer extends Answer {
String address;
int port;
-
+
protected GetVncPortAnswer() {
}
-
+
public GetVncPortAnswer(GetVncPortCommand cmd, int port) {
super(cmd, true, null);
this.port = port;
}
-
+
public GetVncPortAnswer(GetVncPortCommand cmd, String address, int port) {
super(cmd, true, null);
this.address = address;
this.port = port;
}
-
+
public GetVncPortAnswer(GetVncPortCommand cmd, String details) {
super(cmd, false, details);
}
-
+
public String getAddress() {
return address;
}
-
+
public int getPort() {
return port;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/GetVncPortCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/GetVncPortCommand.java b/api/src/com/cloud/agent/api/GetVncPortCommand.java
index cff787e..06165dc 100644
--- a/api/src/com/cloud/agent/api/GetVncPortCommand.java
+++ b/api/src/com/cloud/agent/api/GetVncPortCommand.java
@@ -22,21 +22,21 @@ public class GetVncPortCommand extends Command {
public GetVncPortCommand() {
}
-
+
public GetVncPortCommand(long id, String name) {
this.id = id;
this.name = name;
}
-
+
@Override
public boolean executeInSequence() {
return false;
}
-
+
public String getName() {
return name;
}
-
+
public long getId() {
return id;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/HostStatsEntry.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/HostStatsEntry.java b/api/src/com/cloud/agent/api/HostStatsEntry.java
index d34e0d7..0d8cfb2 100644
--- a/api/src/com/cloud/agent/api/HostStatsEntry.java
+++ b/api/src/com/cloud/agent/api/HostStatsEntry.java
@@ -19,7 +19,7 @@ package com.cloud.agent.api;
import com.cloud.host.HostStats;
public class HostStatsEntry implements HostStats {
-
+
long hostId;
String entityType;
double cpuUtilization;
@@ -27,12 +27,12 @@ public class HostStatsEntry implements HostStats {
double networkWriteKBs;
double totalMemoryKBs;
double freeMemoryKBs;
-
+
public HostStatsEntry() {
}
-
+
public HostStatsEntry(long hostId,double cpuUtilization, double networkReadKBs, double networkWriteKBs, String entityType,
- double totalMemoryKBs, double freeMemoryKBs, double xapiMemoryUsageKBs, double averageLoad)
+ double totalMemoryKBs, double freeMemoryKBs, double xapiMemoryUsageKBs, double averageLoad)
{
this.hostId = hostId;
this.entityType = entityType;
@@ -47,16 +47,16 @@ public class HostStatsEntry implements HostStats {
public double getNetworkReadKBs() {
return networkReadKBs;
}
-
+
public void setNetworkReadKBs(double networkReadKBs) {
this.networkReadKBs = networkReadKBs;
}
-
+
@Override
public double getNetworkWriteKBs() {
return networkWriteKBs;
}
-
+
public void setNetworkWriteKBs(double networkWriteKBs) {
this.networkWriteKBs = networkWriteKBs;
}
@@ -65,16 +65,16 @@ public class HostStatsEntry implements HostStats {
public String getEntityType(){
return this.entityType;
}
-
+
public void setEntityType(String entityType){
this.entityType = entityType;
}
-
+
@Override
public double getTotalMemoryKBs(){
return this.totalMemoryKBs;
}
-
+
public void setTotalMemoryKBs(double totalMemoryKBs){
this.totalMemoryKBs = totalMemoryKBs;
}
@@ -83,11 +83,11 @@ public class HostStatsEntry implements HostStats {
public double getFreeMemoryKBs(){
return this.freeMemoryKBs;
}
-
+
public void setFreeMemoryKBs(double freeMemoryKBs){
this.freeMemoryKBs = freeMemoryKBs;
}
-
+
@Override
public double getCpuUtilization() {
return this.cpuUtilization;
@@ -106,7 +106,7 @@ public class HostStatsEntry implements HostStats {
public HostStats getHostStats() {
return this;
}
-
+
public void setHostId(long hostId) {
this.hostId = hostId;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/MaintainAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/MaintainAnswer.java b/api/src/com/cloud/agent/api/MaintainAnswer.java
index c362869..dcfdab3 100644
--- a/api/src/com/cloud/agent/api/MaintainAnswer.java
+++ b/api/src/com/cloud/agent/api/MaintainAnswer.java
@@ -18,28 +18,28 @@ package com.cloud.agent.api;
public class MaintainAnswer extends Answer {
boolean willMigrate;
-
+
public MaintainAnswer() {
}
-
+
public MaintainAnswer(MaintainCommand cmd) {
this(cmd, true, null);
}
-
+
public MaintainAnswer(MaintainCommand cmd, boolean willMigrate) {
this(cmd, true, null);
this.willMigrate = willMigrate;
}
-
+
public MaintainAnswer(MaintainCommand cmd, String details) {
this(cmd, true, details);
}
-
+
public MaintainAnswer(MaintainCommand cmd, boolean result, String details) {
super(cmd, result, details);
this.willMigrate = true;
}
-
+
public boolean getMigrate() {
return this.willMigrate;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/MaintainCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/MaintainCommand.java b/api/src/com/cloud/agent/api/MaintainCommand.java
index 654476a..2a9b9a5 100644
--- a/api/src/com/cloud/agent/api/MaintainCommand.java
+++ b/api/src/com/cloud/agent/api/MaintainCommand.java
@@ -20,7 +20,7 @@ public class MaintainCommand extends Command {
public MaintainCommand() {
}
-
+
@Override
public boolean executeInSequence() {
return true;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/ManageSnapshotAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ManageSnapshotAnswer.java b/api/src/com/cloud/agent/api/ManageSnapshotAnswer.java
index 6dd7575..e490bdf 100644
--- a/api/src/com/cloud/agent/api/ManageSnapshotAnswer.java
+++ b/api/src/com/cloud/agent/api/ManageSnapshotAnswer.java
@@ -20,13 +20,13 @@ package com.cloud.agent.api;
public class ManageSnapshotAnswer extends Answer {
// For create Snapshot
private String _snapshotPath;
-
+
public ManageSnapshotAnswer() {}
public ManageSnapshotAnswer(Command cmd, boolean success, String result) {
super(cmd, success, result);
}
-
+
// For XenServer
public ManageSnapshotAnswer(ManageSnapshotCommand cmd, long snapshotId, String snapshotPath, boolean success, String result) {
super(cmd, success, result);
@@ -36,5 +36,5 @@ public class ManageSnapshotAnswer extends Answer {
public String getSnapshotPath() {
return _snapshotPath;
}
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/ManageSnapshotCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ManageSnapshotCommand.java b/api/src/com/cloud/agent/api/ManageSnapshotCommand.java
index 9a5f424..5effc54 100644
--- a/api/src/com/cloud/agent/api/ManageSnapshotCommand.java
+++ b/api/src/com/cloud/agent/api/ManageSnapshotCommand.java
@@ -25,9 +25,9 @@ public class ManageSnapshotCommand extends Command {
// XXX: Anyway there is something called inheritance in Java
public static String CREATE_SNAPSHOT = "-c";
public static String DESTROY_SNAPSHOT = "-d";
-
+
private String _commandSwitch;
-
+
// Information about the volume that the snapshot is based on
private String _volumePath = null;
StorageFilerTO _pool;
@@ -43,7 +43,7 @@ public class ManageSnapshotCommand extends Command {
public ManageSnapshotCommand(long snapshotId, String volumePath, StoragePool pool, String preSnapshotPath ,String snapshotName, String vmName) {
_commandSwitch = ManageSnapshotCommand.CREATE_SNAPSHOT;
_volumePath = volumePath;
- _pool = new StorageFilerTO(pool);
+ _pool = new StorageFilerTO(pool);
_snapshotPath = preSnapshotPath;
_snapshotName = snapshotName;
_snapshotId = snapshotId;
@@ -54,8 +54,8 @@ public class ManageSnapshotCommand extends Command {
_commandSwitch = ManageSnapshotCommand.DESTROY_SNAPSHOT;
_snapshotPath = snapshotPath;
}
-
-
+
+
@Override
public boolean executeInSequence() {
return false;
@@ -64,15 +64,15 @@ public class ManageSnapshotCommand extends Command {
public String getCommandSwitch() {
return _commandSwitch;
}
-
+
public String getVolumePath() {
return _volumePath;
}
-
+
public StorageFilerTO getPool() {
return _pool;
}
-
+
public String getSnapshotPath() {
return _snapshotPath;
}
@@ -84,9 +84,9 @@ public class ManageSnapshotCommand extends Command {
public long getSnapshotId() {
return _snapshotId;
}
-
+
public String getVmName() {
return _vmName;
}
-
-}
\ No newline at end of file
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/MigrateAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/MigrateAnswer.java b/api/src/com/cloud/agent/api/MigrateAnswer.java
index 4b5dd19..19d690a 100644
--- a/api/src/com/cloud/agent/api/MigrateAnswer.java
+++ b/api/src/com/cloud/agent/api/MigrateAnswer.java
@@ -18,15 +18,15 @@ package com.cloud.agent.api;
public class MigrateAnswer extends Answer {
Integer vncPort = null;
-
+
protected MigrateAnswer() {
}
-
+
public MigrateAnswer(MigrateCommand cmd, boolean result, String detail, Integer vncPort) {
super(cmd, result, detail);
this.vncPort = vncPort;
}
-
+
public Integer getVncPort() {
return vncPort;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/MigrateCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/MigrateCommand.java b/api/src/com/cloud/agent/api/MigrateCommand.java
index 18a2be1..5042b8c 100644
--- a/api/src/com/cloud/agent/api/MigrateCommand.java
+++ b/api/src/com/cloud/agent/api/MigrateCommand.java
@@ -25,29 +25,29 @@ public class MigrateCommand extends Command {
protected MigrateCommand() {
}
-
+
public MigrateCommand(String vmName, String destIp, boolean isWindows) {
this.vmName = vmName;
this.destIp = destIp;
this.isWindows = isWindows;
}
-
+
public boolean isWindows() {
return isWindows;
}
-
+
public String getDestinationIp() {
return destIp;
}
-
+
public String getVmName() {
return vmName;
}
-
+
public void setHostGuid(String guid) {
this.hostGuid = guid;
}
-
+
public String getHostGuid() {
return this.hostGuid;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java b/api/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java
index a8ab78d..df77985 100644
--- a/api/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java
+++ b/api/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java
@@ -30,13 +30,13 @@ public class ModifyStoragePoolAnswer extends Answer {
public ModifyStoragePoolAnswer(ModifyStoragePoolCommand cmd, long capacityBytes, long availableBytes, Map<String, TemplateInfo> tInfo) {
super(cmd);
this.result = true;
- this.poolInfo = new StoragePoolInfo(null,
- cmd.getPool().getHost(), cmd.getPool().getPath(), cmd.getLocalPath(),
+ this.poolInfo = new StoragePoolInfo(null,
+ cmd.getPool().getHost(), cmd.getPool().getPath(), cmd.getLocalPath(),
cmd.getPool().getType(), capacityBytes, availableBytes );
-
+
this.templateInfo = tInfo;
}
-
+
public StoragePoolInfo getPoolInfo() {
return poolInfo;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/ModifyStoragePoolCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ModifyStoragePoolCommand.java b/api/src/com/cloud/agent/api/ModifyStoragePoolCommand.java
index 04f14e3..8bc956d 100644
--- a/api/src/com/cloud/agent/api/ModifyStoragePoolCommand.java
+++ b/api/src/com/cloud/agent/api/ModifyStoragePoolCommand.java
@@ -23,25 +23,25 @@ import com.cloud.agent.api.to.StorageFilerTO;
import com.cloud.storage.StoragePool;
public class ModifyStoragePoolCommand extends Command {
-
+
boolean add;
StorageFilerTO pool;
String localPath;
String [] options;
public static final String LOCAL_PATH_PREFIX="/mnt/";
-
+
public ModifyStoragePoolCommand() {
-
+
}
-
+
public ModifyStoragePoolCommand(boolean add, StoragePool pool, String localPath) {
this.add = add;
this.pool = new StorageFilerTO(pool);
this.localPath = localPath;
}
-
+
public ModifyStoragePoolCommand(boolean add, StoragePool pool) {
this(add, pool, LOCAL_PATH_PREFIX + File.separator + UUID.nameUUIDFromBytes((pool.getHostAddress() + pool.getPath()).getBytes()));
}
@@ -53,11 +53,11 @@ public class ModifyStoragePoolCommand extends Command {
public void setPool(StoragePool pool) {
this.pool = new StorageFilerTO(pool);
}
-
+
public boolean getAdd() {
return add;
}
-
+
@Override
public boolean executeInSequence() {
return false;
@@ -71,5 +71,5 @@ public class ModifyStoragePoolCommand extends Command {
this.options = options;
}
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/NetworkUsageAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/NetworkUsageAnswer.java b/api/src/com/cloud/agent/api/NetworkUsageAnswer.java
index 7d5d49b..fd8ebda 100644
--- a/api/src/com/cloud/agent/api/NetworkUsageAnswer.java
+++ b/api/src/com/cloud/agent/api/NetworkUsageAnswer.java
@@ -33,7 +33,7 @@ public class NetworkUsageAnswer extends Answer {
this.bytesSent = bytesSent;
routerName = cmd.getDomRName();
}
-
+
public NetworkUsageAnswer(Command command, Exception e) {
super(command, e);
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/NetworkUsageCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/NetworkUsageCommand.java b/api/src/com/cloud/agent/api/NetworkUsageCommand.java
index acb23cf..6cbf93b 100644
--- a/api/src/com/cloud/agent/api/NetworkUsageCommand.java
+++ b/api/src/com/cloud/agent/api/NetworkUsageCommand.java
@@ -57,7 +57,7 @@ public class NetworkUsageCommand extends Command {
this.option = "create";
this.vpcCIDR = vpcCIDR;
}
-
+
public NetworkUsageCommand(String privateIP, String domRName, String option, boolean forVpc, String gatewayIP)
{
this.privateIP = privateIP;
@@ -66,7 +66,7 @@ public class NetworkUsageCommand extends Command {
this.gatewayIP = gatewayIP;
this.option = option;
}
-
+
public String getPrivateIP() {
return privateIP;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/PingAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PingAnswer.java b/api/src/com/cloud/agent/api/PingAnswer.java
index 388d67d..d9ed89c 100644
--- a/api/src/com/cloud/agent/api/PingAnswer.java
+++ b/api/src/com/cloud/agent/api/PingAnswer.java
@@ -21,7 +21,7 @@ public class PingAnswer extends Answer {
protected PingAnswer() {
}
-
+
public PingAnswer(PingCommand cmd) {
super(cmd);
_command = cmd;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/PingCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PingCommand.java b/api/src/com/cloud/agent/api/PingCommand.java
index 3b3ca61..8d9681f 100755
--- a/api/src/com/cloud/agent/api/PingCommand.java
+++ b/api/src/com/cloud/agent/api/PingCommand.java
@@ -21,23 +21,23 @@ import com.cloud.host.Host;
public class PingCommand extends Command {
Host.Type hostType;
long hostId;
-
+
protected PingCommand() {
}
-
+
public PingCommand(Host.Type type, long id) {
hostType = type;
hostId = id;
}
-
+
public Host.Type getHostType() {
return hostType;
}
-
+
public long getHostId() {
return hostId;
}
-
+
@Override
public boolean executeInSequence() {
return false;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/PingRoutingCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PingRoutingCommand.java b/api/src/com/cloud/agent/api/PingRoutingCommand.java
index eebe041..e25ac62 100755
--- a/api/src/com/cloud/agent/api/PingRoutingCommand.java
+++ b/api/src/com/cloud/agent/api/PingRoutingCommand.java
@@ -25,15 +25,15 @@ public class PingRoutingCommand extends PingCommand {
Map<String, State> newStates;
boolean _gatewayAccessible = true;
boolean _vnetAccessible = true;
-
+
protected PingRoutingCommand() {
}
-
+
public PingRoutingCommand(Host.Type type, long id, Map<String, State> states) {
super(type, id);
this.newStates = states;
}
-
+
public Map<String, State> getNewStates() {
return newStates;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/PingRoutingWithOvsCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PingRoutingWithOvsCommand.java b/api/src/com/cloud/agent/api/PingRoutingWithOvsCommand.java
index 5842f38..d44987b 100644
--- a/api/src/com/cloud/agent/api/PingRoutingWithOvsCommand.java
+++ b/api/src/com/cloud/agent/api/PingRoutingWithOvsCommand.java
@@ -25,17 +25,17 @@ import com.cloud.vm.VirtualMachine.State;
public class PingRoutingWithOvsCommand extends PingRoutingCommand {
List<Pair<String, Long>> states;
-
+
protected PingRoutingWithOvsCommand() {
super();
}
-
+
public PingRoutingWithOvsCommand(Host.Type type, long id,
Map<String, State> states, List<Pair<String, Long>> ovsStates) {
super(type, id, states);
this.states = ovsStates;
}
-
+
public List<Pair<String, Long>> getStates() {
return states;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/PingStorageCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PingStorageCommand.java b/api/src/com/cloud/agent/api/PingStorageCommand.java
index 963bc7b..438ab50 100755
--- a/api/src/com/cloud/agent/api/PingStorageCommand.java
+++ b/api/src/com/cloud/agent/api/PingStorageCommand.java
@@ -25,12 +25,12 @@ public class PingStorageCommand extends PingCommand {
protected PingStorageCommand() {
}
-
+
public PingStorageCommand(Host.Type type, long id, Map<String, Boolean> changes) {
super(type, id);
this.changes = changes;
}
-
+
public Map<String, Boolean> getChanges() {
return changes;
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/PlugNicCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PlugNicCommand.java b/api/src/com/cloud/agent/api/PlugNicCommand.java
index aa5141e..b896e45 100644
--- a/api/src/com/cloud/agent/api/PlugNicCommand.java
+++ b/api/src/com/cloud/agent/api/PlugNicCommand.java
@@ -19,22 +19,22 @@ package com.cloud.agent.api;
import com.cloud.agent.api.to.NicTO;
public class PlugNicCommand extends Command {
-
+
NicTO nic;
String instanceName;
-
+
public NicTO getNic() {
return nic;
}
-
+
@Override
public boolean executeInSequence() {
return true;
}
-
+
protected PlugNicCommand() {
}
-
+
public PlugNicCommand(NicTO nic, String instanceName) {
this.nic = nic;
this.instanceName = instanceName;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c4c9d2d8/api/src/com/cloud/agent/api/PoolEjectCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PoolEjectCommand.java b/api/src/com/cloud/agent/api/PoolEjectCommand.java
index faea30e..3085042 100644
--- a/api/src/com/cloud/agent/api/PoolEjectCommand.java
+++ b/api/src/com/cloud/agent/api/PoolEjectCommand.java
@@ -18,22 +18,22 @@ package com.cloud.agent.api;
public class PoolEjectCommand extends Command {
private String hostuuid;
-
+
public String getHostuuid() {
return hostuuid;
}
-
+
public void setHostuuid(String hostuuid) {
this.hostuuid = hostuuid;
}
public PoolEjectCommand() {
super();
}
- public PoolEjectCommand(String hostuuid) {
+ public PoolEjectCommand(String hostuuid) {
super();
setHostuuid(hostuuid);
}
-
+
@Override
public boolean executeInSequence() {
return true;