blob: 098b1ab9ffd73d3ca303c5d088ec52b917beff73 [file] [log] [blame]
Andrea Campanella420e4b42017-09-01 16:51:03 +02001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
17# admin.py - vNaaSworkService Django Admin
18
19from core.admin import ReadOnlyAwareAdmin
20from core.admin import XOSBaseAdmin
21from django.contrib import admin
22from django import forms
23
24
25class XOSvNaaSBandwithProfileAdmin(XOSBaseAdmin):
26 verbose_name = "Bandwidth Profile"
27 list_display = ('cbs','ebs','cir','eir','name')
28
29 fields = ('cbs', 'ebs', 'cir', 'eir', 'name')
30
31class XOSvNaaSUNIAdmin(XOSBaseAdmin):
32 verbose_name = "User Network Interface"
33 list_display = ('tenant', 'vlanIds', 'cpe_id', 'latlng', 'name')
34 fields = ('tenant','vlanIds', 'cpe_id', 'latlng', 'name')
35
36class XOSvNaaSEnterpriseLocationAdmin(XOSBaseAdmin):
37 verbose_name = "Enterprise Location"
38 list_display = ('name', 'cord_site_ip', 'cord_site_port', 'cord_site_username', 'cord_site_password', 'cord_site_type')
39 fields = ('name', 'cord_site_ip', 'cord_site_port', 'cord_site_username', 'cord_site_password', 'cord_site_type')
40
41class XOSvNaaSOnosModelAdmin(XOSBaseAdmin):
42 verbose_name = "Open Network Operating System"
43 list_display = ('name', 'onos_ip', 'onos_port', 'onos_username', 'onos_password', 'onos_type')
44 fields = ('name', 'onos_ip', 'onos_port', 'onos_username', 'onos_password', 'onos_type')
45
46class XOSvNaaSELineAdmin(XOSBaseAdmin):
47 verbose_name = "Ethernet Virtual Private Line"
48 list_display = ('name', 'connect_point_1_id', 'connect_point_2_id', 'vlanids', 'cord_site_name', 'bwp')
49 fields = ('name', 'connect_point_1_id', 'connect_point_2_id', 'vlanids', 'cord_site_name', 'bwp')
50
51admin.site.register(XOSvNaaSBandwithProfile, XOSvNaaSBandwithProfileAdmin)
52admin.site.register(XOSvNaaSUNI, XOSvNaaSUNIAdmin)
53admin.site.register(XOSvNaaSEnterpriseLocation, XOSvNaaSEnterpriseLocationAdmin)
54admin.site.register(XOSvNaaSOnosModel, XOSvNaaSOnosModelAdmin)
55admin.site.register(XOSvNaaSELine, XOSvNaaSELineAdmin)