summaryrefslogtreecommitdiff
path: root/rtsadmin/ui_root.py
diff options
context:
space:
mode:
authorJerome Martin <jxm@risingtidesystems.com>2011-07-19 11:19:51 +0200
committerJerome Martin <jxm@risingtidesystems.com>2011-07-19 11:23:33 +0200
commit5a80388763011dd7b720be76cff2ccb33bd1d2f4 (patch)
tree7488da1643a01381f875dc9751d61408d92c6f75 /rtsadmin/ui_root.py
parent0876739948b9300bfd32c88fa0ff661537c7be59 (diff)
downloadtargetcli-5a80388763011dd7b720be76cff2ccb33bd1d2f4.tar.gz
Root UI now imports tcm_dump directly.
Diffstat (limited to 'rtsadmin/ui_root.py')
-rw-r--r--rtsadmin/ui_root.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/rtsadmin/ui_root.py b/rtsadmin/ui_root.py
index db3096b..fb1fb25 100644
--- a/rtsadmin/ui_root.py
+++ b/rtsadmin/ui_root.py
@@ -22,8 +22,9 @@ from rtslib import RTSRoot
from ui_node import UINode
from socket import gethostname
from ui_target import UIFabricModule
-from ui_backstore_legacy import UIBackstoresLegacy
+from tcm_dump import tcm_full_backup
from ui_backstore import UIBackstores
+from ui_backstore_legacy import UIBackstoresLegacy
class UIRoot(UINode):
'''
@@ -82,7 +83,11 @@ class UIRoot(UINode):
+ "disk will overwrite your boot settings.")
self.shell.con.display("The current target configuration will become "
+ "the default boot config.")
- system('PYTHONPATH="" python /usr/sbin/tcm_dump --o')
+ input = raw_input("Are you sure? Type 'yes': ")
+ if input == "yes":
+ tcm_full_backup(None, None, '1', None)
+ else:
+ self.shell.log.warning("Aborted, configuration left untouched.")
def ui_command_version(self):
'''