Age | Commit message (Collapse) | Author |
|
|
|
|
|
dmidecode and /sys/class/dmi/id/* use different names for the same
information. This modified the logic in util.read_dmi_data to map from
dmidecode names to sysfs names before looking in sysfs.
|
|
In both python2 and python3,
This throws "'module' object has no attribute 'oauth1'"
$ python3 -c 'import oauthlib; oauthlib.oauth1.Client("x")'
While this works fine:
$ python3 -c 'import oauthlib.oauth1 as oauth1; oauth1.Client("x")'
|
|
get_cmdline_url was passing a string to response.contents.startswith()
where response.contents is now bytes.
this changes it to convert input to text, and also to default to text.
|
|
|
|
python2 scoping is different and running wait_for_url in python3
results in a use of undeclared variable 'e'.
$ python3 -c 'from cloudinit import url_helper; \
url_helper.wait_for_url("o", max_wait=3,timeout=1, exception_cb=print)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "cloudinit/url_helper.py", line 358, in wait_for_url
exception_cb(msg=status_msg, exception=e)
|
|
|
|
|
|
an include can include a gzip type also or binary data
so avoid conversion here.
|
|
UrlResponse: biggest change... make readurl return bytes, making user
know what to do with it.
util: add load_tfile_or_url for loading text file or url
as read_file_or_url now returns bytes
ec2_utils: all meta-data is text, remove non-obvious string translations
DigitalOcean: adjust for ec2_utils
DataSourceGCE, DataSourceMAAS: user-data is binary other fields are text.
openstack.py: read paths without decoding to text. This is ok as paths
other than user-data are json, and load_json will handle
load_file still returns text, and that is what most things use.
|
|
|
|
This was previously broken in python3 as the userdata would be bytes
rather than a string.
LP: #1423972
|
|
just seems to make more sense to decode here.
Add a test showing the previous failure (testBytesInPayload)
And one that should pass (testStringInPayload)
Also, add a test for unencoded content in the ovf xml (test_userdata_plain)
And explicitly set encoding on another test (test_userdata_found).
|
|
LP: #1422388
|
|
|
|
|
|
|
|
|
|
base64 encoded data.
|
|
|
|
|
|
|
|
There might be some CloudStack deployments without the :8080 password
server, and there's no reason the rest of the data source can't be used
for them.
|
|
This should fix the Azure data source on Python 3, and is appropriate as
XML shouldn't really be read as a string.
|
|
|
|
|
|
|
|
|
|
Specifically, this is to support Azure's G-series VMs (which come with
disks up to 6500GB).
|
|
|
|
it is admittedly not clear, but 'exc' should be definied if
mountpoint is not.
|
|
|
|
|
|
them).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Refactor "fully" decoding the payload of a text/* part. In Python 3,
decode=True only means to decode according to Content-Transfer-Encoding, not
according to any charset in the Content-Type header. So do that.
|
|
- Refactor both the base64 encoding and decoding into utility functions.
Also:
- Mechanically fix some other broken untested code.
|
|
- Just use util.load_file() instead of yet another way to open and read the
file.
|
|
|
|
|
|
- Remove str() wrappers to second argument to write_files() where it is no
longer necessary.
Also: Fixed a couple of other octal literals which clearly weren't being
tested.
|
|
|