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
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
types will be available to choose from.
a port. VNIC types include normal, direct, direct-physical, macvtap and
baremetal. By default all VNIC types will be available to choose from.
Example ``['normal', 'direct']``

View File

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

View File

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

View File

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

View File

@ -321,7 +321,8 @@ OPENSTACK_NEUTRON_NETWORK = {
# 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
# 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.
'supported_vnic_types': ['*'],