Give iSCSI initiator information of iLO.

        :returns: iSCSI initiator information.
        :raises: IloError, on an error from iLO.
        :raises: IloCommandNotSupportedError, if the system is
                 in the bios boot mode.
965557
def get_iscsi_initiator_info(self):
        
        headers, bios_uri, bios_settings = self._check_bios_resource()
        if('links' in bios_settings and 'iScsi' in bios_settings['links']):
            iscsi_uri = bios_settings['links']['iScsi']['href']
            status, headers, iscsi_settings = self._rest_get(iscsi_uri)

            if status != 200:
                msg = self._get_extended_error(iscsi_settings)
                raise exception.IloError(msg)
            return iscsi_settings['iSCSIInitiatorName']
        else:
            msg = ('"links/iScsi" section in bios '
                   'does not exist')
            raise exception.IloCommandNotSupportedError(msg)
400530
def _aload32(ins):
    ''' 
    '''
    output = _addr(ins.quad[2])

    output.append('call __ILOAD32')
    output.append('push de')
    output.append('push hl')

    REQUIRES.add('iload32.asm')

    return output
790435
def enable_i2c(self):
        
        config = self._interface_configuration(CONFIG_QUERY)
        return config == CONFIG_GPIO_I2C or config == CONFIG_SPI_I2C
1006760
def _init():
    

    preferred = os.getenv("QT_PREFERRED_BINDING")
    verbose = os.getenv("QT_VERBOSE") is not None

    if preferred:

        # Debug mode, used in installer
        if preferred == "None":
            sys.modules[__name__].__wrapper_version__ = __version__
            return

        available = {
            "PySide2": _pyside2,
            "PySide": _pyside,
            "PyQt5": _pyqt5,
            "PyQt4": _pyqt4
        }

        if preferred not in available:
            raise ImportError("Preferred Qt binding \"%s\" "
                              "not available" % preferred)

        binding = available[preferred]
        sys.modules[__name__] = binding()
        return

    else:
        for binding in (_pyside2,
                        _pyqt5,
                        _pyside,
                        _pyqt4):

            if verbose:
                sys.stdout.write("Trying %s" % binding.__name__[1:])

            try:
                sys.modules[__name__] = binding()
                return

            except ImportError as e:

                if verbose:
                    sys.stdout.write(" - ImportError(\"%s\")\n" % e)

                continue

    # If not binding were found, throw this error
    raise ImportError("No Qt binding were found.")
699323
def initializerepo(self):
        

        try:
            os.mkdir(self.repopath)
        except OSError:
            pass

        cmd = self.repo.init(bare=self.bare, shared=self.shared)

        if not self.bare:
            self.write_testing_data([], [])
            self.write_training_data([], [])
            self.write_classifier(None)

            cmd = self.repo.add('training.pkl')
            cmd = self.repo.add('testing.pkl')
            cmd = self.repo.add('classifier.pkl')

            cmd = self.repo.commit(m='initial commit')
            cmd = self.repo.tag('initial')
            cmd = self.set_version('initial')
348348
def get_uefi_boot_string(self, mac):
        
        boot_sources = self.boot_sources
        if not boot_sources:
            msg = ('Boot sources are not found')
            LOG.debug(msg)
            raise exception.IloError(msg)

        for boot_source in boot_sources:
            if (mac.upper() in boot_source['UEFIDevicePath'] and
                    'iSCSI' in boot_source['UEFIDevicePath']):
                return boot_source['StructuredBootString']
        else:
            msg = ('MAC provided "%s" is Invalid' % mac)
            raise exception.IloInvalidInputError(msg)
1132148
def iter_init(self) :
        ""
        iter = self.ExtractIter(None)
        if dbus.dbus_message_iter_init(self._dbobj, iter._dbobj) == 0 :
            iter._nulliter = True
        #end if
        return \
             iter
38414
def get_interface(iface):
    '''
    
    '''
    _interfaces = get_interfaces_details()
    for _interface in _interfaces['interfaces']:
        if _interface['connectionid'] == iface:
            return _dict_to_string(_interface)
    return None
