yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #87028
[Bug 1940074] Re: Neutron port bulk creation procedure ignores binding:vnic_type parameter
Reviewed: https://review.opendev.org/c/openstack/neutron/+/804746
Committed: https://opendev.org/openstack/neutron/commit/3640ffa0c6968a2f802a9809e4f318fb229dad7d
Submitter: "Zuul (22348)"
Branch: master
commit 3640ffa0c6968a2f802a9809e4f318fb229dad7d
Author: Oleg Bondarev <oleg.bondarev@xxxxxxxxxx>
Date: Thu Aug 19 21:56:47 2021 +0800
Handle all portbinding attrs in case of bulk port creation
Bulk port creation should honor binding:vnic_type
and binding:profile attributes from request.
Closes-Bug: #1940074
Change-Id: I99d27d568f66c6330f6373843d096c6ee1b4ec54
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1940074
Title:
Neutron port bulk creation procedure ignores binding:vnic_type
parameter
Status in neutron:
Fix Released
Bug description:
Bulk port creation does not honor binding:vnic_type field. It implicitly uses
binding:vnic_type: normal
Example of bulk creation API call:
curl -v --location --request POST 'https://<neutron_url>/v2.0/ports' --header 'Content-Type: application/json' --header 'X-Auth-Token: <redacted>' --data-raw '{
"ports" : [ {
"name" : "port1",
"admin_state_up" : true,
"network_id" : "c2a3464a-dbea-40c9-b421-9313e33992be",
"binding:vnic_type" : "direct"
}, {
"name" : "port2",
"admin_state_up" : true,
"network_id" : "27dd162f-e8ac-4b21-84f4-e4dff6836fa0",
"binding:vnic_type" : "macvtap"
}]
}'
At the same time vnic_type is honored in 'single port' mode of this API, f.e. with payload like
"port" : {
"name" : "port_single",
"admin_state_up" : true,
"network_id" : "c2a3464a-dbea-40c9-b421-9313e33992be",
"binding:vnic_type" : "direct"
}
}'
Seems that binding:vnic_type from port parameters is not passed thru inside create_port_bulk() function. I've found a workaround. The following line should be added after
https://review.opendev.org/plugins/gitiles/openstack/neutron/+/refs/heads/master/neutron/plugins/ml2/plugin.py#1594:
port_dict[portbindings.VNIC_TYPE] = pdata.get(
portbindings.VNIC_TYPE)
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1940074/+subscriptions
References