[Config] wrong UUID in obj_uuids in REST Call returns wrong data

Bug #1575473 reported by Biswajit Mandal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Fix Committed
Undecided
Sachin Bansal
Trunk
Fix Committed
Undecided
Sachin Bansal

Bug Description

Suppose, Service Instance “A" does have two vm back_refs, now if I specify obj_uuids the VM uuid, then /service-instances returns service instance data with that VM UUID.
I am pasting the snippet:
http://nodeg40:8082/service-instances?fields=virtual_machine_back_refs&obj_uuids=69353451-1ba5-4e95-8651-ac87b0a3eef3,3c2680ca-2873-4cef-95bf-af3ef9bac43f
{
service-instances: [
{
href: "http://nodeg40:8082/service-instance/3c2680ca-2873-4cef-95bf-af3ef9bac43f",
fq_name: [
"default-domain__bmandal__snat_eddf39ce-cca9-47bd-8468-884b585071c1_a5b069fd-6c78-4609-9d35-6427b61965dc__1"
],
uuid: "3c2680ca-2873-4cef-95bf-af3ef9bac43f"
},
{
virtual_machine_back_refs: [
{
to: [
"default-domain__bmandal__snat_eddf39ce-cca9-47bd-8468-884b585071c1_a5b069fd-6c78-4609-9d35-6427b61965dc__1"
],
href: "http://nodeg40:8082/virtual-machine/3c2680ca-2873-4cef-95bf-af3ef9bac43f",
attr: null,
uuid: "3c2680ca-2873-4cef-95bf-af3ef9bac43f"
},
{
to: [
"default-domain__bmandal__snat_eddf39ce-cca9-47bd-8468-884b585071c1_a5b069fd-6c78-4609-9d35-6427b61965dc__2"
],
href: "http://nodeg40:8082/virtual-machine/4079db48-79ef-4e7b-a5cd-5cc29b96ab41",
attr: null,
uuid: "4079db48-79ef-4e7b-a5cd-5cc29b96ab41"
}
],
href: "http://nodeg40:8082/service-instance/69353451-1ba5-4e95-8651-ac87b0a3eef3",
fq_name: [
"default-domain",
"bmandal",
"snat_eddf39ce-cca9-47bd-8468-884b585071c1_a5b069fd-6c78-4609-9d35-6427b61965dc"
],
uuid: "69353451-1ba5-4e95-8651-ac87b0a3eef3"
}
]
}

So if you see the above REST API Call, 3c2680ca-2873-4cef-95bf-af3ef9bac43f is the VM UUID which I have used in /service-instances call, still it returns the service-instance with that VM UUID (though clicking on this it returns as "No service-instance object found for id 3c2680ca-2873-4cef-95bf-af3ef9bac43f”).

Now if I do detail=true, then
http://nodeg40:8082/service-instances?fields=virtual_machine_back_refs&obj_uuids=3c2680ca-2873-4cef-95bf-af3ef9bac43f&detail=true

This returns data without throwing error or empty response, and here in the response “virtual-machine” keyword gets replaced with “service-instance" thus returning wrong information.

Tags: config
Sachin Bansal (sbansal)
Changed in juniperopenstack:
assignee: nobody → Sachin Bansal (sbansal)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/19811
Submitter: Sachin Bansal (<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/19812
Submitter: Sachin Bansal (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/19811
Submitter: Sachin Bansal (<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/19812
Submitter: Sachin Bansal (<email address hidden>)

Jeba Paulaiyan (jebap)
information type: Proprietary → Public
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

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

commit d094d76d3f56990bd08ac762c47098b68aec8dea
Author: Sachin Bansal <email address hidden>
Date: Mon May 2 09:45:07 2016 -0700

Add check for object type before returning the list

Change-Id: I8371cbd481e4a11f8613488fa703d84070b87fb2
Closes-Bug: 1575473
(cherry picked from commit 313777c20e0e197f3359b46002765326d4bc35bb)

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

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

commit 313777c20e0e197f3359b46002765326d4bc35bb
Author: Sachin Bansal <email address hidden>
Date: Mon May 2 09:45:07 2016 -0700

Add check for object type before returning the list

Change-Id: I8371cbd481e4a11f8613488fa703d84070b87fb2
Closes-Bug: 1575473

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.