[TrivialFix]Use the right indent for MigrateHostView

Change-Id: I341758848bd8f987849e2c76123c7916f52c52de
This commit is contained in:
zhurong 2016-07-05 02:49:45 -04:00
parent 077d38682d
commit 7f69b0f5a9

View File

@ -75,26 +75,26 @@ class DisableServiceView(forms.ModalFormView):
class MigrateHostView(forms.ModalFormView): class MigrateHostView(forms.ModalFormView):
form_class = project_forms.MigrateHostForm form_class = project_forms.MigrateHostForm
template_name = 'admin/hypervisors/compute/migrate_host.html' template_name = 'admin/hypervisors/compute/migrate_host.html'
context_object_name = 'compute_host' context_object_name = 'compute_host'
success_url = reverse_lazy("horizon:admin:hypervisors:index") success_url = reverse_lazy("horizon:admin:hypervisors:index")
page_title = _("Migrate Host") page_title = _("Migrate Host")
submit_label = page_title submit_label = page_title
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super(MigrateHostView, self).get_context_data(**kwargs) context = super(MigrateHostView, self).get_context_data(**kwargs)
context["compute_host"] = self.kwargs['compute_host'] context["compute_host"] = self.kwargs['compute_host']
return context return context
def get_initial(self): def get_initial(self):
initial = super(MigrateHostView, self).get_initial() initial = super(MigrateHostView, self).get_initial()
current_host = self.kwargs['compute_host'] current_host = self.kwargs['compute_host']
initial.update({ initial.update({
'current_host': current_host, 'current_host': current_host,
'live_migrate': True, 'live_migrate': True,
'block_migration': False, 'block_migration': False,
'disk_over_commit': False 'disk_over_commit': False
}) })
return initial return initial