allow to config port binding:profile
When using OVS HW offload feature we need to create neutron port with --binding-profile '{"capabilities": ["switchdev"]}' [1] To allow this feature to be tested with Mellanox CI we need a way to configure the port binding:profile in tempest [1] - https://review.openstack.org/#/c/504911/ Change-Id: I9b562aaabf960d38f623d88e8b88619edbb70fe8
This commit is contained in:
parent
1959924254
commit
e2c2fb1e06
@ -0,0 +1,11 @@
|
||||
---
|
||||
prelude: >
|
||||
When using OVS HW offload feature we need to create
|
||||
Neutron port with a certain capability. This is done
|
||||
by creating Neutron port with binding profile. To be
|
||||
able to test this we need profile capability support
|
||||
in Tempest as well.
|
||||
features:
|
||||
- A new config option 'port_profile' is added to the section
|
||||
'network' to specify capabilities of the port.
|
||||
By default this is set to {}.
|
@ -609,10 +609,14 @@ NetworkGroup = [
|
||||
" for subnet creation"),
|
||||
cfg.StrOpt('port_vnic_type',
|
||||
choices=[None, 'normal', 'direct', 'macvtap'],
|
||||
help="vnic_type to use when Launching instances"
|
||||
help="vnic_type to use when launching instances"
|
||||
" with pre-configured ports."
|
||||
" Supported ports are:"
|
||||
" ['normal','direct','macvtap']"),
|
||||
cfg.DictOpt('port_profile',
|
||||
default={},
|
||||
help="port profile to use when launching instances"
|
||||
" with pre-configured ports."),
|
||||
cfg.ListOpt('default_network',
|
||||
default=["1.0.0.0/16", "2.0.0.0/16"],
|
||||
help="List of ip pools"
|
||||
|
@ -139,13 +139,15 @@ class ScenarioTest(tempest.test.BaseTestCase):
|
||||
name = data_utils.rand_name(self.__class__.__name__ + "-server")
|
||||
|
||||
vnic_type = CONF.network.port_vnic_type
|
||||
profile = CONF.network.port_profile
|
||||
|
||||
# If vnic_type is configured create port for
|
||||
# every network
|
||||
if vnic_type:
|
||||
ports = []
|
||||
|
||||
create_port_body = {'binding:vnic_type': vnic_type}
|
||||
create_port_body = {'binding:vnic_type': vnic_type,
|
||||
'binding:profile': profile}
|
||||
if kwargs:
|
||||
# Convert security group names to security group ids
|
||||
# to pass to create_port
|
||||
|
Loading…
Reference in New Issue
Block a user