summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceScaleway.py
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2020-11-02 15:41:11 -0500
committerGitHub <noreply@github.com>2020-11-02 15:41:11 -0500
commit0af1ff1eaf593c325b4f53181a572110eb016c50 (patch)
tree2e0dab084dffd4664a6320f15baf374aff008917 /cloudinit/sources/DataSourceScaleway.py
parentd619f5171ac0ce5b626ef4575ad5f4468e94c987 (diff)
downloadvyos-cloud-init-0af1ff1eaf593c325b4f53181a572110eb016c50.tar.gz
vyos-cloud-init-0af1ff1eaf593c325b4f53181a572110eb016c50.zip
cloudinit: move dmi functions out of util (#622)
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.
Diffstat (limited to 'cloudinit/sources/DataSourceScaleway.py')
-rw-r--r--cloudinit/sources/DataSourceScaleway.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/sources/DataSourceScaleway.py b/cloudinit/sources/DataSourceScaleway.py
index 83c2bf65..41be7665 100644
--- a/cloudinit/sources/DataSourceScaleway.py
+++ b/cloudinit/sources/DataSourceScaleway.py
@@ -25,6 +25,7 @@ import requests
from requests.packages.urllib3.connection import HTTPConnection
from requests.packages.urllib3.poolmanager import PoolManager
+from cloudinit import dmi
from cloudinit import log as logging
from cloudinit import sources
from cloudinit import url_helper
@@ -56,7 +57,7 @@ def on_scaleway():
* the initrd created the file /var/run/scaleway.
* "scaleway" is in the kernel cmdline.
"""
- vendor_name = util.read_dmi_data('system-manufacturer')
+ vendor_name = dmi.read_dmi_data('system-manufacturer')
if vendor_name == 'Scaleway':
return True