Don't force people to security groups after they add a FIP

Horizon should not move people from the instances page to
the security groups page after adding a FIP. It's already
too late to prevent bad things from happening and this
implies that it is not too late.

Change-Id: I03796253fc6b6c56572c6e841f3ce3102c9c6cdd
Closes-bug: #1550023
This commit is contained in:
David Medberry
2016-02-25 15:41:09 -07:00
committed by Eric Peterson
parent ecaf1a47bc
commit 8a4aa96d7c
2 changed files with 4 additions and 4 deletions

View File

@@ -210,5 +210,5 @@ class WorkflowView(hz_views.ModalBackdropMixin, generic.TemplateView):
response.content = json.dumps(data)
response["X-Horizon-Add-To-Field"] = field_id
return response
next_url = self.request.GET.get(workflow.redirect_param_name)
next_url = self.request.POST.get(workflow.redirect_param_name)
return shortcuts.redirect(next_url or workflow.get_success_url())

View File

@@ -134,12 +134,12 @@ class FloatingIpViewTests(test.TestCase):
floating_ip.id,
server.id)
self.mox.ReplayAll()
next = reverse("horizon:project:instances:index")
form_data = {'instance_id': server.id,
'next': next,
'ip_id': floating_ip.id}
url = reverse('%s:associate' % NAMESPACE)
next = reverse("horizon:project:instances:index")
res = self.client.post("%s?next=%s" % (url, next), form_data)
res = self.client.post(url, form_data)
self.assertRedirectsNoFollow(res, next)
@test.create_stubs({api.network: ('floating_ip_associate',