Commit Graph

1013 Commits

Author SHA1 Message Date
Cole Robinson 8e150901f4 clitest: Streamline the string format dict
Remove a bunch of dead entries, open code a bunch of limited usage,
and only use the dict for commonly referenced data
2018-06-12 14:07:50 -04:00
Cole Robinson d68305eaab tests: utils: Move all URI strings to URIs object
Non-functional change, just makes code org nicer
2018-06-12 14:07:50 -04:00
Cole Robinson e0e6ac6956 tests: Remove useless read_file helper 2018-06-12 14:07:50 -04:00
Cole Robinson e12049b114 capabilities: Drop old svm/vmx handling
We don't realisistically support these old libvirt versions anymore
2018-06-12 14:07:50 -04:00
Cole Robinson b6cd46b382 virt-install: Add --test-stub-command
Fills in basic install options to make the command succeed. Saves
devs having to type boiler plate options when testing new command
line bits
2018-06-12 14:07:50 -04:00
Cole Robinson 4dfc6b03e8 hostkeymap: Fix sanitize_keymap on python3
And add test cases to cover the failure

https://bugzilla.redhat.com/show_bug.cgi?id=1585574
2018-06-12 14:07:50 -04:00
Marc-André Lureau fa32aea416 tpm: add TPM emulator backend
An emulated backend doesn't require any path, since libvirt will take
care of finding the emulator and managing the storage. However, the
version to emulate can be specified.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-06-11 12:40:28 -04:00
Marc-André Lureau 67cb191e82 tpm: add CRB device model
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-06-11 12:40:28 -04:00
Anya Harter 846e2f711a cli: add --sound codec support
Add codec support to virt-install so that it can accommodate
multiple instances of codec configuration.

The commandline argument:

  --sound codec0.type=micro,codec1.type=duplex,codec2.type=output

maps to the sound XML below:

    <sound model="es1370">
      <codec type="micro"/>
      <codec type="duplex"/>
      <codec type="output"/>
    </sound>

Signed-off-by: Anya Harter <aharter@redhat.com>
2018-06-11 12:23:14 -04:00
Anya Harter 02635d3358 cli: Add --disk geometry attribute options
Attribute options are:
    - geometry.cyls=W
    - geometry.heads=X
    - geometry.secs=Y
    - geometry.trans=Z

This maps to disk XML like:

    <disk>
      <geometry cyls='W' heads='X' secs='Y' trans='Z'/>
    </disk>

Signed-off-by: Anya Harter <aharter@redhat.com>
2018-06-11 12:02:11 -04:00
Anya Harter 89c389e45a cli: Add --disk driver.copy_on_read=on option
This maps to disk XML like:

    <disk>
      <driver copy_on_read='on'/>
    </disk>

Signed-off-by: Anya Harter <aharter@redhat.com>
2018-06-11 12:00:56 -04:00
Cole Robinson b85a2a9eb8 virt-install: Drop --import and --nodisks collision
It doesn't work with '--disk none' and it's not very useful anyways
2018-06-07 10:56:47 -04:00
Anya Harter 8bde479112 cli: Add --network mtu.size=X option
This maps to interface XML like:

    <interface>
      <mtu size='X'/>
    </interface>

