fix port_profile
port_profile as introduced in patch
https://review.openstack.org/#/c/499575/
currently the capabilities interpreted as string which is no big deal
in OVS currently, but in OpenDaylight it is networking-odl expect
switchdev to be inside list.
[network]
port_profile = capabilities:[switchdev]
result:
{'capabilities':'[switchdev]'}
With patch:
{'capabilities': ['switchdev']}
Change-Id: I77fa6b29d8a185f93209b00092cefe218c8ba7e0
diff --git a/releasenotes/notes/correct-port-profile-config-option-d67f5cb31f1bc34c.yaml b/releasenotes/notes/correct-port-profile-config-option-d67f5cb31f1bc34c.yaml
new file mode 100644
index 0000000..7510d47
--- /dev/null
+++ b/releasenotes/notes/correct-port-profile-config-option-d67f5cb31f1bc34c.yaml
@@ -0,0 +1,17 @@
+---
+fixes:
+ - |
+ Patch https://review.openstack.org/#/c/499575/ introduced
+ support creating Neutron port with certain capabilities.
+ Currently capabilities list interpreted as string this change
+ fix it.
+
+ tempest.conf
+ [network]
+ port_profile = capabilities:[switchdev]
+
+ result:
+ {'capabilities':'[switchdev]'}
+
+ expected:
+ {'capabilities': ['switchdev']}
diff --git a/tempest/config.py b/tempest/config.py
index f490e03..2291112 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -20,6 +20,7 @@
from oslo_concurrency import lockutils
from oslo_config import cfg
+from oslo_config import types
from oslo_log import log as logging
from tempest.lib import exceptions
@@ -595,6 +596,7 @@
network_group = cfg.OptGroup(name='network',
title='Network Service Options')
+ProfileType = types.Dict(types.List(types.String(), bounds=True))
NetworkGroup = [
cfg.StrOpt('catalog_type',
default='network',
@@ -658,10 +660,11 @@
" 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.Opt('port_profile',
+ type=ProfileType,
+ 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"