summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-04add snappy moduleScott Moser
2015-03-04run emit_upstart only if upstart was init systemScott Moser
2015-03-03packages/debian: move software-properties-common to recommends, add eatmydataScott Moser
2015-03-02MAAS: fix oauth imports and reading of command line seed.Scott Moser
LP: #1427263
2015-03-02DataSourceMAAS: fix oauthlib importsScott Moser
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")'
2015-03-02get_cmdline_url: fix in python3 when callingScott Moser
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.
2015-03-02util.py: remove 'print' debug statementScott Moser
2015-03-02url_helper.py: fix undefined variableScott Moser
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)
2015-03-02pep8Scott Moser
2015-02-26readurl, read_file_or_url returns bytes, user must convert as necessaryScott Moser
* 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
2015-02-26status_wrapper: do not swallow errorsScott Moser
2015-02-26avoid conversion to string in #includeScott Moser
2015-02-25UserDataProcessor: during include, do not convert to stringScott Moser
an include can include a gzip type also or binary data so avoid conversion here.
2015-02-25move towards user-data being binaryScott Moser
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.
2015-02-24further fixing of non-text user-data.Scott Moser
2015-02-24move recently added test_udprocess tests to test_data, improve a bitScott Moser
explicitly test compressed user-data.
2015-02-24Azure: Fix consumption of user-dataScott Moser
This was previously broken in python3 as the userdata would be bytes rather than a string. LP: #1423972
2015-02-24use util.decode_binary rather than str, add tests.Scott Moser
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).
2015-02-24tox: set LC_ALL=en_US.utf-8 rather than CScott Moser
this works around an issue in httpretty where it is not able to install in tox if LC_ALL is set to C.
2015-02-24CloudStack: support fetching password from virtual routerScott Moser
LP: #1422388
2015-02-24merge from trunkScott Moser
2015-02-23Make parameter list for get_hostname method consistentJoshua Harlow
2015-02-23Add documentation about upstream CloudStack HTTP fix.Daniel Watkins
2015-02-23Always close the password server connection, even on failure.Daniel Watkins
2015-02-20Fix for Py2 to Py3 difference: cloud-init user-data mime conversion fails onBen Howard
base64 encoded data.
2015-02-20Split CloudStack password handling out to separate class.Daniel Watkins
2015-02-20Minor formatting clean-up in CloudStack DS.Daniel Watkins
2015-02-20Add automated tests for CloudStack passwords.Daniel Watkins
2015-02-18Set an explicit timeout when fetching CloudStack passwords.Daniel Watkins
2015-02-18Failing to fetch a CloudStack password should never fail the whole DS.Daniel Watkins
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.
2015-02-18Fix for ascii decode in DataSourceAzure (LP: #1422993).Ben Howard
2015-02-18Read ovf-env.xml as bytes.Daniel Watkins
This should fix the Azure data source on Python 3, and is appropriate as XML shouldn't really be read as a string.
2015-02-18Set LC_ALL=C for tox tests.Daniel Watkins
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.
2015-02-17Add explanatory comment.Daniel Watkins
2015-02-17Fetch and use passwords from CloudStack virtual router.Daniel Watkins
2015-02-17Clean up imports in DataSourceCloudStack.py.Daniel Watkins
2015-02-13fix usage of python2 'print'Scott Moser
2015-02-13support for managing GPT partitionsScott Moser
Specifically, this is to support Azure's G-series VMs (which come with disks up to 6500GB).
2015-02-13tests/unittests/test_util.py: pep8Scott Moser
2015-02-12mount_cb: fix scoping of an exception in python3Scott Moser
2015-02-11some python3 fixesScott Moser
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
2015-02-11include exception in error again.Scott Moser
it is admittedly not clear, but 'exc' should be definied if mountpoint is not.
2015-02-11pickle contents: be careful loading and storing pickle to be binaryScott Moser
2015-02-11provide default final message in jinja to avoid WARN in logScott Moser
2015-02-11open console as text modeScott Moser
2015-02-11Open /dev/console in text mode (so we don't have to encode strings to write ↵Daniel Watkins
them).
2015-02-11pep8Scott Moser
2015-02-11add tools/tox-venv for running in a tox envScott Moser
2015-02-11Encode messages to utf-8 before writing them to the console in util.multi_log.Daniel Watkins
2015-02-11Add unittests for util.multi_log.Daniel Watkins