cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [03/50] [abbrv] git commit: updated refs/heads/ui-restyle to 849d601
Date Thu, 30 Jan 2014 22:40:54 GMT
These are additional fixes to make Juniper Contrail plugin work


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

Branch: refs/heads/ui-restyle
Commit: cc98125067575f305ea7621df28c70785128750a
Parents: 4583bac
Author: Sachchidanand Vaidya <vaidyasd@juniper.net>
Authored: Wed Jan 8 00:26:46 2014 -0800
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Tue Jan 28 08:58:22 2014 +0000

----------------------------------------------------------------------
 .../network-elements/juniper-contrail/pom.xml   |   6 +
 .../cloudstack/contrail/module.properties       |  18 +++
 .../contrail/spring-contrail-context.xml        |  50 ++++++++
 .../management/ContrailElementImpl.java         |   7 --
 .../IntegrationTestConfiguration.java           |  73 +++++++++--
 .../contrail/management/MockAccountManager.java |   3 -
 .../test/resources/commonContext.xml            | 126 ++++++-------------
 7 files changed, 172 insertions(+), 111 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cc981250/plugins/network-elements/juniper-contrail/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/pom.xml b/plugins/network-elements/juniper-contrail/pom.xml
index ae6961e..8c6877d 100644
--- a/plugins/network-elements/juniper-contrail/pom.xml
+++ b/plugins/network-elements/juniper-contrail/pom.xml
@@ -83,6 +83,12 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.cloudstack</groupId>
+      <artifactId>cloud-framework-spring-lifecycle</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>com.google.guava</groupId>
       <artifactId>guava</artifactId>
     </dependency>

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

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cc981250/plugins/network-elements/juniper-contrail/resources/META-INF/cloudstack/contrail/spring-contrail-context.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/resources/META-INF/cloudstack/contrail/spring-contrail-context.xml
b/plugins/network-elements/juniper-contrail/resources/META-INF/cloudstack/contrail/spring-contrail-context.xml
new file mode 100644
index 0000000..4614af7
--- /dev/null
+++ b/plugins/network-elements/juniper-contrail/resources/META-INF/cloudstack/contrail/spring-contrail-context.xml
@@ -0,0 +1,50 @@
+<!--
+  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="ContrailManager"
+	class="org.apache.cloudstack.network.contrail.management.ContrailManagerImpl"/>
+  <bean id="ContrailElement"
+	class="org.apache.cloudstack.network.contrail.management.ContrailElementImpl">
+    <property name="name" value="ContrailElement"/>
+  </bean>
+
+  <bean id="ContrailGuru"
+	class="org.apache.cloudstack.network.contrail.management.ContrailGuru">
+    <property name="name" value="ContrailGuru"/>
+  </bean>
+
+  <bean id="ServerDBSync"
+	class="org.apache.cloudstack.network.contrail.management.ServerDBSyncImpl"/>
+  <bean id="ServerEventHandler"
+	class="org.apache.cloudstack.network.contrail.management.ServerEventHandlerImpl"/>
+  <bean id="EventUtils"
+	class="org.apache.cloudstack.network.contrail.management.EventUtils"/>
+  <bean id="ServiceManager"
+	class="org.apache.cloudstack.network.contrail.management.ServiceManagerImpl"/>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cc981250/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java
b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java
index 092e4bc..05723b0 100644
--- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java
+++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java
@@ -26,7 +26,6 @@ import java.util.Set;
 
 import javax.ejb.Local;
 import javax.inject.Inject;
-import javax.naming.ConfigurationException;
 
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
@@ -90,12 +89,6 @@ public class ContrailElementImpl extends AdapterBase
     ServerDBSync _dbSync;
     private static final Logger s_logger = Logger.getLogger(ContrailElement.class);
 
-    @Override
-    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException
{
-        s_logger.debug("configure");
-        return true;
-    }
-
     // PluggableService
     @Override
     public List<Class<?>> getCommands() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cc981250/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/IntegrationTestConfiguration.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/IntegrationTestConfiguration.java
b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/IntegrationTestConfiguration.java
index 416653d..1a53c17 100644
--- a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/IntegrationTestConfiguration.java
+++ b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/IntegrationTestConfiguration.java
@@ -45,14 +45,17 @@ import org.apache.cloudstack.affinity.dao.AffinityGroupDomainMapDaoImpl;
 import org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDaoImpl;
 import org.apache.cloudstack.context.CallContext;
 import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.DcDetailsDaoImpl;
