summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2014-01-26 13:43:53 -0500
committerCole Robinson <crobinso@redhat.com>2014-01-26 14:15:46 -0500
commit46ad7e8bdbbfd720202c5c0462a84daf49be616a (patch)
treed6acb7a7ca25b2d5fb55c435623a82d06bb159cb
parent2688ca64bb159c9ef7eb7c7069ddc7b664d672e5 (diff)
downloadvirt-manager-46ad7e8bdbbfd720202c5c0462a84daf49be616a.tar.gz
details: Remove UI for security, apic, acpi, clock
99% of users never need to tweak them, and now that we have virt-xml, most of what they could want to do is a simple CLI oneliner.
-rw-r--r--ui/details.ui472
-rw-r--r--virtManager/details.py119
-rw-r--r--virtManager/domain.py55
3 files changed, 54 insertions, 592 deletions
diff --git a/ui/details.ui b/ui/details.ui
index 6277fe4a..5ee4399b 100644
--- a/ui/details.ui
+++ b/ui/details.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Sun Jan 12 14:33:40 2014 -->
+<!-- Generated with glade 3.16.1 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkAccelGroup" id="accelgroup1"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">1</property>
@@ -853,14 +853,12 @@
<property name="top_padding">3</property>
<property name="left_padding">12</property>
<child>
- <object class="GtkTable" id="table1">
+ <object class="GtkGrid" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">3</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">6</property>
<property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
<child>
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
@@ -869,8 +867,10 @@
<property name="label" translatable="yes">Hypervisor:</property>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -881,10 +881,10 @@
<property name="label" translatable="yes">Architecture:</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -897,9 +897,9 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -912,11 +912,9 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -929,11 +927,9 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -944,10 +940,38 @@
<property name="label" translatable="yes">Emulator:</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="overview-machine-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Machine _Type: </property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="machine-type">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <signal name="changed" handler="on_machine_type_changed" swapped="no"/>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
</object>
@@ -1110,396 +1134,6 @@
<property name="position">3</property>
</packing>
</child>
- <child>
- <object class="GtkExpander" id="expander2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child>
- <object class="GtkAlignment" id="alignment13">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">3</property>
- <property name="left_padding">21</property>
- <child>
- <object class="GtkGrid" id="table7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
- <child>
- <object class="GtkLabel" id="label20">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Enable A_CPI:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">overview-acpi</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="overview-acpi">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0.5</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_overview_acpi_changed" swapped="no"/>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="overview-apic">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0.5</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_overview_apic_changed" swapped="no"/>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label22">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">C_lock Offset:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="overview-machine-label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Machine _Type: </property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label21">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Enable A_PIC:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">overview-apic</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="overview-clock">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="has_entry">True</property>
- <signal name="changed" handler="on_overview_clock_changed" swapped="no"/>
- <child internal-child="entry">
- <object class="GtkEntry" id="combobox-entry2">
- <property name="can_focus">False</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="machine-type">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <signal name="changed" handler="on_machine_type_changed" swapped="no"/>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">&lt;b&gt;Machine Settings&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkExpander" id="expander1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkAlignment" id="alignment7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">3</property>
- <property name="left_padding">21</property>
- <child>
- <object class="GtkTable" id="table3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">6</property>
- <property name="row_spacing">6</property>
- <child>
- <object class="GtkTable" id="security-type-box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">6</property>
- <property name="row_spacing">6</property>
- <child>
- <object class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkAlignment" id="alignment8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">20</property>
- <child>
- <object class="GtkLabel" id="security_id">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Label:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">security-label</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="security-label">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <signal name="changed" handler="on_security_label_changed" swapped="no"/>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="security-relabel">
- <property name="label" translatable="yes">relabel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0.5</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_security_relabel_changed" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="security-dynamic">
- <property name="label" translatable="yes">D_ynamic</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0.5</property>
- <property name="draw_indicator">True</property>
- <signal name="activate" handler="on_security_type_changed" swapped="no"/>
- <signal name="toggled" handler="on_security_type_changed" swapped="no"/>
- </object>
- <packing>
- <property name="x_options"/>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="security-static">
- <property name="label" translatable="yes">_Static</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0.5</property>
- <property name="draw_indicator">True</property>
- <property name="group">security-dynamic</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkImage" id="security-static-info">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes"> Static SELinux security type tells libvirt to always start the guest process with the specified label. Unless 'relabel' is set, the administrator is responsible for making sure the images are labeled correctly on disk.
-</property>
- <property name="xalign">0</property>
- <property name="stock">gtk-info</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkImage" id="security-dynamic-info">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">The dynamic SELinux security type tells libvirt to automatically pick a unique label for the guest process and guest image, ensuring total isolation of the guest. (Default)</property>
- <property name="xalign">0</property>
- <property name="stock">gtk-info</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"/>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label514">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">M_odel:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">security-model</property>
- </object>
- <packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="security-type-label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0</property>
- <property name="label" translatable="yes">Type:</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="security-model">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">label</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label14">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">&lt;b&gt;Security&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">5</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -1971,12 +1605,12 @@
<property name="climb_rate">1</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
+ <signal name="changed" handler="on_config_vcpus_changed" swapped="no"/>
<child internal-child="accessible">
<object class="AtkObject" id="config-vcpus-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Virtual CPU Select</property>
</object>
</child>
- <signal name="changed" handler="on_config_vcpus_changed" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
@@ -2584,12 +2218,12 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
+ <signal name="changed" handler="on_config_vcpupin_changed" swapped="no"/>
<child internal-child="accessible">
<object class="AtkObject" id="config-vcpupin-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Virtual CPU Affinity Select</property>
</object>
</child>
- <signal name="changed" handler="on_config_vcpupin_changed" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -2855,12 +2489,12 @@
<property name="climb_rate">2</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
+ <signal name="changed" handler="on_config_memory_changed" swapped="no"/>
<child internal-child="accessible">
<object class="AtkObject" id="config-memory-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Memory Select</property>
</object>
</child>
- <signal name="changed" handler="on_config_memory_changed" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -2904,12 +2538,12 @@
<property name="climb_rate">2</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
+ <signal name="changed" handler="on_config_maxmem_changed" swapped="no"/>
<child internal-child="accessible">
<object class="AtkObject" id="config-maxmem-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Max Memory Select</property>
</object>
</child>
- <signal name="changed" handler="on_config_maxmem_changed" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
diff --git a/virtManager/details.py b/virtManager/details.py
index 44dccb7a..66b06171 100644
--- a/virtManager/details.py
+++ b/virtManager/details.py
@@ -46,11 +46,7 @@ from virtinst import util
# Parameters that can be editted in the details window
(EDIT_NAME,
EDIT_TITLE,
-EDIT_ACPI,
-EDIT_APIC,
-EDIT_CLOCK,
EDIT_MACHTYPE,
-EDIT_SECURITY,
EDIT_DESC,
EDIT_VCPUS,
@@ -99,7 +95,7 @@ EDIT_CONTROLLER_MODEL,
EDIT_TPM_TYPE,
EDIT_FS,
-) = range(1, 43)
+) = range(1, 39)
# Columns in hw list model
@@ -442,13 +438,7 @@ class vmmDetails(vmmGObjectUI):
"on_overview_name_changed": lambda *x: self.enable_apply(x, EDIT_NAME),
"on_overview_title_changed": lambda *x: self.enable_apply(x, EDIT_TITLE),
- "on_overview_acpi_changed": self.config_acpi_changed,
- "on_overview_apic_changed": self.config_apic_changed,
- "on_overview_clock_changed": lambda *x: self.enable_apply(x, EDIT_CLOCK),
"on_machine_type_changed": lambda *x: self.enable_apply(x, EDIT_MACHTYPE),
- "on_security_label_changed": lambda *x: self.enable_apply(x, EDIT_SECURITY),
- "on_security_relabel_changed": lambda *x: self.enable_apply(x, EDIT_SECURITY),
- "on_security_type_changed": self.security_type_changed,
"on_config_vcpus_changed": self.config_vcpus_changed,
"on_config_maxvcpus_changed": self.config_maxvcpus_changed,
@@ -783,15 +773,6 @@ class vmmDetails(vmmGObjectUI):
summary_col.add_attribute(summary_text, 'text', 2)
summary_col.set_sort_column_id(2)
- # Clock combo
- clock_combo = self.widget("overview-clock")
- clock_model = Gtk.ListStore(str)
- clock_combo.set_model(clock_model)
- clock_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
- uihelpers.set_combo_text_column(clock_combo, 0)
- for offset in ["localtime"]:
- clock_model.append([offset])
-
arch = self.vm.get_arch()
caps = self.vm.conn.caps
@@ -1636,28 +1617,6 @@ class vmmDetails(vmmGObjectUI):
if edittype not in self.active_edits:
self.active_edits.append(edittype)
- # Overview -> Machine settings
- def config_acpi_changed(self, ignore):
- widget = self.widget("overview-acpi")
- incon = widget.get_inconsistent()
- widget.set_inconsistent(False)
- if incon:
- widget.set_active(True)
- self.enable_apply(EDIT_ACPI)
- def config_apic_changed(self, ignore):
- widget = self.widget("overview-apic")
- incon = widget.get_inconsistent()
- widget.set_inconsistent(False)
- if incon:
- widget.set_active(True)
- self.enable_apply(EDIT_APIC)
-
- # Overview -> Security
- def security_type_changed(self, button):
- self.enable_apply(EDIT_SECURITY)
- self.widget("security-label").set_sensitive(not button.get_active())
- self.widget("security-relabel").set_sensitive(not button.get_active())
-
# Memory
def config_get_maxmem(self):
return uihelpers.spin_get_helper(self.widget("config-maxmem"))
@@ -1986,41 +1945,10 @@ class vmmDetails(vmmGObjectUI):
add_define(self.vm.define_title, title)
add_hotplug(self.vm.hotplug_title, title)
- if self.edited(EDIT_ACPI):
- enable_acpi = self.widget("overview-acpi").get_active()
- if self.widget("overview-acpi").get_inconsistent():
- enable_acpi = None
- add_define(self.vm.define_acpi, enable_acpi)
-
- if self.edited(EDIT_APIC):
- enable_apic = self.widget("overview-apic").get_active()
- if self.widget("overview-apic").get_inconsistent():
- enable_apic = None
- add_define(self.vm.define_apic, enable_apic)
-
- if self.edited(EDIT_CLOCK):
- clock = self.get_combo_entry("overview-clock")
- add_define(self.vm.define_clock, clock)
-
if self.edited(EDIT_MACHTYPE):
machtype = self.get_combo_entry("machine-type")
add_define(self.vm.define_machtype, machtype)
- if self.edited(EDIT_SECURITY):
- semodel = None
- setype = "static"
- selabel = self.get_text("security-label")
- relabel = self.widget("security-relabel").get_active()
-
- if self.widget("security-dynamic").get_active():
- setype = "dynamic"
- relabel = True
- if self.widget("security-type-box").get_sensitive():
- semodel = self.get_text("security-model")
-
- add_define(self.vm.define_seclabel,
- semodel, setype, selabel, relabel)
-
if self.edited(EDIT_DESC):
desc_widget = self.widget("overview-description")
desc = desc_widget.get_buffer().get_property("text") or ""
@@ -2590,56 +2518,11 @@ class vmmDetails(vmmGObjectUI):
apps_model.append([name, version, summary])
# Machine settings
- acpi = self.vm.get_acpi()
- apic = self.vm.get_apic()
- clock = self.vm.get_clock()
machtype = self.vm.get_machtype()
-
- # Hack in a way to represent 'default' acpi/apic for customize dialog
- self.widget("overview-acpi").set_active(bool(acpi))
- self.widget("overview-acpi").set_inconsistent(
- acpi is None and self.is_customize_dialog)
- self.widget("overview-apic").set_active(bool(apic))
- self.widget("overview-apic").set_inconsistent(
- apic is None and self.is_customize_dialog)
-
- if not clock:
- clock = _("Same as host")
- self.set_combo_entry("overview-clock", clock)
-
if not arch in ["i686", "x86_64"]:
if machtype is not None:
self.set_combo_entry("machine-type", machtype)
- # Security details
- semodel, sectype, vmlabel, relabel = self.vm.get_seclabel()
- caps = self.vm.conn.caps
-
- if caps.host.secmodel and caps.host.secmodel.model:
- semodel = caps.host.secmodel.model
-
- self.widget("security-model").set_text(semodel or _("None"))
-
- if not semodel or semodel == "apparmor":
- self.widget("security-type-box").hide()
- self.widget("security-type-label").hide()
- else:
- self.widget("security-type-box").set_sensitive(bool(semodel))
-
- if sectype == "static":
- self.widget("security-static").set_active(True)
- self.widget("security-relabel").set_sensitive(True)
- # As "no" is default for relabel with 'static' label and
- # 'dynamic' must have relabel='yes', this will work properly
- # for both False (relabel='no') and None (relabel not
- # specified)
- self.widget("security-relabel").set_active(relabel)
- else:
- self.widget("security-dynamic").set_active(True)
- # Dynamic label type must use resource labeling
- self.widget("security-relabel").set_active(True)
- self.widget("security-relabel").set_sensitive(False)
- self.widget("security-label").set_text(vmlabel)
def refresh_stats_page(self):
def _dsk_rx_tx_text(rx, tx, unit):
diff --git a/virtManager/domain.py b/virtManager/domain.py
index 8f7032c6..e96849e9 100644
--- a/virtManager/domain.py
+++ b/virtManager/domain.py
@@ -567,41 +567,7 @@ class vmmDomain(vmmLibvirtObject):
guest.maxmemory = int(maxmem)
return self._redefine(change)
- # Security define methods
- def define_seclabel(self, model, t, label, relabel):
- def change(guest):
- seclabel = guest.seclabel
- seclabel.model = model or None
- if not model:
- return
-
- if relabel is not None:
- if relabel:
- seclabel.relabel = "yes"
- else:
- seclabel.relabel = "no"
-
- seclabel.type = t
- if label:
- seclabel.label = label
-
- return self._redefine(change)
-
# Machine config define methods
- def define_acpi(self, newvalue):
- def change(guest):
- guest.features.acpi = newvalue
- return self._redefine(change)
- def define_apic(self, newvalue):
- def change(guest):
- guest.features.apic = newvalue
- return self._redefine(change)
-
- def define_clock(self, newvalue):
- def change(guest):
- guest.clock.offset = newvalue
- return self._redefine(change)
-
def define_machtype(self, newvalue):
def change(guest):
guest.os.machine = newvalue
@@ -1047,12 +1013,6 @@ class vmmDomain(vmmLibvirtObject):
return self.get_xmlobj().os.init
def get_emulator(self):
return self.get_xmlobj().emulator
- def get_acpi(self):
- return self.get_xmlobj().features.acpi
- def get_apic(self):
- return self.get_xmlobj().features.apic
- def get_clock(self):
- return self.get_xmlobj().clock.offset
def get_machtype(self):
return self.get_xmlobj().os.machine
@@ -1096,21 +1056,6 @@ class vmmDomain(vmmLibvirtObject):
return (guest.os.kernel, guest.os.initrd,
guest.os.dtb, guest.os.kernel_args)
- def get_seclabel(self):
- seclabel = self.get_xmlobj().seclabel
- model = seclabel.model
- t = seclabel.type or "dynamic"
- label = seclabel.label or ""
-
- relabel = getattr(seclabel, "relabel", None)
- if relabel is not None:
- if relabel == "yes":
- relabel = True
- else:
- relabel = False
-
- return [model, t, label, relabel]
-
# XML Device listing
def get_serial_devs(self):