Signed-off-by: Anya Harter <aharter@redhat.com>
2018-06-06 10:44:03 -04:00
Stefan Weil 633534c8b8 Fix some typos in comments and documentation (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-05 14:27:29 -04:00
Radostin Stoyanov bb06053a8a setup: Integrate codespell
Codespell is a tool for checking misspelled words in source code [1].
Integrating this tool will enable automated spell check of the code
base.

Usage example:
        ./setup.py codespell

[1] https://github.com/codespell-project/codespell

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-06-05 14:27:29 -04:00
Cole Robinson 39a7cbbad7 domain.numatune: Drop cpuset validation
This type of validation should really be done at the libvirt level,
particularly for a non-mandatory feature like cpuset. Otherwise
it's just more code for us to test which will rarely be hit by users
2018-06-05 14:27:29 -04:00
Cole Robinson 192da16f6b domain.numatune: Remove cpuset_str_to_tuple
Left over from when we had vcpu pinning in the UI, not used anymore
2018-06-05 14:27:29 -04:00
Cole Robinson 84150ddd2e tests: pylint: Tweak config a bit
* Drop some redundant config that's duplicating defaults
* Use more standard pylint regexes
2018-05-02 19:53:03 -04:00
Cole Robinson 28b3aca9fa tests: uitests: Fix with connect.py changes 2018-05-02 17:45:09 -04:00
Cole Robinson d99e31cbc4 tests: uitests: newvm: Fix the rest with the oslist rework 2018-05-01 18:45:25 -04:00
Cole Robinson ec407e8a06 tests: uitests: newvm: Fix import tests after oslist rework 2018-05-01 18:45:25 -04:00
Cole Robinson e1f16e62b8 addhardware: Remove non-device RNG UI
This config is not common enough to warrant the large UI surface
2018-05-01 12:27:27 -04:00
Daniel P. Berrangé d52d9885c8 Redesign OS distro selection UI to be faster to use
The current OS distro selection UI is fairly cumbersome to use. First
you need to decide on a variant, then decide a distro and then look for
the version you want. The list is filtered by default so only a subset
of OS are displayed. So for less common distros you'll then need to
start again and tell it to show all OS to try to find the one you want.

The core problem is that we have an incredibly large list and want to
make it easy for the user to find a specific entry. The modern UI
paradigm for this problem is to provide interactive search with
live updated results. The current UI does provide an interactive search
facility on the OS version results, but you still have to first select a
variant to be able to use the search which is unhelpful.

This patch attempts to better apply the search UI design to the OS selection
problem. We get rid of the notion of variants, distros and version, and
provide a single text entry box in which the user can type a few letters
of the OS name. As they type, a popover displays the matching results
filtered on OS name. By default end of life OS will be hidden, so in
general there will only be a small handful of results left after just
typing a few characters. This makes it very quick to find and select the
desired OS, without needing to provide a mutli-step navigation hierarchy.

https://bugzilla.redhat.com/show_bug.cgi?id=1464306

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

(crobinso: fix some pylint)
2018-05-01 11:31:39 -04:00
Cole Robinson 3bc7ff24cf uitests: Use old Fedora URL in test suite
the centos URL is currently broken with latest urldetect, we need to
add some info to libosinfo to cover it
2018-04-26 09:50:57 -04:00
Cole Robinson 056305d29b addhardware: Make combo init/populating more consistent
* Use the _build_combo helper more
* Un-static methods that don't need it
* Use pretty labels more
2018-04-25 08:04:50 -04:00
Cole Robinson fd2fe1249d graphics: Default to unset keymap
qemu and all related hypervisors (xen, vz) haven't needed this in
the common case for a very long time, so make keymap=None the default
2018-04-24 14:11:30 -04:00
Cole Robinson a33ac92040 cli: Fix --boot smbios_mode=sysinfo (bz 1570549)
Not sure how this was expected to work, just make it do the simple
thing and set the value in the XML. Add a test case for it
2018-04-24 12:32:18 -04:00
Radostin Stoyanov 087bf7debc tests: uriparse: Test for @ symbol in username
Add test case for URI that contains the @ symbol in username.

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-04-24 12:13:07 -04:00
Cole Robinson 568841835d urldetect: Standardize _detect_version naming
This is the hook that subclasses use to save a detect os_variant value
2018-04-24 11:34:53 -04:00
Cole Robinson a9ad2426b0 test_urls: Improve error output 2018-04-24 11:33:12 -04:00
Cole Robinson 105a6d20be tests: urls: Fix custom ini file usage 2018-04-16 11:36:39 -04:00
Daniel P. Berrangé 48e32b429d Fix copyright header to specify GPLv2 or later, not GPLv2 only.
The copyright headers in every file were chjanged in this previous commit

  commit b6dcee8eb7
  Author: Cole Robinson <crobinso@redhat.com>
  Date:   Tue Mar 20 15:00:02 2018 -0400

    Use consistent and minimal license header for every file

Where before this they said "

  "either version 2 of the License, or (at your option) any later version."

Now they just say

  "GNU GPLv2"

This fixes it to say "GNU GPLv2 or later" again.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-04 16:51:37 -04:00
Cole Robinson 83a1c43490 tests: test_urls: Look for manual.ini in ~/.config/virt-manager
Rather than deal with ignoring it in the source tree
2018-04-03 15:29:03 -04:00
Cole Robinson b17c7565e2 tests: clitest: test virt-xml --update on inactive VM 2018-04-03 12:43:14 -04:00
Cole Robinson 07489a900e tests: Remove __main__ handling, not needed 2018-04-03 10:59:00 -04:00
Charles Arnold fd6a815440 virtinst: compare host and domain cpu models
Lookup the domain capabilities CPU model and compare with
the host capabilities CPU model and if they are not equal
set the guest's CPU model to None.

(crobinso: compare against 'custom' list not 'host-model', move
 to separate function)
2018-04-03 10:57:49 -04:00
Charles Arnold d15b78ab0d virtinst: read CPU model from domain capabilities
Add functionality to acquire the CPU model from the
libvirt domain capabilities. This is used to compare
with the host CPU model.

(crobinso: add test coverage, rework domcaps layout a bit)
2018-04-03 10:57:15 -04:00
Cole Robinson eafdaf8b48 tests: test_urls: Add urldetect kernel arg validation 2018-04-02 17:15:05 -04:00
Cole Robinson 1269b549c4 tests: test_urls: Enable f28 development test 2018-03-29 19:45:33 -04:00
Cole Robinson a712549b2b tests: test_urls: Use https for debian-daily
It converts to http to https but that takes time, so fix it
2018-03-29 19:45:33 -04:00
Cole Robinson ad13c57dc5 urlfetch: Formalize the failed hostname check
This heuristic is only valid for http connections, everything
else will fail way earlier in the process
2018-03-29 19:45:33 -04:00
Cole Robinson 5055d7bd19 urlfetcher: Clean up RHEL version parsing/handling
Drop SLDistro entirely because it adds nothing, just make it an
alias of Centos. Drop some old RHEL version logic. Tweak test cases
2018-03-29 19:45:33 -04:00
Cole Robinson b9e72b8609 urldetect: Move treeinfo media checking into Treeinfo class
Rather than in the base Distro class. Simplifies things a bit
2018-03-29 16:23:57 -04:00
Cole Robinson 5aedc0aff7 urldetect: Drop GenericDistro, non-treeinfo redhat bits
non-treeinfo redhat only applies to pre RHEL5.4 and very old
Fedora. It's not worth it anymore to slow down all URL lookups
and maintain code complexity to handle such long out of date
distros.

GenericDistro doesn't actually apply to any public trees that I
can find, except for some with TreeInfo. So turn it into
GenericTreeinfoDistro. If random URL trees want to work with
virt-install, add a treeinfo file
2018-03-29 16:23:57 -04:00
Cole Robinson a8522032eb virtinst: Split out urldetect.py from urlfetcher.py
urldetect.py has all the distro metadata and parsing logic,
urlfetcher.py has the http/ftp/iso/etc. fetching logic
2018-03-28 18:46:07 -04:00
Cole Robinson 6e2e18ccf8 urlfetcher: Split up SUSE content parsing a bit
Add comments for what each parsed line actually looks like
2018-03-28 17:58:11 -04:00
Cole Robinson 35df66c1ed tests: test_urls: Make fedora distro checking a bit smarter
Rather than constantly require updating distro values for latest
Fedora when osinfo-db catches up, build some smarts into the
test suite
2018-03-28 14:56:52 -04:00
Cole Robinson 74f2fb73fd tests: test_urls: Rename distroobj->testdata
Makes it much more clear what it is
2018-03-28 14:40:41 -04:00
Cole Robinson 46ec093a28 virt-xml: Make it more clear when changes take effect
shutdown could be interpreted as a soft reboot, which won't
apply the changes
2018-03-25 19:22:28 -04:00
Cole Robinson b238718347 tests: uitests: Omit /usr for coverage
like we do for regular test suite coverage
2018-03-21 16:25:07 -04:00
Cole Robinson eee1caa946 domain: Drop most device list wrappers
There's lots of hacks stuffed into the domain device lists. Formalize
some of it, move some of the specific stuff to details.py, and drop
a lot of the needless API wrappers
2018-03-21 16:10:45 -04:00
Cole Robinson 538ea96116 guest: devices: change XML ordering to match libvirt 2018-03-21 11:17:36 -04:00
Cole Robinson 3b88bfb1ee cli: Drop clear_attr property
It slightly complicates the generic machinery, and the one usage we
can handle directly
2018-03-21 11:17:36 -04:00
Cole Robinson 7b61c45d3b guest: Move all_devices to guest.devices.X
The way we enumerate devices doesn't conform with the way all
other XMLBuilder instances expose child objects. Move more towards
that direction.

This requires some virt-xml and cli.py hacks but we will remove those
in future patches
2018-03-21 11:17:36 -04:00
Cole Robinson fe9ed2340c virtinst: move <domain> XML files to virtinst/domain
And give the classes consistent naming
2018-03-21 11:17:36 -04:00
Cole Robinson b6dcee8eb7 Use consistent and minimal license header for every file 2018-03-21 07:29:40 -04:00
Cole Robinson 3909c10441 virtinst: Move all devices to virtinst/devices/ 2018-03-21 07:29:40 -04:00
Cole Robinson 1c911ce567 virtinst: Give device classes consistent DeviceX naming
Previous state was inconsistenty and needlessly wordy. Fix up
a few other class namings that have redundant Virtual in the name
2018-03-21 07:29:40 -04:00
Cole Robinson 1994b4cf2d devicedisk: fix _is_dir_searchable
And add a test case that would have caught this
2018-03-18 11:51:09 -04:00
Cole Robinson 4d4a07c65b tests: uitests: Add window cleanup tests
And fix some bugs I found as a result
2018-03-17 19:42:19 -04:00
Cole Robinson 591dda6d1e uitests: connect: Test double click to open 2018-03-17 18:46:40 -04:00
Cole Robinson edc79a3272 uitests: Add VM 'doubleclick' open testing 2018-03-17 18:46:40 -04:00
Cole Robinson b423d8ffe7 uitests: cli: test --connect with a bad URI 2018-03-17 18:46:40 -04:00
Cole Robinson f5562e77ae tests: uitests: Make an addhw test less flakey 2018-03-15 21:24:48 -04:00
Cole Robinson dabbc8d5bd engine: Remove centralized conn.open handling
Move connection opening logic to each caller, since needs are
slightly different.
2018-03-15 21:24:48 -04:00
Cole Robinson 1d17b98852 engine: Move most remaining window tracking to UI classes
Kind of a big mess but it was difficult to untangle piecemeal.
Basically this drops nearly all the centralized window tracking
in engine.py and moves it to each UI class. If manager.py wants
to open a details window it does it directly, and vmmDetails tracks
the window object list itself. This simplifies things and makes
the code easier to follow.

There's still some weirdness with vmmConnect and connection callbacks,
but future patches will break those apart.
2018-03-15 21:24:48 -04:00
Cole Robinson b25c38816a pylint: Enable 'fixme' checking
Using these for long term TODO type items is not effective, however
it's nice to label things as FIXME during a coding session and have
pylint warn you about them before pushing.
2018-03-15 21:24:48 -04:00
Radostin Stoyanov 1ae5c4ff75 pylint: Resolve logging-not-lazy
A new Python checker was added to warn about using a + operator inside
call of logging methods when one of the operands is a literal string.

https://pylint.readthedocs.io/en/latest/whatsnew/1.8.html

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-03-03 16:04:12 -05:00
Radostin Stoyanov 474f60fc56 pylint: Silence inconsistent-return-statements
A new Python checker was added to warn about "inconsistent return
statements" [1]. A function or a method has inconsistent return
statements if it returns both explicit and implicit values.

[1] https://pylint.readthedocs.io/en/latest/whatsnew/1.8.html

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-03-03 16:04:08 -05:00
Cole Robinson 435fdf2a6a tests: Add xmlns remove_child test case
And tighten up the xmlbuilder xmlns hackery
2018-02-26 14:56:24 -05:00
Cole Robinson a58f458fb3 tests: storage: destroy/undefine created objects
Otherwise we pollute the test driver which causes collisions on
libvirt.git
2018-02-23 11:57:57 -05:00
Cole Robinson 3079426c82 virtinst: Drop doc= for properties
This data never gets to the user and largely is just duplicating
libvirt docs. It's redundant
2018-02-22 20:49:07 -05:00
Cole Robinson 472a52b170 virtconv: Drop all the chdir hackery
This was just lazy stuff to avoid having to assumble abspaths. Plus
it confuses cprofile
2018-02-22 20:49:07 -05:00
Cole Robinson 8371a681b1 tests: Remove some redundant clitests
- Consolidate tests if they don't add coverage
- Remove some categories that aren't really required
2018-02-22 18:26:50 -05:00
Marc-André Lureau 55fa6c4caa tests: add xmlparse/change vmcoreinfo test
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-02-22 16:23:40 -05:00
Marc-André Lureau 0a62ae0b7a virtinst: add <vmcoreinfo/> feature
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-02-22 16:23:40 -05:00
Cole Robinson 6954c6774a tests: Fix running testsuite on older libvirt
If we try to run the testsuite on anything older than libvirt 3.1,
it immediately throws an exception before processing any tests,
due to choking on parsing drm bits from testdriver.xml. This global
failure is only due to sloppy coding though.

Turn all test cases that use testdriver.xml into skips in this case,
so we can at least get some test coverage otherwise.
2018-02-22 16:01:24 -05:00
Cole Robinson 62fecb09d3 tests: Create a smaller testsuite.xml
Right now, most test cases will create a libvirt test driver using
tests/testdriver.xml. This is problematic for 2 reasons:

1) testdriver.xml is 3500 lines of XML, and it's parsed hundreds of
   times. Opening it is responsible for about 25% of test suite time
