コード例 #1
0
ファイル: ui_node.py プロジェクト: rosscameron/targetcli-fb
 def __init__(self, name, parent=None, shell=None):
     ConfigNode.__init__(self, name, parent, shell)
     self.cfs_cwd = RTSRoot.configfs_dir
     self.define_config_group_param(
         'global', 'auto_enable_tpgt', 'bool',
         'If true, automatically enables TPGTs upon creation.')
     self.define_config_group_param(
         'global', 'auto_add_mapped_luns', 'bool',
         'If true, automatically create node ACLs mapped LUNs '
         + 'after creating a new target LUN or a new node ACL')
     self.define_config_group_param(
         'global', 'auto_cd_after_create', 'bool',
         'If true, changes current path to newly created objects.')
     self.define_config_group_param(
         'global', 'auto_save_on_exit', 'bool',
         'If true, saves configuration on exit.')
コード例 #2
0
ファイル: ui_node.py プロジェクト: dresong/targetcli
 def __init__(self, name, parent=None, shell=None):
     ConfigNode.__init__(self, name, parent, shell)
     self.cfs_cwd = RTSRoot.configfs_dir
     self.define_config_group_param(
         'global', 'auto_enable_tpg', 'bool',
         'If true, automatically enables TPGs upon creation.')
     self.define_config_group_param(
         'global', 'auto_add_mapped_luns', 'bool',
         'If true, automatically create node ACLs mapped LUNs '
         + 'after creating a new target LUN or a new node ACL')
     self.define_config_group_param(
         'global', 'legacy_hba_view', 'bool',
         'If true, use legacy HBA view, allowing to create more '
         + 'than one storage object per HBA.')
     self.define_config_group_param(
         'global', 'auto_cd_after_create', 'bool',
         'If true, changes current path to newly created objects.')
コード例 #3
0
ファイル: ui_node.py プロジェクト: wedged/targetcli
 def __init__(self, name, parent=None, shell=None):
     ConfigNode.__init__(self, name, parent, shell)
     self.cfs_cwd = RTSRoot.configfs_dir
     self.define_config_group_param(
         'global', 'auto_enable_tpg', 'bool',
         'If true, automatically enables TPGs upon creation.')
     self.define_config_group_param(
         'global', 'auto_add_mapped_luns', 'bool',
         'If true, automatically create node ACLs mapped LUNs ' +
         'after creating a new target LUN or a new node ACL')
     self.define_config_group_param(
         'global', 'legacy_hba_view', 'bool',
         'If true, use legacy HBA view, allowing to create more ' +
         'than one storage object per HBA.')
     self.define_config_group_param(
         'global', 'auto_cd_after_create', 'bool',
         'If true, changes current path to newly created objects.')
コード例 #4
0
ファイル: ui_node.py プロジェクト: Thingee/targetcli
 def execute_command(self, command, pparams=[], kparams={}):
     """
     We overload this one in order to handle our own exceptions cleanly,
     and not just configshell's ExecutionError.
     """
     try:
         result = ConfigNode.execute_command(self, command, pparams, kparams)
     except RTSLibError, msg:
         self.shell.log.error(msg.message)
コード例 #5
0
ファイル: ui_node.py プロジェクト: wedged/targetcli
 def execute_command(self, command, pparams=[], kparams={}):
     '''
     We overload this one in order to handle our own exceptions cleanly,
     and not just configshell's ExecutionError.
     '''
     try:
         result = ConfigNode.execute_command(self, command, pparams,
                                             kparams)
     except RTSLibError, msg:
         self.shell.log.error(str(msg))
コード例 #6
0
 def __init__(self, name, parent=None, shell=None):
     ConfigNode.__init__(self, name, parent, shell)
     self.cfs_cwd = RTSRoot.configfs_dir
     self.define_config_group_param(
         'global', 'export_backstore_name_as_model', 'bool',
         'If true, the backstore name is used for the scsi inquiry model name.'
     )
     self.define_config_group_param(
         'global', 'auto_enable_tpgt', 'bool',
         'If true, automatically enables TPGTs upon creation.')
     self.define_config_group_param(
         'global', 'auto_add_mapped_luns', 'bool',
         'If true, automatically create node ACLs mapped LUNs ' +
         'after creating a new target LUN or a new node ACL')
     self.define_config_group_param(
         'global', 'auto_cd_after_create', 'bool',
         'If true, changes current path to newly created objects.')
     self.define_config_group_param(
         'global', 'auto_save_on_exit', 'bool',
         'If true, saves configuration on exit.')
コード例 #7
0
ファイル: ui_node.py プロジェクト: JonnyJD/targetcli
 def execute_command(self, command, pparams=[], kparams={}):
     '''
     We overload this one in order to handle our own exceptions cleanly,
     and not just configshell's ExecutionError.
     '''
     try:
         result = ConfigNode.execute_command(self, command,
                                             pparams, kparams)
     except RTSLibError as msg:
         self.shell.log.error(str(msg))
     else:
         self.shell.log.debug("Command %s succeeded." % command)
         return result
コード例 #8
0
ファイル: ui_node.py プロジェクト: Thingee/targetcli
 def __init__(self, name, parent=None, shell=None):
     ConfigNode.__init__(self, name, parent, shell)
     self.cfs_cwd = RTSRoot.configfs_dir
     self.define_config_group_param(
         "global", "auto_enable_tpg", "bool", "If true, automatically enables TPGs upon creation."
     )
     self.define_config_group_param(
         "global",
         "auto_add_mapped_luns",
         "bool",
         "If true, automatically create node ACLs mapped LUNs "
         + "after creating a new target LUN or a new node ACL",
     )
     self.define_config_group_param(
         "global",
         "legacy_hba_view",
         "bool",
         "If true, use legacy HBA view, allowing to create more " + "than one storage object per HBA.",
     )
     self.define_config_group_param(
         "global", "auto_cd_after_create", "bool", "If true, changes current path to newly created objects."
     )
コード例 #9
0
ファイル: ui_node.py プロジェクト: JonnyJD/targetcli
 def ui_setgroup_global(self, parameter, value):
     ConfigNode.ui_setgroup_global(self, parameter, value)
     self.get_root().refresh()
コード例 #10
0
ファイル: ui_node.py プロジェクト: wedged/targetcli
 def ui_setgroup_global(self, parameter, value):
     ConfigNode.ui_setgroup_global(self, parameter, value)
     self.get_root().refresh()