From 0a51d07dfb7a062f37dda584df48981613d275f5 Mon Sep 17 00:00:00 2001 From: "wei.ying" Date: Sun, 7 May 2017 14:33:33 +0800 Subject: [PATCH] Remove unused function calls in project instances attach volume form The function get_object wasn't used anywhere, so there is no purpose to have it there. Change-Id: I9fa93683ff2d2cffeec9426698d7b95c8841ed23 Closes-Bug: #1689010 --- .../dashboards/project/instances/views.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/openstack_dashboard/dashboards/project/instances/views.py b/openstack_dashboard/dashboards/project/instances/views.py index 7dd195e23f..31d56bb4fb 100644 --- a/openstack_dashboard/dashboards/project/instances/views.py +++ b/openstack_dashboard/dashboards/project/instances/views.py @@ -483,15 +483,6 @@ class AttachVolumeView(forms.ModalFormView): submit_label = _("Attach Volume") success_url = reverse_lazy('horizon:project:instances:index') - @memoized.memoized_method - def get_object(self): - try: - return api.nova.server_get(self.request, - self.kwargs["instance_id"]) - except Exception: - exceptions.handle(self.request, - _("Unable to retrieve instance.")) - def get_initial(self): args = {'instance_id': self.kwargs['instance_id']} submit_url = "horizon:project:instances:attach_volume" @@ -519,15 +510,6 @@ class DetachVolumeView(forms.ModalFormView): submit_label = _("Detach Volume") success_url = reverse_lazy('horizon:project:instances:index') - @memoized.memoized_method - def get_object(self): - try: - return api.nova.server_get(self.request, - self.kwargs['instance_id']) - except Exception: - exceptions.handle(self.request, - _("Unable to retrieve instance.")) - def get_initial(self): args = {'instance_id': self.kwargs['instance_id']} submit_url = "horizon:project:instances:detach_volume"