2) Older libvirt chokes on testdriver.xml, meaning the test suite will
   be useless there. This is a recurring problem as new features are
   added to testdriver.xml

Most test cases don't actually need all the test state in testdriver.xml
though. So this creates a smaller testsuite.xml which has a lower
libvirt requirement and is much quicker to parse. New XML bits should
continue to go into testdriver.xml so we can keep testsuite.xml as
the more stripped down option.
2018-02-22 15:44:06 -05:00
Cole Robinson c05cd52772 setup: Use CLIState for setting --debug value 2018-02-22 15:18:47 -05:00
Cole Robinson 8ee2f62efe tests: Simplify clonetest.py 2018-02-22 15:18:41 -05:00
Cole Robinson cb1c020c13 tests: Simplify virtconvtest.py 2018-02-22 15:18:06 -05:00
Cole Robinson 0adae891a6 tests: Use testdefault more 2018-02-22 15:08:09 -05:00
Cole Robinson 4205272384 tests: Add explicit test_dist target
Things like po validation don't need to be done on every test run
2018-02-20 12:33:57 -05:00
Cole Robinson 98d880a179 tests: Differentiate conn cache based on actual open URI
Since what is actually passed to libvirt here is what actually matters,
not all our fakeuri trickery
2018-02-20 12:21:45 -05:00
Cole Robinson 059fb7d0ba xmlbuilder: Order child props before serializing
We were implicitly depending on dict hash ordering here, which
was causing some different XML output in centos CI
2018-02-20 11:41:04 -05:00
Cole Robinson dfa0fa34b4 tests: xmlparse: Add a roundtrip metadata test
To ensure the xml engine doesn't mangle unknown XML
2018-02-20 11:23:37 -05:00
Cole Robinson bc94666778 tests: xmlparse: Add qemu xmlns tests
Since reproducing via manual clitest is hard since it requires
XML on stdin
2018-02-20 11:23:37 -05:00
Cole Robinson f04b284f21 xmlbuilder: Abstract libxml2 API and cleanup
Moves the libxml2 bits to a separate xmlapi file and class, a bunch
of cleanups to xmlbuilder internals dealing with XML stuff.

The main point is to experiment with different XML library impls,
since libxml2 is unfun to deal with and we are having python3
issues like

https://bugzilla.gnome.org/show_bug.cgi?id=776815
2018-02-20 11:23:37 -05:00
Cole Robinson 8917305a6e Don't use count() for substring checking
Use the idiomatic 'X in Y'
2018-02-14 11:08:09 -05:00
Cole Robinson fe728f899d tests: virtconvtest: Accumulate more errors before exiting 2018-02-14 09:57:39 -05:00
Chen Hanxiao a9596c7492 pylint: fix logging-too-few-args issue
From: Chen Hanxiao <chenhanxiao@gmail.com>

pylint complain:
  Not enough arguments for logging format string (logging-too-few-args)

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2018-02-13 16:42:29 +08:00
Cole Robinson 1550e70a4e uitests: Silence noisy harmless warnings
Could mean a code error but more likely is just slightly racy
UI bits disappearing that we weren't looking for anyways, so hide
it behind a debug statement
2018-02-08 14:23:11 -05:00
Cole Robinson 8e7b5ed2d8 Drop __future__ imports, no longer needed 2018-02-08 14:08:23 -05:00
Cole Robinson dae8642bb1 xmlbuilder: centralize adding child new child prop instances
Currently the domain CPU class has a child property like:

  siblings = XMLChildProperty(_CPUCellSibling)

