ironic_inspector/plugins/standard.py
def _process_root_device_hints(self, introspection_data, node_info,
                                   inventory):
        """Detect root disk from root device hints and IPA inventory."""
        hints = node_info.node().properties.get('root_device')
        if not hints:
            LOG.debug('Root device hints are not provided',
                      node_info=node_info, data=introspection_data)
            return

        try:
            device = il_utils.match_root_device_hints(inventory['disks'],
                                                      hints)
        except (TypeError, ValueError) as e:
            raise utils.Error(
                _('No disks could be found using the root device hints '
                  '%(hints)s because they failed to validate. '
                  'Error: %(error)s') % {'hints': hints, 'error': e},
                node_info=node_info, data=introspection_data)

        if not device:
            raise utils.Error(_('No disks satisfied root device hints'),
                              node_info=node_info, data=introspection_data)

        LOG.debug('Disk %(disk)s of size %(size)s satisfies '
                  'root device hints',
                  {'disk': device.get('name'), 'size': device['size']},
                  node_info=node_info, data=introspection_data)
        introspection_data['root_disk'] = device
Detect root disk from root device hints and IPA inventory.
Detect root disk from root device hints and IPA inventory.
Detect root disk from root device hints and IPA inventory .
def _process_root_device_hints(self, introspection_data, node_info,
                                   inventory):
        hints = node_info.node().properties.get('root_device')
        if not hints:
            LOG.debug('Root device hints are not provided',
                      node_info=node_info, data=introspection_data)
            return
        try:
            device = il_utils.match_root_device_hints(inventory['disks'],
                                                      hints)
        except (TypeError, ValueError) as e:
            raise utils.Error(
                _('No disks could be found using the root device hints '
                  '%(hints)s because they failed to validate. '
                  'Error: %(error)s') % {'hints': hints, 'error': e},
                node_info=node_info, data=introspection_data)
        if not device:
            raise utils.Error(_('No disks satisfied root device hints'),
                              node_info=node_info, data=introspection_data)
        LOG.debug('Disk %(disk)s of size %(size)s satisfies '
                  'root device hints',
                  {'disk': device.get('name'), 'size': device['size']},
                  node_info=node_info, data=introspection_data)
        introspection_data['root_disk'] = device
def _process_root_device_hints ( self , introspection_data , node_info , inventory ) : hints = node_info . node ( ) . properties . get ( 'root_device' ) if not hints : LOG . debug ( 'Root device hints are not provided' , node_info = node_info , data = introspection_data ) return try : device = il_utils . match_root_device_hints ( inventory [ 'disks' ] , hints ) except ( TypeError , ValueError ) as e : raise utils . Error ( _ ( 'No disks could be found using the root device hints ' '%(hints)s because they failed to validate. ' 'Error: %(error)s' ) % { 'hints' : hints , 'error' : e } , node_info = node_info , data = introspection_data ) if not device : raise utils . Error ( _ ( 'No disks satisfied root device hints' ) , node_info = node_info , data = introspection_data ) LOG . debug ( 'Disk %(disk)s of size %(size)s satisfies ' 'root device hints' , { 'disk' : device . get ( 'name' ) , 'size' : device [ 'size' ] } , node_info = node_info , data = introspection_data ) introspection_data [ 'root_disk' ] = device
Detect root disk from root device hints and IPA inventory.
Detect root disk from root device hints and IPA inventory .
"""Detect root disk from root device hints and IPA inventory."""
self
introspection_data
node_info
inventory