فهرست منبع

basic apps structure to first vycenter modules

Roberto Berto 5 سال پیش
والد
کامیت
4a14f6cfdf
100فایلهای تغییر یافته به همراه651 افزوده شده و 12 حذف شده
  1. 0 0
      vycenter/arp/__init__.py
  2. 3 0
      vycenter/arp/admin.py
  3. 5 0
      vycenter/arp/apps.py
  4. 0 0
      vycenter/arp/migrations/__init__.py
  5. 3 0
      vycenter/arp/models.py
  6. 12 0
      vycenter/arp/templates/arp/list.html
  7. 3 0
      vycenter/arp/tests.py
  8. 12 0
      vycenter/arp/urls.py
  9. 21 0
      vycenter/arp/views.py
  10. 0 0
      vycenter/bgp/__init__.py
  11. 3 0
      vycenter/bgp/admin.py
  12. 5 0
      vycenter/bgp/apps.py
  13. 0 0
      vycenter/bgp/migrations/__init__.py
  14. 3 0
      vycenter/bgp/models.py
  15. 12 0
      vycenter/bgp/templates/bgp/list.html
  16. 3 0
      vycenter/bgp/tests.py
  17. 12 0
      vycenter/bgp/urls.py
  18. 21 0
      vycenter/bgp/views.py
  19. 0 0
      vycenter/dhcp/__init__.py
  20. 3 0
      vycenter/dhcp/admin.py
  21. 5 0
      vycenter/dhcp/apps.py
  22. 0 0
      vycenter/dhcp/migrations/__init__.py
  23. 3 0
      vycenter/dhcp/models.py
  24. 12 0
      vycenter/dhcp/templates/dhcp/list.html
  25. 3 0
      vycenter/dhcp/tests.py
  26. 12 0
      vycenter/dhcp/urls.py
  27. 21 0
      vycenter/dhcp/views.py
  28. 0 0
      vycenter/ipsec/__init__.py
  29. 3 0
      vycenter/ipsec/admin.py
  30. 5 0
      vycenter/ipsec/apps.py
  31. 0 0
      vycenter/ipsec/migrations/__init__.py
  32. 3 0
      vycenter/ipsec/models.py
  33. 12 0
      vycenter/ipsec/templates/ipsec/list.html
  34. 3 0
      vycenter/ipsec/tests.py
  35. 12 0
      vycenter/ipsec/urls.py
  36. 21 0
      vycenter/ipsec/views.py
  37. 0 0
      vycenter/nat/__init__.py
  38. 3 0
      vycenter/nat/admin.py
  39. 5 0
      vycenter/nat/apps.py
  40. 0 0
      vycenter/nat/migrations/__init__.py
  41. 3 0
      vycenter/nat/models.py
  42. 12 0
      vycenter/nat/templates/nat/list.html
  43. 3 0
      vycenter/nat/tests.py
  44. 12 0
      vycenter/nat/urls.py
  45. 21 0
      vycenter/nat/views.py
  46. 0 0
      vycenter/openvpn/__init__.py
  47. 3 0
      vycenter/openvpn/admin.py
  48. 5 0
      vycenter/openvpn/apps.py
  49. 0 0
      vycenter/openvpn/migrations/__init__.py
  50. 3 0
      vycenter/openvpn/models.py
  51. 12 0
      vycenter/openvpn/templates/openvpn/list.html
  52. 3 0
      vycenter/openvpn/tests.py
  53. 12 0
      vycenter/openvpn/urls.py
  54. 21 0
      vycenter/openvpn/views.py
  55. 0 0
      vycenter/ospf/__init__.py
  56. 3 0
      vycenter/ospf/admin.py
  57. 5 0
      vycenter/ospf/apps.py
  58. 0 0
      vycenter/ospf/migrations/__init__.py
  59. 3 0
      vycenter/ospf/models.py
  60. 12 0
      vycenter/ospf/templates/ospf/list.html
  61. 3 0
      vycenter/ospf/tests.py
  62. 12 0
      vycenter/ospf/urls.py
  63. 21 0
      vycenter/ospf/views.py
  64. 0 0
      vycenter/qos/__init__.py
  65. 3 0
      vycenter/qos/admin.py
  66. 5 0
      vycenter/qos/apps.py
  67. 0 0
      vycenter/qos/migrations/__init__.py
  68. 3 0
      vycenter/qos/models.py
  69. 12 0
      vycenter/qos/templates/qos/list.html
  70. 3 0
      vycenter/qos/tests.py
  71. 12 0
      vycenter/qos/urls.py
  72. 21 0
      vycenter/qos/views.py
  73. 0 0
      vycenter/ssh/__init__.py
  74. 3 0
      vycenter/ssh/admin.py
  75. 5 0
      vycenter/ssh/apps.py
  76. 0 0
      vycenter/ssh/migrations/__init__.py
  77. 3 0
      vycenter/ssh/models.py
  78. 12 0
      vycenter/ssh/templates/ssh/list.html
  79. 3 0
      vycenter/ssh/tests.py
  80. 12 0
      vycenter/ssh/urls.py
  81. 21 0
      vycenter/ssh/views.py
  82. 0 0
      vycenter/static/__init__.py
  83. 3 0
      vycenter/static/admin.py
  84. 5 0
      vycenter/static/apps.py
  85. 0 0
      vycenter/static/migrations/__init__.py
  86. 3 0
      vycenter/static/models.py
  87. 12 0
      vycenter/static/templates/static/list.html
  88. 3 0
      vycenter/static/tests.py
  89. 12 0
      vycenter/static/urls.py
  90. 21 0
      vycenter/static/views.py
  91. 12 1
      vycenter/vycenter/settings.py
  92. 12 11
      vycenter/vycenter/templates/base.html
  93. 11 0
      vycenter/vycenter/urls.py
  94. 0 0
      vycenter/wanlb/__init__.py
  95. 3 0
      vycenter/wanlb/admin.py
  96. 5 0
      vycenter/wanlb/apps.py
  97. 0 0
      vycenter/wanlb/migrations/__init__.py
  98. 3 0
      vycenter/wanlb/models.py
  99. 12 0
      vycenter/wanlb/templates/wanlb/list.html
  100. 3 0
      vycenter/wanlb/tests.py

