Merge "Set binding:profile upon port creation"

This commit is contained in:
Zuul 2020-09-28 11:54:06 +00:00 committed by Gerrit Code Review
commit 7d5988b29b
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']