Hello community, here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2013-11-07 09:15:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-network (Old) and /work/SRC/openSUSE:Factory/.yast2-network.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-network" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes 2013-10-20 10:55:18.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-network.new/yast2-network.changes 2013-11-07 09:15:28.000000000 +0100 @@ -1,0 +2,14 @@ +Wed Oct 30 21:43:14 UTC 2013 - mfilka@suse.com + +- bnc#847783 + - do not offer ifplugd devices as bridge port candidate +- 3.1.4 + +------------------------------------------------------------------- +Tue Oct 22 12:28:17 UTC 2013 - mfilka@suse.com + +- adapt to removal of NetworkInterfaces.HasAliases from yast2 + since 3.1.2 +- 3.1.3 + +------------------------------------------------------------------- Old: ---- yast2-network-3.1.2.tar.bz2 New: ---- yast2-network-3.1.4.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.qNeWJg/_old 2013-11-07 09:15:29.000000000 +0100 +++ /var/tmp/diff_new_pack.qNeWJg/_new 2013-11-07 09:15:29.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 3.1.2 +Version: 3.1.4 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-network-3.1.2.tar.bz2 -> yast2-network-3.1.4.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.2/CONTRIBUTING.md new/yast2-network-3.1.4/CONTRIBUTING.md --- old/yast2-network-3.1.2/CONTRIBUTING.md 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-network-3.1.4/CONTRIBUTING.md 2013-11-04 16:42:19.000000000 +0100 @@ -0,0 +1,87 @@ +YaST Contribution Guidelines +============================ + +YaST is an open source project and as such it welcomes all kinds of +contributions. If you decide to contribute, please follow these guidelines to +ensure the process is effective and pleasant both for you and YaST maintainers. + +There are two main forms of contribution: reporting bugs and performing code +changes. + +Bug Reports +----------- + +If you find a problem, please report it either using +[Bugzilla](https://bugzilla.novell.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2) +or [GitHub issues](../../issues). (For Bugzilla, use the [simplified +registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp) +if you don't have an account yet.) + +If you find a problem, please report it either using +[Bugzilla](https://bugzilla.novell.com/) or GitHub issues. We can't guarantee +that every bug will be fixed, but we'll try. + +When creating a bug report, please follow our [bug reporting +guidelines](http://en.opensuse.org/openSUSE:Report_a_YaST_bug). + +Code Changes +------------ + +We welcome all kinds of code contributions, from simple bug fixes to significant +refactorings and implementation of new features. However, before making any +non-trivial contribution, get in touch with us first — this can prevent wasted +effort on both sides. Also, have a look at our [development +documentation](http://en.opensuse.org/openSUSE:YaST_development). + +To send us your code change, use GitHub pull requests. The workflow is as +follows: + + 1. Fork the project. + + 2. Create a topic branch based on `master`. + + 3. Implement your change, including tests (if possible). Make sure you adhere + to the [Ruby style + guide](https://github.com/SUSE/style-guides/blob/master/Ruby.md). + + 4. Make sure your change didn't break anything by building the RPM package + (`rake osc:build`). The build process includes running the full testsuite. + + 5. Publish the branch and create a pull request. + + 6. YaST developers will review your change and possibly point out issues. + Adapt the code under their guidance until they are all resolved. + + 7. Finally, the pull request will get merged or rejected. + +See also [GitHub's guide on +contributing](https://help.github.com/articles/fork-a-repo). + +If you want to do multiple unrelated changes, use separate branches and pull +requests. + +Do not change the `VERSION` and `*.changes` files as this could lead to +conflicts. + +### Commits + +Each commit in the pull request should do only one thing, which is clearly +described by its commit message. Especially avoid mixing formatting changes and +functional changes into one commit. When writing commit messages, adhere to +[widely used +conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). + +If your commit is related to a bug in Buzgilla or an issue on GitHub, make sure +you mention it in the commit message for cross-reference. Use format like +bnc#775814 or gh#yast/yast-foo#42. See also [GitHub +autolinking](https://help.github.com/articles/github-flavored-markdown#references) +and [openSUSE abbreviation +reference](http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines#Current_set_of_...). + +Additional Information +---------------------- + +If you have any question, feel free to ask at the [development mailing +list](http://lists.opensuse.org/yast-devel/) or at the +[#yast](http://webchat.freenode.net/?channels=%23yast) IRC channel on freenode. +We'll do our best to provide a timely and accurate answer. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.2/VERSION new/yast2-network-3.1.4/VERSION --- old/yast2-network-3.1.2/VERSION 2013-10-16 10:28:51.000000000 +0200 +++ new/yast2-network-3.1.4/VERSION 2013-11-04 16:42:19.000000000 +0100 @@ -1 +1 @@ -3.1.2 +3.1.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.2/package/yast2-network.changes new/yast2-network-3.1.4/package/yast2-network.changes --- old/yast2-network-3.1.2/package/yast2-network.changes 2013-10-16 10:28:51.000000000 +0200 +++ new/yast2-network-3.1.4/package/yast2-network.changes 2013-11-04 16:42:19.000000000 +0100 @@ -1,4 +1,18 @@ ------------------------------------------------------------------- +Wed Oct 30 21:43:14 UTC 2013 - mfilka@suse.com + +- bnc#847783 + - do not offer ifplugd devices as bridge port candidate +- 3.1.4 + +------------------------------------------------------------------- +Tue Oct 22 12:28:17 UTC 2013 - mfilka@suse.com + +- adapt to removal of NetworkInterfaces.HasAliases from yast2 + since 3.1.2 +- 3.1.3 + +------------------------------------------------------------------- Wed Oct 16 07:09:13 UTC 2013 - mfilka@suse.com - bnc#845534 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.2/package/yast2-network.spec new/yast2-network-3.1.4/package/yast2-network.spec --- old/yast2-network-3.1.2/package/yast2-network.spec 2013-10-16 10:28:51.000000000 +0200 +++ new/yast2-network-3.1.4/package/yast2-network.spec 2013-11-04 16:42:19.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 3.1.2 +Version: 3.1.4 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.2/src/include/network/lan/complex.rb new/yast2-network-3.1.4/src/include/network/lan/complex.rb --- old/yast2-network-3.1.2/src/include/network/lan/complex.rb 2013-10-16 10:28:51.000000000 +0200 +++ new/yast2-network-3.1.4/src/include/network/lan/complex.rb 2013-11-04 16:42:19.000000000 +0100 @@ -532,21 +532,6 @@ return :edit when :delete - @pop = Builtins.sformat( - _( - "All additional addresses belonging to the interface %1\n" + - "will be deleted as well.\n" + - "\n" + - "Really continue?\n" - ), - Ops.get_string(LanItems.getCurrentItem, "ifcfg", "") - ) - if LanItems.InterfaceHasAliases && - Popup.YesNoHeadline(Label.WarningMsg, @pop) != true - # y2r: cannot break from middle of switch - # but in this function return will do - return nil - end # warn user when device to delete has STARTMODE=nfsroot (bnc#433867) if NetworkInterfaces.GetValue( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.2/src/modules/LanItems.rb new/yast2-network-3.1.4/src/modules/LanItems.rb --- old/yast2-network-3.1.2/src/modules/LanItems.rb 2013-10-16 10:28:51.000000000 +0200 +++ new/yast2-network-3.1.4/src/modules/LanItems.rb 2013-11-04 16:42:19.000000000 +0100 @@ -725,11 +725,9 @@ devname = GetDeviceName(itemId) bonded = BuildBondIndex() - if Ops.get(bonded, devname) != nil + if bonded[ devname] Builtins.y2debug( - "IsBridgeable: excluding lan item (%1: %2) - is bonded", - itemId, - devname + "IsBridgeable: excluding lan item (#{itemId}: #{devname}) - is bonded", ) return false end @@ -739,23 +737,27 @@ # exclude forbidden configurations if devtype == "br" Builtins.y2debug( - "IsBridgeable: excluding lan item (%1: %2) - is bridge", - itemId, - devname + "IsBridgeable: excluding lan item (#{itemId}: #{devname}) - is bridge", ) return false end - if Ops.get_string(ifcfg, "STARTMODE", "") == "nfsroot" - Builtins.y2debug( - "IsBridgeable: excluding lan item (%1: %2) - is nfsroot", - itemId, - devname - ) - return false - end + case ifcfg[ "STARTMODE"] + when "nfsroot" + Builtins.y2debug( + "IsBridgeable: excluding lan item (#{itemId}: #{devname}) - is nfsroot", + ) + return false - true + when "ifplugd" + Builtins.y2debug( + "IsBridgeable: excluding lan item (#{itemId}: #{devname}) - ifplugd", + ) + return false + + else + return true + end end # Iterates over all items and lists those for which given validator returns @@ -1454,16 +1456,6 @@ Ops.get_string(@Items, [@current, "table_descr", "rich_descr"], "") end - - # Check if the given device has any virtual alias. - # @param dev device to be checked - # @return true if there are some aliases - def InterfaceHasAliases - NetworkInterfaces.HasAliases( - Ops.get_string(@Items, [@current, "ifcfg"], "") - ) - end - # Select the hardware component # @param hw the component def SelectHWMap(hardware) @@ -2647,7 +2639,6 @@ publish :function => :isCurrentHotplug, :type => "boolean ()" publish :function => :isCurrentDHCP, :type => "boolean ()" publish :function => :GetItemDescription, :type => "string ()" - publish :function => :InterfaceHasAliases, :type => "boolean ()" publish :function => :SelectHWMap, :type => "void (map)" publish :function => :SelectHW, :type => "void (integer)" publish :function => :FreeDevices, :type => "list (string)" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.2/test/Makefile.am new/yast2-network-3.1.4/test/Makefile.am --- old/yast2-network-3.1.2/test/Makefile.am 2013-10-16 10:28:51.000000000 +0200 +++ new/yast2-network-3.1.4/test/Makefile.am 2013-11-04 16:42:19.000000000 +0100 @@ -1,7 +1,9 @@ TESTS = \ netcard_test.rb \ edit_nic_name_test.rb \ - lan_udev_auto_test.rb + lan_udev_auto_test.rb \ + bridge_test.rb \ + routing_test.rb TEST_EXTENSIONS = .rb RB_LOG_COMPILER = rspec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.2/test/bridge_test.rb new/yast2-network-3.1.4/test/bridge_test.rb --- old/yast2-network-3.1.2/test/bridge_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-network-3.1.4/test/bridge_test.rb 2013-11-04 16:42:19.000000000 +0100 @@ -0,0 +1,91 @@ +#! /usr/bin/env rspec + +ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) + +require "yast" + +include Yast + +Yast.import "LanItems" + +module Yast + describe LanItems do + + NETCONFIG_ITEMS = { + "eth" => { + "eth1" => { "BOOTPROTO" => "none" }, + "eth2" => { "BOOTPROTO" => "none" }, + "eth4" => { + "BOOTPROTO" => "static", + "IPADDR" => "0.0.0.0", + "PREFIX" => "32" + }, + "eth5" => { "BOOTPROTO" => "static", "STARTMODE" => "nfsroot" }, + "eth6" => { "BOOTPROTO" => "static", "STARTMODE" => "ifplugd" }, + }, + "tun" => { + "tun0" => { + "BOOTPROTO" => "static", + "STARTMODE" => "onboot", + "TUNNEL" => "tun" + }, + }, + "tap" => { + "tap0" => { + "BOOTPROTO" => "static", + "STARTMODE" => "onboot", + "TUNNEL" => "tap" + }, + }, + "br" => { + "br0" => { "BOOTPROTO" => "dhcp" }, + }, + "bond" => { + "bond0" => { + "BOOTPROTO" => "static", + "BONDING_MASTER" => "yes", + "BONDING_SLAVE0" => "eth1", + "BONDING_SLAVE1" => "eth2" + } + } + } + + HWINFO_ITEMS = [ + { "dev_name" => "eth11" }, + { "dev_name" => "eth12" } + ] + + EXPECTED_BRIDGEABLE = [ + "bond0", + "eth4", + "eth11", + "eth12", + "tap0", + "tun0" + ] + + before(:each) do + NetworkInterfaces.stub(:FilterDevices).with("netcard") { NETCONFIG_ITEMS } + + LanItems.stub(:ReadHardware) { HWINFO_ITEMS } + LanItems.Read + end + + describe "#GetBridgeableInterfaces" do + + before(:each) do + # FindAndSelect initializes internal state of LanItems it + # is used internally by some helpers + LanItems.FindAndSelect("br0") + end + + it "returns list of slave candidates" do + expect( + LanItems + .GetBridgeableInterfaces(LanItems.GetCurrentName) + .map { |i| LanItems.GetDeviceName(i) } + ).to match_array EXPECTED_BRIDGEABLE + end + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.2/testsuite/tests/bridge.out new/yast2-network-3.1.4/testsuite/tests/bridge.out --- old/yast2-network-3.1.2/testsuite/tests/bridge.out 2013-10-16 10:28:51.000000000 +0200 +++ new/yast2-network-3.1.4/testsuite/tests/bridge.out 1970-01-01 01:00:00.000000000 +0100 @@ -1,104 +0,0 @@ -Read .target.tmpdir nil -Log Failed to set temporary directory: nil -Read .probe.architecture "i386" -Read .sysconfig.console.CONSOLE_ENCODING "UTF-8" -Execute .target.bash_output "locale -k charmap" $["exit":0, "stderr":"", "stdout":"charset=UTF-8"] -Read .target.size "/etc/install.inf" nil -Dir .etc.install_inf: [] -Read .target.string "/proc/cmdline" nil -Read .probe.netcard [$["bus":"PCI", "bus_hwcfg":"pci", "class_id":2, "dev_name":"eth11", "dev_names":["eth11"], "device_id":70914, "driver":"e1000e", "driver_module":"e1000e", "drivers":[$["active":true, "modprobe":true, "modules":[["e1000e", ""]]]], "modalias":"pci:v00008086d00001502sv000017AAsd000021F3bc02sc00i00", "model":"Intel Ethernet controller", "old_unique_key":"wH9Z.41x4AT4gee2", "resource":$["hwaddr":[$["addr":"00:01:02:03:04:05"]], "io":[$["active":true, "length":32, "mode":"rw", "start":24704]], "irq":[$["count":0, "enabled":true, "irq":20]], "mem":[$["active":true, "length":131072, "start":4087349248], $["active":true, "length":4096, "start":4087590912]]], "rev":"4", "slot_id":25, "sub_class_id":0, "sub_device_id":74227, "sub_vendor":"Vendor", "sub_vendor_id":7, "sysfs_bus_id":"0000:00:19.0", "sysfs_id":"/devices/pci0000:00/0000:00:19.0", "unique_key":"rBUF.41x4AT4gee2", "vendor":"Intel Corporation", "vendor_id":98438], $["bus":"PCI", "bus_hwcfg":"pci", "class_id":2, "dev_name":"eth12", "dev_names":["eth12"], "device_id":70914, "driver":"e1000e", "driver_module":"e1000e", "drivers":[$["active":true, "modprobe":true, "modules":[["e1000e", ""]]]], "modalias":"pci:v00008086d00001502sv000017AAsd000021F3bc02sc00i00", "model":"Intel Ethernet controller", "old_unique_key":"wH9Z.41x4AT4gee2", "resource":$["hwaddr":[$["addr":"00:11:12:13:14:15"]], "io":[$["active":true, "length":32, "mode":"rw", "start":24704]], "irq":[$["count":0, "enabled":true, "irq":20]], "mem":[$["active":true, "length":131072, "start":4087349248], $["active":true, "length":4096, "start":4087590912]]], "rev":"4", "slot_id":25, "sub_class_id":0, "sub_device_id":74227, "sub_vendor":"Vendor", "sub_vendor_id":7, "sysfs_bus_id":"0000:00:19.0", "sysfs_id":"/devices/pci0000:00/0000:00:19.0", "unique_key":"rBUF.41x4AT4gee2", "vendor":"Intel Corporation", "vendor_id":98438]] -Read .etc.install_inf.BrokenModules nil -Read .udev_persistent.net nil -Dir .modules.options: [] -Read .udev_persistent.drivers nil -Dir .network.section: ["bond0", "br0", "eth1", "eth2", "eth4", "eth5", "tap0", "tun0"] -Dir .network.value."bond0": ["BONDING_MASTER", "BONDING_SLAVE0", "BONDING_SLAVE1", "BOOTPROTO"] -Read .network.value."bond0".BONDING_MASTER "yes" -Read .network.value."bond0".BONDING_SLAVE0 "eth1" -Read .network.value."bond0".BONDING_SLAVE1 "eth2" -Read .network.value."bond0".BOOTPROTO "static" -Dir .network.value."br0": ["BOOTPROTO"] -Read .network.value."br0".BOOTPROTO "dhcp" -Read .target.stat "/sys/class/net/br0/type" nil -Read .target.string "/sys/class/net/br0/type" nil -Dir .network.value."eth1": ["BOOTPROTO"] -Read .network.value."eth1".BOOTPROTO "none" -Read .target.stat "/sys/class/net/eth1/type" nil -Read .target.string "/sys/class/net/eth1/type" nil -Dir .network.value."eth2": ["BOOTPROTO"] -Read .network.value."eth2".BOOTPROTO "none" -Read .target.stat "/sys/class/net/eth2/type" nil -Read .target.string "/sys/class/net/eth2/type" nil -Dir .network.value."eth4": ["BOOTPROTO", "IPADDR", "PREFIX"] -Read .network.value."eth4".BOOTPROTO "static" -Read .network.value."eth4".IPADDR "0.0.0.0" -Read .network.value."eth4".PREFIX "32" -Read .target.stat "/sys/class/net/eth4/type" nil -Read .target.string "/sys/class/net/eth4/type" nil -Dir .network.value."eth5": ["BOOTPROTO", "STARTMODE"] -Read .network.value."eth5".BOOTPROTO "static" -Read .network.value."eth5".STARTMODE "nfsroot" -Read .target.stat "/sys/class/net/eth5/type" nil -Read .target.string "/sys/class/net/eth5/type" nil -Dir .network.value."tap0": ["BOOTPROTO", "STARTMODE", "TUNNEL"] -Read .network.value."tap0".BOOTPROTO "static" -Read .network.value."tap0".STARTMODE "onboot" -Read .network.value."tap0".TUNNEL "tap" -Dir .network.value."tun0": ["BOOTPROTO", "STARTMODE", "TUNNEL"] -Read .network.value."tun0".BOOTPROTO "static" -Read .network.value."tun0".STARTMODE "onboot" -Read .network.value."tun0".TUNNEL "tun" -Read .target.lstat "/etc/sysconfig/network/ifcfg-eth-pcmcia" nil -Read .target.lstat "/etc/sysconfig/network/ifcfg-eth-usb" nil -Read .target.lstat "/etc/sysconfig/network/ifcfg-tr-pcmcia" nil -Read .target.lstat "/etc/sysconfig/network/ifcfg-tr-usb" nil -Return nil -Dump LanItems::GetBridgeableInterfaces -Read .target.stat "/sys/class/net/bond0/type" nil -Read .target.string "/sys/class/net/bond0/type" nil -Read .target.stat "/sys/class/net/bond0/type" nil -Read .target.string "/sys/class/net/bond0/type" nil -Read .target.stat "/sys/class/net/bond0/type" nil -Read .target.string "/sys/class/net/bond0/type" nil -Read .target.stat "/sys/class/net/bond0/type" nil -Read .target.string "/sys/class/net/bond0/type" nil -Read .target.stat "/sys/class/net/eth1/type" nil -Read .target.string "/sys/class/net/eth1/type" nil -Read .target.stat "/sys/class/net/eth1/type" nil -Read .target.string "/sys/class/net/eth1/type" nil -Read .target.stat "/sys/class/net/eth2/type" nil -Read .target.string "/sys/class/net/eth2/type" nil -Read .target.stat "/sys/class/net/eth2/type" nil -Read .target.string "/sys/class/net/eth2/type" nil -Read .target.stat "/sys/class/net/eth4/type" nil -Read .target.string "/sys/class/net/eth4/type" nil -Read .target.stat "/sys/class/net/eth4/type" nil -Read .target.string "/sys/class/net/eth4/type" nil -Read .target.stat "/sys/class/net/eth4/type" nil -Read .target.string "/sys/class/net/eth4/type" nil -Read .target.stat "/sys/class/net/eth4/type" nil -Read .target.string "/sys/class/net/eth4/type" nil -Read .target.stat "/sys/class/net/eth5/type" nil -Read .target.string "/sys/class/net/eth5/type" nil -Read .target.stat "/sys/class/net/eth5/type" nil -Read .target.string "/sys/class/net/eth5/type" nil -Read .target.stat "/sys/class/net/eth5/type" nil -Read .target.string "/sys/class/net/eth5/type" nil -Read .target.stat "/sys/class/net/eth5/type" nil -Read .target.string "/sys/class/net/eth5/type" nil -Read .target.stat "/sys/class/net/tun0/type" nil -Read .target.string "/sys/class/net/tun0/type" nil -Read .target.stat "/sys/class/net/tun0/type" nil -Read .target.string "/sys/class/net/tun0/type" nil -Read .target.stat "/sys/class/net/tun0/type" nil -Read .target.string "/sys/class/net/tun0/type" nil -Read .target.stat "/sys/class/net/tun0/type" nil -Read .target.string "/sys/class/net/tun0/type" nil -Read .target.stat "/sys/class/net/tap0/type" nil -Read .target.string "/sys/class/net/tap0/type" nil -Read .target.stat "/sys/class/net/tap0/type" nil -Read .target.string "/sys/class/net/tap0/type" nil -Read .target.stat "/sys/class/net/tap0/type" nil -Read .target.string "/sys/class/net/tap0/type" nil -Read .target.stat "/sys/class/net/tap0/type" nil -Read .target.string "/sys/class/net/tap0/type" nil diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.2/testsuite/tests/bridge.rb new/yast2-network-3.1.4/testsuite/tests/bridge.rb --- old/yast2-network-3.1.2/testsuite/tests/bridge.rb 2013-10-16 10:28:51.000000000 +0200 +++ new/yast2-network-3.1.4/testsuite/tests/bridge.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,196 +0,0 @@ -# encoding: utf-8 - -module Yast - class BridgeClient < Client - def main - Yast.import "Assert" - Yast.import "Testsuite" - - @READ = { - "network" => { - "section" => { - "eth1" => nil, - "eth2" => nil, - "eth4" => nil, - "eth5" => nil, - "tun0" => nil, - "tap0" => nil, - "br0" => nil, - "bond0" => nil - }, - "value" => { - "eth1" => { "BOOTPROTO" => "none" }, - "eth2" => { "BOOTPROTO" => "none" }, - "eth4" => { - "BOOTPROTO" => "static", - "IPADDR" => "0.0.0.0", - "PREFIX" => "32" - }, - "eth5" => { "BOOTPROTO" => "static", "STARTMODE" => "nfsroot" }, - "tun0" => { - "BOOTPROTO" => "static", - "STARTMODE" => "onboot", - "TUNNEL" => "tun" - }, - "tap0" => { - "BOOTPROTO" => "static", - "STARTMODE" => "onboot", - "TUNNEL" => "tap" - }, - "br0" => { "BOOTPROTO" => "dhcp" }, - "bond0" => { - "BOOTPROTO" => "static", - "BONDING_MASTER" => "yes", - "BONDING_SLAVE0" => "eth1", - "BONDING_SLAVE1" => "eth2" - } - } - }, - "probe" => { - "architecture" => "i386", - "netcard" => [ - # yast2-network lists those as "Not configured" devices (no matching ifcfg files are defined) - { - "bus" => "PCI", - "bus_hwcfg" => "pci", - "class_id" => 2, - "dev_name" => "eth11", - "dev_names" => ["eth11"], - "device_id" => 70914, - "driver" => "e1000e", - "driver_module" => "e1000e", - "drivers" => [ - { - "active" => true, - "modprobe" => true, - "modules" => [["e1000e", ""]] - } - ], - "modalias" => "pci:v00008086d00001502sv000017AAsd000021F3bc02sc00i00", - "model" => "Intel Ethernet controller", - "old_unique_key" => "wH9Z.41x4AT4gee2", - "resource" => { - "hwaddr" => [{ "addr" => "00:01:02:03:04:05" }], - "io" => [ - { - "active" => true, - "length" => 32, - "mode" => "rw", - "start" => 24704 - } - ], - "irq" => [{ "count" => 0, "enabled" => true, "irq" => 20 }], - "mem" => [ - { - "active" => true, - "length" => 131072, - "start" => 4087349248 - }, - { "active" => true, "length" => 4096, "start" => 4087590912 } - ] - }, - "rev" => "4", - "slot_id" => 25, - "sub_class_id" => 0, - "sub_device_id" => 74227, - "sub_vendor" => "Vendor", - "sub_vendor_id" => 7, - "sysfs_bus_id" => "0000:00:19.0", - "sysfs_id" => "/devices/pci0000:00/0000:00:19.0", - "unique_key" => "rBUF.41x4AT4gee2", - "vendor" => "Intel Corporation", - "vendor_id" => 98438 - }, - { - "bus" => "PCI", - "bus_hwcfg" => "pci", - "class_id" => 2, - "dev_name" => "eth12", - "dev_names" => ["eth12"], - "device_id" => 70914, - "driver" => "e1000e", - "driver_module" => "e1000e", - "drivers" => [ - { - "active" => true, - "modprobe" => true, - "modules" => [["e1000e", ""]] - } - ], - "modalias" => "pci:v00008086d00001502sv000017AAsd000021F3bc02sc00i00", - "model" => "Intel Ethernet controller", - "old_unique_key" => "wH9Z.41x4AT4gee2", - "resource" => { - "hwaddr" => [{ "addr" => "00:11:12:13:14:15" }], - "io" => [ - { - "active" => true, - "length" => 32, - "mode" => "rw", - "start" => 24704 - } - ], - "irq" => [{ "count" => 0, "enabled" => true, "irq" => 20 }], - "mem" => [ - { - "active" => true, - "length" => 131072, - "start" => 4087349248 - }, - { "active" => true, "length" => 4096, "start" => 4087590912 } - ] - }, - "rev" => "4", - "slot_id" => 25, - "sub_class_id" => 0, - "sub_device_id" => 74227, - "sub_vendor" => "Vendor", - "sub_vendor_id" => 7, - "sysfs_bus_id" => "0000:00:19.0", - "sysfs_id" => "/devices/pci0000:00/0000:00:19.0", - "unique_key" => "rBUF.41x4AT4gee2", - "vendor" => "Intel Corporation", - "vendor_id" => 98438 - } - ] - }, - "sysconfig" => { "console" => { "CONSOLE_ENCODING" => "UTF-8" } } - } - - @EXEC = { - "target" => { - "bash_output" => { - "exit" => 0, - "stdout" => "charset=UTF-8", - "stderr" => "" - } - } - } - - Testsuite.Init([@READ, {}, @EXEC], nil) - - Yast.import "NetworkInterfaces" - Yast.import "LanItems" - - Testsuite.Test(LanItems.Read, [@READ, {}, @EXEC], nil) - - Testsuite.Dump("LanItems::GetBridgeableInterfaces") - @expected_bridgeable = ["bond0", "eth11", "eth12", "eth4", "tap0", "tun0"] - @bridgeable_devs = [] - - # query bridgeable devices and make testsuite independent of internal sorting of LanItems - Assert.Equal(true, LanItems.FindAndSelect("br0")) # set up context for GetBondableInterfaces - - @bridgeable_devs = Builtins.maplist( - LanItems.GetBridgeableInterfaces(LanItems.GetCurrentName) - ) { |itemId| LanItems.GetDeviceName(itemId) } - @bridgeable_devs = Builtins.sort(@bridgeable_devs) - - Assert.Equal(@expected_bridgeable, @bridgeable_devs) - - nil - end - end -end - -Yast::BridgeClient.new.main -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org