summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2016-03-04Apply pep8, pyflakes fixes for python2 and 3Scott Moser
Update make check target to run pep8 and run pyflakes or pyflakes3 depending on the value of 'PYVER'. This way the python3 build environment does not need python2 and vice versa. Also have make check run the 'yaml' test. tox: have tox run pep8 in the pyflakes
2016-03-03Apply pep8, pyflakes fixes for python2 and 3 Ryan Harper
Update make check target to use pep8, pyflakes, pyflakes3.
2016-03-03Fix pyflake/pyflake3 errorsRyan Harper
Now we can run make check to assess pep8, pyflakes for python2 or 3 And execute unittests via nosetests (2 and 3).
2016-03-03Update pep8 runner and fix pep8 issuesRyan Harper
2016-03-03fix lxd module to not do anything unless config providedScott Moser
2016-03-03run pyflakes in more places, fix falloutScott Moser
this makes 'make' run pyflakes, so failures there will stop a build. also adds it to tox.
2016-03-01Add Image Customization Parser for VMware vSphere Hypervisor Support.Scott Moser
This is the first changeset submitted as a part of project to add cloud-init support for VMware vSphere Hypervisor. This changeset contains _only_ the changes for a simple python parser for a Image Customization Specification file pushed by VMware vSphere hypervisor into the guest VMs. In a later changeset, will be submitting another patch to actually detect the underlying VMware vSphere hypervisor and do the necessary customization.
2016-03-01lxd: general fix after testingScott Moser
A few changes: a.) change to using '--name=value' rather than '--name' 'value' b.) make sure only strings are passed to command (useful for storage_create_loop: which is likely an integer) c.) document simple working example d.) support installing zfs if not present and storage_backedn has it.
2016-02-25merge with trunkScott Moser
2016-02-16 - Used proper 4 space indentations for config_nic.py and nic.pySankar Tanguturi
- Implemented the 'search_file' function using 'os.walk()' - Fixed few variable names. - Removed size() function in config_file.py - Updated the test_config_file.py to use len() instead of .size()
2016-02-16Handle escaped quotes in WALinuxAgentShim.find_endpointScott Moser
LP: #1488891
2016-02-08 - Added new Unittests for VMware support.Sankar Tanguturi
2016-02-04Merge from trunk and resolve text conflict in ChangeLogWesley Wiedenmeier
2016-02-04Use mock in test_handler_lxd.py and add test for lxd installationWesley Wiedenmeier
2016-02-04SmartOS: Add support for Joyent LX-Brand Zones (LP: #1540965)Robert Jennings
LX-brand zones on Joyent's SmartOS use a different metadata source (socket file) than the KVM-based SmartOS virtualization (serial port). This patch adds support for recognizing the different flavors of virtualization on SmartOS and setting up a metadata source file object. After the file object is created, the rest of the code for the datasource LP: #1540965
2016-02-03lxd: add support for setting up lxd using 'lxd init'Wesley Wiedenmeier
If lxd key is present in cfg, then run 'lxd init' with values from the 'init' entry in lxd configuration as flags.
2015-10-30Use DMI data to find Azure instance IDs.Daniel Watkins
This replaces the use of SharedConfig.xml in both the walinuxagent case, and the case where we communicate with the Azure fabric ourselves.
2015-10-14AZURE: support extracting SSH key values from ovf-env.xmlBen Howard
Azure has or will be offering shortly the ability to directly define the SSH key value instead of a fingerprint in the ovf-env.xml file. This patch favors defined SSH keys over the fingerprint method (LP: #1506244).
2015-10-09Refactor tests to test helper method directly, and remove need for test helper.Daniel Watkins
2015-10-09Convert test helper to staticmethod.Daniel Watkins
2015-10-09Handle colons in packed strings in WALinuxAgentShim.find_endpoint.Daniel Watkins
This fixes bug 1488896.
2015-10-09Handle escaped quotes in WALinuxAgentShim.find_endpoint.Daniel Watkins
This fixes bug 1488891.
2015-09-08 power_state: support 'condition' argumentScott Moser
if 'condition' is provided to config in power_state, then consult it before powering off. This allows the user to shut down only if a condition is met, and leave the system in a debuggable state otherwise. An example is as simple as: power_state: mode: poweroff condition: ['sh', '-c', '[ -f /disable-poweroff ]']
2015-09-08NoCloud: fix consumption of vendor-dataScott Moser
the content of vendordata was was being assigned to vendordata, rather than vendordata_raw. The result was that it is not processed for includes or part handlers or other things as it is in other datasources. LP: #1493453
2015-09-02fix test_as_dictScott Moser
2015-08-31events: add timestamp and origin, support file postingScott Moser
This adds 'timestamp' and 'origin' to events. The timestamp is simply that, a floating point timestamp of when the event occurred. The origin indicates the source / reporter of this. It is useful to have a single endpoint with multiple different things reporting to it. For example, MAAS will configure cloud-init and curtin to report to the same endpoint and then it can differenciate who made the post. Admittedly, they could use multiple endpoints, but this this seems sane. Also, add support for posting files at the close of an event. This is utilized in curtin to post a log file when the install is done. files are posted on success or fail of the event.
2015-08-31split 'events' portion of reporting into separate fileScott Moser
this just separates events from other things that could conceivably be reported.
2015-08-07reporting: fix logging reproter and testsScott Moser
2015-08-07hopefully fix DataSourceMAASScott Moser
2015-08-06sync with cloudinit 2.0 for registry and reportingScott Moser
2015-08-04sync tests backScott Moser
2015-08-04fix pep8Scott Moser
2015-08-02fix tests from syncScott Moser
change ReportStack to ReportEventStack change default ReportEventStack to be status.SUCCESS instead of None
2015-07-30tests passScott Moser
2015-07-28pull from 2.0 trunk @ a433358bbcf4e8a771b80cae34468409ed5a811dScott Moser
2015-07-28rsyslog: skip empty or None in remotes formatScott Moser
This allows user to specify the following to overwrite a previously declared entry without warnings. rsyslog: {'remotes': {'foo': None}}
2015-07-28remove 'syslog' module (its been moved to rsyslog)Scott Moser
2015-07-28must declare proto of '@'Scott Moser
2015-07-28add trailing newline only if necessaryScott Moser
2015-07-28fix bug in remotes_to_rsyslog_cfg, add testScott Moser
2015-07-28add support for 'remotes'Scott Moser
2015-07-27merge from trunkScott Moser
2015-07-27add rsyslog testsScott Moser
reasonable test of reworked rsyslog module
2015-07-24commit initial re-work/re-implementation of syslog configScott Moser
2015-07-22mounts: support reliably detecting and using Azure ephemeral disksScott Moser
Azure's ephemeral disks are not guaranteed to be assigned the same name by the kernel every boot. This causes problems on ~2% of Azure instances, and can be fixed by using udev rules to give us a deterministic path to mount; this patch introduces those udev rules and modifies the Azure data source to use them. Changes to a couple of config modules were also required. In some places, they just needed to learn to dereference symlinks. In cc_mounts this wasn't sufficient because the dereferenced device would have been put in /etc/fstab (rather defeating the point of using the udev rules in the first place). A fairly hefty refactor was required to separate "is this a valid block device?" from "what shall I put in fstab?". LP: #1411582
2015-07-22Make full data source available to code that handles mirror selection.Daniel Watkins
2015-07-21fix 'make pyflakes'Scott Moser
2015-07-21tests: fix TestHandlerHandlePart testsScott Moser
these tests were previously passing, but doing so erroneously. I believe that an update to mock caused them to start failing. I've updated the tests now. The simple change is replacing 'assert_called_with_once' with 'assert_called_once_with'. The second set of changes is seemingly a correction of the following tests expectations: test_normal_version_2 : was not expecting to get frequency passed into handle_part, but should have been. test_no_handle_when_modfreq_once: was expecting to have handle_part called even though the test implies otherwise. test_exception_is_caught: this test just looked broken. Now, we're testing that the part handler is called and that no exception is raised past handle_part
2015-07-21Use /dev/disk devices for Azure ephemeral disk.Daniel Watkins
The ephemeral disk will not necessarily be assigned the same name at each boot (LP: #1411582), so we use some udev rules to ensure we always get the right one.
2015-07-21Refactor cc_mounts.sanitize_devname to make it easier to modify.Daniel Watkins