auto wire the network helper

Conflicts:
	server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java
This commit is contained in:
Wilder Rodrigues 2014-08-21 14:50:55 +02:00 committed by wilderrodrigues
parent 546e563c27
commit 65fb21647a
2 changed files with 10 additions and 7 deletions

View File

@ -28,6 +28,8 @@ import javax.inject.Inject;
import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import com.cloud.agent.api.SetupGuestNetworkCommand;
import com.cloud.agent.api.routing.CreateIpAliasCommand;
@ -174,8 +176,9 @@ public class CommandSetupHelper {
@Inject
private RouterControlHelper _routerControlHelper;
@Inject
private NetworkHelper _networkHelper;
@Autowired
@Qualifier("networkHelper")
protected NetworkHelper _networkHelper;
private final String _dnsBasicZoneUpdates = "all";

View File

@ -90,8 +90,9 @@ public class BasicNetworkTopology implements NetworkTopology {
@Inject
protected HostDao _hostDao;
@Inject
protected NetworkHelper _nwHelper;
@Autowired
@Qualifier("networkHelper")
protected NetworkHelper _networkHelper;
@Inject
protected UserVmDao _userVmDao;
@ -419,9 +420,8 @@ public class BasicNetworkTopology implements NetworkTopology {
if (!connectedRouters.isEmpty()) {
// Shouldn't we include this check inside the method?
if (!isZoneBasic && !disconnectedRouters.isEmpty() && disconnectedRouters.get(0).getIsRedundantRouter()) {
// These disconnected redundant virtual routers are out of sync
// now, stop them for synchronization
_nwHelper.handleSingleWorkingRedundantRouter(connectedRouters, disconnectedRouters, msg);
// These disconnected redundant virtual routers are out of sync now, stop them for synchronization
_networkHelper.handleSingleWorkingRedundantRouter(connectedRouters, disconnectedRouters, msg);
}
} else if (!disconnectedRouters.isEmpty()) {
for (final VirtualRouter router : disconnectedRouters) {