+import org.apache.cloudstack.engine.orchestration.NetworkOrchestrator;
 import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService;
 import org.apache.cloudstack.engine.service.api.OrchestrationService;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider;
 import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
 import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator;
 import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory;
 import org.apache.cloudstack.engine.subsystem.api.storage.TemplateService;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory;
+import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService;
 import org.apache.cloudstack.framework.config.ConfigDepot;
 import org.apache.cloudstack.framework.config.ConfigDepotAdmin;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl;
@@ -65,6 +68,7 @@ import org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl;
 import org.apache.cloudstack.framework.jobs.impl.AsyncJobMonitor;
 import org.apache.cloudstack.framework.jobs.impl.SyncQueueManager;
 import org.apache.cloudstack.lb.dao.ApplicationLoadBalancerRuleDaoImpl;
+import org.apache.cloudstack.network.element.InternalLoadBalancerElement;
 import org.apache.cloudstack.network.lb.ApplicationLoadBalancerService;
 import org.apache.cloudstack.network.lb.InternalLoadBalancerVMManager;
 import org.apache.cloudstack.network.lb.InternalLoadBalancerVMService;
@@ -73,6 +77,9 @@ import org.apache.cloudstack.region.PortableIpDaoImpl;
 import org.apache.cloudstack.region.PortableIpRangeDaoImpl;
 import org.apache.cloudstack.region.RegionManager;
 import org.apache.cloudstack.region.dao.RegionDaoImpl;
+import org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry;
+import org.apache.cloudstack.storage.datastore.PrimaryDataStoreProviderManager;
+import org.apache.cloudstack.storage.image.datastore.ImageStoreProviderManager;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDaoImpl;
 import org.apache.cloudstack.storage.image.db.ImageStoreDaoImpl;
 import org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl;
@@ -120,6 +127,7 @@ import com.cloud.dc.dao.AccountVlanMapDaoImpl;
 import com.cloud.dc.dao.ClusterDaoImpl;
 import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.dc.dao.DataCenterDaoImpl;
+import com.cloud.dc.dao.DataCenterDetailsDaoImpl;
 import com.cloud.dc.dao.DataCenterIpAddressDaoImpl;
 import com.cloud.dc.dao.DataCenterLinkLocalIpAddressDaoImpl;
 import com.cloud.dc.dao.DataCenterVnetDaoImpl;
@@ -141,11 +149,11 @@ import com.cloud.host.dao.HostDetailsDaoImpl;
 import com.cloud.host.dao.HostTagsDaoImpl;
 import com.cloud.hypervisor.HypervisorGuruManagerImpl;
 import com.cloud.hypervisor.dao.HypervisorCapabilitiesDaoImpl;
+import com.cloud.hypervisor.XenServerGuru;
 import com.cloud.network.ExternalDeviceUsageManager;
 import com.cloud.network.IpAddress;
 import com.cloud.network.IpAddressManagerImpl;
 import com.cloud.network.Ipv6AddressManagerImpl;
-import com.cloud.network.NetworkModelImpl;
 import com.cloud.network.NetworkServiceImpl;
 import com.cloud.network.NetworkUsageService;
 import com.cloud.network.StorageNetworkManager;
@@ -161,6 +169,7 @@ import com.cloud.network.as.dao.CounterDaoImpl;
 import com.cloud.network.dao.AccountGuestVlanMapDaoImpl;
 import com.cloud.network.dao.FirewallRulesCidrsDaoImpl;
 import com.cloud.network.dao.FirewallRulesDaoImpl;
+import com.cloud.network.dao.IPAddressDaoImpl;
 import com.cloud.network.dao.IPAddressDao;
 import com.cloud.network.dao.LBHealthCheckPolicyDaoImpl;
 import com.cloud.network.dao.LBStickinessPolicyDaoImpl;
@@ -183,7 +192,11 @@ import com.cloud.network.dao.Site2SiteVpnGatewayDaoImpl;
 import com.cloud.network.dao.UserIpv6AddressDaoImpl;
 import com.cloud.network.dao.VirtualRouterProviderDaoImpl;
 import com.cloud.network.dao.VpnUserDaoImpl;
