summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmilien Macchi <emilien@redhat.com>2020-07-23 09:29:51 -0400
committerRabi Mishra <ramishra@redhat.com>2020-10-07 15:10:29 +0530
commit8394d6c578d9c300d48ba32f7cb6658a27331270 (patch)
tree22d4a49afc1e8a7cb1e809b9bc9b9eab1c6edb00
parent18ab72f5db6cf1fee2bfea6b00a72ccf987854b7 (diff)
downloadheat-8394d6c578d9c300d48ba32f7cb6658a27331270.tar.gz
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)
-rw-r--r--heat/engine/resources/openstack/neutron/port.py3
-rw-r--r--heat/tests/openstack/neutron/test_neutron_port.py5
2 files changed, 7 insertions, 1 deletions
diff --git a/heat/engine/resources/openstack/neutron/port.py b/heat/engine/resources/openstack/neutron/port.py
index 0d31560e2..3977e8f0f 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 c0a4df73f..12efe1c70 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=[