summaryrefslogtreecommitdiff
path: root/cloudinit/helpers.py
diff options
context:
space:
mode:
authorAndrew Bogott <Andrewbogott@gmail.com>2021-02-05 10:11:14 -0600
committerGitHub <noreply@github.com>2021-02-05 11:11:14 -0500
commit3cebe0df1e002bd85c8aa78e89f0ca507c17195a (patch)
tree6211934629fd16534bd7b4d18c513192282b403a /cloudinit/helpers.py
parent36ddf1ebed3f264fa86ef4f657dce29244c2e068 (diff)
downloadvyos-cloud-init-3cebe0df1e002bd85c8aa78e89f0ca507c17195a.tar.gz
vyos-cloud-init-3cebe0df1e002bd85c8aa78e89f0ca507c17195a.zip
openstack: read the dynamic metadata group vendor_data2.json (#777)
Add support for openstack's dynamic vendor data, which appears under openstack/latest/vendor_data2.json This adds vendor_data2 to all pathways; it should be a no-op for non-OpenStack providers. LP: #1841104
Diffstat (limited to 'cloudinit/helpers.py')
-rw-r--r--cloudinit/helpers.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/cloudinit/helpers.py b/cloudinit/helpers.py
index 9752ad28..fc5011ec 100644
--- a/cloudinit/helpers.py
+++ b/cloudinit/helpers.py
@@ -230,6 +230,10 @@ class ConfigMerger(object):
cc_paths = ['cloud_config']
if self._include_vendor:
+ # the order is important here: we want vendor2
+ # (dynamic vendor data from OpenStack)
+ # to override vendor (static data from OpenStack)
+ cc_paths.append('vendor2_cloud_config')
cc_paths.append('vendor_cloud_config')
for cc_p in cc_paths:
@@ -337,9 +341,12 @@ class Paths(object):
"obj_pkl": "obj.pkl",
"cloud_config": "cloud-config.txt",
"vendor_cloud_config": "vendor-cloud-config.txt",
+ "vendor2_cloud_config": "vendor2-cloud-config.txt",
"data": "data",
"vendordata_raw": "vendor-data.txt",
+ "vendordata2_raw": "vendor-data2.txt",
"vendordata": "vendor-data.txt.i",
+ "vendordata2": "vendor-data2.txt.i",
"instance_id": ".instance-id",
"manual_clean_marker": "manual-clean",
"warnings": "warnings",