Skip to content

Commit

Permalink
Merge pull request #45 from gabi2/master
Browse files Browse the repository at this point in the history
improve help text (bnc #924502), warn only once (bnc #926621)
  • Loading branch information
gabi2 committed Jul 1, 2015
2 parents d704795 + b120048 commit 2105d8a
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 19 deletions.
9 changes: 9 additions & 0 deletions package/yast2-iscsi-client.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Thu Jun 18 14:22:05 CEST 2015 - gs@suse.de

- warn only once about non-standard initiator name (bsc#926621)
- improve help text concerning re-discovery of targets and
start-up mode (bsc#924502, bsc#924691, bsc#924693) and about
authentication settings (bsc#924685)
- 3.1.22

-------------------------------------------------------------------
Fri Feb 6 13:02:45 UTC 2015 - ancor@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-iscsi-client.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-iscsi-client
Version: 3.1.21
Version: 3.1.22
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
40 changes: 31 additions & 9 deletions src/include/iscsi-client/helps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,25 +88,28 @@ def initialize_iscsi_client_helps(include_target)
),
# table of connected targets
"server_table" => _(
"List of current sessions. To add a new target, select it and press <b>Add</b>.\n" +
"To remove it, press <b>Log Out</b>.\n" +
"To change the start-up status, press <b>Toggle</b>.\n"
"<p>List of current sessions.</p>" \
"<p>Use the <b>Add</b> button to get additional targets. A discovery is started to " \
"detect new targets and the start-up mode of already connected targets keeps " \
"unchanged.<br>" \
"Use <b>Log Out</b> to cancel the connection and with it remove the target from the list.<br>" \
"To change the start-up status, press <b>Edit</b>.</p>"
) +
# Warning
_("<h1>Warning</h1>") +
_(
"<p>When accessing an iSCSI device <b>READ</b>/<b>WRITE</b>, make sure that this access is exclusive. Otherwise there is a potential risk of data corruption.</p>\n"
),
"initiator_name" => _(
"<p><b>InitiatorName</b> is a value from <tt>/etc/iscsi/initiatorname.iscsi</tt>. \nIn case you have iBFT, this value will be added from there and you are only able to change it in the BIOS setup.</p>"
"<p><b>Initiator Name</b> is a value from <tt>/etc/iscsi/initiatorname.iscsi</tt>. \nIn case you have iBFT, this value will be added from there and you are only able to change it in the BIOS setup.</p>"
),
"isns" => _(
"If you want to use <b>iSNS</b> (Internet Storage Name Service) for discovering targets instead of the default SendTargets method,\nfill in the IP address of the iSNS server and port. The default port should be 3205.\n"
),
# discovery new target
"discovery" => _("<h1>iSCSI Initiator</h1>") +
_(
"Enter the <b>IP Address</b> of the discovered server.\n" +
"Enter the <b>IP Address</b> of the iSCSI target server.\n" +
"Only change <b>Port</b> if needed. For authentication, use <b>Username</b> and <b>Password</b>. If you do not need authentication,\n" +
"select <b>No Authentication</b>.\n"
) +
Expand All @@ -126,9 +129,6 @@ def initialize_iscsi_client_helps(include_target)
"conn_auth" => _(
"<h1>iSCSI Initiator</h1>"
) +
_(
"Select the type of authentication and enter the <b>Username</b> and <b>Password</b>."
) +
_("<h1>Startup</h1>") +
_(
"<p><b>manual</b> is for iSCSI targets which are not to be connected by\n" +
Expand All @@ -137,10 +137,32 @@ def initialize_iscsi_client_helps(include_target)
"root is on iSCSI. As such it will be evaluated by the initrd.</p>\n" +
"<p><b>automatic</b> is for iSCSI targets to be connected when the iSCSI service\n" +
"starts up.</p>\n"
) +
_("<h1>Authentication</h1>") +
_(
"<p>The default setting here is <i>No Authentication</i>. Uncheck the checkbox if " \
"authentication is needed for security reasons. Enter <b>Username</b> and <b>Password</b> " \
"for 'Incoming Authentication', 'Outgoing Authentication' or for both.</p>" \
"<p><b>Please note:</b><br>" \
"'Incoming Authentication' here correlates to 'Outgoing Authentication' "\
"on iSCSI target server side and the other way round.</p>"
),
# list of discovered targets
"discovered" => _(
"List of discovered targets. Start a new <b>Discovery</b> or <b>Connect</b> to any target."
"<p>This screen shows the list of discovered targets.</p>" \
"<p>Use the <b>Discovery</b> button to get available iSCSI targets " \
"from a server specified by IP address.<br>" \
"<b>Log In</b> to a target to establih the connection. If login was successful " \
"the column <i>Connected</i> shows status 'True' and the target will appear on " \
"the <i>Connected Targets</i> screen.<br>" \
"To remove a target use the <b>Delete</b> button.<br> <b>Hint:</b> " \
"Removing of targets is only possible for not connected onces. " \
"If required, <b>Log Out</b> at <i>Connected Targets</i> first.</p>" \
"<p><b>Please note:</b> Starting the <b>Discovery</b> again means doing a re-discovery " \
"of targets which possibly will change the start-up mode of already connected targets " \
"(to default 'manual'). " \
"Switch to <i>Connected Targets</i> screen and use the <b>Add</b> button if you want " \
"to add new targets without changing the start-up mode.</p>"
),
"ibft_table" => _("<h1>iBTF</h1>") +
"The <p>iSCSI Boot Firmware Table</p> is a table created by the iSCSI boot firmware in order to\npass parameters about the iSCSI boot device to the loaded OS."
Expand Down
26 changes: 17 additions & 9 deletions src/include/iscsi-client/widgets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,12 @@ def validateInitName(key, event)
# is freely selectable. For further details please check the iSCSI spec.

i_name = Convert.to_string(UI.QueryWidget(:initiator_name, :Value))

# name not changed at all or already saved after checking it
if IscsiClientLib.initiatorname == i_name
return true
end

# regexp for "yyyy-mm."
reg1 = "[[:digit:]]{4}-[[:digit:]]{2}."
# regexp for "cz.suse" or just "suse", "cz.su-se"
Expand All @@ -419,18 +425,20 @@ def validateInitName(key, event)
Builtins.regexpmatch(i_name, Builtins.sformat("^eui.%1%2$", reg1, reg2))

if !correct
continue = Popup.ContinueCancel(
go_on = Popup.YesNoHeadline( _("Incorrect Initiator Name"),
_(
"Incorrect InitiatorName.\n" +
"The correct syntax is\n" +
"iqn.yyyy-mm.reversed.domain.name[:identifier]\n" +
"or eui.yyyy-mm.reversed.domain.name[:identifier]\n" +
"\n" +
"Example:\n" +
"iqn.2007-04.cz.server:storage.disk.sdb\n"
"\n" +
"The correct syntax is\n" +
"iqn.yyyy-mm.reversed.domain.name[:identifier]\n" +
"or eui.yyyy-mm.reversed.domain.name[:identifier]\n" +
"\n" +
"Example:\n" +
"iqn.2007-04.cz.server:storage.disk.sdb\n" +
"\n" +
"Do you want to use the name?\n"
)
)
return continue
return go_on
else
return true
end
Expand Down

0 comments on commit 2105d8a

Please sign in to comment.