commit 396a7c32489e04c27fe9b7b61af70c195aae1195 Author: Emilien Macchi Date: Thu Jul 23 09:29:51 2020 -0400 Supports 'virtio-forwarder' vnic type for port Supports the 'virtio-forwarder' vnic type for port sync with Neutron. The 'virtio-forwarder' is an indirect mode for SR-IOV interfaces used to connect the instances into the Neutron networks. It has been supported since the Queens release: I28315fb12f62dc7d52d099c211086b2b81eca39a Note that 'virtio-forwarder' is already supported by Horizon: openstack_dashboard/api/neutron.py: ('virtio-forwarder', _('Virtio Forwarder')) Nova: nova/network/model.py: VNIC_TYPE_VIRTIO_FORWARDER = 'virtio-forwarder' openstackclient: openstackclient/network/v2/port.py: choices=(...), virtio-forwarder neutron-lib: neutron_lib/api/definitions/portbindings.py VNIC_VIRTIO_FORWARDER = 'virtio-forwarder' Task: 40435 Change-Id: Ie65f8858d6d1a1854702eb33c40ea827505bfe51 (cherry picked from commit 03ab18d4599183d13dceb6d1130358f717197136) diff --git a/heat/engine/resources/openstack/neutron/port.py b/heat/engine/resources/openstack/neutron/port.py index 0d31560..3977e8f 100644 --- a/heat/engine/resources/openstack/neutron/port.py +++ b/heat/engine/resources/openstack/neutron/port.py @@ -283,7 +283,8 @@ class Port(neutron.NeutronResource): 'the bindings extension.'), constraints=[ constraints.AllowedValues(['normal', 'direct', 'macvtap', - 'direct-physical', 'baremetal']), + 'direct-physical', 'baremetal', + 'virtio-forwarder']), ], support_status=support.SupportStatus(version='2015.1'), update_allowed=True, diff --git a/heat/tests/openstack/neutron/test_neutron_port.py b/heat/tests/openstack/neutron/test_neutron_port.py index c0a4df7..12efe1c 100644 --- a/heat/tests/openstack/neutron/test_neutron_port.py +++ b/heat/tests/openstack/neutron/test_neutron_port.py @@ -978,6 +978,11 @@ class UpdatePortTest(common.HeatTestCase): fixed_ips=None, addr_pair=None, vnic_type='baremetal')), + ('virtio_forwarder_vnic', dict(secgrp=None, + value_specs={}, + fixed_ips=None, + addr_pair=None, + vnic_type='virtio-forwarder')), ('with_all', dict(secgrp=['8a2f582a-e1cd-480f-b85d-b02631c10656'], value_specs={}, fixed_ips=[