allow create_server with vnic_type and port_profile from kwargs
the purpose of this change is to enable creating advance network scenarios like checking connectivity from VM with port type "direct" to VM with port type "normal". with this change scenario planer can overwrite tempest.conf vnic_type and port_profile paramters in scenario (ex. connectivty between VM "direct" and VM "normal"). Change-Id: I5b9a4bd5350809d6b295dfede0c5059d01455404
This commit is contained in:
parent
ccdd729aaf
commit
6e30995bc0
|
@ -125,6 +125,27 @@ class ScenarioTest(tempest.test.BaseTestCase):
|
|||
returns a test server. The purpose of this wrapper is to minimize
|
||||
the impact on the code of the tests already using this
|
||||
function.
|
||||
|
||||
:param **kwargs:
|
||||
See extra parameters below
|
||||
|
||||
:Keyword Arguments:
|
||||
* *vnic_type* (``string``) --
|
||||
used when launching instances with pre-configured ports.
|
||||
Examples:
|
||||
normal: a traditional virtual port that is either attached
|
||||
to a linux bridge or an openvswitch bridge on a
|
||||
compute node.
|
||||
direct: an SR-IOV port that is directly attached to a VM
|
||||
macvtap: an SR-IOV port that is attached to a VM via a macvtap
|
||||
device.
|
||||
Defaults to ``CONF.network.port_vnic_type``.
|
||||
* *port_profile* (``dict``) --
|
||||
This attribute is a dictionary that can be used (with admin
|
||||
credentials) to supply information influencing the binding of
|
||||
the port.
|
||||
example: port_profile = "capabilities:[switchdev]"
|
||||
Defaults to ``CONF.network.port_profile``.
|
||||
"""
|
||||
|
||||
# NOTE(jlanoux): As a first step, ssh checks in the scenario
|
||||
|
@ -143,8 +164,8 @@ class ScenarioTest(tempest.test.BaseTestCase):
|
|||
if name is None:
|
||||
name = data_utils.rand_name(self.__class__.__name__ + "-server")
|
||||
|
||||
vnic_type = CONF.network.port_vnic_type
|
||||
profile = CONF.network.port_profile
|
||||
vnic_type = kwargs.pop('vnic_type', CONF.network.port_vnic_type)
|
||||
profile = kwargs.pop('port_profile', CONF.network.port_profile)
|
||||
|
||||
# If vnic_type or profile are configured create port for
|
||||
# every network
|
||||
|
|
Loading…
Reference in New Issue