You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2015/11/18 12:11:20 UTC

[6/7] git commit: updated refs/heads/master to 95ae796

CLOUDSTACK-8832 : Update Nuage VSP plugin to work with Nuage VSP release 3.2


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/645f8758
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/645f8758
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/645f8758

Branch: refs/heads/master
Commit: 645f8758df3a2d22d4583d385492187285393a89
Parents: fb4e6ed
Author: Nick Livens <ni...@nuagenetworks.net>
Authored: Tue Oct 27 14:56:57 2015 +0100
Committer: Nick Livens <ni...@nuagenetworks.net>
Committed: Tue Oct 27 14:56:57 2015 +0100

----------------------------------------------------------------------
 api/src/com/cloud/agent/api/Answer.java         |  22 +
 api/src/com/cloud/agent/api/Command.java        |  20 +
 api/src/com/cloud/event/EventTypes.java         |   1 +
 api/src/com/cloud/network/Network.java          |   1 -
 client/tomcatconf/commands.properties.in        |   1 +
 core/src/com/cloud/agent/api/PingCommand.java   |  22 +
 .../src/com/cloud/network/dao/IPAddressDao.java |   2 +
 .../com/cloud/network/dao/IPAddressDaoImpl.java |   8 +
 .../cloud/network/vpc/NetworkACLItemDao.java    |   2 +-
 .../com/cloud/network/vpc/VpcOfferingVO.java    |   8 +
 .../network/vpc/dao/NetworkACLItemDaoImpl.java  |   5 +-
 plugins/network-elements/nuage-vsp/pom.xml      |   7 +
 .../src/com/cloud/agent/api/CmdBuilder.java     |  24 +
 .../cloud/agent/api/PingNuageVspCommand.java    |  56 ++
 .../com/cloud/agent/api/StartupVspCommand.java  |   5 +
 .../com/cloud/agent/api/VspResourceAnswer.java  |  20 +-
 .../com/cloud/agent/api/VspResourceCommand.java |  53 +-
 .../api/element/ApplyAclRuleVspAnswer.java      |  34 -
 .../api/element/ApplyAclRuleVspCommand.java     | 195 ++++-
 .../api/element/ApplyStaticNatVspAnswer.java    |  34 -
 .../api/element/ApplyStaticNatVspCommand.java   | 104 ++-
 .../agent/api/element/ImplementVspCommand.java  | 297 ++++++++
 .../agent/api/element/ShutDownVpcVspAnswer.java |  34 -
 .../api/element/ShutDownVpcVspCommand.java      |  63 +-
 .../agent/api/guru/DeallocateVmVspAnswer.java   |  34 -
 .../agent/api/guru/DeallocateVmVspCommand.java  | 162 +++-
 .../api/guru/ImplementNetworkVspAnswer.java     |  35 -
 .../api/guru/ImplementNetworkVspCommand.java    | 278 ++++++-
 .../agent/api/guru/ReleaseVmVspAnswer.java      |  34 -
 .../agent/api/guru/ReleaseVmVspCommand.java     |  54 --
 .../api/guru/ReserveVmInterfaceVspAnswer.java   |  44 --
 .../api/guru/ReserveVmInterfaceVspCommand.java  | 327 +++++++-
 .../agent/api/guru/TrashNetworkVspAnswer.java   |  34 -
 .../agent/api/guru/TrashNetworkVspCommand.java  |  97 ++-
 .../api/manager/GetClientDefaultsAnswer.java    |  81 ++
 .../api/manager/GetClientDefaultsCommand.java   |  38 +
 .../api/manager/SupportedApiVersionCommand.java |  61 ++
 .../cloud/agent/api/sync/SyncDomainAnswer.java  |  57 ++
 .../cloud/agent/api/sync/SyncDomainCommand.java |  93 +++
 .../agent/api/sync/SyncNuageVspCmsIdAnswer.java |  73 ++
 .../api/sync/SyncNuageVspCmsIdCommand.java      |  72 ++
 .../com/cloud/agent/api/sync/SyncVspAnswer.java |  34 -
 .../cloud/agent/api/sync/SyncVspCommand.java    |  22 +-
 .../api/commands/AddNuageVspDeviceCmd.java      |  25 +-
 .../api/commands/DeleteNuageVspDeviceCmd.java   |  21 +-
 .../IssueNuageVspResourceRequestCmd.java        |  34 +-
 .../api/commands/ListNuageVspDevicesCmd.java    |  28 +-
 .../api/commands/UpdateNuageVspDeviceCmd.java   | 180 +++++
 .../api/response/NuageVspDeviceResponse.java    |   5 +-
 .../api/response/NuageVspResourceResponse.java  |   3 +-
 .../src/com/cloud/network/NuageVspDeviceVO.java |   5 +-
 .../src/com/cloud/network/dao/NuageVspDao.java  |   8 +
 .../com/cloud/network/dao/NuageVspDaoImpl.java  |  20 +-
 .../cloud/network/element/NuageVspElement.java  | 342 +++++++--
 .../network/guru/NuageVspGuestNetworkGuru.java  | 512 ++++++++-----
 .../cloud/network/manager/NuageVspManager.java  |  53 +-
 .../network/manager/NuageVspManagerImpl.java    | 748 ++++++++++++++++---
 .../network/resource/NuageVspResource.java      | 543 ++++++++++----
 .../cloud/network/sync/NuageVspSyncImpl.java    |  35 +-
 .../src/com/cloud/util/NuageVspUtil.java        |  40 +
 .../vsp/acs/NuageVspPluginClientLoader.java     |  89 ++-
 .../nuage/vsp/acs/client/NuageVspApiClient.java |  10 +-
 .../vsp/acs/client/NuageVspElementClient.java   |  16 +-
 .../vsp/acs/client/NuageVspGuruClient.java      |  23 +-
 .../vsp/acs/client/NuageVspManagerClient.java   |  42 ++
 .../vsp/acs/client/NuageVspSyncClient.java      |   6 +-
 .../test/com/cloud/agent/api/CommandsTest.java  | 151 ++++
 .../network/element/NuageVspElementTest.java    | 137 +++-
 .../guru/NuageVspGuestNetworkGuruTest.java      | 212 ++++--
 .../network/manager/NuageVspManagerTest.java    |  37 +-
 .../network/resource/NuageVspResourceTest.java  | 199 +++--
 .../cloud/network/sync/NuageVspSyncTest.java    |  23 +-
 .../configuration/ConfigurationManagerImpl.java |   7 +-
 .../cloud/network/guru/DirectNetworkGuru.java   |   6 +-
 test/integration/component/test_nuage_vsp.py    |  61 +-
 .../component/test_vpcnetwork_nuage.py          | 295 ++++++++
 76 files changed, 5184 insertions(+), 1380 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/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 fd6a0d1..17bba76 100644
--- a/api/src/com/cloud/agent/api/Answer.java
+++ b/api/src/com/cloud/agent/api/Answer.java
@@ -59,4 +59,26 @@ public class Answer extends Command {
     public static UnsupportedAnswer createUnsupportedVersionAnswer(final Command cmd) {
         return new UnsupportedAnswer(cmd, "Unsuppored Version.");
     }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof Answer)) return false;
+        if (!super.equals(o)) return false;
+
+        Answer answer = (Answer) o;
+
+        if (result != answer.result) return false;
+        if (details != null ? !details.equals(answer.details) : answer.details != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result1 = super.hashCode();
+        result1 = 31 * result1 + (result ? 1 : 0);
+        result1 = 31 * result1 + (details != null ? details.hashCode() : 0);
+        return result1;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/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 2341a99..4a698e4 100644
--- a/api/src/com/cloud/agent/api/Command.java
+++ b/api/src/com/cloud/agent/api/Command.java
@@ -73,4 +73,24 @@ public abstract class Command {
     public boolean allowCaching() {
         return true;
     }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof Command)) return false;
