Set binding:profile upon port creation

Change-Id: Ic3f4ca737c8a5adad5d9ef050c6d5cf1541e58ee
This commit is contained in:
Glenn Van de Water 2020-09-16 15:14:14 +02:00
parent de8e503274
commit 5d9b1408ab
1 changed files with 2 additions and 0 deletions

View File

@ -558,6 +558,8 @@ class BaseNetworkTest(test.BaseTestCase):
"""Wrapper utility that returns a test port."""
if CONF.network.port_vnic_type and 'binding:vnic_type' not in kwargs:
kwargs['binding:vnic_type'] = CONF.network.port_vnic_type
if CONF.network.port_profile and 'binding:profile' not in kwargs:
kwargs['binding:profile'] = CONF.network.port_profile
body = cls.client.create_port(network_id=network['id'],
**kwargs)
port = body['port']