mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-10 01:18:03 +03:00
migrate: Remove misleading 'offline' option (bz 881092)
We acted like it would migrate a shutoff VM, but it just toggled the LIVE flag. We should support true 'offline' migration, but the UI will be different.
This commit is contained in:
parent
99d80ccdb2
commit
d3bd70daca
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.15.4 on Fri Sep 27 09:56:20 2013 -->
|
<!-- Generated with glade 3.16.1 -->
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.0 -->
|
<requires lib="gtk+" version="3.0"/>
|
||||||
<object class="GtkAdjustment" id="adjustment1">
|
<object class="GtkAdjustment" id="adjustment1">
|
||||||
<property name="upper">70000</property>
|
<property name="upper">70000</property>
|
||||||
<property name="step_increment">1</property>
|
<property name="step_increment">1</property>
|
||||||
@ -93,7 +93,7 @@
|
|||||||
<object class="GtkTable" id="table2">
|
<object class="GtkTable" id="table2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="n_rows">4</property>
|
<property name="n_rows">3</property>
|
||||||
<property name="n_columns">2</property>
|
<property name="n_columns">2</property>
|
||||||
<property name="column_spacing">6</property>
|
<property name="column_spacing">6</property>
|
||||||
<property name="row_spacing">6</property>
|
<property name="row_spacing">6</property>
|
||||||
@ -165,59 +165,6 @@
|
|||||||
<property name="x_options">GTK_FILL</property>
|
<property name="x_options">GTK_FILL</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="label10">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="xalign">1</property>
|
|
||||||
<property name="label" translatable="yes"><span color='#484848'>Migrate _offline:</span></property>
|
|
||||||
<property name="use_markup">True</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
<property name="mnemonic_widget">migrate-offline</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
<property name="bottom_attach">4</property>
|
|
||||||
<property name="x_options">GTK_FILL</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkHBox" id="hbox3">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkCheckButton" id="migrate-offline">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">False</property>
|
|
||||||
<property name="xalign">1</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="label13">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="right_attach">2</property>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
<property name="bottom_attach">4</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkComboBox" id="migrate-dest">
|
<object class="GtkComboBox" id="migrate-dest">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -321,10 +268,11 @@
|
|||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCheckButton" id="migrate-unsafe">
|
<object class="GtkCheckButton" id="migrate-unsafe">
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
<property name="use_action_appearance">False</property>
|
<property name="xalign">0.5</property>
|
||||||
<property name="draw_indicator">True</property>
|
<property name="draw_indicator">True</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
@ -1302,7 +1302,7 @@ class vmmDomain(vmmLibvirtObject):
|
|||||||
newname = None
|
newname = None
|
||||||
|
|
||||||
flags = 0
|
flags = 0
|
||||||
if self.status() == libvirt.VIR_DOMAIN_RUNNING and live:
|
if live:
|
||||||
flags |= libvirt.VIR_MIGRATE_LIVE
|
flags |= libvirt.VIR_MIGRATE_LIVE
|
||||||
|
|
||||||
if secure:
|
if secure:
|
||||||
|
@ -136,10 +136,6 @@ class vmmMigrateDialog(vmmGObjectUI):
|
|||||||
self.widget("migrate-set-maxdowntime").set_active(False)
|
self.widget("migrate-set-maxdowntime").set_active(False)
|
||||||
self.widget("migrate-max-downtime").set_value(30)
|
self.widget("migrate-max-downtime").set_value(30)
|
||||||
|
|
||||||
running = self.vm.is_active()
|
|
||||||
self.widget("migrate-offline").set_active(not running)
|
|
||||||
self.widget("migrate-offline").set_sensitive(running)
|
|
||||||
|
|
||||||
self.widget("migrate-rate").set_value(0)
|
self.widget("migrate-rate").set_value(0)
|
||||||
self.widget("migrate-secure").set_active(False)
|
self.widget("migrate-secure").set_active(False)
|
||||||
self.widget("migrate-unsafe").set_active(False)
|
self.widget("migrate-unsafe").set_active(False)
|
||||||
@ -221,9 +217,6 @@ class vmmMigrateDialog(vmmGObjectUI):
|
|||||||
return None
|
return None
|
||||||
return row[1]
|
return row[1]
|
||||||
|
|
||||||
def get_config_offline(self):
|
|
||||||
return self.widget("migrate-offline").get_active()
|
|
||||||
|
|
||||||
def get_config_max_downtime(self):
|
def get_config_max_downtime(self):
|
||||||
if not self.get_config_max_downtime_enabled():
|
if not self.get_config_max_downtime_enabled():
|
||||||
return 0
|
return 0
|
||||||
@ -464,12 +457,12 @@ class vmmMigrateDialog(vmmGObjectUI):
|
|||||||
if not self.validate():
|
if not self.validate():
|
||||||
return
|
return
|
||||||
|
|
||||||
|
live = True
|
||||||
destconn = self.get_config_destconn()
|
destconn = self.get_config_destconn()
|
||||||
srcuri = self.vm.conn.get_uri()
|
srcuri = self.vm.conn.get_uri()
|
||||||
srchost = self.vm.conn.get_hostname()
|
srchost = self.vm.conn.get_hostname()
|
||||||
dsthost = destconn.get_qualified_hostname()
|
dsthost = destconn.get_qualified_hostname()
|
||||||
max_downtime = self.get_config_max_downtime()
|
max_downtime = self.get_config_max_downtime()
|
||||||
live = not self.get_config_offline()
|
|
||||||
secure = self.get_config_secure()
|
secure = self.get_config_secure()
|
||||||
unsafe = self.get_config_unsafe()
|
unsafe = self.get_config_unsafe()
|
||||||
uri = self.build_migrate_uri(destconn, srcuri)
|
uri = self.build_migrate_uri(destconn, srcuri)
|
||||||
|
Loading…
Reference in New Issue
Block a user