Hello community, here is the log from the commit of package yast2-isns checked in at Thu Sep 20 01:59:03 CEST 2007. -------- --- yast2-isns/yast2-isns.changes 2007-09-04 22:19:59.000000000 +0200 +++ /mounts/work_src_done/STABLE/yast2-isns/yast2-isns.changes 2007-09-18 21:24:45.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Sep 18 13:23:48 MDT 2007 - wrwhitehead@novell.com + +- Fixed Bug #325129 - iSNS server not running feedback and + updated dialogs to display only the non-selected nodes + +------------------------------------------------------------------- Old: ---- yast2-isns-1.0.3.tar.bz2 New: ---- yast2-isns-1.0.4.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-isns.spec ++++++ --- /var/tmp/diff_new_pack.Nm4181/_old 2007-09-20 01:58:58.000000000 +0200 +++ /var/tmp/diff_new_pack.Nm4181/_new 2007-09-20 01:58:58.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-isns (Version 1.0.3) +# spec file for package yast2-isns (Version 1.0.4) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,16 +11,16 @@ # norootforbuild Name: yast2-isns -Version: 1.0.3 +Version: 1.0.4 Release: 1 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-isns-1.0.3.tar.bz2 -prefix: /usr +Source0: yast2-isns-1.0.4.tar.bz2 +Prefix: /usr BuildRequires: docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer popt-devel sgml-skel update-desktop-files yast2 yast2-devtools yast2-packagemanager-devel yast2-perl-bindings yast2-testsuite Requires: yast2 -BuildArchitectures: noarch +BuildArch: noarch Summary: YaST2 - Configuration of Internet Storage Naming Service (isns) %description @@ -41,7 +41,7 @@ Robert Whitehead %prep -%setup -n yast2-isns-1.0.3 +%setup -n yast2-isns-1.0.4 %build %{prefix}/bin/y2tool y2autoconf @@ -75,8 +75,10 @@ %{prefix}/share/applications/YaST2/isns.desktop /usr/share/YaST2/scrconf/isnsd.scr %doc %{prefix}/share/doc/packages/yast2-isns - %changelog +* Tue Sep 18 2007 - wrwhitehead@novell.com +- Fixed Bug #325129 - iSNS server not running feedback and + updated dialogs to display only the non-selected nodes * Tue Sep 04 2007 - wrwhitehead@novell.com - Updated display pages to be more user friendly. Added help text. * Wed Aug 29 2007 - wrwhitehead@novell.com ++++++ yast2-isns-1.0.3.tar.bz2 -> yast2-isns-1.0.4.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-isns-1.0.3/src/IsnsServer.ycp new/yast2-isns-1.0.4/src/IsnsServer.ycp --- old/yast2-isns-1.0.3/src/IsnsServer.ycp 2007-03-31 00:55:11.000000000 +0200 +++ new/yast2-isns-1.0.4/src/IsnsServer.ycp 2007-09-18 21:02:37.000000000 +0200 @@ -153,6 +153,30 @@ return true; } +global string testISNSAccess(string address) { + string value = "OK"; + map <string,any> temp = $[]; + + string command = sformat("isnsadm -a %1 -t -q iscsi",address); + map<string, any> result= (map<string, any>) SCR::Execute(.target.bash_output, command, $[]); + foreach(string row, splitstring(result["stdout"]:"","\n"), { + + if (row == "TCP error on connection") + { + y2milestone("TCP error: %1 ",row); + value = "ERROR"; + } + + if (row == "Error Sending TCP request.") + { + y2milestone("Failed to resolve host error: %1 ",row); + value = "ERROR"; + } + + }); + +return value; +} global list <map <string,any> > readISCSI(string address) { list <map <string,any> > values = []; map <string,any> temp = $[]; @@ -188,6 +212,8 @@ global string readISCSI_type(string address,string index) { string temp = ""; + y2milestone("iSCSIRead_type index:%1", index); + string command = sformat("isnsadm -a %1 -t -q iscsi -n %2",address,index); map<string, any> result= (map<string, any>) SCR::Execute(.target.bash_output, command, $[]); foreach(string row, splitstring(result["stdout"]:"","\n"), { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-isns-1.0.3/src/widgets.ycp new/yast2-isns-1.0.4/src/widgets.ycp --- old/yast2-isns-1.0.3/src/widgets.ycp 2007-09-04 22:08:54.000000000 +0200 +++ new/yast2-isns-1.0.4/src/widgets.ycp 2007-09-18 21:05:09.000000000 +0200 @@ -5,30 +5,62 @@ import "IsnsServer"; import "String"; -global string address = ""; +string address = ""; //global void initDiscoveryDomainSetMembers (string key); void initDiscoveryDomain (string key); void initDDISCSIMembers (string key); void initISCSI (string key); +void initDiscoveryDomainPotentialISCSI (string dd_id); +void initDiscoveryDomainPotential (string key); void getInputX1 (string dd_name, string dd_id); +integer checkISNS(); // **************** global funcions and variables ***** map <string, any> DiscoveryDomainDetailDialog(map<string, any> values_before){ map <string, any> ret_map = $[]; term dd_dialog = - `HBox( - `HSpacing(5), `VBox( - `VSpacing(1), - `Left( `HWeight(3,`TextEntry( `id( `ddentry ), _("Discovery Domain Name" ))) ), - `Left( `HBox( `PushButton(`id(`ok), Label::OKButton() ), `PushButton(`id(`cancel), Label::CancelButton() ))), - `VSpacing(1) - ), - `HSpacing(5) + `Heading("Create New Discovery Domain"), + `HSpacing(50), + `HWeight(3,`TextEntry( `id( `ddentry ), _("Discovery Domain Name" ))) , + `VSpacing(1), + `HBox( + `HSpacing(3), + `VBox( + `Label(_("Select Discovery Domain Set to which Discovery Domain will be added.")), + `SelectionBox( `id( `ddsentries), _("Discovery Domain Name Set") ) + ), + `HSpacing(3) + ), + `VSpacing(1), + `HBox( `PushButton(`id(`ok), Label::OKButton() ), `PushButton(`id(`cancel), Label::CancelButton() )), + `VSpacing(1) ); UI::OpenDialog(dd_dialog); + list <term> inc_items = []; + integer count = 0; + string index = ""; + string first = ""; + foreach(string ddsentry, IsnsServer::readDDS(address), { + if (count == 0) + { + index = ddsentry; + count = 1; + } + else + { + inc_items = add(inc_items, `item(`id(index), ddsentry) ); + count = 0; + if (first == "") + first = ddsentry; + } + }); + + UI::ChangeWidget(`id(`ddsentries), `Items, inc_items); + UI::ChangeWidget(`id(`ddsentries), `CurrentItem, first); + symbol ret = `nil; while(ret != `ok && ret !=`cancel){ boolean enable=false; @@ -37,8 +69,31 @@ if (ret == `cancel) ret_map = $[]; else { - string value=(string)UI::QueryWidget(`ddentry,`Value); - ret_map = $["VALUE":value]; + string dd_name = (string)UI::QueryWidget(`ddentry,`Value); + + string dds_id = (string)UI::QueryWidget(`id (`ddsentries),`CurrentItem); + y2milestone ("creating dd add to dds: %1",dds_id); + IsnsServer::addDD(address, dd_name ); + + integer count = 0; + string dd_index = ""; + foreach(string dd, IsnsServer::readDD(address), { + if (count == 0) + { + dd_index = dd; + count = 1; + } + else + { + if ( dd == dd_name) + { + IsnsServer::addDDSMember(address, dds_id, dd_index); + } + count = 0; + } + }); + + ret_map = $["VALUE":dd_name]; } UI::CloseDialog(); return ret_map; @@ -112,8 +167,8 @@ `VBox( `Heading(_("Add iSCSI node to Discovery Domain")), `Label(dd_name), - `HSpacing(50), - `Heading (_("Nodes")), + `HSpacing(100), + `Heading (_("Available Nodes to Add")), `HBox( `VSpacing(10), `Table(`id(`members_table), @@ -129,10 +184,10 @@ ); UI::OpenDialog(iscsi_member_dialog); - initISCSI (""); + initDiscoveryDomainPotentialISCSI (dd_id); symbol ret = `nil; - while(ret != `exit && ret != `add) { + while(ret != `exit ) { boolean enable=false; ret = (symbol)UI::UserInput(); if (ret == `add) @@ -141,6 +196,7 @@ any index = UI::QueryWidget(`id (`members_table),`CurrentItem); string iqn = ((term)UI::QueryWidget(`id(`members_table),`Item(index)))[1]:""; IsnsServer::addDDMember(address,dd_id,iqn); + initDiscoveryDomainPotentialISCSI (dd_id); } } @@ -155,7 +211,7 @@ `Heading(_("Add Discovery Domain to Set")), `Label(dds_name), `HSpacing(50), - `Heading (_("Discovery Domains")), + `Heading (_("Avaliable Discovery Domains")), `HBox( `VSpacing(10), `Table(`id(`dd_table), @@ -171,10 +227,10 @@ ); UI::OpenDialog(dds_dialog); - initDiscoveryDomain (""); + initDiscoveryDomainPotential (dds_id); symbol ret = `nil; - while(ret != `exit && ret != `add) { + while(ret != `exit) { boolean enable=false; ret = (symbol)UI::UserInput(); if (ret == `add) @@ -182,6 +238,7 @@ y2milestone("Add a dds member"); string dd_id = (string)UI::QueryWidget(`id (`dd_table),`CurrentItem); IsnsServer::addDDSMember(address,dds_id,dd_id); + initDiscoveryDomainPotential (dds_id); } } @@ -200,6 +257,8 @@ string type = _("Target or Initiator"); list <term> inc_items = []; + checkISNS(); + foreach(map <string,any> key, IsnsServer::readISCSI(address), { inc_items = add(inc_items, `item(`id(count), key["NODE"]:"",key["TYPE"]:"")); count = count + 1; @@ -208,6 +267,33 @@ UI::ChangeWidget(`id(`members_table), `Items, inc_items); } +void initDiscoveryDomainPotentialISCSI (string key){ + integer count = 0; + string type = _("Target or Initiator"); + list <term> inc_items = []; + string iscsinode=""; + list <map <string,any> > ddmembers= []; + string found="FALSE"; + + ddmembers = IsnsServer::readDDMembers(address, key); + + foreach(map <string,any> iscsinode, IsnsServer::readISCSI(address), { + found = "FALSE"; + foreach(map <string,any> ddmember, ddmembers, { + if ( ddmember["NODE"]:"" == iscsinode["NODE"]:"" ) + found = "TRUE"; + }); + + if ( found == "FALSE" ) + { + inc_items = add(inc_items, `item(`id(count), iscsinode["NODE"]:"",iscsinode["TYPE"]:"")); + count = count + 1; + } + }); + + UI::ChangeWidget(`id(`members_table), `Items, inc_items); +} + void initDDISCSIMembers (string key) ``{ integer count = 0; string index=""; @@ -233,15 +319,51 @@ string index=""; list <term> inc_items = []; - foreach(string key, IsnsServer::readDD(address), { + checkISNS(); + + foreach(string dd, IsnsServer::readDD(address), { if (count == 0) { - index = key; + index = dd; count = 1; } else { - inc_items = add(inc_items, `item(`id(index), key)); + inc_items = add(inc_items, `item(`id(index), dd)); + count = 0; + } + }); + + UI::ChangeWidget(`id(`dd_table), `Items, inc_items); +} + +void initDiscoveryDomainPotential (string key) ``{ + integer count = 0; + string index=""; + list <term> inc_items = []; + list <string> ddsmembers= []; + string found = "FALSE"; + + ddsmembers = IsnsServer::readDDSMembers(address, key); + + foreach(string dd, IsnsServer::readDD(address), { + if (count == 0) + { + index = dd; + count = 1; + } + else + { + found = "FALSE"; + foreach(string ddsmember, ddsmembers, { + if ( ddsmember == dd ) + found = "TRUE"; + }); + + if ( found == "FALSE" ) + { + inc_items = add(inc_items, `item(`id(index), dd)); + } count = 0; } }); @@ -257,6 +379,8 @@ y2milestone("isnsaddress is %1",address); + checkISNS(); + foreach(string key, IsnsServer::readDDS(address), { if (count == 0) { @@ -361,7 +485,7 @@ map<string, any> add_map = DiscoveryDomainDetailDialog($["VALUE":""]); if (add_map!=$[]) { - IsnsServer::addDD(address, add_map["VALUE"]:""); + // IsnsServer::addDD(address, add_map["VALUE"]:""); initDiscoveryDomain (""); } break; @@ -484,3 +608,17 @@ } } } + +integer checkISNS() +{ + string isns_status = IsnsServer::testISNSAccess(address); + if (isns_status != "OK") + { +// boolean display = true; +// Report::DisplayErrors(display,10); + Report::Error(_("Unable to connection to iSNS server. Check iSNS server address")); + return 1; + } + + return 0; +} diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-isns-1.0.3/src/wizards.ycp new/yast2-isns-1.0.4/src/wizards.ycp --- old/yast2-isns-1.0.3/src/wizards.ycp 2007-02-07 21:13:49.000000000 +0100 +++ new/yast2-isns-1.0.4/src/wizards.ycp 2007-09-18 21:05:13.000000000 +0200 @@ -27,10 +27,6 @@ /* FIXME: adapt to your needs */ map aliases = $[ "summary" : ``( SummaryDialog() ), -// "add" : ``( AddDialog() ), -// "edit" : ``( EditDialog() ), -// "auth" : ``( AuthDialog() ), -// "expert" : ``( ExpertDialog()) ]; /* FIXME: adapt to your needs */ @@ -39,30 +35,7 @@ "summary" : $[ `abort : `abort, `next : `next, -// `add : "add", -// `edit : "edit" ], -// "add" : $[ -// `abort : `abort, -// `next : "auth", -// `back : `back, -// `expert : "expert", -// ], -// "expert" : $[ -// `abort : `abort, -// `next : "add", -// `back : `back -// ], -// "edit" : $[ -// `abort : `abort, -// `next : "auth", -// `back : `back -// ], -// "auth" : $[ -// `abort : `abort, -// `next : "summary", -// `back : `back -// ] ]; any ret = Sequencer::Run(aliases, sequence); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de