Example #1
0
 def get_context_data(self, **kwargs):
     context = super(DetailView, self).get_context_data(**kwargs)
     table = rtbl.RoutersTable(self.request)
     context["url"] = self.failure_url
     router = context["router"]
     # try to lookup the l3 agent location so we know where to troubleshoot
     try:
         agents = api.neutron.list_l3_agent_hosting_router(self.request,
                                                           router.id)
         router.l3_host_agents = agents
     except Exception:
         exceptions.handle(self.request,
                           _('The L3 agent information could not '
                             'be located.'))
     context["actions"] = table.render_row_actions(router)
     return context
Example #2
0
    def get_context_data(self, **kwargs):
        context = super(DetailView, self).get_context_data(**kwargs)
        router = self._get_data()
        table = rtables.RoutersTable(self.request)

        context["router"] = router
        context["url"] = self.failure_url
        context["actions"] = table.render_row_actions(router)
        context['dvr_supported'] = api.neutron.get_feature_permission(
            self.request, "dvr", "get")
        context['ha_supported'] = api.neutron.get_feature_permission(
            self.request, "l3-ha", "get")
        choices = rtables.STATUS_DISPLAY_CHOICES
        router.status_label = filters.get_display_label(choices, router.status)
        choices = rtables.ADMIN_STATE_DISPLAY_CHOICES
        router.admin_state_label = (filters.get_display_label(
            choices, router.admin_state))
        return context
Example #3
0
 def get_context_data(self, **kwargs):
     context = super(DetailView, self).get_context_data(**kwargs)
     table = rtbl.RoutersTable(self.request)
     context["url"] = self.failure_url
     context["actions"] = table.render_row_actions(context["router"])
     return context