summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-09-08Use the same method for registering custom or default handlers.Scott Moser
Instead of having a register default handler and a register custom handler, just use the same function to do both but provide a parameter to affect how overwritting of previously existing content-types (which default handlers use to not overwrite custom ones).
2013-09-08log_time: Ensure that udelta is valid before including it as a float.Scott Moser
It appears that udelta could have been left undefined or left defined as a string "N/A" and then put threw a float formatter previously. Fix that by ensure its set to a default and put strong checking to make sure it is a float before using float formatting.
2013-09-08tools/read-dependencies, read-version: cleanups, and use sed not grepScott Moser
There are just some cleanups here, and use of simply 'sed' rather than grep and cut. The motivation is to support running with non gnu 'grep' that doesn't have -P.
2013-09-07Ensure udelta is validJoshua Harlow
It appears that udelta could have been left undefined or left defined as a string "N/A" and then put threw a float formatter previously. Fix that by ensure its set to a default and put strong checking to make sure it is a float before using float formatting.
2013-08-24support base64 encoded data in the smart os datasource.Scott Moser
The big benefit of this is that now the user can put in arbitrary data into the user-data or user-script keys and there is no concern about the data being incorrectly read. Previously, if data contained '\n.\n', there was no way to differenciate that from a end of message in the serial communication format. It would be recommended that anyone using user-data on smartos base64 encode that data and specify a key of 'b64-user-data' with value 'true'.
2013-08-24changes to behavior on specifying keys.Scott Moser
The most likely end user operation (or at least a valid one) for base64 encoding would be to encode the user-data, but leave all other values as plaintext. In order to facilitate that, the user can simply add: b64-user-data=true to indicate that user-data is base64 encoded. Other changes here are to change the cloud-config and metadata keynames that are used. base64_all = boolean(True) base64_keys = [list, of, keys] Fixed up tests to accomodate.
2013-08-23Fixed some typos. Change decode_base64 from sys_cfg to ds_cfgBen Howard
2013-08-20fix bad arguments to subp inside of apply_hostname_bounceScott Moser
This simply correctly invokes subp through util.log_time. The arguments to subp is named 'args' not 'command'. LP: #1214541
2013-08-20Updated merge proposal with current treeBen Howard
2013-08-20Fixed no_base64_decode settingsBen Howard
2013-08-15fix setting of password for a user on azure.Scott Moser
If azure ovf data specified a password, then get that password passed through to useradd. Also updates the test case to verify that the value was encrypted correctly. LP: #1212723
2013-08-15pylint fixScott Moser
2013-08-15do not set 'password', but set 'passwd' to crypt'd valueScott Moser
'password' was the wrong key. It should have been setting the default user's "plain_text_password". Instead of doing that, though, we're encrypting the value and putting it in 'passwd', which will then be passed on to useradd. The key value in doing this is that the plain text password will not be stored in obj.pkl. (admittedly it is still in plain text in the ovf-env.xml file).
2013-08-14cc_growpart: prefer growpart over parted 'resizepart'Scott Moser
the resizepart code was not functional. We will re-favor it later under bug 1212492. For now, we'll just favor the 'growpart' resizer. Both will be found in Ubuntu cloud images. LP: #1212444
2013-08-14cc_growpart: prefer growpart over parted 'resizepart'Scott Moser
the resizepart code was not functional. We will re-favor it later under bug 1212492. For now, we'll just favor the 'growpart' resizer. Both will be found in Ubuntu cloud images. LP: #1212444
2013-08-06add options for apt_ftp_proxy, apt_https_proxy and apt_configScott Moser
This adds ability to explicitly set http, https, ftp proxy for apt. Also generically adds ability to give a apt config. apt-config could be done via write_files, but this is more specific to it. LP: #1057195
2013-08-06merge from trunkScott Moser
2013-08-06fix pep8 and pylint warningsScott Moser
2013-08-06remove unused importsScott Moser
2013-08-06remove unused importScott Moser
2013-08-06add tests for apply_apt_configScott Moser
2013-08-06remove unused LOG Scott Moser
2013-08-06initially add support for apt_ftp_proxy and apt_https_proxy. tests to come.Scott Moser
LP: #1057195
2013-08-05reduce finding time zone file to top level distroJoshua Harlow
remove duplicates of some code.
2013-08-05merge from trunkScott Moser
2013-07-30Added base64 support to SmartOS datasource.Ben Howard
Added documentation on SmartOS datasource.
2013-07-30add util.log_time helperScott Moser
The reason for this is that more and more things I was wanting to be able to see how long they took. This puts that time logic into a single place. It also supports from /proc/uptime as the timing mechanism. While reading /proc/uptime is almost certainly slower than time.time(), it does give millisecond granularity and is not affected by 'ntpdate' having run in between the two events.
2013-07-30set reading /proc/uptime to false by default.Scott Moser
reading /proc/uptime is going to be slower, and no reason to do it on most things. Better to only do it when you suspect maybe a need for it.
2013-07-30add util.log_time helperScott Moser
The reason for this is that more and more things I was wanting to be able to see how long they took. This puts that time logic into a single place. It also supports (by default) reading from /proc/uptime as the timing mechanism. While that is almost certainly slower than time.time(), it does give millisecond granularity and is not affected by 'ntpdate' having run in between the two events.
2013-07-29add 'pyserial' to bddeb and bdrpmScott Moser
2013-07-29add dependency on 'serial' used by SmartOS datasourceScott Moser
2013-07-29DataSourceAzure: do not capture output of bounce commandScott Moser
As shown in comments of bug 1202758 and filing of ntp bug 1206164, waiting for the output of this command causes us to wait for ntpdate to fully finish. Ideally I think we'd disable ntpdate running on this run, but that is not trivially possible.
2013-07-27Add the pyserial dependency.Joshua Harlow
LP: #1205720
2013-07-26azure: fix bouncing of interfaceScott Moser
the environment that was set up to include 'interface' was not actually being passed on to 'subp', so when the command ran it wasn't available.
2013-07-25add debian init scriptsScott Moser
These are debian's init scripts as taken from their trunk svn as of today. Thanks Juerg.
2013-07-25add --init-sytem to ./packages/bddebScott Moser
this way you can now do ./package/bddeb --init-system=sysvinit_deb
2013-07-25pull in fixes for debian bug 712985Scott Moser
2013-07-25minor azure cleanupScott Moser
2013-07-25azure: support bouncing interfaces to publish new hostnameScott Moser
See the added doc/sources/azure/README.rst for why this is necessary. Essentially, we now are doing the following in the get_data() method of azure datasource to publish this NewHostname: hostname NewHostName ifdown eth0; ifup eth0 LP: #1202758
2013-07-24Remove duplicate timezone file finding and error raising.Joshua Harlow
2013-07-24update dependencies for jsonpatchScott Moser
2013-07-24tests: fix pep8 issueScott Moser
Move long lines out of the test_util.py file and into tests/data. no pep8 or pylint errors now.
2013-07-24add test case for mime gzipped message segmentsJoshua Harlow
2013-07-24Fix small prefix bug + jsonp tests.Joshua Harlow
Fix the wrong usage of the prefix removal array action by just using the new util function that does these actions correctly. Add in a couple of unit tests to verify the jsonp merging and usage works as expected.
2013-07-24Add support for merging via jsonp patch format.Joshua Harlow
This adds a very well defined and understood mechanism for applying changes to the cloud-config. Had we seen this previously, we might have not done the merge-types work.
2013-07-24rename CC_JSONP_PRE again (JSONP_PREFIX) and use CLOUD_PREFIXScott Moser
2013-07-24change 'json-patch' to 'cloud-config-jsonp'Scott Moser
2013-07-24merge from trunkScott Moser
2013-07-24DataSourceSmartOS: fix issue if dmidecode is not presentScott Moser
2013-07-24add SmartOS datasource supporting Joyent cloudBen Howard
This adds a datasource designed to work on Joyent cloud (SmartOS).