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
diff --git a/releasenotes/notes/add-port-profile-config-option-2610b2fa67027960.yaml b/releasenotes/notes/add-port-profile-config-option-2610b2fa67027960.yaml
new file mode 100644
index 0000000..b54ee8b
--- /dev/null
+++ b/releasenotes/notes/add-port-profile-config-option-2610b2fa67027960.yaml
@@ -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 {}.
diff --git a/tempest/config.py b/tempest/config.py
index 340a27e..8a6370a 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -609,10 +609,14 @@
                      " 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"
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 06aa531..ef277fb 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -139,13 +139,15 @@
             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