+import com.cloud.network.element.FirewallServiceProvider;
+import com.cloud.network.element.NetworkACLServiceProvider;
+import com.cloud.network.element.PortForwardingServiceProvider;
 import com.cloud.network.element.Site2SiteVpnServiceProvider;
+import com.cloud.network.element.VpcProvider;
 import com.cloud.network.firewall.FirewallManagerImpl;
 import com.cloud.network.lb.LoadBalancingRulesManagerImpl;
 import com.cloud.network.router.VpcVirtualNetworkApplianceManagerImpl;
@@ -234,7 +247,7 @@ import com.cloud.storage.VolumeApiService;
 import com.cloud.storage.dao.DiskOfferingDaoImpl;
 import com.cloud.storage.dao.GuestOSCategoryDaoImpl;
 import com.cloud.storage.dao.GuestOSDaoImpl;
-import com.cloud.storage.dao.LaunchPermissionDao;
+import com.cloud.storage.dao.LaunchPermissionDaoImpl;
 import com.cloud.storage.dao.SnapshotDaoImpl;
 import com.cloud.storage.dao.SnapshotPolicyDaoImpl;
 import com.cloud.storage.dao.StoragePoolDetailsDaoImpl;
@@ -271,10 +284,13 @@ import com.cloud.utils.db.Transaction;
 import com.cloud.utils.db.TransactionCallbackNoReturn;
 import com.cloud.utils.db.TransactionStatus;
 import com.cloud.vm.ItWorkDaoImpl;
+import com.cloud.vm.UserVmManagerImpl;
+import com.cloud.vm.VirtualMachineManagerImpl;
 import com.cloud.vm.dao.ConsoleProxyDaoImpl;
 import com.cloud.vm.dao.DomainRouterDaoImpl;
 import com.cloud.vm.dao.InstanceGroupDaoImpl;
 import com.cloud.vm.dao.InstanceGroupVMMapDaoImpl;
+import com.cloud.vm.dao.NicDaoImpl;
 import com.cloud.vm.dao.NicIpAliasDaoImpl;
 import com.cloud.vm.dao.NicSecondaryIpDaoImpl;
 import com.cloud.vm.dao.SecondaryStorageVmDaoImpl;
@@ -291,19 +307,19 @@ import com.cloud.vm.snapshot.dao.VMSnapshotDaoImpl;
     AsyncJobJournalDaoImpl.class, AsyncJobManagerImpl.class, AutoScalePolicyConditionMapDaoImpl.class,
AutoScalePolicyDaoImpl.class, AutoScaleVmGroupDaoImpl.class,
     AutoScaleVmGroupPolicyMapDaoImpl.class, AutoScaleVmProfileDaoImpl.class, CapacityDaoImpl.class,
ClusterDaoImpl.class, ClusterDetailsDaoImpl.class,
     ConditionDaoImpl.class, ConfigurationDaoImpl.class, ConfigurationManagerImpl.class, ConfigurationServerImpl.class,
ConsoleProxyDaoImpl.class,
-    ContrailElementImpl.class, ContrailGuru.class, ContrailManagerImpl.class, CounterDaoImpl.class,
DataCenterDaoImpl.class, DataCenterIpAddressDaoImpl.class,
+    ContrailElementImpl.class, ContrailGuru.class, ContrailManagerImpl.class, CounterDaoImpl.class,
DataCenterDaoImpl.class, DataCenterDetailsDaoImpl.class, DataCenterIpAddressDaoImpl.class,
     DataCenterJoinDaoImpl.class, DataCenterLinkLocalIpAddressDaoImpl.class, DataCenterVnetDaoImpl.class,
DcDetailsDaoImpl.class, DedicatedResourceDaoImpl.class,
     DiskOfferingDaoImpl.class, DiskOfferingJoinDaoImpl.class, DomainDaoImpl.class, DomainManagerImpl.class,
DomainRouterDaoImpl.class, DomainRouterJoinDaoImpl.class,
-    EventDaoImpl.class, EventJoinDaoImpl.class, EventUtils.class, EventUtils.class, FirewallManagerImpl.class,
FirewallRulesCidrsDaoImpl.class,
+    EventDaoImpl.class, EventJoinDaoImpl.class, EventUtils.class, ExtensionRegistry.class,
FirewallManagerImpl.class, FirewallRulesCidrsDaoImpl.class,
     FirewallRulesDaoImpl.class, GuestOSCategoryDaoImpl.class, GuestOSDaoImpl.class, HostDaoImpl.class,
HostDetailsDaoImpl.class, HostJoinDaoImpl.class,
     HostPodDaoImpl.class, HostTagsDaoImpl.class, HostTransferMapDaoImpl.class, HypervisorCapabilitiesDaoImpl.class,
HypervisorGuruManagerImpl.class,
  ImageStoreDaoImpl.class, ImageStoreJoinDaoImpl.class, InstanceGroupDaoImpl.class, InstanceGroupJoinDaoImpl.class,
-    InstanceGroupVMMapDaoImpl.class, IpAddressManagerImpl.class, Ipv6AddressManagerImpl.class,
ItWorkDaoImpl.class, LBHealthCheckPolicyDaoImpl.class,
-    LBStickinessPolicyDaoImpl.class, LaunchPermissionDao.class, LoadBalancerDaoImpl.class,
LoadBalancerVMMapDaoImpl.class, LoadBalancingRulesManagerImpl.class,
+    InstanceGroupVMMapDaoImpl.class, InternalLoadBalancerElement.class, IPAddressDaoImpl.class,
IpAddressManagerImpl.class, Ipv6AddressManagerImpl.class, ItWorkDaoImpl.class, LBHealthCheckPolicyDaoImpl.class,
+    LBStickinessPolicyDaoImpl.class, LaunchPermissionDaoImpl.class, LoadBalancerDaoImpl.class,
LoadBalancerVMMapDaoImpl.class, LoadBalancingRulesManagerImpl.class,
     ManagementServerHostDaoImpl.class, MockAccountManager.class, NetworkACLDaoImpl.class,
NetworkACLItemDaoImpl.class, NetworkACLManagerImpl.class,
-    NetworkAccountDaoImpl.class, NetworkDaoImpl.class, NetworkDomainDaoImpl.class, NetworkModelImpl.class,
NetworkOfferingDaoImpl.class,
-    NetworkOfferingDetailsDaoImpl.class, NetworkOfferingServiceMapDaoImpl.class, NetworkOpDaoImpl.class,
NetworkRuleConfigDaoImpl.class, NetworkServiceImpl.class,
-    NetworkServiceMapDaoImpl.class, NicIpAliasDaoImpl.class, NicSecondaryIpDaoImpl.class,
PhysicalNetworkDaoImpl.class, PhysicalNetworkServiceProviderDaoImpl.class,
+    NetworkAccountDaoImpl.class, NetworkDaoImpl.class, NetworkDomainDaoImpl.class, NetworkOfferingDaoImpl.class,
+    NetworkOfferingDetailsDaoImpl.class, NetworkOfferingServiceMapDaoImpl.class, NetworkOpDaoImpl.class,
NetworkOrchestrator.class, NetworkRuleConfigDaoImpl.class, NetworkServiceImpl.class,
+    NetworkServiceMapDaoImpl.class, NicDaoImpl.class, NicIpAliasDaoImpl.class, NicSecondaryIpDaoImpl.class,
PhysicalNetworkDaoImpl.class, PhysicalNetworkServiceProviderDaoImpl.class,
     PhysicalNetworkTrafficTypeDaoImpl.class, PlannerHostReservationDaoImpl.class, PodVlanDaoImpl.class,
PodVlanMapDaoImpl.class, PortForwardingRulesDaoImpl.class,
     PortableIpDaoImpl.class, PortableIpRangeDaoImpl.class, PrimaryDataStoreDaoImpl.class,
PrivateIpDaoImpl.class, ProjectAccountDaoImpl.class,
     ProjectAccountJoinDaoImpl.class, ProjectInvitationDaoImpl.class, ProjectDaoImpl.class,
ProjectInvitationJoinDaoImpl.class, ProjectJoinDaoImpl.class,
@@ -315,11 +331,11 @@ import com.cloud.vm.snapshot.dao.VMSnapshotDaoImpl;
     SnapshotDaoImpl.class, SnapshotPolicyDaoImpl.class, StaticRouteDaoImpl.class, StatsCollector.class,
StoragePoolDetailsDaoImpl.class, StoragePoolHostDaoImpl.class,
     StoragePoolJoinDaoImpl.class, SyncQueueItemDaoImpl.class, TemplateDataStoreDaoImpl.class,
