Closed pkalever closed 6 years ago
With the recent block-level saveconfig fix,
$ targetcli /backstores/user:glfs/block create ... $ targetcli /backstores/user:glfs/block saveconfig
This works.
$ targetcli /backstores/user:glfs/block set dev_size=NEW $ targetcli /backstores/user:glfs/block saveconfig
This also works.
$ targetcli /backstores/user:glfs/block delete $ targetcli /backstores/user:glfs/block saveconfig No such path /backstores/user:glfs/block
(Obviously!!) This doesn't work with delete :-(
Currently, We cannot call 'targetcli / saveconfig' because it will override the unloaded configuration in saveconfig.json with current set of loaded config objects.
And if we just delete and do not have a way to remove the relevant config objects from saveconfig.json, then restart of the target.service will pick them again.
currently, we can use block-level save feature for create command and reconfig of different attributes, but there is no way to use block-level feature for delete command.
This patch introduces 'save' flag (False on default), which can trigger saveconfig internally as part of delete command.
$ targetcli /backstores/user:glfs delete test save=True Deleted storage object test.
Signed-off-by: Prasanna Kumar Kalever prasanna.kalever@redhat.com