summaryrefslogtreecommitdiff
path: root/cloudinit/sources/helpers/openstack.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-03-24 17:30:57 -0400
committerScott Moser <smoser@ubuntu.com>2016-03-24 17:30:57 -0400
commit18bf614ca1d9fbabdf83495e7675a2cacaf6c2f4 (patch)
treede2352926ea476abcafcdb14790ea21958973db9 /cloudinit/sources/helpers/openstack.py
parent4f2065ad569355d5d0bc54176bde6b8e55047341 (diff)
parent20cc8113dde9e6849e8a692aea64cf81a266406d (diff)
downloadvyos-cloud-init-18bf614ca1d9fbabdf83495e7675a2cacaf6c2f4.tar.gz
vyos-cloud-init-18bf614ca1d9fbabdf83495e7675a2cacaf6c2f4.zip
support network configuration in cloud-init --local
this allows 'cloud-init --local' to fully run before networking comes up. By doing so, we can now cleanly apply networking to the new system. This adds support for reading ConfigDrive network configuration and also from NoCloud. The support is only present for ubuntu/debian at the current time. Other distros will follow. Also ability to specify network configuration on kernel command line via either ip= or network-config=<base64>.
Diffstat (limited to 'cloudinit/sources/helpers/openstack.py')
-rw-r--r--cloudinit/sources/helpers/openstack.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/cloudinit/sources/helpers/openstack.py b/cloudinit/sources/helpers/openstack.py
index bd93d22f..1aa6bbae 100644
--- a/cloudinit/sources/helpers/openstack.py
+++ b/cloudinit/sources/helpers/openstack.py
@@ -51,11 +51,13 @@ OS_LATEST = 'latest'
OS_FOLSOM = '2012-08-10'
OS_GRIZZLY = '2013-04-04'
OS_HAVANA = '2013-10-17'
+OS_LIBERTY = '2015-10-15'
# keep this in chronological order. new supported versions go at the end.
OS_VERSIONS = (
OS_FOLSOM,
OS_GRIZZLY,
OS_HAVANA,
+ OS_LIBERTY,
)
@@ -229,6 +231,11 @@ class BaseReader(object):
False,
load_json_anytype,
)
+ files['networkdata'] = (
+ self._path_join("openstack", version, 'network_data.json'),
+ False,
+ load_json_anytype,
+ )
return files
results = {
@@ -334,7 +341,7 @@ class ConfigDriveReader(BaseReader):
path = self._path_join(self.base_path, 'openstack')
found = [d for d in os.listdir(path)
if os.path.isdir(os.path.join(path))]
- self._versions = found
+ self._versions = sorted(found)
return self._versions
def _read_ec2_metadata(self):