Commit a884e528 by Szabolcs Gelencser

Add initial template list

parent 8f13987f
...@@ -236,13 +236,13 @@ class VlanGroupTable(Table): ...@@ -236,13 +236,13 @@ class VlanGroupTable(Table):
class VxlanTable(Table): class VxlanTable(Table):
name = LinkColumn('network.vxlan', args=[A('vni')]) name = LinkColumn('network.vxlan', args=[A('id')])
class Meta: class Meta:
model = Vxlan model = Vxlan
attrs = {'class': 'table table-striped table-condensed'} attrs = {'class': 'table table-striped table-condensed'}
fields = ('vni', 'name', ) fields = ('name', )
order_by = 'vni' order_by = 'name'
class HostRecordsTable(Table): class HostRecordsTable(Table):
......
...@@ -969,7 +969,7 @@ class VlanGroupDelete(LoginRequiredMixin, SuperuserRequiredMixin, DeleteView): ...@@ -969,7 +969,7 @@ class VlanGroupDelete(LoginRequiredMixin, SuperuserRequiredMixin, DeleteView):
class VxlanList(LoginRequiredMixin, SingleTableView): class VxlanList(LoginRequiredMixin, SingleTableView):
model = Vxlan model = Network
table_class = VxlanTable table_class = VxlanTable
table_pagination = False table_pagination = False
...@@ -980,7 +980,7 @@ class VxlanList(LoginRequiredMixin, SingleTableView): ...@@ -980,7 +980,7 @@ class VxlanList(LoginRequiredMixin, SingleTableView):
return ["network/vxlan-list.html"] return ["network/vxlan-list.html"]
def get_queryset(self): def get_queryset(self):
return Vxlan.get_objects_with_level('user', self.request.user) return openstack_api.neutron.network_list(self.request)
def get(self, *args, **kwargs): def get(self, *args, **kwargs):
if self.request.is_ajax(): if self.request.is_ajax():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment