cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dar...@apache.org
Subject git commit: updated refs/heads/master to a77435d
Date Fri, 25 Oct 2013 03:20:53 GMT
Updated Branches:
  refs/heads/master f650d07b6 -> a77435dab


Add missing extensible type registries

The following types were not setup to discover extensions

com.cloud.network.element.FirewallServiceProvider
com.cloud.network.element.PortForwardingServiceProvider
com.cloud.network.element.StaticNatServiceProvider
com.cloud.network.element.NetworkACLServiceProvider
com.cloud.network.element.LoadBalancingServiceProvider
com.cloud.network.element.Site2SiteVpnServiceProvider


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

Branch: refs/heads/master
Commit: a77435dab5523573059beb18a336c52a90674084
Parents: f650d07
Author: Darren Shepherd <darren.s.shepherd@gmail.com>
Authored: Thu Oct 24 20:20:55 2013 -0700
Committer: Darren Shepherd <darren.s.shepherd@gmail.com>
Committed: Thu Oct 24 20:20:55 2013 -0700

----------------------------------------------------------------------
 .../core/spring-core-registry-core-context.xml  | 71 ++++++++++++++++++++
 ...re-lifecycle-network-context-inheritable.xml | 38 ++++++++++-
 .../spring-server-core-managers-context.xml     | 19 ++++--
 .../network/firewall/FirewallManagerImpl.java   | 51 ++++++++++++--
 .../lb/LoadBalancingRulesManagerImpl.java       | 10 ++-
 .../network/vpc/NetworkACLManagerImpl.java      | 10 ++-
 .../network/vpn/Site2SiteVpnManagerImpl.java    | 12 +++-
 7 files changed, 197 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a77435da/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml
b/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml
index 1de9a04..26d70c9 100644
--- a/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml
+++ b/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml
@@ -118,12 +118,22 @@
         class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
         <property name="excludeKey" value="ip.deployers.exclude" />
         <property name="excludeDefault" value="MidoNetElement" />
+        <property name="preRegistered">
+            <list>
+                <ref bean="VpcVirtualRouter" />
+            </list>
+        </property>
     </bean>
 
     <bean id="dhcpProvidersRegistry"
         class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
         <property name="excludeKey" value="dhcp.providers.exclude" />
         <property name="excludeDefault" value="MidoNetElement" />
+        <property name="preRegistered">
+            <list>
+                <ref bean="VpcVirtualRouter" />
+            </list>
+        </property>
     </bean>
 
     <bean id="networkGurusRegistry"
@@ -143,6 +153,67 @@
         </property>
     </bean>
 
+    <bean id="firewallServiceProvidersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="firewall.service.provider.exclude" />
+        <property name="preRegistered">
+            <list>
+                <ref bean="VpcVirtualRouter" />
+            </list>
+        </property>
+    </bean>
+
+    <bean id="loadBalancingServiceProvidersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="load.balancing.service.provider.exclude" />
+        <property name="preRegistered">
+            <list>
+                <ref bean="VpcVirtualRouter" />
+                <ref bean="InternalLbVm" />
+            </list>
+        </property>
+    </bean>
+
+    <bean id="portForwardingServiceProvidersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="port.forwarding.service.provider.exclude" />
+        <property name="preRegistered">
+            <list>
+                <ref bean="VpcVirtualRouter" />
+            </list>
+        </property>
+    </bean>
+
+    <bean id="staticNatServiceProvidersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="static.nat.service.provider.exclude" />
+        <property name="preRegistered">
+            <list>
+                <ref bean="VpcVirtualRouter" />
+            </list>
+        </property>
+    </bean>
+
+    <bean id="networkACLServiceProvidersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="network.acl.service.provider.exclude" />
+        <property name="preRegistered">
+            <list>
+                <ref bean="VpcVirtualRouter" />
+            </list>
+        </property>
+    </bean>
+
+    <bean id="site2SiteVpnServiceProvidersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="site2site.vpn.service.provider.exclude" />
+        <property name="preRegistered">
+            <list>
+                <ref bean="VpcVirtualRouter" />
+            </list>
+        </property>
+    </bean>
+
     <bean id="affinityProcessorsRegistry"
         class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
         <property name="orderConfigKey" value="affinity.processors.order" />

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a77435da/core/resources/META-INF/cloudstack/network/spring-core-lifecycle-network-context-inheritable.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/network/spring-core-lifecycle-network-context-inheritable.xml
b/core/resources/META-INF/cloudstack/network/spring-core-lifecycle-network-context-inheritable.xml
index b2660fc..3388ca4 100644
--- a/core/resources/META-INF/cloudstack/network/spring-core-lifecycle-network-context-inheritable.xml
+++ b/core/resources/META-INF/cloudstack/network/spring-core-lifecycle-network-context-inheritable.xml
@@ -48,11 +48,47 @@
         <property name="typeClass"
             value="com.cloud.network.element.NetworkElement" />
     </bean>
