Mailinglist Archive: yast-commit (135 mails)

< Previous Next >
[yast-commit] r67677 - in /trunk/fcoe-client/src: FcoeClient.ycp complex.ycp
Author: gs
Date: Wed Mar 21 12:13:59 2012
New Revision: 67677

URL: http://svn.opensuse.org/viewcvs/yast?rev=67677&view=rev
Log:
simplify steps when creating FcoE interface

Modified:
trunk/fcoe-client/src/FcoeClient.ycp
trunk/fcoe-client/src/complex.ycp

Modified: trunk/fcoe-client/src/FcoeClient.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/FcoeClient.ycp?rev=67677&r1=67676&r2=67677&view=diff
==============================================================================
--- trunk/fcoe-client/src/FcoeClient.ycp (original)
+++ trunk/fcoe-client/src/FcoeClient.ycp Wed Mar 21 12:13:59 2012
@@ -377,11 +377,12 @@
// Create /etc/fcoe/cfg-<if> or /etc/fcoe/cfg-<if>.<vlan>
// (depending on AUTO_VLAN setting)
//
-global void CreateFcoeConfig( string vlan_device_name, map netcard )
+global map<string, string> CreateFcoeConfig( string vlan_device_name, map
netcard )
{
string file_name = "";
boolean file_exists = false;
-
+ map <string, string> status_map = $[];
+
// if AUTO_VLAN is set to "yes"
if ( netcard["auto_vlan"]:"no" == "yes" )
{
@@ -429,6 +430,11 @@
if ( file_exists )
{
AddRevertCommand( sformat( "rm %1", file_name ) );
+ // fill status map
+ 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 );
}
else
{
@@ -439,6 +445,8 @@
{
y2error( "Cannot read /etc/fcoe/cfg-ethx" );
}
+
+ return status_map;
}

//

Modified: trunk/fcoe-client/src/complex.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/complex.ycp?rev=67677&r1=67676&r2=67677&view=diff
==============================================================================
--- trunk/fcoe-client/src/complex.ycp (original)
+++ trunk/fcoe-client/src/complex.ycp Wed Mar 21 12:13:59 2012
@@ -377,8 +377,7 @@
{
y2milestone( "FCoE VLAN interface %1 created/started",
fcoe_vlan_interface );
// write config for FCoE VLAN interface
- FcoeClient::CreateFcoeConfig( fcoe_vlan_interface, card );
- status_map = FcoeClient::GetFcoeStatus ( fcoe_vlan_interface,
card["dev_name"]:"" );
+ status_map = FcoeClient::CreateFcoeConfig( fcoe_vlan_interface,
card );

// 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 ) );

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages