Removed unnecessary context parameter
This commit is contained in:
@@ -1212,7 +1212,7 @@ class ComputeManager(manager.SchedulerDependentManager):
|
||||
max_retry = FLAGS.live_migration_retry_count
|
||||
for cnt in range(max_retry):
|
||||
try:
|
||||
self.driver.plug_vifs(context, instance_ref, network_info)
|
||||
self.driver.plug_vifs(instance_ref, network_info)
|
||||
break
|
||||
except exception.ProcessExecutionError:
|
||||
if cnt == max_retry - 1:
|
||||
|
||||
@@ -253,3 +253,8 @@ class ComputeDriver(object):
|
||||
def set_host_enabled(self, host, enabled):
|
||||
"""Sets the specified host's ability to accept new instances."""
|
||||
raise NotImplementedError()
|
||||
|
||||
def plug_vifs(self, instance, network_info):
|
||||
"""Plugs in VIFs to networks."""
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ class LibvirtConnection(driver.ComputeDriver):
|
||||
infos.append(info)
|
||||
return infos
|
||||
|
||||
def plug_vifs(self, ctxt, instance, network_info):
|
||||
def plug_vifs(self, instance, network_info):
|
||||
"""Plugin VIFs into networks."""
|
||||
for (network, mapping) in network_info:
|
||||
self.vif_driver.plug(instance, network, mapping)
|
||||
@@ -493,6 +493,7 @@ class LibvirtConnection(driver.ComputeDriver):
|
||||
# better because we cannot ensure flushing dirty buffers
|
||||
# in the guest OS. But, in case of KVM, shutdown() does not work...
|
||||
self.destroy(instance, network_info, cleanup=False)
|
||||
self.plug_vifs(instance, network_info)
|
||||
self.firewall_driver.setup_basic_filtering(instance)
|
||||
self.firewall_driver.prepare_instance_filter(instance)
|
||||
self._create_new_domain(xml)
|
||||
|
||||
Reference in New Issue
Block a user