cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [5/7] git commit: updated refs/heads/master to 95ae796
Date Wed, 18 Nov 2015 11:11:19 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/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 0ffbda4..575e57d 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,30 +19,39 @@
 
 package com.cloud.agent.api.guru;
 
-import java.util.Collection;
-
+import com.cloud.agent.api.CmdBuilder;
 import com.cloud.agent.api.Command;
 
+import java.util.Collection;
+import java.util.List;
+
 public class ImplementNetworkVspCommand extends Command {
 
-    String _networkDomainName;
-    String _networkDomainPath;
-    String _networkDomainUuid;
-    String _networkAccountName;
-    String _networkAccountUuid;
-    String _networkName;
-    String _networkCidr;
-    String _networkGateway;
-    String _networkUuid;
-    boolean _isL3Network;
-    String _vpcName;
-    String _vpcUuid;
-    boolean _defaultEgressPolicy;
-    Collection<String> _ipAddressRange;
-
-    public ImplementNetworkVspCommand(String networkDomainName, String networkDomainPath, String networkDomainUuid, String networkAccountName, String networkAccountUuid,
-            String networkName, String networkCidr, String networkGateway, String networkUuid, boolean isL3Network, String vpcName, String vpcUuid, boolean defaultEgressPolicy,
-            Collection<String> ipAddressRange) {
+    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 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) {
         super();
         this._networkDomainName = networkDomainName;
         this._networkDomainPath = networkDomainPath;
@@ -52,12 +61,18 @@ public class ImplementNetworkVspCommand extends Command {
         this._networkName = networkName;
         this._networkCidr = networkCidr;
         this._networkGateway = networkGateway;
+        this._networkAclId = networkAclId;
+        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() {
@@ -92,6 +107,18 @@ public class ImplementNetworkVspCommand extends Command {
         return _networkGateway;
     }
 
+    public Long getNetworkAclId() {
+        return _networkAclId;
+    }
+
+    public List<String> getDnsServers() {
+        return _dnsServers;
+    }
+
+    public List<String> getGatewaySystemIds() {
+        return _gatewaySystemIds;
+    }
+
     public String getNetworkUuid() {
         return _networkUuid;
     }
@@ -100,6 +127,14 @@ public class ImplementNetworkVspCommand extends Command {
         return _isL3Network;
     }
 
+    public boolean isVpc() {
+        return _isVpc;
+    }
+
+    public boolean isSharedNetwork() {
+        return _isSharedNetwork;
+    }
+
     public String getVpcName() {
         return _vpcName;
     }
@@ -112,13 +147,214 @@ public class ImplementNetworkVspCommand extends Command {
         return _defaultEgressPolicy;
     }
 
-    public Collection<String> getIpAddressRange() {
+    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;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof ImplementNetworkVspCommand)) return false;
+        if (!super.equals(o)) return false;
+
+        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;
+
+        return true;
+    }
+
+    @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 + (_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/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReleaseVmVspAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReleaseVmVspAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReleaseVmVspAnswer.java
deleted file mode 100644
index 8bc8e4c..0000000
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReleaseVmVspAnswer.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 ReleaseVmVspAnswer extends Answer {
-
-    public ReleaseVmVspAnswer(Command command, Exception e) {
-        super(command, e);
-    }
-
-    public ReleaseVmVspAnswer(ReleaseVmVspCommand 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/ReleaseVmVspCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReleaseVmVspCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReleaseVmVspCommand.java
deleted file mode 100644
index 9a6a4d7..0000000
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReleaseVmVspCommand.java
+++ /dev/null
@@ -1,54 +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.Command;
-
-public class ReleaseVmVspCommand extends Command {
-
-    String _networkUuid;
-    String _vmUuid;
-    String _vmInstanceName;
-
-    public ReleaseVmVspCommand(String networkUuid, String vmUuid, String vmInstanceName) {
-        super();
-        this._networkUuid = networkUuid;
-        this._vmUuid = vmUuid;
-        this._vmInstanceName = vmInstanceName;
-    }
-
-    public String getNetworkUuid() {
-        return _networkUuid;
-    }
-
-    public String getVmUuid() {
-        return _vmUuid;
-    }
-
-    public String getVmInstanceName() {
-        return _vmInstanceName;
-    }
-
-    @Override
-    public boolean executeInSequence() {
-        return false;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReserveVmInterfaceVspAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReserveVmInterfaceVspAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReserveVmInterfaceVspAnswer.java
deleted file mode 100644
index 8fabbef..0000000
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReserveVmInterfaceVspAnswer.java
+++ /dev/null
@@ -1,44 +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 java.util.List;
-import java.util.Map;
-
-import com.cloud.agent.api.Answer;
-import com.cloud.agent.api.Command;
-
-public class ReserveVmInterfaceVspAnswer extends Answer {
-
-    public List<Map<String, String>> _interfaceDetails;
-
-    public ReserveVmInterfaceVspAnswer(Command cmd, List<Map<String, String>> interfaceDetails, String details) {
-        super(cmd, true, details);
-        this._interfaceDetails = interfaceDetails;
-    }
-
-    public ReserveVmInterfaceVspAnswer(Command cmd, Exception e) {
-        super(cmd, e);
-    }
-
-    public List<Map<String, String>> getInterfaceDetails() {
-        return this._interfaceDetails;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/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 6844bf9..abcd0f2 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,31 +19,45 @@
 
 package com.cloud.agent.api.guru;
 
+import com.cloud.agent.api.CmdBuilder;
 import com.cloud.agent.api.Command;
 
 public class ReserveVmInterfaceVspCommand extends Command {
 
-    String _nicUuid;
-    String _nicMacAddress;
-    String _networkUuid;
-    boolean _isL3Network;
-    String _vpcUuid;
-    String _networkDomainUuid;
-    String _networksAccountUuid;
-    boolean _isDomainRouter;
-    String _domainRouterIp;
-    String _vmInstanceName;
-    String _vmUuid;
-    String _vmUserName;
-    String _vmUserDomainName;
-
-    public ReserveVmInterfaceVspCommand(String nicUuid, String nicMacAddress, String networkUuid, boolean isL3Network, String vpcUuid, String networkDomainUuid,
-            String networksAccountUuid, boolean isDomainRouter, String domainRouterIp, String vmInstanceName, String vmUuid, String vmUserName, String vmUserDomainName) {
+    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 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) {
         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;
@@ -53,6 +67,15 @@ public class ReserveVmInterfaceVspCommand extends Command {
         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;
     }
 
     public String getNicUuid() {
@@ -71,6 +94,10 @@ public class ReserveVmInterfaceVspCommand extends Command {
         return _isL3Network;
     }
 
+    public boolean isSharedNetwork() {
+        return _isSharedNetwork;
+    }
+
     public String getVpcUuid() {
         return _vpcUuid;
     }
@@ -87,29 +114,287 @@ public class ReserveVmInterfaceVspCommand extends Command {
         return _isDomainRouter;
     }
 
-    public String _getDomainRouterIp() {
+    public String getDomainRouterIp() {
         return _domainRouterIp;
     }
 
-    public String _getVmInstanceName() {
+    public String getVmInstanceName() {
         return _vmInstanceName;
     }
 
-    public String _getVmUuid() {
+    public String getVmUuid() {
         return _vmUuid;
     }
 
-    public String _getVmUserName() {
+    public String getVmUserName() {
         return _vmUserName;
     }
 
-    public String _getVmUserDomainName() {
+    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);
+        }
+    }
+
     @Override
     public boolean executeInSequence() {
         return false;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof ReserveVmInterfaceVspCommand)) return false;
+        if (!super.equals(o)) return false;
+
+        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;
+
+        return true;
+    }
+
+    @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);
+        return result;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/TrashNetworkVspAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/TrashNetworkVspAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/TrashNetworkVspAnswer.java
deleted file mode 100644
index 0c0c0d2..0000000
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/TrashNetworkVspAnswer.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 TrashNetworkVspAnswer extends Answer {
-
-    public TrashNetworkVspAnswer(Command command, Exception e) {
-        super(command, e);
-    }
-
-    public TrashNetworkVspAnswer(TrashNetworkVspCommand 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/TrashNetworkVspCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/TrashNetworkVspCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/TrashNetworkVspCommand.java
index e10e9be..4a01fdc 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/TrashNetworkVspCommand.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/TrashNetworkVspCommand.java
@@ -19,21 +19,26 @@
 
 package com.cloud.agent.api.guru;
 
+import com.cloud.agent.api.CmdBuilder;
 import com.cloud.agent.api.Command;
 
 public class TrashNetworkVspCommand extends Command {
 
-    String _domainUuid;
-    String _networkUuid;
-    boolean _isL3Network;
-    String _vpcUuid;
+    private final String _domainUuid;
+    private final String _networkUuid;
+    private final boolean _isL3Network;
+    private final boolean _isSharedNetwork;
+    private final String _vpcUuid;
+    private final String _domainTemplateName;
 
-    public TrashNetworkVspCommand(String domainUuid, String networkUuid, boolean isL3Network, String vpcUuid) {
+    private TrashNetworkVspCommand(String domainUuid, String networkUuid, boolean isL3Network, boolean isSharedNetwork, String vpcUuid, String domainTemplateName) {
         super();
         this._domainUuid = domainUuid;
         this._networkUuid = networkUuid;
         this._isL3Network = isL3Network;
+        this._isSharedNetwork = isSharedNetwork;
         this._vpcUuid = vpcUuid;
+        this._domainTemplateName = domainTemplateName;
     }
 
     public String getDomainUuid() {
@@ -48,13 +53,95 @@ public class TrashNetworkVspCommand extends Command {
         return _isL3Network;
     }
 
+    public boolean isSharedNetwork() {
+        return _isSharedNetwork;
+    }
+
     public String getVpcUuid() {
         return _vpcUuid;
     }
 
+    public String getDomainTemplateName() {
+        return _domainTemplateName;
+    }
+
+    public static class Builder implements CmdBuilder<TrashNetworkVspCommand> {
+        private String _domainUuid;
+        private String _networkUuid;
+        private boolean _isL3Network;
+        private boolean _isSharedNetwork;
+        private String _vpcUuid;
+        private String _domainTemplateName;
+
+        public Builder domainUuid(String domainUuid) {
+            this._domainUuid = domainUuid;
+            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 domainTemplateName(String domainTemplateName) {
+            this._domainTemplateName = domainTemplateName;
+            return this;
+        }
+
+        @Override
+        public TrashNetworkVspCommand build() {
+            return new TrashNetworkVspCommand(_domainUuid, _networkUuid, _isL3Network, _isSharedNetwork, _vpcUuid, _domainTemplateName);
+        }
+    }
+
     @Override
     public boolean executeInSequence() {
         return false;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof TrashNetworkVspCommand)) return false;
+        if (!super.equals(o)) return false;
+
+        TrashNetworkVspCommand that = (TrashNetworkVspCommand) o;
+
+        if (_isL3Network != that._isL3Network) return false;
+        if (_isSharedNetwork != that._isSharedNetwork) return false;
+        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 (_networkUuid != null ? !_networkUuid.equals(that._networkUuid) : that._networkUuid != 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 + (_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 + (_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/manager/GetClientDefaultsAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/manager/GetClientDefaultsAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/manager/GetClientDefaultsAnswer.java
new file mode 100644
index 0000000..f748e1c
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/manager/GetClientDefaultsAnswer.java
@@ -0,0 +1,81 @@
+//
+// 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.manager;
+
+import com.cloud.agent.api.Answer;
+
+import java.util.Map;
+
+public class GetClientDefaultsAnswer extends Answer {
+
+    private String _currentApiVersion;
+    private Integer _apiRetryCount;
+    private Long _apiRetryInterval;
+
+    public GetClientDefaultsAnswer(GetClientDefaultsCommand cmd, Map<String, Object> defaults) {
+        super(cmd);
+        this._currentApiVersion = (String) defaults.get("CURRENT_API_VERSION");
+        this._apiRetryCount = (Integer) defaults.get("DEFAULT_API_RETRY_COUNT");
+        this._apiRetryInterval = (Long) defaults.get("DEFAULT_API_RETRY_INTERVAL");
+    }
+
+    public GetClientDefaultsAnswer(GetClientDefaultsCommand cmd, Exception e) {
+        super(cmd, e);
+    }
+
+    public String getCurrentApiVersion() {
+        return _currentApiVersion;
+    }
+
+    public Integer getApiRetryCount() {
+        return _apiRetryCount;
+    }
+
+    public Long getApiRetryInterval() {
+        return _apiRetryInterval;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof GetClientDefaultsAnswer)) return false;
+        if (!super.equals(o)) return false;
+
+        GetClientDefaultsAnswer that = (GetClientDefaultsAnswer) o;
+
+        if (_apiRetryCount != null ? !_apiRetryCount.equals(that._apiRetryCount) : that._apiRetryCount != null)
+            return false;
+        if (_apiRetryInterval != null ? !_apiRetryInterval.equals(that._apiRetryInterval) : that._apiRetryInterval != null)
+            return false;
+        if (_currentApiVersion != null ? !_currentApiVersion.equals(that._currentApiVersion) : that._currentApiVersion != null)
+            return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (_currentApiVersion != null ? _currentApiVersion.hashCode() : 0);
+        result = 31 * result + (_apiRetryCount != null ? _apiRetryCount.hashCode() : 0);
+        result = 31 * result + (_apiRetryInterval != null ? _apiRetryInterval.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/manager/GetClientDefaultsCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/manager/GetClientDefaultsCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/manager/GetClientDefaultsCommand.java
new file mode 100644
index 0000000..2ffbe04
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/manager/GetClientDefaultsCommand.java
@@ -0,0 +1,38 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api.manager;
+
+import com.cloud.agent.api.Command;
+
+/**
+ * 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 GetClientDefaultsCommand extends Command {
+
+    public GetClientDefaultsCommand() {
+        super();
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/manager/SupportedApiVersionCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/manager/SupportedApiVersionCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/manager/SupportedApiVersionCommand.java
new file mode 100644
index 0000000..7a331d6
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/manager/SupportedApiVersionCommand.java
@@ -0,0 +1,61 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api.manager;
+
+import com.cloud.agent.api.Command;
+
+public class SupportedApiVersionCommand extends Command {
+
+    private final String _apiVersion;
+
+    public SupportedApiVersionCommand(String apiVersion) {
+        super();
+        this._apiVersion = apiVersion;
+    }
+
+    public String getApiVersion() {
+        return _apiVersion;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof SupportedApiVersionCommand)) return false;
+        if (!super.equals(o)) return false;
+
+        SupportedApiVersionCommand that = (SupportedApiVersionCommand) o;
+
+        if (_apiVersion != null ? !_apiVersion.equals(that._apiVersion) : that._apiVersion != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (_apiVersion != null ? _apiVersion.hashCode() : 0);
+        return result;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncDomainAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncDomainAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncDomainAnswer.java
new file mode 100644
index 0000000..fd4822c
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncDomainAnswer.java
@@ -0,0 +1,57 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api.sync;
+
+import com.cloud.agent.api.Answer;
+
+public class SyncDomainAnswer extends Answer {
+
+    private final boolean _success;
+
+    public SyncDomainAnswer(boolean success) {
+        super();
+        this._success = success;
+    }
+
+    public boolean getSuccess() {
+        return _success;
+    }
+
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof SyncDomainAnswer)) return false;
+        if (!super.equals(o)) return false;
+
+        SyncDomainAnswer that = (SyncDomainAnswer) o;
+
+        if (_success != that._success) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (_success ? 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/sync/SyncDomainCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncDomainCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncDomainCommand.java
new file mode 100644
index 0000000..7ae474f
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncDomainCommand.java
@@ -0,0 +1,93 @@
+//
+// 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.sync;
+
+import com.cloud.agent.api.Command;
+
+public class SyncDomainCommand extends Command {
+
+    private final String _domainUuid;
+    private final String _domainName;
+    private final String _domainPath;
+    private final boolean _toAdd;
+    private final boolean _toRemove;
+
+    public SyncDomainCommand(String domainUuid, String domainName, String domainPath, boolean toAdd, boolean toRemove) {
+        super();
+        this._domainUuid = domainUuid;
+        this._domainName = domainName;
+        this._domainPath = domainPath;
+        this._toAdd = toAdd;
+        this._toRemove = toRemove;
+    }
+
+    public String getDomainUuid() {
+        return _domainUuid;
+    }
+
+    public String getDomainName() {
+        return _domainName;
+    }
+
+    public String getDomainPath() {
+        return _domainPath;
+    }
+
+    public boolean isToAdd() {
+        return _toAdd;
+    }
+
+    public boolean isToRemove() {
+        return _toRemove;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof SyncDomainCommand)) return false;
+        if (!super.equals(o)) return false;
+
+        SyncDomainCommand that = (SyncDomainCommand) o;
+
+        if (_toAdd != that._toAdd) return false;
+        if (_toRemove != that._toRemove) return false;
+        if (_domainName != null ? !_domainName.equals(that._domainName) : that._domainName != null) return false;
+        if (_domainPath != null ? !_domainPath.equals(that._domainPath) : that._domainPath != null) return false;
+        if (_domainUuid != null ? !_domainUuid.equals(that._domainUuid) : that._domainUuid != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (_domainUuid != null ? _domainUuid.hashCode() : 0);
+        result = 31 * result + (_domainName != null ? _domainName.hashCode() : 0);
+        result = 31 * result + (_domainPath != null ? _domainPath.hashCode() : 0);
+        result = 31 * result + (_toAdd ? 1 : 0);
+        result = 31 * result + (_toRemove ? 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/sync/SyncNuageVspCmsIdAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncNuageVspCmsIdAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncNuageVspCmsIdAnswer.java
new file mode 100644
index 0000000..b0430e6
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncNuageVspCmsIdAnswer.java
@@ -0,0 +1,73 @@
+//
+// 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.sync;
+
+import com.cloud.agent.api.Answer;
+
+public class SyncNuageVspCmsIdAnswer extends Answer {
+
+    private final boolean _success;
+    private final String _nuageVspCmsId;
+    private final SyncNuageVspCmsIdCommand.SyncType _syncType;
+
+    public SyncNuageVspCmsIdAnswer(boolean success, String nuageVspCmsId, SyncNuageVspCmsIdCommand.SyncType syncType) {
+        super();
+        this._success = success;
+        this._nuageVspCmsId = nuageVspCmsId;
+        this._syncType = syncType;
+    }
+
+    public boolean getSuccess() {
+        return _success;
+    }
+
+    public String getNuageVspCmsId() {
+        return _nuageVspCmsId;
+    }
+
+    public SyncNuageVspCmsIdCommand.SyncType getSyncType() {
+        return _syncType;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof SyncNuageVspCmsIdAnswer)) return false;
+        if (!super.equals(o)) return false;
+
+        SyncNuageVspCmsIdAnswer that = (SyncNuageVspCmsIdAnswer) o;
+
+        if (_success != that._success) return false;
+        if (_nuageVspCmsId != null ? !_nuageVspCmsId.equals(that._nuageVspCmsId) : that._nuageVspCmsId != null)
+            return false;
+        if (_syncType != that._syncType) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (_success ? 1 : 0);
+        result = 31 * result + (_nuageVspCmsId != null ? _nuageVspCmsId.hashCode() : 0);
+        result = 31 * result + (_syncType != null ? _syncType.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/sync/SyncNuageVspCmsIdCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncNuageVspCmsIdCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncNuageVspCmsIdCommand.java
new file mode 100644
index 0000000..48651ff
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncNuageVspCmsIdCommand.java
@@ -0,0 +1,72 @@
+//
+// 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.sync;
+
+import com.cloud.agent.api.Command;
+
+public class SyncNuageVspCmsIdCommand extends Command {
+
+    public static enum SyncType { AUDIT, AUDIT_ONLY, REGISTER, UNREGISTER }
+
+    private final SyncType _syncType;
+    private final String _nuageVspCmsId;
+
+    public SyncNuageVspCmsIdCommand(SyncType syncType, String nuageVspCmsId) {
+        super();
+        this._syncType = syncType;
+        this._nuageVspCmsId = nuageVspCmsId;
+    }
+
+    public SyncType getSyncType() {
+        return _syncType;
+    }
+
+    public String getNuageVspCmsId() {
+        return _nuageVspCmsId;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof SyncNuageVspCmsIdCommand)) return false;
+        if (!super.equals(o)) return false;
+
+        SyncNuageVspCmsIdCommand that = (SyncNuageVspCmsIdCommand) o;
+
+        if (_nuageVspCmsId != null ? !_nuageVspCmsId.equals(that._nuageVspCmsId) : that._nuageVspCmsId != null)
+            return false;
+        if (_syncType != that._syncType) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (_syncType != null ? _syncType.hashCode() : 0);
+        result = 31 * result + (_nuageVspCmsId != null ? _nuageVspCmsId.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/sync/SyncVspAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncVspAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncVspAnswer.java
deleted file mode 100644
index 52848e5..0000000
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncVspAnswer.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.sync;
-
-import com.cloud.agent.api.Answer;
-
-public class SyncVspAnswer extends Answer {
-
-    public SyncVspAnswer(SyncVspCommand cmd, boolean success, String details) {
-        super(cmd, success, details);
-    }
-
-    public SyncVspAnswer(SyncVspCommand 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/sync/SyncVspCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncVspCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncVspCommand.java
index 8ccd84d..cfcfb87 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncVspCommand.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncVspCommand.java
@@ -23,7 +23,7 @@ import com.cloud.agent.api.Command;
 
 public class SyncVspCommand extends Command {
 
-    String _nuageVspEntity;
+    private final String _nuageVspEntity;
 
     public SyncVspCommand(String nuageVspEntity) {
         super();
@@ -39,4 +39,24 @@ public class SyncVspCommand extends Command {
         return _nuageVspEntity;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof SyncVspCommand)) return false;
+        if (!super.equals(o)) return false;
+
+        SyncVspCommand that = (SyncVspCommand) o;
+
+        if (_nuageVspEntity != null ? !_nuageVspEntity.equals(that._nuageVspEntity) : that._nuageVspEntity != null)
+            return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (_nuageVspEntity != null ? _nuageVspEntity.hashCode() : 0);
+        return result;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/AddNuageVspDeviceCmd.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/AddNuageVspDeviceCmd.java b/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/AddNuageVspDeviceCmd.java
index 19f2d09..7590901 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/AddNuageVspDeviceCmd.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/AddNuageVspDeviceCmd.java
@@ -19,18 +19,6 @@
 
 package com.cloud.api.commands;
 
-import javax.inject.Inject;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseAsyncCmd;
-import org.apache.cloudstack.api.BaseCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
-import org.apache.cloudstack.context.CallContext;
-
 import com.cloud.api.response.NuageVspDeviceResponse;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
@@ -41,8 +29,19 @@ import com.cloud.exception.ResourceUnavailableException;
 import com.cloud.network.NuageVspDeviceVO;
 import com.cloud.network.manager.NuageVspManager;
 import com.cloud.utils.exception.CloudRuntimeException;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
+import org.apache.cloudstack.context.CallContext;
+
+import javax.inject.Inject;
 
-@APICommand(name = "addNuageVspDevice", responseObject = NuageVspDeviceResponse.class, description = "Adds a Nuage VSP device")
+@APICommand(name = "addNuageVspDevice", responseObject = NuageVspDeviceResponse.class, description = "Adds a Nuage VSP device", since = "4.5")
 public class AddNuageVspDeviceCmd extends BaseAsyncCmd {
     private static final String s_name = "addnuagevspdeviceresponse";
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/DeleteNuageVspDeviceCmd.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/DeleteNuageVspDeviceCmd.java b/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/DeleteNuageVspDeviceCmd.java
index ae81c84..971f9c9 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/DeleteNuageVspDeviceCmd.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/DeleteNuageVspDeviceCmd.java
@@ -19,16 +19,6 @@
 
 package com.cloud.api.commands;
 
-import javax.inject.Inject;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseAsyncCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.SuccessResponse;
-import org.apache.cloudstack.context.CallContext;
-
 import com.cloud.api.response.NuageVspDeviceResponse;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
@@ -38,8 +28,17 @@ import com.cloud.exception.ResourceAllocationException;
 import com.cloud.exception.ResourceUnavailableException;
 import com.cloud.network.manager.NuageVspManager;
 import com.cloud.utils.exception.CloudRuntimeException;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.SuccessResponse;
+import org.apache.cloudstack.context.CallContext;
+
+import javax.inject.Inject;
 
-@APICommand(name = "deleteNuageVspDevice", responseObject = SuccessResponse.class, description = "delete a nuage vsp device")
+@APICommand(name = "deleteNuageVspDevice", responseObject = SuccessResponse.class, description = "delete a nuage vsp device", since = "4.5")
 public class DeleteNuageVspDeviceCmd extends BaseAsyncCmd {
     private static final String s_name = "deletenuagevspdeviceresponse";
     @Inject

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/IssueNuageVspResourceRequestCmd.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/IssueNuageVspResourceRequestCmd.java b/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/IssueNuageVspResourceRequestCmd.java
index f0e3ff8..559b30d 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/IssueNuageVspResourceRequestCmd.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/IssueNuageVspResourceRequestCmd.java
@@ -19,23 +19,6 @@
 
 package com.cloud.api.commands;
 
-import java.util.List;
-
-import javax.inject.Inject;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.NetworkOfferingResponse;
-import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
-import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.cloudstack.context.CallContext;
-import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
-
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.VspResourceAnswer;
 import com.cloud.agent.api.VspResourceCommand;
@@ -53,8 +36,23 @@ import com.cloud.network.dao.NuageVspDao;
 import com.cloud.offering.NetworkOffering;
 import com.cloud.user.Account;
 import com.cloud.user.AccountManager;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.NetworkOfferingResponse;
+import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
+import org.apache.cloudstack.api.response.ZoneResponse;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.List;
 
-@APICommand(name = "issueNuageVspResourceRequest", responseObject = NuageVspResourceResponse.class, description = "Issues a Nuage VSP REST API resource request")
+@APICommand(name = "issueNuageVspResourceRequest", responseObject = NuageVspResourceResponse.class, description = "Issues a Nuage VSP REST API resource request", since = "4.5")
 public class IssueNuageVspResourceRequestCmd extends BaseCmd {
     private static final Logger s_logger = Logger.getLogger(IssueNuageVspResourceRequestCmd.class.getName());
     private static final String s_name = "nuagevspresourceresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/ListNuageVspDevicesCmd.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/ListNuageVspDevicesCmd.java b/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/ListNuageVspDevicesCmd.java
index 46797e0..2d08e12 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/ListNuageVspDevicesCmd.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/ListNuageVspDevicesCmd.java
@@ -19,20 +19,6 @@
 
 package com.cloud.api.commands;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.inject.Inject;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseListCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.ListResponse;
-import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
-
 import com.cloud.api.response.NuageVspDeviceResponse;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientCapacityException;
@@ -42,8 +28,20 @@ import com.cloud.exception.ResourceUnavailableException;
 import com.cloud.network.NuageVspDeviceVO;
 import com.cloud.network.manager.NuageVspManager;
 import com.cloud.utils.exception.CloudRuntimeException;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
 
-@APICommand(name = "listNuageVspDevices", responseObject = NuageVspDeviceResponse.class, description = "Lists Nuage VSP devices")
+@APICommand(name = "listNuageVspDevices", responseObject = NuageVspDeviceResponse.class, description = "Lists Nuage VSP devices", since = "4.5")
 public class ListNuageVspDevicesCmd extends BaseListCmd {
     private static final String s_name = "listnuagevspdeviceresponse";
     @Inject

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/UpdateNuageVspDeviceCmd.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/UpdateNuageVspDeviceCmd.java b/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/UpdateNuageVspDeviceCmd.java
new file mode 100755
index 0000000..d235b2b
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/UpdateNuageVspDeviceCmd.java
@@ -0,0 +1,180 @@
+//
+// 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.api.commands;
+
+import com.cloud.api.response.NuageVspDeviceResponse;
+import com.cloud.event.EventTypes;
+import com.cloud.exception.ConcurrentOperationException;
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.network.NuageVspDeviceVO;
+import com.cloud.network.manager.NuageVspManager;
+import com.cloud.utils.exception.CloudRuntimeException;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+
+@APICommand(name = "updateNuageVspDevice", responseObject = NuageVspDeviceResponse.class, description = "Update a Nuage VSP device", since = "4.6")
+public class UpdateNuageVspDeviceCmd extends BaseAsyncCmd {
+    private static final Logger s_logger = Logger.getLogger(UpdateNuageVspDeviceCmd.class);
+    private static final String s_name = "updatenuagevspdeviceresponse";
+
+    @Inject
+    NuageVspManager _nuageVspManager;
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+
+    @Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = BaseCmd.CommandType.UUID, entityType = PhysicalNetworkResponse.class,
+            required = true, description = "the ID of the physical network in to which Nuage VSP is added")
+    private Long physicalNetworkId;
+
+    @Parameter(name = VspConstants.NUAGE_VSP_API_PORT, type = CommandType.INTEGER, description = "the port to communicate to Nuage VSD")
+    private Integer port;
+
+    @Parameter(name = ApiConstants.HOST_NAME, type = CommandType.STRING, description = "the hostname of the Nuage VSD")
+    private String hostName;
+
+    @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, description = "the user name of the CMS user in Nuage VSD")
+    private String userName;
+
+    @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, description = "the password of CMS user in Nuage VSD")
+    private String password;
+
+    @Parameter(name = VspConstants.NUAGE_VSP_API_VERSION, type = CommandType.STRING, description = "the version of the API to use to communicate to Nuage VSD")
+    private String apiVersion;
+
+    @Parameter(name = VspConstants.NUAGE_VSP_API_RETRY_COUNT, type = CommandType.INTEGER, description = "the number of retries on failure to communicate to Nuage VSD")
+    private Integer apiRetryCount;
+
+    @Parameter(name = VspConstants.NUAGE_VSP_API_RETRY_INTERVAL, type = CommandType.LONG, description = "the time to wait after failure before retrying to communicate to Nuage VSD")
+    private Long apiRetryInterval;
+
+    /////////////////////////////////////////////////////
+    /////////////////// Accessors ///////////////////////
+    /////////////////////////////////////////////////////
+
+    public Long getPhysicalNetworkId() {
+        return physicalNetworkId;
+    }
+
+    public Integer getPort() {
+        return port;
+    }
+
+    public void setPort(Integer port) {
+        this.port = port;
+    }
+
+    public String getHostName() {
+        return hostName;
+    }
+
+    public void setHostName(String hostName) {
+        this.hostName = hostName;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public String getApiVersion() {
+        return apiVersion;
+    }
+
+    public void setApiVersion(String apiVersion) {
+        this.apiVersion = apiVersion;
+    }
+
+    public Integer getApiRetryCount() {
+        return apiRetryCount;
+    }
+
+    public void setApiRetryCount(Integer apiRetryCount) {
+        this.apiRetryCount = apiRetryCount;
+    }
+
+    public Long getApiRetryInterval() {
+        return apiRetryInterval;
+    }
+
+    public void setApiRetryInterval(Long apiRetryInterval) {
+        this.apiRetryInterval = apiRetryInterval;
+    }
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+    @Override
+    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
+        try {
+            NuageVspDeviceVO nuageVspDeviceVO = _nuageVspManager.updateNuageVspDevice(this);
+            if (nuageVspDeviceVO != null) {
+                NuageVspDeviceResponse response = _nuageVspManager.createNuageVspDeviceResponse(nuageVspDeviceVO);
+                response.setObjectName("nuagevspdevice");
+                response.setResponseName(getCommandName());
+                this.setResponseObject(response);
+            } else {
+                throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add Nuage VSP device due to internal error.");
+            }
+        } catch (InvalidParameterValueException invalidParamExcp) {
+            throw new ServerApiException(ApiErrorCode.PARAM_ERROR, invalidParamExcp.getMessage());
+        } catch (CloudRuntimeException runtimeExcp) {
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, runtimeExcp.getMessage());
+        }
+    }
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        return CallContext.current().getCallingAccount().getId();
+    }
+
+    @Override
+    public String getEventType() {
+        return EventTypes.EVENT_EXTERNAL_VSP_VSD_UPDATE;
+    }
+
+    @Override
+    public String getEventDescription() {
+        return "Updating a Nuage VSD";
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/api/response/NuageVspDeviceResponse.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/api/response/NuageVspDeviceResponse.java b/plugins/network-elements/nuage-vsp/src/com/cloud/api/response/NuageVspDeviceResponse.java
index b0bbcc8..136a465 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/api/response/NuageVspDeviceResponse.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/api/response/NuageVspDeviceResponse.java
@@ -21,13 +21,12 @@ package com.cloud.api.response;
 
 import com.cloud.api.commands.VspConstants;
 import com.cloud.network.NuageVspDeviceVO;
+import com.cloud.serializer.Param;
+import com.google.gson.annotations.SerializedName;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseResponse;
 import org.apache.cloudstack.api.EntityReference;
 
-import com.cloud.serializer.Param;
-import com.google.gson.annotations.SerializedName;
-
 @EntityReference(value = NuageVspDeviceVO.class)
 public class NuageVspDeviceResponse extends BaseResponse {
     @SerializedName(VspConstants.NUAGE_VSP_DEVICE_ID)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/api/response/NuageVspResourceResponse.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/api/response/NuageVspResourceResponse.java b/plugins/network-elements/nuage-vsp/src/com/cloud/api/response/NuageVspResourceResponse.java
index 8e620ed..7002413 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/api/response/NuageVspResourceResponse.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/api/response/NuageVspResourceResponse.java
@@ -20,10 +20,9 @@
 package com.cloud.api.response;
 
 import com.cloud.api.commands.VspConstants;
-import org.apache.cloudstack.api.BaseResponse;
-
 import com.cloud.serializer.Param;
 import com.google.gson.annotations.SerializedName;
+import org.apache.cloudstack.api.BaseResponse;
 
 public class NuageVspResourceResponse extends BaseResponse {
     @SerializedName(VspConstants.NUAGE_VSP_API_RESOURCE_INFO)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/network/NuageVspDeviceVO.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/network/NuageVspDeviceVO.java b/plugins/network-elements/nuage-vsp/src/com/cloud/network/NuageVspDeviceVO.java
index 00cb1e4..ad5a7eb 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/network/NuageVspDeviceVO.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/network/NuageVspDeviceVO.java
@@ -19,7 +19,7 @@
 
 package com.cloud.network;
 
-import java.util.UUID;
+import org.apache.cloudstack.api.InternalIdentity;
 
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -27,8 +27,7 @@ import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
-
-import org.apache.cloudstack.api.InternalIdentity;
+import java.util.UUID;
 
 @Entity
 @Table(name = "external_nuage_vsp_devices")

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/645f8758/plugins/network-elements/nuage-vsp/src/com/cloud/network/dao/NuageVspDao.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/network/dao/NuageVspDao.java b/plugins/network-elements/nuage-vsp/src/com/cloud/network/dao/NuageVspDao.java
index 6cf7e1a..aa795eb 100644
--- a/plugins/network-elements/nuage-vsp/src/com/cloud/network/dao/NuageVspDao.java
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/network/dao/NuageVspDao.java
@@ -33,4 +33,12 @@ public interface NuageVspDao extends GenericDao<NuageVspDeviceVO, Long> {
      */
     List<NuageVspDeviceVO> listByPhysicalNetwork(long physicalNetworkId);
 
+    /**
+     * List all the Nuage Vsp devices by a specific host
+     *
+     * @param hostId host Id
+     * @return list of NuageVspDeviceVO for this host.
+     */
+    List<NuageVspDeviceVO> listByHost(long hostId);
+
 }


Mime
View raw message