summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-09-11 10:41:10 -0400
committerScott Moser <smoser@ubuntu.com>2014-09-11 10:41:10 -0400
commitb2ba18dcc48b4721b097dc108f5a5eceba6b87ab (patch)
tree42d855a12a8c2374baa46aa18e58f214381df2ce /cloudinit/sources
parent932c073db79e667623d27174c55e5b16ea439578 (diff)
downloadvyos-cloud-init-b2ba18dcc48b4721b097dc108f5a5eceba6b87ab.tar.gz
vyos-cloud-init-b2ba18dcc48b4721b097dc108f5a5eceba6b87ab.zip
when loading vendordata allow it to be string or list
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/helpers/openstack.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/cloudinit/sources/helpers/openstack.py b/cloudinit/sources/helpers/openstack.py
index 9718b0be..b7e19314 100644
--- a/cloudinit/sources/helpers/openstack.py
+++ b/cloudinit/sources/helpers/openstack.py
@@ -21,6 +21,7 @@
import abc
import base64
import copy
+import functools
import os
from cloudinit import ec2_utils
@@ -203,6 +204,9 @@ class BaseReader(object):
If not a valid location, raise a NonReadable exception.
"""
+ load_json_anytype = functools.partial(
+ util.load_json, root_types=(dict, basestring, list))
+
def datafiles(version):
files = {}
files['metadata'] = (
@@ -221,7 +225,7 @@ class BaseReader(object):
files['vendordata'] = (
self._path_join("openstack", version, 'vendor_data.json'),
False,
- util.load_json,
+ load_json_anytype,
)
return files