summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorJay Faulkner <jay@jvf.cc>2014-08-26 14:45:08 -0700
committerJay Faulkner <jay@jvf.cc>2014-08-26 14:45:08 -0700
commitdf7b6c5564e6ef8f5ceae9de8ff79410a4894f5f (patch)
tree0889b23260f826fcbeb01155135128b9e4291d5a /cloudinit
parent92c04cc87387e244485ad502ecacd46b3f150366 (diff)
downloadvyos-cloud-init-df7b6c5564e6ef8f5ceae9de8ff79410a4894f5f.tar.gz
vyos-cloud-init-df7b6c5564e6ef8f5ceae9de8ff79410a4894f5f.zip
Add failback for older Openstack configdrive versions
- Also utilizing the constants defined in cloudinit/sources/helpers/openstack.py for configdrive versions
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/sources/DataSourceConfigDrive.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py
index 8e65fc46..c55f7d4a 100644
--- a/cloudinit/sources/DataSourceConfigDrive.py
+++ b/cloudinit/sources/DataSourceConfigDrive.py
@@ -172,10 +172,12 @@ def get_ds_mode(cfgdrv_ver, ds_cfg=None, user=None):
return "net"
-def read_config_drive(source_dir, version="2013-10-17"):
+def read_config_drive(source_dir, version=openstack.OS_HAVANA):
reader = openstack.ConfigDriveReader(source_dir)
finders = [
(reader.read_v2, [], {'version': version}),
+ (reader.read_v2, [], {'version': openstack.OS_GRIZZLY}),
+ (reader.read_v2, [], {'version': openstack.OS_FOLSOM}),
(reader.read_v1, [], {}),
]
excps = []