[yast-devel] Re: [yast-commit] r65678 - /branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dne 13.9.2011 10:55, gs@svn2.opensuse.org napsal(a):
Author: gs Date: Tue Sep 13 10:55:06 2011 New Revision: 65678
URL: http://svn.opensuse.org/viewcvs/yast?rev=65678&view=rev Log: call fipvlan only for configured interfaces
Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp
Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp?rev=65678&r1=65677&r2=65678&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp Tue Sep 13 10:55:06 2011 ... foreach ( map card, netcards, { + // get first (at the moment only) state map from link list in resource map + map state_map = card["resource", "link", 0 ]:$[]; + + if ( state_map["state"]:false == false ) + { + // call 'ifconfig <interface> up' here because it's not yet + // clear who configures the interfaces (fipvlan command itself?) + // -> see bnc #705171 (this applies also to installed system) + + string cmd_ifup = sformat( "ifconfig %1 up", card["dev_name"]:"" ); + y2milestone( "Executing command: %1", cmd_ifup ); + SCR::Execute( .target.bash_output, cmd_ifup ); + + // ifconfig up always returns 0 -> no error message can be made + } + } ); + // call .probe.netcard again + netcards = (list<map>)SCR::Read(.probe.netcard); + + foreach ( map card, netcards, { + map state_map = card["resource", "link", 0]:$[]; map info_map = $[]; map
status_map = $[];
Maybe I'm wrong but this looks quite low-level to me and it might rather belong to Network module (yast2.rpm/library/network) instead of adding such functionality to FCoE. Bye Lukas - -- Lukas Ocilka, Appliances Department, SUSE LINUX s.r.o. MD: Jeff Hawn, Jennifer Guild, Alena Hendrichova -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iD8DBQFObxxjVSqMdRCqTiwRAv9fAJ4zu6nw5MO5nYtXQgMmMkcpjJCXWACfVIS5 23a7EawE74/Vjo+fy0kdrm4= =N8E6 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Dne 13.9.2011 10:55, gs@svn2.opensuse.org napsal(a):
Author: gs Date: Tue Sep 13 10:55:06 2011 New Revision: 65678
URL: http://svn.opensuse.org/viewcvs/yast?rev=65678&view=rev Log: call fipvlan only for configured interfaces
Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp
Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp?rev=65678&r1=65677&r2=65678&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp Tue Sep 13 10:55:06 2011 ... foreach ( map card, netcards, { + // get first (at the moment only) state map from link list in resource map + map state_map = card["resource", "link", 0 ]:$[]; + + if ( state_map["state"]:false == false ) + { + // call 'ifconfig<interface> up' here because it's not yet + // clear who configures the interfaces (fipvlan command itself?) + // -> see bnc #705171 (this applies also to installed system) + + string cmd_ifup = sformat( "ifconfig %1 up", card["dev_name"]:"" ); + y2milestone( "Executing command: %1", cmd_ifup ); + SCR::Execute( .target.bash_output, cmd_ifup ); + + // ifconfig up always returns 0 -> no error message can be made + } + } ); + // call .probe.netcard again + netcards = (list<map>)SCR::Read(.probe.netcard); + + foreach ( map card, netcards, { + map state_map = card["resource", "link", 0]:$[]; map info_map = $[]; map
status_map = $[]; Maybe I'm wrong but this looks quite low-level to me and it might rather belong to Network module (yast2.rpm/library/network) instead of adding such functionality to FCoE. This functionality is only used (and needed) for the FcoE module and I
Am 13.09.2011 11:03, schrieb Lukas Ocilka: think it should remain here.
Bye Lukas
- --
Lukas Ocilka, Appliances Department, SUSE LINUX s.r.o. MD: Jeff Hawn, Jennifer Guild, Alena Hendrichova -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/
iD8DBQFObxxjVSqMdRCqTiwRAv9fAJ4zu6nw5MO5nYtXQgMmMkcpjJCXWACfVIS5 23a7EawE74/Vjo+fy0kdrm4= =N8E6 -----END PGP SIGNATURE-----
-- Gabriele Mohr SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstr. 5 Tel: +49 911 740 53 362 90409 Nürnberg Email: gs@suse.de ----------------------------------------------------------------- -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
Gabriele Mohr
-
Lukas Ocilka