cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sw...@apache.org
Subject [23/39] git commit: updated refs/heads/master to 3c800b4
Date Thu, 26 May 2016 03:06:02 GMT
CLOUDSTACK-9242 : Remodel Nuage VSP plugin


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

Branch: refs/heads/master
Commit: b0c27e48d787271cbdaf4ef1e5f787049545b234
Parents: 570b676
Author: Nick Livens <nick.livens@nuagenetworks.net>
Authored: Mon May 2 10:15:52 2016 +0200
Committer: Nick Livens <nick.livens@nuagenetworks.net>
Committed: Tue May 24 11:12:19 2016 +0200

----------------------------------------------------------------------
 plugins/network-elements/nuage-vsp/pom.xml      |  12 +-
 .../cloudstack/vsp/spring-vsp-context.xml       |   2 +-
 .../com/cloud/agent/api/VspResourceAnswer.java  |  60 ---
 .../com/cloud/agent/api/VspResourceCommand.java | 119 ------
 .../api/element/ApplyAclRuleVspCommand.java     | 184 +--------
 .../api/element/ApplyStaticNatVspCommand.java   | 101 +----
 .../agent/api/element/ImplementVspCommand.java  | 238 +----------
 .../api/element/ShutDownVpcVspCommand.java      |  29 +-
 .../agent/api/guru/DeallocateVmVspCommand.java  | 187 +--------
 .../api/guru/ImplementNetworkVspCommand.java    | 304 +-------------
 .../api/guru/ReserveVmInterfaceVspCommand.java  | 369 ++---------------
 .../agent/api/guru/TrashNetworkVspCommand.java  | 101 +----
 .../agent/api/manager/GetApiDefaultsAnswer.java |  61 +++
 .../api/manager/GetApiDefaultsCommand.java      |  38 ++
 .../api/manager/GetClientDefaultsAnswer.java    |  81 ----
 .../api/manager/GetClientDefaultsCommand.java   |  38 --
 .../cloud/agent/api/sync/SyncDomainCommand.java |  31 +-
 .../cloud/agent/api/sync/SyncVspCommand.java    |  62 ---
 .../api/commands/AddNuageVspDeviceCmd.java      |  24 +-
 .../api/commands/DeleteNuageVspDeviceCmd.java   |  12 +-
 .../IssueNuageVspResourceRequestCmd.java        | 213 ----------
 .../api/commands/ListNuageVspDevicesCmd.java    |  12 +-
 .../api/commands/UpdateNuageVspDeviceCmd.java   |  12 +-
 .../cloud/network/element/NuageVspElement.java  | 240 +++--------
 .../network/guru/NuageVspGuestNetworkGuru.java  | 301 ++++----------
 .../cloud/network/manager/NuageVspManager.java  |   2 +
 .../network/manager/NuageVspManagerImpl.java    | 130 +++---
 .../network/resource/NuageVspResource.java      | 152 +++----
 .../com/cloud/network/sync/NuageVspSync.java    |  26 --
 .../cloud/network/sync/NuageVspSyncImpl.java    |  65 ---
 .../com/cloud/util/NuageVspEntityBuilder.java   | 368 +++++++++++++++++
 .../src/com/cloud/util/NuageVspUtil.java        |   9 +-
 .../vsp/acs/NuageVspPluginClientLoader.java     |  91 ++--
 .../nuage/vsp/acs/client/NuageVspApiClient.java |  32 --
 .../vsp/acs/client/NuageVspElementClient.java   |  42 --
 .../vsp/acs/client/NuageVspGuruClient.java      |  43 --
 .../vsp/acs/client/NuageVspManagerClient.java   |  42 --
 .../vsp/acs/client/NuageVspSyncClient.java      |  29 --
 .../nuage-vsp/test/com/cloud/NuageTest.java     | 157 +++++++
 .../test/com/cloud/agent/api/CommandsTest.java  |  63 +--
 .../network/element/NuageVspElementTest.java    | 193 ++++-----
 .../guru/NuageVspGuestNetworkGuruTest.java      | 216 +++++-----
 .../network/manager/NuageVspManagerTest.java    |  73 ++--
 .../network/resource/NuageVspResourceTest.java  | 122 +++---
 .../cloud/network/sync/NuageVspSyncTest.java    |  72 ----
 .../cloud/util/NuageVspEntityBuilderTest.java   | 412 +++++++++++++++++++
 plugins/pom.xml                                 |  12 +-
 ui/scripts/system.js                            |   4 +-
 48 files changed, 1832 insertions(+), 3354 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0c27e48/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 402f9a3..7369ba5 100644
--- a/plugins/network-elements/nuage-vsp/pom.xml
+++ b/plugins/network-elements/nuage-vsp/pom.xml
@@ -28,11 +28,17 @@
     <version>4.9.0-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
+  <repositories>
+    <repository>
+      <id>nuage-vsp</id>
+      <url>http://cs.mv.nuagenetworks.net/releases/</url>
+    </repository>
+  </repositories>
   <dependencies>
     <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-lang3</artifactId>
-      <version>${cs.commons-lang3.version}</version>
+      <groupId>net.nuage.vsp</groupId>
+      <artifactId>nuage-vsp-acs-client</artifactId>
+      <version>3.2.8.0</version>
     </dependency>
   </dependencies>
   <build>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0c27e48/plugins/network-elements/nuage-vsp/resources/META-INF/cloudstack/vsp/spring-vsp-context.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/resources/META-INF/cloudstack/vsp/spring-vsp-context.xml b/plugins/network-elements/nuage-vsp/resources/META-INF/cloudstack/vsp/spring-vsp-context.xml
index c579789..c447c44 100644
--- a/plugins/network-elements/nuage-vsp/resources/META-INF/cloudstack/vsp/spring-vsp-context.xml
+++ b/plugins/network-elements/nuage-vsp/resources/META-INF/cloudstack/vsp/spring-vsp-context.xml
@@ -37,5 +37,5 @@
         <property name="name" value="NuageVspElement" />
     </bean>
 	<bean id="NuageVspManager" class="com.cloud.network.manager.NuageVspManagerImpl" />
-  	<bean id="NuageVspSync" class="com.cloud.network.sync.NuageVspSyncImpl" />
+    <bean id="NuageVspEntityBuilder" class="com.cloud.util.NuageVspEntityBuilder" />
 </beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0c27e48/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
deleted file mode 100644
index 979dcd3..0000000
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/VspResourceAnswer.java
+++ /dev/null
@@ -1,60 +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;
-
-public class VspResourceAnswer extends Answer {
-
-    private String _resourceInfo;
-
-    public VspResourceAnswer(Command cmd, String resourceInfo, String details) {
-        super(cmd, true, details);
-        this._resourceInfo = resourceInfo;
-    }
-
-    public VspResourceAnswer(VspResourceCommand cmd, boolean success, String details) {
-        super(cmd, success, details);
-    }
-
-    public VspResourceAnswer(VspResourceCommand cmd, Exception e) {
-        super(cmd, e);
-    }
-
-    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/b0c27e48/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
deleted file mode 100644
index 6e03dab..0000000
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/VspResourceCommand.java
+++ /dev/null
@@ -1,119 +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;
-
-public class VspResourceCommand extends Command {
-
-    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) {
-        super();
-        this._method = method;
-        this._resource = resource;
-        this._resourceId = resourceId;
-        this._childResource = childResource;
-        this._entityDetails = entityDetails;
-        this._resourceFilter = resourceFilter;
-        this._proxyUserUuid = proxyUserUuid;
-        this._proxyUserDomainuuid = proxyUserDomainuuid;
-    }
-
-    public String getRequestType() {
-        return _method;
-    }
-
-    public String getResource() {
-        return _resource;
-    }
-
-    public String getResourceId() {
-        return _resourceId;
-    }
-
-    public String getChildResource() {
-        return _childResource;
-    }
-
-    public Object getEntityDetails() {
-        return _entityDetails;
-    }
-
-    public String getResourceFilter() {
-        return _resourceFilter;
-    }
-
-    public String getProxyUserUuid() {
-        return _proxyUserUuid;
-    }
-
-    public String getProxyUserDomainuuid() {
-        return _proxyUserDomainuuid;
-    }
-
-    @Override
-    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/b0c27e48/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 7b1d40b..50cace6 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,173 +19,43 @@
 
 package com.cloud.agent.api.element;
 
-import com.cloud.agent.api.CmdBuilder;
 import com.cloud.agent.api.Command;
+import net.nuage.vsp.acs.client.api.model.VspAclRule;
+import net.nuage.vsp.acs.client.api.model.VspNetwork;
 
 import java.util.List;
-import java.util.Map;
 
 public class ApplyAclRuleVspCommand extends Command {
 
-    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 VspAclRule.ACLType _aclType;
+    private final VspNetwork _network;
+    private final List<VspAclRule> _aclRules;
     private final boolean _networkReset;
-    private final String _domainTemplateName;
 
-    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) {
+    public ApplyAclRuleVspCommand(VspAclRule.ACLType aclType, VspNetwork network, List<VspAclRule> aclRules, boolean networkReset) {
         super();
-        this._networkAcl = networkAcl;
-        this._networkUuid = networkUuid;
-        this._networkDomainUuid = networkDomainUuid;
-        this._vpcOrSubnetUuid = vpcOrSubnetUuid;
-        this._networkName = networkName;
-        this._isL2Network = isL2Network;
+        this._aclType = aclType;
+        this._network = network;
         this._aclRules = aclRules;
-        this._networkId = networkId;
-        this._egressDefaultPolicy = egressDefaultPolicy;
-        this._acsIngressAcl = acsIngressAcl;
         this._networkReset = networkReset;
-        this._domainTemplateName = domainTemplateName;
     }
 
-    public boolean isNetworkAcl() {
-        return _networkAcl;
+    public VspAclRule.ACLType getAclType() {
+        return _aclType;
     }
 
-    public String getNetworkUuid() {
-        return _networkUuid;
+    public VspNetwork getNetwork() {
+        return _network;
     }
 
-    public String getNetworkDomainUuid() {
-        return _networkDomainUuid;
-    }
-
-    public String getVpcOrSubnetUuid() {
-        return _vpcOrSubnetUuid;
-    }
-
-    public String getNetworkName() {
-        return _networkName;
-    }
-
-    public boolean isL2Network() {
-        return _isL2Network;
-    }
-
-    public List<Map<String, Object>> getAclRules() {
+    public List<VspAclRule> getAclRules() {
         return _aclRules;
     }
 
-    public long getNetworkId() {
-        return _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
     public boolean executeInSequence() {
         return false;
@@ -199,22 +69,10 @@ public class ApplyAclRuleVspCommand extends Command {
 
         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;
+        if (_aclType != that._aclType) return false;
+        if (_network != null ? !_network.equals(that._network) : that._network != null) return false;
 
         return true;
     }
@@ -222,18 +80,10 @@ public class ApplyAclRuleVspCommand extends Command {
     @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 + (_aclType != null ? _aclType.hashCode() : 0);
+        result = 31 * result + (_network != null ? _network.hashCode() : 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/b0c27e48/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 cc4e930..500f091 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,100 +19,31 @@
 
 package com.cloud.agent.api.element;
 
-import com.cloud.agent.api.CmdBuilder;
 import com.cloud.agent.api.Command;
+import net.nuage.vsp.acs.client.api.model.VspNetwork;
+import net.nuage.vsp.acs.client.api.model.VspStaticNat;
 
 import java.util.List;
-import java.util.Map;
 
 public class ApplyStaticNatVspCommand extends Command {
 
-    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;
+    private final VspNetwork _network;
+    private final List<VspStaticNat> _staticNatDetails;
 
-    private ApplyStaticNatVspCommand(String networkDomainUuid, String networkUuid, String vpcOrSubnetUuid, boolean isL3Network, boolean isVpc,
-            List<Map<String, Object>> staticNatDetails) {
+    public ApplyStaticNatVspCommand(VspNetwork network, List<VspStaticNat> staticNatDetails) {
         super();
-        this._networkDomainUuid = networkDomainUuid;
-        this._networkUuid = networkUuid;
-        this._vpcOrSubnetUuid = vpcOrSubnetUuid;
-        this._isL3Network = isL3Network;
-        this._isVpc = isVpc;
+        this._network = network;
         this._staticNatDetails = staticNatDetails;
     }
 
-    public String getNetworkDomainUuid() {
-        return _networkDomainUuid;
+    public VspNetwork getNetwork() {
+        return _network;
     }
 
-    public String getNetworkUuid() {
-        return _networkUuid;
-    }
-
-    public String getVpcOrSubnetUuid() {
-        return _vpcOrSubnetUuid;
-    }
-
-    public boolean isL3Network() {
-        return _isL3Network;
-    }
-
-    public boolean isVpc() {
-        return _isVpc;
-    }
-
-    public List<Map<String, Object>> getStaticNatDetails() {
+    public List<VspStaticNat> 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;
@@ -126,15 +57,9 @@ public class ApplyStaticNatVspCommand extends Command {
 
         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 (_network != null ? !_network.equals(that._network) : that._network != 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;
     }
@@ -142,11 +67,7 @@ public class ApplyStaticNatVspCommand extends Command {
     @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 + (_network != null ? _network.hashCode() : 0);
         result = 31 * result + (_staticNatDetails != null ? _staticNatDetails.hashCode() : 0);
         return result;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0c27e48/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
index c1de6b9..2145f60 100644
--- 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
@@ -19,220 +19,48 @@
 
 package com.cloud.agent.api.element;
 
-import com.cloud.agent.api.CmdBuilder;
 import com.cloud.agent.api.Command;
+import net.nuage.vsp.acs.client.api.model.VspAclRule;
+import net.nuage.vsp.acs.client.api.model.VspNetwork;
 
 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 VspNetwork _network;
     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 final List<VspAclRule> _ingressFirewallRules;
+    private final List<VspAclRule> _egressFirewallRules;
+    private final List<String> _floatingIpUuids;
 
-    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) {
+    public ImplementVspCommand(VspNetwork network, List<String> dnsServers, List<VspAclRule> ingressFirewallRules,
+            List<VspAclRule> egressFirewallRules, List<String> floatingIpUuids) {
         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._network = network;
         this._dnsServers = dnsServers;
         this._ingressFirewallRules = ingressFirewallRules;
         this._egressFirewallRules = egressFirewallRules;
-        this._acsFipUuid = acsFipUuid;
-        this._egressDefaultPolicy = egressDefaultPolicy;
+        this._floatingIpUuids = floatingIpUuids;
     }
 
-    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 VspNetwork getNetwork() {
+        return _network;
     }
 
     public List<String> getDnsServers() {
         return _dnsServers;
     }
 
-    public List<Map<String, Object>> getIngressFirewallRules() {
+    public List<VspAclRule> getIngressFirewallRules() {
         return _ingressFirewallRules;
     }
 
-    public List<Map<String, Object>> getEgressFirewallRules() {
+    public List<VspAclRule> 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);
-        }
+    public List<String> getFloatingIpUuids() {
+        return _floatingIpUuids;
     }
 
     @Override
@@ -248,27 +76,14 @@ public class ImplementVspCommand extends Command {
 
         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)
+        if (_floatingIpUuids != null ? !_floatingIpUuids.equals(that._floatingIpUuids) : that._floatingIpUuids != 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)
+        if (_ingressFirewallRules != null ? !_ingressFirewallRules.equals(that._ingressFirewallRules) : that._ingressFirewallRules != null)
             return false;
+        if (_network != null ? !_network.equals(that._network) : that._network != null) return false;
 
         return true;
     }
@@ -276,22 +91,11 @@ public class ImplementVspCommand extends Command {
     @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 + (_network != null ? _network.hashCode() : 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);
+        result = 31 * result + (_floatingIpUuids != null ? _floatingIpUuids.hashCode() : 0);
         return result;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0c27e48/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 4c41e51..d91734b 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,7 +19,6 @@
 
 package com.cloud.agent.api.element;
 
-import com.cloud.agent.api.CmdBuilder;
 import com.cloud.agent.api.Command;
 
 public class ShutDownVpcVspCommand extends Command {
@@ -28,7 +27,7 @@ public class ShutDownVpcVspCommand extends Command {
     private final String _vpcUuid;
     private final String _domainTemplateName;
 
-    private ShutDownVpcVspCommand(String domainUuid, String vpcUuid, String domainTemplateName) {
+    public ShutDownVpcVspCommand(String domainUuid, String vpcUuid, String domainTemplateName) {
         super();
         this._domainUuid = domainUuid;
         this._vpcUuid = vpcUuid;
@@ -47,32 +46,6 @@ public class ShutDownVpcVspCommand extends Command {
         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;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0c27e48/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 421fa4c..10dffcc 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,156 +19,34 @@
 
 package com.cloud.agent.api.guru;
 
-import com.cloud.agent.api.CmdBuilder;
 import com.cloud.agent.api.Command;
+import net.nuage.vsp.acs.client.api.model.VspNetwork;
+import net.nuage.vsp.acs.client.api.model.VspNic;
+import net.nuage.vsp.acs.client.api.model.VspVm;
 
 public class DeallocateVmVspCommand extends Command {
 
-    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 final VspNetwork _network;
+    private final VspVm _vm;
+    private final VspNic _nic;
 
-    private DeallocateVmVspCommand(String networkUuid, String nicFromDdUuid, String nicMacAddress, String nicIp4Address, boolean isL3Network, boolean isSharedNetwork, String vpcUuid,
-            String networksDomainUuid, String vmInstanceName, String vmUuid, boolean isExpungingState) {
+    public DeallocateVmVspCommand(VspNetwork network, VspVm vm, VspNic nic) {
         super();
-        this._networkUuid = networkUuid;
-        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;
+        this._network = network;
+        this._vm = vm;
+        this._nic = nic;
     }
 
-    public String getNetworkUuid() {
-        return _networkUuid;
+    public VspNetwork getNetwork() {
+        return this._network;
     }
 
-    public String getNicFromDdUuid() {
-        return _nicFromDdUuid;
+    public VspVm getVm() {
+        return this._vm;
     }
 
-    public String getNicMacAddress() {
-        return _nicMacAddress;
-    }
-
-    public String getNicIp4Address() {
-        return _nicIp4Address;
-    }
-
-    public boolean isL3Network() {
-        return _isL3Network;
-    }
-
-    public boolean isSharedNetwork() {
-        return _isSharedNetwork;
-    }
-
-    public String getVpcUuid() {
-        return _vpcUuid;
-    }
-
-    public String getNetworksDomainUuid() {
-        return _networksDomainUuid;
-    }
-
-    public String getVmInstanceName() {
-        return _vmInstanceName;
-    }
-
-    public String getVmUuid() {
-        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);
-        }
+    public VspNic getNic() {
+        return this._nic;
     }
 
     @Override
@@ -184,22 +62,9 @@ public class DeallocateVmVspCommand extends Command {
 
         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;
+        if (_network != null ? !_network.equals(that._network) : that._network != null) return false;
+        if (_nic != null ? !_nic.equals(that._nic) : that._nic != null) return false;
+        if (_vm != null ? !_vm.equals(that._vm) : that._vm != null) return false;
 
         return true;
     }
@@ -207,17 +72,9 @@ public class DeallocateVmVspCommand extends Command {
     @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);
+        result = 31 * result + (_network != null ? _network.hashCode() : 0);
+        result = 31 * result + (_vm != null ? _vm.hashCode() : 0);
+        result = 31 * result + (_nic != null ? _nic.hashCode() : 0);
         return result;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0c27e48/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ImplementNetworkVspCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ImplementNetworkVspCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ImplementNetworkVspCommand.java
index 575e57d..bb35756 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ImplementNetworkVspCommand.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ImplementNetworkVspCommand.java
@@ -19,272 +19,30 @@
 
 package com.cloud.agent.api.guru;
 
-import com.cloud.agent.api.CmdBuilder;
 import com.cloud.agent.api.Command;
+import net.nuage.vsp.acs.client.api.model.VspNetwork;
 
-import java.util.Collection;
 import java.util.List;
 
 public class ImplementNetworkVspCommand extends Command {
 
-    private final String _networkDomainName;
-    private final String _networkDomainPath;
-    private final String _networkDomainUuid;
-    private final String _networkAccountName;
-    private final String _networkAccountUuid;
-    private final String _networkName;
-    private final String _networkCidr;
-    private final String _networkGateway;
-    private final Long _networkAclId;
+    private final VspNetwork _network;
     private final List<String> _dnsServers;
-    private final List<String> _gatewaySystemIds;
-    private final String _networkUuid;
-    private final boolean _isL3Network;
-    private final boolean _isVpc;
-    private final boolean _isSharedNetwork;
-    private final String _vpcName;
-    private final String _vpcUuid;
-    private final boolean _defaultEgressPolicy;
-    private final List<String[]> _ipAddressRange;
-    private final String _domainTemplateName;
 
-    private ImplementNetworkVspCommand(String networkDomainName, String networkDomainPath, String networkDomainUuid, String networkAccountName, String networkAccountUuid,
-            String networkName, String networkCidr, String networkGateway, Long networkAclId, List<String> dnsServers, List<String> gatewaySystemIds, String networkUuid,
-            boolean isL3Network, boolean isVpc, boolean isSharedNetwork, String vpcName, String vpcUuid, boolean defaultEgressPolicy, List<String[]> ipAddressRange,
-            String domainTemplateName) {
+    public ImplementNetworkVspCommand(VspNetwork network, List<String> dnsServers) {
         super();
-        this._networkDomainName = networkDomainName;
-        this._networkDomainPath = networkDomainPath;
-        this._networkDomainUuid = networkDomainUuid;
-        this._networkAccountName = networkAccountName;
-        this._networkAccountUuid = networkAccountUuid;
-        this._networkName = networkName;
-        this._networkCidr = networkCidr;
-        this._networkGateway = networkGateway;
-        this._networkAclId = networkAclId;
+        this._network = network;
         this._dnsServers = dnsServers;
-        this._gatewaySystemIds = gatewaySystemIds;
-        this._networkUuid = networkUuid;
-        this._isL3Network = isL3Network;
-        this._isVpc = isVpc;
-        this._isSharedNetwork = isSharedNetwork;
-        this._vpcName = vpcName;
-        this._vpcUuid = vpcUuid;
-        this._defaultEgressPolicy = defaultEgressPolicy;
-        this._ipAddressRange = ipAddressRange;
-        this._domainTemplateName = domainTemplateName;
     }
 
-    public String getNetworkDomainName() {
-        return _networkDomainName;
-    }
-
-    public String getNetworkDomainPath() {
-        return _networkDomainPath;
-    }
-
-    public String getNetworkDomainUuid() {
-        return _networkDomainUuid;
-    }
-
-    public String getNetworkAccountName() {
-        return _networkAccountName;
-    }
-
-    public String getNetworkAccountUuid() {
-        return _networkAccountUuid;
-    }
-
-    public String getNetworkName() {
-        return _networkName;
-    }
-
-    public String getNetworkCidr() {
-        return _networkCidr;
-    }
-
-    public String getNetworkGateway() {
-        return _networkGateway;
-    }
-
-    public Long getNetworkAclId() {
-        return _networkAclId;
+    public VspNetwork getNetwork() {
+        return _network;
     }
 
     public List<String> getDnsServers() {
         return _dnsServers;
     }
 
-    public List<String> getGatewaySystemIds() {
-        return _gatewaySystemIds;
-    }
-
-    public String getNetworkUuid() {
-        return _networkUuid;
-    }
-
-    public boolean isL3Network() {
-        return _isL3Network;
-    }
-
-    public boolean isVpc() {
-        return _isVpc;
-    }
-
-    public boolean isSharedNetwork() {
-        return _isSharedNetwork;
-    }
-
-    public String getVpcName() {
-        return _vpcName;
-    }
-
-    public String getVpcUuid() {
-        return _vpcUuid;
-    }
-
-    public boolean isDefaultEgressPolicy() {
-        return _defaultEgressPolicy;
-    }
-
-    public Collection<String[]> getIpAddressRange() {
-        return _ipAddressRange;
-    }
-
-    public String getDomainTemplateName() {
-        return _domainTemplateName;
-    }
-
-    public static class Builder implements CmdBuilder<ImplementNetworkVspCommand> {
-        private String _networkDomainName;
-        private String _networkDomainPath;
-        private String _networkDomainUuid;
-        private String _networkAccountName;
-        private String _networkAccountUuid;
-        private String _networkName;
-        private String _networkCidr;
-        private String _networkGateway;
-        private Long _networkAclId;
-        private List<String> _dnsServers;
-        private List<String> _gatewaySystemIds;
-        private String _networkUuid;
-        private boolean _isL3Network;
-        private boolean _isVpc;
-        private boolean _isSharedNetwork;
-        private String _vpcName;
-        private String _vpcUuid;
-        private boolean _defaultEgressPolicy;
-        private List<String[]> _ipAddressRange;
-        private String _domainTemplateName;
-
-        public Builder networkDomainName(String networkDomainName) {
-            this._networkDomainName = networkDomainName;
-            return this;
-        }
-
-        public Builder networkDomainPath(String networkDomainPath) {
-            this._networkDomainPath = networkDomainPath;
-            return this;
-        }
-
-        public Builder networkDomainUuid(String networkDomainUuid) {
-            this._networkDomainUuid = networkDomainUuid;
-            return this;
-        }
-
-        public Builder networkAccountName(String networkAccountName) {
-            this._networkAccountName = networkAccountName;
-            return this;
-        }
-
-        public Builder networkAccountUuid(String networkAccountUuid) {
-            this._networkAccountUuid = networkAccountUuid;
-            return this;
-        }
-
-        public Builder networkName(String networkName) {
-            this._networkName = networkName;
-            return this;
-        }
-
-        public Builder networkCidr(String networkCidr) {
-            this._networkCidr = networkCidr;
-            return this;
-        }
-
-        public Builder networkGateway(String networkGateway) {
-            this._networkGateway = networkGateway;
-            return this;
-        }
-
-        public Builder networkAclId(Long networkAclId) {
-            this._networkAclId = networkAclId;
-            return this;
-        }
-
-        public Builder dnsServers(List<String> dnsServers) {
-            this._dnsServers = dnsServers;
-            return this;
-        }
-
-        public Builder gatewaySystemIds(List<String> gatewaySystemIds) {
-            this._gatewaySystemIds = gatewaySystemIds;
-            return this;
-        }
-
-        public Builder networkUuid(String networkUuid) {
-            this._networkUuid = networkUuid;
-            return this;
-        }
-
-        public Builder isL3Network(boolean isL3Network) {
-            this._isL3Network = isL3Network;
-            return this;
-        }
-
-        public Builder isVpc(boolean isVpc) {
-            this._isVpc = isVpc;
-            return this;
-        }
-
-        public Builder isSharedNetwork(boolean isSharedNetwork) {
-            this._isSharedNetwork = isSharedNetwork;
-            return this;
-        }
-
-        public Builder vpcName(String vpcName) {
-            this._vpcName = vpcName;
-            return this;
-        }
-
-        public Builder vpcUuid(String vpcUuid) {
-            this._vpcUuid = vpcUuid;
-            return this;
-        }
-
-        public Builder defaultEgressPolicy(boolean defaultEgressPolicy) {
-            this._defaultEgressPolicy = defaultEgressPolicy;
-            return this;
-        }
-
-        public Builder ipAddressRange(List<String[]> ipAddressRange) {
-            this._ipAddressRange = ipAddressRange;
-            return this;
-        }
-
-        public Builder domainTemplateName(String domainTemplateName) {
-            this._domainTemplateName = domainTemplateName;
-            return this;
-        }
-
-        @Override
-        public ImplementNetworkVspCommand build() {
-            return new ImplementNetworkVspCommand(_networkDomainName, _networkDomainPath, _networkDomainUuid, _networkAccountName, _networkAccountUuid, _networkName,
-                    _networkCidr, _networkGateway, _networkAclId, _dnsServers, _gatewaySystemIds, _networkUuid, _isL3Network, _isVpc, _isSharedNetwork, _vpcName, _vpcUuid,
-                    _defaultEgressPolicy, _ipAddressRange, _domainTemplateName);
-        }
-    }
-
     @Override
     public boolean executeInSequence() {
         return false;
@@ -298,36 +56,8 @@ public class ImplementNetworkVspCommand extends Command {
 
         ImplementNetworkVspCommand that = (ImplementNetworkVspCommand) o;
 
-        if (_defaultEgressPolicy != that._defaultEgressPolicy) return false;
-        if (_isL3Network != that._isL3Network) return false;
-        if (_isSharedNetwork != that._isSharedNetwork) return false;
-        if (_isVpc != that._isVpc) 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 (_gatewaySystemIds != null ? !_gatewaySystemIds.equals(that._gatewaySystemIds) : that._gatewaySystemIds != null)
-            return false;
-        if (_ipAddressRange != null ? !_ipAddressRange.equals(that._ipAddressRange) : that._ipAddressRange != null)
-            return false;
-        if (_networkAccountName != null ? !_networkAccountName.equals(that._networkAccountName) : that._networkAccountName != null)
-            return false;
-        if (_networkAccountUuid != null ? !_networkAccountUuid.equals(that._networkAccountUuid) : that._networkAccountUuid != null)
-            return false;
-        if (_networkAclId != null ? !_networkAclId.equals(that._networkAclId) : that._networkAclId != null)
-            return false;
-        if (_networkCidr != null ? !_networkCidr.equals(that._networkCidr) : that._networkCidr != null) return false;
-        if (_networkDomainName != null ? !_networkDomainName.equals(that._networkDomainName) : that._networkDomainName != null)
-            return false;
-        if (_networkDomainPath != null ? !_networkDomainPath.equals(that._networkDomainPath) : that._networkDomainPath != null)
-            return false;
-        if (_networkDomainUuid != null ? !_networkDomainUuid.equals(that._networkDomainUuid) : that._networkDomainUuid != null)
-            return false;
-        if (_networkGateway != null ? !_networkGateway.equals(that._networkGateway) : that._networkGateway != 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 (_vpcName != null ? !_vpcName.equals(that._vpcName) : that._vpcName != null) return false;
-        if (_vpcUuid != null ? !_vpcUuid.equals(that._vpcUuid) : that._vpcUuid != null) return false;
+        if (_network != null ? !_network.equals(that._network) : that._network != null) return false;
 
         return true;
     }
@@ -335,26 +65,8 @@ public class ImplementNetworkVspCommand extends Command {
     @Override
     public int hashCode() {
         int result = super.hashCode();
-        result = 31 * result + (_networkDomainName != null ? _networkDomainName.hashCode() : 0);
-        result = 31 * result + (_networkDomainPath != null ? _networkDomainPath.hashCode() : 0);
-        result = 31 * result + (_networkDomainUuid != null ? _networkDomainUuid.hashCode() : 0);
-        result = 31 * result + (_networkAccountName != null ? _networkAccountName.hashCode() : 0);
-        result = 31 * result + (_networkAccountUuid != null ? _networkAccountUuid.hashCode() : 0);
-        result = 31 * result + (_networkName != null ? _networkName.hashCode() : 0);
-        result = 31 * result + (_networkCidr != null ? _networkCidr.hashCode() : 0);
-        result = 31 * result + (_networkGateway != null ? _networkGateway.hashCode() : 0);
-        result = 31 * result + (_networkAclId != null ? _networkAclId.hashCode() : 0);
+        result = 31 * result + (_network != null ? _network.hashCode() : 0);
         result = 31 * result + (_dnsServers != null ? _dnsServers.hashCode() : 0);
-        result = 31 * result + (_gatewaySystemIds != null ? _gatewaySystemIds.hashCode() : 0);
-        result = 31 * result + (_networkUuid != null ? _networkUuid.hashCode() : 0);
-        result = 31 * result + (_isL3Network ? 1 : 0);
-        result = 31 * result + (_isVpc ? 1 : 0);
-        result = 31 * result + (_isSharedNetwork ? 1 : 0);
-        result = 31 * result + (_vpcName != null ? _vpcName.hashCode() : 0);
-        result = 31 * result + (_vpcUuid != null ? _vpcUuid.hashCode() : 0);
-        result = 31 * result + (_defaultEgressPolicy ? 1 : 0);
-        result = 31 * result + (_ipAddressRange != null ? _ipAddressRange.hashCode() : 0);
-        result = 31 * result + (_domainTemplateName != null ? _domainTemplateName.hashCode() : 0);
         return result;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0c27e48/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReserveVmInterfaceVspCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReserveVmInterfaceVspCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReserveVmInterfaceVspCommand.java
index abcd0f2..299b9a6 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReserveVmInterfaceVspCommand.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReserveVmInterfaceVspCommand.java
@@ -19,303 +19,41 @@
 
 package com.cloud.agent.api.guru;
 
-import com.cloud.agent.api.CmdBuilder;
 import com.cloud.agent.api.Command;
+import net.nuage.vsp.acs.client.api.model.VspNetwork;
+import net.nuage.vsp.acs.client.api.model.VspNic;
+import net.nuage.vsp.acs.client.api.model.VspStaticNat;
+import net.nuage.vsp.acs.client.api.model.VspVm;
 
 public class ReserveVmInterfaceVspCommand extends Command {
 
-    private final String _nicUuid;
-    private final String _nicMacAddress;
-    private final String _networkUuid;
-    private final boolean _isL3Network;
-    private final boolean _isSharedNetwork;
-    private final String _vpcUuid;
-    private final String _networkDomainUuid;
-    private final String _networksAccountUuid;
-    private final boolean _isDomainRouter;
-    private final String _domainRouterIp;
-    private final String _vmInstanceName;
-    private final String _vmUuid;
-    private final String _vmUserName;
-    private final String _vmUserDomainName;
-    private final boolean _useStaticIp;
-    private final String _staticIp;
-    private final String _staticNatIpUuid;
-    private final String _staticNatIpAddress;
-    private final boolean _isStaticNatIpAllocated;
-    private final boolean _isOneToOneNat;
-    private final String _staticNatVlanUuid;
-    private final String _staticNatVlanGateway;
-    private final String _staticNatVlanNetmask;
+    private final VspNetwork _network;
+    private final VspVm _vm;
+    private final VspNic _nic;
+    private final VspStaticNat _staticNat;
 
-    private ReserveVmInterfaceVspCommand(String nicUuid, String nicMacAddress, String networkUuid, boolean isL3Network, boolean isSharedNetwork, String vpcUuid, String networkDomainUuid,
-            String networksAccountUuid, boolean isDomainRouter, String domainRouterIp, String vmInstanceName, String vmUuid, String vmUserName, String vmUserDomainName,
-            boolean useStaticIp, String staticIp, String staticNatIpUuid, String staticNatIpAddress, boolean isStaticNatIpAllocated, boolean isOneToOneNat, String staticNatVlanUuid,
-            String staticNatVlanGateway, String staticNatVlanNetmask) {
+    public ReserveVmInterfaceVspCommand(VspNetwork network, VspVm vm, VspNic nic, VspStaticNat staticNat) {
         super();
-        this._nicUuid = nicUuid;
-        this._nicMacAddress = nicMacAddress;
-        this._networkUuid = networkUuid;
-        this._isL3Network = isL3Network;
-        this._isSharedNetwork = isSharedNetwork;
-        this._vpcUuid = vpcUuid;
-        this._networkDomainUuid = networkDomainUuid;
-        this._networksAccountUuid = networksAccountUuid;
-        this._isDomainRouter = isDomainRouter;
-        this._domainRouterIp = domainRouterIp;
-        this._vmInstanceName = vmInstanceName;
-        this._vmUuid = vmUuid;
-        this._vmUserName = vmUserName;
-        this._vmUserDomainName = vmUserDomainName;
-        this._useStaticIp = useStaticIp;
-        this._staticIp = staticIp;
-        this._staticNatIpUuid = staticNatIpUuid;
-        this._staticNatIpAddress = staticNatIpAddress;
-        this._isStaticNatIpAllocated = isStaticNatIpAllocated;
-        this._isOneToOneNat = isOneToOneNat;
-        this._staticNatVlanUuid = staticNatVlanUuid;
-        this._staticNatVlanGateway = staticNatVlanGateway;
-        this._staticNatVlanNetmask = staticNatVlanNetmask;
+        this._network = network;
+        this._vm = vm;
+        this._nic = nic;
+        this._staticNat = staticNat;
     }
 
-    public String getNicUuid() {
-        return _nicUuid;
+    public VspNetwork getNetwork() {
+        return _network;
     }
 
-    public String getNicMacAddress() {
-        return _nicMacAddress;
+    public VspVm getVm() {
+        return _vm;
     }
 
-    public String getNetworkUuid() {
-        return _networkUuid;
+    public VspNic getNic() {
+        return _nic;
     }
 
-    public boolean isL3Network() {
-        return _isL3Network;
-    }
-
-    public boolean isSharedNetwork() {
-        return _isSharedNetwork;
-    }
-
-    public String getVpcUuid() {
-        return _vpcUuid;
-    }
-
-    public String getNetworkDomainUuid() {
-        return _networkDomainUuid;
-    }
-
-    public String getNetworksAccountUuid() {
-        return _networksAccountUuid;
-    }
-
-    public boolean isDomainRouter() {
-        return _isDomainRouter;
-    }
-
-    public String getDomainRouterIp() {
-        return _domainRouterIp;
-    }
-
-    public String getVmInstanceName() {
-        return _vmInstanceName;
-    }
-
-    public String getVmUuid() {
-        return _vmUuid;
-    }
-
-    public String getVmUserName() {
-        return _vmUserName;
-    }
-
-    public String getVmUserDomainName() {
-        return _vmUserDomainName;
-    }
-
-    public boolean useStaticIp() {
-        return _useStaticIp;
-    }
-
-    public String getStaticIp() {
-        return _staticIp;
-    }
-
-    public String getStaticNatIpUuid() {
-        return _staticNatIpUuid;
-    }
-
-    public String getStaticNatIpAddress() {
-        return _staticNatIpAddress;
-    }
-
-    public boolean isStaticNatIpAllocated() {
-        return _isStaticNatIpAllocated;
-    }
-
-    public boolean isOneToOneNat() {
-        return _isOneToOneNat;
-    }
-
-    public String getStaticNatVlanUuid() {
-        return _staticNatVlanUuid;
-    }
-
-    public String getStaticNatVlanGateway() {
-        return _staticNatVlanGateway;
-    }
-
-    public String getStaticNatVlanNetmask() {
-        return _staticNatVlanNetmask;
-    }
-
-    public static class Builder implements CmdBuilder<ReserveVmInterfaceVspCommand> {
-        private String _nicUuid;
-        private String _nicMacAddress;
-        private String _networkUuid;
-        private boolean _isL3Network;
-        private boolean _isSharedNetwork;
-        private String _vpcUuid;
-        private String _networkDomainUuid;
-        private String _networksAccountUuid;
-        private boolean _isDomainRouter;
-        private String _domainRouterIp;
-        private String _vmInstanceName;
-        private String _vmUuid;
-        private String _vmUserName;
-        private String _vmUserDomainName;
-        private boolean _useStaticIp;
-        private String _staticIp;
-        private String _staticNatIpUuid;
-        private String _staticNatIpAddress;
-        private boolean _isStaticNatIpAllocated;
-        private boolean _isOneToOneNat;
-        private String _staticNatVlanUuid;
-        private String _staticNatVlanGateway;
-        private String _staticNatVlanNetmask;
-
-        public Builder nicUuid(String nicUuid) {
-            this._nicUuid = nicUuid;
-            return this;
-        }
-
-        public Builder nicMacAddress(String nicMacAddress) {
-            this._nicMacAddress = nicMacAddress;
-            return this;
-        }
-
-        public Builder networkUuid(String networkUuid) {
-            this._networkUuid = networkUuid;
-            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 networkDomainUuid(String networkDomainUuid) {
-            this._networkDomainUuid = networkDomainUuid;
-            return this;
-        }
-
-        public Builder networksAccountUuid(String networksAccountUuid) {
-            this._networksAccountUuid = networksAccountUuid;
-            return this;
-        }
-
-        public Builder isDomainRouter(boolean isDomainRouter) {
-            this._isDomainRouter = isDomainRouter;
-            return this;
-        }
-
-        public Builder domainRouterIp(String domainRouterIp) {
-            this._domainRouterIp = domainRouterIp;
-            return this;
-        }
-
-        public Builder vmInstanceName(String vmInstanceName) {
-            this._vmInstanceName = vmInstanceName;
-            return this;
-        }
-
-        public Builder vmUuid(String vmUuid) {
-            this._vmUuid = vmUuid;
-            return this;
-        }
-
-        public Builder vmUserName(String vmUserName) {
-            this._vmUserName = vmUserName;
-            return this;
-        }
-
-        public Builder vmUserDomainName(String vmUserDomainName) {
-            this._vmUserDomainName = vmUserDomainName;
-            return this;
-        }
-
-        public Builder useStaticIp(boolean useStaticIp) {
-            this._useStaticIp = useStaticIp;
-            return this;
-        }
-
-        public Builder staticIp(String staticIp) {
-            this._staticIp = staticIp;
-            return this;
-        }
-
-        public Builder staticNatIpUuid(String staticNatIpUuid) {
-            this._staticNatIpUuid = staticNatIpUuid;
-            return this;
-        }
-
-        public Builder staticNatIpAddress(String staticNatIpAddress) {
-            this._staticNatIpAddress = staticNatIpAddress;
-            return this;
-        }
-
-        public Builder isStaticNatIpAllocated(boolean isStaticNatIpAllocated) {
-            this._isStaticNatIpAllocated = isStaticNatIpAllocated;
-            return this;
-        }
-
-        public Builder isOneToOneNat(boolean isOneToOneNat) {
-            this._isOneToOneNat = isOneToOneNat;
-            return this;
-        }
-
-        public Builder staticNatVlanUuid(String staticNatVlanUuid) {
-            this._staticNatVlanUuid = staticNatVlanUuid;
-            return this;
-        }
-
-        public Builder staticNatVlanGateway(String staticNatVlanGateway) {
-            this._staticNatVlanGateway = staticNatVlanGateway;
-            return this;
-        }
-
-        public Builder staticNatVlanNetmask(String staticNatVlanNetmask) {
-            this._staticNatVlanNetmask = staticNatVlanNetmask;
-            return this;
-        }
-
-        @Override
-        public ReserveVmInterfaceVspCommand build() {
-            return new ReserveVmInterfaceVspCommand(_nicUuid, _nicMacAddress, _networkUuid, _isL3Network, _isSharedNetwork, _vpcUuid, _networkDomainUuid, _networksAccountUuid,
-                    _isDomainRouter, _domainRouterIp, _vmInstanceName, _vmUuid, _vmUserName, _vmUserDomainName, _useStaticIp, _staticIp, _staticNatIpUuid, _staticNatIpAddress,
-                    _isStaticNatIpAllocated, _isOneToOneNat, _staticNatVlanUuid, _staticNatVlanGateway, _staticNatVlanNetmask);
-        }
+    public VspStaticNat getStaticNat() {
+        return _staticNat;
     }
 
     @Override
@@ -331,40 +69,10 @@ public class ReserveVmInterfaceVspCommand extends Command {
 
         ReserveVmInterfaceVspCommand that = (ReserveVmInterfaceVspCommand) o;
 
-        if (_isDomainRouter != that._isDomainRouter) return false;
-        if (_isL3Network != that._isL3Network) return false;
-        if (_isOneToOneNat != that._isOneToOneNat) return false;
-        if (_isSharedNetwork != that._isSharedNetwork) return false;
-        if (_isStaticNatIpAllocated != that._isStaticNatIpAllocated) return false;
-        if (_useStaticIp != that._useStaticIp) return false;
-        if (_domainRouterIp != null ? !_domainRouterIp.equals(that._domainRouterIp) : that._domainRouterIp != null)
-            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 (_networksAccountUuid != null ? !_networksAccountUuid.equals(that._networksAccountUuid) : that._networksAccountUuid != null)
-            return false;
-        if (_nicMacAddress != null ? !_nicMacAddress.equals(that._nicMacAddress) : that._nicMacAddress != null)
-            return false;
-        if (_nicUuid != null ? !_nicUuid.equals(that._nicUuid) : that._nicUuid != null) return false;
-        if (_staticIp != null ? !_staticIp.equals(that._staticIp) : that._staticIp != null) return false;
-        if (_staticNatIpAddress != null ? !_staticNatIpAddress.equals(that._staticNatIpAddress) : that._staticNatIpAddress != null)
-            return false;
-        if (_staticNatIpUuid != null ? !_staticNatIpUuid.equals(that._staticNatIpUuid) : that._staticNatIpUuid != null)
-            return false;
-        if (_staticNatVlanGateway != null ? !_staticNatVlanGateway.equals(that._staticNatVlanGateway) : that._staticNatVlanGateway != null)
-            return false;
-        if (_staticNatVlanNetmask != null ? !_staticNatVlanNetmask.equals(that._staticNatVlanNetmask) : that._staticNatVlanNetmask != null)
-            return false;
-        if (_staticNatVlanUuid != null ? !_staticNatVlanUuid.equals(that._staticNatVlanUuid) : that._staticNatVlanUuid != null)
-            return false;
-        if (_vmInstanceName != null ? !_vmInstanceName.equals(that._vmInstanceName) : that._vmInstanceName != null)
-            return false;
-        if (_vmUserDomainName != null ? !_vmUserDomainName.equals(that._vmUserDomainName) : that._vmUserDomainName != null)
-            return false;
-        if (_vmUserName != null ? !_vmUserName.equals(that._vmUserName) : that._vmUserName != 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;
+        if (_network != null ? !_network.equals(that._network) : that._network != null) return false;
+        if (_nic != null ? !_nic.equals(that._nic) : that._nic != null) return false;
+        if (_staticNat != null ? !_staticNat.equals(that._staticNat) : that._staticNat != null) return false;
+        if (_vm != null ? !_vm.equals(that._vm) : that._vm != null) return false;
 
         return true;
     }
@@ -372,29 +80,10 @@ public class ReserveVmInterfaceVspCommand extends Command {
     @Override
     public int hashCode() {
         int result = super.hashCode();
-        result = 31 * result + (_nicUuid != null ? _nicUuid.hashCode() : 0);
-        result = 31 * result + (_nicMacAddress != null ? _nicMacAddress.hashCode() : 0);
-        result = 31 * result + (_networkUuid != null ? _networkUuid.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 + (_networkDomainUuid != null ? _networkDomainUuid.hashCode() : 0);
-        result = 31 * result + (_networksAccountUuid != null ? _networksAccountUuid.hashCode() : 0);
-        result = 31 * result + (_isDomainRouter ? 1 : 0);
-        result = 31 * result + (_domainRouterIp != null ? _domainRouterIp.hashCode() : 0);
-        result = 31 * result + (_vmInstanceName != null ? _vmInstanceName.hashCode() : 0);
-        result = 31 * result + (_vmUuid != null ? _vmUuid.hashCode() : 0);
-        result = 31 * result + (_vmUserName != null ? _vmUserName.hashCode() : 0);
-        result = 31 * result + (_vmUserDomainName != null ? _vmUserDomainName.hashCode() : 0);
-        result = 31 * result + (_useStaticIp ? 1 : 0);
-        result = 31 * result + (_staticIp != null ? _staticIp.hashCode() : 0);
-        result = 31 * result + (_staticNatIpUuid != null ? _staticNatIpUuid.hashCode() : 0);
-        result = 31 * result + (_staticNatIpAddress != null ? _staticNatIpAddress.hashCode() : 0);
-        result = 31 * result + (_isStaticNatIpAllocated ? 1 : 0);
-        result = 31 * result + (_isOneToOneNat ? 1 : 0);
-        result = 31 * result + (_staticNatVlanUuid != null ? _staticNatVlanUuid.hashCode() : 0);
-        result = 31 * result + (_staticNatVlanGateway != null ? _staticNatVlanGateway.hashCode() : 0);
-        result = 31 * result + (_staticNatVlanNetmask != null ? _staticNatVlanNetmask.hashCode() : 0);
+        result = 31 * result + (_network != null ? _network.hashCode() : 0);
+        result = 31 * result + (_vm != null ? _vm.hashCode() : 0);
+        result = 31 * result + (_nic != null ? _nic.hashCode() : 0);
+        result = 31 * result + (_staticNat != null ? _staticNat.hashCode() : 0);
         return result;
     }
 }


Mime
View raw message