diff --git a/build/build-cloud.xml b/build/build-cloud.xml
index 1ec2afb79f5..38f228807e2 100755
--- a/build/build-cloud.xml
+++ b/build/build-cloud.xml
@@ -285,7 +285,6 @@
-
@@ -480,7 +479,7 @@
-
+
@@ -586,17 +585,29 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
diff --git a/client/tomcatconf/components.xml.in b/client/tomcatconf/components.xml.in
index 48869b5daee..861a622c58c 100755
--- a/client/tomcatconf/components.xml.in
+++ b/client/tomcatconf/components.xml.in
@@ -133,9 +133,9 @@
-
-
-
+
+
+
@@ -158,6 +158,8 @@
+
+
diff --git a/plugins/deployment-planner/user-dispersing/.settings/org.eclipse.jdt.core.prefs b/plugins/deployment-planner/user-dispersing/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100755
index d0ee7df1827..00000000000
--- a/plugins/deployment-planner/user-dispersing/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Tue Jun 19 15:34:37 PDT 2012
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/plugins/deployment-planner/user-dispersing/build.xml b/plugins/deployment-planner/user-dispersing/build.xml
deleted file mode 100644
index 60a1f2d5d40..00000000000
--- a/plugins/deployment-planner/user-dispersing/build.xml
+++ /dev/null
@@ -1,609 +0,0 @@
-
-
-
-
-
-
- Cloud Stack ant build file
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/deployment-planner/user-dispersing/src/com/cloud/deploy/UserDispersingPlanner.java b/plugins/deployment-planner/user-dispersing/src/com/cloud/deploy/UserDispersingPlanner.java
deleted file mode 100644
index dcad1e70aff..00000000000
--- a/plugins/deployment-planner/user-dispersing/src/com/cloud/deploy/UserDispersingPlanner.java
+++ /dev/null
@@ -1,215 +0,0 @@
-// Copyright 2012 Citrix Systems, Inc. Licensed under the
-// Apache License, Version 2.0 (the "License"); you may not use this
-// file except in compliance with the License. Citrix Systems, Inc.
-// reserves all rights not expressly granted by 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.
-//
-// Automatically generated by addcopyright.py at 04/03/2012
-package com.cloud.deploy;
-
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-import javax.ejb.Local;
-import javax.naming.ConfigurationException;
-
-import org.apache.log4j.Logger;
-
-import com.cloud.configuration.Config;
-import com.cloud.hypervisor.Hypervisor.HypervisorType;
-import com.cloud.utils.NumbersUtil;
-import com.cloud.utils.Pair;
-import com.cloud.vm.VirtualMachine;
-import com.cloud.vm.VirtualMachineProfile;
-
-@Local(value=DeploymentPlanner.class)
-public class UserDispersingPlanner extends FirstFitPlanner implements DeploymentPlanner {
-
- private static final Logger s_logger = Logger.getLogger(UserDispersingPlanner.class);
-
- /**
- * This method should reorder the given list of Cluster Ids by applying any necessary heuristic
- * for this planner
- * For UserDispersingPlanner we need to order the clusters by considering the number of VMs for this account
- * @return List ordered list of Cluster Ids
- */
- @Override
- protected List reorderClusters(long id, boolean isZone, Pair, Map> clusterCapacityInfo, VirtualMachineProfile extends VirtualMachine> vmProfile, DeploymentPlan plan){
- List clusterIdsByCapacity = clusterCapacityInfo.first();
- if(vmProfile.getOwner() == null){
- return clusterIdsByCapacity;
- }
- long accountId = vmProfile.getOwner().getAccountId();
- Pair, Map> clusterIdsVmCountInfo = listClustersByUserDispersion(id, isZone, accountId);
-
- //now we have 2 cluster lists - one ordered by capacity and the other by number of VMs for this account
- //need to apply weights to these to find the correct ordering to follow
-
- if(_userDispersionWeight == 1.0f){
- List clusterIds = clusterIdsVmCountInfo.first();
- clusterIds.retainAll(clusterIdsByCapacity);
- return clusterIds;
- }else{
- //apply weights to the two lists
- return orderByApplyingWeights(clusterCapacityInfo, clusterIdsVmCountInfo, accountId);
- }
-
-
- }
-
- /**
- * This method should reorder the given list of Pod Ids by applying any necessary heuristic
- * for this planner
- * For UserDispersingPlanner we need to order the pods by considering the number of VMs for this account
- * @return List ordered list of Pod Ids
- */
- @Override
- protected List reorderPods(Pair, Map> podCapacityInfo, VirtualMachineProfile extends VirtualMachine> vmProfile, DeploymentPlan plan){
- List podIdsByCapacity = podCapacityInfo.first();
- if(vmProfile.getOwner() == null){
- return podIdsByCapacity;
- }
- long accountId = vmProfile.getOwner().getAccountId();
-
- Pair, Map> podIdsVmCountInfo = listPodsByUserDispersion(plan.getDataCenterId(), accountId);
-
- //now we have 2 pod lists - one ordered by capacity and the other by number of VMs for this account
- //need to apply weights to these to find the correct ordering to follow
-
- if(_userDispersionWeight == 1.0f){
- List podIds = podIdsVmCountInfo.first();
- podIds.retainAll(podIdsByCapacity);
- return podIds;
- }else{
- //apply weights to the two lists
- return orderByApplyingWeights(podCapacityInfo, podIdsVmCountInfo, accountId);
- }
-
- }
-
- protected Pair, Map> listClustersByUserDispersion(long id, boolean isZone, long accountId){
- if (s_logger.isDebugEnabled()) {
- s_logger.debug("Applying Userdispersion heuristic to clusters for account: "+ accountId);
- }
- Pair, Map> clusterIdsVmCountInfo;
- if(isZone){
- clusterIdsVmCountInfo = _vmInstanceDao.listClusterIdsInZoneByVmCount(id, accountId);
- }else{
- clusterIdsVmCountInfo = _vmInstanceDao.listClusterIdsInPodByVmCount(id, accountId);
- }
- if (s_logger.isTraceEnabled()) {
- s_logger.trace("List of clusters in ascending order of number of VMs: "+ clusterIdsVmCountInfo.first());
- }
- return clusterIdsVmCountInfo;
- }
-
- protected Pair, Map> listPodsByUserDispersion(long dataCenterId, long accountId) {
- if (s_logger.isDebugEnabled()) {
- s_logger.debug("Applying Userdispersion heuristic to pods for account: "+ accountId);
- }
- Pair, Map> podIdsVmCountInfo = _vmInstanceDao.listPodIdsInZoneByVmCount(dataCenterId, accountId);
- if (s_logger.isTraceEnabled()) {
- s_logger.trace("List of pods in ascending order of number of VMs: "+ podIdsVmCountInfo.first());
- }
-
- return podIdsVmCountInfo;
- }
-
-
- private List orderByApplyingWeights(Pair, Map> capacityInfo, Pair, Map> vmCountInfo, long accountId){
- List capacityOrderedIds = capacityInfo.first();
- List vmCountOrderedIds = vmCountInfo.first();
- Map capacityMap = capacityInfo.second();
- Map vmCountMap = vmCountInfo.second();
-
- if (s_logger.isTraceEnabled()) {
- s_logger.trace("Capacity Id list: "+ capacityOrderedIds + " , capacityMap:"+capacityMap);
- }
- if (s_logger.isTraceEnabled()) {
- s_logger.trace("Vm Count Id list: "+ vmCountOrderedIds + " , vmCountMap:"+vmCountMap);
- }
-
-
- List idsReorderedByWeights = new ArrayList();
- float capacityWeight = (1.0f -_userDispersionWeight);
-
- if (s_logger.isDebugEnabled()) {
- s_logger.debug("Applying userDispersionWeight: "+ _userDispersionWeight);
- }
- //normalize the vmCountMap
- LinkedHashMap normalisedVmCountIdMap= new LinkedHashMap();
-
- Long totalVmsOfAccount = _vmInstanceDao.countRunningByAccount(accountId);
- if (s_logger.isDebugEnabled()) {
- s_logger.debug("Total VMs for account: "+ totalVmsOfAccount);
- }
- for(Long id : vmCountOrderedIds){
- Double normalisedCount = vmCountMap.get(id) / totalVmsOfAccount;
- normalisedVmCountIdMap.put(id, normalisedCount);
- }
-
- //consider only those ids that are in capacity map.
-
- SortedMap> sortedMap= new TreeMap>();
- for(Long id : capacityOrderedIds){
- Double weightedCapacityValue = capacityMap.get(id) * capacityWeight;
- Double weightedVmCountValue = normalisedVmCountIdMap.get(id) * _userDispersionWeight;
- Double totalWeight = weightedCapacityValue + weightedVmCountValue;
- if(sortedMap.containsKey(totalWeight)){
- List idList = sortedMap.get(totalWeight);
- idList.add(id);
- sortedMap.put(totalWeight, idList);
- }else{
- List idList = new ArrayList();
- idList.add(id);
- sortedMap.put(totalWeight, idList);
- }
- }
-
- for(List idList : sortedMap.values()){
- idsReorderedByWeights.addAll(idList);
- }
-
- if (s_logger.isTraceEnabled()) {
- s_logger.trace("Reordered Id list: "+ idsReorderedByWeights);
- }
-
- return idsReorderedByWeights;
- }
-
-
- @Override
- public boolean canHandle(VirtualMachineProfile extends VirtualMachine> vm, DeploymentPlan plan, ExcludeList avoid) {
- if(vm.getHypervisorType() != HypervisorType.BareMetal){
- //check the allocation strategy
- if (_allocationAlgorithm != null && _allocationAlgorithm.equals(AllocationAlgorithm.userdispersing.toString())) {
- return true;
- }
- }
- return false;
- }
-
- float _userDispersionWeight;
-
-
- @Override
- public boolean configure(String name, Map params) throws ConfigurationException {
- super.configure(name, params);
-
- String weight = _configDao.getValue(Config.VmUserDispersionWeight.key());
- _userDispersionWeight = NumbersUtil.parseFloat(weight, 1.0f);
-
-
- return true;
- }
-
-}
diff --git a/plugins/deployment-planner/user-dispersing/.classpath b/plugins/network-elements/netscaler/.classpath
old mode 100755
new mode 100644
similarity index 73%
rename from plugins/deployment-planner/user-dispersing/.classpath
rename to plugins/network-elements/netscaler/.classpath
index a246f5e509f..1c573a61400
--- a/plugins/deployment-planner/user-dispersing/.classpath
+++ b/plugins/network-elements/netscaler/.classpath
@@ -1,7 +1,7 @@
-
+
diff --git a/plugins/deployment-planner/user-dispersing/.project b/plugins/network-elements/netscaler/.project
old mode 100755
new mode 100644
similarity index 91%
rename from plugins/deployment-planner/user-dispersing/.project
rename to plugins/network-elements/netscaler/.project
index d9b2d401aa8..9ec4c239847
--- a/plugins/deployment-planner/user-dispersing/.project
+++ b/plugins/network-elements/netscaler/.project
@@ -1,6 +1,6 @@
- user-dispersing
+ netscaler
diff --git a/plugins/network-elements/netscaler/build.xml b/plugins/network-elements/netscaler/build.xml
new file mode 100755
index 00000000000..dcf8663de4b
--- /dev/null
+++ b/plugins/network-elements/netscaler/build.xml
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+ Cloud Stack ant build file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/server/src/com/cloud/api/commands/AddNetscalerLoadBalancerCmd.java b/plugins/network-elements/netscaler/src/com/cloud/api/commands/AddNetscalerLoadBalancerCmd.java
similarity index 100%
rename from server/src/com/cloud/api/commands/AddNetscalerLoadBalancerCmd.java
rename to plugins/network-elements/netscaler/src/com/cloud/api/commands/AddNetscalerLoadBalancerCmd.java
diff --git a/server/src/com/cloud/api/commands/ConfigureNetscalerLoadBalancerCmd.java b/plugins/network-elements/netscaler/src/com/cloud/api/commands/ConfigureNetscalerLoadBalancerCmd.java
similarity index 100%
rename from server/src/com/cloud/api/commands/ConfigureNetscalerLoadBalancerCmd.java
rename to plugins/network-elements/netscaler/src/com/cloud/api/commands/ConfigureNetscalerLoadBalancerCmd.java
diff --git a/server/src/com/cloud/api/commands/DeleteNetscalerLoadBalancerCmd.java b/plugins/network-elements/netscaler/src/com/cloud/api/commands/DeleteNetscalerLoadBalancerCmd.java
similarity index 100%
rename from server/src/com/cloud/api/commands/DeleteNetscalerLoadBalancerCmd.java
rename to plugins/network-elements/netscaler/src/com/cloud/api/commands/DeleteNetscalerLoadBalancerCmd.java
diff --git a/server/src/com/cloud/api/commands/ListNetscalerLoadBalancerNetworksCmd.java b/plugins/network-elements/netscaler/src/com/cloud/api/commands/ListNetscalerLoadBalancerNetworksCmd.java
similarity index 100%
rename from server/src/com/cloud/api/commands/ListNetscalerLoadBalancerNetworksCmd.java
rename to plugins/network-elements/netscaler/src/com/cloud/api/commands/ListNetscalerLoadBalancerNetworksCmd.java
diff --git a/server/src/com/cloud/api/commands/ListNetscalerLoadBalancersCmd.java b/plugins/network-elements/netscaler/src/com/cloud/api/commands/ListNetscalerLoadBalancersCmd.java
similarity index 100%
rename from server/src/com/cloud/api/commands/ListNetscalerLoadBalancersCmd.java
rename to plugins/network-elements/netscaler/src/com/cloud/api/commands/ListNetscalerLoadBalancersCmd.java
diff --git a/api/src/com/cloud/api/response/NetscalerLoadBalancerResponse.java b/plugins/network-elements/netscaler/src/com/cloud/api/response/NetscalerLoadBalancerResponse.java
similarity index 100%
rename from api/src/com/cloud/api/response/NetscalerLoadBalancerResponse.java
rename to plugins/network-elements/netscaler/src/com/cloud/api/response/NetscalerLoadBalancerResponse.java
diff --git a/server/src/com/cloud/network/NetScalerPodVO.java b/plugins/network-elements/netscaler/src/com/cloud/network/NetScalerPodVO.java
similarity index 100%
rename from server/src/com/cloud/network/NetScalerPodVO.java
rename to plugins/network-elements/netscaler/src/com/cloud/network/NetScalerPodVO.java
diff --git a/server/src/com/cloud/network/dao/NetScalerPodDao.java b/plugins/network-elements/netscaler/src/com/cloud/network/dao/NetScalerPodDao.java
similarity index 100%
rename from server/src/com/cloud/network/dao/NetScalerPodDao.java
rename to plugins/network-elements/netscaler/src/com/cloud/network/dao/NetScalerPodDao.java
diff --git a/server/src/com/cloud/network/dao/NetScalerPodDaoImpl.java b/plugins/network-elements/netscaler/src/com/cloud/network/dao/NetScalerPodDaoImpl.java
similarity index 100%
rename from server/src/com/cloud/network/dao/NetScalerPodDaoImpl.java
rename to plugins/network-elements/netscaler/src/com/cloud/network/dao/NetScalerPodDaoImpl.java
diff --git a/server/src/com/cloud/network/element/NetscalerElement.java b/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java
similarity index 100%
rename from server/src/com/cloud/network/element/NetscalerElement.java
rename to plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java
diff --git a/server/src/com/cloud/network/element/NetscalerLoadBalancerElementService.java b/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerLoadBalancerElementService.java
similarity index 100%
rename from server/src/com/cloud/network/element/NetscalerLoadBalancerElementService.java
rename to plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerLoadBalancerElementService.java
diff --git a/core/src/com/cloud/network/resource/NetscalerResource.java b/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java
similarity index 100%
rename from core/src/com/cloud/network/resource/NetscalerResource.java
rename to plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java
diff --git a/server/src/com/cloud/configuration/DefaultComponentLibrary.java b/server/src/com/cloud/configuration/DefaultComponentLibrary.java
index df833f4265e..2da961246b7 100755
--- a/server/src/com/cloud/configuration/DefaultComponentLibrary.java
+++ b/server/src/com/cloud/configuration/DefaultComponentLibrary.java
@@ -81,7 +81,6 @@ import com.cloud.network.dao.InlineLoadBalancerNicMapDaoImpl;
import com.cloud.network.dao.LBStickinessPolicyDaoImpl;
import com.cloud.network.dao.LoadBalancerDaoImpl;
import com.cloud.network.dao.LoadBalancerVMMapDaoImpl;
-import com.cloud.network.dao.NetScalerPodDaoImpl;
import com.cloud.network.dao.NetworkDaoImpl;
import com.cloud.network.dao.NetworkDomainDaoImpl;
import com.cloud.network.dao.NetworkExternalFirewallDaoImpl;
@@ -101,8 +100,6 @@ import com.cloud.network.element.F5ExternalLoadBalancerElement;
import com.cloud.network.element.F5ExternalLoadBalancerElementService;
import com.cloud.network.element.JuniperSRXExternalFirewallElement;
import com.cloud.network.element.JuniperSRXFirewallElementService;
-import com.cloud.network.element.NetscalerElement;
-import com.cloud.network.element.NetscalerLoadBalancerElementService;
import com.cloud.network.element.VirtualRouterElement;
import com.cloud.network.element.VirtualRouterElementService;
import com.cloud.network.firewall.FirewallManagerImpl;
@@ -323,7 +320,6 @@ public class DefaultComponentLibrary extends ComponentLibraryBase implements Com
addDao("ExternalFirewallDeviceDao", ExternalFirewallDeviceDaoImpl.class);
addDao("NetworkExternalLoadBalancerDao", NetworkExternalLoadBalancerDaoImpl.class);
addDao("NetworkExternalFirewallDao", NetworkExternalFirewallDaoImpl.class);
- addDao("NetScalerPodDao", NetScalerPodDaoImpl.class);
addDao("CiscoNexusVSMDeviceDao", CiscoNexusVSMDeviceDaoImpl.class);
addDao("ClusterVSMMapDao", ClusterVSMMapDaoImpl.class);
addDao("PortProfileDao", PortProfileDaoImpl.class);
@@ -420,7 +416,6 @@ public class DefaultComponentLibrary extends ComponentLibraryBase implements Com
protected void populateServices() {
addService("VirtualRouterElementService", VirtualRouterElementService.class, VirtualRouterElement.class);
- addService("NetscalerExternalLoadBalancerElementService", NetscalerLoadBalancerElementService.class, NetscalerElement.class);
addService("F5LoadBalancerElementService", F5ExternalLoadBalancerElementService.class, F5ExternalLoadBalancerElement.class);
addService("JuniperSRXFirewallElementService", JuniperSRXFirewallElementService.class, JuniperSRXExternalFirewallElement.class);
addService("CiscoNexusVSMElementService", CiscoNexusVSMElementService.class, CiscoNexusVSMElement.class);
diff --git a/server/src/com/cloud/network/ExternalNetworkDeviceManagerImpl.java b/server/src/com/cloud/network/ExternalNetworkDeviceManagerImpl.java
index f9357cfc7a6..f0f403ebc2f 100755
--- a/server/src/com/cloud/network/ExternalNetworkDeviceManagerImpl.java
+++ b/server/src/com/cloud/network/ExternalNetworkDeviceManagerImpl.java
@@ -56,10 +56,8 @@ import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
import com.cloud.network.dao.VpnUserDao;
import com.cloud.network.element.F5ExternalLoadBalancerElementService;
import com.cloud.network.element.JuniperSRXFirewallElementService;
-import com.cloud.network.element.NetscalerLoadBalancerElementService;
import com.cloud.network.resource.F5BigIpResource;
import com.cloud.network.resource.JuniperSrxResource;
-import com.cloud.network.resource.NetscalerResource;
import com.cloud.network.rules.dao.PortForwardingRulesDao;
import com.cloud.offerings.dao.NetworkOfferingDao;
import com.cloud.resource.ServerResource;
@@ -106,7 +104,6 @@ public class ExternalNetworkDeviceManagerImpl implements ExternalNetworkDeviceMa
@Inject NetworkExternalLoadBalancerDao _networkExternalLBDao;
@Inject NetworkExternalFirewallDao _networkExternalFirewallDao;
- @PlugService NetscalerLoadBalancerElementService _netsclarLbService;
@PlugService F5ExternalLoadBalancerElementService _f5LbElementService;
@PlugService JuniperSRXFirewallElementService _srxElementService;
@@ -187,21 +184,6 @@ public class ExternalNetworkDeviceManagerImpl implements ExternalNetworkDeviceMa
} else {
throw new CloudRuntimeException("Failed to add SRX firewall device due to internal error");
}
- } else if (cmd.getDeviceType().equalsIgnoreCase(NetworkDevice.NetscalerMPXLoadBalancer.getName()) ||
- cmd.getDeviceType().equalsIgnoreCase(NetworkDevice.NetscalerVPXLoadBalancer.getName()) ||
- cmd.getDeviceType().equalsIgnoreCase(NetworkDevice.NetscalerSDXLoadBalancer.getName())) {
- Long physicalNetworkId = (params.get(ApiConstants.PHYSICAL_NETWORK_ID)==null)?Long.parseLong((String)params.get(ApiConstants.PHYSICAL_NETWORK_ID)):null;
- String url = (String) params.get(ApiConstants.URL);
- String username = (String) params.get(ApiConstants.USERNAME);
- String password = (String) params.get(ApiConstants.PASSWORD);
- ExternalLoadBalancerDeviceManager lbDeviceMgr = (ExternalLoadBalancerDeviceManager) _netsclarLbService;
- ExternalLoadBalancerDeviceVO lbDeviceVO = lbDeviceMgr.addExternalLoadBalancer(physicalNetworkId,
- url, username, password, cmd.getDeviceType(), (ServerResource) new NetscalerResource());
- if (lbDeviceVO != null) {
- return _hostDao.findById(lbDeviceVO.getHostId());
- } else {
- throw new CloudRuntimeException("Failed to add Netscaler load balancer device due to internal error");
- }
} else if (cmd.getDeviceType().equalsIgnoreCase(NetworkDevice.F5BigIpLoadBalancer.getName())) {
Long physicalNetworkId = (params.get(ApiConstants.PHYSICAL_NETWORK_ID)==null)?Long.parseLong((String)params.get(ApiConstants.PHYSICAL_NETWORK_ID)):null;
String url = (String) params.get(ApiConstants.URL);