TemplateJoinDaoImpl.class, UploadDaoImpl.class, UsageEventDaoImpl.class,
     UserAccountJoinDaoImpl.class, UserDaoImpl.class, UserIpv6AddressDaoImpl.class, UserStatisticsDaoImpl.class,
UserStatsLogDaoImpl.class,
-    UserVmCloneSettingDaoImpl.class, UserVmDaoImpl.class, UserVmDetailsDaoImpl.class, UserVmJoinDaoImpl.class,
VMInstanceDaoImpl.class, VMSnapshotDaoImpl.class,
-    VMTemplateDaoImpl.class, VMTemplateDetailsDaoImpl.class, VMTemplateHostDaoImpl.class,
VMTemplateZoneDaoImpl.class, VirtualRouterProviderDaoImpl.class,
+    UserVmCloneSettingDaoImpl.class, UserVmDaoImpl.class, UserVmDetailsDaoImpl.class, UserVmJoinDaoImpl.class,
UserVmManagerImpl.class, VMInstanceDaoImpl.class, VMSnapshotDaoImpl.class,
+    VMTemplateDaoImpl.class, VMTemplateDetailsDaoImpl.class, VMTemplateHostDaoImpl.class,
VMTemplateZoneDaoImpl.class, VirtualMachineManagerImpl.class, VirtualRouterProviderDaoImpl.class,
     VlanDaoImpl.class, VmDiskStatisticsDaoImpl.class, VmRulesetLogDaoImpl.class, VolumeDaoImpl.class,
VolumeHostDaoImpl.class, VolumeJoinDaoImpl.class, VpcDaoImpl.class,
     VpcGatewayDaoImpl.class, VpcManagerImpl.class, VpcOfferingDaoImpl.class, VpcOfferingServiceMapDaoImpl.class,
VpcServiceMapDaoImpl.class,
-    VpcVirtualNetworkApplianceManagerImpl.class, VpnUserDaoImpl.class}, includeFilters =
{@Filter(value = IntegrationTestConfiguration.ComponentFilter.class,
+    VpcVirtualNetworkApplianceManagerImpl.class, VpnUserDaoImpl.class, XenServerGuru.class},
includeFilters = {@Filter(value = IntegrationTestConfiguration.ComponentFilter.class,
                                                                                         
         type = FilterType.CUSTOM)}, useDefaultFilters = false)
 @Configuration
 public class IntegrationTestConfiguration {
@@ -711,5 +727,36 @@ public class IntegrationTestConfiguration {
     public VolumeOrchestrationService volumeOrchestrationService() {
         return Mockito.mock(VolumeOrchestrationService.class);
     }
-
+    @Bean
+    public FirewallServiceProvider firewallServiceProvider() {
+        return Mockito.mock(FirewallServiceProvider.class);
+    }
+    @Bean
+    public PortForwardingServiceProvider portForwardingServiceProvider() {
+        return Mockito.mock(PortForwardingServiceProvider.class);
+    }
+    @Bean
+    public NetworkACLServiceProvider networkACLServiceProvider() {
+        return Mockito.mock(NetworkACLServiceProvider.class);
+    }
+    @Bean
+    public VpcProvider vpcProvier() {
+        return Mockito.mock(VpcProvider.class);
+    }
+    @Bean
+    public VolumeService volumeService() {
+        return Mockito.mock(VolumeService.class);
+    }
+    @Bean
+    public PrimaryDataStoreProviderManager privateDataStoreProviderManager() {
+        return Mockito.mock(PrimaryDataStoreProviderManager.class);
+    }
+    @Bean
+    public ImageStoreProviderManager imageStoreProviderManager() {
+        return Mockito.mock(ImageStoreProviderManager.class);
+    }
+    @Bean
+    public DataStoreProvider dataStoreProvider() {
+        return Mockito.mock(DataStoreProvider.class);
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cc981250/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
index 2f81688..fa7be58 100644
--- a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
+++ b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
@@ -34,7 +34,6 @@ import org.apache.cloudstack.api.command.admin.user.RegisterCmd;
 import org.apache.cloudstack.api.command.admin.user.UpdateUserCmd;
 import org.apache.cloudstack.context.CallContext;
 
-import com.cloud.api.query.dao.AccountJoinDao;
 import com.cloud.api.query.vo.ControlledViewEntity;
 import com.cloud.configuration.ResourceLimit;
 import com.cloud.configuration.dao.ResourceCountDao;
@@ -69,8 +68,6 @@ public class MockAccountManager extends ManagerBase implements AccountManager
{
     ResourceCountDao _resourceCountDao;
 
     @Inject
-    AccountJoinDao _accountJoinDao;
-    @Inject
     UserDao _userDao;
 
     UserVO _systemUser;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cc981250/plugins/network-elements/juniper-contrail/test/resources/commonContext.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/test/resources/commonContext.xml b/plugins/network-elements/juniper-contrail/test/resources/commonContext.xml
index eef908f..6f46f6d 100644
--- a/plugins/network-elements/juniper-contrail/test/resources/commonContext.xml
+++ b/plugins/network-elements/juniper-contrail/test/resources/commonContext.xml
@@ -23,6 +23,7 @@
   <!-- <context:component-scan base-package="org.apache.cloudstack, com.cloud" />
-->
   <!-- @DB support -->
 
+  <bean id="componentContext" class="com.cloud.utils.component.ComponentContext"/>
   <bean id="transactionContextBuilder" class="com.cloud.utils.db.TransactionContextBuilder"
/>
   <bean id="actionEventInterceptor" class="com.cloud.event.ActionEventInterceptor" />
   <bean id="contrailEventInterceptor"
@@ -40,103 +41,52 @@
 
   <bean id="eventBus" class="org.apache.cloudstack.framework.messagebus.MessageBusBase"
/>
 
-  <bean id="eventDaoImpl" class="com.cloud.event.dao.EventDaoImpl" />
 
-  <bean id="actionEventUtils" class="com.cloud.event.ActionEventUtils" />
-  <bean id="usageEventDaoImpl" class="com.cloud.event.dao.UsageEventDaoImpl" />
-
-  <!--<bean id="eventUtils" class="com.cloud.event.EventUtils" /> -->
-
-  <bean id="accountDaoImpl" class="com.cloud.user.dao.AccountDaoImpl" />
-  <bean id="accountDetailsDaoImpl" class="com.cloud.user.AccountDetailsDaoImpl" />
-  <bean id="accountJoinDaoImpl" class="com.cloud.api.query.dao.AccountJoinDaoImpl" />
-  <bean id="accountVlanMapDaoImpl" class="com.cloud.dc.dao.AccountVlanMapDaoImpl" />
-  <bean id="launchPermissionDaoImpl" class="com.cloud.storage.dao.LaunchPermissionDaoImpl"
/>
-  <bean id="primaryDataStoreDaoImpl"
-    class="org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDaoImpl" />
-  <bean id="iPAddressDaoImpl" class="com.cloud.network.dao.IPAddressDaoImpl" />
-  <bean id="apiResponseHelper" class="com.cloud.api.ApiResponseHelper" />
-  <bean id="nicDaoImpl" class="com.cloud.vm.dao.NicDaoImpl" />
-
-  <bean id="componentContext" class="com.cloud.utils.component.ComponentContext" />
-
-  <bean id="IntegrationTestConfiguration"
-    class="org.apache.cloudstack.network.contrail.management.IntegrationTestConfiguration"
/>
-
-  <bean id="HypervisorGuru" class="com.cloud.hypervisor.XenServerGuru" />
-
-  <!-- Management traffic -->
-  <bean id="PodBasedNetworkGuru" class="com.cloud.network.guru.PodBasedNetworkGuru" />
-
-  <bean id="ControlNetworkGuru" class="com.cloud.network.guru.ControlNetworkGuru" />
-
-  <bean id="PublicNetworkGuru" class="com.cloud.network.guru.PublicNetworkGuru" />
-
-  <bean id="StorageNetworkGuru" class="com.cloud.network.guru.StorageNetworkGuru" />
-
-  <bean id="DirectNetworkGuru" class="com.cloud.network.guru.DirectNetworkGuru" />
-
-  <bean id="VpcVirtualRouterElement" class="com.cloud.network.element.VpcVirtualRouterElement"
/>
-
-  <bean id="VirtualRouterElement" class="com.cloud.network.element.VirtualRouterElement"
/>
-
-  <!-- <bean id="Ipv6AddressManager" class="com.cloud.network.Ipv6AddressManagerImpl"/>
-->
-
-
-  <bean id="com.cloud.network.security.SecurityGroupManager" class="com.cloud.network.security.SecurityGroupManagerImpl"
/>
-
-  <bean id="SecurityGroupElement" class="com.cloud.network.element.SecurityGroupElement"
/>
-
-  <bean id="InternalLbVm"
-    class="org.apache.cloudstack.network.element.InternalLoadBalancerElement">
-    <property name="name" value="InternalLbVm" />
+  <!-- registry definition -->
+  <bean id="networkGurusRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+  </bean>
+  <bean id="networkElementsRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
   </bean>
-  <!-- <bean id="UserAuthenticator" class="com.cloud.server.auth.PlainTextUserAuthenticator"/>

-    <bean id="ManagementServer" class="com.cloud.server.ManagementServerImpl"/> <bean

-    id="SecondaryStorageVmManager" class="com.cloud.storage.secondary.SecondaryStorageManagerImpl"/>

-    <bean id="PodAllocator" class="com.cloud.agent.manager.allocator.impl.UserConcentratedAllocator"/>
-->
-  <bean id="com.cloud.vm.UserVmManager" class="com.cloud.vm.UserVmManagerImpl" />
-
-  <bean id="com.cloud.vm.VirtualMachineManager" class="com.cloud.vm.VirtualMachineManagerImpl"
/>
-
-  <!-- <bean id="com.cloud.vm.dao.UserVmDao" class="com.cloud.vm.dao.UserVmDaoImpl"/>
-->
-  <bean id="ContrailElement"
-    class="org.apache.cloudstack.network.contrail.management.ContrailElementImpl" />
-
-  <bean id="ContrailGuru" class="org.apache.cloudstack.network.contrail.management.ContrailGuru"
/>
 
-  <bean id="networkElements" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="ContrailElement" />
-        <ref bean="VirtualRouterElement" />
-        <ref bean="SecurityGroupElement" />
-        <ref bean="VpcVirtualRouterElement" />
-        <ref bean="InternalLbVm" />
-      </list>
-    </property>
+  <bean id="ipDeployersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
   </bean>
 
-  <bean id="networkGurus" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="ContrailGuru" />
-        <ref bean="PublicNetworkGuru" />
-        <ref bean="PodBasedNetworkGuru" />
-        <ref bean="ControlNetworkGuru" />
-        <ref bean="StorageNetworkGuru" />
-      </list>
-    </property>
+  <bean id="dhcpProvidersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
   </bean>
 
+  <!-- registry -->
+  <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+    <property name="registry" ref="networkElementsRegistry" />
+    <property name="typeClass" value="com.cloud.network.element.NetworkElement" />
+  </bean>
 
-  <bean id="networkModelImpl" class="com.cloud.network.NetworkModelImpl">
-    <property name="NetworkElements" value="#{networkElements.Adapters}" />
+  <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+    <property name="registry" ref="networkGurusRegistry" />
+    <property name="typeClass" value="com.cloud.network.guru.NetworkGuru" />
+   </bean>
+ 
+  <!-- registry users -->
+  <bean id="NetworkModel" class="com.cloud.network.NetworkModelImpl">
+    <property name="networkElements" value="#{networkElementsRegistry.registered}" />
   </bean>
 
-  <bean id="networkOrchestrator" class="org.apache.cloudstack.engine.orchestration.NetworkOrchestrator">
-    <property name="NetworkElements" value="#{networkElements.Adapters}" />
-    <property name="NetworkGurus" value="#{networkGurus.Adapters}" />
+  <bean id="networkServiceImpl" class="com.cloud.network.NetworkServiceImpl">
+    <property name="networkGurus" value="#{networkGurusRegistry.registered}" />
   </bean>
 
-</beans>
+  <bean id="networkOrchestrator"
+        class="org.apache.cloudstack.engine.orchestration.NetworkOrchestrator">
+    <property name="networkGurus" value="#{networkGurusRegistry.registered}" />
+    <property name="networkElements" value="#{networkElementsRegistry.registered}" />
+    <property name="ipDeployers" value="#{ipDeployersRegistry.registered}" />
+    <property name="dhcpProviders" value="#{dhcpProvidersRegistry.registered}" />
+   </bean>
+
+  <bean id="IntegrationTestConfiguration"
+	class="org.apache.cloudstack.network.contrail.management.IntegrationTestConfiguration"/>
+
+  </beans>


Mime
View raw message