Update Network Port VNIC Types

Update the VNIC type list shown by Horizon to match the options
supported by neutronclient.

See neutronclient/tests/unit/test_cli20_port.py

Closes-Bug: 1681917
Change-Id: Ifbe81a3a3b5f2edc9c0b8a0129d780546119a92e
This commit is contained in:
Tyr Johanson 2016-06-02 09:13:13 -06:00 committed by Gary Smith
parent c88d5c1de3
commit eb38ac80f7
5 changed files with 17 additions and 8 deletions

View File

@ -1365,8 +1365,8 @@ Default ``['*']``
For use with the port binding extension. Use this to explicitly set which VNIC For use with the port binding extension. Use this to explicitly set which VNIC
types are supported; only those listed will be shown when creating or editing types are supported; only those listed will be shown when creating or editing
a port. VNIC types include normal, direct and macvtap. By default all VNIC a port. VNIC types include normal, direct, direct-physical, macvtap and
types will be available to choose from. baremetal. By default all VNIC types will be available to choose from.
Example ``['normal', 'direct']`` Example ``['normal', 'direct']``

View File

@ -28,8 +28,11 @@ from openstack_dashboard.dashboards.project.networks.ports \
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
VNIC_TYPES = [('normal', _('Normal')), ('direct', _('Direct')), VNIC_TYPES = [('normal', _('Normal')),
('macvtap', _('MacVTap'))] ('direct', _('Direct')),
('direct-physical', _('Direct Physical')),
('macvtap', _('MacVTap')),
('baremetal', _('Bare Metal'))]
class CreatePort(project_forms.CreatePort): class CreatePort(project_forms.CreatePort):

View File

@ -26,8 +26,11 @@ from openstack_dashboard import api
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
VNIC_TYPES = [('normal', _('Normal')), ('direct', _('Direct')), VNIC_TYPES = [('normal', _('Normal')),
('macvtap', _('MacVTap'))] ('direct', _('Direct')),
('direct-physical', _('Direct Physical')),
('macvtap', _('MacVTap')),
('baremetal', _('Bare Metal'))]
class CreatePort(forms.SelfHandlingForm): class CreatePort(forms.SelfHandlingForm):

View File

@ -47,7 +47,9 @@
ctrl.vnicTypes = { ctrl.vnicTypes = {
'normal': gettext('Normal'), 'normal': gettext('Normal'),
'direct': gettext('Direct'), 'direct': gettext('Direct'),
'macvtap': gettext('MacVTap') 'direct-physical': gettext('Direct Physical'),
'macvtap': gettext('MacVTap'),
'baremetal': gettext('Bare Metal')
}; };
ctrl.tableDataMulti = { ctrl.tableDataMulti = {

View File

@ -321,7 +321,8 @@ OPENSTACK_NEUTRON_NETWORK = {
# Set which VNIC types are supported for port binding. Only the VNIC # Set which VNIC types are supported for port binding. Only the VNIC
# types in this list will be available to choose from when creating a # types in this list will be available to choose from when creating a
# port. # port.
# VNIC types include 'normal', 'macvtap' and 'direct'. # VNIC types include 'normal', 'direct', 'direct-physical', 'macvtap' and
# 'baremetal'
# Set to empty list or None to disable VNIC type selection. # Set to empty list or None to disable VNIC type selection.
'supported_vnic_types': ['*'], 'supported_vnic_types': ['*'],