Commit Graph

33 Commits

Author SHA1 Message Date
Charles Arnold
65f7017eaf createnet: Fix creating network with forward device 2015-01-16 13:30:36 -05:00
Cole Robinson
226c4562d5 virtManager: Switch to relative imports 2014-09-12 16:28:38 -04:00
Chen Hanxiao
658c9500a9 createnet: fix a small pylint
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>
2014-06-27 09:06:14 +02:00
Giuseppe Scrivano
f109b1ed6f createnet: validate last page before creating the network
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>
2014-06-26 15:26:37 +02:00
Giuseppe Scrivano
81bd6bbffb createnet: fix "show_err" typo
s|show_erro|show_err|

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-06-26 15:26:37 +02:00
Giuseppe Scrivano
48be09a997 createnet: use vmmInterface.get_name() instead of vmmInterface.name
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>
2014-06-24 17:14:19 +02:00
Cole Robinson
c78974c0d9 connection: Drop netdev abstraction
Just open code it in the one place it's needed. Try to simplify some of
the netlist logic while we are at it. Should fix:

https://bugzilla.redhat.com/show_bug.cgi?id=1109574
2014-06-18 12:41:36 -04:00
Chen Hanxiao
17a11672b1 createnet: enable specify /29 subnet
https://bugzilla.redhat.com/show_bug.cgi?id=1106913

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-06-11 09:52:07 +08:00
Cole Robinson
aefd4c4824 connection: Use name instead of uuid for object keys
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.
2014-06-02 17:48:32 -04:00
Cole Robinson
139392c093 createnet: Catch too small network prefix (bz 1095347) 2014-05-19 19:23:46 -04:00
Cole Robinson
a398d245cb Clean up pylint integration
- Drop no longer needed disable= bits
- Use string names for all skipped pylint messages
2014-04-02 19:00:24 -04:00
Cole Robinson
889ec18031 uiutil: Use list selection helpers everywhere 2014-01-27 10:46:14 -05:00
Cole Robinson
2771511946 uiutil: Make more use of set_combo_text_column 2014-01-26 21:35:42 -05:00
Cole Robinson
708a2737cf Split uihelpers into sharedui and uiutil
Reserve uiutil for the little gtk helper functions, rest goes into shared
UI (which all should probably be factored into their own files but thats
a task for another day)
2014-01-26 18:15:50 -05:00
Cole Robinson
958dea6c5f createnet: Use typical name validation pattern 2014-01-17 18:40:30 -05:00
Cole Robinson
98a95b2e2d network: Add install() command, remove function from vmmConnection
This is the pattern used by other virtinst objects
2013-09-30 15:38:34 -04:00
Cole Robinson
fa47586b37 createnet: Use blue header like other wizards 2013-09-27 13:36:22 -04:00
Cole Robinson
85813203dc createnet: Use virtinst.Network for XML generation 2013-09-23 13:49:20 -04:00
Cole Robinson
7e42faab0f createnet: Massive code and UI cleanup
Modernize the UI, simplify the code, etc.
2013-09-23 12:28:05 -04:00
Cole Robinson
d338bce329 Rename ui files to match source file names 2013-09-22 16:10:16 -04:00
Cole Robinson
1683d56b8d ui: Set non-stock button images in glade, not explicitly in code 2013-09-22 12:33:02 -04:00
Cole Robinson
a7834f5d6c Add Network class for parsing <network> XML
Convert virtManager/host.py, do some cleanups and modernization to the
UI there, add tests.

createnet.py hasn't really been touched yet, but still works because
it was building the XML by hand anyways.
2013-09-22 11:16:07 -04:00
Cole Robinson
7664840e68 createnet: Refresh forward device list when wizard is launched 2013-08-05 17:20:05 -04:00
Cole Robinson
5e9e444dec connection: Do non-VM polling on demand
The goal here is to reduce the amount of tick() polling that we do by default.
For things like pools, networks, and interfaces, the constant polling is
not very helpful and causes CPU churn and slowness for remote connections.

Switch to a more on demand style. Pages that want new information for
these objects now request a priority tick that only refreshes the info
we want.

This isn't perfect, but neither was the previous solution in the face of
things like XML updates behind our back. The real solution here is libvirt
event support across the board.
2013-07-07 12:17:54 -04:00
Cole Robinson
76887c9a32 engine: Switch tick threading model to use queues
And allow other parts of the API to request a priority tick that is
dispatched from the main tick thread.
2013-07-06 21:24:38 -04:00
Martin Kletzander
e407c2eac9 Make pylint a bit happier
Various fixes for some pylint and pep8 warnings/errors which are
fixable and cleanup few lines with that.
2013-06-05 10:19:54 +02:00
Cole Robinson
7f621db08f Fix a few wordings recommended by a translator 2013-05-27 13:41:45 -04:00
Gene Czarcinski
41c782a37e static route support
The syntax for static route support is defined by the
new <route> subelement which has the form:
  <route family='xx' address='xx' prefix='n' gateway='gg' metric='m'/>
This patch builds on the previous patches for adding IPv6 support and
extending the virtual network support.

The static route support code has been recently added to libvirt and will
be included in libvirt 1.0.6.
.
Signed-off-by: Gene Czarcinski <gene@czarc.net>
2013-05-21 15:45:34 -04:00
Cole Robinson
ae471007fc Tons of misc pylint fixes 2013-04-13 13:40:29 -04:00
Cole Robinson
9515a8575d Disable pylint warnings about gi.repository
Since pylint still can't handle the dynamic nature of gobject
introspection.
2013-04-12 08:27:45 -04:00
Gene Czarcinski
61f8e39700 IPv6 support v2: update the create network wizard
With this patch, basic IPv6 support has been added to
the network creation wizard.  It includes changes to
both the glade-3 ui and the related python code.  There
have been some significant changes made to both files for
IPv6 support and some additional capabilities.

This update includes the fix so color will work in the
network creation wizard.

Besides basic IPv6 support, this includes optionally
specifying a DNS domain name and enabling IPv6 internal
routing if no IPv6 address is specified.
.
Signed-off-by: Gene Czarcinski <gene@czarc.net>
2013-04-03 21:32:57 -04:00
Gene Czarcinski
73629b76b2 IPv6 support v2: update gui python and ui
The purpose of this update is:

1. replace use of IPy with ipaddr since ipaddr has needed
functionality and IPy does not.
2. Update the glade-3 ui (vmm-host.ui) to provide
for IPv6 as well as IPv4.  If either IPv4 or IPv6
is not defined, its respective frame is hidden.
3. The DNS Domain Name is added to the basic frame.
4. IPv4 forwarding is moved to the basic frame and ipv6
forwarding is added.
5. If an IPv4 address is not defined then the IPv4
is set to Isolated network, internal rout only.
6. IPv6 network has three values for Forwarding:
Isolated network, Isolated network with internal forwarding,
and Routed network.
7. Add network definitions to tests/testdriver.xml which
include IPv6 and other new parameters now being handled.

This patch includes the fix for getting a KeyError exception
when deleting a network definition.

In this update, createnet.py has been changed to use
ipaddr but it still only handles IPv4 network creation.
.
Signed-off-by: Gene Czarcinski <gene@czarc.net>

(crobinso: Add Gene to AUTHORS)
2013-04-03 21:32:42 -04:00
Cole Robinson
9d05583c26 Remove autotools, replace with distutils-extra
Despite being a known quantity, autotools is so overkill for our needs,
so let's drop it and replace it with a much simpler and easy to customize
system.
2013-04-03 18:20:51 -04:00