If a user wants to add a new sibling, we add a convenience function:

    def add_sibling(self):
        obj = _CPUCellSibling(self.conn)
        self.add_child(obj)
        return obj

Rather than require every child property to define a similar matching
helper function, this adds infrastructure in xmlbuilder to do this
generically for every child property. Now callers can do

    obj = guest.cpu.siblings.add_new()
2018-02-08 14:03:47 -05:00
Cole Robinson ddba9c1702 Switch to python3 in script shebang
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2018-02-06 18:56:15 -05:00
Cole Robinson 3086c7fda9 Drop python3 compat imports
We are going completely python3
2018-02-06 18:56:15 -05:00
Radostin Stoyanov 81d68e6100 Use StringIO instad of BytesIO in Py 3
The print function in Python will convert printed arguments to text
strings [1] and thus print() cannot be used with binary mode file
objects.

In Python 2 the write() method of BytesIO() takes as input *bytes* object
which refers to *str* in Python 3. [2] The write() method of StringIO()
takes *unicode* object. [3] Therefore, StringIO() object cannot be used with
the print() function.

In Python 3 the write() method of BytesIO() takes a *bytes* object (not
*str*). [4] Therefore, the BytesIO() obj cannot be used with print().
However, the write() method of StringIO() in Python 3 takes a *str* as
input.[5]

