Init a shared log instance in virtinst/logger.py, and use that
throughout the code base, so we aren't calling directly into
'logging'. This helps protect our logging output from being
cluttered with other library output, as happens with some
'requests' usage
It's a mix of stuff libvirt already catches, UI sanity checking
like if user specified an empty field, and prompting for really
obscure corner cases. This stuff isn't important enough to carry
around all this code IMO
Name and forward mode config are always visible. ipv4, ipv6, and
domain name are under their own expanders which are collapsed by
default.
This will fit better with the XML editor pattern and reduce the
urge to squeeze more UI elements into the now smaller wizard
Rather than a mix of radio buttons and other combo boxes.
This follows the pattern we more commonly use in other UI, and
makes it easier to hide UI elements that aren't relevant for
specific choices, like the possibly large SR-IOV selector
This wizard is sufficiently obscure that I don't think it's
really valuable to try to explain networking concepts with
UI labels. If users don't know what they are trying to create
by using this wizard, there's no way we are going to adequately
explain to them what they are looking at. The example values
should be self explanatory enough anyways
This only applies for inter VM traffic when ipv6 networking is
disabled, which IMO is pretty obscure. If users want ipv6
connectivity, just enabling ipv6 will handle it appropriately
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>
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()
The `ipaddress` is available in Python 3.3+ [1] and backport for
Python 2 is available on PyPI [2].
The main differences between ipaddr and ipaddress are:
- ipaddress *Network classes are equivalent to the ipaddr *Network
class counterparts with the strict flag set to True.
- ipaddress *Interface classes are equivalent to the ipaddr *Network
class counterparts with the strict flag set to False.
- The factory functions in ipaddress were renamed to disambiguate them
from classes.
- A few attributes were renamed to disambiguate their purpose as well.
(eg. network -> network_address, numhosts -> num_addresses)
- A number of methods and functions which returned containers in ipaddr
now return iterators. This includes subnets, address_exclude,
summarize_address_range and collapse_address_list.
Another major difference is that in Python 2 the `ipaddress` module
must use unicode. [3]
[1] https://www.python.org/dev/peps/pep-3144/
[2] https://pypi.python.org/pypi/ipaddress
[3] https://github.com/phihag/ipaddress
libvirt added network forward mode 'open' by commit 25e8112d, No any
iptables rules are added to this virtual network.
This patch adds support to create such a virtual network.
Signed-off-by: Lin Ma <lma@suse.com>
All the strings have to be at first translated and then we can fill the
formated and translated string.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
commit f109b1ed6f
used a undefined variable 'PAGE_MAX'.
It looks like it should be in a developing series,
but should be fixed in upstream.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
On the last page in the createnet wizard the Next button is changed to
Finish. Ensure the user input is validated also on this page.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
It fixes this exception:
Traceback (most recent call last):
File "virt-manager/virtManager/host.py", line 467, in add_network
self.addnet.show(self.topwin)
File "virt-manager/virtManager/createnet.py", line 102, in show
self.reset_state()
File "virt-manager/virtManager/createnet.py", line 180, in reset_state
devnames.append(iface.name)
AttributeError: 'vmmInterface' object has no attribute 'name'
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
And clean up the API mess while we are at it. Treat the key as an opaque
value that users shouldn't depend on.
Besides the improved code clarity and API layout, this will help diagnose
'key error' issues, since we'll see an object name instead of UUID which
is hard to trace back.