+ 0 - 0
vycenter/arp/__init__.py


+ 3 - 0
vycenter/arp/admin.py

@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.

+ 5 - 0
vycenter/arp/apps.py

@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class ArpConfig(AppConfig):
+    name = 'arp'

+ 0 - 0
vycenter/arp/migrations/__init__.py


+ 3 - 0
vycenter/arp/models.py

@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.

+ 12 - 0
vycenter/arp/templates/arp/list.html

@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block header_title %}Option{% endblock %}
+{% block section_title %}Option{% endblock %}
+
+{% block debug %}
+{% endblock %}
+
+{% block content %}
+content
+{% endblock %}
+

+ 3 - 0
vycenter/arp/tests.py

@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.

+ 12 - 0
vycenter/arp/urls.py

@@ -0,0 +1,12 @@
+from django.urls import path
+
+from . import views
+
+app_name = 'arp'
+
+
+urlpatterns = [
+    path('', views.index, name='arp-list'),
+]
+
+

+ 21 - 0
vycenter/arp/views.py

@@ -0,0 +1,21 @@
+from django.shortcuts import render
+from django.http import HttpResponse
+from django.template import loader
+from django.shortcuts import redirect
+
+
+import vyos
+
+
+
+def index(request):
+    all_instances = vyos.instance_getall()
+    hostname_default = vyos.get_hostname_prefered(request)
+
+    template = loader.get_template('arp/list.html')
+    context = { 
+        'instances': all_instances,
+        'hostname_default': hostname_default,
+    }   
+    return HttpResponse(template.render(context, request))
+

+ 0 - 0
vycenter/bgp/__init__.py


+ 3 - 0
vycenter/bgp/admin.py

@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.

+ 5 - 0
vycenter/bgp/apps.py

@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class BgpConfig(AppConfig):
+    name = 'bgp'

+ 0 - 0
vycenter/bgp/migrations/__init__.py


+ 3 - 0
vycenter/bgp/models.py

@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.

+ 12 - 0
vycenter/bgp/templates/bgp/list.html

@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block header_title %}Option{% endblock %}
+{% block section_title %}Option{% endblock %}
+
+{% block debug %}
+{% endblock %}
+
+{% block content %}
+content
+{% endblock %}
+

+ 3 - 0
vycenter/bgp/tests.py

@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.

+ 12 - 0
vycenter/bgp/urls.py

@@ -0,0 +1,12 @@
+from django.urls import path
+
+from . import views
+
+app_name = 'bgp'
+
+
+urlpatterns = [
+    path('', views.index, name='bgp-list'),
+]
+
+

+ 21 - 0
vycenter/bgp/views.py

@@ -0,0 +1,21 @@
+from django.shortcuts import render
+from django.http import HttpResponse
+from django.template import loader
+from django.shortcuts import redirect
+
+
+import vyos
+
+
+
+def index(request):
+    all_instances = vyos.instance_getall()
+    hostname_default = vyos.get_hostname_prefered(request)
+
+    template = loader.get_template('bgp/list.html')
+    context = { 
+        'instances': all_instances,
+        'hostname_default': hostname_default,
+    }   
+    return HttpResponse(template.render(context, request))
+

+ 0 - 0
vycenter/dhcp/__init__.py


+ 3 - 0
vycenter/dhcp/admin.py

@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.

+ 5 - 0
vycenter/dhcp/apps.py

@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class DhcpConfig(AppConfig):
+    name = 'dhcp'

+ 0 - 0
vycenter/dhcp/migrations/__init__.py


+ 3 - 0
vycenter/dhcp/models.py

@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.

+ 12 - 0
vycenter/dhcp/templates/dhcp/list.html

@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block header_title %}Option{% endblock %}
+{% block section_title %}Option{% endblock %}
+
+{% block debug %}
+{% endblock %}
+
+{% block content %}
+content
+{% endblock %}
+

+ 3 - 0
vycenter/dhcp/tests.py

@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.

+ 12 - 0
vycenter/dhcp/urls.py

@@ -0,0 +1,12 @@
+from django.urls import path
+
+from . import views
+
+app_name = 'dhcp'
+
+
+urlpatterns = [
+    path('', views.index, name='dhcp-list'),
+]
+
+

+ 21 - 0
vycenter/dhcp/views.py

@@ -0,0 +1,21 @@
+from django.shortcuts import render
+from django.http import HttpResponse
+from django.template import loader
+from django.shortcuts import redirect
+
+
+import vyos
+
+
+
+def index(request):
+    all_instances = vyos.instance_getall()
+    hostname_default = vyos.get_hostname_prefered(request)
+
+    template = loader.get_template('dhcp/list.html')
+    context = { 
+        'instances': all_instances,
+        'hostname_default': hostname_default,
+    }   
+    return HttpResponse(template.render(context, request))
+

+ 0 - 0
vycenter/ipsec/__init__.py


+ 3 - 0
vycenter/ipsec/admin.py

@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.

+ 5 - 0
vycenter/ipsec/apps.py

@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class IpsecConfig(AppConfig):
+    name = 'ipsec'

+ 0 - 0
vycenter/ipsec/migrations/__init__.py


+ 3 - 0
vycenter/ipsec/models.py

@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.

+ 12 - 0
vycenter/ipsec/templates/ipsec/list.html

@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block header_title %}Option{% endblock %}
+{% block section_title %}Option{% endblock %}
+
+{% block debug %}
+{% endblock %}
+
+{% block content %}
+content
+{% endblock %}
+

+ 3 - 0
vycenter/ipsec/tests.py

@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.

+ 12 - 0
vycenter/ipsec/urls.py

@@ -0,0 +1,12 @@
+from django.urls import path
+
+from . import views
+
+app_name = 'ipsec'
+
+
+urlpatterns = [
+    path('', views.index, name='ipsec-list'),
+]
+
+

+ 21 - 0
vycenter/ipsec/views.py

@@ -0,0 +1,21 @@
+from django.shortcuts import render
+from django.http import HttpResponse
+from django.template import loader
+from django.shortcuts import redirect
+
+
+import vyos
+
+
+
+def index(request):
+    all_instances = vyos.instance_getall()
+    hostname_default = vyos.get_hostname_prefered(request)
+
+    template = loader.get_template('ipsec/list.html')
+    context = { 
+        'instances': all_instances,
+        'hostname_default': hostname_default,
+    }   
+    return HttpResponse(template.render(context, request))
+

+ 0 - 0
vycenter/nat/__init__.py


+ 3 - 0
vycenter/nat/admin.py

@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.

+ 5 - 0
vycenter/nat/apps.py

@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class NatConfig(AppConfig):
+    name = 'nat'

+ 0 - 0
vycenter/nat/migrations/__init__.py


+ 3 - 0
vycenter/nat/models.py

@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.

+ 12 - 0
vycenter/nat/templates/nat/list.html

@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block header_title %}Option{% endblock %}
+{% block section_title %}Option{% endblock %}
+
+{% block debug %}
+{% endblock %}
+
+{% block content %}
+content
+{% endblock %}
+

+ 3 - 0
vycenter/nat/tests.py

@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.

+ 12 - 0
vycenter/nat/urls.py

@@ -0,0 +1,12 @@
+from django.urls import path
+
+from . import views
+
+app_name = 'nat'
+
+
+urlpatterns = [
+    path('', views.index, name='nat-list'),
+]
+
+

+ 21 - 0
vycenter/nat/views.py

@@ -0,0 +1,21 @@
+from django.shortcuts import render
+from django.http import HttpResponse
+from django.template import loader
+from django.shortcuts import redirect
+
+
+import vyos
+
+
+
+def index(request):
+    all_instances = vyos.instance_getall()
+    hostname_default = vyos.get_hostname_prefered(request)
+
+    template = loader.get_template('nat/list.html')
+    context = { 
+        'instances': all_instances,
+        'hostname_default': hostname_default,
+    }   
+    return HttpResponse(template.render(context, request))
+

+ 0 - 0
vycenter/openvpn/__init__.py


+ 3 - 0
vycenter/openvpn/admin.py

@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.

+ 5 - 0
vycenter/openvpn/apps.py

@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class OpenvpnConfig(AppConfig):
+    name = 'openvpn'

+ 0 - 0
vycenter/openvpn/migrations/__init__.py


+ 3 - 0
vycenter/openvpn/models.py

@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.

+ 12 - 0
vycenter/openvpn/templates/openvpn/list.html

@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block header_title %}Option{% endblock %}
+{% block section_title %}Option{% endblock %}
+
+{% block debug %}
+{% endblock %}
+
+{% block content %}
+content
+{% endblock %}
+

+ 3 - 0
vycenter/openvpn/tests.py

@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.

+ 12 - 0
vycenter/openvpn/urls.py

@@ -0,0 +1,12 @@
+from django.urls import path
+
+from . import views
+
+app_name = 'openvpn'
+
+
+urlpatterns = [
+    path('', views.index, name='openvpn-list'),
+]
+
+

+ 21 - 0
vycenter/openvpn/views.py

@@ -0,0 +1,21 @@
+from django.shortcuts import render
+from django.http import HttpResponse
+from django.template import loader
+from django.shortcuts import redirect
+
+
+import vyos
+
+
+
+def index(request):
+    all_instances = vyos.instance_getall()
+    hostname_default = vyos.get_hostname_prefered(request)
+
+    template = loader.get_template('openvpn/list.html')
+    context = { 
+        'instances': all_instances,
+        'hostname_default': hostname_default,
+    }   
+    return HttpResponse(template.render(context, request))
+

+ 0 - 0
vycenter/ospf/__init__.py


+ 3 - 0
vycenter/ospf/admin.py

@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.

+ 5 - 0
vycenter/ospf/apps.py

@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class OspfConfig(AppConfig):
+    name = 'ospf'

+ 0 - 0
vycenter/ospf/migrations/__init__.py


+ 3 - 0
vycenter/ospf/models.py

@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.

+ 12 - 0
vycenter/ospf/templates/ospf/list.html

@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block header_title %}Option{% endblock %}
+{% block section_title %}Option{% endblock %}
+
+{% block debug %}
+{% endblock %}
+
+{% block content %}
+content
+{% endblock %}
+

+ 3 - 0
vycenter/ospf/tests.py

@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.

+ 12 - 0
vycenter/ospf/urls.py

@@ -0,0 +1,12 @@
+from django.urls import path
+
+from . import views
+
+app_name = 'ospf'
+
+
+urlpatterns = [
+    path('', views.index, name='ospf-list'),
+]
+
+

+ 21 - 0
vycenter/ospf/views.py

@@ -0,0 +1,21 @@
+from django.shortcuts import render
+from django.http import HttpResponse
+from django.template import loader
+from django.shortcuts import redirect
+
+
+import vyos
+
+
+
+def index(request):
+    all_instances = vyos.instance_getall()
+    hostname_default = vyos.get_hostname_prefered(request)
+
+    template = loader.get_template('ospf/list.html')
+    context = { 
+        'instances': all_instances,
+        'hostname_default': hostname_default,
+    }   
+    return HttpResponse(template.render(context, request))
+

+ 0 - 0
vycenter/qos/__init__.py


+ 3 - 0
vycenter/qos/admin.py

@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.

+ 5 - 0
vycenter/qos/apps.py

