Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
LP: #1427263
|
|
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)
|
|
|
|
* explicitly test compressed user-data.
* userdata_raw is now bytes
* add load_tfile_or_url for loading text file or url
* 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.
LP: #1424900
|
|
|
|
|
|
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.
|
|
|
|
explicitly test compressed user-data.
|
|
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).
|
|
this works around an issue in httpretty where it is not able to install
in tox if LC_ALL is set to C.
|
|
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.
|
|
As Python 3 uses the locale it's running in to determine the encoding it
should use by default, we need this to (a) reproduce a problem we're
seeing on Azure, and (b) to have tests run consistently between
environments.
|
|
|
|
|
|
|
|
|
|
Specifically, this is to support Azure's G-series VMs (which come with
disks up to 6500GB).
|
|
|
|
|
|
This fixes the last set of WARN messages in my testing.
* open /dev/console in text mode
* move final message to be jinja template by default to avoid
a warning about lack of cheetah.
* write and read pickle'd contents in binary
* some logging tests
Also:
* add tool tox-venv for simple things like:
tox-venv py34 /bin/bash
|
|
it is admittedly not clear, but 'exc' should be definied if
mountpoint is not.
|
|
|
|
|
|
|
|
them).
|
|
|
|
|
|
|