summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceNoCloud.py
diff options
context:
space:
mode:
authorRisto Oikarinen <zharalim@outlook.com>2019-04-09 18:05:24 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-04-09 18:05:24 +0000
commitb76714c355a87416f9f07156b0f025aceaca7296 (patch)
treed880ef7232aada6824e9dcc959b1c867a6cdb7b6 /cloudinit/sources/DataSourceNoCloud.py
parentbdd9c0ac9bcd68ec1ac3b2038dad0ba3dbd83341 (diff)
downloadvyos-cloud-init-b76714c355a87416f9f07156b0f025aceaca7296.tar.gz
vyos-cloud-init-b76714c355a87416f9f07156b0f025aceaca7296.zip
Change DataSourceNoCloud to ignore file system label's case.
NoCloud data source now accepts both 'cidata' and 'CIDATA' as filesystem labels. This is similar to DataSourceConfigDrive's support for 'config-2' and 'CONFIG-2'.
Diffstat (limited to 'cloudinit/sources/DataSourceNoCloud.py')
-rw-r--r--cloudinit/sources/DataSourceNoCloud.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/sources/DataSourceNoCloud.py b/cloudinit/sources/DataSourceNoCloud.py
index 6860f0cc..fcf5d589 100644
--- a/cloudinit/sources/DataSourceNoCloud.py
+++ b/cloudinit/sources/DataSourceNoCloud.py
@@ -106,7 +106,9 @@ class DataSourceNoCloud(sources.DataSource):
fslist = util.find_devs_with("TYPE=vfat")
fslist.extend(util.find_devs_with("TYPE=iso9660"))
- label_list = util.find_devs_with("LABEL=%s" % label)
+ label_list = util.find_devs_with("LABEL=%s" % label.upper())
+ label_list.extend(util.find_devs_with("LABEL=%s" % label.lower()))
+
devlist = list(set(fslist) & set(label_list))
devlist.sort(reverse=True)