--- targetcli/ui_root.py | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/targetcli/ui_root.py b/targetcli/ui_root.py index b3f78c4..47823af 100644 --- a/targetcli/ui_root.py +++ b/targetcli/ui_root.py @@ -72,6 +72,15 @@ class UIRoot(UINode): self.shell.log.debug("Loading %s." % fabric_module.name) UIFabricModule(fabric_module, self) + def ui_command_bar(self): + from rtslib.root import RTSRoot + import json + + self.assert_root() + + with open("/savecfg.json", "w+") as f: + f.write(json.dumps(RTSRoot().dump(), sort_keys=True, indent=4)) + def ui_command_saveconfig(self): ''' Saves the whole configuration tree to disk so that it will be restored -- 1.7.1 -- 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