-    
+
     <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
         <property name="registry" ref="vpcProvidersRegistry" />
         <property name="typeClass"
             value="com.cloud.network.element.VpcProvider" />
     </bean>
 
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="firewallServiceProvidersRegistry" />
+        <property name="typeClass"
+            value="com.cloud.network.element.FirewallServiceProvider" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="portForwardingServiceProvidersRegistry" />
+        <property name="typeClass"
+            value="com.cloud.network.element.PortForwardingServiceProvider" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="staticNatServiceProvidersRegistry" />
+        <property name="typeClass"
+            value="com.cloud.network.element.StaticNatServiceProvider" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="networkACLServiceProvidersRegistry" />
+        <property name="typeClass"
+            value="com.cloud.network.element.NetworkACLServiceProvider" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="loadBalancingServiceProvidersRegistry" />
+        <property name="typeClass"
+            value="com.cloud.network.element.LoadBalancingServiceProvider" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="site2SiteVpnServiceProvidersRegistry" />
+        <property name="typeClass"
+            value="com.cloud.network.element.Site2SiteVpnServiceProvider" />
+    </bean>
+
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a77435da/server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml
----------------------------------------------------------------------
diff --git a/server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml
b/server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml
index 11b69d2..8a13b14 100644
--- a/server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml
+++ b/server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml
@@ -102,7 +102,12 @@
 
     <bean id="externalNetworkDeviceManagerImpl" class="com.cloud.network.ExternalNetworkDeviceManagerImpl"
/>
 
-    <bean id="firewallManagerImpl" class="com.cloud.network.firewall.FirewallManagerImpl"
/>
+    <bean id="firewallManagerImpl" class="com.cloud.network.firewall.FirewallManagerImpl"
>
+        <property name="firewallElements" value="#{firewallServiceProvidersRegistry.registered}"
/>
+        <property name="networkAclElements" value="#{networkACLServiceProvidersRegistry.registered}"
/>
+        <property name="pfElements" value="#{portForwardingServiceProvidersRegistry.registered}"
/>
+        <property name="staticNatElements" value="#{staticNatServiceProvidersRegistry.registered}"
/>
+    </bean>
 
     <bean id="hypervisorGuruManagerImpl" class="com.cloud.hypervisor.HypervisorGuruManagerImpl"
>
         <property name="hvGuruList" value="#{hypervisorGurusRegistry.registered}" />
@@ -112,9 +117,13 @@
 
     <bean id="keystoreManagerImpl" class="com.cloud.keystore.KeystoreManagerImpl" />
 
-    <bean id="loadBalancingRulesManagerImpl" class="com.cloud.network.lb.LoadBalancingRulesManagerImpl"
/>
+    <bean id="loadBalancingRulesManagerImpl" class="com.cloud.network.lb.LoadBalancingRulesManagerImpl"
>
+        <property name="lbProviders" value="#{loadBalancingServiceProvidersRegistry.registered}"
/>
+    </bean>
 
-    <bean id="networkACLManagerImpl" class="com.cloud.network.vpc.NetworkACLManagerImpl"
/>
+    <bean id="networkACLManagerImpl" class="com.cloud.network.vpc.NetworkACLManagerImpl"
>
+        <property name="networkAclElements" value="#{networkACLServiceProvidersRegistry.registered}"
/>
+    </bean>
 
     <bean id="networkACLServiceImpl" class="com.cloud.network.vpc.NetworkACLServiceImpl"
/>
 
@@ -140,7 +149,9 @@
 
     <bean id="rulesManagerImpl" class="com.cloud.network.rules.RulesManagerImpl" />
 
-    <bean id="site2SiteVpnManagerImpl" class="com.cloud.network.vpn.Site2SiteVpnManagerImpl"
/>
+    <bean id="site2SiteVpnManagerImpl" class="com.cloud.network.vpn.Site2SiteVpnManagerImpl"
>
+        <property name="s2sProviders" value="#{site2SiteVpnServiceProvidersRegistry.registered}"
/>
+    </bean>
 
     <bean id="snapshotManagerImpl" class="com.cloud.storage.snapshot.SnapshotManagerImpl"
/>
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a77435da/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/firewall/FirewallManagerImpl.java b/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
index bd9ead0..ccceb8d 100644
--- a/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
+++ b/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
@@ -135,13 +135,13 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
     NetworkDao _networkDao;
     @Inject
     VpcManager _vpcMgr;
-    @Inject List<FirewallServiceProvider> _firewallElements;
+    List<FirewallServiceProvider> _firewallElements;
 
-    @Inject List<PortForwardingServiceProvider> _pfElements;
+    List<PortForwardingServiceProvider> _pfElements;
 
-    @Inject List<StaticNatServiceProvider> _staticNatElements;
+    List<StaticNatServiceProvider> _staticNatElements;
 
-    @Inject List<NetworkACLServiceProvider> _networkAclElements;
+    List<NetworkACLServiceProvider> _networkAclElements;
     @Inject
     IpAddressManager _ipAddrMgr;
 
@@ -152,11 +152,16 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
         _name = name;
         String elbEnabledString = _configDao.getValue(Config.ElasticLoadBalancerEnabled.key());
         _elbEnabled = Boolean.parseBoolean(elbEnabledString);
