You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2014/07/21 10:50:20 UTC

[4/4] git commit: updated refs/heads/master to 03de9cc

CLOUDSTACK-6845 : NuageVsp Network plugin

Signed-off-by: Hugo Trippaers <ht...@schubergphilis.com>


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

Branch: refs/heads/master
Commit: 03de9cc33507400e0e06ccd84a36334a4660ef4e
Parents: 43dffaa
Author: Suresh Ramamurthy <su...@nuagenetworks.net>
Authored: Mon Jul 21 09:40:45 2014 +0200
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Mon Jul 21 10:49:49 2014 +0200

----------------------------------------------------------------------
 api/src/com/cloud/event/EventTypes.java         |   7 +
 api/src/com/cloud/network/Network.java          |   3 +
 api/src/com/cloud/network/Networks.java         |   3 +-
 api/src/com/cloud/network/PhysicalNetwork.java  |   2 +-
 .../classes/resources/messages.properties       |   5 +
 .../classes/resources/messages_zh_CN.properties |   5 +
 client/pom.xml                                  |  20 +
 client/tomcatconf/commands.properties.in        |   7 +
 .../hypervisor/kvm/resource/OvsVifDriver.java   |   4 +
 .../vmware/resource/VmwareResource.java         |  13 +
 .../xenserver/resource/CitrixResourceBase.java  |  11 +-
 plugins/network-elements/nuage-vsp/pom.xml      |  48 ++
 .../META-INF/cloudstack/vsp/module.properties   |  21 +
 .../cloudstack/vsp/spring-vsp-context.xml       |  41 ++
 .../com/cloud/agent/api/StartupVspCommand.java  |  29 +
 .../com/cloud/agent/api/VspResourceAnswer.java  |  42 ++
 .../com/cloud/agent/api/VspResourceCommand.java |  82 +++
 .../api/element/ApplyAclRuleVspAnswer.java      |  34 ++
 .../api/element/ApplyAclRuleVspCommand.java     |  82 +++
 .../api/element/ApplyStaticNatVspAnswer.java    |  34 ++
 .../api/element/ApplyStaticNatVspCommand.java   |  63 +++
 .../agent/api/element/ShutDownVpcVspAnswer.java |  34 ++
 .../api/element/ShutDownVpcVspCommand.java      |  48 ++
 .../agent/api/guru/DeallocateVmVspAnswer.java   |  34 ++
 .../agent/api/guru/DeallocateVmVspCommand.java  |  91 ++++
 .../api/guru/ImplementNetworkVspAnswer.java     |  35 ++
 .../api/guru/ImplementNetworkVspCommand.java    | 124 +++++
 .../agent/api/guru/ReleaseVmVspAnswer.java      |  34 ++
 .../agent/api/guru/ReleaseVmVspCommand.java     |  54 ++
 .../api/guru/ReserveVmInterfaceVspAnswer.java   |  44 ++
 .../api/guru/ReserveVmInterfaceVspCommand.java  | 115 ++++
 .../agent/api/guru/TrashNetworkVspAnswer.java   |  34 ++
 .../agent/api/guru/TrashNetworkVspCommand.java  |  60 +++
 .../com/cloud/agent/api/sync/SyncVspAnswer.java |  34 ++
 .../cloud/agent/api/sync/SyncVspCommand.java    |  42 ++
 .../api/commands/AddNuageVspDeviceCmd.java      | 179 +++++++
 .../api/commands/DeleteNuageVspDeviceCmd.java   | 105 ++++
 .../IssueNuageVspResourceRequestCmd.java        | 215 ++++++++
 .../api/commands/ListNuageVspDevicesCmd.java    | 107 ++++
 .../com/cloud/api/commands/VspConstants.java    |  35 ++
 .../api/response/NuageVspDeviceResponse.java    | 105 ++++
 .../api/response/NuageVspResourceResponse.java  |  41 ++
 .../src/com/cloud/network/NuageVspDeviceVO.java |  98 ++++
 .../src/com/cloud/network/dao/NuageVspDao.java  |  36 ++
 .../com/cloud/network/dao/NuageVspDaoImpl.java  |  52 ++
 .../cloud/network/element/NuageVspElement.java  | 534 +++++++++++++++++++
 .../network/guru/NuageVspGuestNetworkGuru.java  | 416 +++++++++++++++
 .../cloud/network/manager/NuageVspManager.java  |  55 ++
 .../network/manager/NuageVspManagerImpl.java    | 353 ++++++++++++
 .../network/resource/NuageVspResource.java      | 467 ++++++++++++++++
 .../com/cloud/network/sync/NuageVspSync.java    |  26 +
 .../cloud/network/sync/NuageVspSyncImpl.java    |  72 +++
 .../vsp/acs/NuageVspPluginClientLoader.java     |  46 ++
 .../nuage/vsp/acs/client/NuageVspApiClient.java |  30 ++
 .../vsp/acs/client/NuageVspElementClient.java   |  36 ++
 .../vsp/acs/client/NuageVspGuruClient.java      |  44 ++
 .../vsp/acs/client/NuageVspSyncClient.java      |  27 +
 .../network/element/NuageVspElementTest.java    | 280 ++++++++++
 .../guru/NuageVspGuestNetworkGuruTest.java      | 386 ++++++++++++++
 .../network/manager/NuageVspManagerTest.java    | 111 ++++
 .../network/resource/NuageVspResourceTest.java  | 252 +++++++++
 .../cloud/network/sync/NuageVspSyncTest.java    |  73 +++
 plugins/pom.xml                                 |  11 +
 server/src/com/cloud/api/ApiResponseHelper.java |   2 +-
 .../configuration/ConfigurationManagerImpl.java |   3 +-
 .../com/cloud/network/vpc/VpcManagerImpl.java   |   3 +-
 setup/db/db/schema-440to450.sql                 |  12 +
 test/integration/component/test_nuage_vsp.py    | 312 +++++++++++
 tools/apidoc/gen_toc.py                         |   1 +
 ui/dictionary.jsp                               |   5 +
 ui/scripts/configuration.js                     |  21 +-
 ui/scripts/docs.js                              |  29 +
 ui/scripts/system.js                            | 481 ++++++++++++++++-
 ui/scripts/ui-custom/zoneWizard.js              |   5 +-
 .../vmware/mo/HypervisorHostHelper.java         |  54 +-
 75 files changed, 6424 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/api/src/com/cloud/event/EventTypes.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/event/EventTypes.java b/api/src/com/cloud/event/EventTypes.java