717896
def _init_io_module():
    """"""
    plist = ctypes.POINTER(ctypes.c_void_p)()
    size = ctypes.c_uint()
    check_call(_LIB.MXListDataIters(ctypes.byref(size), ctypes.byref(plist)))
    module_obj = sys.modules[__name__]
    for i in range(size.value):
        hdl = ctypes.c_void_p(plist[i])
        dataiter = _make_io_iterator(hdl)
        setattr(module_obj, dataiter.__name__, dataiter)
488295
def lookup_init_systems(self):
        
        if utils.IS_WIN:
            logger.debug(
                'Lookup is not supported on Windows. Assuming nssm...')
            return ['nssm']
        if utils.IS_DARWIN:
            logger.debug(
                'Lookup is not supported on OS X, Assuming launchd...')
            return ['launchd']

        logger.debug('Looking up init method...')
        return self._lookup_by_mapping() \
            or self._init_sys_auto_lookup()
1340843
def init(self):
        '''
        
        '''
        super(Serial, self).init()
        self.read_termination = self._init.get('read_termination', None)
        self.write_termination = self._init.get('write_termination', self.read_termination)
        try:
            self.read_termination = bytes(self.read_termination, 'utf-8')
            self.write_termination = bytes(self.write_termination, 'utf-8')
        except TypeError as e:
            logger.debug(e)
        self.timeout = self._init.get('timeout', None)  # timeout of 0 returns immediately

        self._port = serial.Serial(**{key: value for key, value in self._init.items() if key not in ("read_termination", "write_termination")})
706899
def _get_iface_info(iface):
    '''
    
    '''
    iface_info = interfaces()

    if iface in iface_info.keys():
        return iface_info, False
    else:
        error_msg = ('Interface "{0}" not in available interfaces: "{1}"'
                     ''.format(iface, '", "'.join(iface_info.keys())))
        log.error(error_msg)
        return None, error_msg
1009433
def get_ini(self, incl_unset=False):
        

        configp = configparser.ConfigParser(allow_no_value=True)
        configp.read_dict(self._config)
        with StringIO() as config_ini:
            if self._parser:
                self._parser.set_defaults(
                    **self.get_section(self.root_section)
                )
                argparse_ini = argparse_to_ini(
                    parser=self._parser, incl_unset=incl_unset
                )
                return argparse_ini
            else:
                configp.write(config_ini)
                return config_ini.getvalue()
12297
def update_initiators(self, iqns=None, wwns=None):
        
        # First get current iqns
        iqns = set(iqns) if iqns else set()
        current_iqns = set()
        if self.iscsi_host_initiators:
            current_iqns = {initiator.initiator_id
                            for initiator in self.iscsi_host_initiators}
        # Then get current wwns
        wwns = set(wwns) if wwns else set()
        current_wwns = set()
        if self.fc_host_initiators:
            current_wwns = {initiator.initiator_id
                            for initiator in self.fc_host_initiators}
        updater = UnityHostInitiatorUpdater(
            self, current_iqns | current_wwns, iqns | wwns)
        return updater.update()
48458
def _check_iscsi_rest_patch_allowed(self):
        

        headers, bios_uri, bios_settings = self._check_bios_resource()
        # Check if the bios resource exists.

        if('links' in bios_settings and 'iScsi' in bios_settings['links']):
            iscsi_uri = bios_settings['links']['iScsi']['href']
            status, headers, settings = self._rest_get(iscsi_uri)

            if status != 200:
                msg = self._get_extended_error(settings)
                raise exception.IloError(msg)

            if not self._operation_allowed(headers, 'PATCH'):
                headers, iscsi_uri, settings = (
                    self._get_iscsi_settings_resource(settings))
                self._validate_if_patch_supported(headers, iscsi_uri)

            return iscsi_uri

        else:
            msg = ('"links/iScsi" section in bios'
                   ' does not exist')
            raise exception.IloCommandNotSupportedError(msg)
1372639
def interface(iface):
    '''
    
    '''
    iface_info, error = _get_iface_info(iface)

    if error is False:
        return iface_info.get(iface, {}).get('inet', '')
    else:
        return error
272067
def initiator(self):
        
        match = self
        while match.parent:
            match = match.parent
        return match