def test_get_config(self, client): _mock_pywsman_responses(client, _base_config()) expected = {} for resource in [resource_uris.DCIM_BIOSEnumeration, resource_uris.DCIM_BIOSString, resource_uris.DCIM_BIOSInteger]: expected.update(bios_wsman_mock.Enumerations[resource]['Dict']) result = bios.get_config(self.node) self.assertEqual(expected, result)
def get_bios_config(self, task, **kwargs): """Get BIOS settings. This method is used to retrieve the BIOS settings from a node. :param task: the ironic task used to identify the node. :param kwargs: not used. :raises: DracClientError on an error from pywsman. :raises: DracOperationFailed when a BIOS setting cannot be parsed. :returns: a dictionary containing BIOS settings. """ return bios.get_config(task.node)
def get_bios_config(self, task, **kwargs): """Get the BIOS configuration. This method is used to retrieve the BIOS settings from a node. :param task: a TaskManager instance containing the node to act on. :param kwargs: not used. :raises: DracOperationError on an error from python-dracclient. :returns: a dictionary containing BIOS settings. """ bios_attrs = {} for name, bios_attr in drac_bios.get_config(task.node).items(): bios_attrs[name] = bios_attr.__dict__ return bios_attrs
def get_bios_config(self, task, **kwargs): """Get the BIOS configuration. This method is used to retrieve the BIOS settings from a node. :param task: a TaskManager instance containing the node to act on. :param kwargs: not used. :raises: DracOperationError on an error from python-dracclient. :returns: a dictionary containing BIOS settings. """ bios_attrs = {} for name, bios_attr in drac_bios.get_config(task.node).items(): # NOTE(ifarkas): call from python-dracclient returns list of # namedtuples, converting it to dict here. bios_attrs[name] = bios_attr._asdict() return bios_attrs