index 71bfdb6..411f620 100755
--- a/api/src/com/cloud/event/EventTypes.java
+++ b/api/src/com/cloud/event/EventTypes.java
@@ -428,6 +428,9 @@ public class EventTypes {
     public static final String EVENT_EXTERNAL_OVS_CONTROLLER_ADD = "PHYSICAL.OVSCONTROLLER.ADD";
     public static final String EVENT_EXTERNAL_OVS_CONTROLLER_DELETE = "PHYSICAL.OVSCONTROLLER.DELETE";
 
+    // external network mapping events
+    public static final String EVENT_EXTERNAL_VSP_VSD_ADD = "PHYSICAL.NUAGE.VSD.ADD";
+    public static final String EVENT_EXTERNAL_VSP_VSD_DELETE = "PHYSICAL.NUAGE.VSD.DELETE";
     // AutoScale
     public static final String EVENT_COUNTER_CREATE = "COUNTER.CREATE";
     public static final String EVENT_COUNTER_DELETE = "COUNTER.DELETE";
@@ -824,6 +827,10 @@ public class EventTypes {
         entityEventDetails.put(EVENT_EXTERNAL_NVP_CONTROLLER_DELETE, "NvpController");
         entityEventDetails.put(EVENT_EXTERNAL_NVP_CONTROLLER_CONFIGURE, "NvpController");
 
+        // external network mapping events
+        entityEventDetails.put(EVENT_EXTERNAL_VSP_VSD_ADD,  "NuageVsp");
+        entityEventDetails.put(EVENT_EXTERNAL_VSP_VSD_DELETE,  "NuageVsp");
+
         // AutoScale
         entityEventDetails.put(EVENT_COUNTER_CREATE, AutoScaleCounter.class);
         entityEventDetails.put(EVENT_COUNTER_DELETE, AutoScaleCounter.class);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/api/src/com/cloud/network/Network.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/Network.java b/api/src/com/cloud/network/Network.java
index 885bffe..0a08f28 100644
--- a/api/src/com/cloud/network/Network.java
+++ b/api/src/com/cloud/network/Network.java
@@ -132,6 +132,9 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
         // add new Ovs provider
         public static final Provider Ovs = new Provider("Ovs", false);
         public static final Provider Opendaylight = new Provider("Opendaylight", false);
+        // add Nuage Vsp Providers
+        public static final Provider NuageVsp = new Provider("NuageVsp", false);
+        public static final Provider NuageVspVpc = new Provider("NuageVspVpc", false);
 
         private final String name;
         private final boolean isExternal;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/api/src/com/cloud/network/Networks.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/Networks.java b/api/src/com/cloud/network/Networks.java
index 1e4d229..1ad3350 100755
--- a/api/src/com/cloud/network/Networks.java
+++ b/api/src/com/cloud/network/Networks.java
@@ -109,7 +109,8 @@ public class Networks {
                 }
             }
         },
-        UnDecided(null, null), OpenDaylight("opendaylight", String.class);
+        UnDecided(null, null), OpenDaylight("opendaylight", String.class),
+        Vsp("vsp", String.class),;
 
         private final String scheme;
         private final Class<?> type;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/api/src/com/cloud/network/PhysicalNetwork.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/PhysicalNetwork.java b/api/src/com/cloud/network/PhysicalNetwork.java
