Hi Jerome,
Thanks for your help.
Yes, the function just returns a True or False, the reason is that it is
the first patch, only one function, the function is not called by any
other functions, so I keep it sealed. When other functions call it in
the following patches, there would be a shortcut returned, I believe
every patch should do and only cover it's own work.
I did not see this reloading feature before. Thanks for let me know that
we already have the code for the reloading feature. I think that works
for me, that is what my patches intend to do.
Thanks for your efforts!
BR
Zhu Lingshan
On 10/26/2015 04:36 AM, Jerome Martin wrote:
Hi Zhu,
I have taken a look at your request, and noticed that your pull
request just defines a class method on CliConfig that essentially read
the contents of the config file into an unused variable, outputs a
"Reloading the configuration" and returns True. There is not much
there to reuse I am afraid.
However I agree that a shortcut to reload the system config might come
in handy in targetcli.
This is of course already possible, in several ways:
- Restarting the target service does exactly that - and more, arguably
too much even. The initscript works just fine AFAIK. I actually do not
get the scenario you describe for a reload function (in
github/targetcli issue #16)
- From targetcli, you can load and commit the saved config (or any
config for that matter):
root@ws1 ~ targetcli
targetcli 3.0.pre4 (rtslib 3.0.pre4.9~g6fd0bbf)
Copyright (c) 2011-2014 by Datera, Inc.
All rights reserved.
/> configure
Entering configure mode
This mode is a functionnal but early preview version of the
next-generation targetcli
Syncing policy and configuration...
### [edit] top-level
config# load /etc/target/scsi_target.lio
Replace the current configuration with /etc/target/scsi_target.lio?
[y/N] y
config# commit
Validating configuration
Apply changes and overwrite system configuration ? [y/N] y
Applying configuration
[clear] delete all live objects
[create] fabric iscsi
[create] fabric iscsi target
iqn.2003-01.org.linux-iscsi.ws0.x8664:sn.b83d79535ac7
[create] fabric iscsi target
iqn.2003-01.org.linux-iscsi.ws0.x8664:sn.b83d79535ac7 tpgt 1
Performing backup of startup configuration:
/var/target/backup-2015-10-25_21:12:31.lio
Saving new startup configuration
So, for convenience I added a 'reload' command in configure mode of
targetcli that reloads and commits the saved configuration in one
step, with no argument required.
Thanks for the suggestion. Tell me if this works for you.
Best Regards,
--
Jerome
--
To unsubscribe from this list: send the line "unsubscribe
target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html