Example of the issue:

    from __future__ import print_function
    import io

    a = io.BytesIO()
    b = io.StringIO()

    print("test", file=a)  <- Fails for Python 3
    print("test", file=b)  <- Fails for Python 2

    a.write('%s\n' % "test")  <- Fails for Python 3
    b.write('%s\n' % "test")  <- Fails for Python 2

[1] https://docs.python.org/3.5/library/functions.html#print
[2] https://docs.python.org/2/library/io.html#io.BufferedWriter.write
[3] https://docs.python.org/2/library/io.html#io.TextIOBase.write
[4] https://docs.python.org/3/library/io.html#io.BufferedWriter.write
[5] https://docs.python.org/3/library/io.html#io.TextIOBase.write
2018-02-06 18:49:17 -05:00
Radostin Stoyanov 978fb25ac7 Wrap keys(), values() in a list
In Python 3 dict.values() [1] , dict.keys() [2] and dict.items() [3]
return a view [4] of the dictionary’s values, keys and items.

In Python 2 these functions return a list. [5] [6] [7]

To resolve this we can convert the result of these function to a list.

[1] https://docs.python.org/3/library/stdtypes.html#dict.values
[2] https://docs.python.org/3/library/stdtypes.html#dict.keys
[3] https://docs.python.org/3/library/stdtypes.html#dict.items
[4] https://docs.python.org/3/library/stdtypes.html#dict-views
[5] https://docs.python.org/2/library/stdtypes.html#dict.items
[6] https://docs.python.org/2/library/stdtypes.html#dict.keys
[7] https://docs.python.org/2/library/stdtypes.html#dict.values
2018-02-06 18:49:17 -05:00
Radostin Stoyanov 810ee09292 Replace ConfigParser with configparser
The ConfigParser module has been renamed to configparser in
Python 3. [1] Backport of this changes is also available for
Python 2. [2]

[1] https://docs.python.org/2/library/configparser.html
[2] https://pypi.python.org/pypi/configparser/3.2.0r3
2018-02-06 18:49:17 -05:00
Wim ten Have 708516c39e virtinst: add vcpupin support
Add vcpupin support to virt-install so that it can create guest
domains with statically allocated vcpu pinning towards a given cpuset.

Syntax: to pin vcpu=0 to cpuset="1,3" and vcpu=1 to cpuset=2

  --cputune vcpupin0.vcpu=0,vcpupin0.cpuset=1,3,vcpupin1.vcpu=1,vcpupin1.cpuset=2

generates below XML description for the guest domain.

  <cputune>
    <vcpupin vcpu="0" cpuset="1,3"/>
    <vcpupin vcpu="1" cpuset="2"/>
  </cputune>

Signed-off-by: Wim ten Have <wim.ten.have@oracle.com>
Signed-off-by: Menno Lageman <menno.lageman@oracle.com>
2018-02-06 10:21:56 -05:00