[virt-tools-list] [PATCH] details: ADD checkbox to plug/unplug network interface
Pavel Hrdina
phrdina at redhat.com
Fri Aug 17 08:53:56 UTC 2018
On Thu, Aug 16, 2018 at 05:30:31PM +0200, Simon Kobyda wrote:
> Hardware Details -> NIC of every VM should now contain checkbox for
> interface's link state. This checkbox edits domain's XML by changing
> <link state='up/down'/>. If XML doesn't contain this tag, virt manager
> assumes state "up".
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1614532
>
> Signed-off-by: Simon Kobyda <skobyda at redhat.com>
> ---
> ui/details.ui | 25 +++++++++++++++++++++++++
> virtManager/details.py | 12 +++++++++++-
> virtManager/domain.py | 5 ++++-
> 3 files changed, 40 insertions(+), 2 deletions(-)
>
> diff --git a/ui/details.ui b/ui/details.ui
> index 88379b0e..9df12a7f 100644
> --- a/ui/details.ui
> +++ b/ui/details.ui
> @@ -4014,6 +4014,31 @@
> <property name="top_attach">2</property>
> </packing>
> </child>
> + <child>
> + <object class="GtkLabel" id="network_link_state_label">
> + <property name="visible">True</property>
> + <property name="can_focus">False</property>
> + <property name="label" translatable="yes">Link state</property>
> + </object>
> + <packing>
> + <property name="left_attach">0</property>
> + <property name="top_attach">3</property>
> + </packing>
> + </child>
> + <child>
> + <object class="GtkCheckButton" id="network_link_state_checkbox">
> + <property name="label" translatable="yes">active</property>
> + <property name="visible">True</property>
> + <property name="can_focus">True</property>
> + <property name="receives_default">False</property>
> + <property name="draw_indicator">True</property>
> + <signal name="toggled" handler="on_network_link_state_checkbox_toggled" swapped="no"/>
> + </object>
> + <packing>
> + <property name="left_attach">1</property>
> + <property name="top_attach">3</property>
> + </packing>
> + </child>
The 'label' should be aligned to right and the 'checkbox' should be
aligned to left. There was missing ':' after the label text.
We tend to enable usage of shortcuts, I'll add it before pushing.
I've also renamed ids of both object to contain '-' instead of '_'.
Congratulation on your first virt-manager commit :).
Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20180817/8b8109d0/attachment.sig>
More information about the virt-tools-list
mailing list