mirror of https://github.com/apache/cloudstack.git
moving out ELB network element to plugins/network-elements/elastic-loadbalancer
This commit is contained in:
parent
5fafb0e5e5
commit
9876d34ea4
|
|
@ -279,8 +279,8 @@
|
|||
|
||||
<!-- ===================== Network Elements ===================== -->
|
||||
|
||||
<target name="compile-network-elements" depends="compile-netscaler, compile-f5, compile-srx, compile-ovs" description="Compile all network elements"/>
|
||||
<target name="build-network-elements" depends="build-netscaler, build-f5, build-srx, build-ovs" description="build all network elements"/>
|
||||
<target name="compile-network-elements" depends="compile-netscaler, compile-f5, compile-srx, compile-ovs, compile-elb" description="Compile all network elements"/>
|
||||
<target name="build-network-elements" depends="build-netscaler, build-f5, build-srx, build-ovs, build-elb" description="build all network elements"/>
|
||||
|
||||
<target name="compile-netscaler" depends="-init, compile-server" description="Compile NetScaler plugin">
|
||||
<ant antfile="${base.dir}/plugins/network-elements/netscaler/build.xml" target="build"/>
|
||||
|
|
@ -302,6 +302,11 @@
|
|||
</target>
|
||||
<target name="build-ovs" depends="compile-ovs"/>
|
||||
|
||||
<target name="compile-elb" depends="-init, compile-server" description="Compile ELB plugin">
|
||||
<ant antfile="${base.dir}/plugins/network-elements/elastic-loadbalancer/build.xml" target="build"/>
|
||||
</target>
|
||||
<target name="build-elb" depends="compile-elb"/>
|
||||
|
||||
|
||||
<!-- ===================== File Systems ===================== -->
|
||||
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@
|
|||
</adapters>
|
||||
<manager name="VmwareManager" key="com.cloud.hypervisor.vmware.manager.VmwareManager" class="com.cloud.hypervisor.vmware.manager.VmwareManagerImpl"/>
|
||||
<manager name="OvsTunnelManager" key="com.cloud.network.ovs.OvsTunnelManager" class="com.cloud.network.ovs.OvsTunnelManagerImpl"/>
|
||||
<manager name="ElasticLoadBalancerManager" key="com.cloud.network.lb.ElasticLoadBalancerManager" class="com.cloud.network.lb.ElasticLoadBalancerManagerImpl"/>
|
||||
<pluggableservice name="VirtualRouterElementService" key="com.cloud.network.element.VirtualRouterElementService" class="com.cloud.network.element.VirtualRouterElement"/>
|
||||
<pluggableservice name="NetscalerExternalLoadBalancerElementService" key="com.cloud.network.element.NetscalerLoadBalancerElementService" class="com.cloud.network.element.NetscalerElement"/>
|
||||
<pluggableservice name="F5ExternalLoadBalancerElementService" key="com.cloud.network.element.F5ExternalLoadBalancerElementService" class="com.cloud.network.element.F5ExternalLoadBalancerElement"/>
|
||||
|
|
@ -172,6 +173,7 @@
|
|||
<dao name="NetappVolume" class="com.cloud.netapp.dao.VolumeDaoImpl" singleton="false"/>
|
||||
<dao name="NetappLun" class="com.cloud.netapp.dao.LunDaoImpl" singleton="false"/>
|
||||
<manager name="NetappManager" key="com.cloud.netapp.NetappManager" class="com.cloud.netapp.NetappManagerImpl"/>
|
||||
<dao name="ElasticLbVmMapDao" class="com.cloud.network.lb.dao.ElasticLbVmMapDaoImpl" singleton="false"/>
|
||||
</management-server>
|
||||
|
||||
<configuration-server class="com.cloud.server.ConfigurationServerImpl">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/api"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/core"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/server"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/utils"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/deps"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>elastic-loadbalancer</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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 name="Cloud Stack ELB network element" default="help" basedir=".">
|
||||
<description>
|
||||
Cloud Stack ant build file
|
||||
</description>
|
||||
|
||||
<dirname property="elb.base.dir" file="${ant.file.Cloud Stack ELB network element}/"/>
|
||||
<!-- This directory must be set -->
|
||||
<property name="top.dir" location="${elb.base.dir}/../../.."/>
|
||||
<property name="build.dir" location="${top.dir}/build"/>
|
||||
|
||||
<echo message="build.dir=${build.dir}; top.dir=${top.dir}; elb.base.dir=${elb.base.dir}"/>
|
||||
|
||||
<!-- Import anything that the user wants to set-->
|
||||
<!-- Import properties files and environment variables here -->
|
||||
|
||||
<property environment="env" />
|
||||
|
||||
<condition property="build-cloud.properties.file" value="${build.dir}/override/build-cloud.properties" else="${build.dir}/build-cloud.properties">
|
||||
<available file="${build.dir}/override/build-cloud.properties" />
|
||||
</condition>
|
||||
|
||||
<condition property="cloud.properties.file" value="${build.dir}/override/cloud.properties" else="${build.dir}/cloud.properties">
|
||||
<available file="${build.dir}/override/cloud.properties" />
|
||||
</condition>
|
||||
|
||||
<condition property="override.file" value="${build.dir}/override/replace.properties" else="${build.dir}/replace.properties">
|
||||
<available file="${build.dir}/override/replace.properties" />
|
||||
</condition>
|
||||
|
||||
<echo message="Using build parameters from ${build-cloud.properties.file}" />
|
||||
<property file="${build-cloud.properties.file}" />
|
||||
|
||||
<echo message="Using company info from ${cloud.properties.file}" />
|
||||
<property file="${cloud.properties.file}" />
|
||||
|
||||
<echo message="Using override file from ${override.file}" />
|
||||
<property file="${override.file}" />
|
||||
|
||||
<property file="${build.dir}/build.number" />
|
||||
|
||||
<!-- In case these didn't get defined in the build-cloud.properties -->
|
||||
<property name="branding.name" value="default" />
|
||||
<property name="deprecation" value="off" />
|
||||
<property name="target.compat.version" value="1.6" />
|
||||
<property name="source.compat.version" value="1.6" />
|
||||
<property name="debug" value="true" />
|
||||
<property name="debuglevel" value="lines,source"/>
|
||||
|
||||
<echo message="target.dir=${target.dir}; top.dir=${top.dir}"/>
|
||||
<!-- directories for build and distribution -->
|
||||
<property name="target.dir" location="${top.dir}/target" />
|
||||
<property name="classes.dir" location="${target.dir}/classes" />
|
||||
<property name="jar.dir" location="${target.dir}/jar" />
|
||||
<property name="dep.cache.dir" location="${target.dir}/dep-cache" />
|
||||
<property name="build.log" location="${target.dir}/ant_verbose.txt" />
|
||||
|
||||
<property name="deps.dir" location="${top.dir}/deps" />
|
||||
|
||||
<property name="cloud-plugin-elb.jar" value="cloud-plugin-elb.jar" />
|
||||
|
||||
<import file="${build.dir}/build-common.xml"/>
|
||||
|
||||
<echo message="target.dir=${target.dir}; top.dir=${top.dir}"/>
|
||||
|
||||
<!-- This section needs to be replaced by some kind of dependency library-->
|
||||
<path id="deps.classpath">
|
||||
<!--filelist files="${deps.classpath}" /-->
|
||||
<fileset dir="${deps.dir}" erroronmissingdir="false">
|
||||
<include name="*.jar" />
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<path id="cloudstack.classpath">
|
||||
<fileset dir="${jar.dir}">
|
||||
<include name="*.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<path id="elb.classpath">
|
||||
<path refid="deps.classpath"/>
|
||||
<path refid="cloudstack.classpath"/>
|
||||
</path>
|
||||
|
||||
<!-- This section needs to be replaced by some kind of dependency library-->
|
||||
|
||||
<target name="deploy-elb" >
|
||||
</target>
|
||||
|
||||
<target name="init" description="Initialize binaries directory">
|
||||
<mkdir dir="${classes.dir}/${cloud-plugin-elb.jar}"/>
|
||||
<mkdir dir="${jar.dir}"/>
|
||||
</target>
|
||||
|
||||
<target name="compile-elb" depends="init" description="Compile ELB">
|
||||
<compile-java jar.name="${cloud-plugin-elb.jar}" top.dir="${elb.base.dir}" classpath="elb.classpath" />
|
||||
</target>
|
||||
|
||||
<target name="clean-elb">
|
||||
<delete dir="${classes.dir}/${cloud-plugin-elb.jar}"/>
|
||||
</target>
|
||||
|
||||
<target name="build" depends="compile-elb"/>
|
||||
<target name="clean" depends="clean-elb"/>
|
||||
|
||||
<target name="help" description="help">
|
||||
<echo level="info" message="This is the build file for ELB network element plugin"/>
|
||||
<echo level="info" message="You can do a build by doing ant build or clean by doing ant clean" />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
|
@ -100,9 +100,7 @@ import com.cloud.network.dao.VpnUserDaoImpl;
|
|||
import com.cloud.network.element.VirtualRouterElement;
|
||||
import com.cloud.network.element.VirtualRouterElementService;
|
||||
import com.cloud.network.firewall.FirewallManagerImpl;
|
||||
import com.cloud.network.lb.ElasticLoadBalancerManagerImpl;
|
||||
import com.cloud.network.lb.LoadBalancingRulesManagerImpl;
|
||||
import com.cloud.network.lb.dao.ElasticLbVmMapDaoImpl;
|
||||
import com.cloud.network.router.VirtualNetworkApplianceManagerImpl;
|
||||
import com.cloud.network.rules.RulesManagerImpl;
|
||||
import com.cloud.network.rules.dao.PortForwardingRulesDaoImpl;
|
||||
|
|
@ -296,7 +294,6 @@ public class DefaultComponentLibrary extends ComponentLibraryBase implements Com
|
|||
addDao("AgentTransferMapDao", HostTransferMapDaoImpl.class);
|
||||
addDao("ProjectDao", ProjectDaoImpl.class);
|
||||
addDao("InlineLoadBalancerNicMapDao", InlineLoadBalancerNicMapDaoImpl.class);
|
||||
addDao("ElasticLbVmMap", ElasticLbVmMapDaoImpl.class);
|
||||
addDao("ProjectsAccountDao", ProjectAccountDaoImpl.class);
|
||||
addDao("ProjectInvitationDao", ProjectInvitationDaoImpl.class);
|
||||
addDao("IdentityDao", IdentityDaoImpl.class);
|
||||
|
|
@ -369,7 +366,6 @@ public class DefaultComponentLibrary extends ComponentLibraryBase implements Com
|
|||
ComponentInfo<? extends Manager> info = addManager("ConsoleProxyManager", ConsoleProxyManagerImpl.class);
|
||||
info.addParameter("consoleproxy.sslEnabled", "true");
|
||||
addManager("ProjectManager", ProjectManagerImpl.class);
|
||||
addManager("ElasticLoadBalancerManager", ElasticLoadBalancerManagerImpl.class);
|
||||
addManager("SwiftManager", SwiftManagerImpl.class);
|
||||
addManager("StorageNetworkManager", StorageNetworkManagerImpl.class);
|
||||
addManager("ExternalLoadBalancerUsageManager", ExternalLoadBalancerUsageManagerImpl.class);
|
||||
|
|
|
|||
|
|
@ -151,8 +151,6 @@ public class LoadBalancingRulesManagerImpl<Type> implements LoadBalancingRulesMa
|
|||
@Inject
|
||||
FirewallManager _firewallMgr;
|
||||
@Inject
|
||||
ElasticLoadBalancerManager _elbMgr;
|
||||
@Inject
|
||||
NetworkDao _networkDao;
|
||||
@Inject
|
||||
FirewallRulesDao _firewallDao;
|
||||
|
|
@ -684,7 +682,9 @@ public class LoadBalancingRulesManagerImpl<Type> implements LoadBalancingRulesMa
|
|||
_firewallDao.remove(lb.getId());
|
||||
}
|
||||
|
||||
_elbMgr.handleDeleteLoadBalancerRule(lb, callerUserId, caller);
|
||||
// FIXME: breaking the dependency on ELB manager. This breaks functionality of ELB using virtual router
|
||||
// Bug CS-15411 opened to document this
|
||||
//_elbMgr.handleDeleteLoadBalancerRule(lb, callerUserId, caller);
|
||||
|
||||
if (success) {
|
||||
s_logger.debug("Load balancer with id " + lb.getId() + " is removed successfully");
|
||||
|
|
@ -726,7 +726,10 @@ public class LoadBalancingRulesManagerImpl<Type> implements LoadBalancingRulesMa
|
|||
_networkMgr.checkIpForService(ipAddressVo, Service.Lb);
|
||||
}
|
||||
|
||||
LoadBalancer result = _elbMgr.handleCreateLoadBalancerRule(lb, lbOwner, lb.getNetworkId());
|
||||
// FIXME: breaking the dependency on ELB manager. This breaks functionality of ELB using virtual router
|
||||
// Bug CS-15411 opened to document this
|
||||
//LoadBalancer result = _elbMgr.handleCreateLoadBalancerRule(lb, lbOwner, lb.getNetworkId());
|
||||
LoadBalancer result = null;
|
||||
if (result == null) {
|
||||
IpAddress ip = null;
|
||||
Network guestNetwork = _networkMgr.getNetwork(lb.getNetworkId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue