diff options
| author | Maurizio Lombardi <m.lombardi85@gmail.com> | 2018-06-04 13:29:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-04 13:29:22 +0200 |
| commit | cc199e9a57a764cb889f1b9fdfc047a36253b44b (patch) | |
| tree | 93ae77a6047474daef98f9e09698c2b03e23bd41 | |
| parent | f80ebf283cf753f57f4e5565537e7780eb7ba68f (diff) | |
| parent | bca03ea400a691e4218113b6d10adb61ce0cd511 (diff) | |
| download | targetcli-cc199e9a57a764cb889f1b9fdfc047a36253b44b.tar.gz | |
Merge pull request #117 from pkalever/save_del
[targetcli] saveconfig: way for block-level save with delete command
| -rw-r--r-- | targetcli/ui_backstore.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/targetcli/ui_backstore.py b/targetcli/ui_backstore.py index 0af29f0..02695ba 100644 --- a/targetcli/ui_backstore.py +++ b/targetcli/ui_backstore.py @@ -284,7 +284,7 @@ class UIBackstore(UINode): def summary(self): return ("Storage Objects: %d" % len(self._children), None) - def ui_command_delete(self, name): + def ui_command_delete(self, name, save=None): ''' Recursively deletes the storage object having the specified I{name}. If there are LUNs using this storage object, they will be deleted too. @@ -301,7 +301,8 @@ class UIBackstore(UINode): except ValueError: raise ExecutionError("No storage object named %s." % name) - child.rtsnode.delete() + save = self.ui_eval_param(save, 'bool', False) + child.rtsnode.delete(save=save) self.remove_child(child) self.shell.log.info("Deleted storage object %s." % name) |