-        s_logger.info("Firewall provider list is " + _firewallElements.iterator().next());
         return true;
     }
 
     @Override
+    public boolean start() {
+        s_logger.info("Firewall provider list is " + _firewallElements.iterator().next());
+        return super.start();
+    }
+
+    @Override
     @ActionEvent(eventType = EventTypes.EVENT_FIREWALL_OPEN, eventDescription = "creating
firewall rule", create = true)
     public FirewallRule createEgressFirewallRule(FirewallRule rule) throws NetworkRuleConflictException
{
         Account caller = CallContext.current().getCallingAccount();
@@ -931,4 +936,40 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
         return true;
     }
 
+    public List<FirewallServiceProvider> getFirewallElements() {
+        return _firewallElements;
+    }
+
+    @Inject
+    public void setFirewallElements(List<FirewallServiceProvider> firewallElements)
{
+        this._firewallElements = firewallElements;
+    }
+
+    public List<PortForwardingServiceProvider> getPfElements() {
+        return _pfElements;
+    }
+
+    @Inject
+    public void setPfElements(List<PortForwardingServiceProvider> pfElements) {
+        this._pfElements = pfElements;
+    }
+
+    public List<StaticNatServiceProvider> getStaticNatElements() {
+        return _staticNatElements;
+    }
+
+    @Inject
+    public void setStaticNatElements(List<StaticNatServiceProvider> staticNatElements)
{
+        this._staticNatElements = staticNatElements;
+    }
+
+    public List<NetworkACLServiceProvider> getNetworkAclElements() {
+        return _networkAclElements;
+    }
+
+    @Inject
+    public void setNetworkAclElements(List<NetworkACLServiceProvider> networkAclElements)
{
+        this._networkAclElements = networkAclElements;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a77435da/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
index d49f309..0d43478 100755
--- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
@@ -247,7 +247,6 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase
implements
     DataCenterDao _dcDao = null;
     @Inject
     UserDao _userDao;
-    @Inject
     List<LoadBalancingServiceProvider> _lbProviders;
     @Inject ApplicationLoadBalancerRuleDao _appLbRuleDao;
     @Inject
@@ -2173,4 +2172,13 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase
implements
         }
     }
 
+    public List<LoadBalancingServiceProvider> getLbProviders() {
+        return _lbProviders;
+    }
+
+    @Inject
+    public void setLbProviders(List<LoadBalancingServiceProvider> lbProviders) {
+        this._lbProviders = lbProviders;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a77435da/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java b/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
index 30d39e0..1ea5dd0 100644
--- a/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
@@ -68,7 +68,6 @@ public class NetworkACLManagerImpl extends ManagerBase implements NetworkACLMana
     NetworkACLDao _networkACLDao;
     @Inject
     NetworkACLItemDao _networkACLItemDao;
-    @Inject
     List<NetworkACLServiceProvider> _networkAclElements;
     @Inject
     NetworkModel _networkModel;
@@ -474,4 +473,13 @@ public class NetworkACLManagerImpl extends ManagerBase implements NetworkACLMana
         return handled;
     }
 
+    public List<NetworkACLServiceProvider> getNetworkAclElements() {
+        return _networkAclElements;
+    }
+
+    @Inject
+    public void setNetworkAclElements(List<NetworkACLServiceProvider> networkAclElements)
{
+        this._networkAclElements = networkAclElements;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a77435da/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java b/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
index d66fd7b..f29a8c8 100644
--- a/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
+++ b/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
@@ -37,7 +37,6 @@ import org.apache.cloudstack.api.command.user.vpn.ResetVpnConnectionCmd;
 import org.apache.cloudstack.api.command.user.vpn.UpdateVpnCustomerGatewayCmd;
 import org.apache.cloudstack.context.CallContext;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
-
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
@@ -86,7 +85,7 @@ import com.cloud.vm.DomainRouterVO;
 public class Site2SiteVpnManagerImpl extends ManagerBase implements Site2SiteVpnManager {
     private static final Logger s_logger = Logger.getLogger(Site2SiteVpnManagerImpl.class);
 
-    @Inject List<Site2SiteVpnServiceProvider> _s2sProviders;
+    List<Site2SiteVpnServiceProvider> _s2sProviders;
     @Inject Site2SiteCustomerGatewayDao _customerGatewayDao;
     @Inject Site2SiteVpnGatewayDao _vpnGatewayDao;
     @Inject Site2SiteVpnConnectionDao _vpnConnectionDao;
@@ -761,4 +760,13 @@ public class Site2SiteVpnManagerImpl extends ManagerBase implements Site2SiteVpn
             }
         }
     }
+
+    public List<Site2SiteVpnServiceProvider> getS2sProviders() {
+        return _s2sProviders;
+    }
+
+    @Inject
+    public void setS2sProviders(List<Site2SiteVpnServiceProvider> s2sProviders) {
+        this._s2sProviders = s2sProviders;
+    }
 }


Mime
View raw message