index 8cc214e..024b3ce 100644
--- a/api/src/com/cloud/network/PhysicalNetwork.java
+++ b/api/src/com/cloud/network/PhysicalNetwork.java
@@ -33,7 +33,7 @@ public interface PhysicalNetwork extends Identity, InternalIdentity {
     }
 
     public enum IsolationMethod {
-        VLAN, L3, GRE, STT, VNS, MIDO, SSP, VXLAN, ODL, L3VPN;
+        VLAN, L3, GRE, STT, VNS, MIDO, SSP, VXLAN, ODL, L3VPN, VSP;
     }
 
     public enum BroadcastDomainRange {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index b192cb0..bb75b08 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -327,6 +327,7 @@ label.add.new.SRX=Add new SRX
 label.add.new.PA=Add new Palo Alto
 label.add.new.tier=Add new tier
 label.add.NiciraNvp.device=Add Nvp Controller
+label.add.NuageVsp.device=Add Nuage Virtualized Services Directory (VSD)
 label.add.physical.network=Add physical network
 label.add.pod=Add Pod
 label.add.port.forwarding.rule=Add port forwarding rule
@@ -387,6 +388,7 @@ label.anti.affinity.group=Anti-affinity Group
 label.anti.affinity.groups=Anti-affinity Groups
 label.anti.affinity=Anti-affinity
 label.api.key=API Key
+label.api.version=API Version
 label.apply=Apply
 label.assign.to.load.balancer=Assigning instance to load balancer
 label.assign=Assign
@@ -501,6 +503,7 @@ label.delete.F5=Delete F5
 label.delete.gateway=delete gateway
 label.delete.NetScaler=Delete NetScaler
 label.delete.NiciraNvp=Remove Nvp Controller
+label.delete.NuageVsp=Remove Nuage VSD
 label.delete.project=Delete project
 label.delete.SRX=Delete SRX
 label.delete.PA=Delete Palo Alto
@@ -1009,6 +1012,7 @@ label.restart.network=Restart network
 label.restart.required=Restart required
 label.restart.vpc=restart VPC
 label.restore=Restore
+label.retry.interval=Retry Interval
 label.review=Review
 label.revoke.project.invite=Revoke invitation
 label.role=Role
@@ -1631,6 +1635,7 @@ message.configuring.storage.traffic=Configuring storage traffic
 message.confirm.action.force.reconnect=Please confirm that you want to force reconnect this host.
 message.confirm.delete.F5=Please confirm that you would like to delete F5
 message.confirm.delete.NetScaler=Please confirm that you would like to delete NetScaler
+message.confirm.delete.NuageVsp=Please confirm that you would like to delete Nuage Virtualized Services Directory
 message.confirm.delete.SRX=Please confirm that you would like to delete SRX
 message.confirm.delete.PA=Please confirm that you would like to delete Palo Alto
 message.confirm.destroy.router=Please confirm that you would like to destroy this router

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/client/WEB-INF/classes/resources/messages_zh_CN.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages_zh_CN.properties b/client/WEB-INF/classes/resources/messages_zh_CN.properties
index 1ec4e95..d7a0ca9 100644
--- a/client/WEB-INF/classes/resources/messages_zh_CN.properties
+++ b/client/WEB-INF/classes/resources/messages_zh_CN.properties
@@ -297,6 +297,7 @@ label.add.new.SRX=\u6dfb\u52a0\u65b0 SRX
 label.add.new.tier=\u6dfb\u52a0\u65b0\u5c42
 label.add.nfs.secondary.staging.store=\u6dfb\u52a0 NFS \u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8
 label.add.NiciraNvp.device=\u6dfb\u52a0 Nvp \u63a7\u5236\u5668
+label.add.NuageVsp.device=\u6DFB\u52A0 Nuage \u865A\u62DF\u670D\u52A1\u76EE\u5F55 (VSD)
 label.add.OpenDaylight.device=\u6dfb\u52a0 OpenDaylight \u63a7\u5236\u5668
 label.add.PA.device=\u6dfb\u52a0 Palo Alto \u8bbe\u5907
 label.add.physical.network=\u6dfb\u52a0\u7269\u7406\u7f51\u7edc
@@ -355,6 +356,7 @@ label.anti.affinity.groups=\u53cd\u5173\u8054\u6027\u7ec4
 label.anti.affinity.group=\u53cd\u5173\u8054\u6027\u7ec4
 label.anti.affinity=\u53cd\u5173\u8054\u6027
 label.api.key=API \u5bc6\u94a5
+label.api.version=API \u7248\u672C
 label.apply=\u5e94\u7528
 label.app.name=CloudStack
 label.archive.alerts=\u5b58\u6863\u8b66\u62a5
@@ -508,6 +510,7 @@ label.delete.F5=\u5220\u9664 F5
 label.delete.gateway=\u5220\u9664\u7f51\u5173
 label.delete.NetScaler=\u5220\u9664 NetScaler
 label.delete.NiciraNvp=\u79fb\u9664 Nvp \u63a7\u5236\u5668
+label.delete.NuageVsp=\u5220\u9664 Nuage VSD
 label.delete.OpenDaylight.device=\u5220\u9664 OpenDaylight \u63a7\u5236\u5668
 label.delete.PA=\u5220\u9664 Palo Alto
 label.delete.portable.ip.range=\u5220\u9664\u53ef\u79fb\u690d IP \u8303\u56f4
@@ -1142,6 +1145,7 @@ label.restart.network=\u91cd\u65b0\u542f\u52a8\u7f51\u7edc
 label.restart.required=\u9700\u8981\u91cd\u65b0\u542f\u52a8
 label.restart.vpc=\u91cd\u65b0\u542f\u52a8 VPC
 label.restore=\u8fd8\u539f
+label.retry.interval=\u91cd\u8bd5\u95f4\u9694
 label.review=\u6838\u5bf9
 label.revoke.project.invite=\u64a4\u9500\u9080\u8bf7
 label.role=\u89d2\u8272
@@ -1607,6 +1611,7 @@ message.confirm.dedicate.zone=\u662f\u5426\u8981\u5c06\u6b64\u8d44\u6e90\u57df\u
 message.confirm.delete.ciscovnmc.resource=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 CiscoVNMC \u8d44\u6e90
 message.confirm.delete.F5=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 F5
 message.confirm.delete.NetScaler=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 NetScaler
+message.confirm.delete.NuageVsp=\u8BF7\u786E\u8BA4\u5220\u9664 Nuage \u865A\u62DF\u670D\u52A1\u76EE\u5F55
 message.confirm.delete.PA=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 Palo Alto
 message.confirm.delete.secondary.staging.store=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8\u3002
 message.confirm.delete.SRX=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 SRX

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/client/pom.xml
----------------------------------------------------------------------
diff --git a/client/pom.xml b/client/pom.xml
index 46933d9..1621a05 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -106,6 +106,11 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.cloudstack</groupId>
+      <artifactId>cloud-plugin-network-vsp</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
   <groupId>org.apache.cloudstack</groupId>
       <artifactId>cloud-plugin-network-ovs</artifactId>
       <version>${project.version}</version>
@@ -944,6 +949,21 @@
       </dependencies>
     </profile>
     <profile>
+      <id>nuagevsp</id>
+      <activation>
+        <property>
+          <name>noredist</name>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.cloudstack</groupId>
+          <artifactId>cloud-plugin-network-vsp</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+      </dependencies>
+    </profile>
+    <profile>
       <id>srx</id>
       <activation>
         <property>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/client/tomcatconf/commands.properties.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in
index b9ac27b..aa03949 100644
--- a/client/tomcatconf/commands.properties.in
+++ b/client/tomcatconf/commands.properties.in
@@ -618,6 +618,13 @@ listBigSwitchVnsDevices=1
 addStratosphereSsp=1
 deleteStratoshereSsp=1
 
+#### nuage vsp commands
+
+addNuageVspDevice=1
+deleteNuageVspDevice=1
+listNuageVspDevices=1
+issueNuageVspResourceRequest=15
+
 #### host simulator commands
 
 configureSimulator=1

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java
index 8e4c710..1420682 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java
@@ -93,6 +93,10 @@ public class OvsVifDriver extends VifDriverBase {
                 String brName = "OVSTunnel" + vnetId;
                 s_logger.debug("nic " + nic + " needs to be connected to LogicalSwitch " + brName);
                 intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter), networkRateKBps);
+            } else if (nic.getBroadcastType() == Networks.BroadcastDomainType.Vsp) {
+                intf.setVirtualPortInterfaceId(nic.getUuid());
+                String brName = (trafficLabel != null && !trafficLabel.isEmpty()) ? _pifs.get(trafficLabel) : _pifs.get("private");
+                intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter), networkRateKBps);
             } else {
                 intf.defBridgeNet(_bridges.get("guest"), null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter), networkRateKBps);
             }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 0922765..7b73b19 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -931,6 +931,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             deviceConfigSpec.setOperation(VirtualDeviceConfigSpecOperation.ADD);
 
             vmConfigSpec.getDeviceChange().add(deviceConfigSpec);
+            setNuageVspVrIpInExtraConfig(vmConfigSpec.getExtraConfig(), nicTo);
             if (!vmMo.configureVm(vmConfigSpec)) {
                 throw new Exception("Failed to configure devices when running PlugNicCommand");
             }
@@ -1900,11 +1901,23 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                 newVal.setKey("nvp.iface-id." + nicNum);
                 newVal.setValue(nicTo.getUuid());
                 extraOptions.add(newVal);
+                setNuageVspVrIpInExtraConfig(extraOptions, nicTo);
             }
             nicNum++;
         }
     }
 
+    private static void setNuageVspVrIpInExtraConfig(List<OptionValue> extraOptions, NicTO nicTo) {
+        URI broadcastUri = nicTo.getBroadcastUri();
+        if (broadcastUri != null && broadcastUri.getScheme().equalsIgnoreCase(Networks.BroadcastDomainType.Vsp.scheme())) {
+            String path = broadcastUri.getPath();
+            OptionValue newVal = new OptionValue();
+            newVal.setKey("vsp.vr-ip." + nicTo.getMac());
+            newVal.setValue(path.substring(1));
+            extraOptions.add(newVal);
+        }
+    }
+
     private static void configCustomExtraOption(List<OptionValue> extraOptions, VirtualMachineTO vmSpec) {
         // we no longer to validation anymore
         for (Map.Entry<String, String> entry : vmSpec.getDetails().entrySet()) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
index a2b9625..71aa01e 100644
--- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
+++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
@@ -1037,7 +1037,8 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
             assert (BroadcastDomainType.getSchemeValue(uri) == BroadcastDomainType.Vlan);
             long vlan = Long.parseLong(BroadcastDomainType.getValue(uri));
             return enableVlanNetwork(conn, vlan, network);
-        } else if (type == BroadcastDomainType.Native || type == BroadcastDomainType.LinkLocal) {
+        } else if (type == BroadcastDomainType.Native || type == BroadcastDomainType.LinkLocal ||
+                        type == BroadcastDomainType.Vsp) {
             return network.getNetwork();
         } else if (uri != null && type == BroadcastDomainType.Vswitch) {
             String header = uri.toString().substring(Networks.BroadcastDomainType.Vswitch.scheme().length() + "://".length());
@@ -1105,6 +1106,13 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
         // when bridge is setup for distributed routing
         vifr.otherConfig.put("cloudstack-network-id", nic.getNetworkUuid());
 
+        // Nuage Vsp needs Virtual Router IP to be passed in the otherconfig
+        // get the virtual router IP information from broadcast uri
+        URI broadcastUri = nic.getBroadcastUri();
+        if (broadcastUri != null && broadcastUri.getScheme().equalsIgnoreCase(Networks.BroadcastDomainType.Vsp.scheme())) {
+            String path = broadcastUri.getPath();
+            vifr.otherConfig.put("vsp-vr-ip", path.substring(1));
+        }
         vifr.network = getNetwork(conn, nic);
 
         if (nic.getNetworkRateMbps() != null && nic.getNetworkRateMbps().intValue() != -1) {
@@ -1302,6 +1310,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
         vmr.nameLabel = vmSpec.getName();
         vmr.actionsAfterCrash = Types.OnCrashBehaviour.DESTROY;
         vmr.actionsAfterShutdown = Types.OnNormalExit.DESTROY;
+        vmr.otherConfig.put("vm_uuid", vmSpec.getUuid());
 
         if (isDmcEnabled(conn, host) && vmSpec.isEnableDynamicallyScaleVm()) {
             //scaling is allowed

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/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
new file mode 100644
index 0000000..694ebf0
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/pom.xml
@@ -0,0 +1,48 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>cloud-plugin-network-vsp</artifactId>
+  <name>Apache CloudStack Plugin - Nuage VSP</name>
+  <parent>
+    <groupId>org.apache.cloudstack</groupId>
+    <artifactId>cloudstack-plugins</artifactId>
+    <version>4.5.0-SNAPSHOT</version>
+    <relativePath>../../pom.xml</relativePath>
+  </parent>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>com.mycila</groupId>
+        <artifactId>license-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>cloudstack-checklicence</id>
+            <phase>process-classes</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/plugins/network-elements/nuage-vsp/resources/META-INF/cloudstack/vsp/module.properties
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/resources/META-INF/cloudstack/vsp/module.properties b/plugins/network-elements/nuage-vsp/resources/META-INF/cloudstack/vsp/module.properties
new file mode 100644
index 0000000..e51229e
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/resources/META-INF/cloudstack/vsp/module.properties
@@ -0,0 +1,21 @@
+#
+# 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.
+#
+
+name=vsp
+parent=network
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/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
new file mode 100644
index 0000000..c579789
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/resources/META-INF/cloudstack/vsp/spring-vsp-context.xml
@@ -0,0 +1,41 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >
+
+    <bean id="nuageVspDaoImpl" class="com.cloud.network.dao.NuageVspDaoImpl" />
+    <bean id="NuageVspGuestNetworkGuru" class="com.cloud.network.guru.NuageVspGuestNetworkGuru">
+        <property name="name" value="NuageVspGuestNetworkGuru" />
+    </bean>
+    <bean id="NuageVspElement" class="com.cloud.network.element.NuageVspElement">
+        <property name="name" value="NuageVspElement" />
+    </bean>
+	<bean id="NuageVspManager" class="com.cloud.network.manager.NuageVspManagerImpl" />
+  	<bean id="NuageVspSync" class="com.cloud.network.sync.NuageVspSyncImpl" />
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/StartupVspCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/StartupVspCommand.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/StartupVspCommand.java
new file mode 100644
index 0000000..6dba882
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/StartupVspCommand.java
@@ -0,0 +1,29 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api;
+
+import com.cloud.host.Host;
+
+public class StartupVspCommand extends StartupCommand {
+
+    public StartupVspCommand() {
+        super(Host.Type.L2Networking);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/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
new file mode 100644
index 0000000..9327809
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/VspResourceAnswer.java
@@ -0,0 +1,42 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api;
+
+public class VspResourceAnswer extends Answer {
+
+    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;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/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
new file mode 100644
index 0000000..f7e1417
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/VspResourceCommand.java
@@ -0,0 +1,82 @@
+//
+// 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 {
+
+    String _method;
+    String _resource;
+    String _resourceId;
+    String _childResource;
+    Object _entityDetails;
+    String _resourceFilter;
+    String _proxyUserUuid;
+    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;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyAclRuleVspAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyAclRuleVspAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyAclRuleVspAnswer.java
new file mode 100644
index 0000000..2b41266
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyAclRuleVspAnswer.java
@@ -0,0 +1,34 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api.element;
+
+import com.cloud.agent.api.Answer;
+
+public class ApplyAclRuleVspAnswer extends Answer {
+
+    public ApplyAclRuleVspAnswer(ApplyAclRuleVspCommand cmd, boolean success, String details) {
+        super(cmd, success, details);
+    }
+
+    public ApplyAclRuleVspAnswer(ApplyAclRuleVspCommand cmd, Exception e) {
+        super(cmd, e);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/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
new file mode 100644
index 0000000..5376466
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyAclRuleVspCommand.java
@@ -0,0 +1,82 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api.element;
+
+import java.util.List;
+import java.util.Map;
+
+import com.cloud.agent.api.Command;
+
+public class ApplyAclRuleVspCommand extends Command {
+
+    String _networkUuid;
+    String _networkDomainUuid;
+    String _vpcOrSubnetUuid;
+    boolean _isL3Network;
+    List<Map<String, Object>> _aclRules;
+    boolean _isVpc;
+    long _networkId;
+
+    public ApplyAclRuleVspCommand(String networkUuid, String networkDomainUuid, String vpcOrSubnetUuid, boolean isL3Network, List<Map<String, Object>> aclRules, boolean isVpc,
+            long networkId) {
+        super();
+        this._networkUuid = networkUuid;
+        this._networkDomainUuid = networkDomainUuid;
+        this._vpcOrSubnetUuid = vpcOrSubnetUuid;
+        this._isL3Network = isL3Network;
+        this._aclRules = aclRules;
+        this._isVpc = isVpc;
+        this._networkId = networkId;
+    }
+
+    public String getNetworkUuid() {
+        return _networkUuid;
+    }
+
+    public String getNetworkDomainUuid() {
+        return _networkDomainUuid;
+    }
+
+    public String getVpcOrSubnetUuid() {
+        return _vpcOrSubnetUuid;
+    }
+
+    public boolean isL3Network() {
+        return _isL3Network;
+    }
+
+    public List<Map<String, Object>> getAclRules() {
+        return _aclRules;
+    }
+
+    public boolean isVpc() {
+        return _isVpc;
+    }
+
+    public long getNetworkId() {
+        return this._networkId;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyStaticNatVspAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyStaticNatVspAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyStaticNatVspAnswer.java
new file mode 100644
index 0000000..c40c1a3
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyStaticNatVspAnswer.java
@@ -0,0 +1,34 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api.element;
+
+import com.cloud.agent.api.Answer;
+
+public class ApplyStaticNatVspAnswer extends Answer {
+
+    public ApplyStaticNatVspAnswer(ApplyStaticNatVspCommand cmd, boolean success, String details) {
+        super(cmd, success, details);
+    }
+
+    public ApplyStaticNatVspAnswer(ApplyStaticNatVspCommand cmd, Exception e) {
+        super(cmd, e);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/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
new file mode 100644
index 0000000..b013634
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ApplyStaticNatVspCommand.java
@@ -0,0 +1,63 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api.element;
+
+import java.util.List;
+import java.util.Map;
+
+import com.cloud.agent.api.Command;
+
+public class ApplyStaticNatVspCommand extends Command {
+
+    String _networkDomainUuid;
+    String _vpcOrSubnetUuid;
+    boolean _isL3Network;
+    List<Map<String, Object>> _staticNatDetails;
+
+    public ApplyStaticNatVspCommand(String networkDomainUuid, String vpcOrSubnetUuid, boolean isL3Network, List<Map<String, Object>> staticNatDetails) {
+        super();
+        this._networkDomainUuid = networkDomainUuid;
+        this._vpcOrSubnetUuid = vpcOrSubnetUuid;
+        this._isL3Network = isL3Network;
+        this._staticNatDetails = staticNatDetails;
+    }
+
+    public String getNetworkDomainUuid() {
+        return _networkDomainUuid;
+    }
+
+    public String getVpcOrSubnetUuid() {
+        return _vpcOrSubnetUuid;
+    }
+
+    public boolean isL3Network() {
+        return _isL3Network;
+    }
+
+    public List<Map<String, Object>> getStaticNatDetails() {
+        return _staticNatDetails;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVpcVspAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVpcVspAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVpcVspAnswer.java
new file mode 100644
index 0000000..592216e
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVpcVspAnswer.java
@@ -0,0 +1,34 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api.element;
+
+import com.cloud.agent.api.Answer;
+
+public class ShutDownVpcVspAnswer extends Answer {
+
+    public ShutDownVpcVspAnswer(ShutDownVpcVspCommand cmd, boolean success, String details) {
+        super(cmd, success, details);
+    }
+
+    public ShutDownVpcVspAnswer(ShutDownVpcVspCommand cmd, Exception e) {
+        super(cmd, e);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/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
new file mode 100644
index 0000000..fc05559
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVpcVspCommand.java
@@ -0,0 +1,48 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api.element;
+
+import com.cloud.agent.api.Command;
+
+public class ShutDownVpcVspCommand extends Command {
+
+    String _domainUuid;
+    String _vpcUuid;
+
+    public ShutDownVpcVspCommand(String domainUuid, String vpcUuid) {
+        super();
+        this._domainUuid = domainUuid;
+        this._vpcUuid = vpcUuid;
+    }
+
+    public String getDomainUuid() {
+        return _domainUuid;
+    }
+
+    public String getVpcUuid() {
+        return _vpcUuid;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/DeallocateVmVspAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/DeallocateVmVspAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/DeallocateVmVspAnswer.java
new file mode 100644
index 0000000..57ecf29
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/DeallocateVmVspAnswer.java
@@ -0,0 +1,34 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api.guru;
+
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.Command;
+
+public class DeallocateVmVspAnswer extends Answer {
+
+    public DeallocateVmVspAnswer(Command command, Exception e) {
+        super(command, e);
+    }
+
+    public DeallocateVmVspAnswer(DeallocateVmVspCommand cmd, boolean success, String details) {
+        super(cmd, success, details);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/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
new file mode 100644
index 0000000..19c904f
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/DeallocateVmVspCommand.java
@@ -0,0 +1,91 @@
+//
+// 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 DeallocateVmVspCommand extends Command {
+
+    String _networkUuid;
+    String _nicFrmDdUuid;
+    String _nicMacAddress;
+    String _nicIp4Address;
+    boolean _isL3Network;
+    String _vpcUuid;
+    String _networksDomainUuid;
+    String _vmInstanceName;
+    String _vmUuid;
+
+    public DeallocateVmVspCommand(String networkUuid, String nicFrmDdUuid, String nicMacAddress, String nicIp4Address, boolean isL3Network, String vpcUuid,
+            String networksDomainUuid, String vmInstanceName, String vmUuid) {
+        super();
+        this._networkUuid = networkUuid;
+        this._nicFrmDdUuid = nicFrmDdUuid;
+        this._nicMacAddress = nicMacAddress;
+        this._nicIp4Address = nicIp4Address;
+        this._isL3Network = isL3Network;
+        this._vpcUuid = vpcUuid;
+        this._networksDomainUuid = networksDomainUuid;
+        this._vmInstanceName = vmInstanceName;
+        this._vmUuid = vmUuid;
+    }
+
+    public String getNetworkUuid() {
+        return _networkUuid;
+    }
+
+    public String getNicFrmDdUuid() {
+        return _nicFrmDdUuid;
+    }
+
+    public String getNicMacAddress() {
+        return _nicMacAddress;
+    }
+
+    public String getNicIp4Address() {
+        return _nicIp4Address;
+    }
+
+    public boolean isL3Network() {
+        return _isL3Network;
+    }
+
+    public String getVpcUuid() {
+        return _vpcUuid;
+    }
+
+    public String getNetworksDomainUuid() {
+        return _networksDomainUuid;
+    }
+
+    public String getVmInstanceName() {
+        return _vmInstanceName;
+    }
+
+    public String getVmUuid() {
+        return _vmUuid;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ImplementNetworkVspAnswer.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ImplementNetworkVspAnswer.java b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ImplementNetworkVspAnswer.java
new file mode 100644
index 0000000..87e7b32
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ImplementNetworkVspAnswer.java
@@ -0,0 +1,35 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api.guru;
+
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.Command;
+
+public class ImplementNetworkVspAnswer extends Answer {
+
+    public ImplementNetworkVspAnswer(Command command, Exception e) {
+        super(command, e);
+    }
+
+    public ImplementNetworkVspAnswer(ImplementNetworkVspCommand cmd, boolean success, String details) {
+        super(cmd, success, details);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/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
new file mode 100644
index 0000000..0ffbda4
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ImplementNetworkVspCommand.java
@@ -0,0 +1,124 @@
+//
+// 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.Collection;
+
+import com.cloud.agent.api.Command;
+
+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) {
+        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._networkUuid = networkUuid;
+        this._isL3Network = isL3Network;
+        this._vpcName = vpcName;
+        this._vpcUuid = vpcUuid;
+        this._defaultEgressPolicy = defaultEgressPolicy;
+        this._ipAddressRange = ipAddressRange;
+    }
+
+    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 String getNetworkUuid() {
+        return _networkUuid;
+    }
+
+    public boolean isL3Network() {
+        return _isL3Network;
+    }
+
+    public String getVpcName() {
+        return _vpcName;
+    }
+
+    public String getVpcUuid() {
+        return _vpcUuid;
+    }
+
+    public boolean isDefaultEgressPolicy() {
+        return _defaultEgressPolicy;
+    }
+
+    public Collection<String> getIpAddressRange() {
+        return _ipAddressRange;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/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
new file mode 100644
index 0000000..8bc8e4c
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReleaseVmVspAnswer.java
@@ -0,0 +1,34 @@
+//
+// 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/03de9cc3/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
new file mode 100644
index 0000000..9a6a4d7
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReleaseVmVspCommand.java
@@ -0,0 +1,54 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api.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/03de9cc3/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
new file mode 100644
index 0000000..8fabbef
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReserveVmInterfaceVspAnswer.java
@@ -0,0 +1,44 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api.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/03de9cc3/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
new file mode 100644
index 0000000..6844bf9
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReserveVmInterfaceVspCommand.java
@@ -0,0 +1,115 @@
+//
+// 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 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) {
+        super();
+        this._nicUuid = nicUuid;
+        this._nicMacAddress = nicMacAddress;
+        this._networkUuid = networkUuid;
+        this._isL3Network = isL3Network;
+        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;
+    }
+
+    public String getNicUuid() {
+        return _nicUuid;
+    }
+
+    public String getNicMacAddress() {
+        return _nicMacAddress;
+    }
+
+    public String getNetworkUuid() {
+        return _networkUuid;
+    }
+
+    public boolean isL3Network() {
+        return _isL3Network;
+    }
+
+    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;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/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
new file mode 100644
index 0000000..0c0c0d2
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/TrashNetworkVspAnswer.java
@@ -0,0 +1,34 @@
+//
+// 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/03de9cc3/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
new file mode 100644
index 0000000..e10e9be
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/TrashNetworkVspCommand.java
@@ -0,0 +1,60 @@
+//
+// 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 TrashNetworkVspCommand extends Command {
+
+    String _domainUuid;
+    String _networkUuid;
+    boolean _isL3Network;
+    String _vpcUuid;
+
+    public TrashNetworkVspCommand(String domainUuid, String networkUuid, boolean isL3Network, String vpcUuid) {
+        super();
+        this._domainUuid = domainUuid;
+        this._networkUuid = networkUuid;
+        this._isL3Network = isL3Network;
+        this._vpcUuid = vpcUuid;
+    }
+
+    public String getDomainUuid() {
+        return _domainUuid;
+    }
+
+    public String getNetworkUuid() {
+        return _networkUuid;
+    }
+
+    public boolean isL3Network() {
+        return _isL3Network;
+    }
+
+    public String getVpcUuid() {
+        return _vpcUuid;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/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
new file mode 100644
index 0000000..52848e5
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncVspAnswer.java
@@ -0,0 +1,34 @@
+//
+// 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/03de9cc3/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
new file mode 100644
index 0000000..8ccd84d
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/sync/SyncVspCommand.java
@@ -0,0 +1,42 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package com.cloud.agent.api.sync;
+
+import com.cloud.agent.api.Command;
+
+public class SyncVspCommand extends Command {
+
+    String _nuageVspEntity;
+
+    public SyncVspCommand(String nuageVspEntity) {
+        super();
+        this._nuageVspEntity = nuageVspEntity;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+    public String getNuageVspEntity() {
+        return _nuageVspEntity;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03de9cc3/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
new file mode 100644
index 0000000..19f2d09
--- /dev/null
+++ b/plugins/network-elements/nuage-vsp/src/com/cloud/api/commands/AddNuageVspDeviceCmd.java
@@ -0,0 +1,179 @@
+//
+// 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 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;
+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;
+
+@APICommand(name = "addNuageVspDevice", responseObject = NuageVspDeviceResponse.class, description = "Adds a Nuage VSP device")
+public class AddNuageVspDeviceCmd extends BaseAsyncCmd {
+    private static final String s_name = "addnuagevspdeviceresponse";
+
+    @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, required = true, description = "the port to communicate to Nuage VSD")
+    private int port;
+
+    @Parameter(name = ApiConstants.HOST_NAME, type = CommandType.STRING, required = true, description = "the hostname of the Nuage VSD")
+    private String hostName;
+
+    @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "the user name of the CMS user in Nuage VSD")
+    private String userName;
+
+    @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, required = true, description = "the password of CMS user in Nuage VSD")
+    private String password;
+
+    @Parameter(name = VspConstants.NUAGE_VSP_API_VERSION, type = CommandType.STRING, required = true, 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, required = true, description = "the number of retries on failure to communicate to Nuage VSD")
+    private int apiRetryCount;
+
+    @Parameter(name = VspConstants.NUAGE_VSP_API_RETRY_INTERVAL, type = CommandType.LONG, required = true, description = "the time to wait after failure before retrying to communicate to Nuage VSD")
+    private long apiRetryInterval;
+
+    /////////////////////////////////////////////////////
+    /////////////////// Accessors ///////////////////////
+    /////////////////////////////////////////////////////
+
+    public Long getPhysicalNetworkId() {
+        return physicalNetworkId;
+    }
+
+    public int getPort() {
+        return port;
+    }
+
+    public void setPort(int 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 int getApiRetryCount() {
+        return apiRetryCount;
+    }
+
+    public void setApiRetryCount(int 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.addNuageVspDevice(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_ADD;
+    }
+
+    @Override
+    public String getEventDescription() {
+        return "Adding a Nuage VSD";
+    }
+}
\ No newline at end of file