cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject [31/51] [partial] merge master
Date Sat, 11 May 2013 09:59:56 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/DownloadTemplateFromSwiftToSecondaryStorageCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/DownloadTemplateFromSwiftToSecondaryStorageCommand.java b/core/src/com/cloud/agent/api/DownloadTemplateFromSwiftToSecondaryStorageCommand.java
new file mode 100644
index 0000000..79ec882
--- /dev/null
+++ b/core/src/com/cloud/agent/api/DownloadTemplateFromSwiftToSecondaryStorageCommand.java
@@ -0,0 +1,90 @@
+// 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.agent.api;
+
+import com.cloud.agent.api.LogLevel.Log4jLevel;
+import com.cloud.agent.api.to.SwiftTO;
+
+/**
+ *
+ *
+ */
+
+public class DownloadTemplateFromSwiftToSecondaryStorageCommand extends Command {
+    @LogLevel(Log4jLevel.Off)
+    private SwiftTO swift;
+    private String secondaryStorageUrl;
+
+    private Long dcId;
+    private Long accountId;
+    private Long templateId;
+    private String path;
+
+    protected DownloadTemplateFromSwiftToSecondaryStorageCommand() {
+
+    }
+
+    public DownloadTemplateFromSwiftToSecondaryStorageCommand(SwiftTO swift, String secondaryStorageUrl, Long dcId, Long accountId, Long templateId, String path, int wait) {
+
+        this.swift = swift;
+        this.secondaryStorageUrl = secondaryStorageUrl;
+        this.dcId = dcId;
+        this.accountId = accountId;
+        this.templateId = templateId;
+        this.path = path;
+        setWait(wait);
+    }
+
+    public SwiftTO getSwift() {
+        return this.swift;
+    }
+
+    public void setSwift(SwiftTO swift) {
+        this.swift = swift;
+    }
+
+    public String getSecondaryStorageUrl() {
+        return secondaryStorageUrl;
+    }
+
+    public Long getDcId() {
+        return dcId;
+    }
+
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    public Long getTemplateId() {
+        return templateId;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        // TODO Auto-generated method stub
+        return true;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/FenceAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/FenceAnswer.java b/core/src/com/cloud/agent/api/FenceAnswer.java
new file mode 100644
index 0000000..7af18f5
--- /dev/null
+++ b/core/src/com/cloud/agent/api/FenceAnswer.java
@@ -0,0 +1,36 @@
+// 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.agent.api;
+
+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/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/FenceCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/FenceCommand.java b/core/src/com/cloud/agent/api/FenceCommand.java
new file mode 100644
index 0000000..a891944
--- /dev/null
+++ b/core/src/com/cloud/agent/api/FenceCommand.java
@@ -0,0 +1,61 @@
+// 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.agent.api;
+
+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();
+        hostGuid = host.getGuid();
+        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;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return inSeq;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/GetDomRVersionAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/GetDomRVersionAnswer.java b/core/src/com/cloud/agent/api/GetDomRVersionAnswer.java
new file mode 100644
index 0000000..7487b57
--- /dev/null
+++ b/core/src/com/cloud/agent/api/GetDomRVersionAnswer.java
@@ -0,0 +1,45 @@
+// 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.agent.api;
+
+public class GetDomRVersionAnswer extends Answer {
+    public static final String ROUTER_NAME = "router.name";
+    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/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/GetDomRVersionCmd.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/GetDomRVersionCmd.java b/core/src/com/cloud/agent/api/GetDomRVersionCmd.java
new file mode 100644
index 0000000..577c386
--- /dev/null
+++ b/core/src/com/cloud/agent/api/GetDomRVersionCmd.java
@@ -0,0 +1,30 @@
+// 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.agent.api;
+
+import com.cloud.agent.api.routing.NetworkElementCommand;
+
+public class GetDomRVersionCmd extends NetworkElementCommand {
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+    public GetDomRVersionCmd() {
+        super();
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/GetFileStatsAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/GetFileStatsAnswer.java b/core/src/com/cloud/agent/api/GetFileStatsAnswer.java
new file mode 100755
index 0000000..f93070e
--- /dev/null
+++ b/core/src/com/cloud/agent/api/GetFileStatsAnswer.java
@@ -0,0 +1,37 @@
+// 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.agent.api;
+
+import com.cloud.agent.api.LogLevel.Log4jLevel;
+import com.cloud.storage.VolumeStats;
+
+@LogLevel(Log4jLevel.Trace)
+public class GetFileStatsAnswer extends Answer implements VolumeStats {
+    long size;
+    protected GetFileStatsAnswer() {
+    }
+
+    public GetFileStatsAnswer(GetFileStatsCommand cmd, long value) {
+        super(cmd);
+        size = value;
+    }
+
+    @Override
+    public long getBytesUsed() {
+        return size;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/GetFileStatsCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/GetFileStatsCommand.java b/core/src/com/cloud/agent/api/GetFileStatsCommand.java
new file mode 100755
index 0000000..c6dc213
--- /dev/null
+++ b/core/src/com/cloud/agent/api/GetFileStatsCommand.java
@@ -0,0 +1,41 @@
+// 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.agent.api;
+
+import com.cloud.agent.api.LogLevel.Log4jLevel;
+import com.cloud.storage.Volume;
+
+@LogLevel(Log4jLevel.Trace)
+public class GetFileStatsCommand extends Command {
+    protected GetFileStatsCommand() {
+    }
+
+    String paths;
+
+    public GetFileStatsCommand(Volume volume) {
+        paths = volume.getPath();
+    }
+
+    public String getPaths() {
+        return paths;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/GetHostStatsAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/GetHostStatsAnswer.java b/core/src/com/cloud/agent/api/GetHostStatsAnswer.java
new file mode 100755
index 0000000..897d7f9
--- /dev/null
+++ b/core/src/com/cloud/agent/api/GetHostStatsAnswer.java
@@ -0,0 +1,88 @@
+// 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.agent.api;
+
+import com.cloud.agent.api.LogLevel.Log4jLevel;
+import com.cloud.host.HostStats;
+
+@LogLevel(Log4jLevel.Trace)
+public class GetHostStatsAnswer extends Answer implements HostStats {
+
+    HostStatsEntry hostStats;
+
+    protected GetHostStatsAnswer() {
+        hostStats = new HostStatsEntry();
+    }
+
+    public GetHostStatsAnswer(GetHostStatsCommand cmd, HostStatsEntry hostStatistics) {
+        super(cmd);
+        this.hostStats = hostStatistics;
+    }
+
+    public GetHostStatsAnswer(GetHostStatsCommand cmd, double cpuUtilization, double freeMemoryKBs, double totalMemoryKBs, double networkReadKBs,
+            double networkWriteKBs, String entityType) {
+        super(cmd);
+        hostStats = new HostStatsEntry();
+
+        hostStats.setCpuUtilization(cpuUtilization);
+        hostStats.setFreeMemoryKBs(freeMemoryKBs);
+        hostStats.setTotalMemoryKBs(totalMemoryKBs);
+        hostStats.setNetworkReadKBs(networkReadKBs);
+        hostStats.setNetworkWriteKBs(networkWriteKBs);
+        hostStats.setEntityType(entityType);
+    }
+
+    @Override
+    public double getUsedMemory() {
+        return hostStats.getUsedMemory();
+    }
+
+    @Override
+    public double getFreeMemoryKBs() {
+        return hostStats.getFreeMemoryKBs();
+    }
+
+    @Override
+    public double getTotalMemoryKBs() {
+        return hostStats.getTotalMemoryKBs();
+    }
+
+    @Override
+    public double getCpuUtilization() {
+        return hostStats.getCpuUtilization();
+    }
+
+    @Override
+    public double getNetworkReadKBs() {
+        return hostStats.getNetworkReadKBs();
+    }
+
+    @Override
+    public double getNetworkWriteKBs() {
+        return hostStats.getNetworkWriteKBs();
+    }
+
+    @Override
+    public String getEntityType() {
+        return hostStats.getEntityType();
+    }
+
+    @Override
+    public HostStats getHostStats() {
+        return hostStats;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/GetHostStatsCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/GetHostStatsCommand.java b/core/src/com/cloud/agent/api/GetHostStatsCommand.java
new file mode 100755
index 0000000..f10a9cd
--- /dev/null
+++ b/core/src/com/cloud/agent/api/GetHostStatsCommand.java
@@ -0,0 +1,53 @@
+// 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.agent.api;
+
+import com.cloud.agent.api.LogLevel.Log4jLevel;
+
+@LogLevel(Log4jLevel.Trace)
+public class GetHostStatsCommand extends Command
+{
+    String hostGuid;
+    String hostName;
+    long hostId;
+
+    protected GetHostStatsCommand() {
+    }
+
+    public GetHostStatsCommand(String hostGuid, String hostName, long hostId) {
+        this.hostGuid = hostGuid;
+        this.hostName = hostName;
+        this.hostId = hostId;
+    }
+
+    public String getHostGuid(){
+        return this.hostGuid;
+    }
+
+    public String getHostName(){
+        return this.hostName;
+    }
+
+    public long getHostId(){
+        return this.hostId;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/GetStorageStatsAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/GetStorageStatsAnswer.java b/core/src/com/cloud/agent/api/GetStorageStatsAnswer.java
new file mode 100755
index 0000000..2443e8e
--- /dev/null
+++ b/core/src/com/cloud/agent/api/GetStorageStatsAnswer.java
@@ -0,0 +1,51 @@
+// 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.agent.api;
+
+import com.cloud.agent.api.LogLevel.Log4jLevel;
+import com.cloud.storage.StorageStats;
+
+@LogLevel(Log4jLevel.Trace)
+public class GetStorageStatsAnswer extends Answer implements StorageStats {
+    protected GetStorageStatsAnswer() {
+    }
+
+    protected long used;
+
+    protected long capacity;
+
+    @Override
+    public long getByteUsed() {
+        return used;
+    }
+
+    @Override
+    public long getCapacityBytes() {
+        return capacity;
+    }
+
+
+    public GetStorageStatsAnswer(GetStorageStatsCommand cmd, long capacity, long used) {
+        super(cmd, true, null);
+        this.capacity = capacity;
+        this.used = used;
+    }
+
+    public GetStorageStatsAnswer(GetStorageStatsCommand cmd, String details) {
+        super(cmd, false, details);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/GetStorageStatsCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/GetStorageStatsCommand.java b/core/src/com/cloud/agent/api/GetStorageStatsCommand.java
new file mode 100755
index 0000000..f7ebd51
--- /dev/null
+++ b/core/src/com/cloud/agent/api/GetStorageStatsCommand.java
@@ -0,0 +1,76 @@
+// 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.agent.api;
+
+import com.cloud.agent.api.LogLevel.Log4jLevel;
+import com.cloud.storage.Storage.StoragePoolType;
+
+@LogLevel(Log4jLevel.Trace)
+public class GetStorageStatsCommand extends Command {
+    private String id;
+    private String localPath;
+    private StoragePoolType pooltype;
+    private String secUrl;
+
+
+    public String getSecUrl() {
+		return secUrl;
+	}
+
+	public void setSecUrl(String secUrl) {
+		this.secUrl = secUrl;
+	}
+
+	public GetStorageStatsCommand() {
+    }
+
+    public StoragePoolType getPooltype() {
+        return pooltype;
+    }
+
+    public void setPooltype(StoragePoolType pooltype) {
+        this.pooltype = pooltype;
+    }
+
+    public GetStorageStatsCommand(String secUrl) {
+        this.secUrl = secUrl;
+    }
+
+    public GetStorageStatsCommand(String id, StoragePoolType pooltype) {
+        this.id = id;
+        this.pooltype = pooltype;
+    }
+
+    public GetStorageStatsCommand(String id, StoragePoolType pooltype, String localPath) {
+        this.id = id;
+        this.pooltype = pooltype;
+        this.localPath = localPath;
+    }
+
+    public String getStorageId() {
+        return this.id;
+    }
+
+    public String getLocalPath() {
+        return this.localPath;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/GetVmStatsAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/GetVmStatsAnswer.java b/core/src/com/cloud/agent/api/GetVmStatsAnswer.java
new file mode 100755
index 0000000..c02eb9a
--- /dev/null
+++ b/core/src/com/cloud/agent/api/GetVmStatsAnswer.java
@@ -0,0 +1,40 @@
+// 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.agent.api;
+
+import java.util.HashMap;
+
+import com.cloud.agent.api.LogLevel.Log4jLevel;
+
+@LogLevel(Log4jLevel.Trace)
+public class GetVmStatsAnswer extends Answer {
+
+    HashMap<String, VmStatsEntry> vmStatsMap;
+
+    public GetVmStatsAnswer(GetVmStatsCommand cmd, HashMap<String, VmStatsEntry> vmStatsMap) {
+        super(cmd);
+        this.vmStatsMap = vmStatsMap;
+    }
+
+    public HashMap<String, VmStatsEntry> getVmStatsMap() {
+        return vmStatsMap;
+    }
+
+    protected GetVmStatsAnswer() {
+        //no-args constructor for json serialization-deserialization
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/GetVmStatsCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/GetVmStatsCommand.java b/core/src/com/cloud/agent/api/GetVmStatsCommand.java
new file mode 100755
index 0000000..41b0f98
--- /dev/null
+++ b/core/src/com/cloud/agent/api/GetVmStatsCommand.java
@@ -0,0 +1,54 @@
+// 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.agent.api;
+
+import java.util.List;
+
+import com.cloud.agent.api.LogLevel.Log4jLevel;
+
+@LogLevel(Log4jLevel.Trace)
+public class GetVmStatsCommand extends Command {
+    List<String> vmNames;
+    String hostGuid;
+    String hostName;
+
+    protected GetVmStatsCommand() {
+    }
+
+    public GetVmStatsCommand(List<String> vmNames, String hostGuid, String hostName) {
+        this.vmNames = vmNames;
+        this.hostGuid = hostGuid;
+        this.hostName = hostName;
+    }
+
+    public List<String> getVmNames() {
+        return vmNames;
+    }
+
+    public String getHostGuid(){
+        return this.hostGuid;
+    }
+
+    public String getHostName(){
+        return this.hostName;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/GetVncPortAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/GetVncPortAnswer.java b/core/src/com/cloud/agent/api/GetVncPortAnswer.java
new file mode 100644
index 0000000..5e94a18
--- /dev/null
+++ b/core/src/com/cloud/agent/api/GetVncPortAnswer.java
@@ -0,0 +1,48 @@
+// 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.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/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/GetVncPortCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/GetVncPortCommand.java b/core/src/com/cloud/agent/api/GetVncPortCommand.java
new file mode 100644
index 0000000..06165dc
--- /dev/null
+++ b/core/src/com/cloud/agent/api/GetVncPortCommand.java
@@ -0,0 +1,43 @@
+// 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.agent.api;
+
+public class GetVncPortCommand extends Command {
+    long id;
+    String name;
+
+    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/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/HostStatsEntry.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/HostStatsEntry.java b/core/src/com/cloud/agent/api/HostStatsEntry.java
new file mode 100644
index 0000000..0d8cfb2
--- /dev/null
+++ b/core/src/com/cloud/agent/api/HostStatsEntry.java
@@ -0,0 +1,113 @@
+// 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.agent.api;
+
+import com.cloud.host.HostStats;
+
+public class HostStatsEntry implements HostStats {
+
+	long hostId;
+	String entityType;
+	double cpuUtilization;
+	double networkReadKBs;
+	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)
+    {
+        this.hostId = hostId;
+        this.entityType = entityType;
+        this.cpuUtilization = cpuUtilization;
+        this.networkReadKBs = networkReadKBs;
+        this.networkWriteKBs = networkWriteKBs;
+        this.totalMemoryKBs = totalMemoryKBs;
+        this.freeMemoryKBs = freeMemoryKBs;
+    }
+
+	@Override
+    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;
+    }
+
+	@Override
+    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;
+    }
+
+	@Override
+    public double getFreeMemoryKBs(){
+    	return this.freeMemoryKBs;
+    }
+
+    public void setFreeMemoryKBs(double freeMemoryKBs){
+    	this.freeMemoryKBs = freeMemoryKBs;
+    }
+
+	@Override
+	public double getCpuUtilization() {
+		return this.cpuUtilization;
+	}
+
+	public void setCpuUtilization(double cpuUtilization) {
+		this.cpuUtilization = cpuUtilization;
+	}
+
+	@Override
+	public double getUsedMemory() {
+		return (totalMemoryKBs-freeMemoryKBs);
+	}
+
+	@Override
+	public HostStats getHostStats() {
+		return this;
+	}
+
+	public void setHostId(long hostId) {
+		this.hostId = hostId;
+	}
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/MaintainAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/MaintainAnswer.java b/core/src/com/cloud/agent/api/MaintainAnswer.java
new file mode 100644
index 0000000..dcfdab3
--- /dev/null
+++ b/core/src/com/cloud/agent/api/MaintainAnswer.java
@@ -0,0 +1,46 @@
+// 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.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/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/MaintainCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/MaintainCommand.java b/core/src/com/cloud/agent/api/MaintainCommand.java
new file mode 100644
index 0000000..2a9b9a5
--- /dev/null
+++ b/core/src/com/cloud/agent/api/MaintainCommand.java
@@ -0,0 +1,28 @@
+// 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.agent.api;
+
+public class MaintainCommand extends Command {
+
+    public MaintainCommand() {
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/ManageSnapshotAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/ManageSnapshotAnswer.java b/core/src/com/cloud/agent/api/ManageSnapshotAnswer.java
new file mode 100644
index 0000000..e490bdf
--- /dev/null
+++ b/core/src/com/cloud/agent/api/ManageSnapshotAnswer.java
@@ -0,0 +1,40 @@
+// 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.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);
+    	_snapshotPath = snapshotPath;
+    }
+
+    public String getSnapshotPath() {
+    	return _snapshotPath;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/ManageSnapshotCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/ManageSnapshotCommand.java b/core/src/com/cloud/agent/api/ManageSnapshotCommand.java
new file mode 100644
index 0000000..5effc54
--- /dev/null
+++ b/core/src/com/cloud/agent/api/ManageSnapshotCommand.java
@@ -0,0 +1,92 @@
+// 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.agent.api;
+
+import com.cloud.agent.api.to.StorageFilerTO;
+import com.cloud.storage.StoragePool;
+
+
+public class ManageSnapshotCommand extends Command {
+    // XXX: Should be an enum
+    // 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;
+
+    // Information about the snapshot
+    private String _snapshotPath = null;
+    private String _snapshotName = null;
+    private long _snapshotId;
+    private String _vmName = null;
+
+    public ManageSnapshotCommand() {}
+
+    public ManageSnapshotCommand(long snapshotId, String volumePath, StoragePool pool, String preSnapshotPath ,String snapshotName, String vmName) {
+        _commandSwitch = ManageSnapshotCommand.CREATE_SNAPSHOT;
+        _volumePath = volumePath;
+        _pool = new StorageFilerTO(pool);
+        _snapshotPath = preSnapshotPath;
+        _snapshotName = snapshotName;
+        _snapshotId = snapshotId;
+        _vmName = vmName;
+    }
+
+    public ManageSnapshotCommand(long snapshotId, String snapshotPath) {
+        _commandSwitch = ManageSnapshotCommand.DESTROY_SNAPSHOT;
+        _snapshotPath = snapshotPath;
+    }
+
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+    public String getCommandSwitch() {
+        return _commandSwitch;
+    }
+
+    public String getVolumePath() {
+        return _volumePath;
+    }
+
+    public StorageFilerTO getPool() {
+        return _pool;
+    }
+
+    public String getSnapshotPath() {
+    	return _snapshotPath;
+    }
+
+    public String getSnapshotName() {
+        return _snapshotName;
+    }
+
+    public long getSnapshotId() {
+        return _snapshotId;
+    }
+
+    public String getVmName() {
+    	return _vmName;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/MigrateAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/MigrateAnswer.java b/core/src/com/cloud/agent/api/MigrateAnswer.java
new file mode 100644
index 0000000..19d690a
--- /dev/null
+++ b/core/src/com/cloud/agent/api/MigrateAnswer.java
@@ -0,0 +1,33 @@
+// 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.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/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/MigrateCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/MigrateCommand.java b/core/src/com/cloud/agent/api/MigrateCommand.java
new file mode 100644
index 0000000..5042b8c
--- /dev/null
+++ b/core/src/com/cloud/agent/api/MigrateCommand.java
@@ -0,0 +1,59 @@
+// 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.agent.api;
+
+public class MigrateCommand extends Command {
+    String vmName;
+    String destIp;
+    String hostGuid;
+    boolean isWindows;
+
+
+    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;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/MigrateWithStorageAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/MigrateWithStorageAnswer.java b/core/src/com/cloud/agent/api/MigrateWithStorageAnswer.java
new file mode 100644
index 0000000..06aff32
--- /dev/null
+++ b/core/src/com/cloud/agent/api/MigrateWithStorageAnswer.java
@@ -0,0 +1,39 @@
+// 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.agent.api;
+
+import java.util.List;
+import com.cloud.agent.api.to.VolumeTO;
+
+public class MigrateWithStorageAnswer extends Answer {
+
+    List<VolumeTO> volumeTos;
+
+    public MigrateWithStorageAnswer(MigrateWithStorageCommand cmd, Exception ex) {
+        super(cmd, ex);
+        volumeTos = null;
+    }
+
+    public MigrateWithStorageAnswer(MigrateWithStorageCommand cmd, List<VolumeTO> volumeTos) {
+        super(cmd, true, null);
+        this.volumeTos = volumeTos;
+    }
+
+    public List<VolumeTO> getVolumeTos() {
+        return volumeTos;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/MigrateWithStorageCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/MigrateWithStorageCommand.java b/core/src/com/cloud/agent/api/MigrateWithStorageCommand.java
new file mode 100644
index 0000000..058aa15
--- /dev/null
+++ b/core/src/com/cloud/agent/api/MigrateWithStorageCommand.java
@@ -0,0 +1,45 @@
+// 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.agent.api;
+
+import java.util.Map;
+import com.cloud.agent.api.to.VirtualMachineTO;
+import com.cloud.agent.api.to.VolumeTO;
+import com.cloud.agent.api.to.StorageFilerTO;
+
+public class MigrateWithStorageCommand extends Command {
+    VirtualMachineTO vm;
+    Map<VolumeTO, StorageFilerTO> volumeToFiler;
+
+    public MigrateWithStorageCommand(VirtualMachineTO vm, Map<VolumeTO, StorageFilerTO> volumeToFiler) {
+        this.vm = vm;
+        this.volumeToFiler = volumeToFiler;
+    }
+
+    public VirtualMachineTO getVirtualMachine() {
+        return vm;
+    }
+
+    public Map<VolumeTO, StorageFilerTO> getVolumeToFiler() {
+        return volumeToFiler;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/MigrateWithStorageCompleteAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/MigrateWithStorageCompleteAnswer.java b/core/src/com/cloud/agent/api/MigrateWithStorageCompleteAnswer.java
new file mode 100644
index 0000000..920cf48
--- /dev/null
+++ b/core/src/com/cloud/agent/api/MigrateWithStorageCompleteAnswer.java
@@ -0,0 +1,38 @@
+// 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.agent.api;
+
+import java.util.List;
+import com.cloud.agent.api.to.VolumeTO;
+
+public class MigrateWithStorageCompleteAnswer extends Answer {
+    List<VolumeTO> volumeTos;
+
+    public MigrateWithStorageCompleteAnswer(MigrateWithStorageCompleteCommand cmd, Exception ex) {
+        super(cmd, ex);
+        volumeTos = null;
+    }
+
+    public MigrateWithStorageCompleteAnswer(MigrateWithStorageCompleteCommand cmd, List<VolumeTO> volumeTos) {
+        super(cmd, true, null);
+        this.volumeTos = volumeTos;
+    }
+
+    public List<VolumeTO> getVolumeTos() {
+        return volumeTos;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/MigrateWithStorageCompleteCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/MigrateWithStorageCompleteCommand.java b/core/src/com/cloud/agent/api/MigrateWithStorageCompleteCommand.java
new file mode 100644
index 0000000..1303c07
--- /dev/null
+++ b/core/src/com/cloud/agent/api/MigrateWithStorageCompleteCommand.java
@@ -0,0 +1,36 @@
+// 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.agent.api;
+
+import com.cloud.agent.api.to.VirtualMachineTO;
+
+public class MigrateWithStorageCompleteCommand extends Command {
+    VirtualMachineTO vm;
+
+    public MigrateWithStorageCompleteCommand(VirtualMachineTO vm) {
+        this.vm = vm;
+    }
+
+    public VirtualMachineTO getVirtualMachine() {
+        return vm;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/MigrateWithStorageReceiveAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/MigrateWithStorageReceiveAnswer.java b/core/src/com/cloud/agent/api/MigrateWithStorageReceiveAnswer.java
new file mode 100644
index 0000000..3bf521c
--- /dev/null
+++ b/core/src/com/cloud/agent/api/MigrateWithStorageReceiveAnswer.java
@@ -0,0 +1,55 @@
+// 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.agent.api;
+
+import java.util.Map;
+import com.cloud.agent.api.to.VolumeTO;
+import com.cloud.agent.api.to.NicTO;
+
+public class MigrateWithStorageReceiveAnswer extends Answer {
+
+    Map<VolumeTO, Object> volumeToSr;
+    Map<NicTO, Object> nicToNetwork;
+    Map<String, String> token;
+
+    public MigrateWithStorageReceiveAnswer(MigrateWithStorageReceiveCommand cmd, Exception ex) {
+        super(cmd, ex);
+        volumeToSr = null;
+        nicToNetwork = null;
+        token = null;
+    }
+
+    public MigrateWithStorageReceiveAnswer(MigrateWithStorageReceiveCommand cmd, Map<VolumeTO, Object> volumeToSr,
+            Map<NicTO, Object> nicToNetwork, Map<String, String> token) {
+        super(cmd, true, null);
+        this.volumeToSr = volumeToSr;
+        this.nicToNetwork = nicToNetwork;
+        this.token = token;
+    }
+
+    public Map<VolumeTO, Object> getVolumeToSr() {
+        return volumeToSr;
+    }
+
+    public Map<NicTO, Object> getNicToNetwork() {
+        return nicToNetwork;
+    }
+
+    public Map<String, String> getToken() {
+        return token;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/MigrateWithStorageReceiveCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/MigrateWithStorageReceiveCommand.java b/core/src/com/cloud/agent/api/MigrateWithStorageReceiveCommand.java
new file mode 100644
index 0000000..df67405
--- /dev/null
+++ b/core/src/com/cloud/agent/api/MigrateWithStorageReceiveCommand.java
@@ -0,0 +1,45 @@
+// 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.agent.api;
+
+import java.util.Map;
+import com.cloud.agent.api.to.VirtualMachineTO;
+import com.cloud.agent.api.to.VolumeTO;
+import com.cloud.agent.api.to.StorageFilerTO;
+
+public class MigrateWithStorageReceiveCommand extends Command {
+    VirtualMachineTO vm;
+    Map<VolumeTO, StorageFilerTO> volumeToFiler;
+
+    public MigrateWithStorageReceiveCommand(VirtualMachineTO vm, Map<VolumeTO, StorageFilerTO> volumeToFiler) {
+        this.vm = vm;
+        this.volumeToFiler = volumeToFiler;
+    }
+
+    public VirtualMachineTO getVirtualMachine() {
+        return vm;
+    }
+
+    public Map<VolumeTO, StorageFilerTO> getVolumeToFiler() {
+        return volumeToFiler;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/MigrateWithStorageSendAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/MigrateWithStorageSendAnswer.java b/core/src/com/cloud/agent/api/MigrateWithStorageSendAnswer.java
new file mode 100644
index 0000000..7cf641f
--- /dev/null
+++ b/core/src/com/cloud/agent/api/MigrateWithStorageSendAnswer.java
@@ -0,0 +1,39 @@
+// 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.agent.api;
+
+import java.util.Set;
+import com.cloud.agent.api.to.VolumeTO;
+
+public class MigrateWithStorageSendAnswer extends Answer {
+
+    Set<VolumeTO> volumeToSet;
+
+    public MigrateWithStorageSendAnswer(MigrateWithStorageSendCommand cmd, Exception ex) {
+        super(cmd, ex);
+        volumeToSet = null;
+    }
+
+    public MigrateWithStorageSendAnswer(MigrateWithStorageSendCommand cmd, Set<VolumeTO> volumeToSet) {
+        super(cmd, true, null);
+        this.volumeToSet = volumeToSet;
+    }
+
+    public Set<VolumeTO> getVolumeToSet() {
+        return volumeToSet;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/MigrateWithStorageSendCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/MigrateWithStorageSendCommand.java b/core/src/com/cloud/agent/api/MigrateWithStorageSendCommand.java
new file mode 100644
index 0000000..d10db30
--- /dev/null
+++ b/core/src/com/cloud/agent/api/MigrateWithStorageSendCommand.java
@@ -0,0 +1,58 @@
+// 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.agent.api;
+
+import java.util.Map;
+import com.cloud.agent.api.to.VirtualMachineTO;
+import com.cloud.agent.api.to.VolumeTO;
+import com.cloud.agent.api.to.NicTO;
+
+public class MigrateWithStorageSendCommand extends Command {
+    VirtualMachineTO vm;
+    Map<VolumeTO, Object> volumeToSr;
+    Map<NicTO, Object> nicToNetwork;
+    Map<String, String> token;
+
+    public MigrateWithStorageSendCommand(VirtualMachineTO vm, Map<VolumeTO, Object> volumeToSr,
+            Map<NicTO, Object> nicToNetwork, Map<String, String> token) {
+        this.vm = vm;
+        this.volumeToSr = volumeToSr;
+        this.nicToNetwork = nicToNetwork;
+        this.token = token;
+    }
+
+    public VirtualMachineTO getVirtualMachine() {
+        return vm;
+    }
+
+    public Map<VolumeTO, Object> getVolumeToSr() {
+        return volumeToSr;
+    }
+
+    public Map<NicTO, Object> getNicToNetwork() {
+        return nicToNetwork;
+    }
+
+    public Map<String, String> getToken() {
+        return token;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/ModifySshKeysCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/ModifySshKeysCommand.java b/core/src/com/cloud/agent/api/ModifySshKeysCommand.java
new file mode 100644
index 0000000..c078973
--- /dev/null
+++ b/core/src/com/cloud/agent/api/ModifySshKeysCommand.java
@@ -0,0 +1,44 @@
+// 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.agent.api;
+
+import com.cloud.agent.api.LogLevel.Log4jLevel;
+
+public class ModifySshKeysCommand extends Command {
+    @LogLevel(Log4jLevel.Off)
+    private String _pubKey;
+    @LogLevel(Log4jLevel.Off)
+    private String _prvKey;
+
+    public ModifySshKeysCommand() {
+
+    }
+    public ModifySshKeysCommand(String pubKey, String prvKey) {
+        _pubKey = pubKey;
+        _prvKey = prvKey;
+    }
+    public String getPubKey() {
+        return _pubKey;
+    }
+    public String getPrvKey() {
+        return _prvKey;
+    }
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java b/core/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java
new file mode 100644
index 0000000..df77985
--- /dev/null
+++ b/core/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java
@@ -0,0 +1,57 @@
+// 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.agent.api;
+
+import java.util.Map;
+
+import com.cloud.storage.template.TemplateInfo;
+
+public class ModifyStoragePoolAnswer extends Answer {
+    StoragePoolInfo poolInfo;
+    Map<String, TemplateInfo> templateInfo;
+
+    protected ModifyStoragePoolAnswer() {
+    }
+
+    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(),
+                cmd.getPool().getType(), capacityBytes, availableBytes );
+
+        this.templateInfo = tInfo;
+    }
+
+    public StoragePoolInfo getPoolInfo() {
+       return poolInfo;
+    }
+
+    public void setPoolInfo(StoragePoolInfo poolInfo) {
+        this.poolInfo = poolInfo;
+    }
+
+
+    public Map<String, TemplateInfo> getTemplateInfo() {
+        return templateInfo;
+    }
+
+    public void setTemplateInfo(Map<String, TemplateInfo> templateInfo) {
+        this.templateInfo = templateInfo;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/ModifyStoragePoolCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/ModifyStoragePoolCommand.java b/core/src/com/cloud/agent/api/ModifyStoragePoolCommand.java
new file mode 100644
index 0000000..8bc956d
--- /dev/null
+++ b/core/src/com/cloud/agent/api/ModifyStoragePoolCommand.java
@@ -0,0 +1,75 @@
+// 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.agent.api;
+
+import java.io.File;
+import java.util.UUID;
+
+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()));
+	}
+
+    public StorageFilerTO getPool() {
+        return pool;
+    }
+
+    public void setPool(StoragePool pool) {
+        this.pool = new StorageFilerTO(pool);
+    }
+
+	public boolean getAdd() {
+    	return add;
+    }
+
+	@Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+	public String getLocalPath() {
+		return localPath;
+	}
+
+	public void setOptions(String[] options) {
+		this.options = options;
+	}
+
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/NetworkUsageAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/NetworkUsageAnswer.java b/core/src/com/cloud/agent/api/NetworkUsageAnswer.java
new file mode 100644
index 0000000..fd8ebda
--- /dev/null
+++ b/core/src/com/cloud/agent/api/NetworkUsageAnswer.java
@@ -0,0 +1,61 @@
+// 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.agent.api;
+
+import com.cloud.agent.api.LogLevel.Log4jLevel;
+
+@LogLevel(Log4jLevel.Debug)
+public class NetworkUsageAnswer extends Answer {
+	String routerName;
+	Long bytesSent;
+    Long bytesReceived;
+
+    protected NetworkUsageAnswer() {
+    }
+
+    public NetworkUsageAnswer(NetworkUsageCommand cmd, String details, Long bytesSent, Long bytesReceived) {
+        super(cmd, true, details);
+        this.bytesReceived = bytesReceived;
+        this.bytesSent = bytesSent;
+        routerName = cmd.getDomRName();
+    }
+
+    public NetworkUsageAnswer(Command command, Exception e) {
+        super(command, e);
+    }
+
+
+    public void setBytesReceived(Long bytesReceived) {
+        this.bytesReceived = bytesReceived;
+    }
+
+    public Long getBytesReceived() {
+        return bytesReceived;
+    }
+
+    public void setBytesSent(Long bytesSent) {
+        this.bytesSent = bytesSent;
+    }
+
+    public Long getBytesSent() {
+        return bytesSent;
+    }
+
+	public String getRouterName() {
+		return routerName;
+	}
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/NetworkUsageCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/NetworkUsageCommand.java b/core/src/com/cloud/agent/api/NetworkUsageCommand.java
new file mode 100644
index 0000000..6cbf93b
--- /dev/null
+++ b/core/src/com/cloud/agent/api/NetworkUsageCommand.java
@@ -0,0 +1,98 @@
+// 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.agent.api;
+
+import com.cloud.agent.api.LogLevel.Log4jLevel;
+
+@LogLevel(Log4jLevel.Trace)
+public class NetworkUsageCommand extends Command {
+    private String privateIP;
+    private String domRName;
+    private String option;
+    boolean forVpc = false;
+    private String gatewayIP;
+    private String vpcCIDR;
+
+    protected NetworkUsageCommand() {
+
+    }
+
+    public NetworkUsageCommand(String privateIP, String domRName, boolean forVpc, String gatewayIP)
+    {
+        this.privateIP = privateIP;
+        this.domRName = domRName;
+        this.forVpc = forVpc;
+        this.gatewayIP = gatewayIP;
+        this.option = "get";
+    }
+
+    public NetworkUsageCommand(String privateIP, String domRName, String option, boolean forVpc)
+    {
+        this.privateIP = privateIP;
+        this.domRName = domRName;
+        this.option = option;
+        this.forVpc = forVpc;
+    }
+
+    public NetworkUsageCommand(String privateIP, String domRName, boolean forVpc, String gatewayIP, String vpcCIDR)
+    {
+        this.privateIP = privateIP;
+        this.domRName = domRName;
+        this.forVpc = forVpc;
+        this.gatewayIP = gatewayIP;
+        this.option = "create";
+        this.vpcCIDR = vpcCIDR;
+    }
+
+    public NetworkUsageCommand(String privateIP, String domRName, String option, boolean forVpc, String gatewayIP)
+    {
+        this.privateIP = privateIP;
+        this.domRName = domRName;
+        this.forVpc = forVpc;
+        this.gatewayIP = gatewayIP;
+        this.option = option;
+    }
+
+    public String getPrivateIP() {
+        return privateIP;
+    }
+
+    public String getDomRName() {
+        return domRName;
+    }
+
+    public String getOption() {
+        return option;
+    }
+
+    public boolean isForVpc() {
+        return forVpc;
+    }
+
+	public String getVpcCIDR() {
+		return vpcCIDR;
+	}
+
+	public String getGatewayIP() {
+		return gatewayIP;
+	}
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/PingAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/PingAnswer.java b/core/src/com/cloud/agent/api/PingAnswer.java
new file mode 100644
index 0000000..d9ed89c
--- /dev/null
+++ b/core/src/com/cloud/agent/api/PingAnswer.java
@@ -0,0 +1,33 @@
+// 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.agent.api;
+
+public class PingAnswer extends Answer {
+    private PingCommand _command = null;
+
+    protected PingAnswer() {
+    }
+
+    public PingAnswer(PingCommand cmd) {
+        super(cmd);
+        _command = cmd;
+    }
+
+    public PingCommand getCommand() {
+        return _command;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/PingCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/PingCommand.java b/core/src/com/cloud/agent/api/PingCommand.java
new file mode 100755
index 0000000..8d9681f
--- /dev/null
+++ b/core/src/com/cloud/agent/api/PingCommand.java
@@ -0,0 +1,45 @@
+// 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.agent.api;
+
+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/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/PingRoutingCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/PingRoutingCommand.java b/core/src/com/cloud/agent/api/PingRoutingCommand.java
new file mode 100755
index 0000000..e25ac62
--- /dev/null
+++ b/core/src/com/cloud/agent/api/PingRoutingCommand.java
@@ -0,0 +1,54 @@
+// 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.agent.api;
+
+import java.util.Map;
+
+import com.cloud.host.Host;
+import com.cloud.vm.VirtualMachine.State;
+
+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;
+    }
+
+    public boolean isGatewayAccessible() {
+        return _gatewayAccessible;
+    }
+    public void setGatewayAccessible(boolean gatewayAccessible) {
+        _gatewayAccessible = gatewayAccessible;
+    }
+
+    public boolean isVnetAccessible() {
+        return _vnetAccessible;
+    }
+    public void setVnetAccessible(boolean vnetAccessible) {
+        _vnetAccessible = vnetAccessible;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/PingRoutingWithNwGroupsCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/PingRoutingWithNwGroupsCommand.java b/core/src/com/cloud/agent/api/PingRoutingWithNwGroupsCommand.java
new file mode 100644
index 0000000..51226bc
--- /dev/null
+++ b/core/src/com/cloud/agent/api/PingRoutingWithNwGroupsCommand.java
@@ -0,0 +1,46 @@
+// 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.agent.api;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.cloud.host.Host;
+import com.cloud.utils.Pair;
+import com.cloud.vm.VirtualMachine.State;
+
+
+public class PingRoutingWithNwGroupsCommand extends PingRoutingCommand {
+	HashMap<String, Pair<Long, Long>> newGroupStates;
+
+	protected PingRoutingWithNwGroupsCommand() {
+		super();
+	}
+
+	public PingRoutingWithNwGroupsCommand(Host.Type type, long id, Map<String, State> states, HashMap<String, Pair<Long, Long>> nwGrpStates) {
+		super(type, id, states);
+		newGroupStates = nwGrpStates;
+	}
+
+	public HashMap<String, Pair<Long, Long>> getNewGroupStates() {
+		return newGroupStates;
+	}
+
+	public void setNewGroupStates(HashMap<String, Pair<Long, Long>> newGroupStates) {
+		this.newGroupStates = newGroupStates;
+	}
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/PingRoutingWithOvsCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/PingRoutingWithOvsCommand.java b/core/src/com/cloud/agent/api/PingRoutingWithOvsCommand.java
new file mode 100644
index 0000000..d44987b
--- /dev/null
+++ b/core/src/com/cloud/agent/api/PingRoutingWithOvsCommand.java
@@ -0,0 +1,42 @@
+// 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.agent.api;
+
+import java.util.List;
+import java.util.Map;
+
+import com.cloud.host.Host;
+import com.cloud.utils.Pair;
+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/cloudstack/blob/c11dbad9/core/src/com/cloud/agent/api/PingStorageCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/PingStorageCommand.java b/core/src/com/cloud/agent/api/PingStorageCommand.java
new file mode 100755
index 0000000..438ab50
--- /dev/null
+++ b/core/src/com/cloud/agent/api/PingStorageCommand.java
@@ -0,0 +1,37 @@
+// 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.agent.api;
+
+import java.util.Map;
+
+import com.cloud.host.Host;
+
+public class PingStorageCommand extends PingCommand {
+    Map<String, Boolean> changes;
+
+    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;
+    }
+}


Mime
View raw message