add netplane for kolla deployment
Change-Id: Ice2d658e4a08a512dc19004fa512c48e5abc7fd1 Signed-off-by: Jing Sun <sun.jing22@zte.com.cn>
This commit is contained in:
parent
3dedab8c7e
commit
8369ca2102
|
@ -65,7 +65,9 @@ def set_net_plane(request, cluster_id, nets):
|
|||
"STORAGE": ["cidr", "gateway", "ip_ranges", "vlan_id",
|
||||
"capability", "description"],
|
||||
"HEARTBEAT": ["cidr", "vlan_id", "ip_ranges", "capability",
|
||||
"description"]}
|
||||
"description"],
|
||||
"EXTERNAL": ["cidr", "gateway", "ip_ranges", "vlan_id",
|
||||
"capability", "description"]}
|
||||
for net in nets:
|
||||
net_params = {
|
||||
"name": net["name"],
|
||||
|
@ -81,7 +83,7 @@ def set_net_plane(request, cluster_id, nets):
|
|||
@csrf_exempt
|
||||
def sort_net_planes(net_planes):
|
||||
ret_net_planes = []
|
||||
sort_list = ["MANAGEMENT", "PUBLICAPI", "DATAPLANE",
|
||||
sort_list = ["MANAGEMENT", "PUBLICAPI", "DATAPLANE","EXTERNAL",
|
||||
"STORAGE", "VXLAN", "HEARTBEAT"]
|
||||
for sort in sort_list:
|
||||
for net_plane in net_planes:
|
||||
|
@ -101,7 +103,9 @@ def get_default_net_plane():
|
|||
{"network_type": "PUBLICAPI",
|
||||
"net_planes": [{"name": "PUBLICAPI", }]},
|
||||
{"network_type": "STORAGE",
|
||||
"net_planes": [{"name": "STORAGE", }]}, ]
|
||||
"net_planes": [{"name": "STORAGE", }]},
|
||||
{"network_type": "EXTERNAL",
|
||||
"net_planes": [{"name": "EXTERNAL", }]},]
|
||||
for net in networks:
|
||||
for net_plane in net["net_planes"]:
|
||||
net_plane.update({"cidr": "192.168.1.1/24",
|
||||
|
@ -128,7 +132,9 @@ def add_net_plane_for_add_cluster(request, cluster_id, in_net_planes):
|
|||
"STORAGE": ["cidr", "gateway", "ip_ranges",
|
||||
"capability", "vlan_id", "description"],
|
||||
"HEARTBEAT": ["cidr", "vlan_id", "ip_ranges", "capability",
|
||||
"description"]}
|
||||
"description"],
|
||||
"EXTERNAL": ["cidr", "gateway", "ip_ranges", "vlan_id",
|
||||
"capability", "description"]}
|
||||
|
||||
def get_id_by_name(nets, name):
|
||||
for n in nets:
|
||||
|
@ -190,7 +196,7 @@ def delete_net_plane(request, cluster_id):
|
|||
@csrf_exempt
|
||||
def get_net_plane_list(request, cluster_id):
|
||||
ret_net_planes = []
|
||||
filter_net_planes = ["DEPLOYMENT", "EXTERNAL"]
|
||||
filter_net_planes = ["DEPLOYMENT",]
|
||||
try:
|
||||
network_list = api.daisy.network_list(request, cluster_id)
|
||||
show_net_planes = [net.__dict__ for net in network_list
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{% load i18n %}
|
||||
<div>
|
||||
<dl>
|
||||
{% for version in host_current_version %}
|
||||
<dd>{{ version }}</dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
</div>
|
|
@ -183,7 +183,7 @@ class NetworkMappingView(tables.DataTableView):
|
|||
def get_net_plane(self):
|
||||
network_data = []
|
||||
try:
|
||||
filter_net_planes = ["DEPLOYMENT", "EXTERNAL"]
|
||||
filter_net_planes = ["DEPLOYMENT",]
|
||||
network_list = api.daisy.network_list(self.request,
|
||||
self.kwargs["cluster_id"])
|
||||
for network in network_list:
|
||||
|
|
Loading…
Reference in New Issue