summaryrefslogtreecommitdiff
path: root/cloudinit/dmi.py
Commit message (Collapse)AuthorAgeFilesLines
* nocloud: add support for dmi variable expansion for seedfrom URLChad Smith2022-12-151-0/+28
| | | | | | | | | | | | | | | | NoCloud meta-data seedfrom (or kernel commandline seedfrom) URL can now provide variable expansion for system-specific DMI values as seen in /sys/class/dmi/id on Linux or kenv on FreeBSD platforms. Variable names of the format __dmi.SOME_VAR__ will be replaced when determining the URL from which NoCloud datasource GETs its user-data and meta-data. This allows for a common templated seedfrom URL which can be reused for mass deployments, but can allow for unique URLs based on classes of DMI system characteristics such as chassis serial, product name, UUID etc. LP: #1994980
* Oracle ds changes (#1474)Alberto Contreras2022-06-081-5/+5
| | | | | | | | | | | | | | | For primary network config: - Use `iSCSI` config if some `/run/net*` file exists, even if `/run/initramfs/open-iscsi.interface` does not. - If the instance is not an `iSCSI` one, then crawl the network config from `IMDS` instead of falling back to "best guess". - Remove unnecessary conditional use of dhcp.EphemeralDHCPv4 and use it always to crawl `IMDS`. - Migrate tests to pytest. - Extend unit test coverage. - Add some types for mypy. LP: #1967942
* Drop mypy excluded files (#1454)Alberto Contreras2022-05-231-19/+37
| | | | | | | | | - Add types to let mypy pass. - Add mypy flags: - detect unused ignores - redundant casts - Drop support of `ConfigParser` in Python 2 - Harden DataSourceLXD.network_config - Convert old-style commented types to proper types.
* Adopt Black and isort (SC-700) (#1157)James Falcon2021-12-151-32/+36
| | | | | Applied Black and isort, fixed any linting issues, updated tox.ini and CI.
* cloudinit/dmi.py: Change warning to debug to prevent console display (#1082)dermotbradley2021-10-261-2/+2
| | | | | Change DMI warning to a debug message to prevent it appearing on console during boot of machines, such as Raspberry Pi, that do not support DMI.
* replace usage of dmidecode with kenv on FreeBSD (#621)Mina Galić2020-11-061-27/+59
| | | | | | | | FreeBSD lets us read out kernel parameters with kenv(1), a user-space utility that's shipped in "base" We can use it in place of dmidecode(8), thus removing the dependency on sysutils/dmidecode, and the restrictions to i386 and x86_64 architectures that this utility imposes on FreeBSD. Co-authored-by: Scott Moser <smoser@brickies.net>
* cloudinit: move dmi functions out of util (#622)Scott Moser2020-11-021-0/+131
This just separates the reading of dmi values into its own file. Some things of note: * left import of util in dmi.py only for 'is_container' It'd be good if is_container was not in util. * just the use of 'util.is_x86' to dmi.py * open() is used directly rather than load_file.