예제 #1
0
 def __init__(self, name, parent=None, shell=None):
     ConfigNode.__init__(self, name, parent, shell)
     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.')
     self.define_config_group_param(
         'global', 'auto_add_default_portal', 'bool',
         'If true, adds a portal listening on all IPs to new targets.')
     self.define_config_group_param(
         'global', 'max_backup_files', 'string',
         'Max no. of configurations to be backed up in /etc/target/backup/ directory.'
     )
     self.define_config_group_param(
         'global', 'auto_use_daemon', 'bool',
         'If true, commands will be sent to targetclid.')
예제 #2
0
파일: ui_node.py 프로젝트: mykaul/ovirt4cli
 def __init__(self, name, parent=None, shell=None):
     ConfigNode.__init__(self, name, parent, shell)
     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.')
     self.define_config_group_param(
         'global', 'username', 'string',
         'Username to use to connect to oVirt Engine.')
     self._api = None
     self._ip = None
예제 #3
0
 def execute_command(self, command, pparams=[], kparams={}):
     try:
         result = ConfigNode.execute_command(self, command, pparams,
                                             kparams)
     except Exception as msg:
         self.shell.log.error(str(msg))
         pass
     else:
         self.shell.log.debug("Command %s succeeded." % command)
         return result
예제 #4
0
 def __init__(self, name, parent=None, shell=None):
     ConfigNode.__init__(self, name, parent, shell)
     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.')
     self.define_config_group_param(
         'global', 'auto_add_default_portal', 'bool',
         'If true, adds a portal listening on all IPs to new targets.')
예제 #5
0
 def __init__(self, name, parent=None, shell=None):
     ConfigNode.__init__(self, name, parent, shell)
     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.')
     self.define_config_group_param(
         'global', 'auto_add_default_portal', 'bool',
         'If true, adds a portal listening on all IPs to new targets.')
예제 #6
0
 def execute_command(self, command, pparams=[], kparams={}):
     try:
         result = ConfigNode.execute_command(self, command,
                                             pparams, kparams)
     except Exception as e:
         raise e
     else:
         self.shell.log.debug("Command %s succeeded." % command)
         return result
     finally:
         if command in ["create", "delete", "delete_all", "add_initiator",
                        "allow_any_host", "split_bdev", "add_lun",
                        "add_pg_ig_maps", "remove_target", "add_secret",
                        "destruct_split_bdev", "delete_pmem_pool",
                        "create_pmem_pool", "delete_secret_all",
                        "delete_initiator", "set_auth", "delete_secret",
                        "delete_pg_ig_maps"]:
             self.get_root().refresh()
             self.refresh_node()
예제 #7
0
 def execute_command(self, command, pparams=[], kparams={}):
     try:
         result = ConfigNode.execute_command(self, command, pparams,
                                             kparams)
     except Exception as e:
         raise e
     else:
         self.shell.log.debug("Command %s succeeded." % command)
         return result
     finally:
         if self.shell.interactive and\
             command in ["create", "delete", "delete_all", "add_initiator",
                         "allow_any_host", "bdev_split_create", "add_lun",
                         "iscsi_target_node_add_pg_ig_maps", "remove_target", "add_secret",
                         "bdev_split_delete", "bdev_pmem_delete_pool",
                         "bdev_pmem_create_pool", "delete_secret_all",
                         "delete_initiator", "set_auth", "delete_secret",
                         "iscsi_target_node_remove_pg_ig_maps", "load_config",
                         "load_subsystem_config"]:
             self.get_root().refresh()
             self.refresh_node()
예제 #8
0
 def __init__(self, name, parent=None, shell=None):
     ConfigNode.__init__(self, name, parent, shell)
     self.logger = logging.getLogger('gwcli')
예제 #9
0
 def __init__(self, name, parent=None, shell=None):
     ConfigNode.__init__(self, name, parent, shell)
예제 #10
0
 def ui_setgroup_global(self, parameter, value):
     ConfigNode.ui_setgroup_global(self, parameter, value)
     self.get_root().refresh()
예제 #11
0
 def __init__(self, name, parent=None, shell=None):
     ConfigNode.__init__(self, name, parent, shell)
     self.http_mode = self.parent.http_mode
예제 #12
0
 def __init__(self, shell, as_root=False):
     ConfigNode.__init__(self, '/', shell=shell)
     self.as_root = as_root
예제 #13
0
 def ui_setgroup_global(self, parameter, value):
     ConfigNode.ui_setgroup_global(self, parameter, value)
     self.get_root().refresh()