neutron port create for binding:profile etc. fails

Bug #1590971 reported by Hampapur Ajay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Fix Committed
High
Hampapur Ajay
Trunk
Fix Committed
High
Hampapur Ajay

Bug Description

With validation checks introduced in
https://github.com/Juniper/contrail-controller/commit/1d796c9156bf5cf52ba9353173dd4ad0b65cd115

neutron port-create with binding:profile no longer works. Previously created ports with binding:profile key is not impacted.

root@hajay-portbindings:/usr/lib/python2.7/dist-packages/vnc_api/gen# neutron port-create n1 --binding:profile type=dict foo=bar,foo2=bar2
400-{u'NeutronError': {u'message': u"Bad virtual_machine_interface request: HTTP Status: 400 Content: Bad property in create: Error validating property virtual_machine_interface_bindings value {'key_value_pair': [{'value': {'foo': 'bar', 'foo2': 'bar2'}, 'key': 'profile'}, {'value': 'normal', 'key': 'vnic_type'}]} value: string value expected instead of {'foo': 'bar', 'foo2': 'bar2'}", u'type': u'BadRequest', u'detail': u''}}

Tags: config neutron
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/21068
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/21069
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/21068
Committed: http://github.org/Juniper/contrail-controller/commit/e990e6c0f7a5190ecbb87b414f84f7e6d7b2ff03
Submitter: Zuul
Branch: master

commit e990e6c0f7a5190ecbb87b414f84f7e6d7b2ff03
Author: Hampapur Ajay <email address hidden>
Date: Thu Jun 9 16:35:31 2016 -0700

Persist values of neutron binding: keys provided by user with
json serialization since contrail KeyValuePair expects string/string
for key/value. On readback de-serialize from json.

Change-Id: I87117df1a9342c58cb2357588422523098f6e4f3
Closes-Bug: 1590971

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/21069
Committed: http://github.org/Juniper/contrail-controller/commit/c7508118f44155ed03fa763bb84479e17d900075
Submitter: Zuul
Branch: R3.0

commit c7508118f44155ed03fa763bb84479e17d900075
Author: Hampapur Ajay <email address hidden>
Date: Thu Jun 9 16:35:31 2016 -0700

Persist values of neutron binding: keys provided by user with
json serialization since contrail KeyValuePair expects string/string
for key/value. On readback de-serialize from json.

Change-Id: I87117df1a9342c58cb2357588422523098f6e4f3
Closes-Bug: 1590971
(cherry picked from commit e990e6c0f7a5190ecbb87b414f84f7e6d7b2ff03)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/21128
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/21129
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/21129
Committed: http://github.org/Juniper/contrail-controller/commit/6806c2f27da151c6c461c09afaee71f15d0207f2
Submitter: Zuul
Branch: R3.0

commit 6806c2f27da151c6c461c09afaee71f15d0207f2
Author: Hampapur Ajay <email address hidden>
Date: Mon Jun 13 18:25:46 2016 -0700

Persist only non-string values in bindings with json encoding in contrail.
This way the string checks for vnic_type in backend (vnc_cfg_types.py)
don't have to check for json-encoded values.

Change-Id: I516c890f6540a263b93bc870e42fff1feee09636
Closes-Bug: 1590971
(cherry picked from commit fb277024792087e335767e43729e0f275a31d311)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/21128
Committed: http://github.org/Juniper/contrail-controller/commit/fb277024792087e335767e43729e0f275a31d311
Submitter: Zuul
Branch: master

commit fb277024792087e335767e43729e0f275a31d311
Author: Hampapur Ajay <email address hidden>
Date: Mon Jun 13 18:25:46 2016 -0700

Persist only non-string values in bindings with json encoding in contrail.
This way the string checks for vnic_type in backend (vnc_cfg_types.py)
don't have to check for json-encoded values.

Change-Id: I516c890f6540a263b93bc870e42fff1feee09636
Closes-Bug: 1590971

tags: added: config neutron
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.