summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-11-13rename module 'finalcmd' to power-state-changeScott Moser
2012-11-13merge from trunkScott Moser
2012-11-13Use a set of helper/parsing classes to perform system configurationJoshua Harlow
Previously file modification of system configuration was done in a functional and hard to test manner. Now instead this patch allows for a manner that provides a nice object oriented interface to those objects as well as makes it possible to test those parsing entities without having to invoke distro class code. - Created parsers for: - /etc/sysconfig - /etc/hostname - resolv.conf - /etc/hosts Moved duplicated functionality into the root level distro class including: - apply_hostname - set_hostname - *various shared configuration file names/paths*
2012-11-13replace 'with self.assertRaises(Exception):' with different formScott Moser
I'm guessing that with self.assertRaises(Exception): something here is an acceptable form in a newer or older python. But my python (2.7.3-0ubuntu7) doesn't like it. Interestingly, python unittest doc says: | Changed in version 2.7: Added the ability to use assertRaises() as | a context manager.
2012-11-12Remove these lines which are not needed.Joshua Harlow
2012-11-12Update the changelog with functions moved.Joshua Harlow
2012-11-12Pylint and pep8 cleanups.Joshua Harlow
2012-11-12Fix variable.Joshua Harlow
2012-11-12Rebased with HEAD and resolved conflicts.Joshua Harlow
2012-11-12pass execmd a list, not tuple or stringScott Moser
2012-11-12Remove dup and un-needed entries.Joshua Harlow
2012-11-12add 'finalcmd' module for running code after cloud-init-finalScott Moser
This allows the user to easily run stuff even after cloud-init-final has finished. The initial reason for it is to be able to run /sbin/poweroff and not have cloud-init complain loudly that it is being killed. LP: #1064665
2012-11-12pylint and pep8 fixesScott Moser
2012-11-12Append changelog additions.Joshua Harlow
LP: #1078097
2012-11-12Cleanup of /etc/hosts ordering and pep8/pylint adjustments.Joshua Harlow
Fix how the comparison of a fqdn and its aliases was done via sorting instead of existence checking which is the better way to check if a alias already exists as well as cleanup the new files pep8/pylint issues. LP: #1078097
2012-11-12Update changelog for previous commits.Joshua Harlow
Add in entry for LP: 1068801 and LP: 1075756 as well as LP: 1077245 and add in reason why we are switching back to using 'None' as the initial datasource value.
2012-11-12Update changelog for previous commits.Joshua Harlow
Add in entry for LP: 1068801 and LP: 1075756 as well as LP: 1077245 and add in reason why we are switching back to using 'None' as the initial datasource value.
2012-11-12change the "null datasource" for stages.py to NoneScott Moser
Previous commit set up an object for checking "None" in the stages class. Here, change that to be None. The benefit of the DataSourceNone was so that the stages was generally functional even with that "None" object. The negative affect of that is that you could go down the error path much longer when using it. If we use None type, then self.datasource.<something> will fail immediately and loudly.
2012-11-12test_handler_yum_add_repo: fix broken testScott Moser
2012-11-12stages.py: fix issue that resulted in broken data source searchingScott Moser
This just replaces the portions of stages.py that were checking or setting self.datasource to a DataSourceNone to use a static/global datasource. And then, check for None is done against that.
2012-11-12mark changelog entry for lp:1075980Scott Moser
2012-11-12config-drive-v2: support public keysScott Moser
This does a couple things: * separates out the 'normalize_public_keys' from the DataSource's get_public_ssh_keys * uses that from config-drive datasource * supports config drive v1 or v2 public-keys * adds a test. LP: #1077700
2012-11-12pep8 and pylint fixupsScott Moser
2012-11-12REVERT revno 714: config-drive-v2: populate metadata['public-keys'] from ↵Scott Moser
'public_keys'
2012-11-12wrap boto.utils.get_instance_metadata to ensure non-lazy loadingScott Moser
newer versions of boto lazily load the metadata from the ec2 metadata service. Here, we: 1. Add a ec2_utils module that checks which version of boto is being used and under the right versions the metadata dictionary will be expanded. 2. Use this new ec2_utils module in the cloudstack and ec2 datasources as there entrypoints into boto. 3. Add a dependency on python-pkg-resources (from pkg_resources import parse_version) to determine the boto version. LP: #1068801
2012-11-12add ChangeLog entryScott Moser
2012-11-12add comment to get_instance_userdata reguarding empty/un-provided userdataScott Moser
2012-11-12merge from trunkScott Moser
2012-11-11config-drive-v2: populate metadata['public-keys'] from 'public_keys'Scott Moser
other datasources populate 'public-keys' rather than 'public_keys' and there is a more complete handler in the base DataSource. So, to take advantage of that, have DataSourceConfigDrive copy public_keys to public-keys, and remove the 'get_public_ssh_keys' from the DataSourcEConfigDrive. LP: #1077700
2012-11-10whitespace / indentation cleanupsScott Moser
These changes were pulled out of the previous merge (cc_yum_add_repo) as they were unrelated there. Re-applying them here.
2012-11-10add yum_add_repo configuration moduleScott Moser
Add in a configuration module that can write out the yum.repo format for those that want to hook into different repos for installing.
2012-11-101 pep8 and 1 pylint fixScott Moser
2012-11-10revert unrelated whitespace changes that creeped in.Scott Moser
2012-11-10sync with trunkScott Moser
2012-11-10Add 'migrator' for handling config name changes and consistencyJoshua Harlow
This migrator module does a few things * fixes filename markers that were written with a '-' in them to have an '_' instead * support renaming modules. Explicitly this handles the name change of 'apt-update-upgrade' to 'apt-configure' and 'package-update-upgrade-install' Also, just be more consistent everywhere where writing semaphore/marker files and use '_' instead of '-' (canon_sem_name).
2012-11-10update ChangeLogScott Moser
LP: #1076811
2012-11-10Sudoers.d creation cleanups + tests.Joshua Harlow
2012-11-09Fix the merging of group configuration.Joshua Harlow
2012-11-09Fix the merging of group configurationJoshua Harlow
when that group configuration is a dict => members. LP: #1077245
2012-11-09Merge the yaml/cloud config examples checking tool.Joshua Harlow
2012-11-09Fix pep8 warnings.Joshua Harlow
2012-11-09Fix the fqdn/hostname case for rhel and ubuntuJoshua Harlow
where rhel uses the fqdn for its config while ubuntu uses the short hostname.
2012-11-09Fix the none return problem.Joshua Harlow
2012-11-08Forgot the test!Joshua Harlow
2012-11-08Fix the case where on a redhat based systemJoshua Harlow
the fully qualified domain name should end up in /etc/sysconfig/network by passing the fqdn to the update and set hostname methods and using it accordingly. LP: #1076759
2012-11-08Merge fix for distro config not being Joshua Harlow
reflected when running in the init stage after user-data has been loaded.
2012-11-08Ensure that at needed stages the local variablesJoshua Harlow
of the init class are reset so that when they are regenerated that they will use the updated data instead of using previous data (since they weren't reset). LP: #1076811
2012-11-08Add non-zero exit code whenJoshua Harlow
bad yamls are found instead of returning zero in that case.
2012-11-08improve zsh support in tools/Z99-cloud-locale-test.shScott Moser
This change does 3 things: * revert the fix from revno 697 * minor clean up some local variable usage and definition * make Z99-cloud-locale-test.sh actually work when shell is zsh the last is done by detecting if this is zsh, and if so, changing the zsh behavior for this function to emulate sh. As a result of the '-L' in 'emulate -L sh', we have no negative affect on the user's shell. LP: #1073077
2012-11-08work with zsh by using 'emulate -L sh'.Scott Moser
This makes zsh act like 'sh', but only for the function local function. This way, we do not affect the user's shell, but get the behavior we want.