From 17b2c25d50d977ac07c98bc4907ea09b1dec66c7 Mon Sep 17 00:00:00 2001 From: "wei.ying" Date: Thu, 1 Feb 2018 23:37:26 +0800 Subject: [PATCH] Missing VNIC type parameter when using it to create a port In the project creation port page, regardless of the choice of VNIC Type, the created port VNIC Type is displayed as Normal, since the creation port does not specify the 'binding__vnic_type' parameter. Change-Id: I29700b29e163363dbd7c85a2d5c68c8a6b635ee6 Closes-Bug:#1746977 --- openstack_dashboard/dashboards/project/networks/ports/forms.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openstack_dashboard/dashboards/project/networks/ports/forms.py b/openstack_dashboard/dashboards/project/networks/ports/forms.py index 5e5d60b56f..e253e107cf 100644 --- a/openstack_dashboard/dashboards/project/networks/ports/forms.py +++ b/openstack_dashboard/dashboards/project/networks/ports/forms.py @@ -187,6 +187,8 @@ class CreatePort(forms.SelfHandlingForm): if data.get('fixed_ip'): params['fixed_ips'] = [{"ip_address": data['fixed_ip']}] + if data.get('binding__vnic_type'): + params['binding__vnic_type'] = data['binding__vnic_type'] if data.get('mac_state'): params['mac_learning_enabled'] = data['mac_state'] if 'port_security_enabled' in data: