Need to check uniqueness of the tag value in its scope

Bug #1731817 reported by Senthilnathan Murugappan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R4.1
Fix Committed
High
Édouard Thuleau
Trunk
Fix Committed
High
Édouard Thuleau

Bug Description

We shouldn't allow creation of same tag values with the same fqname.

root@a2s36:~# curl -s -uadmin:contrail123 http://127.0.0.1:8095/tags | python -mjson.tool
{
    "tags": [
        {
            "fq_name": [
                "application=hr"
            ],
            "href": "http://127.0.0.1:8095/tag/0e1898c8-6389-4b57-acad-483a0e155ee5",
            "uuid": "0e1898c8-6389-4b57-acad-483a0e155ee5"
        },
        {
            "fq_name": [
                "application=hr"
            ],
            "href": "http://127.0.0.1:8095/tag/e8e406e4-8e33-41a9-a159-a3e85a3ce744",
            "uuid": "e8e406e4-8e33-41a9-a159-a3e85a3ce744"
        },
        {
            "fq_name": [
                "default-domain",
                "admin",
                "application=eng"
            ],
            "href": "http://127.0.0.1:8095/tag/8879094c-3411-4f91-a959-ebc2e2366061",
            "uuid": "8879094c-3411-4f91-a959-ebc2e2366061"
        },
        {
            "fq_name": [
                "default-domain",
                "admin",
                "application=eng"
            ],
            "href": "http://127.0.0.1:8095/tag/4d97c820-2bf5-489d-bb32-fbc0d5457caf",
            "uuid": "4d97c820-2bf5-489d-bb32-fbc0d5457caf"
        }
    ]
}

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

Review in progress for https://review.opencontrail.org/37540
Submitter: ?douard Thuleau (<email address hidden>)

tags: added: contrail-security
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/37544
Submitter: ?douard Thuleau (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/37544
Committed: http://github.com/Juniper/contrail-controller/commit/9f1d3288c5bd75bef0d9a1279771a6977b3556c2
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit 9f1d3288c5bd75bef0d9a1279771a6977b3556c2
Author: Édouard Thuleau <email address hidden>
Date: Wed Nov 15 17:22:05 2017 +0100

[config] Ensure Tag is unique

As Tag fq_name consists in the type and value, the Tag should be unique.
But before that patch, the Tag fq_name was build after the API verified
the fq_name uniqueness.
Also fix the unit test which returned a false positive result.

Change-Id: I6aa03270cdd9e5bdc46c3d1e9b1dd6d2f8c9d842
Closes-Bug: #1731817

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

Reviewed: https://review.opencontrail.org/37540
Committed: http://github.com/Juniper/contrail-controller/commit/ebdade3f55688db4853563fc398d1a8bf1eefcf4
Submitter: Zuul (<email address hidden>)
Branch: master

commit ebdade3f55688db4853563fc398d1a8bf1eefcf4
Author: Édouard Thuleau <email address hidden>
Date: Wed Nov 15 17:22:05 2017 +0100

[config] Ensure Tag is unique

As Tag fq_name consists in the type and value, the Tag should be unique.
But before that patch, the Tag fq_name was build after the API verified
the fq_name uniqueness.
Also fix the unit test which returned a false positive result.

Change-Id: I6aa03270cdd9e5bdc46c3d1e9b1dd6d2f8c9d842
Closes-Bug: #1731817

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.