+
+        Command command = (Command) o;
+
+        if (wait != command.wait) return false;
+        if (contextMap != null ? !contextMap.equals(command.contextMap) : command.contextMap != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = contextMap != null ? contextMap.hashCode() : 0;
+        result = 31 * result + wait;
+        return result;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/api/src/com/cloud/event/EventTypes.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/event/EventTypes.java b/api/src/com/cloud/event/EventTypes.java
index 9a264a5..7349c1f 100644
--- a/api/src/com/cloud/event/EventTypes.java
+++ b/api/src/com/cloud/event/EventTypes.java
@@ -434,6 +434,7 @@ public class EventTypes {
 
     // external network mapping events
     public static final String EVENT_EXTERNAL_VSP_VSD_ADD = "PHYSICAL.NUAGE.VSD.ADD";
+    public static final String EVENT_EXTERNAL_VSP_VSD_UPDATE = "PHYSICAL.NUAGE.VSD.UPDATE";
     public static final String EVENT_EXTERNAL_VSP_VSD_DELETE = "PHYSICAL.NUAGE.VSD.DELETE";
     // AutoScale
     public static final String EVENT_COUNTER_CREATE = "COUNTER.CREATE";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/api/src/com/cloud/network/Network.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/Network.java b/api/src/com/cloud/network/Network.java
index d39489e..7cc5441 100644
--- a/api/src/com/cloud/network/Network.java
+++ b/api/src/com/cloud/network/Network.java
@@ -134,7 +134,6 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
         public static final Provider Opendaylight = new Provider("Opendaylight", false);
         // add Nuage Vsp Providers
         public static final Provider NuageVsp = new Provider("NuageVsp", false);
-        public static final Provider NuageVspVpc = new Provider("NuageVspVpc", false);
         public static final Provider BrocadeVcs = new Provider("BrocadeVcs", false);
         // add GloboDns provider
         public static final Provider GloboDns = new Provider("GloboDns", true);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/client/tomcatconf/commands.properties.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in
index 473c635..4f93b97 100644
--- a/client/tomcatconf/commands.properties.in
+++ b/client/tomcatconf/commands.properties.in
@@ -644,6 +644,7 @@ deleteStratoshereSsp=1
 #### nuage vsp commands
 
 addNuageVspDevice=1
+updateNuageVspDevice=1
 deleteNuageVspDevice=1
 listNuageVspDevices=1
 issueNuageVspResourceRequest=15

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/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
index 8136c3d..1d62c5d 100644
--- a/core/src/com/cloud/agent/api/PingCommand.java
+++ b/core/src/com/cloud/agent/api/PingCommand.java
@@ -45,4 +45,26 @@ public class PingCommand extends Command {
     public boolean executeInSequence() {
         return false;
     }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof PingCommand)) return false;
+        if (!super.equals(o)) return false;
+
+        PingCommand that = (PingCommand) o;
+
+        if (hostId != that.hostId) return false;
+        if (hostType != that.hostType) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (hostType != null ? hostType.hashCode() : 0);
+        result = 31 * result + (int) (hostId ^ (hostId >>> 32));
+        return result;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/engine/schema/src/com/cloud/network/dao/IPAddressDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/IPAddressDao.java b/engine/schema/src/com/cloud/network/dao/IPAddressDao.java
index fbf5c57..24d77db 100644
--- a/engine/schema/src/com/cloud/network/dao/IPAddressDao.java
+++ b/engine/schema/src/com/cloud/network/dao/IPAddressDao.java
@@ -87,4 +87,6 @@ public interface IPAddressDao extends GenericDao<IPAddressVO, Long> {
     void lockRange(long vlandbId);
 
     List<IPAddressVO> listByAssociatedVmId(long vmId);
+
+    IPAddressVO findByVmIdAndNetworkId(long networkId, long vmId);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java b/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
index 61bc1b7..63278c2 100644
--- a/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
@@ -459,6 +459,14 @@ public class IPAddressDaoImpl extends GenericDaoBase<IPAddressVO, Long> implemen
     }
 
     @Override
+    public IPAddressVO findByVmIdAndNetworkId(long networkId, long vmId) {
+        SearchCriteria<IPAddressVO> sc = AllFieldsSearch.create();
+        sc.setParameters("network", networkId);
+        sc.setParameters("associatedWithVmId", vmId);
+        return findOneBy(sc);
+    }
+
+    @Override
     public void lockRange(long vlandbId) {
         SearchCriteria<IPAddressVO> sc = AllFieldsSearch.create();
         sc.setParameters("vlan", vlandbId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/engine/schema/src/com/cloud/network/vpc/NetworkACLItemDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/vpc/NetworkACLItemDao.java b/engine/schema/src/com/cloud/network/vpc/NetworkACLItemDao.java
index 9ab6365..21794cb 100644
--- a/engine/schema/src/com/cloud/network/vpc/NetworkACLItemDao.java
+++ b/engine/schema/src/com/cloud/network/vpc/NetworkACLItemDao.java
@@ -29,7 +29,7 @@ public interface NetworkACLItemDao extends GenericDao<NetworkACLItemVO, Long> {
 
     boolean revoke(NetworkACLItemVO rule);
 
-    List<NetworkACLItemVO> listByACL(long aclId);
+    List<NetworkACLItemVO> listByACL(Long aclId);
 
     int getMaxNumberByACL(long aclId);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/engine/schema/src/com/cloud/network/vpc/VpcOfferingVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/vpc/VpcOfferingVO.java b/engine/schema/src/com/cloud/network/vpc/VpcOfferingVO.java
index bd13a02..62e8cf3 100644
--- a/engine/schema/src/com/cloud/network/vpc/VpcOfferingVO.java
+++ b/engine/schema/src/com/cloud/network/vpc/VpcOfferingVO.java
@@ -99,6 +99,14 @@ public class VpcOfferingVO implements VpcOffering {
         this.redundantRouter = redundantRouter;
     }
 
+    public VpcOfferingVO(String name, String displayText, boolean isDefault, Long serviceOfferingId,
+                         boolean supportsDistributedRouter, boolean offersRegionLevelVPC) {
+        this(name, displayText, serviceOfferingId);
+        this.isDefault = isDefault;
+        this.supportsDistributedRouter = supportsDistributedRouter;
+        this.offersRegionLevelVPC = offersRegionLevelVPC;
+    }
+
     @Override
     public long getId() {
         return id;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/engine/schema/src/com/cloud/network/vpc/dao/NetworkACLItemDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/vpc/dao/NetworkACLItemDaoImpl.java b/engine/schema/src/com/cloud/network/vpc/dao/NetworkACLItemDaoImpl.java
index 201197c..15f9014 100644
--- a/engine/schema/src/com/cloud/network/vpc/dao/NetworkACLItemDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/vpc/dao/NetworkACLItemDaoImpl.java
@@ -21,6 +21,7 @@ import java.util.List;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
+import com.google.common.collect.Lists;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
@@ -115,7 +116,9 @@ public class NetworkACLItemDaoImpl extends GenericDaoBase<NetworkACLItemVO, Long
     }
 
     @Override
-    public List<NetworkACLItemVO> listByACL(long aclId) {
+    public List<NetworkACLItemVO> listByACL(Long aclId) {
+        if (aclId == null) return Lists.newArrayList();
+
         SearchCriteria<NetworkACLItemVO> sc = AllFieldsSearch.create();
         sc.setParameters("aclId", aclId);
         List<NetworkACLItemVO> list = listBy(sc);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/pom.xml b/plugins/network-elements/nuage-vsp/pom.xml
index 36b53f7..fb258f8 100644
--- a/plugins/network-elements/nuage-vsp/pom.xml
+++ b/plugins/network-elements/nuage-vsp/pom.xml
@@ -28,6 +28,13 @@
     <version>4.6.0-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+      <version>${cs.lang3.version}</version>
+    </dependency>
+  </dependencies>
   <build>
     <plugins>
       <plugin>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/CmdBuilder.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/CmdBuilder.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/CmdBuilder.java
new file mode 100644
index 0000000..514afb6
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/CmdBuilder.java
@@ -0,0 +1,24 @@
+//
+// 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 interface CmdBuilder<T> {
+    T build();
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/PingNuageVspCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/PingNuageVspCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/PingNuageVspCommand.java
new file mode 100644
index 0000000..c7505d9
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/PingNuageVspCommand.java
@@ -0,0 +1,56 @@
+//
+// 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 PingNuageVspCommand extends PingCommand {
+
+    private final boolean shouldAudit;
+
+    public PingNuageVspCommand(Host.Type type, long id, boolean shouldAudit) {
+        super(type, id);
+        this.shouldAudit = shouldAudit;
+    }
+
+    public boolean shouldAudit() {
+        return shouldAudit;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof PingNuageVspCommand)) return false;
+        if (!super.equals(o)) return false;
+
+        PingNuageVspCommand that = (PingNuageVspCommand) o;
+
+        if (shouldAudit != that.shouldAudit) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (shouldAudit ? 1 : 0);
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/StartupVspCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/StartupVspCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/StartupVspCommand.java
index 6dba882..2e289fb 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/StartupVspCommand.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/StartupVspCommand.java
@@ -21,9 +21,14 @@ package com.cloud.agent.api;
 
 import com.cloud.host.Host;
 
+/**
+ * The super class implementations for equals and hashCode are acceptable because this class does not track any state
+ * in addition to the super class.
+ */
 public class StartupVspCommand extends StartupCommand {
 
     public StartupVspCommand() {
         super(Host.Type.L2Networking);
     }
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/VspResourceAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/VspResourceAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/VspResourceAnswer.java
index 9327809..979dcd3 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/VspResourceAnswer.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/VspResourceAnswer.java
@@ -21,7 +21,7 @@ package com.cloud.agent.api;
 
 public class VspResourceAnswer extends Answer {
 
-    String _resourceInfo;
+    private String _resourceInfo;
 
     public VspResourceAnswer(Command cmd, String resourceInfo, String details) {
         super(cmd, true, details);
@@ -39,4 +39,22 @@ public class VspResourceAnswer extends Answer {
     public String getResourceInfo() {
         return this._resourceInfo;
     }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        VspResourceAnswer that = (VspResourceAnswer) o;
+
+        if (_resourceInfo != null ? !_resourceInfo.equals(that._resourceInfo) : that._resourceInfo != null)
+            return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        return _resourceInfo != null ? _resourceInfo.hashCode() : 0;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/VspResourceCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/VspResourceCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/VspResourceCommand.java
index f7e1417..6e03dab 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/VspResourceCommand.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/VspResourceCommand.java
@@ -21,14 +21,14 @@ package com.cloud.agent.api;
 
 public class VspResourceCommand extends Command {
 
-    String _method;
-    String _resource;
-    String _resourceId;
-    String _childResource;
-    Object _entityDetails;
-    String _resourceFilter;
-    String _proxyUserUuid;
-    String _proxyUserDomainuuid;
+    private final String _method;
+    private final String _resource;
+    private final String _resourceId;
+    private final String _childResource;
+    private final Object _entityDetails;
+    private final String _resourceFilter;
+    private final String _proxyUserUuid;
+    private final String _proxyUserDomainuuid;
 
     public VspResourceCommand(String method, String resource, String resourceId, String childResource, Object entityDetails, String resourceFilter, String proxyUserUuid,
             String proxyUserDomainuuid) {
@@ -79,4 +79,41 @@ public class VspResourceCommand extends Command {
     public boolean executeInSequence() {
         return false;
     }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        VspResourceCommand that = (VspResourceCommand) o;
+
+        if (_childResource != null ? !_childResource.equals(that._childResource) : that._childResource != null)
+            return false;
+        if (_entityDetails != null ? !_entityDetails.equals(that._entityDetails) : that._entityDetails != null)
+            return false;
+        if (_method != null ? !_method.equals(that._method) : that._method != null) return false;
+        if (_proxyUserDomainuuid != null ? !_proxyUserDomainuuid.equals(that._proxyUserDomainuuid) : that._proxyUserDomainuuid != null)
+            return false;
+        if (_proxyUserUuid != null ? !_proxyUserUuid.equals(that._proxyUserUuid) : that._proxyUserUuid != null)
+            return false;
+        if (_resource != null ? !_resource.equals(that._resource) : that._resource != null) return false;
+        if (_resourceFilter != null ? !_resourceFilter.equals(that._resourceFilter) : that._resourceFilter != null)
+            return false;
+        if (_resourceId != null ? !_resourceId.equals(that._resourceId) : that._resourceId != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = _method != null ? _method.hashCode() : 0;
+        result = 31 * result + (_resource != null ? _resource.hashCode() : 0);
+        result = 31 * result + (_resourceId != null ? _resourceId.hashCode() : 0);
+        result = 31 * result + (_childResource != null ? _childResource.hashCode() : 0);
+        result = 31 * result + (_entityDetails != null ? _entityDetails.hashCode() : 0);
+        result = 31 * result + (_resourceFilter != null ? _resourceFilter.hashCode() : 0);
+        result = 31 * result + (_proxyUserUuid != null ? _proxyUserUuid.hashCode() : 0);
+        result = 31 * result + (_proxyUserDomainuuid != null ? _proxyUserDomainuuid.hashCode() : 0);
+        return result;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyAclRuleVspAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyAclRuleVspAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyAclRuleVspAnswer.java
deleted file mode 100644
index 2b41266..0000000
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyAclRuleVspAnswer.java
+++ /dev/null
@@ -1,34 +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.agent.api.element;
-
-import com.cloud.agent.api.Answer;
-
-public class ApplyAclRuleVspAnswer extends Answer {
-
-    public ApplyAclRuleVspAnswer(ApplyAclRuleVspCommand cmd, boolean success, String details) {
-        super(cmd, success, details);
-    }
-
-    public ApplyAclRuleVspAnswer(ApplyAclRuleVspCommand cmd, Exception e) {
-        super(cmd, e);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyAclRuleVspCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyAclRuleVspCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyAclRuleVspCommand.java
index 5376466..7b1d40b 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyAclRuleVspCommand.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyAclRuleVspCommand.java
@@ -19,31 +19,46 @@
 
 package com.cloud.agent.api.element;
 
+import com.cloud.agent.api.CmdBuilder;
+import com.cloud.agent.api.Command;
+
 import java.util.List;
 import java.util.Map;
 
-import com.cloud.agent.api.Command;
-
 public class ApplyAclRuleVspCommand extends Command {
 
-    String _networkUuid;
-    String _networkDomainUuid;
-    String _vpcOrSubnetUuid;
-    boolean _isL3Network;
-    List<Map<String, Object>> _aclRules;
-    boolean _isVpc;
-    long _networkId;
+    private final boolean _networkAcl;
+    private final String _networkUuid;
+    private final String _networkDomainUuid;
+    private final String _vpcOrSubnetUuid;
+    private final String _networkName;
+    private final boolean _isL2Network;
+    private final List<Map<String, Object>> _aclRules;
+    private final long _networkId;
+    private final boolean _egressDefaultPolicy;
+    private final Boolean _acsIngressAcl;
+    private final boolean _networkReset;
+    private final String _domainTemplateName;
 
-    public ApplyAclRuleVspCommand(String networkUuid, String networkDomainUuid, String vpcOrSubnetUuid, boolean isL3Network, List<Map<String, Object>> aclRules, boolean isVpc,
-            long networkId) {
+    private ApplyAclRuleVspCommand(boolean networkAcl, String networkUuid, String networkDomainUuid, String vpcOrSubnetUuid, String networkName, boolean isL2Network,
+            List<Map<String, Object>> aclRules, long networkId, boolean egressDefaultPolicy, Boolean acsIngressAcl, boolean networkReset, String domainTemplateName) {
         super();
+        this._networkAcl = networkAcl;
         this._networkUuid = networkUuid;
         this._networkDomainUuid = networkDomainUuid;
         this._vpcOrSubnetUuid = vpcOrSubnetUuid;
-        this._isL3Network = isL3Network;
+        this._networkName = networkName;
+        this._isL2Network = isL2Network;
         this._aclRules = aclRules;
-        this._isVpc = isVpc;
         this._networkId = networkId;
+        this._egressDefaultPolicy = egressDefaultPolicy;
+        this._acsIngressAcl = acsIngressAcl;
+        this._networkReset = networkReset;
+        this._domainTemplateName = domainTemplateName;
+    }
+
+    public boolean isNetworkAcl() {
+        return _networkAcl;
     }
 
     public String getNetworkUuid() {
@@ -58,20 +73,117 @@ public class ApplyAclRuleVspCommand extends Command {
         return _vpcOrSubnetUuid;
     }
 
-    public boolean isL3Network() {
-        return _isL3Network;
+    public String getNetworkName() {
+        return _networkName;
+    }
+
+    public boolean isL2Network() {
+        return _isL2Network;
     }
 
     public List<Map<String, Object>> getAclRules() {
         return _aclRules;
     }
 
-    public boolean isVpc() {
-        return _isVpc;
+    public long getNetworkId() {
+        return _networkId;
     }
 
-    public long getNetworkId() {
-        return this._networkId;
+    public boolean isEgressDefaultPolicy() {
+        return _egressDefaultPolicy;
+    }
+
+    public Boolean getAcsIngressAcl() {
+        return _acsIngressAcl;
+    }
+
+    public boolean isNetworkReset() {
+        return _networkReset;
+    }
+
+    public String getDomainTemplateName() {
+        return _domainTemplateName;
+    }
+
+    public static class Builder implements CmdBuilder<ApplyAclRuleVspCommand> {
+        private boolean _networkAcl;
+        private String _networkUuid;
+        private String _networkDomainUuid;
+        private String _vpcOrSubnetUuid;
+        private String _networkName;
+        private boolean _isL2Network;
+        private List<Map<String, Object>> _aclRules;
+        private long _networkId;
+        private boolean _egressDefaultPolicy;
+        private Boolean _acsIngressAcl;
+        private boolean _networkReset;
+        private String _domainTemplateName;
+
+        public Builder networkAcl(boolean networkAcl) {
+            this._networkAcl = networkAcl;
+            return this;
+        }
+
+        public Builder networkUuid(String networkUuid) {
+            this._networkUuid = networkUuid;
+            return this;
+        }
+
+        public Builder networkDomainUuid(String networkDomainUuid) {
+            this._networkDomainUuid = networkDomainUuid;
+            return this;
+        }
+
+        public Builder vpcOrSubnetUuid(String vpcOrSubnetUuid) {
+            this._vpcOrSubnetUuid = vpcOrSubnetUuid;
+            return this;
+        }
+
+        public Builder networkName(String networkName) {
+            this._networkName = networkName;
+            return this;
+        }
+
+        public Builder isL2Network(boolean isL2Network) {
+            this._isL2Network = isL2Network;
+            return this;
+        }
+
+        public Builder aclRules(List<Map<String, Object>> aclRules) {
+            this._aclRules = aclRules;
+            return this;
+        }
+
+        public Builder networkId(long networkId) {
+            this._networkId = networkId;
+            return this;
+        }
+
+        public Builder egressDefaultPolicy(boolean egressDefaultPolicy) {
+            this._egressDefaultPolicy = egressDefaultPolicy;
+            return this;
+        }
+
+        public Builder acsIngressAcl(Boolean acsIngressAcl) {
+            this._acsIngressAcl = acsIngressAcl;
+            return this;
+        }
+
+        public Builder networkReset(boolean networkReset) {
+            this._networkReset = networkReset;
+            return this;
+        }
+
+        public Builder domainTemplateName(String domainTemplateName) {
+            this._domainTemplateName = domainTemplateName;
+            return this;
+        }
+
+        @Override
+        public ApplyAclRuleVspCommand build() {
+            return new ApplyAclRuleVspCommand(_networkAcl, _networkUuid, _networkDomainUuid, _vpcOrSubnetUuid, _networkName, _isL2Network, _aclRules,
+                    _networkId, _egressDefaultPolicy, _acsIngressAcl, _networkReset, _domainTemplateName);
+        }
     }
 
     @Override
@@ -79,4 +191,49 @@ public class ApplyAclRuleVspCommand extends Command {
         return false;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof ApplyAclRuleVspCommand)) return false;
+        if (!super.equals(o)) return false;
+
+        ApplyAclRuleVspCommand that = (ApplyAclRuleVspCommand) o;
+
+        if (_egressDefaultPolicy != that._egressDefaultPolicy) return false;
+        if (_isL2Network != that._isL2Network) return false;
+        if (_networkAcl != that._networkAcl) return false;
+        if (_networkId != that._networkId) return false;
+        if (_networkReset != that._networkReset) return false;
+        if (_aclRules != null ? !_aclRules.equals(that._aclRules) : that._aclRules != null) return false;
+        if (_acsIngressAcl != null ? !_acsIngressAcl.equals(that._acsIngressAcl) : that._acsIngressAcl != null)
+            return false;
+        if (_domainTemplateName != null ? !_domainTemplateName.equals(that._domainTemplateName) : that._domainTemplateName != null)
+            return false;
+        if (_networkDomainUuid != null ? !_networkDomainUuid.equals(that._networkDomainUuid) : that._networkDomainUuid != null)
+            return false;
+        if (_networkName != null ? !_networkName.equals(that._networkName) : that._networkName != null) return false;
+        if (_networkUuid != null ? !_networkUuid.equals(that._networkUuid) : that._networkUuid != null) return false;
+        if (_vpcOrSubnetUuid != null ? !_vpcOrSubnetUuid.equals(that._vpcOrSubnetUuid) : that._vpcOrSubnetUuid != null)
+            return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (_networkAcl ? 1 : 0);
+        result = 31 * result + (_networkUuid != null ? _networkUuid.hashCode() : 0);
+        result = 31 * result + (_networkDomainUuid != null ? _networkDomainUuid.hashCode() : 0);
+        result = 31 * result + (_vpcOrSubnetUuid != null ? _vpcOrSubnetUuid.hashCode() : 0);
+        result = 31 * result + (_networkName != null ? _networkName.hashCode() : 0);
+        result = 31 * result + (_isL2Network ? 1 : 0);
+        result = 31 * result + (_aclRules != null ? _aclRules.hashCode() : 0);
+        result = 31 * result + (int) (_networkId ^ (_networkId >>> 32));
+        result = 31 * result + (_egressDefaultPolicy ? 1 : 0);
+        result = 31 * result + (_acsIngressAcl != null ? _acsIngressAcl.hashCode() : 0);
+        result = 31 * result + (_networkReset ? 1 : 0);
+        result = 31 * result + (_domainTemplateName != null ? _domainTemplateName.hashCode() : 0);
+        return result;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyStaticNatVspAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyStaticNatVspAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyStaticNatVspAnswer.java
deleted file mode 100644
index c40c1a3..0000000
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyStaticNatVspAnswer.java
+++ /dev/null
@@ -1,34 +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.agent.api.element;
-
-import com.cloud.agent.api.Answer;
-
-public class ApplyStaticNatVspAnswer extends Answer {
-
-    public ApplyStaticNatVspAnswer(ApplyStaticNatVspCommand cmd, boolean success, String details) {
-        super(cmd, success, details);
-    }
-
-    public ApplyStaticNatVspAnswer(ApplyStaticNatVspCommand cmd, Exception e) {
-        super(cmd, e);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyStaticNatVspCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyStaticNatVspCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyStaticNatVspCommand.java
index b013634..cc4e930 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyStaticNatVspCommand.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyStaticNatVspCommand.java
@@ -19,23 +19,29 @@
 
 package com.cloud.agent.api.element;
 
+import com.cloud.agent.api.CmdBuilder;
+import com.cloud.agent.api.Command;
+
 import java.util.List;
 import java.util.Map;
 
-import com.cloud.agent.api.Command;
-
 public class ApplyStaticNatVspCommand extends Command {
 
-    String _networkDomainUuid;
-    String _vpcOrSubnetUuid;
-    boolean _isL3Network;
-    List<Map<String, Object>> _staticNatDetails;
+    private final String _networkDomainUuid;
+    private final String _networkUuid;
+    private final String _vpcOrSubnetUuid;
+    private final boolean _isL3Network;
+    private final boolean _isVpc;
+    private final List<Map<String, Object>> _staticNatDetails;
 
-    public ApplyStaticNatVspCommand(String networkDomainUuid, String vpcOrSubnetUuid, boolean isL3Network, List<Map<String, Object>> staticNatDetails) {
+    private ApplyStaticNatVspCommand(String networkDomainUuid, String networkUuid, String vpcOrSubnetUuid, boolean isL3Network, boolean isVpc,
+            List<Map<String, Object>> staticNatDetails) {
         super();
         this._networkDomainUuid = networkDomainUuid;
+        this._networkUuid = networkUuid;
         this._vpcOrSubnetUuid = vpcOrSubnetUuid;
         this._isL3Network = isL3Network;
+        this._isVpc = isVpc;
         this._staticNatDetails = staticNatDetails;
     }
 
@@ -43,6 +49,10 @@ public class ApplyStaticNatVspCommand extends Command {
         return _networkDomainUuid;
     }
 
+    public String getNetworkUuid() {
+        return _networkUuid;
+    }
+
     public String getVpcOrSubnetUuid() {
         return _vpcOrSubnetUuid;
     }
@@ -51,13 +61,93 @@ public class ApplyStaticNatVspCommand extends Command {
         return _isL3Network;
     }
 
+    public boolean isVpc() {
+        return _isVpc;
+    }
+
     public List<Map<String, Object>> getStaticNatDetails() {
         return _staticNatDetails;
     }
 
+    public static class Builder implements CmdBuilder<ApplyStaticNatVspCommand> {
+        private String _networkDomainUuid;
+        private String _networkUuid;
+        private String _vpcOrSubnetUuid;
+        private boolean _isL3Network;
+        private boolean _isVpc;
+        private List<Map<String, Object>> _staticNatDetails;
+
+        public Builder networkDomainUuid(String networkDomainUuid) {
+            this._networkDomainUuid = networkDomainUuid;
+            return this;
+        }
+
+        public Builder networkUuid(String networkUuid) {
+            this._networkUuid = networkUuid;
+            return this;
+        }
+
+        public Builder vpcOrSubnetUuid(String vpcOrSubnetUuid) {
+            this._vpcOrSubnetUuid = vpcOrSubnetUuid;
+            return this;
+        }
+
+        public Builder isL3Network(boolean isL3Network) {
+            this._isL3Network = isL3Network;
+            return this;
+        }
+
+        public Builder isVpc(boolean isVpc) {
+            this._isVpc = isVpc;
+            return this;
+        }
+
+        public Builder staticNatDetails(List<Map<String, Object>> staticNatDetails) {
+            this._staticNatDetails = staticNatDetails;
+            return this;
+        }
+
+        @Override
+        public ApplyStaticNatVspCommand build() {
+            return new ApplyStaticNatVspCommand(_networkDomainUuid, _networkUuid, _vpcOrSubnetUuid, _isL3Network, _isVpc, _staticNatDetails);
+        }
+    }
+
     @Override
     public boolean executeInSequence() {
         return false;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof ApplyStaticNatVspCommand)) return false;
+        if (!super.equals(o)) return false;
+
+        ApplyStaticNatVspCommand that = (ApplyStaticNatVspCommand) o;
+
+        if (_isL3Network != that._isL3Network) return false;
+        if (_isVpc != that._isVpc) return false;
+        if (_networkDomainUuid != null ? !_networkDomainUuid.equals(that._networkDomainUuid) : that._networkDomainUuid != null)
+            return false;
+        if (_networkUuid != null ? !_networkUuid.equals(that._networkUuid) : that._networkUuid != null) return false;
+        if (_staticNatDetails != null ? !_staticNatDetails.equals(that._staticNatDetails) : that._staticNatDetails != null)
+            return false;
+        if (_vpcOrSubnetUuid != null ? !_vpcOrSubnetUuid.equals(that._vpcOrSubnetUuid) : that._vpcOrSubnetUuid != null)
+            return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (_networkDomainUuid != null ? _networkDomainUuid.hashCode() : 0);
+        result = 31 * result + (_networkUuid != null ? _networkUuid.hashCode() : 0);
+        result = 31 * result + (_vpcOrSubnetUuid != null ? _vpcOrSubnetUuid.hashCode() : 0);
+        result = 31 * result + (_isL3Network ? 1 : 0);
+        result = 31 * result + (_isVpc ? 1 : 0);
+        result = 31 * result + (_staticNatDetails != null ? _staticNatDetails.hashCode() : 0);
+        return result;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ImplementVspCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ImplementVspCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ImplementVspCommand.java
new file mode 100644
index 0000000..c1de6b9
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ImplementVspCommand.java
@@ -0,0 +1,297 @@
+//
+// 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.element;
+
+import com.cloud.agent.api.CmdBuilder;
+import com.cloud.agent.api.Command;
+
+import java.util.List;
+import java.util.Map;
+
+public class ImplementVspCommand extends Command {
+
+    private final long _networkId;
+    private final String _networkDomainUuid;
+    private final String _networkUuid;
+    private final String _networkName;
+    private final String _vpcOrSubnetUuid;
+    private final boolean _isL2Network;
+    private final boolean _isL3Network;
+    private final boolean _isVpc;
+    private final boolean _isShared;
+    private final String _domainTemplateName;
+    private final boolean _isFirewallServiceSupported;
+    private final List<String> _dnsServers;
+    private final List<Map<String, Object>> _ingressFirewallRules;
+    private final List<Map<String, Object>> _egressFirewallRules;
+    private final List<String> _acsFipUuid;
+    private final boolean _egressDefaultPolicy;
+
+    private ImplementVspCommand(long networkId, String networkDomainUuid, String networkUuid, String networkName, String vpcOrSubnetUuid, boolean isL2Network, boolean isL3Network,
+            boolean isVpc, boolean isShared, String domainTemplateName, boolean isFirewallServiceSupported, List<String> dnsServers, List<Map<String, Object>> ingressFirewallRules,
+            List<Map<String, Object>> egressFirewallRules, List<String> acsFipUuid, boolean egressDefaultPolicy) {
+        super();
+        this._networkId = networkId;
+        this._networkDomainUuid = networkDomainUuid;
+        this._networkUuid = networkUuid;
+        this._networkName = networkName;
+        this._vpcOrSubnetUuid = vpcOrSubnetUuid;
+        this._isL2Network = isL2Network;
+        this._isL3Network = isL3Network;
+        this._isVpc = isVpc;
+        this._isShared = isShared;
+        this._domainTemplateName = domainTemplateName;
+        this._isFirewallServiceSupported = isFirewallServiceSupported;
+        this._dnsServers = dnsServers;
+        this._ingressFirewallRules = ingressFirewallRules;
+        this._egressFirewallRules = egressFirewallRules;
+        this._acsFipUuid = acsFipUuid;
+        this._egressDefaultPolicy = egressDefaultPolicy;
+    }
+
+    public long getNetworkId() {
+        return _networkId;
+    }
+
+    public String getNetworkDomainUuid() {
+        return _networkDomainUuid;
+    }
+
+    public String getNetworkUuid() {
+        return _networkUuid;
+    }
+
+    public String getNetworkName() {
+        return _networkName;
+    }
+
+    public String getVpcOrSubnetUuid() {
+        return _vpcOrSubnetUuid;
+    }
+
+    public boolean isL2Network() {
+        return _isL2Network;
+    }
+
+    public boolean isL3Network() {
+        return _isL3Network;
+    }
+
+    public boolean isVpc() {
+        return _isVpc;
+    }
+
+    public boolean isShared() {
+        return _isShared;
+    }
+
+    public String getDomainTemplateName() {
+        return _domainTemplateName;
+    }
+
+    public boolean isFirewallServiceSupported() {
+        return _isFirewallServiceSupported;
+    }
+
+    public List<String> getDnsServers() {
+        return _dnsServers;
+    }
+
+    public List<Map<String, Object>> getIngressFirewallRules() {
+        return _ingressFirewallRules;
+    }
+
+    public List<Map<String, Object>> getEgressFirewallRules() {
+        return _egressFirewallRules;
+    }
+
+    public List<String> getAcsFipUuid() {
+        return _acsFipUuid;
+    }
+
+    public boolean isEgressDefaultPolicy() {
+        return _egressDefaultPolicy;
+    }
+
+    public static class Builder implements CmdBuilder<ImplementVspCommand> {
+        private long _networkId;
+        private String _networkDomainUuid;
+        private String _networkUuid;
+        private String _networkName;
+        private String _vpcOrSubnetUuid;
+        private boolean _isL2Network;
+        private boolean _isL3Network;
+        private boolean _isVpc;
+        private boolean _isShared;
+        private String _domainTemplateName;
+        private boolean _isFirewallServiceSupported;
+        private List<String> _dnsServers;
+        private List<Map<String, Object>> _ingressFirewallRules;
+        private List<Map<String, Object>> _egressFirewallRules;
+        private List<String> _acsFipUuid;
+        private boolean _egressDefaultPolicy;
+
+        public Builder networkId(long networkId) {
+            this._networkId = networkId;
+            return this;
+        }
+
+        public Builder networkDomainUuid(String networkDomainUuid) {
+            this._networkDomainUuid = networkDomainUuid;
+            return this;
+        }
+
+        public Builder networkUuid(String networkUuid) {
+            this._networkUuid = networkUuid;
+            return this;
+        }
+
+        public Builder networkName(String networkName) {
+            this._networkName = networkName;
+            return this;
+        }
+
+        public Builder vpcOrSubnetUuid(String vpcOrSubnetUuid) {
+            this._vpcOrSubnetUuid = vpcOrSubnetUuid;
+            return this;
+        }
+
+        public Builder isL2Network(boolean isL2Network) {
+            this._isL2Network = isL2Network;
+            return this;
+        }
+
+        public Builder isL3Network(boolean isL3Network) {
+            this._isL3Network = isL3Network;
+            return this;
+        }
+
+        public Builder isVpc(boolean isVpc) {
+            this._isVpc = isVpc;
+            return this;
+        }
+
+        public Builder isShared(boolean isShared) {
+            this._isShared = isShared;
+            return this;
+        }
+
+        public Builder domainTemplateName(String domainTemplateName) {
+            this._domainTemplateName = domainTemplateName;
+            return this;
+        }
+
+        public Builder isFirewallServiceSupported(boolean isFirewallServiceSupported) {
+            this._isFirewallServiceSupported = isFirewallServiceSupported;
+            return this;
+        }
+
+        public Builder dnsServers(List<String> dnsServers) {
+            this._dnsServers = dnsServers;
+            return this;
+        }
+
+        public Builder ingressFirewallRules(List<Map<String, Object>> ingressFirewallRules) {
+            this._ingressFirewallRules = ingressFirewallRules;
+            return this;
+        }
+
+        public Builder egressFirewallRules(List<Map<String, Object>> egressFirewallRules) {
+            this._egressFirewallRules = egressFirewallRules;
+            return this;
+        }
+
+        public Builder acsFipUuid(List<String> acsFipUuid) {
+            this._acsFipUuid = acsFipUuid;
+            return this;
+        }
+
+        public Builder egressDefaultPolicy(boolean egressDefaultPolicy) {
+            this._egressDefaultPolicy = egressDefaultPolicy;
+            return this;
+        }
+
+        @Override
+        public ImplementVspCommand build() {
+            return new ImplementVspCommand(_networkId, _networkDomainUuid, _networkUuid, _networkName, _vpcOrSubnetUuid, _isL2Network, _isL3Network, _isVpc, _isShared,
+                    _domainTemplateName, _isFirewallServiceSupported, _dnsServers, _ingressFirewallRules, _egressFirewallRules, _acsFipUuid, _egressDefaultPolicy);
+        }
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof ImplementVspCommand)) return false;
+        if (!super.equals(o)) return false;
+
+        ImplementVspCommand that = (ImplementVspCommand) o;
+
+        if (_egressDefaultPolicy != that._egressDefaultPolicy) return false;
+        if (_isFirewallServiceSupported != that._isFirewallServiceSupported) return false;
+        if (_isL2Network != that._isL2Network) return false;
+        if (_isL3Network != that._isL3Network) return false;
+        if (_isShared != that._isShared) return false;
+        if (_isVpc != that._isVpc) return false;
+        if (_networkId != that._networkId) return false;
+        if (_acsFipUuid != null ? !_acsFipUuid.equals(that._acsFipUuid) : that._acsFipUuid != null) return false;
+        if (_dnsServers != null ? !_dnsServers.equals(that._dnsServers) : that._dnsServers != null) return false;
+        if (_domainTemplateName != null ? !_domainTemplateName.equals(that._domainTemplateName) : that._domainTemplateName != null)
+            return false;
+        if (_egressFirewallRules != null ? !_egressFirewallRules.equals(that._egressFirewallRules) : that._egressFirewallRules != null)
+            return false;
+        if (_ingressFirewallRules != null ? !_ingressFirewallRules.equals(that._ingressFirewallRules) : that._ingressFirewallRules != null)
+            return false;
+        if (_networkDomainUuid != null ? !_networkDomainUuid.equals(that._networkDomainUuid) : that._networkDomainUuid != null)
+            return false;
+        if (_networkName != null ? !_networkName.equals(that._networkName) : that._networkName != null) return false;
+        if (_networkUuid != null ? !_networkUuid.equals(that._networkUuid) : that._networkUuid != null) return false;
+        if (_vpcOrSubnetUuid != null ? !_vpcOrSubnetUuid.equals(that._vpcOrSubnetUuid) : that._vpcOrSubnetUuid != null)
+            return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (int) (_networkId ^ (_networkId >>> 32));
+        result = 31 * result + (_networkDomainUuid != null ? _networkDomainUuid.hashCode() : 0);
+        result = 31 * result + (_networkUuid != null ? _networkUuid.hashCode() : 0);
+        result = 31 * result + (_networkName != null ? _networkName.hashCode() : 0);
+        result = 31 * result + (_vpcOrSubnetUuid != null ? _vpcOrSubnetUuid.hashCode() : 0);
+        result = 31 * result + (_isL2Network ? 1 : 0);
+        result = 31 * result + (_isL3Network ? 1 : 0);
+        result = 31 * result + (_isVpc ? 1 : 0);
+        result = 31 * result + (_isShared ? 1 : 0);
+        result = 31 * result + (_domainTemplateName != null ? _domainTemplateName.hashCode() : 0);
+        result = 31 * result + (_isFirewallServiceSupported ? 1 : 0);
+        result = 31 * result + (_dnsServers != null ? _dnsServers.hashCode() : 0);
+        result = 31 * result + (_ingressFirewallRules != null ? _ingressFirewallRules.hashCode() : 0);
+        result = 31 * result + (_egressFirewallRules != null ? _egressFirewallRules.hashCode() : 0);
+        result = 31 * result + (_acsFipUuid != null ? _acsFipUuid.hashCode() : 0);
+        result = 31 * result + (_egressDefaultPolicy ? 1 : 0);
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVpcVspAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVpcVspAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVpcVspAnswer.java
deleted file mode 100644
index 592216e..0000000
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVpcVspAnswer.java
+++ /dev/null
@@ -1,34 +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.agent.api.element;
-
-import com.cloud.agent.api.Answer;
-
-public class ShutDownVpcVspAnswer extends Answer {
-
-    public ShutDownVpcVspAnswer(ShutDownVpcVspCommand cmd, boolean success, String details) {
-        super(cmd, success, details);
-    }
-
-    public ShutDownVpcVspAnswer(ShutDownVpcVspCommand cmd, Exception e) {
-        super(cmd, e);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVpcVspCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVpcVspCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVpcVspCommand.java
index fc05559..4c41e51 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVpcVspCommand.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVpcVspCommand.java
@@ -19,17 +19,20 @@
 
 package com.cloud.agent.api.element;
 
+import com.cloud.agent.api.CmdBuilder;
 import com.cloud.agent.api.Command;
 
 public class ShutDownVpcVspCommand extends Command {
 
-    String _domainUuid;
-    String _vpcUuid;
+    private final String _domainUuid;
+    private final String _vpcUuid;
+    private final String _domainTemplateName;
 
-    public ShutDownVpcVspCommand(String domainUuid, String vpcUuid) {
+    private ShutDownVpcVspCommand(String domainUuid, String vpcUuid, String domainTemplateName) {
         super();
         this._domainUuid = domainUuid;
         this._vpcUuid = vpcUuid;
+        this._domainTemplateName = domainTemplateName;
     }
 
     public String getDomainUuid() {
@@ -40,9 +43,63 @@ public class ShutDownVpcVspCommand extends Command {
         return _vpcUuid;
     }
 
+    public String getDomainTemplateName() {
+        return _domainTemplateName;
+    }
+
+    public static class Builder implements CmdBuilder<ShutDownVpcVspCommand> {
+        private String _domainUuid;
+        private String _vpcUuid;
+        private String _domainTemplateName;
+
+        public Builder domainUuid(String domainUuid) {
+            this._domainUuid = domainUuid;
+            return this;
+        }
+
+        public Builder vpcUuid(String vpcUuid) {
+            this._vpcUuid = vpcUuid;
+            return this;
+        }
+
+        public Builder domainTemplateName(String domainTemplateName) {
+            this._domainTemplateName = domainTemplateName;
+            return this;
+        }
+
+        @Override
+        public ShutDownVpcVspCommand build() {
+            return new ShutDownVpcVspCommand(_domainUuid, _vpcUuid, _domainTemplateName);
+        }
+    }
+
     @Override
     public boolean executeInSequence() {
         return false;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof ShutDownVpcVspCommand)) return false;
+        if (!super.equals(o)) return false;
+
+        ShutDownVpcVspCommand that = (ShutDownVpcVspCommand) o;
+
+        if (_domainTemplateName != null ? !_domainTemplateName.equals(that._domainTemplateName) : that._domainTemplateName != null)
+            return false;
+        if (_domainUuid != null ? !_domainUuid.equals(that._domainUuid) : that._domainUuid != null) return false;
+        if (_vpcUuid != null ? !_vpcUuid.equals(that._vpcUuid) : that._vpcUuid != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (_domainUuid != null ? _domainUuid.hashCode() : 0);
+        result = 31 * result + (_vpcUuid != null ? _vpcUuid.hashCode() : 0);
+        result = 31 * result + (_domainTemplateName != null ? _domainTemplateName.hashCode() : 0);
+        return result;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/DeallocateVmVspAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/DeallocateVmVspAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/DeallocateVmVspAnswer.java
deleted file mode 100644
index 57ecf29..0000000
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/DeallocateVmVspAnswer.java
+++ /dev/null
@@ -1,34 +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.agent.api.guru;
-
-import com.cloud.agent.api.Answer;
-import com.cloud.agent.api.Command;
-
-public class DeallocateVmVspAnswer extends Answer {
-
-    public DeallocateVmVspAnswer(Command command, Exception e) {
-        super(command, e);
-    }
-
-    public DeallocateVmVspAnswer(DeallocateVmVspCommand cmd, boolean success, String details) {
-        super(cmd, success, details);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/DeallocateVmVspCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/DeallocateVmVspCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/DeallocateVmVspCommand.java
index 19c904f..421fa4c 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/DeallocateVmVspCommand.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/DeallocateVmVspCommand.java
@@ -19,40 +19,45 @@
 
 package com.cloud.agent.api.guru;
 
+import com.cloud.agent.api.CmdBuilder;
 import com.cloud.agent.api.Command;
 
 public class DeallocateVmVspCommand extends Command {
 
-    String _networkUuid;
-    String _nicFrmDdUuid;
-    String _nicMacAddress;
-    String _nicIp4Address;
-    boolean _isL3Network;
-    String _vpcUuid;
-    String _networksDomainUuid;
-    String _vmInstanceName;
-    String _vmUuid;
-
-    public DeallocateVmVspCommand(String networkUuid, String nicFrmDdUuid, String nicMacAddress, String nicIp4Address, boolean isL3Network, String vpcUuid,
-            String networksDomainUuid, String vmInstanceName, String vmUuid) {
+    private final String _networkUuid;
+    private final String _nicFromDdUuid;
+    private final String _nicMacAddress;
+    private final String _nicIp4Address;
+    private final boolean _isL3Network;
+    private final boolean _isSharedNetwork;
+    private final String _vpcUuid;
+    private final String _networksDomainUuid;
+    private final String _vmInstanceName;
+    private final String _vmUuid;
+    private final boolean _isExpungingState;
+
+    private DeallocateVmVspCommand(String networkUuid, String nicFromDdUuid, String nicMacAddress, String nicIp4Address, boolean isL3Network, boolean isSharedNetwork, String vpcUuid,
+            String networksDomainUuid, String vmInstanceName, String vmUuid, boolean isExpungingState) {
         super();
         this._networkUuid = networkUuid;
-        this._nicFrmDdUuid = nicFrmDdUuid;
+        this._nicFromDdUuid = nicFromDdUuid;
         this._nicMacAddress = nicMacAddress;
         this._nicIp4Address = nicIp4Address;
         this._isL3Network = isL3Network;
+        this._isSharedNetwork = isSharedNetwork;
         this._vpcUuid = vpcUuid;
         this._networksDomainUuid = networksDomainUuid;
         this._vmInstanceName = vmInstanceName;
         this._vmUuid = vmUuid;
+        this._isExpungingState = isExpungingState;
     }
 
     public String getNetworkUuid() {
         return _networkUuid;
     }
 
-    public String getNicFrmDdUuid() {
-        return _nicFrmDdUuid;
+    public String getNicFromDdUuid() {
+        return _nicFromDdUuid;
     }
 
     public String getNicMacAddress() {
@@ -67,6 +72,10 @@ public class DeallocateVmVspCommand extends Command {
         return _isL3Network;
     }
 
+    public boolean isSharedNetwork() {
+        return _isSharedNetwork;
+    }
+
     public String getVpcUuid() {
         return _vpcUuid;
     }
@@ -83,9 +92,132 @@ public class DeallocateVmVspCommand extends Command {
         return _vmUuid;
     }
 
+    public boolean isExpungingState() {
+        return _isExpungingState;
+    }
+
+    public static class Builder implements CmdBuilder<DeallocateVmVspCommand> {
+        private String _networkUuid;
+        private String _nicFromDdUuid;
+        private String _nicMacAddress;
+        private String _nicIp4Address;
+        private boolean _isL3Network;
+        private boolean _isSharedNetwork;
+        private String _vpcUuid;
+        private String _networksDomainUuid;
+        private String _vmInstanceName;
+        private String _vmUuid;
+        private boolean _isExpungingState;
+
+        public Builder networkUuid(String networkUuid) {
+            this._networkUuid = networkUuid;
+            return this;
+        }
+
+        public Builder nicFromDbUuid(String nicFromDbUuid) {
+            this._nicFromDdUuid = nicFromDbUuid;
+            return this;
+        }
+
+        public Builder nicMacAddress(String nicMacAddress) {
+            this._nicMacAddress = nicMacAddress;
+            return this;
+        }
+
+        public Builder nicIp4Address(String nicIp4Address) {
+            this._nicIp4Address = nicIp4Address;
+            return this;
+        }
+
+        public Builder isL3Network(boolean isL3Network) {
+            this._isL3Network = isL3Network;
+            return this;
+        }
+
+        public Builder isSharedNetwork(boolean isSharedNetwork) {
+            this._isSharedNetwork = isSharedNetwork;
+            return this;
+        }
+
+        public Builder vpcUuid(String vpcUuid) {
+            this._vpcUuid = vpcUuid;
+            return this;
+        }
+
+        public Builder networksDomainUuid(String networksDomainUuid) {
+            this._networksDomainUuid = networksDomainUuid;
+            return this;
+        }
+
+        public Builder vmInstanceName(String vmInstanceName) {
+            this._vmInstanceName = vmInstanceName;
+            return this;
+        }
+
+        public Builder vmUuid(String vmUuid) {
+            this._vmUuid = vmUuid;
+            return this;
+        }
+
+        public Builder isExpungingState(boolean isExpungingState) {
+            this._isExpungingState = isExpungingState;
+            return this;
+        }
+
+        @Override
+        public DeallocateVmVspCommand build() {
+            return new DeallocateVmVspCommand(_networkUuid,_nicFromDdUuid, _nicMacAddress, _nicIp4Address, _isL3Network, _isSharedNetwork, _vpcUuid,
+                    _networksDomainUuid, _vmInstanceName, _vmUuid, _isExpungingState);
+        }
+    }
+
     @Override
     public boolean executeInSequence() {
         return false;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof DeallocateVmVspCommand)) return false;
+        if (!super.equals(o)) return false;
+
+        DeallocateVmVspCommand that = (DeallocateVmVspCommand) o;
+
+        if (_isExpungingState != that._isExpungingState) return false;
+        if (_isL3Network != that._isL3Network) return false;
+        if (_isSharedNetwork != that._isSharedNetwork) return false;
+        if (_networkUuid != null ? !_networkUuid.equals(that._networkUuid) : that._networkUuid != null) return false;
+        if (_networksDomainUuid != null ? !_networksDomainUuid.equals(that._networksDomainUuid) : that._networksDomainUuid != null)
+            return false;
+        if (_nicFromDdUuid != null ? !_nicFromDdUuid.equals(that._nicFromDdUuid) : that._nicFromDdUuid != null)
+            return false;
+        if (_nicIp4Address != null ? !_nicIp4Address.equals(that._nicIp4Address) : that._nicIp4Address != null)
+            return false;
+        if (_nicMacAddress != null ? !_nicMacAddress.equals(that._nicMacAddress) : that._nicMacAddress != null)
+            return false;
+        if (_vmInstanceName != null ? !_vmInstanceName.equals(that._vmInstanceName) : that._vmInstanceName != null)
+            return false;
+        if (_vmUuid != null ? !_vmUuid.equals(that._vmUuid) : that._vmUuid != null) return false;
+        if (_vpcUuid != null ? !_vpcUuid.equals(that._vpcUuid) : that._vpcUuid != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (_networkUuid != null ? _networkUuid.hashCode() : 0);
+        result = 31 * result + (_nicFromDdUuid != null ? _nicFromDdUuid.hashCode() : 0);
+        result = 31 * result + (_nicMacAddress != null ? _nicMacAddress.hashCode() : 0);
+        result = 31 * result + (_nicIp4Address != null ? _nicIp4Address.hashCode() : 0);
+        result = 31 * result + (_isL3Network ? 1 : 0);
+        result = 31 * result + (_isSharedNetwork ? 1 : 0);
+        result = 31 * result + (_vpcUuid != null ? _vpcUuid.hashCode() : 0);
+        result = 31 * result + (_networksDomainUuid != null ? _networksDomainUuid.hashCode() : 0);
+        result = 31 * result + (_vmInstanceName != null ? _vmInstanceName.hashCode() : 0);
+        result = 31 * result + (_vmUuid != null ? _vmUuid.hashCode() : 0);
+        result = 31 * result + (_isExpungingState ? 1 : 0);
+        return result;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ImplementNetworkVspAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ImplementNetworkVspAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ImplementNetworkVspAnswer.java
deleted file mode 100644
index 87e7b32..0000000
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ImplementNetworkVspAnswer.java
+++ /dev/null
@@ -1,35 +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.agent.api.guru;
-
-import com.cloud.agent.api.Answer;
-import com.cloud.agent.api.Command;
-
-public class ImplementNetworkVspAnswer extends Answer {
-
-    public ImplementNetworkVspAnswer(Command command, Exception e) {
-        super(command, e);
-    }
-
-    public ImplementNetworkVspAnswer(ImplementNetworkVspCommand cmd, boolean success, String details) {
-        super(cmd, success, details);
-    }
-
-}