Alona Kaplan has uploaded a new change for review. Change subject: engine: SetupNetworks ......................................................................
engine: SetupNetworks Change-Id: Ic08c952a7c1902d176709af7126f54ab37a0344d Signed-off-by: Alona Kaplan <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/SetupNetworksHelper.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/SetupNetworksVDSCommand.java 2 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/16/26616/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/SetupNetworksHelper.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/SetupNetworksHelper.java index d644bed..e1a57b1 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/SetupNetworksHelper.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/SetupNetworksHelper.java @@ -114,7 +114,7 @@ VdsNetworkInterface nic = hostInterfacesByNetworkName.get(network); if (nic != null) { if (NetworkUtils.isVlan(nic)) { - nic = nicsByName.get(NetworkUtils.stripVlan(nic.getName())); + nic = nicsByName.get(NetworkUtils.stripVlan(nic)); if (nic == null) { continue; } @@ -151,7 +151,7 @@ */ private void validateInterfacesExist() { for (VdsNetworkInterface iface : params.getInterfaces()) { - String nameWithoutVlanId = NetworkUtils.stripVlan(iface.getName()); + String nameWithoutVlanId = NetworkUtils.stripVlan(iface); if (!getExistingIfaces().containsKey(nameWithoutVlanId) && !bonds.containsKey(nameWithoutVlanId)) { addViolation(VdcBllMessages.NETWORK_INTERFACES_DONT_EXIST, nameWithoutVlanId); } @@ -225,10 +225,10 @@ * @return a list of attached networks to the given underlying interface */ private List<Network> findNetworksOnInterface(VdsNetworkInterface iface) { - String nameWithoutVlanId = NetworkUtils.stripVlan(iface.getName()); + String nameWithoutVlanId = NetworkUtils.stripVlan(iface); List<Network> networks = new ArrayList<Network>(); for (VdsNetworkInterface tmp : params.getInterfaces()) { - if (NetworkUtils.stripVlan(tmp.getName()).equals(nameWithoutVlanId) && tmp.getNetworkName() != null) { + if (NetworkUtils.stripVlan(tmp).equals(nameWithoutVlanId) && tmp.getNetworkName() != null) { if (getExistingClusterNetworks().containsKey(tmp.getNetworkName())) { networks.add(getExistingClusterNetworks().get(tmp.getNetworkName())); } @@ -441,7 +441,7 @@ * The type of the network. */ private void validateNetworkExclusiveOnIface(VdsNetworkInterface iface, NetworkType networkType) { - String ifaceName = NetworkUtils.stripVlan(iface.getName()); + String ifaceName = NetworkUtils.stripVlan(iface); List<NetworkType> networksOnIface = ifacesWithExclusiveNetwork.get(ifaceName); if (networksOnIface == null) { diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/SetupNetworksVDSCommand.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/SetupNetworksVDSCommand.java index 7b3fbdb..fb37e0c 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/SetupNetworksVDSCommand.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/SetupNetworksVDSCommand.java @@ -41,7 +41,7 @@ Map<String, Object> opts = new HashMap<String, Object>(); VdsNetworkInterface iface = findNetworkInterface(network.getName(), getParameters().getInterfaces(), getParameters().getBonds()); - String ifaceNameWithoutVlan = NetworkUtils.stripVlan(iface.getName()); + String ifaceNameWithoutVlan = NetworkUtils.stripVlan(iface); Boolean bonded = findInterfaceByName(ifaceNameWithoutVlan).getBonded(); String type = (bonded != null && bonded) ? "bonding" : "nic"; opts.put(type, ifaceNameWithoutVlan); -- To view, visit http://gerrit.ovirt.org/26616 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic08c952a7c1902d176709af7126f54ab37a0344d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
