mirror of https://github.com/apache/cloudstack.git
Changes related to instantiating the dao components
This commit is contained in:
parent
99e88ecbf9
commit
43e2997421
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
<bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl" />
|
||||
<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="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl" />
|
||||
|
|
@ -103,7 +103,9 @@
|
|||
<bean id="CiscoNexus1000vVSM" class="com.cloud.network.element.CiscoNexusVSMElement">
|
||||
<property name="name" value="CiscoNexus1000vVSM"/>
|
||||
</bean>
|
||||
|
||||
<bean id="CiscoVNMC" class="com.cloud.network.element.CiscoVnmcElement">
|
||||
<property name="name" value="CiscoVNMC"/>
|
||||
</bean>
|
||||
<!--
|
||||
Adapters
|
||||
-->
|
||||
|
|
|
|||
|
|
@ -29,12 +29,13 @@ import com.google.gson.annotations.SerializedName;
|
|||
public class CiscoVnmcResourceResponse extends BaseResponse {
|
||||
public static final String RESOURCE_NAME = "resourcename";
|
||||
|
||||
@SerializedName(ApiConstants.RESOURCE_ID) @Parameter(description="resource id of the Cisco VNMC controller")
|
||||
@SerializedName(ApiConstants.RESOURCE_ID)
|
||||
@Parameter(description="resource id of the Cisco VNMC controller")
|
||||
private String id;
|
||||
|
||||
@SerializedName(ApiConstants.PHYSICAL_NETWORK_ID)
|
||||
@Parameter(description="the physical network to which this VNMC belongs to", entityType = PhysicalNetworkResponse.class)
|
||||
private Long physicalNetworkId ;
|
||||
private Long physicalNetworkId;
|
||||
|
||||
public Long getPhysicalNetworkId() {
|
||||
return physicalNetworkId;
|
||||
|
|
|
|||
|
|
@ -20,12 +20,15 @@ import java.util.List;
|
|||
|
||||
import javax.ejb.Local;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.cloud.network.cisco.CiscoAsa1000vDeviceVO;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
import com.cloud.utils.db.SearchCriteria;
|
||||
import com.cloud.utils.db.SearchCriteria.Op;
|
||||
|
||||
@Component
|
||||
@Local(value=CiscoAsa1000vDao.class)
|
||||
public class CiscoAsa1000vDaoImpl extends GenericDaoBase<CiscoAsa1000vDeviceVO, Long>
|
||||
implements CiscoAsa1000vDao {
|
||||
|
|
|
|||
|
|
@ -20,12 +20,15 @@ import java.util.List;
|
|||
|
||||
import javax.ejb.Local;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.cloud.network.cisco.CiscoVnmcControllerVO;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
import com.cloud.utils.db.SearchCriteria;
|
||||
import com.cloud.utils.db.SearchCriteria.Op;
|
||||
|
||||
@Component
|
||||
@Local(value=CiscoVnmcDao.class)
|
||||
public class CiscoVnmcDaoImpl extends GenericDaoBase<CiscoVnmcControllerVO, Long>
|
||||
implements CiscoVnmcDao {
|
||||
|
|
|
|||
|
|
@ -18,12 +18,15 @@ package com.cloud.network.dao;
|
|||
|
||||
import javax.ejb.Local;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.cloud.network.cisco.NetworkAsa1000vMapVO;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
import com.cloud.utils.db.SearchCriteria;
|
||||
import com.cloud.utils.db.SearchCriteria.Op;
|
||||
|
||||
@Component
|
||||
@Local(value=NetworkAsa1000vMapDao.class)
|
||||
public class NetworkAsa1000vMapDaoImpl extends GenericDaoBase<NetworkAsa1000vMapVO, Long>
|
||||
implements NetworkAsa1000vMapDao {
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import com.cloud.agent.api.to.PortForwardingRuleTO;
|
|||
import com.cloud.agent.api.to.StaticNatRuleTO;
|
||||
import com.cloud.host.Host;
|
||||
import com.cloud.network.cisco.CiscoVnmcConnectionImpl;
|
||||
import com.cloud.network.rules.FirewallRule.TrafficType;
|
||||
import com.cloud.resource.ServerResource;
|
||||
import com.cloud.utils.NumbersUtil;
|
||||
import com.cloud.utils.Pair;
|
||||
|
|
@ -352,15 +353,18 @@ public class CiscoVnmcResource implements ServerResource {
|
|||
throw new Exception("Failed to delete ACL ingress rule in VNMC for guest network with vlan " + vlanId);
|
||||
}
|
||||
} else {
|
||||
String[] externalIpRange = getIpRangeFromCidr(rule.getSourceCidrList().get(0));
|
||||
if (!_connection.createTenantVDCIngressAclRule(tenant,
|
||||
Long.toString(rule.getId()), policyIdentifier,
|
||||
rule.getProtocol().toUpperCase(), externalIpRange[0], externalIpRange[1],
|
||||
Integer.toString(rule.getSrcPortRange()[0]), Integer.toString(rule.getSrcPortRange()[1]), publicIp)) {
|
||||
throw new Exception("Failed to create ACL ingress rule in VNMC for guest network with vlan " + vlanId);
|
||||
}
|
||||
if (rule.getTrafficType() == TrafficType.Ingress) {
|
||||
String[] externalIpRange = getIpRangeFromCidr(rule.getSourceCidrList().get(0));
|
||||
if (!_connection.createTenantVDCIngressAclRule(tenant,
|
||||
Long.toString(rule.getId()), policyIdentifier,
|
||||
rule.getProtocol().toUpperCase(), externalIpRange[0], externalIpRange[1],
|
||||
Integer.toString(rule.getSrcPortRange()[0]), Integer.toString(rule.getSrcPortRange()[1]), publicIp)) {
|
||||
throw new Exception("Failed to create ACL ingress rule in VNMC for guest network with vlan " + vlanId);
|
||||
}
|
||||
} else {
|
||||
// TODO for egress
|
||||
}
|
||||
}
|
||||
// TODO for egress
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue