Remove infra network in gui
Replaced references of infra network with cluster-host network in the interface edit form. Story: 2004273 Task: 30515 Change-Id: I61e1e62d0fcd488a77972f2456609d53753bda3c Signed-off-by: Teresa Ho <teresa.ho@windriver.com>
This commit is contained in:
parent
621eb23f7c
commit
02e26ed8c1
@ -1,4 +1,4 @@
|
||||
# Copyright 2015-2018 Wind River Systems, Inc
|
||||
# Copyright 2015-2019 Wind River Systems, Inc
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
@ -25,8 +25,6 @@ from starlingx_dashboard import api as stx_api
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
ALLOWED_INTERFACE_TYPES = ['infra', 'data']
|
||||
|
||||
|
||||
class DeleteAddress(tables.DeleteAction):
|
||||
@staticmethod
|
||||
@ -75,13 +73,7 @@ class CreateAddress(tables.LinkAction):
|
||||
if not interface:
|
||||
return False
|
||||
|
||||
if interface.ifclass == 'platform':
|
||||
interface_networks = stx_api.sysinv.\
|
||||
interface_network_list_by_interface(request, interface.uuid)
|
||||
for interface_network in interface_networks:
|
||||
if interface_network.network_type in ALLOWED_INTERFACE_TYPES:
|
||||
return True
|
||||
elif interface.ifclass == 'data':
|
||||
if interface.ifclass == 'data':
|
||||
return True
|
||||
if getattr(interface, 'ipv4_mode', '') == 'static':
|
||||
return True
|
||||
|
@ -49,7 +49,7 @@ def _get_ipv6_pool_choices(pools):
|
||||
def _get_network_choices(networks):
|
||||
PLATFORM_NETWORK_TYPES = ['pxeboot',
|
||||
'mgmt',
|
||||
'infra',
|
||||
'cluster-host',
|
||||
'oam']
|
||||
choices = []
|
||||
for n in networks:
|
||||
@ -554,7 +554,7 @@ class AddInterface(forms.SelfHandlingForm):
|
||||
network_types.append(network.type)
|
||||
data['networks'] = network_ids
|
||||
|
||||
if any(network_type in ['mgmt', 'infra', 'oam']
|
||||
if any(network_type in ['mgmt', 'cluster-host', 'oam']
|
||||
for network_type in network_types):
|
||||
del data['imtu']
|
||||
else:
|
||||
|
@ -15,7 +15,7 @@
|
||||
</div>
|
||||
<div class="right">
|
||||
<h3>{% trans "Description" %}:</h3>
|
||||
<p>{% trans "You can create an IP address for a data or infrastructure interface. The address must not overlap with any other address on this same host that are part of the same IP subnet." %}</p>
|
||||
<p>{% trans "You can create an IP address for a data interface. The address must not overlap with any other address on this same host that are part of the same IP subnet." %}</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user