ironic_inspector/plugins/standard.py
def before_processing(self, introspection_data, **kwargs):
        """Validate information about network interfaces."""

        bmc_address = utils.get_ipmi_address_from_data(introspection_data)
        bmc_v6address = utils.get_ipmi_v6address_from_data(introspection_data)
        # Overwrite the old ipmi_address field to avoid inconsistency
        introspection_data['ipmi_address'] = bmc_address
        introspection_data['ipmi_v6address'] = bmc_v6address
        if not (bmc_address or bmc_v6address):
            LOG.debug('No BMC address provided in introspection data, '
                      'assuming virtual environment', data=introspection_data)

        all_interfaces = self._get_interfaces(introspection_data)

        interfaces = self._validate_interfaces(all_interfaces,
                                               introspection_data)

        LOG.info('Using network interface(s): %s',
                 ', '.join('%s %s' % (name, items)
                           for (name, items) in interfaces.items()),
                 data=introspection_data)

        introspection_data['all_interfaces'] = all_interfaces
        introspection_data['interfaces'] = interfaces
        valid_macs = [iface['mac'] for iface in interfaces.values()]
        introspection_data['macs'] = valid_macs
Validate information about network interfaces.
Validate information about network interfaces.
Validate information about network interfaces .
def before_processing(self, introspection_data, **kwargs):
        bmc_address = utils.get_ipmi_address_from_data(introspection_data)
        bmc_v6address = utils.get_ipmi_v6address_from_data(introspection_data)
        introspection_data['ipmi_address'] = bmc_address
        introspection_data['ipmi_v6address'] = bmc_v6address
        if not (bmc_address or bmc_v6address):
            LOG.debug('No BMC address provided in introspection data, '
                      'assuming virtual environment', data=introspection_data)
        all_interfaces = self._get_interfaces(introspection_data)
        interfaces = self._validate_interfaces(all_interfaces,
                                               introspection_data)
        LOG.info('Using network interface(s): %s',
                 ', '.join('%s %s' % (name, items)
                           for (name, items) in interfaces.items()),
                 data=introspection_data)
        introspection_data['all_interfaces'] = all_interfaces
        introspection_data['interfaces'] = interfaces
        valid_macs = [iface['mac'] for iface in interfaces.values()]
        introspection_data['macs'] = valid_macs
def before_processing ( self , introspection_data , ** kwargs ) : bmc_address = utils . get_ipmi_address_from_data ( introspection_data ) bmc_v6address = utils . get_ipmi_v6address_from_data ( introspection_data ) introspection_data [ 'ipmi_address' ] = bmc_address introspection_data [ 'ipmi_v6address' ] = bmc_v6address if not ( bmc_address or bmc_v6address ) : LOG . debug ( 'No BMC address provided in introspection data, ' 'assuming virtual environment' , data = introspection_data ) all_interfaces = self . _get_interfaces ( introspection_data ) interfaces = self . _validate_interfaces ( all_interfaces , introspection_data ) LOG . info ( 'Using network interface(s): %s' , ', ' . join ( '%s %s' % ( name , items ) for ( name , items ) in interfaces . items ( ) ) , data = introspection_data ) introspection_data [ 'all_interfaces' ] = all_interfaces introspection_data [ 'interfaces' ] = interfaces valid_macs = [ iface [ 'mac' ] for iface in interfaces . values ( ) ] introspection_data [ 'macs' ] = valid_macs
Validate information about network interfaces.
Validate information about network interfaces .
"""Validate information about network interfaces.""" # Overwrite the old ipmi_address field to avoid inconsistency
self
introspection_data