Cole Robinson
20d5c1887a
baseclass: Export GObject.SignalFlags.RUN_FIRST
...
Saves some typing and imports
2018-03-15 21:24:48 -04: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
Chen Hanxiao
7f1b4cee82
pycodestyle: fix all E125 warnings
...
Fix all E125:
Continuation line with same indent as next logical line
Also remove ignore options of E125
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-10-21 23:26:16 +08:00
Radostin Stoyanov
f41aafc721
Use enumerate instead of range and len
2017-10-20 13:18:31 -04:00
Lin Ma
23aaf8527d
network: Set bridge name to None instead of blank
...
Trigger libvirt error if user leaves 'net-bridge-name' GtkEntry
blank when specifying shared device name.
Signed-off-by: Lin Ma <lma@suse.com>
2017-10-19 18:09:19 -04:00
Radostin Stoyanov
b93cc3bbc9
pycodestyle: Do not use bare 'except:'
...
A bare 'except:' catches all exceptions [1], including SystemExit,
KeyboardInterrupt, and GeneratorExit (which is not an error and should
not normally be caught by user code). In situations where you need to
catch all “normal” errors, you can catch the base class for all normal
exceptions, Exception [2].
[1] https://docs.python.org/2/howto/doanddont.html#except
[2] https://docs.python.org/2/library/exceptions.html#Exception
2017-08-02 13:57:43 -04:00
Cole Robinson
62feeb02a8
Switch to python3 style 'except X as Y' notation
...
Which also works with python2.7
2017-05-05 14:52:11 -04:00
Charles d'Hondt
b545201617
Added OpenVSwitch Network Detection
...
Small patch to allow VMM to detect OpenVSwitch
Signed-off-by: Charles d'Hondt <charles.dhondt@gmail.com>
2017-03-24 16:42:45 -04:00
Cole Robinson
f4dfb6de9d
Fix recent pylint/pep8 output
2016-04-18 16:42:12 -04:00
Pavel Hrdina
c39592ae7b
localization: mark several strings as translatable
...
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-02-06 16:25:08 +01:00
Cole Robinson
a91419d5c6
netlist: Don't trigger change events when repopulating list
...
Like we do in other places
2015-11-02 14:41:18 -05:00
Cole Robinson
d57d4d0e76
netlist: Allow specifying a manual bridge name for qemu:///session (bz 1212443)
...
Since qemu has the setuid qemu-bridge-helper, give a way in the UI
to specify a manual bridge name for qemu:///session. Might not work
all the time but at least the users can try
https://bugzilla.redhat.com/show_bug.cgi?id=1212443
2015-09-24 16:32:04 -04:00
Cole Robinson
8a20a71c46
uiutil: Merge set_combo_entry into set_list_selection
2015-05-19 18:29:46 -04:00
Cole Robinson
5219e49eec
uiutil: Merge get_combo_entry into get_list_selection
...
There's no reason we can't handle it together
2015-05-19 18:29:45 -04:00
Cole Robinson
fdad3efe24
uiutil: streamline column vs rowidx parameter name
2015-05-19 18:29:45 -04:00
Cole Robinson
6071ab0ea4
uiutil: Clarify a few ambiguous function names
2015-04-10 15:00:34 -04:00
Cole Robinson
2d25c920ea
connection: Use consistent nodedev function names
2015-04-10 15:00:34 -04:00
Cole Robinson
1e154a373d
libvirtobject: Populate status up front
...
And use this to kill paranoid object tick() that are sprinkled throughout
the code.
2015-04-10 15:00:34 -04:00
Cole Robinson
c66bc2a87f
connection: Have get_nodedevs return vmmNodeDevice
...
To make it consistent with similar vmmConnection functionas
2015-04-07 14:12:00 -04:00
Cole Robinson
fa0dc2b6dd
netlist: Don't set portgroup=""
2015-04-06 16:41:02 -04:00
Cole Robinson
4224772852
netlist: Streamline bridge and macvtap labels (bz 1147660)
2015-03-25 08:47:21 -04:00
Cole Robinson
226c4562d5
virtManager: Switch to relative imports
2014-09-12 16:28:38 -04: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
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
9369ad3ac0
virt-manager: Allow setting interface portgroup element
...
We only show the option if the selected virtual network actually has
portgroups listed in its XML
2014-05-31 15:51:24 -04:00
Cole Robinson
932e6e00bb
details: Fix changing graphics type (bz 1083903)
...
And clean up the API usage to avoid these types of issues in the future.
2014-04-03 10:53:54 -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
76ec8680bd
netlist: Make sure to disconnect all signal handlers
2014-02-05 14:25:13 -05:00
Cole Robinson
1597677e61
netlist: Listen for net-added events and update the list
2014-01-28 14:40:17 -05:00
Cole Robinson
169ae1203d
Break out shared network list UI to netlist.py
...
Use this to show vport stuff in addhw, give a warning about macvtap
networking, and allow macvtap from the create wizard.
2014-01-28 10:00:06 -05:00