diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/address/tables.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/address/tables.py index 9455cb1f..e34d3386 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/address/tables.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/address/tables.py @@ -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 diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/forms.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/forms.py index a275447d..d0889dec 100644 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/forms.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/forms.py @@ -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: diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/interfaces/address/_create.html b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/interfaces/address/_create.html index fc888714..b0fb68f8 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/interfaces/address/_create.html +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/interfaces/address/_create.html @@ -15,7 +15,7 @@
{% 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." %}
+{% 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." %}