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.')
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.')
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)
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))
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.')
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
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." )
def ui_setgroup_global(self, parameter, value): ConfigNode.ui_setgroup_global(self, parameter, value) self.get_root().refresh()