summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceAzure.py
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-07-13 12:00:32 -0400
committerGitHub <noreply@github.com>2020-07-13 12:00:32 -0400
commit3cec3881062490727c5fff1b16b53f0176f976f0 (patch)
treea26576249a456556bfe2557d273af5192bd41985 /cloudinit/sources/DataSourceAzure.py
parentfecbd81889011e8a75badd18935297f3494fe485 (diff)
downloadvyos-cloud-init-3cec3881062490727c5fff1b16b53f0176f976f0.tar.gz
vyos-cloud-init-3cec3881062490727c5fff1b16b53f0176f976f0.zip
cloudinit: remove global disable of pylint W0105 and fix errors (#480)
This includes a fix to a test that had a string concatenation issue, and so was only testing a prefix of what was intended.
Diffstat (limited to 'cloudinit/sources/DataSourceAzure.py')
-rwxr-xr-xcloudinit/sources/DataSourceAzure.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
index 41431a7a..5e25b956 100755
--- a/cloudinit/sources/DataSourceAzure.py
+++ b/cloudinit/sources/DataSourceAzure.py
@@ -166,12 +166,11 @@ def get_resource_disk_on_freebsd(port_id):
port_id = port_id - 2
g1 = "000" + str(port_id)
g0g1 = "{0}-{1}".format(g0, g1)
- """
- search 'X' from
- 'dev.storvsc.X.%pnpinfo:
- classid=32412632-86cb-44a2-9b5c-50d1417354f5
- deviceid=00000000-0001-8899-0000-000000000000'
- """
+
+ # search 'X' from
+ # 'dev.storvsc.X.%pnpinfo:
+ # classid=32412632-86cb-44a2-9b5c-50d1417354f5
+ # deviceid=00000000-0001-8899-0000-000000000000'
sysctl_out = get_dev_storvsc_sysctl()
storvscid = find_storvscid_from_sysctl_pnpinfo(sysctl_out, g0g1)
@@ -1485,13 +1484,12 @@ def maybe_remove_ubuntu_network_config_scripts(paths=None):
def _is_platform_viable(seed_dir):
+ """Check platform environment to report if this datasource may run."""
with events.ReportEventStack(
name="check-platform-viability",
description="found azure asset tag",
parent=azure_ds_reporter
) as evt:
-
- """Check platform environment to report if this datasource may run."""
asset_tag = util.read_dmi_data('chassis-asset-tag')
if asset_tag == AZURE_CHASSIS_ASSET_TAG:
return True