Commit Graph

99 Commits

Author SHA1 Message Date
Cole Robinson
0717a21f65 host: Fix renaming network/storage pool 2014-09-20 17:32:09 -04:00
Cole Robinson
226c4562d5 virtManager: Switch to relative imports 2014-09-12 16:28:38 -04:00
Cole Robinson
bd5e57dbdc connection: Simplify state management 2014-09-12 16:28:37 -04:00
Giuseppe Scrivano
92de2db42b virtManager: always save "do not show again" setting
Any other message box performs different than "Unapplied changes",
which stores this information regardless of the user choice of
Yes/No.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-07-28 19:19:17 +02:00
Giuseppe Scrivano
4ba378d1b0 virtManager, host: warn user for unapplied changes
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1047875

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-07-28 19:19:16 +02:00
Giuseppe Scrivano
e44ee980ae virtManager: add QoS information for a network
Add UI elements to display and modify QoS settings in the network
details.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-07-08 00:05:09 +02: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
Chen Hanxiao
0b21c96d34 host: fix a typo
s/Starmode/Startmode

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-05-21 16:41:30 +08: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
Chen Hanxiao
1d3980015a host: unselect_all members before clear model
Interface_selected is being triggered by model.clear() in
populate_interfaces. It usually calls interface_selected
on every interface after the current selected row.

So the gtk code is probably removing the first
row over and over, and when it removes the
current selection (the interface we are deleting),
it selects the next row in line.
It will raise a KeyError.

This patch will fix this issue.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-03-14 09:04:52 +08:00
Cole Robinson
99eaf059ae Fix deprecation warnings on F21/rawhide 2014-02-25 15:57:38 -05:00
Cole Robinson
889ec18031 uiutil: Use list selection helpers everywhere 2014-01-27 10:46:14 -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
58d5e0b799 uihelpers: Move a few more functions closer to their callers 2014-01-26 17:51:15 -05:00
Cole Robinson
20088ab8fb Move many shared UI functions to addhw static functions
Much of uihelpers is just simple stuff that's shared between addhw
and details UI, so just make it staticmethods in addhw, which details
already has a reference to.
2014-01-26 17:09:07 -05:00
Cole Robinson
62cfac18dc host: Fix looking up interfaces on repopulate signal 2014-01-17 20:23:29 -05:00
Cole Robinson
d12c986b98 Use BUTTON size for all status icons 2014-01-12 14:36:03 -05:00
Cole Robinson
2a25c8d37d host: Print iscsi volume key as well in volume list
Suggested here: http://www.redhat.com/archives/virt-tools-list/2013-December/msg00014.html
2013-12-05 09:17:29 -05:00
Cole Robinson
c351c8963a storage: Merge duplicate vol list populating 2013-12-04 19:01:52 -05:00
Giuseppe Scrivano
0df75c7603 headers: update "Red Hat, Inc." copyright for the year 2013
Ensure that any file touched by a @redhat.com author in 2013 has an
updated copyright header.

The files were updated using the build-aux/update-copyright gnulib
script and manually added where the copyright line wasn't present.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:26 +01:00
Cole Robinson
8f1ea67cad Don't lose current selection if redefining net/pool/iface/snapshot 2013-09-30 19:55:21 -04:00
Cole Robinson
8f0bfb1ad6 host: Allow renaming a storage pool 2013-09-29 12:28:01 -04:00
Cole Robinson
369a17160a host: Allow renaming virtual networks 2013-09-29 12:14:00 -04:00
Cole Robinson
927c596daa Fix host/details graphs to not over expand 2013-09-27 14:17:57 -04:00
Cole Robinson
b889659d93 host: Fix initial network/interface selection
Broken by recent commit moving selection->changed signal handling
into glade.
2013-09-23 12:37:03 -04:00
Cole Robinson
6da801f944 Set list selection signals in glade, not code 2013-09-22 16:29:58 -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
b96fa5706c Fix a couple transalation issues 2013-09-20 12:10:34 -04:00
Cole Robinson
aff0ddb259 Use XMLBuilder for Storage object handling
Simplify the API a bunch while we are at it, add tests, etc.
2013-09-20 10:00:08 -04:00
Cole Robinson
3db5cb5f06 Use XMLBuilder for Interface XML
So we unify parsing and building the XML.

Since we already do this for vmmDomain, take the opportunity to move
the shared infrastructure into vmmLibvirtObject
2013-09-19 16:56:38 -04:00
Cole Robinson
9d87b0d342 Replace set_property("visible") with modern set_visible 2013-09-01 20:18:14 -04:00
Giuseppe Scrivano
155a7f1f03 virt-manager: fix "Copy Volume Path" in storage pool details window
It fixes this error:

Traceback (most recent call last):
  File "virt-manager/virtManager/host.py", line 973, in copy_vol_path
    clipboard.set_text(target_path)
  File "/usr/lib/python2.7/site-packages/gi/types.py", line 113, in function
    return info.invoke(*args, **kwargs)
TypeError: set_text() takes exactly 3 arguments (2 given)

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-08-14 20:42:27 -04:00
Giuseppe Scrivano
f4918b3b32 virt-manager: prevent events while the storage pool model is accessed
It fixes this error:

Traceback (most recent call last):
  File "virt-manager/virtManager/storagebrowse.py", line 271, in pool_selected
    pool = self.current_pool()
  File "virt-manager/virtManager/storagebrowse.py", line 238, in current_pool
    return self.conn.get_pool(row[0])
  File "virt-manager/virtManager/connection.py", line 645, in get_pool
    return self.pools[uuid]
KeyError: 'bd9fd5ec-a35c-d84a-b9b2-2aca98f733c3'

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-08-14 20:42:27 -04:00
Giuseppe Scrivano
b3457b9d35 virt-manager: vmmCreateVolume uses the correct connection
Set the connection used by vmmCreateVolume everytime the window is made
visible.  This fixes a case where volumes could be added to the wrong
pool if the same vmmCreateVolume window was already used on a different
connection.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-08-14 20:42:27 -04:00
Cole Robinson
7c55cfeb39 virtManager: Drop util, combine it with virtinst.util and uihelpers 2013-08-11 12:39:28 -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
b044dd94c7 Various cleanup and sync between libvirtobject classes 2013-07-07 09:05:01 -04:00
Cole Robinson
125cbc4541 virtManager: connection: Clean up some inconsistent API 2013-07-06 17:24:51 -04:00
Cole Robinson
be2d9ddcb4 Add base conn object and bump minimum libvirt version to 0.6.0
This base connection object will be used to simplify the API in various
places, reduce libvirt API calls, and better share code between virtinst
and virt-manager. For now it just centralizes connection opening.

This also exposed various places where our handling for older libvirt
was busted, so raise our minimum host version to 0.6.0, the first
version that supports threaded client requests.
2013-07-05 16:42:19 -04:00
Cole Robinson
0b2aa07480 host: Don't keep items in list when conn closes. 2013-06-30 12:49:48 -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
07e0c92b4b Remove a bunch of outdates FIXME/XXX comments 2013-04-17 09:32:00 -04:00
Cole Robinson
079835bfaf Fix other popup menus after gtk3 conversion 2013-04-14 13:16:02 -04:00
Cole Robinson
0d243983d0 Revive pep8 and clean up the code
autopep8 is pretty cool :)
2013-04-13 15:22:43 -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
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