@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class QosConfig(AppConfig):
+    name = 'qos'

+ 0 - 0
vycenter/qos/migrations/__init__.py


+ 3 - 0
vycenter/qos/models.py

@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.

+ 12 - 0
vycenter/qos/templates/qos/list.html

@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block header_title %}Option{% endblock %}
+{% block section_title %}Option{% endblock %}
+
+{% block debug %}
+{% endblock %}
+
+{% block content %}
+content
+{% endblock %}
+

+ 3 - 0
vycenter/qos/tests.py

@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.

+ 12 - 0
vycenter/qos/urls.py

@@ -0,0 +1,12 @@
+from django.urls import path
+
+from . import views
+
+app_name = 'qos'
+
+
+urlpatterns = [
+    path('', views.index, name='qos-list'),
+]
+
+

+ 21 - 0
vycenter/qos/views.py

@@ -0,0 +1,21 @@
+from django.shortcuts import render
+from django.http import HttpResponse
+from django.template import loader
+from django.shortcuts import redirect
+
+
+import vyos
+
+
+
+def index(request):
+    all_instances = vyos.instance_getall()
+    hostname_default = vyos.get_hostname_prefered(request)
+
+    template = loader.get_template('qos/list.html')
+    context = { 
+        'instances': all_instances,
+        'hostname_default': hostname_default,
+    }   
+    return HttpResponse(template.render(context, request))
+

+ 0 - 0
vycenter/ssh/__init__.py


+ 3 - 0
vycenter/ssh/admin.py

@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.

+ 5 - 0
vycenter/ssh/apps.py

@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class SshConfig(AppConfig):
+    name = 'ssh'

+ 0 - 0
vycenter/ssh/migrations/__init__.py


+ 3 - 0
vycenter/ssh/models.py

@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.

+ 12 - 0
vycenter/ssh/templates/ssh/list.html

@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block header_title %}Option{% endblock %}
+{% block section_title %}Option{% endblock %}
+
+{% block debug %}
+{% endblock %}
+
+{% block content %}
+content
+{% endblock %}
+

+ 3 - 0
vycenter/ssh/tests.py

@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.

+ 12 - 0
vycenter/ssh/urls.py

@@ -0,0 +1,12 @@
+from django.urls import path
+
+from . import views
+
+app_name = 'ssh'
+
+
+urlpatterns = [
+    path('', views.index, name='ssh-list'),
+]
+
+

+ 21 - 0
vycenter/ssh/views.py

@@ -0,0 +1,21 @@
+from django.shortcuts import render
+from django.http import HttpResponse
+from django.template import loader
+from django.shortcuts import redirect
+
+
+import vyos
+
+
+
+def index(request):
+    all_instances = vyos.instance_getall()
+    hostname_default = vyos.get_hostname_prefered(request)
+
+    template = loader.get_template('ssh/list.html')
+    context = { 
+        'instances': all_instances,
+        'hostname_default': hostname_default,
+    }   
+    return HttpResponse(template.render(context, request))
+

+ 0 - 0
vycenter/static/__init__.py


+ 3 - 0
vycenter/static/admin.py

@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.

+ 5 - 0
vycenter/static/apps.py

@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class StaticConfig(AppConfig):
+    name = 'static'

+ 0 - 0
vycenter/static/migrations/__init__.py


+ 3 - 0
vycenter/static/models.py

@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.

+ 12 - 0
vycenter/static/templates/static/list.html

@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block header_title %}Option{% endblock %}
+{% block section_title %}Option{% endblock %}
+
+{% block debug %}
+{% endblock %}
+
+{% block content %}
+content
+{% endblock %}
+

+ 3 - 0
vycenter/static/tests.py

@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.

+ 12 - 0
vycenter/static/urls.py

@@ -0,0 +1,12 @@
+from django.urls import path
+
+from . import views
+
+app_name = 'static'
+
+
+urlpatterns = [
+    path('', views.index, name='static-list'),
+]
+
+

+ 21 - 0
vycenter/static/views.py

@@ -0,0 +1,21 @@
+from django.shortcuts import render
+from django.http import HttpResponse
+from django.template import loader
+from django.shortcuts import redirect
+
+
+import vyos
+
+
+
+def index(request):
+    all_instances = vyos.instance_getall()
+    hostname_default = vyos.get_hostname_prefered(request)
+
+    template = loader.get_template('static/list.html')
+    context = { 
+        'instances': all_instances,
+        'hostname_default': hostname_default,
+    }   
+    return HttpResponse(template.render(context, request))
+

