Hello community, here is the log from the commit of package yast2-fcoe-client for openSUSE:Factory checked in at 2013-06-28 12:01:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-fcoe-client (Old) and /work/SRC/openSUSE:Factory/.yast2-fcoe-client.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-fcoe-client" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-fcoe-client/yast2-fcoe-client.changes 2013-02-28 10:24:04.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-fcoe-client.new/yast2-fcoe-client.changes 2013-06-28 12:01:12.000000000 +0200 @@ -2 +2 @@ -Wed May 16 14:47:54 CEST 2012 - [email protected] +Thu Jun 20 10:14:38 CEST 2013 - [email protected] @@ -4 +4,11 @@ -- Add 'Retry' button, internal code cleanup +- Allow several VLAN interfaces per network device, including + special handling of VLAN id 0 (see bnc #813621) +- V 2.23.0 + +------------------------------------------------------------------- +Wed May 15 14:09:09 CEST 2013 - [email protected] + +- Detect FCoE capable interfaces correctly (bnc #813621) +- Write configuration files for VLAN id 0 (bnc #812602) +- Show MAC address (bnc #812601) +- V 2.22.4 Old: ---- yast2-fcoe-client-2.22.3.tar.bz2 New: ---- yast2-fcoe-client-2.23.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-fcoe-client.spec ++++++ --- /var/tmp/diff_new_pack.CJi7Mp/_old 2013-06-28 12:01:13.000000000 +0200 +++ /var/tmp/diff_new_pack.CJi7Mp/_new 2013-06-28 12:01:13.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-fcoe-client -Version: 2.22.3 +Version: 2.23.0 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-fcoe-client-2.22.3.tar.bz2 -> yast2-fcoe-client-2.23.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.22.3/Makefile.am new/yast2-fcoe-client-2.23.0/Makefile.am --- old/yast2-fcoe-client-2.22.3/Makefile.am 2013-02-22 10:51:00.000000000 +0100 +++ new/yast2-fcoe-client-2.23.0/Makefile.am 2013-06-24 16:10:13.000000000 +0200 @@ -158,19 +158,14 @@ TAGVERSION = $(Y2TOOL) tagversion -check-up-to-date check-cvs-up-to-date check-svn-up-to-date: - if [ -d $(srcdir)/CVS ]; then \ - cd $(srcdir) && ! cvs -q -n up 2>/dev/null | grep '^[MCAR] ';\ - else \ - cd $(srcdir) && ! LC_ALL=C svn status --show-updates --quiet | grep -v '^Status against revision' ;\ +# check if there is no modified files and all commits were pushed +check-up-to-date: + if [ `git status --short --branch | sed '/##[^[]*$/d;/^??/d' | wc -l` -gt 0 ]; then \ + (echo "ERROR: Source is not commited and pushed. See `git status`"; false) \ fi check-tagversion: - @if [ -d $(srcdir)/CVS ]; then \ - cd $(srcdir) && cvs status -v VERSION | grep -w `$(TAGVERSION) -n` ;\ - else \ - cd $(srcdir) && svn cat `$(TAGVERSION) --echourl`/VERSION; \ - fi >/dev/null; \ + cd $(srcdir) && $(TAGVERSION) --check >/dev/null; \ [ $$? = 0 ] || ( echo "ERROR: Please run 'tagversion' first"; false ) check-parse-old: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.22.3/Makefile.am.common new/yast2-fcoe-client-2.23.0/Makefile.am.common --- old/yast2-fcoe-client-2.22.3/Makefile.am.common 2013-02-22 10:51:00.000000000 +0100 +++ new/yast2-fcoe-client-2.23.0/Makefile.am.common 2013-06-24 16:10:13.000000000 +0200 @@ -31,7 +31,7 @@ CHECK_SYNTAX = true check-syntax: $(client_DATA) $(ycpchook) $(ybcfiles) - @if test "$(client_DATA)"; then \ + @if test "$(filter %.ycp,client_DATA)"; then \ if $(CHECK_SYNTAX); then \ TO_CHECK="$(filter %.ycp,$^)"; \ echo "Checking syntax of $${TO_CHECK}"; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.22.3/Makefile.in new/yast2-fcoe-client-2.23.0/Makefile.in --- old/yast2-fcoe-client-2.22.3/Makefile.in 2013-02-22 10:51:06.000000000 +0100 +++ new/yast2-fcoe-client-2.23.0/Makefile.in 2013-06-24 16:10:19.000000000 +0200 @@ -980,19 +980,14 @@ package: check-up-to-date check-tagversion check-textdomain package-local -check-up-to-date check-cvs-up-to-date check-svn-up-to-date: - if [ -d $(srcdir)/CVS ]; then \ - cd $(srcdir) && ! cvs -q -n up 2>/dev/null | grep '^[MCAR] ';\ - else \ - cd $(srcdir) && ! LC_ALL=C svn status --show-updates --quiet | grep -v '^Status against revision' ;\ +# check if there is no modified files and all commits were pushed +check-up-to-date: + if [ `git status --short --branch | sed '/##[^[]*$/d;/^??/d' | wc -l` -gt 0 ]; then \ + (echo "ERROR: Source is not commited and pushed. See `git status`"; false) \ fi check-tagversion: - @if [ -d $(srcdir)/CVS ]; then \ - cd $(srcdir) && cvs status -v VERSION | grep -w `$(TAGVERSION) -n` ;\ - else \ - cd $(srcdir) && svn cat `$(TAGVERSION) --echourl`/VERSION; \ - fi >/dev/null; \ + cd $(srcdir) && $(TAGVERSION) --check >/dev/null; \ [ $$? = 0 ] || ( echo "ERROR: Please run 'tagversion' first"; false ) check-parse-old: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.22.3/VERSION new/yast2-fcoe-client-2.23.0/VERSION --- old/yast2-fcoe-client-2.22.3/VERSION 2013-01-22 11:18:22.000000000 +0100 +++ new/yast2-fcoe-client-2.23.0/VERSION 2013-06-20 10:30:51.000000000 +0200 @@ -1 +1 @@ -2.22.3 +2.23.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.22.3/configure new/yast2-fcoe-client-2.23.0/configure --- old/yast2-fcoe-client-2.22.3/configure 2013-02-22 10:51:05.000000000 +0100 +++ new/yast2-fcoe-client-2.23.0/configure 2013-06-24 16:10:18.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for yast2-fcoe-client 2.22.3. +# Generated by GNU Autoconf 2.69 for yast2-fcoe-client 2.23.0. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -579,8 +579,8 @@ # Identity of this package. PACKAGE_NAME='yast2-fcoe-client' PACKAGE_TARNAME='yast2-fcoe-client' -PACKAGE_VERSION='2.22.3' -PACKAGE_STRING='yast2-fcoe-client 2.22.3' +PACKAGE_VERSION='2.23.0' +PACKAGE_STRING='yast2-fcoe-client 2.23.0' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' PACKAGE_URL='' @@ -1247,7 +1247,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures yast2-fcoe-client 2.22.3 to adapt to many kinds of systems. +\`configure' configures yast2-fcoe-client 2.23.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1319,7 +1319,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-fcoe-client 2.22.3:";; + short | recursive ) echo "Configuration of yast2-fcoe-client 2.23.0:";; esac cat <<\_ACEOF @@ -1399,7 +1399,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yast2-fcoe-client configure 2.22.3 +yast2-fcoe-client configure 2.23.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1416,7 +1416,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yast2-fcoe-client $as_me 2.22.3, which was +It was created by yast2-fcoe-client $as_me 2.23.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2355,7 +2355,7 @@ # Define the identity of the package. PACKAGE='yast2-fcoe-client' - VERSION='2.22.3' + VERSION='2.23.0' cat >>confdefs.h <<_ACEOF @@ -2478,7 +2478,7 @@ -VERSION="2.22.3" +VERSION="2.23.0" RPMNAME="yast2-fcoe-client" MAINTAINER="Gabriele Mohr <[email protected]>" @@ -3404,7 +3404,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by yast2-fcoe-client $as_me 2.22.3, which was +This file was extended by yast2-fcoe-client $as_me 2.23.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3457,7 +3457,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -yast2-fcoe-client config.status 2.22.3 +yast2-fcoe-client config.status 2.23.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.22.3/configure.in new/yast2-fcoe-client-2.23.0/configure.in --- old/yast2-fcoe-client-2.22.3/configure.in 2013-02-22 10:51:00.000000000 +0100 +++ new/yast2-fcoe-client-2.23.0/configure.in 2013-06-24 16:10:13.000000000 +0200 @@ -1,9 +1,9 @@ dnl configure.in for yast2-fcoe-client dnl -dnl -- This file is generated by y2autoconf 2.23.2 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.24.0 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-fcoe-client, 2.22.3, http://bugs.opensuse.org/, yast2-fcoe-client) +AC_INIT(yast2-fcoe-client, 2.23.0, http://bugs.opensuse.org/, yast2-fcoe-client) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE(tar-ustar -Wno-portability) dnl Important YaST2 variables -VERSION="2.22.3" +VERSION="2.23.0" RPMNAME="yast2-fcoe-client" MAINTAINER="Gabriele Mohr <[email protected]>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.22.3/src/FcoeClient.ycp new/yast2-fcoe-client-2.23.0/src/FcoeClient.ycp --- old/yast2-fcoe-client-2.22.3/src/FcoeClient.ycp 2013-01-22 11:18:22.000000000 +0100 +++ new/yast2-fcoe-client-2.23.0/src/FcoeClient.ycp 2013-06-20 10:10:51.000000000 +0200 @@ -81,6 +81,26 @@ boolean write_only = false; /** + */ +boolean test_mode = false; + +/** + * Constructor + */ +global void FcoeClient() +{ + if ( getenv("FCOE_CLIENT_TEST_MODE") == "1" ) + { + y2milestone( "Running in test mode" ); + test_mode = true; + } + else + { + test_mode = false; + } +} + +/** * Abort function * return boolean return true if abort */ @@ -131,6 +151,14 @@ } /** + * @return true if test mode is set (environment variable FCOE_CLIENT_TEST_MODE) + */ +global boolean TestMode() +{ + return test_mode; +} + +/** * Set write_only flag (for autoinstallation). */ global void SetWriteOnly(boolean value) { @@ -229,7 +257,9 @@ // map containing information about networks cards and VLAN, FCoE and DCB status list <map> network_interfaces = []; -// Returns the map containing all detected interfaces including +// Returns the map containing all detected interfaces (possibly including +// several entries for a network interface if several VLAN interfaces are +// detected) global list <map> GetNetworkCards() { return network_interfaces; @@ -299,12 +329,12 @@ //eth0 | 200 | 00:0d:ec:a2:ef:00 //eth3 | 200 | 00:0d:ec:a2:ef:01 // -global map GetVlanInterfaces( list net_devices ) +global map<string, list> GetVlanInterfaces( list net_devices ) { // Add option -u (or --link_up): don't shut down interfaces // to be able to detect DCB state afterwards (see bnc #737683) string vlan_cmd = "LANG=POSIX fipvlan -u"; - map vlan_info = $[]; + map<string, list> vlan_info = $[]; if ( !Mode::autoinst() ) vlan_cmd = vlan_cmd + " -l " + FcoeClient::number_of_retries; // reduce number of retries @@ -317,21 +347,60 @@ y2milestone( "Executing command: %1", vlan_cmd ); map output = (map)SCR::Execute( .target.bash_output, vlan_cmd ); y2milestone( "Output: %1", output ); - - list <string> lines = splitstring( output["stdout"]:"", "\n" ); + + list <string> lines = []; + if ( !TestMode() ) + { + lines = splitstring( output["stdout"]:"", "\n" ); + } + else // test data + { + lines = splitstring("Fibre Channel Forwarders +< Discovered\ninterface | VLAN | FCF MAC +< \n------------------------------------------\neth1 | 500 |54:7f:ee:09:55:9f\neth15 | 2012 |54:7f:ee:04:55:9f\neth15 | 0 | 54:7f:ee:04:55:9f\neth15 | 200 | 54:7f:ee:04:55:9f\neth1 | 301 |54:7f:ee:06:55:9f\neth1 | 400 |54:7f:ee:07:55:9f\n\n", "\n"); + } foreach ( string dev, (list<string>)net_devices, { foreach( string line, (list<string>)lines, { - // check whether there is a line for the given interface, e.g. + // Check whether there is a line for the given interface, e.g. // eth3 | 200 | 00:0d:ec:a2:ef:00\n - // and extract name/number of VLAN channel. - if ( String::StartsWith( line, dev ) ) + // Get VLAN channel from second column and FCF MAC from third. + line = deletechars( line, " \t" ); + list<string> columns = splitstring( line, "|" ); + if ( columns[0]:"" == dev ) { - line = deletechars( line, " \t" ); - string vlan_interface = substring( line, findfirstof( line, "|" )+1, - findlastof( line, "|" )-findfirstof( line, "|")-1 ); - y2milestone( "Interface: %1 VLAN: %2", dev, vlan_interface ); - vlan_info = add( vlan_info, dev, vlan_interface ); + // get VLAN and FCF MAC and add it to vlan_info + map<string, string> vlan_interface = $["vlan":columns[1]:""]; + vlan_interface = add( vlan_interface, "fcf", columns[2]:""); + y2milestone( "Interface: %1 VLAN: %2 FCF: %3", dev, columns[1]:"", columns[2]:"" ); + + if ( vlan_info[dev]:[] == [] ) + { + vlan_info = add( vlan_info, dev, [vlan_interface] ); + } + else + { + list<map> vlans = (list<map>)vlan_info[dev]:[]; + + // add vlan_interface only if no entry with identical FCF MAC exists + if ( find ( map vlan, vlans, ``(vlan["fcf"]:"" == vlan_interface["fcf"]:"")) == nil ) + { + vlans = add( vlans, vlan_interface ); + } + else if ( vlan_interface["vlan"]:"" == "0" ) // for VLAN = 0 replace existing entry + { + // VLAN = 0 'wins' (see bnc #813621, comment #4) + vlans = maplist ( map vlan, vlans, { + if ( vlan["fcf"]:"" == vlan_interface["fcf"]:"" ) + { + y2milestone("VLAN = 0 is taken"); + vlan["vlan"] = "0"; + } + return vlan; + }); + } + vlan_info[dev] = vlans; + } } } ); } ); @@ -357,6 +426,9 @@ { string vlan_device_name = ""; + if ( TestMode() && interface != "eth15" ) + return interface + "." + vlan_interface; + string command = sformat( "sed -n 's/\\([^ ]*\\) *.*%1*.*%2/\\1/p' /proc/net/vlan/config", vlan_interface, interface ); y2milestone( "Executing command: %1", command ); @@ -370,6 +442,10 @@ { y2milestone( "Returning: %1", vlan_device_name ); } + else + { + y2error( "FCoE VLAN not found in /proc/net/vlan/config" ); + } return vlan_device_name; } @@ -380,17 +456,20 @@ global map<string, string> CreateFcoeConfig( string vlan_device_name, map netcard ) { string file_name = ""; + string device_name = ""; boolean file_exists = false; map <string, string> status_map = $[]; - // if AUTO_VLAN is set to "yes" - if ( netcard["auto_vlan"]:"no" == "yes" ) + // if AUTO_VLAN is set to "yes" or VLAN is set to "0" (means no VLAN created but FCoE started on device) + if ( netcard["auto_vlan"]:"no" == "yes" || netcard["vlan_interface"]:"" == "0" ) { + device_name = netcard["dev_name"]:""; // set file name to cfg-<interface>, e.g. /etc/fcoe/cfg-eth3 - file_name = sformat( "/etc/fcoe/cfg-%1", netcard["dev_name"]:"" ); + file_name = sformat( "/etc/fcoe/cfg-%1", device_name ); } else { + device_name = vlan_device_name; // set file name to cfg-<vlan_device_name>, e.g. /etc/fcoe/cfg-eth3.200 file_name = sformat( "/etc/fcoe/cfg-%1", vlan_device_name ); } @@ -434,7 +513,7 @@ status_map = add( status_map, "FCOE_ENABLE", netcard["fcoe_enable"]:"yes"); status_map = add( status_map, "DCB_REQUIRED", netcard["dcb_required"]:"no"); status_map = add( status_map, "AUTO_VLAN", netcard["auto_vlan"]:"no"); - status_map = add( status_map, "cfg_device", file_name ); + status_map = add( status_map, "cfg_device", device_name ); } else { @@ -466,7 +545,7 @@ return $[]; } - y2milestone( "VLAN channel %1 found", vlan_device_name ); + y2milestone( "Checking configuration for %1", vlan_device_name ); file_name = sformat( "/etc/fcoe/cfg-%1", vlan_device_name ); @@ -476,10 +555,7 @@ if ( !FileUtils::Exists( file_name ) ) { - y2warning( "Cannot read config file for %1 in /etc/fcoe", vlan_device_name ); - Report::Warning( sformat(_("Cannot read config file for %1. -You may edit the settings and recreate the FCoE -VLAN interface to get a valid configuration."), vlan_device_name) ); + // no config file found - return empty status map return status_map; } device = device_name; @@ -663,16 +739,46 @@ } // -// dev_name device fcoe_vlan fcoe_enable dcb_required auto_vlan dcb_capable vlan_interface cfg_file -// eth3 Ethernet card ... eth3.200 yes/no yes/no yes/no yes/no 200 eth3.200 +// Check whether there are configured FCoE VLANs for the given network interface +// Return list of configured VLANs +// +global list IsConfigured( string device_name ) +{ + list configured_vlans = []; + list<map> interfaces = GetNetworkCards(); + + foreach ( map interface, interfaces, { + if ( device_name == interface["dev_name"]:"" && + interface["fcoe_vlan"]:"" != NOT_CONFIGURED && + interface["fcoe_vlan"]:"" != NOT_AVAILABLE ) + { + configured_vlans = add( configured_vlans, interface["vlan_interface"]:"" ); + } + } ); + return configured_vlans; +} + +// list <map> network_interfaces +// +// dev_name mac_addr device vlan_interface fcoe_vlan fcoe_enable dcb_required auto_vlan dcb_capable cfg_device +// eth3 08:00:... Gigabit... 200 eth3.200 yes/no yes/no yes/no yes/no eth3.200 // // Detect network interface cards (hardware probe) and get status // global boolean DetectNetworkCards() { - list <map> netcards = (list<map>)SCR::Read(.probe.netcard); - y2milestone( "Detected netcards: %1", netcards ); + list <map> netcards = []; + if ( !TestMode() ) + { + netcards = (list<map>)SCR::Read(.probe.netcard); + } + else // test data + { + netcards = [ $["bus":"PCI", "bus_hwcfg":"pci", "class_id":2, "dev_name":"eth1", "dev_names":["eth1"], "device":"TEST Ethernet Controller", "model":"Intel PRO/1000 MT Desktop Adapter","resource":$["hwaddr":[$["addr":"08:00:27:11:64:e4"]]] ], $["bus":"PCI", "bus_hwcfg":"pci", "class_id":2, "dev_name":"eth15", "dev_names":["eth15"], "device":"TEST Gigabit Ethernet Controller", "model":"Intel PRO/1000 MT Desktop Adapter", "resource":$["hwaddr":[$["addr":"08:23:27:11:64:78"]]]] ]; + } + y2milestone( "Detected netcards: %1", netcards ); + if ( netcards == [] || netcards == nil ) return false; @@ -684,78 +790,141 @@ // The 'fipvlan' command which is called in GetVlanInterfaces configures the interfaces itself, // therefore it's not needed any longer to call 'ifconfig <if> up' here. - map vlan_info = GetVlanInterfaces( net_devices ); + map <string, list> vlan_info = GetVlanInterfaces( net_devices ); foreach ( map card, netcards, { map info_map = $[]; - map <string, string> status_map = $[]; string fcoe_vlan_interface = ""; - string dcb_capable = ""; - string dcb_default = ""; - - if ( vlan_info[card["dev_name"]:""]:"" == "" ) + string dcb_capable = ""; + + if ( vlan_info[card["dev_name"]:""]:[] == [] ) { // Interface down or FCoE not enabled on the switch - we can't do anything here. fcoe_vlan_interface = NOT_AVAILABLE; - } - else - { - fcoe_vlan_interface = GetFcoeVlanInterface( card["dev_name"]:"", vlan_info[card["dev_name"]:""]:"" ); - if ( fcoe_vlan_interface != "" ) - { - status_map = GetFcoeStatus( fcoe_vlan_interface, card["dev_name"]:"" ); - if ( status_map == $[] ) - { - // the interface isn't configured correctly - fcoe_vlan_interface = NOT_CONFIGURED; - } - } - else - { - // FCoE VLAN interface not yet configured (status_map remains empty) - fcoe_vlan_interface = NOT_CONFIGURED; - } - } - dcb_capable = DCBCapable( card["dev_name"]:"" ); + // add infos about the card + dcb_capable = DCBCapable( card["dev_name"]:"" ); + info_map = add( info_map, "dcb_capable", dcb_capable ); // DCB capable + info_map = add( info_map, "dev_name", card["dev_name"]:""); // network card, e.g. eth3 + info_map = add( info_map, "mac_addr", card["resource", "hwaddr", 0, "addr"]:"" ); // MAC address + if ( card["device"]:"" != "" ) + { + info_map = add( info_map, "device", card["device"]:""); // device name + } + else + { + info_map = add( info_map, "device", card["model"]:""); // model + } + info_map = add( info_map, "fcoe_vlan", fcoe_vlan_interface ); // FCoE VLAN interface, e.g. eth3.200 - info_map = add( info_map, "dev_name", card["dev_name"]:""); // network card, e.g. eth3 - if ( card["device"]:"" != "" ) - { - info_map = add( info_map, "device", card["device"]:""); // device name + network_interfaces = add( network_interfaces, info_map ); } else { - info_map = add( info_map, "device", card["model"]:""); // model - } + // add infos about card and VLAN interfaces + list vlans = vlan_info[card["dev_name"]:""]:[]; + foreach ( map vlan, (list<map>) vlans, { + map <string, string> status_map = $[]; + map info_map = $[]; + string fcoe_vlan_interface = ""; + string dcb_capable = ""; + string dcb_default = ""; + + if ( vlan["vlan"]:"" == "0" ) + { + // for VLAN interface "0" means start FCoE on network interface (without creating a VLAN + // i.e. there isn't an entry in /proc/net/vlan/config) + fcoe_vlan_interface = card["dev_name"]:""; + } + else // get FCoE VLAN interface from /proc/net/vlan/config + { + fcoe_vlan_interface = GetFcoeVlanInterface( card["dev_name"]:"", vlan["vlan"]:"" ); + } + if ( fcoe_vlan_interface != "" ) + { + status_map = GetFcoeStatus( fcoe_vlan_interface, card["dev_name"]:"" ); + if ( status_map == $[] ) + { + // if a 'fcoe_vlan_interface' is created for a 'vlan' != 0 there should be + // a valid configuration available + if ( vlan["vlan"]:"" != "0" ) + { + y2warning( "Cannot read config file for %1 in /etc/fcoe", fcoe_vlan_interface ); + Report::Warning( sformat(_("Cannot read config file for %1. +You may edit the settings and recreate the FCoE +VLAN interface to get a valid configuration."), fcoe_vlan_interface) ); + } + else // for vlan == 0 it means FCoE is not (yet) started + { + y2milestone( "FCoE not configured" ); + } + // the interface isn't configured + fcoe_vlan_interface = NOT_CONFIGURED; + } + else // add additionally check for VLAN = 0 + { + // is FCoE really configured on interface itself or configured for a VLAN interface? + if ( vlan["vlan"]:"" == "0" ) + { + foreach ( string vlan_cfg_name, (list<string>) vlans, { + // no ifcfg-<if>.<vlan> written for vlan = 0 (see WriteSysconfigFiles() ) + if ( FileUtils::Exists( sformat( "/etc/sysconfig/network/ifcfg-%1.%2", + card["dev_name"]:"", vlan_cfg_name ) ) ) + { + fcoe_vlan_interface = NOT_CONFIGURED; + status_map = $[]; + } + }); + } + } + } + else + { + // FCoE VLAN interface not yet configured (status_map remains empty) + fcoe_vlan_interface = NOT_CONFIGURED; + } + dcb_capable = DCBCapable( card["dev_name"]:"" ); + + info_map = add( info_map, "dev_name", card["dev_name"]:""); // network card, e.g. eth3 + info_map = add( info_map, "mac_addr", card["resource", "hwaddr", 0, "addr"]:"" ); // MAC address + + if ( card["device"]:"" != "" ) + { + info_map = add( info_map, "device", card["device"]:""); // device name + } + else + { + info_map = add( info_map, "device", card["model"]:""); // model + } - info_map = add( info_map, "fcoe_vlan", fcoe_vlan_interface ); // FCoE VLAN interface, e.g. eth3.200 - - if ( fcoe_vlan_interface != NOT_AVAILABLE ) - { - // default for FCoE enable is yes - info_map = add( info_map, "fcoe_enable", status_map["FCOE_ENABLE"]:"yes" ); // FCOE_ENABLE + info_map = add( info_map, "fcoe_vlan", fcoe_vlan_interface ); // FCoE VLAN interface, e.g. eth3.200 - // exception for Broadcom cards: DCB_REQUIRED should be set to "no" (bnc #728658) - if ( (card["driver"]:"" != "bnx2x") && (dcb_capable == "yes") ) - { - dcb_default = "yes"; - } - else - { - dcb_default = "no"; - } - info_map = add( info_map, "dcb_required", status_map["DCB_REQUIRED"]:dcb_default ); + // default for FCoE enable is yes + info_map = add( info_map, "fcoe_enable", status_map["FCOE_ENABLE"]:"yes" ); // FCOE_ENABLE - // default is AUTO_VLAN="yes", create /etc/fcoe/cfg-ethx file without VLAN device in name - // (e.g. /etc/fcoe/cfg-eth3), see bnc #724563 - info_map = add( info_map, "auto_vlan", status_map["AUTO_VLAN"]:"yes"); // AUTO_VLAN - } - info_map = add( info_map, "dcb_capable", dcb_capable ); // DCB capable - info_map = add( info_map, "vlan_interface", vlan_info[card["dev_name"]:""]:"" ); // VLAN interface, e.g. 200 - info_map = add( info_map, "cfg_file", status_map["cfg_device"]:"" ); // part of cfg-file name, e.g. eth3.200 + // exception for Broadcom cards: DCB_REQUIRED should be set to "no" (bnc #728658) + if ( (card["driver"]:"" != "bnx2x") && (dcb_capable == "yes") ) + { + dcb_default = "yes"; + } + else + { + dcb_default = "no"; + } + info_map = add( info_map, "dcb_required", status_map["DCB_REQUIRED"]:dcb_default ); + + // default is AUTO_VLAN="yes", create /etc/fcoe/cfg-ethx file without VLAN device in name + // (e.g. /etc/fcoe/cfg-eth3), see bnc #724563 + info_map = add( info_map, "auto_vlan", status_map["AUTO_VLAN"]:"yes"); // AUTO_VLAN + + info_map = add( info_map, "dcb_capable", dcb_capable ); // DCB capable + info_map = add( info_map, "vlan_interface", vlan["vlan"]:"" ); // VLAN interface, e.g. 200 + info_map = add( info_map, "cfg_device", status_map["cfg_device"]:"" ); // part of cfg-file name, e.g. eth3.200 + network_interfaces = add( network_interfaces, info_map ); + + }); + } //else - network_interfaces = add( network_interfaces, info_map ); } ); // sort the list of interfaces (eth0, eth1, eth2...) @@ -820,13 +989,17 @@ if ( card["fcoe_vlan"]:"" != FcoeClient::NOT_AVAILABLE && // FCoE VLAN is configured card["fcoe_vlan"]:"" != FcoeClient::NOT_CONFIGURED ) { - y2milestone( "Writing /etc/sysconfig/network/ifcfg-%1", card["fcoe_vlan"]:"" ); - // write /etc/sysconfig/network/ifcfg-<fcoe-vlan-interface>, e.g. ifcfg-eth3.200 - SCR::Write(.network.value + card["fcoe_vlan"]:"" + "BOOTPROTO", "static" ); - SCR::Write(.network.value + card["fcoe_vlan"]:"" + "STARTMODE", "nfsroot" ); - SCR::Write(.network.value + card["fcoe_vlan"]:"" + "ETHERDEVICE", card["dev_name"]:"" ); - SCR::Write(.network.value + card["fcoe_vlan"]:"" + "USERCONTROL", "no" ); - + // write ifcfg-<if>.>VLAN> only if VLAN was created (not for VLAN = 0 which means + // FCoE is started on the network interface itself) + if ( card["vlan_interface"]:"" != "0" ) + { + y2milestone( "Writing /etc/sysconfig/network/ifcfg-%1", card["fcoe_vlan"]:"" ); + // write /etc/sysconfig/network/ifcfg-<fcoe-vlan-interface>, e.g. ifcfg-eth3.200 + SCR::Write(.network.value + card["fcoe_vlan"]:"" + "BOOTPROTO", "static" ); + SCR::Write(.network.value + card["fcoe_vlan"]:"" + "STARTMODE", "nfsroot" ); + SCR::Write(.network.value + card["fcoe_vlan"]:"" + "ETHERDEVICE", card["dev_name"]:"" ); + SCR::Write(.network.value + card["fcoe_vlan"]:"" + "USERCONTROL", "no" ); + } string ifcfg_file = sformat( "/etc/sysconfig/network/ifcfg-%1", card["dev_name"]:"" ); y2milestone( "Writing %1", ifcfg_file ); @@ -869,18 +1042,18 @@ string command = ""; map output = $[]; - y2milestone( "Writing /etc/fcoe/cfg-%1", card["cfg_file"]:"" ); - success = SCR::Write(.fcoe.cfg-ethx.value + card["cfg_file"]:"" + "FCOE_ENABLE", card[ "fcoe_enable"]:"no" ); + y2milestone( "Writing /etc/fcoe/cfg-%1", card["cfg_device"]:"" ); + success = SCR::Write(.fcoe.cfg-ethx.value + card["cfg_device"]:"" + "FCOE_ENABLE", card[ "fcoe_enable"]:"no" ); if ( !success ) { y2error( "Writing FCOE_ENABLE=%1 failed", card[ "fcoe_enable"]:"no" ); } - success = SCR::Write(.fcoe.cfg-ethx.value + card["cfg_file"]:"" + "DCB_REQUIRED", card["dcb_required"]:"no" ); + success = SCR::Write(.fcoe.cfg-ethx.value + card["cfg_device"]:"" + "DCB_REQUIRED", card["dcb_required"]:"no" ); if ( !success ) { y2error( "Writing DCB_REQUIRED=%1 failed", card["dcb_required"]:"no" ); } - success = SCR::Write(.fcoe.cfg-ethx.value + card["cfg_file"]:"" + "AUTO_VLAN", card["auto_vlan"]:"no" ); + success = SCR::Write(.fcoe.cfg-ethx.value + card["cfg_device"]:"" + "AUTO_VLAN", card["auto_vlan"]:"no" ); if ( !success ) { y2error( "Writing AUTO_VLAN=%1 failed", card["auto_vlan"]:"no" ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.22.3/src/Makefile.in new/yast2-fcoe-client-2.23.0/src/Makefile.in --- old/yast2-fcoe-client-2.22.3/src/Makefile.in 2013-02-22 10:51:06.000000000 +0100 +++ new/yast2-fcoe-client-2.23.0/src/Makefile.in 2013-06-24 16:10:19.000000000 +0200 @@ -582,7 +582,7 @@ dist-hook: check-syntax check-syntax: $(client_DATA) $(ycpchook) $(ybcfiles) - @if test "$(client_DATA)"; then \ + @if test "$(filter %.ycp,client_DATA)"; then \ if $(CHECK_SYNTAX); then \ TO_CHECK="$(filter %.ycp,$^)"; \ echo "Checking syntax of $${TO_CHECK}"; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.22.3/src/complex.ycp new/yast2-fcoe-client-2.23.0/src/complex.ycp --- old/yast2-fcoe-client-2.22.3/src/complex.ycp 2013-01-22 11:18:22.000000000 +0100 +++ new/yast2-fcoe-client-2.23.0/src/complex.ycp 2013-06-20 10:10:51.000000000 +0200 @@ -190,8 +190,9 @@ foreach ( map card, (list<map>)netcards, { table_items = add( table_items, - `item(`id(row), card["dev_name"]:"", card["device"]:"", card["fcoe_vlan"]:"", - card["fcoe_enable"]:"", card["dcb_required"]:"", card["auto_vlan"]:"", card["dcb_capable"]:"" ) + `item(`id(row), card["dev_name"]:"", card["mac_addr"]:"", card["device"]:"", + card["vlan_interface"]:"", card["fcoe_vlan"]:"", card["fcoe_enable"]:"", + card["dcb_required"]:"", card["auto_vlan"]:"", card["dcb_capable"]:"" ) ); row = row + 1; }); @@ -255,7 +256,8 @@ UI::ChangeWidget( `id(`auto), `Enabled, false ); } // headline of the edit dialog - configuration of values for a certain network interface - UI::ChangeWidget( `id(`heading), `Value, sformat( _("Configuration of Interface %1"), card["fcoe_vlan"]:"" ) ); + UI::ChangeWidget( `id(`heading), `Value, sformat( _("Configuration of VLAN interface %1 on %2"), + card["vlan_interface"]:"", card["dev_name"]:"" ) ); } /** @@ -300,7 +302,35 @@ // Starting FCoE on interface eth3.200 map card = FcoeClient::GetCurrentNetworkCard(); + y2milestone( "Selected card: %1", card ); string dev_name = card["dev_name"]:""; + + list configured_vlans = FcoeClient::IsConfigured( dev_name ); + + if ( configured_vlans != [] ) + { + y2milestone( "Configured VLANs on %1: %2", dev_name, configured_vlans ); + + if ( contains( configured_vlans, "0" ) ) + { + // text of an error popup + Popup::Error( sformat( _("Cannot start FCoE on VLAN interface %1 +because FCoE is already configured on +network interface %2 itself."), card["vlan_interface"]:"", dev_name ) ); + return nil; + } + if ( card["vlan_interface"]:"" == "0" ) + { + // text of an error popup + Popup::Error( sformat( _("Cannot start FCoE on network interface %1 itself +because FCoE is already configured on +VLAN interface(s) %2."), dev_name, configured_vlans ) ); + return nil; + } + Popup::Warning( sformat( "FCoE VLAN interface(s) %1 already configured on %2.", + configured_vlans, dev_name ) ); + } + string command = sformat( "fipvlan -c -s %1", dev_name ); map output = $[]; @@ -313,8 +343,8 @@ boolean ret = Popup::YesNoHeadline( _("Creating and Starting FCoE on Detected VLAN Device"), // question to the user: really create and start FCoE sformat( _("Do you really want to create a FCoE network -interface for discovered FCoE VLAN interface -on %1 and start the FCoE initiator?"), dev_name ) ); +interface for discovered VLAN interface %1 +on %2 and start the FCoE initiator?"), card["vlan_interface"]:"", dev_name ) ); if ( ret == true ) { if ( Stage::initial() ) // first stage of installation - create and start FCoE VLAN interface @@ -355,9 +385,17 @@ y2milestone( "Output: %1", output ); if ( output["exit"]:255 != 0 ) { - // text of an error popup: command failed on the network interface - Popup::Error( sformat( _("Command \"%1\" on %2 failed."), command, dev_name ) ); - return nil; + if ( !FcoeClient::TestMode() ) + { + // text of an error popup: command failed on the network interface + Popup::Error( sformat( _("Command \"%1\" on %2 failed."), command, dev_name ) ); + return nil; + } + else + { + Popup::Warning( _("Creating FCoE interface failed. +Continue because running in test mode") ); + } } } } @@ -366,20 +404,30 @@ y2milestone( "Starting FCoE canceled" ); return nil; } - + // Get values and exchange list (table) entries - fcoe_vlan_interface = FcoeClient::GetFcoeVlanInterface( card["dev_name"]:"", card["vlan_interface"]:"" ); + + if ( card["vlan_interface"]:"" == "0" ) + { + // for VLAN interface "0" there isn't an entry in /proc/net/vlan/config + fcoe_vlan_interface = card["dev_name"]:"" ; + } + else // get interface from /proc/net/vlan/config + { + fcoe_vlan_interface = FcoeClient::GetFcoeVlanInterface( card["dev_name"]:"", card["vlan_interface"]:"" ); + } if ( fcoe_vlan_interface != "" ) { - y2milestone( "FCoE VLAN interface %1 created/started", fcoe_vlan_interface ); // write config for FCoE VLAN interface status_map = FcoeClient::CreateFcoeConfig( fcoe_vlan_interface, card ); - + y2milestone("GOT status map: %1", status_map ); + // command to be able to revert the creation of FCoE VLAN interface in case of 'Cancel' // FcoeClient::AddRevertCommand( sformat("fcoeadm -d %1 && vconfig rem %2", status_map["cfg_device"]:"", fcoe_vlan_interface ) ); // 'fcoeadm -d <if>/<if>.<vlan>' fails here, 'vconfig rem <if>.<vlan>' succeeds - // and removes the interface properly (tested on RC1) + // and removes the interface properly (tested on SP2 RC1) + // TODO: Retest for SLES12 FcoeClient::AddRevertCommand( sformat("vconfig rem %1", fcoe_vlan_interface ) ); } else @@ -392,17 +440,17 @@ card["fcoe_enable"] = status_map["FCOE_ENABLE"]:""; card["dcb_required"] = status_map["DCB_REQUIRED"]:""; card["auto_vlan"] = status_map["AUTO_VLAN"]:""; - card["cfg_file"] = status_map["cfg_device"]:""; + card["cfg_device"] = status_map["cfg_device"]:""; FcoeClient::SetModified( true ); FcoeClient::SetNetworkCardsValue( FcoeClient::current_card, card ); y2milestone( "Current network interfaces: %1", FcoeClient::GetNetworkCards() ); // replace values in table - UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 2), fcoe_vlan_interface ); - UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 3), status_map["FCOE_ENABLE"]:"" ); - UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 4), status_map["DCB_REQUIRED"]:"" ); - UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 5), status_map["AUTO_VLAN"]:"" ); + UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 4), fcoe_vlan_interface ); + UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 5), status_map["FCOE_ENABLE"]:"" ); + UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 6), status_map["DCB_REQUIRED"]:"" ); + UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 7), status_map["AUTO_VLAN"]:"" ); AdjustButtons(); } else if ( action == `remove ) @@ -439,46 +487,78 @@ y2milestone( "Removing %1", card["fcoe_vlan"]:"" ); // call fcoeadm -d <fcoe_vlan> first (bnc #719443) - command = sformat( "fcoeadm -d %1", card["cfg_file"]:"") ; + command = sformat( "fcoeadm -d %1", card["cfg_device"]:"") ; y2milestone( "Calling %1", command ); output = (map)SCR::Execute( .target.bash_output, command ); y2milestone( "Output: %1", output ); - if ( output["exit"]:255 == 0 ) + if ( output["exit"]:255 == 0 || FcoeClient::TestMode() ) { command = sformat( "vconfig rem %1", card["fcoe_vlan"]:"") ; y2milestone( "Calling %1", command ); output = (map)SCR::Execute( .target.bash_output, command ); y2milestone( "Output: %1", output ); - if ( output["exit"]:255 == 0 ) + if ( output["exit"]:255 == 0 || FcoeClient::TestMode() ) { - command = sformat( "rm /etc/fcoe/cfg-%1", card["cfg_file"]:"" ); - y2milestone( "Calling %1", command ); - output = (map)SCR::Execute( .target.bash_output, command ); - y2milestone( "Output: %1", output ); - command = sformat( "rm /etc/sysconfig/network/ifcfg-%1", card["fcoe_vlan"]:"" ); - y2milestone( "Calling %1", command ); - output = (map)SCR::Execute( .target.bash_output, command ); - y2milestone( "Output: %1", output ); - + boolean del_cfg = true; + // check whether /etc/fcoe/cfg-file is also used for another VLAN interface. + // Example: eth1 have FCoE configured on VLAN 200 and 300 with AUTO_VLAN="yes" + // -> /etc/fcoe/cfg-eth1 applies to both. + list <map> interfaces = FcoeClient::GetNetworkCards(); + + foreach ( map interface, interfaces, { + if ( interface["dev_name"]:"" == card["dev_name"]:"" && + interface["vlan_interface"]:"" != card["vlan_interface"]:"" && + interface["cfg_device"]:"" == card["cfg_device"]:"" ) + { + y2milestone( sformat( "/etc/fcoe/cfg-%1 also used for VLAN %2", + card["cfg_device"]:"", interface["vlan_interface"]:"" ) ); + del_cfg = false; + } + }); + + if ( del_cfg ) + { + command = sformat( "rm /etc/fcoe/cfg-%1", card["cfg_device"]:"" ); + y2milestone( "Calling %1", command ); + output = (map)SCR::Execute( .target.bash_output, command ); + y2milestone( "Output: %1", output ); + } + else + { + y2milestone( sformat( "/etc/fcoe/cfg-%1 not deleted", card["cfg_device"]:"" ) ); + } + + if ( card["vlan_interface"]:"" != "0" ) + { + command = sformat( "rm /etc/sysconfig/network/ifcfg-%1", card["fcoe_vlan"]:"" ); + y2milestone( "Calling %1", command ); + output = (map)SCR::Execute( .target.bash_output, command ); + y2milestone( "Output: %1", output ); + } + else + { + y2milestone( sformat( "/etc/sysconfig/network/ifcfg-%1 not deleted", + card["fcoe_vlan"]:"" ) ); + } // set new values in global map network_interfaces card["fcoe_vlan"] = FcoeClient::NOT_CONFIGURED; card["fcoe_enable"] = "yes"; // exception for Broadcom cards: DCB_REQUIRED should be set to "no" (bnc #728658) card["dcb_required"] = ((card["driver"]:"" != "bnx2x") && (card["dcb_capable"]:""=="yes"))?"yes":"no"; card["auto_vlan"] = "yes"; // default is "yes" (bnc #724563) - card["cfg_file"] = ""; + card["cfg_device"] = ""; FcoeClient::SetModified( true ); FcoeClient::SetNetworkCardsValue( FcoeClient::current_card, card ); y2milestone( "Current network interfaces: %1", FcoeClient::GetNetworkCards() ); // replace values in table - UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 2), card["fcoe_vlan"]:"" ); - UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 3), card["fcoe_enable"]:"" ); - UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 4), card["dcb_required"]:"" ); - UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 5), card["auto_vlan"]:"" ); + UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 4 ), card["fcoe_vlan"]:"" ); + UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 5 ), card["fcoe_enable"]:"" ); + UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 6 ), card["dcb_required"]:"" ); + UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 7 ), card["auto_vlan"]:"" ); AdjustButtons(); } else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.22.3/src/dialogs.ycp new/yast2-fcoe-client-2.23.0/src/dialogs.ycp --- old/yast2-fcoe-client-2.22.3/src/dialogs.ycp 2013-01-22 11:18:22.000000000 +0100 +++ new/yast2-fcoe-client-2.23.0/src/dialogs.ycp 2013-06-20 10:10:51.000000000 +0200 @@ -67,9 +67,10 @@ { return `VBox( `VStretch(), + `VSpacing(1), // heading is replaced later (InitEditDialog) `Label( `id(`heading), ("Configuration of Interface .......................") ), - `VSpacing(2), + `VSpacing(1), `HBox ( `HStretch(), `Frame( (""), @@ -134,7 +135,7 @@ `VBox( `Table(`id(`interfaces), `opt(`notify, `immediate, `keepSorting ), // column headers of a table with network interfaces (keep them short) - `header(_("Device Name"), _("Model"), _("FCoE VLAN Interface"), + `header(_("Device"), _("MAC Address"), _("Model"), _("VLAN"), _("FCoE VLAN Interface"), // continue column headers _("FCoE Enable"), _("DCB Required"), _("AUTO VLAN"), _("DCB capable") ), [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.22.3/src/fcoe-client_auto.ycp new/yast2-fcoe-client-2.23.0/src/fcoe-client_auto.ycp --- old/yast2-fcoe-client-2.22.3/src/fcoe-client_auto.ycp 2013-01-22 11:18:22.000000000 +0100 +++ new/yast2-fcoe-client-2.23.0/src/fcoe-client_auto.ycp 2013-06-12 12:30:51.000000000 +0200 @@ -189,17 +189,24 @@ } else // get FCoE VLAN interface { - fcoe_vlan_interface = FcoeClient::GetFcoeVlanInterface( card["dev_name"]:"", - card["vlan_interface"]:"" ); + if ( card["vlan_interface"]:"" == "0" ) + { + // VLAN interface "0" means start FCoE on network interface + fcoe_vlan_interface = card["dev_name"]:""; + } + else + { + fcoe_vlan_interface = FcoeClient::GetFcoeVlanInterface( card["dev_name"]:"", + card["vlan_interface"]:"" ); + } if ( fcoe_vlan_interface != "" ) { y2milestone( "FCoE VLAN interface %1 created/started", fcoe_vlan_interface ); // create /etc/fcoe/ethx file and get values - FcoeClient::CreateFcoeConfig( fcoe_vlan_interface, card ); - status_map = FcoeClient::GetFcoeStatus( fcoe_vlan_interface, card["dev_name"]:"" ); + status_map = FcoeClient::CreateFcoeConfig( fcoe_vlan_interface, card ); // apply modified data detected_netcards[ index, "fcoe_vlan"] = fcoe_vlan_interface; - detected_netcards[ index, "cfg_file"] = status_map["cfg_device"]:""; + detected_netcards[ index, "cfg_device"] = status_map["cfg_device"]:""; detected_netcards[ index, "fcoe_enable"] = status_map["FCOE_ENABLE"]:""; detected_netcards[ index, "dcb_required"] = status_map["DCB_REQUIRED"]:""; } -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
