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.
Closes-Bug:
@@ -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"