+ 12 - 1
vycenter/vycenter/settings.py

@@ -40,6 +40,17 @@ INSTALLED_APPS = [
     'interface.apps.InterfaceConfig',
     'config.apps.ConfigConfig',
     'firewall.apps.FirewallConfig',
+    'static.apps.StaticConfig',
+    'arp.apps.ArpConfig',
+    'bgp.apps.BgpConfig',
+    'dhcp.apps.DhcpConfig',
+    'ipsec.apps.IpsecConfig',
+    'nat.apps.NatConfig',
+    'qos.apps.QosConfig',
+    'openvpn.apps.OpenvpnConfig',
+    'ospf.apps.OspfConfig',
+    'ssh.apps.SshConfig',
+    'wanlb.apps.WanlbConfig',
 ]
 
 MIDDLEWARE = [
@@ -138,4 +149,4 @@ USE_TZ = True
 # Static files (CSS, JavaScript, Images)
 # https://docs.djangoproject.com/en/3.0/howto/static-files/
 
-STATIC_URL = '/static/'
+STATIC_URL = '/s/'

+ 12 - 11
vycenter/vycenter/templates/base.html

@@ -133,19 +133,20 @@
 
     <h2>Manage VyOS</h2>
 
-
-
-
-
     <ol>
-    <li><a href="/interface/">Interfaces</a></li>
+    <li><a href="{% url 'interface:interface-list' %}">Interfaces</a></li>
     <li><a href="{% url 'firewall:firewall-list' %}">Firewall</a></li>
-
-    <li>Static Routing</li>
-    <li>IPSEC</li>
-    <li>BGP</li>
-    <li>OSPF</li>
-    <li>NAT</li>
+    <li><a href="{% url 'static:static-list' %}">Static Routing</a></li>
+    <li><a href="{% url 'ipsec:ipsec-list' %}">IPSEC</a></li>
+    <li><a href="{% url 'bgp:bgp-list' %}">BGP</a></li>
+    <li><a href="{% url 'ospf:ospf-list' %}">OSPF</a></li>
+    <li><a href="{% url 'nat:nat-list' %}">NAT</a></li>
+    <li><a href="{% url 'arp:arp-list' %}">ARP</a></li>
+    <li><a href="{% url 'dhcp:dhcp-list' %}">DHCP</a></li>
+    <li><a href="{% url 'openvpn:openvpn-list' %}">OpenVPN</a></li>
+    <li><a href="{% url 'qos:qos-list' %}">QoS</a></li>
+    <li><a href="{% url 'ssh:ssh-list' %}">SSH</a></li>
+    <li><a href="{% url 'wanlb:wanlb-list' %}">Wan Load Balancing</a></li>
     </ol>
 
    

+ 11 - 0
vycenter/vycenter/urls.py

@@ -27,5 +27,16 @@ urlpatterns = [
     path('config/', include('config.urls')),
     path('dashboard/', include('dashboard.urls')),
     path('firewall/', include('firewall.urls')),
+    path('static/', include('static.urls')),
+    path('arp/', include('arp.urls')),
+    path('bgp/', include('bgp.urls')),
+    path('dhcp/', include('dhcp.urls')),
+    path('ipsec/', include('ipsec.urls')),
+    path('nat/', include('nat.urls')),
+    path('openvpn/', include('openvpn.urls')),
+    path('ospf/', include('ospf.urls')),
+    path('qos/', include('qos.urls')),
+    path('ssh/', include('ssh.urls')),
+    path('wanlb/', include('wanlb.urls')),
     path('', views.vycenter_login, name='vycenter-login'),
 ]

+ 0 - 0
vycenter/wanlb/__init__.py


+ 3 - 0
vycenter/wanlb/admin.py

@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.

+ 5 - 0
vycenter/wanlb/apps.py

@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class WanlbConfig(AppConfig):
+    name = 'wanlb'

+ 0 - 0
vycenter/wanlb/migrations/__init__.py


+ 3 - 0
vycenter/wanlb/models.py

@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.

+ 12 - 0
vycenter/wanlb/templates/wanlb/list.html

@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block header_title %}Option{% endblock %}
+{% block section_title %}Option{% endblock %}
+
+{% block debug %}
+{% endblock %}
+
+{% block content %}
+content
+{% endblock %}
+

+ 3 - 0
vycenter/wanlb/tests.py

@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است