| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent fb55851 commit f79e7cd
20 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -717,11 +717,14 @@ public boolean savePassword(final Network network, final NicProfile nic, final V | |||
| 717 | 717 | ||
| 718 | 718 | VirtualMachineProfile uservm = vm; | |
| 719 | 719 | ||
| 720 | + DataCenterVO dcVO = _dcDao.findById(network.getDataCenterId()); | ||
| 721 | + NetworkTopology networkTopology = networkTopologyContext.retrieveNetworkTopology(dcVO); | ||
| 722 | + | ||
| 720 | 723 | // If any router is running then send save password command otherwise | |
| 721 | 724 | // save the password in DB | |
| 722 | 725 | for (VirtualRouter router : routers) { | |
| 723 | 726 | if (router.getState() == State.Running) { | |
| 724 | - return _routerMgr.savePasswordToRouter(network, nic, uservm, routers); | ||
| 727 | + return networkTopology.savePasswordToRouter(network, nic, uservm, routers); | ||
| 725 | 728 | } | |
| 726 | 729 | } | |
| 727 | 730 | String password = (String) uservm.getParameter(VirtualMachineProfile.Param.VmPassword); | |
@@ -735,10 +738,7 @@ public boolean savePassword(final Network network, final NicProfile nic, final V | |||
| 735 | 738 | userVmVO.setUpdateParameters(true); | |
| 736 | 739 | _userVmDao.update(userVmVO.getId(), userVmVO); | |
| 737 | 740 | ||
| 738 | - DataCenterVO dcVO = _dcDao.findById(network.getDataCenterId()); | ||
| 739 | - NetworkTopology networkTopology = networkTopologyContext.retrieveNetworkTopology(dcVO); | ||
| 740 | - | ||
| 741 | - return networkTopology.savePasswordToRouter(network, nic, uservm, routers); | ||
| 741 | + return true; | ||
| 742 | 742 | } | |
| 743 | 743 | ||
| 744 | 744 | @Override | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -107,6 +107,8 @@ | |||
| 107 | 107 | import com.cloud.offerings.NetworkOfferingVO; | |
| 108 | 108 | import com.cloud.offerings.dao.NetworkOfferingDao; | |
| 109 | 109 | import com.cloud.service.dao.ServiceOfferingDao; | |
| 110 | + import com.cloud.storage.GuestOSVO; | ||
| 111 | + import com.cloud.storage.dao.GuestOSDao; | ||
| 110 | 112 | import com.cloud.user.Account; | |
| 111 | 113 | import com.cloud.uservm.UserVm; | |
| 112 | 114 | import com.cloud.utils.Pair; | |
@@ -173,6 +175,8 @@ public class CommandSetupHelper { | |||
| 173 | 175 | private VlanDao _vlanDao; | |
| 174 | 176 | @Inject | |
| 175 | 177 | private IPAddressDao _ipAddressDao; | |
| 178 | + @Inject | ||
| 179 | + private GuestOSDao _guestOSDao; | ||
| 176 | 180 | ||
| 177 | 181 | @Inject | |
| 178 | 182 | private RouterControlHelper _routerControlHelper; | |
@@ -216,12 +220,17 @@ public void createApplyVpnUsersCommand(final List<? extends VpnUser> users, fina | |||
| 216 | 220 | public void createDhcpEntryCommand(final VirtualRouter router, final UserVm vm, final NicVO nic, final Commands cmds) { | |
| 217 | 221 | final DhcpEntryCommand dhcpCommand = new DhcpEntryCommand(nic.getMacAddress(), nic.getIp4Address(), vm.getHostName(), nic.getIp6Address(), | |
| 218 | 222 | _networkModel.getExecuteInSeqNtwkElmtCmd()); | |
| 219 | - final DataCenterVO dcVo = _dcDao.findById(router.getDataCenterId()); | ||
| 220 | - final Nic defaultNic = findGatewayIp(vm.getId()); | ||
| 221 | - String gatewayIp = defaultNic.getGateway(); | ||
| 222 | - if (gatewayIp != null && !gatewayIp.equals(nic.getGateway())) { | ||
| 223 | - gatewayIp = "0.0.0.0"; | ||
| 223 | + | ||
| 224 | + String gatewayIp = nic.getGateway(); | ||
| 225 | + if (!nic.isDefaultNic()) { | ||
| 226 | + GuestOSVO guestOS = _guestOSDao.findById(vm.getGuestOSId()); | ||
| 227 | + if (guestOS == null || !guestOS.getDisplayName().toLowerCase().contains("windows")) { | ||
| 228 | + gatewayIp = "0.0.0.0"; | ||
| 229 | + } | ||
| 224 | 230 | } | |
| 231 | + | ||
| 232 | + final DataCenterVO dcVo = _dcDao.findById(router.getDataCenterId()); | ||
| 233 | + | ||
| 225 | 234 | dhcpCommand.setDefaultRouter(gatewayIp); | |
| 226 | 235 | dhcpCommand.setIp6Gateway(nic.getIp6Gateway()); | |
| 227 | 236 | String ipaddress = null; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -174,7 +174,7 @@ public boolean sendCommandsToRouter(final VirtualRouter router, final Commands c | |||
| 174 | 174 | throw new AgentUnavailableException("Unable to send commands to virtual router ", router.getHostId(), e); | |
| 175 | 175 | } | |
| 176 | 176 | ||
| 177 | - if (answers == null || answers.length != cmds.size()) { | ||
| 177 | + if ((answers == null) || (answers.length != cmds.size())) { | ||
| 178 | 178 | return false; | |
| 179 | 179 | } | |
| 180 | 180 | ||
@@ -195,7 +195,7 @@ public void handleSingleWorkingRedundantRouter(final List<? extends VirtualRoute | |||
| 195 | 195 | if (connectedRouters.isEmpty() || disconnectedRouters.isEmpty()) { | |
| 196 | 196 | return; | |
| 197 | 197 | } | |
| 198 | - if (connectedRouters.size() != 1 || disconnectedRouters.size() != 1) { | ||
| 198 | + if ((connectedRouters.size() != 1) || (disconnectedRouters.size() != 1)) { | ||
| 199 | 199 | s_logger.warn("How many redundant routers do we have?? "); | |
| 200 | 200 | return; | |
| 201 | 201 | } | |
@@ -240,12 +240,6 @@ public void handleSingleWorkingRedundantRouter(final List<? extends VirtualRoute | |||
| 240 | 240 | } | |
| 241 | 241 | } | |
| 242 | 242 | ||
| 243 | - /* | ||
| 244 | - * (non-Javadoc) | ||
| 245 | - * | ||
| 246 | - * @see com.cloud.network.router.NetworkHelper#getRealPriority(com.cloud.vm. | ||
| 247 | - * DomainRouterVO) | ||
| 248 | - */ | ||
| 249 | 243 | @Override | |
| 250 | 244 | public int getRealPriority(final DomainRouterVO router) { | |
| 251 | 245 | int priority = router.getPriority(); | |
@@ -255,28 +249,13 @@ public int getRealPriority(final DomainRouterVO router) { | |||
| 255 | 249 | return priority; | |
| 256 | 250 | } | |
| 257 | 251 | ||
| 258 | - // @Override | ||
| 259 | - /* | ||
| 260 | - * (non-Javadoc) | ||
| 261 | - * | ||
| 262 | - * @see | ||
| 263 | - * com.cloud.network.router.NetworkHelper#getNicTO(com.cloud.network.router | ||
| 264 | - * .VirtualRouter, java.lang.Long, java.lang.String) | ||
| 265 | - */ | ||
| 266 | 252 | @Override | |
| 267 | 253 | public NicTO getNicTO(final VirtualRouter router, final Long networkId, final String broadcastUri) { | |
| 268 | 254 | NicProfile nicProfile = _networkModel.getNicProfile(router, networkId, broadcastUri); | |
| 269 | 255 | ||
| 270 | 256 | return _itMgr.toNicTO(nicProfile, router.getHypervisorType()); | |
| 271 | 257 | } | |
| 272 | 258 | ||
| 273 | - // @Override | ||
| 274 | - /* | ||
| 275 | - * (non-Javadoc) | ||
| 276 | - * | ||
| 277 | - * @see com.cloud.network.router.NetworkHelper#destroyRouter(long, | ||
| 278 | - * com.cloud.user.Account, java.lang.Long) | ||
| 279 | - */ | ||
| 280 | 259 | @Override | |
| 281 | 260 | public VirtualRouter destroyRouter(final long routerId, final Account caller, final Long callerUserId) throws ResourceUnavailableException, ConcurrentOperationException { | |
| 282 | 261 | ||
@@ -296,14 +275,6 @@ public VirtualRouter destroyRouter(final long routerId, final Account caller, fi | |||
| 296 | 275 | return router; | |
| 297 | 276 | } | |
| 298 | 277 | ||
| 299 | - /* | ||
| 300 | - * (non-Javadoc) | ||
| 301 | - * | ||
| 302 | - * @see | ||
| 303 | - * com.cloud.network.router.NetworkHelper#checkRouterVersion(com.cloud.network | ||
| 304 | - * .router.VirtualRouter) | ||
| 305 | - */ | ||
| 306 | - // @Override | ||
| 307 | 278 | @Override | |
| 308 | 279 | public boolean checkRouterVersion(final VirtualRouter router) { | |
| 309 | 280 | if (!VirtualNetworkApplianceManagerImpl.routerVersionCheckEnabled.value()) { | |
@@ -370,16 +341,16 @@ protected DomainRouterVO waitRouter(final DomainRouterVO router) { | |||
| 370 | 341 | ||
| 371 | 342 | @Override | |
| 372 | 343 | public List<DomainRouterVO> startRouters(final RouterDeploymentDefinition routerDeploymentDefinition) throws StorageUnavailableException, InsufficientCapacityException, | |
| 373 | - ConcurrentOperationException, ResourceUnavailableException { | ||
| 344 | + ConcurrentOperationException, ResourceUnavailableException { | ||
| 374 | 345 | ||
| 375 | 346 | List<DomainRouterVO> runningRouters = new ArrayList<DomainRouterVO>(); | |
| 376 | 347 | ||
| 377 | 348 | for (DomainRouterVO router : routerDeploymentDefinition.getRouters()) { | |
| 378 | 349 | boolean skip = false; | |
| 379 | 350 | final State state = router.getState(); | |
| 380 | - if (router.getHostId() != null && state != State.Running) { | ||
| 351 | + if ((router.getHostId() != null) && (state != State.Running)) { | ||
| 381 | 352 | final HostVO host = _hostDao.findById(router.getHostId()); | |
| 382 | - if (host == null || host.getState() != Status.Up) { | ||
| 353 | + if ((host == null) || (host.getState() != Status.Up)) { | ||
| 383 | 354 | skip = true; | |
| 384 | 355 | } | |
| 385 | 356 | } | |
@@ -399,7 +370,7 @@ public List<DomainRouterVO> startRouters(final RouterDeploymentDefinition router | |||
| 399 | 370 | public DomainRouterVO startVirtualRouter(final DomainRouterVO router, final User user, final Account caller, final Map<Param, Object> params) | |
| 400 | 371 | throws StorageUnavailableException, InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException { | |
| 401 | 372 | ||
| 402 | - if (router.getRole() != Role.VIRTUAL_ROUTER || !router.getIsRedundantRouter()) { | ||
| 373 | + if ((router.getRole() != Role.VIRTUAL_ROUTER) || !router.getIsRedundantRouter()) { | ||
| 403 | 374 | return start(router, user, caller, params, null); | |
| 404 | 375 | } | |
| 405 | 376 | ||
@@ -429,7 +400,7 @@ public DomainRouterVO startVirtualRouter(final DomainRouterVO router, final User | |||
| 429 | 400 | if (networkIds.size() != 0) { | |
| 430 | 401 | final List<DomainRouterVO> routerList = _routerDao.findByNetwork(networkIds.get(0)); | |
| 431 | 402 | for (final DomainRouterVO rrouter : routerList) { | |
| 432 | - if (rrouter.getHostId() != null && rrouter.getIsRedundantRouter() && rrouter.getState() == State.Running) { | ||
| 403 | + if ((rrouter.getHostId() != null) && rrouter.getIsRedundantRouter() && (rrouter.getState() == State.Running)) { | ||
| 433 | 404 | if (routerToBeAvoid != null) { | |
| 434 | 405 | throw new ResourceUnavailableException("Try to start router " + router.getInstanceName() + "(" + router.getId() + ")" | |
| 435 | 406 | + ", but there are already two redundant routers with IP " + router.getPublicIpAddress() + ", they are " + rrouter.getInstanceName() + "(" | |
@@ -452,7 +423,7 @@ public DomainRouterVO startVirtualRouter(final DomainRouterVO router, final User | |||
| 452 | 423 | avoids[1].addCluster(_hostDao.findById(routerToBeAvoid.getHostId()).getClusterId()); | |
| 453 | 424 | avoids[2] = new ExcludeList(); | |
| 454 | 425 | final List<VolumeVO> volumes = _volumeDao.findByInstanceAndType(routerToBeAvoid.getId(), Volume.Type.ROOT); | |
| 455 | - if (volumes != null && volumes.size() != 0) { | ||
| 426 | + if ((volumes != null) && (volumes.size() != 0)) { | ||
| 456 | 427 | avoids[2].addPool(volumes.get(0).getPoolId()); | |
| 457 | 428 | } | |
| 458 | 429 | avoids[2].addHost(routerToBeAvoid.getHostId()); | |
@@ -499,7 +470,7 @@ protected String retrieveTemplateName(final HypervisorType hType, final long dat | |||
| 499 | 470 | ||
| 500 | 471 | @Override | |
| 501 | 472 | public DomainRouterVO deployRouter(final RouterDeploymentDefinition routerDeploymentDefinition, final boolean startRouter) throws InsufficientAddressCapacityException, | |
| 502 | - InsufficientServerCapacityException, InsufficientCapacityException, StorageUnavailableException, ResourceUnavailableException { | ||
| 473 | + InsufficientServerCapacityException, InsufficientCapacityException, StorageUnavailableException, ResourceUnavailableException { | ||
| 503 | 474 | ||
| 504 | 475 | final ServiceOfferingVO routerOffering = _serviceOfferingDao.findById(routerDeploymentDefinition.getOfferingId()); | |
| 505 | 476 | final Account owner = routerDeploymentDefinition.getOwner(); | |
@@ -553,7 +524,7 @@ public DomainRouterVO deployRouter(final RouterDeploymentDefinition routerDeploy | |||
| 553 | 524 | _itMgr.allocate(router.getInstanceName(), template, routerOffering, networks, routerDeploymentDefinition.getPlan(), null); | |
| 554 | 525 | router = _routerDao.findById(router.getId()); | |
| 555 | 526 | } catch (final InsufficientCapacityException ex) { | |
| 556 | - if (allocateRetry < 2 && iter.hasNext()) { | ||
| 527 | + if ((allocateRetry < 2) && iter.hasNext()) { | ||
| 557 | 528 | s_logger.debug("Failed to allocate the VR with hypervisor type " + hType + ", retrying one more time"); | |
| 558 | 529 | continue; | |
| 559 | 530 | } else { | |
@@ -568,7 +539,7 @@ public DomainRouterVO deployRouter(final RouterDeploymentDefinition routerDeploy | |||
| 568 | 539 | router = startVirtualRouter(router, _accountMgr.getSystemUser(), _accountMgr.getSystemAccount(), routerDeploymentDefinition.getParams()); | |
| 569 | 540 | break; | |
| 570 | 541 | } catch (final InsufficientCapacityException ex) { | |
| 571 | - if (startRetry < 2 && iter.hasNext()) { | ||
| 542 | + if ((startRetry < 2) && iter.hasNext()) { | ||
| 572 | 543 | s_logger.debug("Failed to start the VR " + router + " with hypervisor type " + hType + ", " + "destroying it and recreating one more time"); | |
| 573 | 544 | // destroy the router | |
| 574 | 545 | destroyRouter(router.getId(), _accountMgr.getAccount(Account.ACCOUNT_ID_SYSTEM), User.UID_SYSTEM); | |
@@ -637,12 +608,12 @@ protected List<HypervisorType> getHypervisors(final RouterDeploymentDefinition r | |||
| 637 | 608 | protected HypervisorType getClusterToStartDomainRouterForOvm(final long podId) { | |
| 638 | 609 | final List<ClusterVO> clusters = _clusterDao.listByPodId(podId); | |
| 639 | 610 | for (final ClusterVO cv : clusters) { | |
| 640 | - if (cv.getHypervisorType() == HypervisorType.Ovm || cv.getHypervisorType() == HypervisorType.BareMetal) { | ||
| 611 | + if ((cv.getHypervisorType() == HypervisorType.Ovm) || (cv.getHypervisorType() == HypervisorType.BareMetal)) { | ||
| 641 | 612 | continue; | |
| 642 | 613 | } | |
| 643 | 614 | ||
| 644 | 615 | final List<HostVO> hosts = _resourceMgr.listAllHostsInCluster(cv.getId()); | |
| 645 | - if (hosts == null || hosts.isEmpty()) { | ||
| 616 | + if ((hosts == null) || hosts.isEmpty()) { | ||
| 646 | 617 | continue; | |
| 647 | 618 | } | |
| 648 | 619 | ||
@@ -674,13 +645,14 @@ public LinkedHashMap<Network, List<? extends NicProfile>> createRouterNetworks(f | |||
| 674 | 645 | if (!routerDeploymentDefinition.isPublicNetwork()) { | |
| 675 | 646 | final Nic placeholder = _networkModel.getPlaceholderNicForRouter(routerDeploymentDefinition.getGuestNetwork(), routerDeploymentDefinition.getPodId()); | |
| 676 | 647 | if (routerDeploymentDefinition.getGuestNetwork().getCidr() != null) { | |
| 677 | - if (placeholder != null && placeholder.getIp4Address() != null) { | ||
| 648 | + if ((placeholder != null) && (placeholder.getIp4Address() != null)) { | ||
| 678 | 649 | s_logger.debug("Requesting ipv4 address " + placeholder.getIp4Address() + " stored in placeholder nic for the network " | |
| 679 | 650 | + routerDeploymentDefinition.getGuestNetwork()); | |
| 680 | 651 | defaultNetworkStartIp = placeholder.getIp4Address(); | |
| 681 | 652 | } else { | |
| 682 | 653 | final String startIp = _networkModel.getStartIpAddress(routerDeploymentDefinition.getGuestNetwork().getId()); | |
| 683 | - if (startIp != null && _ipAddressDao.findByIpAndSourceNetworkId(routerDeploymentDefinition.getGuestNetwork().getId(), startIp).getAllocatedTime() == null) { | ||
| 654 | + if ((startIp != null) | ||
| 655 | + && (_ipAddressDao.findByIpAndSourceNetworkId(routerDeploymentDefinition.getGuestNetwork().getId(), startIp).getAllocatedTime() == null)) { | ||
| 684 | 656 | defaultNetworkStartIp = startIp; | |
| 685 | 657 | } else if (s_logger.isDebugEnabled()) { | |
| 686 | 658 | s_logger.debug("First ipv4 " + startIp + " in network id=" + routerDeploymentDefinition.getGuestNetwork().getId() | |
@@ -690,13 +662,13 @@ public LinkedHashMap<Network, List<? extends NicProfile>> createRouterNetworks(f | |||
| 690 | 662 | } | |
| 691 | 663 | ||
| 692 | 664 | if (routerDeploymentDefinition.getGuestNetwork().getIp6Cidr() != null) { | |
| 693 | - if (placeholder != null && placeholder.getIp6Address() != null) { | ||
| 665 | + if ((placeholder != null) && (placeholder.getIp6Address() != null)) { | ||
| 694 | 666 | s_logger.debug("Requesting ipv6 address " + placeholder.getIp6Address() + " stored in placeholder nic for the network " | |
| 695 | 667 | + routerDeploymentDefinition.getGuestNetwork()); | |
| 696 | 668 | defaultNetworkStartIpv6 = placeholder.getIp6Address(); | |
| 697 | 669 | } else { | |
| 698 | 670 | final String startIpv6 = _networkModel.getStartIpv6Address(routerDeploymentDefinition.getGuestNetwork().getId()); | |
| 699 | - if (startIpv6 != null && _ipv6Dao.findByNetworkIdAndIp(routerDeploymentDefinition.getGuestNetwork().getId(), startIpv6) == null) { | ||
| 671 | + if ((startIpv6 != null) && (_ipv6Dao.findByNetworkIdAndIp(routerDeploymentDefinition.getGuestNetwork().getId(), startIpv6) == null)) { | ||
| 700 | 672 | defaultNetworkStartIpv6 = startIpv6; | |
| 701 | 673 | } else if (s_logger.isDebugEnabled()) { | |
| 702 | 674 | s_logger.debug("First ipv6 " + startIpv6 + " in network id=" + routerDeploymentDefinition.getGuestNetwork().getId() | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,9 +23,7 @@ | |||
| 23 | 23 | import com.cloud.network.RemoteAccessVpn; | |
| 24 | 24 | import com.cloud.network.Site2SiteVpnConnection; | |
| 25 | 25 | import com.cloud.network.VpcVirtualNetworkApplianceService; | |
| 26 | - import com.cloud.network.VpnUser; | ||
| 27 | 26 | import com.cloud.network.vpc.PrivateGateway; | |
| 28 | - import com.cloud.network.vpc.StaticRouteProfile; | ||
| 29 | 27 | import com.cloud.vm.DomainRouterVO; | |
| 30 | 28 | ||
| 31 | 29 | public interface VpcVirtualNetworkApplianceManager extends VirtualNetworkApplianceManager, VpcVirtualNetworkApplianceService { | |
@@ -76,13 +74,4 @@ public interface VpcVirtualNetworkApplianceManager extends VirtualNetworkApplian | |||
| 76 | 74 | * @throws ResourceUnavailableException | |
| 77 | 75 | */ | |
| 78 | 76 | boolean stopRemoteAccessVpn(RemoteAccessVpn vpn, VirtualRouter router) throws ResourceUnavailableException; | |
| 79 | - | ||
| 80 | - /** | ||
| 81 | - * @param vpn | ||
| 82 | - * @param users | ||
| 83 | - * @param routers | ||
| 84 | - * @return | ||
| 85 | - * @throws ResourceUnavailableException | ||
| 86 | - */ | ||
| 87 | - String[] applyVpnUsers(RemoteAccessVpn vpn, List<? extends VpnUser> users, VirtualRouter router) throws ResourceUnavailableException; | ||
| 88 | - } | ||
| 77 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,11 +26,11 @@ | |||
| 26 | 26 | import com.cloud.network.VpnUser; | |
| 27 | 27 | import com.cloud.network.router.VirtualRouter; | |
| 28 | 28 | ||
| 29 | - public class VpnRules extends RuleApplier { | ||
| 29 | + public class BasicVpnRules extends RuleApplier { | ||
| 30 | 30 | ||
| 31 | 31 | private final List<? extends VpnUser> _users; | |
| 32 | 32 | ||
| 33 | - public VpnRules(final Network network, final List<? extends VpnUser> users) { | ||
| 33 | + public BasicVpnRules(final Network network, final List<? extends VpnUser> users) { | ||
| 34 | 34 | super(network); | |
| 35 | 35 | _users = users; | |
| 36 | 36 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -62,8 +62,12 @@ public boolean accept(final NetworkTopologyVisitor visitor, final VirtualRouter | |||
| 62 | 62 | return visitor.visit(this); | |
| 63 | 63 | } | |
| 64 | 64 | ||
| 65 | - public NicProfile getNic() { | ||
| 66 | - return _nic; | ||
| 65 | + public VirtualMachineProfile getProfile() { | ||
| 66 | + return _profile; | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + public DeployDestination getDestination() { | ||
| 70 | + return _destination; | ||
| 67 | 71 | } | |
| 68 | 72 | ||
| 69 | 73 | public NicVO getNicVo() { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,7 @@ | |||
| 27 | 27 | import com.cloud.network.router.VirtualRouter; | |
| 28 | 28 | import com.cloud.vm.NicProfile; | |
| 29 | 29 | ||
| 30 | - public class DhcpRules extends RuleApplier { | ||
| 30 | + public class DhcpPvlanRules extends RuleApplier { | ||
| 31 | 31 | ||
| 32 | 32 | private final boolean _isAddPvlan; | |
| 33 | 33 | private final NicProfile _nic; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -53,8 +53,7 @@ public boolean accept(final NetworkTopologyVisitor visitor, final VirtualRouter | |||
| 53 | 53 | // For load balancer we have to resend all lb rules for the network | |
| 54 | 54 | final List<LoadBalancerVO> lbs = loadBalancerDao.listByNetworkIdAndScheme(_network.getId(), Scheme.Public); | |
| 55 | 55 | ||
| 56 | - // We are cleaning it before because all the rules have to be sent to | ||
| 57 | - // the router. | ||
| 56 | + // We are cleaning it before because all the rules have to be sent to the router. | ||
| 58 | 57 | _rules.clear(); | |
| 59 | 58 | ||
| 60 | 59 | LoadBalancingRulesManager lbMgr = visitor.getVirtualNetworkApplianceFactory().getLbMgr(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,6 +18,9 @@ | |||
| 18 | 18 | ||
| 19 | 19 | import javax.inject.Inject; | |
| 20 | 20 | ||
| 21 | + import org.springframework.beans.factory.annotation.Autowired; | ||
| 22 | + import org.springframework.beans.factory.annotation.Qualifier; | ||
| 23 | + | ||
| 21 | 24 | import com.cloud.dc.dao.DataCenterDao; | |
| 22 | 25 | import com.cloud.dc.dao.HostPodDao; | |
| 23 | 26 | import com.cloud.dc.dao.VlanDao; | |
@@ -80,8 +83,11 @@ public class VirtualNetworkApplianceFactory { | |||
| 80 | 83 | private IpAddressManager _ipAddrMgr; | |
| 81 | 84 | @Inject | |
| 82 | 85 | private NetworkACLManager _networkACLMgr; | |
| 83 | - @Inject | ||
| 86 | + | ||
| 87 | + @Autowired | ||
| 88 | + @Qualifier("networkHelper") | ||
| 84 | 89 | private NetworkHelper _networkHelper; | |
| 90 | + | ||
| 85 | 91 | @Inject | |
| 86 | 92 | private NicProfileHelper _nicProfileHelper; | |
| 87 | 93 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments