Michael Steed
de7fe49830
py3: fix tests/unit/modules/virt_test.py
...
In libvirt_domain.jinja, use disk.items() instead of the py2-only
iteritems(). The number of disks should be small enough for this not to
matter.
in virt_test.py, don't rely on the py2 behavior of str/int comparison,
and don't rely on dict.keys() being indexable.
2015-06-09 13:06:44 -06:00
Vincent Desjardins
7e517a6a5a
fixes #20198 : virt.get_graphics and virt.get_nics calls in module virt
2015-03-09 22:10:38 -04:00
Pedro Algarvio
0037eda794
Py3 compatibility fixes
2015-01-30 22:25:12 +00:00
Pedro Algarvio
60f215f191
Add from __future__ import absolute_import
2015-01-30 22:25:04 +00:00
Chris Rebert
802a631dd9
more typo/misspelling fixes
2014-11-05 15:29:25 -08:00
Pedro Algarvio
b34377612e
Remove extra white-space.
2013-11-27 12:54:34 +00:00
Pedro Algarvio
0ae1a15c61
PEP8 E302 and E303 blank lines fixes.
2013-11-27 12:11:45 +00:00
Henrik Holmboe
c0aecc7c4b
Use ElementTree from salt.utils._compat
...
Also remove duplicate import of ElementTree.
2013-10-26 18:46:17 +02:00
Henrik Holmboe
aa1bfc8947
Use same unit as input
2013-10-16 21:16:48 +02:00
Henrik Holmboe
f5fa6afe83
Add another unit test for disk controller
2013-10-16 21:10:59 +02:00
Henrik Holmboe
4460ed4d69
Add unit test for disk controller
2013-10-16 21:06:26 +02:00
Henrik Holmboe
fb569991b5
Add unit test for boot device
2013-10-16 20:53:37 +02:00
Henrik Holmboe
479050b5ee
Fix logic regarding telnet console and port
...
Provide a (temporary) default. Previously it was possible to skip
specifying telnet_port and it would result in a incomplete XML.
2013-10-16 17:20:47 +02:00
Henrik Holmboe
9add77a02a
Add unit test for tcp/telnet console
2013-10-16 17:04:11 +02:00
Henrik Holmboe
e29e0408b1
Make unit tests verify the disk entries in virt._gen_xml()
2013-10-16 16:05:09 +02:00
Henrik Holmboe
4345f3a126
assertEqual gives relevant information on fail
2013-10-16 10:18:03 +02:00
Henrik Holmboe
739a644a42
Use assertEqual, less to type
2013-10-16 10:14:50 +02:00
Henrik Holmboe
4e194c2782
Whitespace.
2013-10-16 10:08:28 +02:00
Henrik Holmboe
d4164d2eb7
Add unit test for virt._gen_vol_xml()
2013-10-16 09:58:37 +02:00
Ajith Antony
b95a5d9fd0
Virt Template deploy, and serial xml tests
...
- Added virt templates to setup
- moved NIC xml string template to file
- added tests for serial xml
2013-10-03 13:21:34 -05:00
Ajith Antony
c7ae3ba592
Nic profile changes
...
- Implement 3 styles of profile definition
- Support both config.options and config.get
- Replaces NIC substituions with template
- xml unit tests fixed up
2013-10-03 12:06:19 -05:00
Henrik Holmboe
baf46300fa
Remove unused import
...
We use ElementTree from salt._compat.
2013-10-02 16:17:19 +02:00
Henrik Holmboe
eea799c8c3
Specify reason for Python 2.7 requirement
...
While ElementTree is in Python 2.6, we need the expanded support
for xpath which was introduced in Python 2.7.
As discussed in #7264 , it might be possible to install
`elementtree-1.3a3-20070912` for Python 2.6, but this is yet untested.
2013-09-30 10:40:13 +02:00
Henrik Holmboe
3149499765
Add unit tests
...
In addition to custom ESX profile, test:
- default KVM profile
- default ESX profile
- custom KVM profile
2013-09-27 01:39:07 +02:00
Henrik Holmboe
7ec34af486
Refactor profile loading to use YAML
...
This is done in order to more easily test configuration syntax errors,
as the the minion configuration file uses YAML.
2013-09-27 01:11:28 +02:00
Henrik Holmboe
008a1b7fc9
Compatibility import for ElementTree
2013-09-27 00:58:17 +02:00
Henrik Holmboe
a8d258cefc
Use StringIO from salt._compat
2013-09-27 00:45:27 +02:00
Henrik Holmboe
da3799ba19
Add unit tests for a few functions in modules.virt
...
For:
* modules.virt._disk_profile()
* modules.virt._nic_profile()
* modules.virt._gen_xml()
2013-09-26 17:21:37 +02:00