re-factor gre controller prototype

This commit is contained in:
tuna 2013-07-17 21:06:46 +07:00
parent 12a4d30007
commit 96188a3730
16 changed files with 1726 additions and 0 deletions

View File

@ -398,6 +398,8 @@ public class EventTypes {
public static final String EVENT_EXTERNAL_NVP_CONTROLLER_ADD = "PHYSICAL.NVPCONTROLLER.ADD";
public static final String EVENT_EXTERNAL_NVP_CONTROLLER_DELETE = "PHYSICAL.NVPCONTROLLER.DELETE";
public static final String EVENT_EXTERNAL_NVP_CONTROLLER_CONFIGURE = "PHYSICAL.NVPCONTROLLER.CONFIGURE";
public static final String EVENT_EXTERNAL_OVS_CONTROLLER_ADD = "PHYSICAL.OVSCONTROLLER.ADD";
public static final String EVENT_EXTERNAL_OVS_CONTROLLER_DELETE = "PHYSICAL.OVSCONTROLLER.DELETE";
// AutoScale
public static final String EVENT_COUNTER_CREATE = "COUNTER.CREATE";

View File

@ -409,6 +409,10 @@ public class ApiConstants {
public static final String VSWITCH_TYPE_PUBLIC_TRAFFIC = "publicvswitchtype";
public static final String VSWITCH_NAME_GUEST_TRAFFIC = "guestvswitchname";
public static final String VSWITCH_NAME_PUBLIC_TRAFFIC = "publicvswitchname";
// Ovs controller
public static final String OVS_DEVICE_ID = "ovsdeviceid";
public static final String OVS_DEVICE_NAME = "ovsdevicename";
public static final String EXTERNAL_SWITCH_MGMT_DEVICE_ID = "vsmdeviceid";
public static final String EXTERNAL_SWITCH_MGMT_DEVICE_NAME = "vsmdevicename";
public static final String EXTERNAL_SWITCH_MGMT_DEVICE_STATE = "vsmdevicestate";

View File

@ -0,0 +1,941 @@
<!--
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"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:annotation-config />
<!--=====================================================================================================-->
<!-- -->
<!-- core OSS/non-OSS Common components -->
<!-- -->
<!--=====================================================================================================-->
<!--
@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="instantiatePostProcessor" class="com.cloud.utils.component.ComponentInstantiationPostProcessor">
<property name="Interceptors">
<list>
<ref bean="transactionContextBuilder" />
<ref bean="actionEventInterceptor" />
</list>
</property>
</bean>
<!--
RPC/Async/EventBus
-->
<bean id="onwireRegistry" class="org.apache.cloudstack.framework.serializer.OnwireClassRegistry"
init-method="scan" >
<property name="packages">
<list>
<value>org.apache.cloudstack.framework</value>
</list>
</property>
</bean>
<bean id="messageSerializer" class="org.apache.cloudstack.framework.serializer.JsonMessageSerializer">
<property name="onwireClassRegistry" ref="onwireRegistry" />
</bean>
<bean id="transportProvider" class="org.apache.cloudstack.framework.server.ServerTransportProvider" init-method="initialize">
<property name="workerPoolSize" value="5" />
<property name="nodeId" value="Node1" />
<property name="messageSerializer" ref="messageSerializer" />
</bean>
<bean id="rpcProvider" class="org.apache.cloudstack.framework.rpc.RpcProviderImpl" init-method="initialize">
<constructor-arg ref="transportProvider" />
<property name="messageSerializer" ref="messageSerializer" />
</bean>
<bean id="messageBus" class = "org.apache.cloudstack.framework.messagebus.MessageBusBase" />
<bean id="configDepot" class = "org.apache.cloudstack.framework.config.impl.ConfigDepotImpl" />
<!--
DAO with customized configuration
-->
<bean id="serviceOfferingDaoImpl" class="com.cloud.service.dao.ServiceOfferingDaoImpl">
<property name="configParams">
<map>
<entry key="cache.size" value="50" />
<entry key="cache.time.to.live" value="600" />
</map>
</property>
</bean>
<bean id="diskOfferingDaoImpl" class="com.cloud.storage.dao.DiskOfferingDaoImpl">
<property name="configParams">
<map>
<entry key="cache.size" value="50" />
<entry key="cache.time.to.live" value="600" />
</map>
</property>
</bean>
<bean id="dataCenterDaoImpl" class="com.cloud.dc.dao.DataCenterDaoImpl">
<property name="configParams">
<map>
<entry key="cache.size" value="50" />
<entry key="cache.time.to.live" value="600" />
</map>
</property>
</bean>
<bean id="hostPodDaoImpl" class="com.cloud.dc.dao.HostPodDaoImpl">
<property name="configParams">
<map>
<entry key="cache.size" value="50" />
<entry key="cache.time.to.live" value="600" />
</map>
</property>
</bean>
<bean id="vlanDaoImpl" class="com.cloud.dc.dao.VlanDaoImpl">
<property name="configParams">
<map>
<entry key="cache.size" value="30" />
<entry key="cache.time.to.live" value="3600" />
</map>
</property>
</bean>
<bean id="userDaoImpl" class="com.cloud.user.dao.UserDaoImpl">
<property name="configParams">
<map>
<entry key="cache.size" value="5000" />
<entry key="cache.time.to.live" value="300" />
</map>
</property>
</bean>
<bean id="VMTemplateDaoImpl" class="com.cloud.storage.dao.VMTemplateDaoImpl">
<property name="configParams">
<map>
<entry key="cache.size" value="100" />
<entry key="cache.time.to.live" value="600" />
</map>
</property>
</bean>
<bean id="hypervisorCapabilitiesDaoImpl" class="com.cloud.hypervisor.dao.HypervisorCapabilitiesDaoImpl">
<property name="configParams">
<map>
<entry key="cache.size" value="100" />
<entry key="cache.time.to.live" value="600" />
</map>
</property>
</bean>
<bean id="dedicatedResourceDaoImpl" class="com.cloud.dc.dao.DedicatedResourceDaoImpl">
<property name="configParams">
<map>
<entry key="cache.size" value="30" />
<entry key="cache.time.to.live" value="3600" />
</map>
</property>
</bean>
<!--
DAOs with default configuration
-->
<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="accountGuestVlanMapDaoImpl" class="com.cloud.network.dao.AccountGuestVlanMapDaoImpl" />
<bean id="accountVlanMapDaoImpl" class="com.cloud.dc.dao.AccountVlanMapDaoImpl" />
<bean id="alertDaoImpl" class="com.cloud.alert.dao.AlertDaoImpl" />
<bean id="asyncJobJoinDaoImpl" class="com.cloud.api.query.dao.AsyncJobJoinDaoImpl" />
<bean id="autoScalePolicyConditionMapDaoImpl" class="com.cloud.network.as.dao.AutoScalePolicyConditionMapDaoImpl" />
<bean id="autoScalePolicyDaoImpl" class="com.cloud.network.as.dao.AutoScalePolicyDaoImpl" />
<bean id="autoScaleVmGroupDaoImpl" class="com.cloud.network.as.dao.AutoScaleVmGroupDaoImpl" />
<bean id="autoScaleVmGroupPolicyMapDaoImpl" class="com.cloud.network.as.dao.AutoScaleVmGroupPolicyMapDaoImpl" />
<bean id="autoScaleVmProfileDaoImpl" class="com.cloud.network.as.dao.AutoScaleVmProfileDaoImpl" />
<bean id="capacityDaoImpl" class="com.cloud.capacity.dao.CapacityDaoImpl" />
<bean id="certificateDaoImpl" class="com.cloud.certificate.dao.CertificateDaoImpl" />
<bean id="clusterDaoImpl" class="com.cloud.dc.dao.ClusterDaoImpl" />
<bean id="clusterDetailsDaoImpl" class="com.cloud.dc.ClusterDetailsDaoImpl" />
<bean id="clusterVSMMapDaoImpl" class="com.cloud.dc.dao.ClusterVSMMapDaoImpl" />
<bean id="commandExecLogDaoImpl" class="com.cloud.secstorage.CommandExecLogDaoImpl" />
<bean id="conditionDaoImpl" class="com.cloud.network.as.dao.ConditionDaoImpl" />
<bean id="consoleProxyDaoImpl" class="com.cloud.vm.dao.ConsoleProxyDaoImpl" />
<bean id="counterDaoImpl" class="com.cloud.network.as.dao.CounterDaoImpl" />
<bean id="dataCenterIpAddressDaoImpl" class="com.cloud.dc.dao.DataCenterIpAddressDaoImpl" />
<bean id="dataCenterJoinDaoImpl" class="com.cloud.api.query.dao.DataCenterJoinDaoImpl" />
<bean id="dataCenterLinkLocalIpAddressDaoImpl" class="com.cloud.dc.dao.DataCenterLinkLocalIpAddressDaoImpl" />
<bean id="dataCenterVnetDaoImpl" class="com.cloud.dc.dao.DataCenterVnetDaoImpl" />
<bean id="dcDetailsDaoImpl" class="com.cloud.dc.dao.DcDetailsDaoImpl" />
<bean id="engineDcDetailsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.DcDetailsDaoImpl" />
<bean id="diskOfferingJoinDaoImpl" class="com.cloud.api.query.dao.DiskOfferingJoinDaoImpl" />
<bean id="domainDaoImpl" class="com.cloud.domain.dao.DomainDaoImpl" />
<bean id="domainRouterDaoImpl" class="com.cloud.vm.dao.DomainRouterDaoImpl" />
<bean id="domainRouterJoinDaoImpl" class="com.cloud.api.query.dao.DomainRouterJoinDaoImpl" />
<bean id="elasticLbVmMapDaoImpl" class="com.cloud.network.lb.dao.ElasticLbVmMapDaoImpl" />
<bean id="engineClusterDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineClusterDaoImpl" />
<bean id="engineDataCenterDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineDataCenterDaoImpl" />
<bean id="engineHostDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostDaoImpl" />
<bean id="engineHostPodDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostPodDaoImpl" />
<bean id="eventDaoImpl" class="com.cloud.event.dao.EventDaoImpl" />
<bean id="eventJoinDaoImpl" class="com.cloud.event.dao.EventJoinDaoImpl" />
<bean id="externalFirewallDeviceDaoImpl" class="com.cloud.network.dao.ExternalFirewallDeviceDaoImpl" />
<bean id="externalLoadBalancerDeviceDaoImpl" class="com.cloud.network.dao.ExternalLoadBalancerDeviceDaoImpl" />
<bean id="externalPublicIpStatisticsDaoImpl" class="com.cloud.usage.dao.ExternalPublicIpStatisticsDaoImpl" />
<bean id="firewallRulesCidrsDaoImpl" class="com.cloud.network.dao.FirewallRulesCidrsDaoImpl" />
<bean id="firewallRulesDaoImpl" class="com.cloud.network.dao.FirewallRulesDaoImpl" />
<bean id="globalLoadBalancerDaoImpl" class="org.apache.cloudstack.region.gslb.GlobalLoadBalancerDaoImpl" />
<bean id="globalLoadBalancerLbRuleMapDaoImpl" class="org.apache.cloudstack.region.gslb.GlobalLoadBalancerLbRuleMapDaoImpl" />
<bean id="guestOSCategoryDaoImpl" class="com.cloud.storage.dao.GuestOSCategoryDaoImpl" />
<bean id="guestOSDaoImpl" class="com.cloud.storage.dao.GuestOSDaoImpl" />
<bean id="guestOSHypervisorDaoImpl" class="com.cloud.storage.dao.GuestOSHypervisorDaoImpl" />
<bean id="highAvailabilityDaoImpl" class="com.cloud.ha.dao.HighAvailabilityDaoImpl" />
<bean id="hostDaoImpl" class="com.cloud.host.dao.HostDaoImpl" />
<bean id="engineHostDetailsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.HostDetailsDaoImpl" />
<bean id="hostDetailsDaoImpl" class="com.cloud.host.dao.HostDetailsDaoImpl" />
<bean id="hostJoinDaoImpl" class="com.cloud.api.query.dao.HostJoinDaoImpl" />
<bean id="engineHostTagsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.HostTagsDaoImpl" />
<bean id="hostTagsDaoImpl" class="com.cloud.host.dao.HostTagsDaoImpl" />
<bean id="hostTransferMapDaoImpl" class="com.cloud.cluster.agentlb.dao.HostTransferMapDaoImpl" />
<bean id="iPAddressDaoImpl" class="com.cloud.network.dao.IPAddressDaoImpl" />
<bean id="identityDaoImpl" class="com.cloud.uuididentity.dao.IdentityDaoImpl" />
<bean id="imageStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageStoreDaoImpl" />
<bean id="imageStoreDetailsDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageStoreDetailsDaoImpl" />
<bean id="imageStoreJoinDaoImpl" class="com.cloud.api.query.dao.ImageStoreJoinDaoImpl" />
<bean id="snapshotDataStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.SnapshotDataStoreDaoImpl" />
<bean id="templateDataStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl" />
<bean id="templateJoinDaoImpl" class="com.cloud.api.query.dao.TemplateJoinDaoImpl" />
<bean id="volumeDataStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.VolumeDataStoreDaoImpl" />
<bean id="inlineLoadBalancerNicMapDaoImpl" class="com.cloud.network.dao.InlineLoadBalancerNicMapDaoImpl" />
<bean id="instanceGroupDaoImpl" class="com.cloud.vm.dao.InstanceGroupDaoImpl" />
<bean id="instanceGroupJoinDaoImpl" class="com.cloud.api.query.dao.InstanceGroupJoinDaoImpl" />
<bean id="instanceGroupVMMapDaoImpl" class="com.cloud.vm.dao.InstanceGroupVMMapDaoImpl" />
<bean id="itWorkDaoImpl" class="com.cloud.vm.ItWorkDaoImpl" />
<bean id="keystoreDaoImpl" class="com.cloud.keystore.KeystoreDaoImpl" />
<bean id="lBHealthCheckPolicyDaoImpl" class="com.cloud.network.dao.LBHealthCheckPolicyDaoImpl" />
<bean id="lBStickinessPolicyDaoImpl" class="com.cloud.network.dao.LBStickinessPolicyDaoImpl" />
<bean id="launchPermissionDaoImpl" class="com.cloud.storage.dao.LaunchPermissionDaoImpl" />
<bean id="loadBalancerDaoImpl" class="com.cloud.network.dao.LoadBalancerDaoImpl" />
<bean id="loadBalancerVMMapDaoImpl" class="com.cloud.network.dao.LoadBalancerVMMapDaoImpl" />
<bean id="managementServerHostDaoImpl" class="com.cloud.cluster.dao.ManagementServerHostDaoImpl" />
<bean id="managementServerHostPeerDaoImpl" class="com.cloud.cluster.dao.ManagementServerHostPeerDaoImpl" />
<bean id="networkAccountDaoImpl" class="com.cloud.network.dao.NetworkAccountDaoImpl" />
<bean id="networkACLDaoImpl" class="com.cloud.network.vpc.dao.NetworkACLDaoImpl" />
<bean id="networkACLItemDaoImpl" class="com.cloud.network.vpc.dao.NetworkACLItemDaoImpl" />
<bean id="networkDaoImpl" class="com.cloud.network.dao.NetworkDaoImpl" />
<bean id="networkDomainDaoImpl" class="com.cloud.network.dao.NetworkDomainDaoImpl" />
<bean id="networkExternalFirewallDaoImpl" class="com.cloud.network.dao.NetworkExternalFirewallDaoImpl" />
<bean id="networkExternalLoadBalancerDaoImpl" class="com.cloud.network.dao.NetworkExternalLoadBalancerDaoImpl" />
<bean id="networkOfferingDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingDaoImpl" />
<bean id="networkOfferingServiceMapDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingServiceMapDaoImpl" />
<bean id="networkOpDaoImpl" class="com.cloud.network.dao.NetworkOpDaoImpl" />
<bean id="networkRuleConfigDaoImpl" class="com.cloud.network.dao.NetworkRuleConfigDaoImpl" />
<bean id="networkServiceMapDaoImpl" class="com.cloud.network.dao.NetworkServiceMapDaoImpl" />
<bean id="nicDaoImpl" class="com.cloud.vm.dao.NicDaoImpl" />
<bean id="nicDetailDaoImpl" class="com.cloud.vm.dao.NicDetailDaoImpl" />
<bean id="nicSecondaryIpDaoImpl" class="com.cloud.vm.dao.NicSecondaryIpDaoImpl" />
<bean id="nicIpAliasDaoImpl" class="com.cloud.vm.dao.NicIpAliasDaoImpl" />
<bean id="objectInDataStoreDaoImpl" class="org.apache.cloudstack.storage.db.ObjectInDataStoreDaoImpl" />
<bean id="ovsTunnelInterfaceDaoImpl" class="com.cloud.network.ovs.dao.OvsTunnelInterfaceDaoImpl" />
<bean id="ovsTunnelNetworkDaoImpl" class="com.cloud.network.ovs.dao.OvsTunnelNetworkDaoImpl" />
<bean id="ovsDeviceDaoImpl" class="com.cloud.network.ovs.dao.OvsDeviceDaoImpl" />
<bean id="ovsNicMappingDaoImpl" class="com.cloud.network.ovs.dao.OvsNicMappingDaoImpl" />
<bean id="physicalNetworkDaoImpl" class="com.cloud.network.dao.PhysicalNetworkDaoImpl" />
<bean id="physicalNetworkIsolationMethodDaoImpl" class="com.cloud.network.dao.PhysicalNetworkIsolationMethodDaoImpl" />
<bean id="physicalNetworkServiceProviderDaoImpl" class="com.cloud.network.dao.PhysicalNetworkServiceProviderDaoImpl" />
<bean id="physicalNetworkTagDaoImpl" class="com.cloud.network.dao.PhysicalNetworkTagDaoImpl" />
<bean id="physicalNetworkTrafficTypeDaoImpl" class="com.cloud.network.dao.PhysicalNetworkTrafficTypeDaoImpl" />
<bean id="podVlanDaoImpl" class="com.cloud.dc.dao.PodVlanDaoImpl" />
<bean id="podVlanMapDaoImpl" class="com.cloud.dc.dao.PodVlanMapDaoImpl" />
<bean id="PortableIpDaoImpl" class="org.apache.cloudstack.region.PortableIpDaoImpl" />
<bean id="PortableIpRangeDaoImpl" class="org.apache.cloudstack.region.PortableIpRangeDaoImpl" />
<bean id="portForwardingRulesDaoImpl" class="com.cloud.network.rules.dao.PortForwardingRulesDaoImpl" />
<bean id="portProfileDaoImpl" class="com.cloud.network.dao.PortProfileDaoImpl" />
<bean id="primaryDataStoreDaoImpl" class="org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDaoImpl" />
<bean id="primaryDataStoreDetailsDaoImpl" class="org.apache.cloudstack.storage.volume.db.PrimaryDataStoreDetailsDaoImpl" />
<bean id="privateIpDaoImpl" class="com.cloud.network.vpc.dao.PrivateIpDaoImpl" />
<bean id="projectAccountDaoImpl" class="com.cloud.projects.dao.ProjectAccountDaoImpl" />
<bean id="projectAccountJoinDaoImpl" class="com.cloud.api.query.dao.ProjectAccountJoinDaoImpl" />
<bean id="projectDaoImpl" class="com.cloud.projects.dao.ProjectDaoImpl" />
<bean id="projectInvitationDaoImpl" class="com.cloud.projects.dao.ProjectInvitationDaoImpl" />
<bean id="projectInvitationJoinDaoImpl" class="com.cloud.api.query.dao.ProjectInvitationJoinDaoImpl" />
<bean id="projectJoinDaoImpl" class="com.cloud.api.query.dao.ProjectJoinDaoImpl" />
<bean id="regionDaoImpl" class="org.apache.cloudstack.region.dao.RegionDaoImpl" />
<bean id="remoteAccessVpnDaoImpl" class="com.cloud.network.dao.RemoteAccessVpnDaoImpl" />
<bean id="resourceCountDaoImpl" class="com.cloud.configuration.dao.ResourceCountDaoImpl" />
<bean id="resourceLimitDaoImpl" class="com.cloud.configuration.dao.ResourceLimitDaoImpl" />
<bean id="resourceTagJoinDaoImpl" class="com.cloud.api.query.dao.ResourceTagJoinDaoImpl" />
<bean id="resourceTagsDaoImpl" class="com.cloud.tags.dao.ResourceTagsDaoImpl" />
<bean id="routerNetworkDaoImpl" class="com.cloud.network.dao.RouterNetworkDaoImpl" />
<bean id="sSHKeyPairDaoImpl" class="com.cloud.user.dao.SSHKeyPairDaoImpl" />
<bean id="secondaryStorageVmDaoImpl" class="com.cloud.vm.dao.SecondaryStorageVmDaoImpl" />
<bean id="securityGroupDaoImpl" class="com.cloud.network.security.dao.SecurityGroupDaoImpl" />
<bean id="securityGroupJoinDaoImpl" class="com.cloud.api.query.dao.SecurityGroupJoinDaoImpl" />
<bean id="securityGroupRuleDaoImpl" class="com.cloud.network.security.dao.SecurityGroupRuleDaoImpl" />
<bean id="securityGroupRulesDaoImpl" class="com.cloud.network.security.dao.SecurityGroupRulesDaoImpl" />
<bean id="securityGroupVMMapDaoImpl" class="com.cloud.network.security.dao.SecurityGroupVMMapDaoImpl" />
<bean id="securityGroupWorkDaoImpl" class="com.cloud.network.security.dao.SecurityGroupWorkDaoImpl" />
<bean id="serviceOfferingJoinDaoImpl" class="com.cloud.api.query.dao.ServiceOfferingJoinDaoImpl" />
<bean id="site2SiteCustomerGatewayDaoImpl" class="com.cloud.network.dao.Site2SiteCustomerGatewayDaoImpl" />
<bean id="site2SiteVpnConnectionDaoImpl" class="com.cloud.network.dao.Site2SiteVpnConnectionDaoImpl" />
<bean id="site2SiteVpnGatewayDaoImpl" class="com.cloud.network.dao.Site2SiteVpnGatewayDaoImpl" />
<bean id="snapshotDaoImpl" class="com.cloud.storage.dao.SnapshotDaoImpl" />
<bean id="snapshotPolicyDaoImpl" class="com.cloud.storage.dao.SnapshotPolicyDaoImpl" />
<bean id="snapshotScheduleDaoImpl" class="com.cloud.storage.dao.SnapshotScheduleDaoImpl" />
<bean id="staticRouteDaoImpl" class="com.cloud.network.vpc.dao.StaticRouteDaoImpl" />
<bean id="storageNetworkIpAddressDaoImpl" class="com.cloud.dc.dao.StorageNetworkIpAddressDaoImpl" />
<bean id="storageNetworkIpRangeDaoImpl" class="com.cloud.dc.dao.StorageNetworkIpRangeDaoImpl" />
<bean id="storagePoolDetailsDaoImpl" class="com.cloud.storage.dao.StoragePoolDetailsDaoImpl" />
<bean id="storagePoolHostDaoImpl" class="com.cloud.storage.dao.StoragePoolHostDaoImpl" />
<bean id="storagePoolJoinDaoImpl" class="com.cloud.api.query.dao.StoragePoolJoinDaoImpl" />
<bean id="storagePoolWorkDaoImpl" class="com.cloud.storage.dao.StoragePoolWorkDaoImpl" />
<bean id="templatePrimaryDataStoreDaoImpl" class="org.apache.cloudstack.storage.volume.db.TemplatePrimaryDataStoreDaoImpl" />
<bean id="uploadDaoImpl" class="com.cloud.storage.dao.UploadDaoImpl" />
<bean id="usageDaoImpl" class="com.cloud.usage.dao.UsageDaoImpl" />
<bean id="usageEventDaoImpl" class="com.cloud.event.dao.UsageEventDaoImpl" />
<bean id="usageIPAddressDaoImpl" class="com.cloud.usage.dao.UsageIPAddressDaoImpl" />
<bean id="usageJobDaoImpl" class="com.cloud.usage.dao.UsageJobDaoImpl" />
<bean id="usageLoadBalancerPolicyDaoImpl" class="com.cloud.usage.dao.UsageLoadBalancerPolicyDaoImpl" />
<bean id="usageNetworkDaoImpl" class="com.cloud.usage.dao.UsageNetworkDaoImpl" />
<bean id="usageNetworkOfferingDaoImpl" class="com.cloud.usage.dao.UsageNetworkOfferingDaoImpl" />
<bean id="usagePortForwardingRuleDaoImpl" class="com.cloud.usage.dao.UsagePortForwardingRuleDaoImpl" />
<bean id="usageSecurityGroupDaoImpl" class="com.cloud.usage.dao.UsageSecurityGroupDaoImpl" />
<bean id="usageStorageDaoImpl" class="com.cloud.usage.dao.UsageStorageDaoImpl" />
<bean id="usageVMInstanceDaoImpl" class="com.cloud.usage.dao.UsageVMInstanceDaoImpl" />
<bean id="usageVPNUserDaoImpl" class="com.cloud.usage.dao.UsageVPNUserDaoImpl" />
<bean id="usageVolumeDaoImpl" class="com.cloud.usage.dao.UsageVolumeDaoImpl" />
<bean id="usageVmDiskDaoImpl" class="com.cloud.usage.dao.UsageVmDiskDaoImpl" />
<bean id="userAccountDaoImpl" class="com.cloud.user.dao.UserAccountDaoImpl" />
<bean id="userAccountJoinDaoImpl" class="com.cloud.api.query.dao.UserAccountJoinDaoImpl" />
<bean id="userIpv6AddressDaoImpl" class="com.cloud.network.dao.UserIpv6AddressDaoImpl" />
<bean id="userStatisticsDaoImpl" class="com.cloud.user.dao.UserStatisticsDaoImpl" />
<bean id="userStatsLogDaoImpl" class="com.cloud.user.dao.UserStatsLogDaoImpl" />
<bean id="userVmDiskStatsDaoImpl" class="com.cloud.user.dao.VmDiskStatisticsDaoImpl" />
<bean id="userVmCloneSettingDaoImpl" class="com.cloud.vm.dao.UserVmCloneSettingDaoImpl" />
<bean id="userVmDaoImpl" class="com.cloud.vm.dao.UserVmDaoImpl" />
<bean id="userVmDetailsDaoImpl" class="com.cloud.vm.dao.UserVmDetailsDaoImpl" />
<bean id="userVmJoinDaoImpl" class="com.cloud.api.query.dao.UserVmJoinDaoImpl" />
<bean id="vMComputeTagDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMComputeTagDaoImpl" />
<bean id="vMEntityDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMEntityDaoImpl" />
<bean id="vMInstanceDaoImpl" class="com.cloud.vm.dao.VMInstanceDaoImpl" />
<bean id="vMNetworkMapDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMNetworkMapDaoImpl" />
<bean id="vMReservationDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMReservationDaoImpl" />
<bean id="vMRootDiskTagDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMRootDiskTagDaoImpl" />
<bean id="vMSnapshotDaoImpl" class="com.cloud.vm.snapshot.dao.VMSnapshotDaoImpl" />
<bean id="vMTemplateDetailsDaoImpl" class="com.cloud.storage.dao.VMTemplateDetailsDaoImpl" />
<bean id="vMTemplateHostDaoImpl" class="com.cloud.storage.dao.VMTemplateHostDaoImpl" />
<bean id="vMTemplatePoolDaoImpl" class="com.cloud.storage.dao.VMTemplatePoolDaoImpl" />
<bean id="vMTemplateZoneDaoImpl" class="com.cloud.storage.dao.VMTemplateZoneDaoImpl" />
<bean id="versionDaoImpl" class="com.cloud.upgrade.dao.VersionDaoImpl" />
<bean id="virtualRouterProviderDaoImpl" class="com.cloud.network.dao.VirtualRouterProviderDaoImpl" />
<bean id="vmRulesetLogDaoImpl" class="com.cloud.network.security.dao.VmRulesetLogDaoImpl" />
<bean id="volumeDaoImpl" class="com.cloud.storage.dao.VolumeDaoImpl" />
<bean id="volumeDetailsDaoImpl" class="com.cloud.storage.dao.VolumeDetailsDaoImpl" />
<bean id="volumeHostDaoImpl" class="com.cloud.storage.dao.VolumeHostDaoImpl" />
<bean id="volumeJoinDaoImpl" class="com.cloud.api.query.dao.VolumeJoinDaoImpl" />
<bean id="volumeReservationDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VolumeReservationDaoImpl" />
<bean id="vpcDaoImpl" class="com.cloud.network.vpc.dao.VpcDaoImpl" />
<bean id="vpcGatewayDaoImpl" class="com.cloud.network.vpc.dao.VpcGatewayDaoImpl" />
<bean id="vpcOfferingDaoImpl" class="com.cloud.network.vpc.dao.VpcOfferingDaoImpl" />
<bean id="vpcOfferingServiceMapDaoImpl" class="com.cloud.network.vpc.dao.VpcOfferingServiceMapDaoImpl" />
<bean id="vpcServiceMapDaoImpl" class="com.cloud.network.vpc.dao.VpcServiceMapDaoImpl" />
<bean id="vpnUserDaoImpl" class="com.cloud.network.dao.VpnUserDaoImpl" />
<bean id="applicationLbRuleDaoImpl" class="org.apache.cloudstack.lb.dao.ApplicationLoadBalancerRuleDaoImpl" />
<bean id="networkOfferingDetailsDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingDetailsDaoImpl" />
<bean id="serviceOfferingDetailsDaoImpl" class="com.cloud.service.dao.ServiceOfferingDetailsDaoImpl"/>
<!--
Checkers
-->
<bean id="encryptionSecretKeyChecker" class="com.cloud.utils.crypt.EncryptionSecretKeyChecker" />
<bean id="StaticRoleBasedAPIAccessChecker" class="org.apache.cloudstack.acl.StaticRoleBasedAPIAccessChecker"/>
<bean id="databaseIntegrityChecker" class="com.cloud.upgrade.DatabaseIntegrityChecker" />
<bean id="domainChecker" class="com.cloud.acl.DomainChecker" />
<bean id="affinityGroupAccessChecker" class="com.cloud.acl.AffinityGroupAccessChecker" />
<!--
Authenticators
-->
<bean id="basicAgentAuthManager" class="com.cloud.agent.manager.authn.impl.BasicAgentAuthManager">
<property name="name" value="BASIC"/>
</bean>
<bean id="MD5UserAuthenticator" class="com.cloud.server.auth.MD5UserAuthenticator">
<property name="name" value="MD5"/>
</bean>
<bean id="LdapAuthenticator" class="org.apache.cloudstack.ldap.LdapAuthenticator">
<property name="name" value="LDAP"/>
</bean>
<bean id="SHA256SaltedUserAuthenticator" class="com.cloud.server.auth.SHA256SaltedUserAuthenticator">
<property name="name" value="SHA256SALT"/>
</bean>
<bean id="PlainTextUserAuthenticator" class="com.cloud.server.auth.PlainTextUserAuthenticator">
<property name="name" value="PLAINTEXT"/>
</bean>
<bean id="LdapManager" class="org.apache.cloudstack.ldap.LdapManagerImpl" />
<bean id="LdapUserManager" class="org.apache.cloudstack.ldap.LdapUserManager" />
<bean id="LdapContextFactory" class="org.apache.cloudstack.ldap.LdapContextFactory" />
<bean id="LdapConfigurationDao" class="org.apache.cloudstack.ldap.dao.LdapConfigurationDaoImpl" />
<bean id="LdapConfiguration" class="org.apache.cloudstack.ldap.LdapConfiguration" />
<!--
Network Elements
-->
<bean id="Ovs" class="com.cloud.network.element.OvsElement">
<property name="name" value="Ovs"/>
</bean>
<bean id="SecurityGroupProvider" class="com.cloud.network.element.SecurityGroupElement">
<property name="name" value="SecurityGroupProvider"/>
</bean>
<bean id="VirtualRouter" class="com.cloud.network.element.VirtualRouterElement">
<property name="name" value="VirtualRouter"/>
</bean>
<bean id="VpcVirtualRouter" class="com.cloud.network.element.VpcVirtualRouterElement">
<property name="name" value="VpcVirtualRouter"/>
</bean>
<bean id="elasticLoadBalancerElement" class="com.cloud.network.element.ElasticLoadBalancerElement">
<property name="name" value="ElasticLoadBalancerElement"/>
</bean>
<bean id="InternalLbVm" class="org.apache.cloudstack.network.element.InternalLoadBalancerElement">
<property name="name" value="InternalLbVm"/>
</bean>
<!--
General allocators
-->
<bean id="firstFitAllocator" class="com.cloud.agent.manager.allocator.impl.FirstFitAllocator" />
<bean id="randomAllocator" class="com.cloud.agent.manager.allocator.impl.RandomAllocator" />
<!--
Host Allocators
-->
<bean id="FirstFitRouting" class="com.cloud.agent.manager.allocator.impl.FirstFitRoutingAllocator">
<property name="name" value="FirstFitRouting"/>
</bean>
<!--
Storage pool allocators
-->
<bean id="LocalStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.LocalStoragePoolAllocator">
<property name="name" value="LocalStorage"/>
</bean>
<bean id="clusterScopeStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.ClusterScopeStoragePoolAllocator" />
<bean id="zoneWideStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.ZoneWideStoragePoolAllocator" />
<bean id="garbageCollectingStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.GarbageCollectingStoragePoolAllocator">
<property name="name" value="GCStorage"/>
</bean>
<bean id="UserConcentratedAllocator" class="com.cloud.agent.manager.allocator.impl.UserConcentratedAllocator">
<property name="name" value="UserFirst"/>
</bean>
<bean id="recreatableFencer" class="com.cloud.ha.RecreatableFencer" />
<bean id="recreateHostAllocator" class="com.cloud.agent.manager.allocator.impl.RecreateHostAllocator" />
<bean id="secondaryStorageVmDefaultAllocator" class="com.cloud.storage.secondary.SecondaryStorageVmDefaultAllocator" />
<!--
Misc allocator & Adapters
-->
<bean id="ConsoleProxyAllocator" class="com.cloud.consoleproxy.ConsoleProxyBalanceAllocator">
<property name="name" value="Balance"/>
</bean>
<bean id="ExternalIpAddressAllocator" class="com.cloud.network.ExternalIpAddressAllocator">
<property name="name" value="Basic"/>
</bean>
<bean id="hypervisorTemplateAdapter" class="com.cloud.template.HypervisorTemplateAdapter" />
<bean id="clusterAlertAdapter" class="com.cloud.alert.ClusterAlertAdapter" />
<bean id="consoleProxyAlertAdapter" class="com.cloud.alert.ConsoleProxyAlertAdapter" />
<bean id="secondaryStorageVmAlertAdapter" class="com.cloud.alert.SecondaryStorageVmAlertAdapter" />
<bean id="clusterServiceServletAdapter" class="com.cloud.cluster.ClusterServiceServletAdapter" />
<!--
Investigators
-->
<bean id="CheckOnAgentInvestigator" class="com.cloud.ha.CheckOnAgentInvestigator">
<property name="name" value="SimpleInvestigator"/>
</bean>
<bean id="XenServerInvestigator" class="com.cloud.ha.XenServerInvestigator">
<property name="name" value="XenServerInvestigator"/>
</bean>
<bean id="KVMInvestigator" class="com.cloud.ha.KVMInvestigator">
<property name="name" value="KVMInvestigator"/>
</bean>
<bean id="UserVmDomRInvestigator" class="com.cloud.ha.UserVmDomRInvestigator">
<property name="name" value="PingInvestigator"/>
</bean>
<bean id="ManagementIPSystemVMInvestigator" class="com.cloud.ha.ManagementIPSystemVMInvestigator">
<property name="name" value="ManagementIPSysVMInvestigator"/>
</bean>
<!--
Fencers
-->
<bean id="XenServerFencer" class="com.cloud.ha.XenServerFencer">
<property name="name" value="XenServerFenceBuilder"/>
</bean>
<bean id="KVMFencer" class="com.cloud.ha.KVMFencer">
<property name="name" value="KVMFenceBuilder"/>
</bean>
<bean id="OvmFencer" class="com.cloud.ovm.hypervisor.OvmFencer">
<property name="name" value="OvmFenceBuilder"/>
</bean>
<!--
Discovers
-->
<bean id="XcpServerDiscoverer" class="com.cloud.hypervisor.xen.discoverer.XcpServerDiscoverer">
<property name="name" value="XCP Agent"/>
</bean>
<bean id="SecondaryStorageDiscoverer" class="org.apache.cloudstack.storage.resource.SecondaryStorageDiscoverer">
<property name="name" value="SecondaryStorage"/>
</bean>
<bean id="KvmServerDiscoverer" class="com.cloud.hypervisor.kvm.discoverer.KvmServerDiscoverer">
<property name="name" value="KVM Agent"/>
</bean>
<bean id="LxcServerDiscoverer" class="com.cloud.hypervisor.kvm.discoverer.LxcServerDiscoverer">
<property name="name" value="Lxc Discover"/>
</bean>
<bean id="OvmDiscoverer" class="com.cloud.ovm.hypervisor.OvmDiscoverer">
<property name="name" value="Ovm Discover"/>
</bean>
<bean id="dummyHostDiscoverer" class="com.cloud.resource.DummyHostDiscoverer">
<property name="name" value="dummyHostDiscoverer" />
</bean>
<!--
Deployment planners
-->
<bean id="UserDispersingPlanner" class="com.cloud.deploy.UserDispersingPlanner">
<property name="name" value="UserDispersingPlanner"/>
</bean>
<bean id="UserConcentratedPodPlanner" class="com.cloud.deploy.UserConcentratedPodPlanner">
<property name="name" value="UserConcentratedPodPlanner"/>
</bean>
<bean id="ImplicitDedicationPlanner" class="com.cloud.deploy.ImplicitDedicationPlanner">
<property name="name" value="ImplicitDedicationPlanner"/>
</bean>
<bean id="clusterBasedAgentLoadBalancerPlanner" class="com.cloud.cluster.agentlb.ClusterBasedAgentLoadBalancerPlanner">
<property name="name" value="ClusterBasedAgentLoadBalancerPlanner"/>
</bean>
<!--
Network Gurus
-->
<bean id="StorageNetworkGuru" class="com.cloud.network.guru.StorageNetworkGuru">
<property name="name" value="StorageNetworkGuru"/>
</bean>
<bean id="ExternalGuestNetworkGuru" class="com.cloud.network.guru.ExternalGuestNetworkGuru">
<property name="name" value="ExternalGuestNetworkGuru"/>
</bean>
<bean id="PublicNetworkGuru" class="com.cloud.network.guru.PublicNetworkGuru">
<property name="name" value="PublicNetworkGuru"/>
</bean>
<bean id="PodBasedNetworkGuru" class="com.cloud.network.guru.PodBasedNetworkGuru">
<property name="name" value="PodBasedNetworkGuru"/>
</bean>
<bean id="ControlNetworkGuru" class="com.cloud.network.guru.ControlNetworkGuru">
<property name="name" value="ControlNetworkGuru"/>
</bean>
<bean id="DirectNetworkGuru" class="com.cloud.network.guru.DirectNetworkGuru">
<property name="name" value="DirectNetworkGuru"/>
</bean>
<bean id="DirectPodBasedNetworkGuru" class="com.cloud.network.guru.DirectPodBasedNetworkGuru">
<property name="name" value="DirectPodBasedNetworkGuru"/>
</bean>
<bean id="OvsGuestNetworkGuru" class="com.cloud.network.guru.OvsGuestNetworkGuru">
<property name="name" value="OvsGuestNetworkGuru"/>
</bean>
<bean id="PrivateNetworkGuru" class="com.cloud.network.guru.PrivateNetworkGuru">
<property name="name" value="PrivateNetworkGuru"/>
</bean>
<!--
Hypervisor Gurus
-->
<bean id="XenServerGuru" class="com.cloud.hypervisor.XenServerGuru">
<property name="name" value="XenServerGuru"/>
</bean>
<bean id="KVMGuru" class="com.cloud.hypervisor.KVMGuru">
<property name="name" value="KVMGuru"/>
</bean>
<bean id="LXCGuru" class="com.cloud.hypervisor.LXCGuru">
<property name="name" value="LXCGuru"/>
</bean>
<bean id="OvmGuru" class="com.cloud.ovm.hypervisor.OvmGuru">
<property name="name" value="OvmGuru"/>
</bean>
<!--=====================================================================================================-->
<!-- -->
<!-- Storage Subsystem Components and Helpers -->
<!-- -->
<!--=====================================================================================================-->
<!--Filesystem types-->
<bean id="iSCSI" class="org.apache.cloudstack.storage.datastore.type.ISCSI" />
<bean id="networkFileSystem" class="org.apache.cloudstack.storage.datastore.type.NetworkFileSystem" />
<!--Image formats-->
<bean id="ISO" class="org.apache.cloudstack.storage.image.format.ISO" />
<bean id="OVA" class="org.apache.cloudstack.storage.image.format.OVA" />
<bean id="QCOW2" class="org.apache.cloudstack.storage.image.format.QCOW2" />
<bean id="VHD" class="org.apache.cloudstack.storage.image.format.VHD" />
<bean id="VHDX" class="org.apache.cloudstack.storage.image.format.VHDX" />
<bean id="unknown" class="org.apache.cloudstack.storage.image.format.Unknown" />
<!--Data Store Services -->
<bean id="snapshotServiceImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotServiceImpl"
depends-on="snapshotStateMachineManagerImpl, snapshotDataFactoryImpl, dataStoreManagerImpl, dataMotionServiceImpl, objectInDataStoreManagerImpl"/>
<bean id="templateServiceImpl" class="org.apache.cloudstack.storage.image.TemplateServiceImpl"
depends-on="dataObjectManagerImpl, dataStoreManagerImpl, dataMotionServiceImpl, objectInDataStoreManagerImpl, defaultEndPointSelector, templateDataFactoryImpl"/>
<bean id="volumeServiceImpl" class="org.apache.cloudstack.storage.volume.VolumeServiceImpl"
depends-on="snapshotManagerImpl, dataMotionServiceImpl"/>
<bean id="xenserverSnapshotStrategy" class="org.apache.cloudstack.storage.snapshot.XenserverSnapshotStrategy" />
<!--Data Store Factory-->
<bean id="templateDataFactoryImpl" class="org.apache.cloudstack.storage.image.TemplateDataFactoryImpl" />
<bean id="snapshotDataFactoryImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotDataFactoryImpl"
depends-on="dataStoreManagerImpl, snapshotDataStoreDaoImpl, volumeDataFactoryImpl"/>
<bean id="volumeDataFactoryImpl" class="org.apache.cloudstack.storage.volume.VolumeDataFactoryImpl" />
<bean id="objectInDataStoreManagerImpl" class="org.apache.cloudstack.storage.datastore.ObjectInDataStoreManagerImpl" />
<bean id="dataObjectManagerImpl" class="org.apache.cloudstack.storage.datastore.DataObjectManagerImpl" />
<!--Data Store Helpers-->
<bean id="primaryDataStoreHelper" class="org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper" />
<bean id="imageStoreHelper" class="org.apache.cloudstack.storage.image.datastore.ImageStoreHelper" />
<bean id="imageFormatHelper" class="org.apache.cloudstack.storage.image.format.ImageFormatHelper" />
<bean id="storageCacheRandomAllocator" class="org.apache.cloudstack.storage.cache.allocator.StorageCacheRandomAllocator" />
<bean id="storageCacheManagerImpl" class="org.apache.cloudstack.storage.cache.manager.StorageCacheManagerImpl" />
<bean id="StorageCacheReplacementAlgorithm" class="org.apache.cloudstack.storage.cache.manager.StorageCacheReplacementAlgorithmLRU" />
<bean id="snapshotStateMachineManagerImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotStateMachineManagerImpl" />
<bean id="defaultEndPointSelector" class="org.apache.cloudstack.storage.endpoint.DefaultEndPointSelector" />
<bean id="ancientDataMotionStrategy" class="org.apache.cloudstack.storage.motion.AncientDataMotionStrategy" />
<bean id="xenserverStorageMotionStrategy" class="org.apache.cloudstack.storage.motion.XenServerStorageMotionStrategy" />
<!--Data Motion Services-->
<bean id="dataMotionServiceImpl" class="org.apache.cloudstack.storage.motion.DataMotionServiceImpl">
<property name="strategies">
<list>
<ref local="ancientDataMotionStrategy"/>
<ref local="xenserverStorageMotionStrategy"/>
</list>
</property>
</bean>
<!--
Data Store Provider Manager
-->
<bean id="primaryDataStoreProviderMgr"
class="org.apache.cloudstack.storage.datastore.manager.PrimaryDataStoreProviderManagerImpl"/>
<bean id="imageStoreProviderMgr" class="org.apache.cloudstack.storage.image.manager.ImageStoreProviderManagerImpl"/>
<bean id="dataStoreManagerImpl" class="org.apache.cloudstack.storage.datastore.DataStoreManagerImpl"
depends-on="dataStoreProviderManager">
<property name="primaryStoreMgr" ref="primaryDataStoreProviderMgr"/>
<property name="imageDataStoreMgr" ref="imageStoreProviderMgr"/>
</bean>
<bean id="cloudStackPrimaryDataStoreProviderImpl"
class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl"/>
<bean id="dataStoreProviderManager"
class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl">
<property name="providers">
<list>
<!--Data Store Providers-->
<ref bean="cloudStackPrimaryDataStoreProviderImpl"/>
</list>
</property>
</bean>
<!--
Managers
-->
<bean id="accountManagerImpl" class="com.cloud.user.AccountManagerImpl" >
<property name="UserAuthenticators" value="#{userAuthenticators.Adapters}" />
<property name="UserPasswordEncoders" value="#{userPasswordEncoders.Adapters}" />
<property name="SecurityCheckers" value="#{securityCheckers.Adapters}" />
</bean>
<bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl">
<property name="UserAuthenticators" value="#{userAuthenticators.Adapters}" />
<property name="UserPasswordEncoders" value="#{userPasswordEncoders.Adapters}" />
<property name="HostAllocators" value="#{hostAllocators.Adapters}" />
<property name="AffinityGroupProcessors" value="#{affinityProcessors.Adapters}" />
<property name="Planners" value="#{deploymentPlanners.Adapters}" />
</bean>
<bean id="storageManagerImpl" class="com.cloud.storage.StorageManagerImpl"/>
<bean id="volumeOrchestrator" class="org.apache.cloudstack.engine.orchestration.VolumeOrchestrator">
<property name="PodAllocators" value="#{podAllocators.Adapters}" />
<property name="StoragePoolAllocators" value="#{storagePoolAllocators.Adapters}" />
</bean>
<bean id="FirstFitPlanner" class="com.cloud.deploy.FirstFitPlanner">
<property name="name" value="FirstFitPlanner"/>
</bean>
<bean id="resourceManagerImpl" class="com.cloud.resource.ResourceManagerImpl" >
<property name="Discoverers" value="#{resourceDiscoverers.Adapters}" />
</bean>
<bean id="highAvailabilityManagerExtImpl" class="com.cloud.ha.HighAvailabilityManagerExtImpl" >
<property name="Investigators" value="#{haInvestigators.Adapters}" />
<property name="FenceBuilders" value="#{haFenceBuilders.Adapters}" />
</bean>
<bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl" >
<property name="HostAllocators" value="#{hostAllocators.Adapters}" />
</bean>
<bean id="networkOrchestrator" class="org.apache.cloudstack.engine.orchestration.NetworkOrchestrator" >
<property name="NetworkGurus" value="#{networkGurus.Adapters}" />
<property name="NetworkElements" value="#{networkElements.Adapters}" />
<property name="IpDeployers" value="#{ipDeployers.Adapters}" />
<property name="DhcpProviders" value="#{dhcpProviders.Adapters}" />
</bean>
<bean id="ipAddressManagerImpl" class="com.cloud.network.IpAddressManagerImpl" >
</bean>
<bean id="networkModelImpl" class="com.cloud.network.NetworkModelImpl">
<property name="NetworkElements" value="#{networkElements.Adapters}" />
</bean>
<bean id="configurationServerImpl" class="com.cloud.server.ConfigurationServerImpl" />
<bean id="clusterManagerImpl" class="com.cloud.cluster.ClusterManagerImpl" />
<bean id="clusteredAgentManagerImpl" class="com.cloud.agent.manager.ClusteredAgentManagerImpl" />
<bean id="userVmManagerImpl" class="com.cloud.vm.UserVmManagerImpl" />
<bean id="consoleProxyManagerImpl" class="com.cloud.consoleproxy.ConsoleProxyManagerImpl" />
<bean id="securityGroupManagerImpl2" class="com.cloud.network.security.SecurityGroupManagerImpl2" />
<bean id="premiumSecondaryStorageManagerImpl" class="com.cloud.secstorage.PremiumSecondaryStorageManagerImpl" />
<bean id="ipv6AddressManagerImpl" class="com.cloud.network.Ipv6AddressManagerImpl" />
<bean id="apiRateLimitServiceImpl" class="org.apache.cloudstack.ratelimit.ApiRateLimitServiceImpl"/>
<bean id="alertManagerImpl" class="com.cloud.alert.AlertManagerImpl" />
<bean id="autoScaleManagerImpl" class="com.cloud.network.as.AutoScaleManagerImpl" />
<bean id="capacityManagerImpl" class="com.cloud.capacity.CapacityManagerImpl" />
<bean id="clusterFenceManagerImpl" class="com.cloud.cluster.ClusterFenceManagerImpl" />
<bean id="configurationManagerImpl" class="com.cloud.configuration.ConfigurationManagerImpl" />
<bean id="elasticLoadBalancerManagerImpl" class="com.cloud.network.lb.ElasticLoadBalancerManagerImpl" />
<bean id="entityManagerImpl" class="com.cloud.dao.EntityManagerImpl" />
<bean id="externalDeviceUsageManagerImpl" class="com.cloud.network.ExternalDeviceUsageManagerImpl" />
<bean id="externalNetworkDeviceManagerImpl" class="com.cloud.network.ExternalNetworkDeviceManagerImpl" />
<bean id="firewallManagerImpl" class="com.cloud.network.firewall.FirewallManagerImpl" />
<bean id="hypervisorGuruManagerImpl" class="com.cloud.hypervisor.HypervisorGuruManagerImpl" />
<bean id="identityServiceImpl" class="com.cloud.uuididentity.IdentityServiceImpl" />
<bean id="keystoreManagerImpl" class="com.cloud.keystore.KeystoreManagerImpl" />
<bean id="loadBalancingRulesManagerImpl" class="com.cloud.network.lb.LoadBalancingRulesManagerImpl" />
<bean id="networkACLManagerImpl" class="com.cloud.network.vpc.NetworkACLManagerImpl" />
<bean id="networkACLServiceImpl" class="com.cloud.network.vpc.NetworkACLServiceImpl" />
<bean id="networkServiceImpl" class="com.cloud.network.NetworkServiceImpl" />
<bean id="networkUsageManagerImpl" class="com.cloud.network.NetworkUsageManagerImpl" />
<bean id="oCFS2ManagerImpl" class="com.cloud.storage.OCFS2ManagerImpl" />
<bean id="ovsTunnelManagerImpl" class="com.cloud.network.ovs.OvsTunnelManagerImpl" />
<bean id="projectManagerImpl" class="com.cloud.projects.ProjectManagerImpl" />
<bean id="queryManagerImpl" class="com.cloud.api.query.QueryManagerImpl" />
<bean id="regionManagerImpl" class="org.apache.cloudstack.region.RegionManagerImpl" />
<bean id="regionServiceImpl" class="org.apache.cloudstack.region.RegionServiceImpl" />
<bean id="remoteAccessVpnManagerImpl" class="com.cloud.network.vpn.RemoteAccessVpnManagerImpl" />
<bean id="resourceLimitManagerImpl" class="com.cloud.resourcelimit.ResourceLimitManagerImpl" />
<bean id="rulesManagerImpl" class="com.cloud.network.rules.RulesManagerImpl" />
<bean id="site2SiteVpnManagerImpl" class="com.cloud.network.vpn.Site2SiteVpnManagerImpl" />
<bean id="snapshotManagerImpl" class="com.cloud.storage.snapshot.SnapshotManagerImpl" />
<bean id="snapshotSchedulerImpl" class="com.cloud.storage.snapshot.SnapshotSchedulerImpl" />
<bean id="storageNetworkManagerImpl" class="com.cloud.network.StorageNetworkManagerImpl" />
<bean id="taggedResourceManagerImpl" class="com.cloud.tags.TaggedResourceManagerImpl" />
<bean id="resourceMetaDataManagerImpl" class="com.cloud.metadata.ResourceMetaDataManagerImpl" />
<bean id="templateManagerImpl" class="com.cloud.template.TemplateManagerImpl" />
<bean id="uploadMonitorImpl" class="com.cloud.storage.upload.UploadMonitorImpl" />
<bean id="usageServiceImpl" class="com.cloud.usage.UsageServiceImpl" />
<bean id="virtualNetworkApplianceManagerImpl" class="com.cloud.network.router.VirtualNetworkApplianceManagerImpl" />
<bean id="vpcManagerImpl" class="com.cloud.network.vpc.VpcManagerImpl" />
<bean id="vpcVirtualNetworkApplianceManagerImpl" class="com.cloud.network.router.VpcVirtualNetworkApplianceManagerImpl" />
<!-- Async management -->
<bean id="asyncJobDaoImpl" class="org.apache.cloudstack.framework.jobs.dao.AsyncJobDaoImpl" />
<bean id="asyncJobJournalDaoImpl" class="org.apache.cloudstack.framework.jobs.dao.AsyncJobJournalDaoImpl" />
<bean id="asyncJobJoinMapDaoImpl" class="org.apache.cloudstack.framework.jobs.dao.AsyncJobJoinMapDaoImpl" />
<bean id="asyncJobManagerImpl" class="org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl"/>
<bean id="asyncJobMonitor" class="org.apache.cloudstack.framework.jobs.impl.AsyncJobMonitor"/>
<bean id="syncQueueDaoImpl" class="org.apache.cloudstack.framework.jobs.dao.SyncQueueDaoImpl" />
<bean id="syncQueueItemDaoImpl" class="org.apache.cloudstack.framework.jobs.dao.SyncQueueItemDaoImpl" />
<bean id="syncQueueManagerImpl" class="org.apache.cloudstack.framework.jobs.impl.SyncQueueManagerImpl" />
<bean id="ApiAsyncJobDispatcher" class="com.cloud.api.ApiAsyncJobDispatcher">
<property name="name" value="ApiAsyncJobDispatcher" />
</bean>
<!--
Misc components
-->
<bean id="actionEventUtils" class="com.cloud.event.ActionEventUtils" />
<bean id="alertGenerator" class="com.cloud.event.AlertGenerator" />
<bean id="apiDBUtils" class="com.cloud.api.ApiDBUtils" />
<bean id="apiDiscoveryServiceImpl" class="org.apache.cloudstack.discovery.ApiDiscoveryServiceImpl" />
<bean id="apiDispatcher" class="com.cloud.api.ApiDispatcher" />
<bean id="apiResponseHelper" class="com.cloud.api.ApiResponseHelper" />
<bean id="apiServer" class="com.cloud.api.ApiServer" />
<bean id="apiServlet" class="com.cloud.api.ApiServlet" />
<bean id="bAREMETAL" class="org.apache.cloudstack.storage.image.format.BAREMETAL" />
<bean id="cloudOrchestrator" class="org.apache.cloudstack.engine.orchestration.CloudOrchestrator" />
<bean id="clusterRestService" class="org.apache.cloudstack.engine.rest.service.api.ClusterRestService" />
<bean id="consoleProxyServlet" class="com.cloud.servlet.ConsoleProxyServlet" />
<bean id="dataCenterResourceManagerImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceManagerImpl" />
<bean id="dataDisk" class="org.apache.cloudstack.engine.subsystem.api.storage.type.DataDisk" />
<bean id="podRestService" class="org.apache.cloudstack.engine.rest.service.api.PodRestService" />
<bean id="iso" class="org.apache.cloudstack.engine.subsystem.api.storage.type.Iso" />
<bean id="networkRestService" class="org.apache.cloudstack.engine.rest.service.api.NetworkRestService" />
<bean id="provisioningServiceImpl" class="org.apache.cloudstack.engine.service.api.ProvisioningServiceImpl" />
<bean id="rootDisk" class="org.apache.cloudstack.engine.subsystem.api.storage.type.RootDisk" />
<bean id="registerCompleteServlet" class="com.cloud.servlet.RegisterCompleteServlet" />
<bean id="statsCollector" class="com.cloud.server.StatsCollector" />
<bean id="storagePoolAutomationImpl" class="com.cloud.storage.StoragePoolAutomationImpl" />
<bean id="usageEventUtils" class="com.cloud.event.UsageEventUtils" />
<bean id="vMEntityManagerImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl" />
<bean id="virtualMachineEntityImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl" />
<bean id="virtualMachineRestService" class="org.apache.cloudstack.engine.rest.service.api.VirtualMachineRestService" />
<bean id="volumeRestService" class="org.apache.cloudstack.engine.rest.service.api.VolumeRestService" />
<bean id="volumeTypeHelper" class="org.apache.cloudstack.engine.subsystem.api.storage.type.VolumeTypeHelper" />
<bean id="zoneRestService" class="org.apache.cloudstack.engine.rest.service.api.ZoneRestService" />
<bean id="cloudZonesStartupProcessor" class="com.cloud.hypervisor.CloudZonesStartupProcessor" />
<bean id="managementServerNode" class="org.apache.cloudstack.utils.identity.ManagementServerNode" />
<bean id="testingAllocator" class="com.cloud.agent.manager.allocator.impl.TestingAllocator" />
<bean id="domainManagerImpl" class="com.cloud.user.DomainManagerImpl" />
<bean id="downloadMonitorImpl" class="com.cloud.storage.download.DownloadMonitorImpl" />
<bean id="lBHealthCheckManagerImpl" class="com.cloud.network.lb.LBHealthCheckManagerImpl" />
<bean id="volumeApiServiceImpl" class="com.cloud.storage.VolumeApiServiceImpl"/>
<bean id="ApplicationLoadBalancerService" class="org.apache.cloudstack.network.lb.ApplicationLoadBalancerManagerImpl" />
<bean id="InternalLoadBalancerVMManager" class="org.apache.cloudstack.network.lb.InternalLoadBalancerVMManagerImpl" />
<bean id="vMSnapshotManagerImpl" class="com.cloud.vm.snapshot.VMSnapshotManagerImpl" />
<!--=======================================================================================================-->
<!-- -->
<!-- Module-basis OSS/non-OSS Common components -->
<!-- -->
<!--=======================================================================================================-->
<!--
Baremetal components
-->
<bean id="BareMetalDhcp" class="com.cloud.baremetal.networkservice.BaremetalDhcpElement">
<property name="name" value="BareMetalDhcp"/>
</bean>
<bean id="BareMetalPxe" class="com.cloud.baremetal.networkservice.BaremetalPxeElement">
<property name="name" value="BareMetalPxe"/>
</bean>
<bean id="BareMetalUserdata" class="com.cloud.baremetal.networkservice.BaremetalUserdataElement">
<property name="name" value="BareMetalUserdata"/>
</bean>
<bean id="BareMetalTemplateAdapter" class="com.cloud.baremetal.manager.BareMetalTemplateAdapter" />
<bean id="BareMetalDiscoverer" class="com.cloud.baremetal.manager.BareMetalDiscoverer">
<property name="name" value="Bare Metal Agent"/>
</bean>
<bean id="BareMetalPlanner" class="com.cloud.baremetal.manager.BareMetalPlanner">
<property name="name" value="BareMetalPlanner"/>
</bean>
<bean id="BaremetalGuru" class="com.cloud.baremetal.manager.BareMetalGuru">
<property name="name" value="BaremetalGuru"/>
</bean>
<bean id="BaremetalManager" class="com.cloud.baremetal.manager.BaremetalManagerImpl"/>
<bean id="BaremetalDhcpManager" class="com.cloud.baremetal.networkservice.BaremetalDhcpManagerImpl"/>
<bean id="BaremetalKickStartPxeService" class="com.cloud.baremetal.networkservice.BaremetalKickStartServiceImpl"/>
<bean id="BaremetalPingPxeService" class="com.cloud.baremetal.networkservice.BareMetalPingServiceImpl" />
<bean id="BaremetalPxeManager" class="com.cloud.baremetal.networkservice.BaremetalPxeManagerImpl" />
<bean id="BAREMETAL" class="org.apache.cloudstack.storage.image.format.BAREMETAL" />
<bean id="baremetalDhcpDaoImpl" class="com.cloud.baremetal.database.BaremetalDhcpDaoImpl" />
<bean id="baremetalPxeDaoImpl" class="com.cloud.baremetal.database.BaremetalPxeDaoImpl" />
<bean id="UcsManager" class="com.cloud.ucs.manager.UcsManagerImpl" />
<bean id="AffinityGroupServiceImpl" class="org.apache.cloudstack.affinity.AffinityGroupServiceImpl">
<property name="AffinityGroupProcessors" value="#{affinityProcessors.Adapters}" />
</bean>
<bean id="DeploymentPlanningManager" class="com.cloud.deploy.DeploymentPlanningManagerImpl">
<property name="Planners" value="#{deploymentPlanners.Adapters}" />
<property name="AffinityGroupProcessors" value="#{affinityProcessors.Adapters}" />
<property name="StoragePoolAllocators" value="#{storagePoolAllocators.Adapters}" />
<property name="HostAllocators" value="#{hostAllocators.Adapters}" />
</bean>
<bean id="AffinityGroupJoinDaoImpl" class="com.cloud.api.query.dao.AffinityGroupJoinDaoImpl">
</bean>
<bean id="AffinityGroupDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupDaoImpl">
</bean>
<bean id="AffinityGroupVMMapDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDaoImpl">
</bean>
<bean id="AffinityGroupDomainMapDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupDomainMapDaoImpl">
</bean>
<bean id="PlannerHostReservationDaoImpl" class="com.cloud.deploy.dao.PlannerHostReservationDaoImpl">
</bean>
</beans>

View File

@ -591,6 +591,12 @@ addBigSwitchVnsDevice=1
deleteBigSwitchVnsDevice=1
listBigSwitchVnsDevices=1
#### ovs commands
addOvsDevice=1
deleteOvsDevice=1
listOvsDevices=1
#### host simulator commands
configureSimulator=1

View File

@ -36,5 +36,7 @@
</bean>
<bean id="ovsTunnelManagerImpl" class="com.cloud.network.ovs.OvsTunnelManagerImpl" />
<bean id="ovsTunnelInterfaceDaoImpl" class="com.cloud.network.ovs.dao.OvsTunnelInterfaceDaoImpl" />
<bean id="ovsTunnelNetworkDaoImpl" class="com.cloud.network.ovs.dao.OvsTunnelNetworkDaoImpl" />
</beans>

View File

@ -0,0 +1,65 @@
// 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.response;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;
import org.apache.cloudstack.api.EntityReference;
import com.cloud.network.ovs.dao.OvsDeviceVO;
import com.cloud.serializer.Param;
import com.google.gson.annotations.SerializedName;
@EntityReference(value = OvsDeviceVO.class)
public class OvsDeviceResponse extends BaseResponse {
@SerializedName(ApiConstants.OVS_DEVICE_ID)
@Param(description = "device id of the Ovs")
private String id;
@SerializedName(ApiConstants.PHYSICAL_NETWORK_ID)
@Param(description = "the physical network to which this device belongs to")
private String physicalNetworkId;
@SerializedName(ApiConstants.OVS_DEVICE_NAME)
@Param(description = "device name")
private String deviceName;
@SerializedName(ApiConstants.HOST_NAME)
@Param(description = "the controller Ip address")
private String hostName;
public String getId() {
return this.id;
}
public void setId(String vnsDeviceId) {
this.id = vnsDeviceId;
}
public void setPhysicalNetworkId(String physicalNetworkId) {
this.physicalNetworkId = physicalNetworkId;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public void setHostName(String hostName) {
this.hostName = hostName;
}
}

View File

@ -0,0 +1,116 @@
// 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.network.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.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
import com.cloud.api.response.OvsDeviceResponse;
import com.cloud.event.EventTypes;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.InvalidParameterValueException;
import com.cloud.exception.NetworkRuleConflictException;
import com.cloud.exception.ResourceAllocationException;
import com.cloud.exception.ResourceUnavailableException;
import com.cloud.network.element.OvsElementService;
import com.cloud.network.ovs.dao.OvsDeviceVO;
import com.cloud.user.UserContext;
import com.cloud.utils.exception.CloudRuntimeException;
@APICommand(name = "addDevice", responseObject = OvsDeviceResponse.class, description = "Adds a Ovs controller device")
public class AddOvsDeviceCmd extends BaseAsyncCmd {
private static final String s_name = "adddeviceresponse";
@Inject
OvsElementService _ovsElementService;
// ///////////////////////////////////////////////////
// ////////////// API parameters /////////////////////
// ///////////////////////////////////////////////////
@Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, required = true, description = "the Physical Network ID")
private Long physicalNetworkId;
@Parameter(name = ApiConstants.HOST_NAME, type = CommandType.STRING, required = true, description = "Hostname of ip address of the BigSwitch VNS Controller.")
private String host;
// ///////////////////////////////////////////////////
// ///////////////// Accessors ///////////////////////
// ///////////////////////////////////////////////////
public Long getPhysicalNetworkId() {
return physicalNetworkId;
}
public String getHost() {
return host;
}
// ///////////////////////////////////////////////////
// ///////////// API Implementation///////////////////
// ///////////////////////////////////////////////////
@Override
public void execute() throws ResourceUnavailableException,
InsufficientCapacityException, ServerApiException,
ConcurrentOperationException, ResourceAllocationException,
NetworkRuleConflictException {
try {
OvsDeviceVO ovsDeviceVO = _ovsElementService.addOvsDevice(this);
if (ovsDeviceVO != null) {
OvsDeviceResponse response = _ovsElementService
.createOvsDeviceResponse(ovsDeviceVO);
response.setObjectName("ovsdevice");
response.setResponseName(getCommandName());
this.setResponseObject(response);
}
} 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 getEventType() {
return EventTypes.EVENT_EXTERNAL_OVS_CONTROLLER_ADD;
}
@Override
public String getEventDescription() {
return "Adding an Ovs Controller";
}
@Override
public String getCommandName() {
return s_name;
}
@Override
public long getEntityOwnerId() {
return UserContext.current().getCaller().getId();
}
}

View File

@ -0,0 +1,110 @@
// 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.network.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.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.SuccessResponse;
import com.cloud.api.response.OvsDeviceResponse;
import com.cloud.event.EventTypes;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.InvalidParameterValueException;
import com.cloud.exception.NetworkRuleConflictException;
import com.cloud.exception.ResourceAllocationException;
import com.cloud.exception.ResourceUnavailableException;
import com.cloud.network.element.OvsElementService;
import com.cloud.user.UserContext;
import com.cloud.utils.exception.CloudRuntimeException;
@APICommand(name = "deleteOvsDevice", responseObject = SuccessResponse.class, description = " delete a ovs device")
public class DeleteOvsDeviceCmd extends BaseAsyncCmd {
private static final String s_name = "deleteovsdeviceresponse";
@Inject
OvsElementService _ovsElementService;
// ///////////////////////////////////////////////////
// ////////////// API parameters /////////////////////
// ///////////////////////////////////////////////////
@Parameter(name = ApiConstants.OVS_DEVICE_ID, type = CommandType.UUID, entityType = OvsDeviceResponse.class, required = true, description = "Ovs device ID")
private Long ovsDeviceId;
// ///////////////////////////////////////////////////
// ///////////////// Accessors ///////////////////////
// ///////////////////////////////////////////////////
public Long getOvsDeviceId() {
return ovsDeviceId;
}
// ///////////////////////////////////////////////////
// ///////////// API Implementation///////////////////
// ///////////////////////////////////////////////////
@Override
public void execute() throws ResourceUnavailableException,
InsufficientCapacityException, ServerApiException,
ConcurrentOperationException, ResourceAllocationException,
NetworkRuleConflictException {
try {
boolean result = _ovsElementService.deleteOvsDevice(this);
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
response.setResponseName(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR,
"Failed to delete Ovs device.");
}
} 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 getEventType() {
return EventTypes.EVENT_EXTERNAL_OVS_CONTROLLER_DELETE;
}
@Override
public String getEventDescription() {
return "Deleting Ovs Controller";
}
@Override
public String getCommandName() {
return s_name;
}
@Override
public long getEntityOwnerId() {
return UserContext.current().getCaller().getId();
}
}

View File

@ -0,0 +1,114 @@
// 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.network.commands;
import java.util.ArrayList;
import java.util.List;
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.BaseListCmd;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
import org.apache.log4j.Logger;
import com.cloud.api.response.OvsDeviceResponse;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.InvalidParameterValueException;
import com.cloud.exception.NetworkRuleConflictException;
import com.cloud.exception.ResourceAllocationException;
import com.cloud.exception.ResourceUnavailableException;
import com.cloud.network.element.OvsElementService;
import com.cloud.network.ovs.dao.OvsDeviceVO;
import com.cloud.utils.exception.CloudRuntimeException;
@APICommand(name = "listOvsDevices", responseObject = OvsDeviceResponse.class, description = "Lists Ovs devices")
public class ListOvsDevicesCmd extends BaseListCmd {
public static final Logger s_logger = Logger
.getLogger(ListOvsDevicesCmd.class.getName());
private static final String s_name = "listovsdeviceresponse";
@Inject
OvsElementService _ovsElementService;
// ///////////////////////////////////////////////////
// ////////////// API parameters /////////////////////
// ///////////////////////////////////////////////////
@Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, description = "the Physical Network ID")
private Long physicalNetworkId;
@Parameter(name = ApiConstants.OVS_DEVICE_ID, type = CommandType.UUID, entityType = OvsDeviceResponse.class, description = "ovs device ID")
private Long ovsDeviceId;
// ///////////////////////////////////////////////////
// ///////////////// Accessors ///////////////////////
// ///////////////////////////////////////////////////
public Long getOvsDeviceId() {
return ovsDeviceId;
}
public Long getPhysicalNetworkId() {
return physicalNetworkId;
}
// ///////////////////////////////////////////////////
// ///////////// API Implementation///////////////////
// ///////////////////////////////////////////////////
@Override
public void execute() throws ResourceUnavailableException,
InsufficientCapacityException, ServerApiException,
ConcurrentOperationException, ResourceAllocationException,
NetworkRuleConflictException {
try {
List<OvsDeviceVO> ovsDevices = _ovsElementService
.listOvsDevices(this);
ListResponse<OvsDeviceResponse> response = new ListResponse<OvsDeviceResponse>();
List<OvsDeviceResponse> ovsDevicesResponse = new ArrayList<OvsDeviceResponse>();
if (ovsDevices != null && !ovsDevices.isEmpty()) {
for (OvsDeviceVO ovsDeviceVO : ovsDevices) {
OvsDeviceResponse ovsDeviceResponse = _ovsElementService
.createOvsDeviceResponse(ovsDeviceVO);
ovsDevicesResponse.add(ovsDeviceResponse);
}
}
response.setResponses(ovsDevicesResponse);
response.setResponseName(getCommandName());
this.setResponseObject(response);
} 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;
}
}

View File

@ -16,12 +16,14 @@
// under the License.
package com.cloud.network.element;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.ejb.Local;
import javax.inject.Inject;
import com.cloud.api.response.OvsDeviceResponse;
import com.cloud.deploy.DeployDestination;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientCapacityException;
@ -32,9 +34,14 @@ import com.cloud.network.Network.Provider;
import com.cloud.network.Network.Service;
import com.cloud.network.Networks;
import com.cloud.network.PhysicalNetworkServiceProvider;
import com.cloud.network.commands.AddOvsDeviceCmd;
import com.cloud.network.commands.DeleteOvsDeviceCmd;
import com.cloud.network.commands.ListOvsDevicesCmd;
import com.cloud.network.ovs.OvsTunnelManager;
import com.cloud.network.ovs.dao.OvsDeviceVO;
import com.cloud.offering.NetworkOffering;
import com.cloud.utils.component.AdapterBase;
import com.cloud.utils.db.DB;
import com.cloud.vm.NicProfile;
import com.cloud.vm.ReservationContext;
import com.cloud.vm.VirtualMachineProfile;

View File

@ -0,0 +1,22 @@
package com.cloud.network.element;
import java.util.List;
import com.cloud.api.response.OvsDeviceResponse;
import com.cloud.network.commands.AddOvsDeviceCmd;
import com.cloud.network.commands.DeleteOvsDeviceCmd;
import com.cloud.network.commands.ListOvsDevicesCmd;
import com.cloud.network.ovs.dao.OvsDeviceVO;
import com.cloud.utils.component.PluggableService;
public interface OvsElementService extends PluggableService {
public OvsDeviceVO addOvsDevice(AddOvsDeviceCmd cmd);
public OvsDeviceResponse createOvsDeviceResponse(OvsDeviceVO ovsDeviceVO);
public boolean deleteOvsDevice(DeleteOvsDeviceCmd cmd);
public List<OvsDeviceVO> listOvsDevices(ListOvsDevicesCmd cmd);
}

View File

@ -0,0 +1,78 @@
// 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.network.ovs;
import java.net.MalformedURLException;
import java.net.URL;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
import org.apache.commons.httpclient.cookie.CookiePolicy;
import org.apache.commons.httpclient.methods.DeleteMethod;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.PutMethod;
import org.apache.log4j.Logger;
public class OvsApi {
private static final Logger s_logger = Logger.getLogger(OvsApi.class);
private final static String _protocol = "http";
private final static MultiThreadedHttpConnectionManager s_httpClientManager = new MultiThreadedHttpConnectionManager();
private String _host;
private final HttpClient _client;
protected HttpClient createHttpClient() {
return new HttpClient(s_httpClientManager);
}
protected HttpMethod createMethod(String type, String uri, int port)
throws OvsApiException {
String url;
try {
url = new URL(_protocol, _host, port, uri).toString();
} catch (MalformedURLException e) {
s_logger.error("Unable to build Ovs API URL", e);
throw new OvsApiException("Unable to Ovs API URL", e);
}
if ("post".equalsIgnoreCase(type)) {
return new PostMethod(url);
} else if ("get".equalsIgnoreCase(type)) {
return new GetMethod(url);
} else if ("delete".equalsIgnoreCase(type)) {
return new DeleteMethod(url);
} else if ("put".equalsIgnoreCase(type)) {
return new PutMethod(url);
} else {
throw new OvsApiException("Requesting unknown method type");
}
}
public OvsApi() {
_client = createHttpClient();
_client.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
}
public void setControllerAddress(String address) {
this._host = address;
}
// TODO: implement requests
}

View File

@ -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.network.ovs;
public class OvsApiException extends Exception {
public OvsApiException() {
}
public OvsApiException(String message) {
super(message);
}
public OvsApiException(Throwable cause) {
super(cause);
}
public OvsApiException(String message, Throwable cause) {
super(message, cause);
}
}

View File

@ -0,0 +1,27 @@
// 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.network.ovs;
import com.cloud.agent.api.StartupCommand;
import com.cloud.host.Host;
public class StartupOvsCommand extends StartupCommand {
public StartupOvsCommand() {
super(Host.Type.L2Networking);
}
}

View File

@ -0,0 +1,175 @@
package com.cloud.network.resource;
import java.util.Map;
import javax.naming.ConfigurationException;
import org.apache.log4j.Logger;
import com.cloud.agent.IAgentControl;
import com.cloud.agent.api.Answer;
import com.cloud.agent.api.Command;
import com.cloud.agent.api.MaintainAnswer;
import com.cloud.agent.api.MaintainCommand;
import com.cloud.agent.api.PingCommand;
import com.cloud.agent.api.ReadyAnswer;
import com.cloud.agent.api.ReadyCommand;
import com.cloud.agent.api.StartupCommand;
import com.cloud.host.Host;
import com.cloud.host.Host.Type;
import com.cloud.network.ovs.OvsApi;
import com.cloud.network.ovs.StartupOvsCommand;
import com.cloud.resource.ServerResource;
import com.cloud.utils.component.ManagerBase;
public class OvsResource extends ManagerBase implements ServerResource {
private static final Logger s_logger = Logger.getLogger(OvsResource.class);
private String _name;
private String _guid;
private String _zoneId;
private int _numRetries;
private OvsApi _ovsApi;
protected OvsApi createOvsApi() {
return new OvsApi();
}
@Override
public boolean configure(String name, Map<String, Object> params)
throws ConfigurationException {
_name = (String) params.get("name");
if (_name == null) {
throw new ConfigurationException("Unable to find name");
}
_guid = (String) params.get("guid");
if (_guid == null) {
throw new ConfigurationException("Unable to find the guid");
}
_zoneId = (String) params.get("zoneId");
if (_zoneId == null) {
throw new ConfigurationException("Unable to find zone");
}
_numRetries = 2;
String ip = (String) params.get("ip");
if (ip == null) {
throw new ConfigurationException("Unable to find IP");
}
_ovsApi = createOvsApi();
_ovsApi.setControllerAddress(ip);
return true;
}
@Override
public boolean start() {
return true;
}
@Override
public boolean stop() {
return true;
}
@Override
public String getName() {
return _name;
}
@Override
public Type getType() {
return Host.Type.L2Networking;
}
@Override
public StartupCommand[] initialize() {
StartupOvsCommand sc = new StartupOvsCommand();
sc.setGuid(_guid);
sc.setName(_name);
sc.setDataCenter(_zoneId);
sc.setPod("");
sc.setPrivateIpAddress("");
sc.setStorageIpAddress("");
sc.setVersion("");
return new StartupCommand[] { sc };
}
@Override
public PingCommand getCurrentStatus(long id) {
// TODO Auto-generated method stub
return null;
}
@Override
public Answer executeRequest(Command cmd) {
return executeRequest(cmd, _numRetries);
}
private Answer executeRequest(ReadyCommand cmd) {
return new ReadyAnswer(cmd);
}
private Answer executeRequest(MaintainCommand cmd) {
return new MaintainAnswer(cmd);
}
public Answer executeRequest(Command cmd, int numRetries) {
if (cmd instanceof ReadyCommand) {
return executeRequest((ReadyCommand) cmd);
} else if (cmd instanceof MaintainCommand) {
return executeRequest((MaintainCommand) cmd);
}
// TODO: implement services request
// else if (cmd instanceof CreateOvsNetworkCommand) {
// return executeRequest((CreateOvsNetworkCommand)cmd, numRetries);
// }
// else if (cmd instanceof DeleteOvsNetworkCommand) {
// return executeRequest((DeleteOvsNetworkCommand) cmd, numRetries);
// }
// else if (cmd instanceof CreateOvsPortCommand) {
// return executeRequest((CreateOvsPortCommand) cmd, numRetries);
// }
// else if (cmd instanceof DeleteOvsPortCommand) {
// return executeRequest((DeleteOvsPortCommand) cmd, numRetries);
// }
// else if (cmd instanceof UpdateOvsPortCommand) {
// return executeRequest((UpdateOvsPortCommand) cmd, numRetries);
// }
s_logger.debug("Received unsupported command " + cmd.toString());
return Answer.createUnsupportedCommandAnswer(cmd);
}
@Override
public void disconnected() {
}
private Answer retry(Command cmd, int numRetries) {
s_logger.warn("Retrying " + cmd.getClass().getSimpleName()
+ ". Number of retries remaining: " + numRetries);
return executeRequest(cmd, numRetries);
}
private String truncate(String string, int length) {
if (string.length() <= length) {
return string;
} else {
return string.substring(0, length);
}
}
@Override
public IAgentControl getAgentControl() {
return null;
}
@Override
public void setAgentControl(IAgentControl agentControl) {
}
}

View File

@ -196,6 +196,8 @@ DROP TABLE IF EXISTS `cloud`.`vm_network_map`;
DROP TABLE IF EXISTS `cloud`.`netapp_volume`;
DROP TABLE IF EXISTS `cloud`.`netapp_pool`;
DROP TABLE IF EXISTS `cloud`.`netapp_lun`;
DROP TABLE IF EXISTS `cloud`.`ovs_devices`;
DROP TABLE IF EXISTS `cloud`.`ovs_nic_map`;
CREATE TABLE `cloud`.`version` (
`id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT COMMENT 'id',
@ -2475,5 +2477,25 @@ CREATE TABLE `cloud`.`nicira_nvp_nic_map` (
CONSTRAINT `fk_nicira_nvp_nic_map__nic` FOREIGN KEY(`nic`) REFERENCES `nics`(`uuid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `cloud`.`ovs_devices` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`uuid` varchar(255) UNIQUE,
`physical_network_id` bigint unsigned NOT NULL COMMENT 'id of the physical network in to which ovs device is added',
`device_name` varchar(255) NOT NULL COMMENT 'name of the ovs device',
`host_id` bigint unsigned NOT NULL COMMENT 'host id coresponding to the ovs device',
PRIMARY KEY (`id`),
CONSTRAINT `fk_ovs_devices__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE,
CONSTRAINT `fk_ovs_devices__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `cloud`.`ovs_nic_map` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`logicalswitch` varchar(255) NOT NULL COMMENT 'uuid of logical switch this port is provisioned on',
`logicalswitchport` varchar(255) UNIQUE COMMENT 'uuid of this logical switch port',
`nic` varchar(255) UNIQUE COMMENT 'cloudstack uuid of the nic connected to this logical switch port',
PRIMARY KEY (`id`),
CONSTRAINT `fk_ovs_nic_map__nic` FOREIGN KEY(`nic`) REFERENCES `nics`(`uuid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET foreign_key_checks = 1;