mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
fixing injection of beans with a relationship
Conflicts: server/src/org/apache/cloudstack/network/topology/AdvancedNetworkTopology.java server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java
This commit is contained in:
parent
8f313ca5d3
commit
d15329679b
@ -22,13 +22,11 @@ import java.util.List;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.cloud.dc.DataCenter;
|
||||
import com.cloud.deploy.DeployDestination;
|
||||
import com.cloud.exception.ResourceUnavailableException;
|
||||
import com.cloud.network.Network;
|
||||
import com.cloud.network.lb.LoadBalancingRule;
|
||||
import com.cloud.network.router.VirtualRouter;
|
||||
import com.cloud.network.rules.RuleApplier;
|
||||
import com.cloud.network.rules.RuleApplierWrapper;
|
||||
import com.cloud.network.rules.UserdataPwdRules;
|
||||
@ -36,50 +34,8 @@ import com.cloud.vm.DomainRouterVO;
|
||||
import com.cloud.vm.NicProfile;
|
||||
import com.cloud.vm.VirtualMachineProfile;
|
||||
|
||||
public class AdvancedNetworkTopology implements NetworkTopology {
|
||||
|
||||
@Override
|
||||
public StringBuilder createGuestBootLoadArgs(final NicProfile guestNic, final String defaultDns1, final String defaultDns2, final DomainRouterVO router) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String retrieveGuestDhcpRange(final NicProfile guestNic, final Network guestNetwork, final DataCenter dc) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NicProfile retrieveControlNic(final VirtualMachineProfile profile) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean configDhcpForSubnet(final Network network, final NicProfile nic, final VirtualMachineProfile profile, final DeployDestination dest,
|
||||
final List<DomainRouterVO> routers) throws ResourceUnavailableException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applyDhcpEntry(final Network network, final NicProfile nic, final VirtualMachineProfile profile, final DeployDestination dest,
|
||||
final List<DomainRouterVO> routers) throws ResourceUnavailableException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applyRules(final Network network, final List<? extends VirtualRouter> routers, final String typeString, final boolean isPodLevelException, final Long podId,
|
||||
final boolean failWhenDisconnect, final RuleApplier applier) throws ResourceUnavailableException {
|
||||
|
||||
AdvancedNetworkVisitor visitor = new AdvancedNetworkVisitor(this);
|
||||
applier.accept(visitor, null);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sendCommandsToRouter(final VirtualRouter router, final List<LoadBalancingRule> rules, final long id) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
@Component
|
||||
public class AdvancedNetworkTopology extends BasicNetworkTopology {
|
||||
|
||||
private static final Logger s_logger = Logger.getLogger(AdvancedNetworkTopology.class);
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@ import javax.inject.Inject;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.cloud.dc.DataCenter;
|
||||
import com.cloud.dc.DataCenter.NetworkType;
|
||||
@ -63,6 +64,7 @@ import com.cloud.vm.VirtualMachine.State;
|
||||
import com.cloud.vm.VirtualMachineProfile;
|
||||
import com.cloud.vm.dao.UserVmDao;
|
||||
|
||||
@Component
|
||||
public class BasicNetworkTopology implements NetworkTopology {
|
||||
|
||||
private static final Logger s_logger = Logger.getLogger(BasicNetworkTopology.class);
|
||||
|
||||
@ -21,6 +21,9 @@ import java.util.Hashtable;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
|
||||
import com.cloud.dc.DataCenter;
|
||||
import com.cloud.dc.DataCenter.NetworkType;
|
||||
|
||||
@ -28,10 +31,12 @@ public class NetworkTopologyContext {
|
||||
|
||||
private final Hashtable<NetworkType, NetworkTopology> _flyweight = new Hashtable<DataCenter.NetworkType, NetworkTopology>();;
|
||||
|
||||
@Inject
|
||||
@Autowired
|
||||
@Qualifier("basicNetworkTopology")
|
||||
private BasicNetworkTopology _basicNetworkTopology;
|
||||
|
||||
@Inject
|
||||
@Autowired
|
||||
@Qualifier("advancedNetworkTopology")
|
||||
private AdvancedNetworkTopology _advancedNetworkTopology;
|
||||
|
||||
public void init() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user