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:
Cole Robinson 2014-02-01 18:17:17 -05:00
parent 99d80ccdb2
commit d3bd70daca
3 changed files with 7 additions and 66 deletions

View File

@ -1,7 +1,7 @@
<?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-requires gtk+ 3.0 -->
<requires lib="gtk+" version="3.0"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">70000</property>
<property name="step_increment">1</property>
@ -93,7 +93,7 @@
<object class="GtkTable" id="table2">
<property name="visible">True</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="column_spacing">6</property>
<property name="row_spacing">6</property>
@ -165,59 +165,6 @@
<property name="x_options">GTK_FILL</property>
</packing>
</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">&lt;span color='#484848'&gt;Migrate _offline:&lt;/span&gt;</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>
<object class="GtkComboBox" id="migrate-dest">
<property name="visible">True</property>
@ -321,10 +268,11 @@
</child>
<child>
<object class="GtkCheckButton" id="migrate-unsafe">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</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>
</object>
<packing>

View File

@ -1302,7 +1302,7 @@ class vmmDomain(vmmLibvirtObject):
newname = None
flags = 0
if self.status() == libvirt.VIR_DOMAIN_RUNNING and live:
if live:
flags |= libvirt.VIR_MIGRATE_LIVE
if secure:

View File

@ -136,10 +136,6 @@ class vmmMigrateDialog(vmmGObjectUI):
self.widget("migrate-set-maxdowntime").set_active(False)
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-secure").set_active(False)
self.widget("migrate-unsafe").set_active(False)
@ -221,9 +217,6 @@ class vmmMigrateDialog(vmmGObjectUI):
return None
return row[1]
def get_config_offline(self):
return self.widget("migrate-offline").get_active()
def get_config_max_downtime(self):
if not self.get_config_max_downtime_enabled():
return 0
@ -464,12 +457,12 @@ class vmmMigrateDialog(vmmGObjectUI):
if not self.validate():
return
live = True
destconn = self.get_config_destconn()
srcuri = self.vm.conn.get_uri()
srchost = self.vm.conn.get_hostname()
dsthost = destconn.get_qualified_hostname()
max_downtime = self.get_config_max_downtime()
live = not self.get_config_offline()
secure = self.get_config_secure()
unsafe = self.get_config_unsafe()
uri = self.build_migrate_uri(destconn, srcuri)