Author: gs
Date: Tue May 3 15:34:23 2011
New Revision: 63894
URL: http://svn.opensuse.org/viewcvs/yast?rev=63894&view=rev
Log:
add/check DCB capable
Modified:
trunk/fcoe-client/src/FcoeClient.ycp
trunk/fcoe-client/src/complex.ycp
trunk/fcoe-client/src/dialogs.ycp
Modified: trunk/fcoe-client/src/FcoeClient.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/FcoeClient.ycp?rev=63894&r1=63893&r2=63894&view=diff
==============================================================================
--- trunk/fcoe-client/src/FcoeClient.ycp (original)
+++ trunk/fcoe-client/src/FcoeClient.ycp Tue May 3 15:34:23 2011
@@ -221,11 +221,40 @@
}
//
+// Check whether the network interface (netcard, e.g. eth0 is DCB capable)
+//
+string DCBCapable( string netcard )
+{
+ string command = sformat( "LANG=POSIX dcbtool gc %1 dcb", netcard );
+ y2milestone( "Executing command: %1", command );
+
+ // TODO: lldpad must be started to be able to use dcbtool
+ // -> started in CheckServices() -> Read()
+ // ACHTUNG: Reihenfolge !!!
+ map output = (map)SCR::Execute( .target.bash_output, command );
+ y2milestone( "Output: %1", output);
+
+ if ( output["exit"]:255 == 0 )
+ {
+ list <string> lines = splitstring( output["stdout"]:"", "\n" );
+ }
+ else
+ {
+ y2error( "Error: %1", output["stderr"]:"" );
+ Popup::Error ( output["stderr"]:"" );
+ return "no";
+ }
+
+ return "no";
+}
+
+//
// Detect network interface cards (hardware probe) and get status
//
void DetectNetworkCards()
{
string vlan_interface = "";
+ string dcb_capable = "";
list <map> netcards = (list<map>)SCR::Read(.probe.netcard);
y2milestone( "Detected netcards: %1", netcards );
@@ -241,9 +270,12 @@
else
vlan_interface = NOT_CONFIGURED;
+ dcb_capable = DCBCapable( card["dev_name"]:"" );
+
info_list = add( info_list, card["dev_name"]:"");
info_list = add( info_list, card["device"]:"");
info_list = add( info_list, vlan_interface );
+ info_list = add( info_list, dcb_capable );
info_list = add( info_list, status_map["FCOE_ENABLE"]:"");
info_list = add( info_list, status_map["DCB_REQUIRED"]:"");
Modified: trunk/fcoe-client/src/complex.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/complex.ycp?rev=63894&r1=63893&r2=63894&view=diff
==============================================================================
--- trunk/fcoe-client/src/complex.ycp (original)
+++ trunk/fcoe-client/src/complex.ycp Tue May 3 15:34:23 2011
@@ -89,26 +89,37 @@
}
//
+// Get current network interface (netcard)
//
-//
-void AdjustButtons()
+list GetCurrentNetcard()
{
+ list card = [];
+
map