Wrong http code returned when getting information about multiple VNF instances

Bug #1938108 reported by YaoYudie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Fix Released
Low
Ying Yao

Bug Description

When getting information about multiple VNF instances with invalid attribute selector or invalid attribute-based filtering parameters, tacker return a response with HTTP Code 200 and all information about VNF instances. However, according to the specification file, the HTTP code 400 Bad Request Shall be returned upon the following errors: Invalid attribute selector and Invalid attribute-based filtering expression

GET //vnflcm/v1/vnf_instances?attribute_not_exist=some_value
{
    "seconds": 0.5744819999999999,
    "status": 200,
    "body": [
        {
            "id": "ce0c98a3-7433-44b4-8e76-a86cbefdf25c",
            "vnfInstanceName": "vnf-ce0c98a3-7433-44b4-8e76-a86cbefdf25c",
            "vnfInstanceDescription": "string",
            "instantiationState": "NOT_INSTANTIATED",
            "vnfdId": "a2bb0ce7-ebca-4fa7-95ed-5840d70a1179",
            "vnfProvider": "Company",
            "vnfProductName": "Sample VNF",
            "vnfSoftwareVersion": "1.0",
            "vnfdVersion": "1.0",
            "vnfPkgId": "f59dbb5b-73b0-49d6-9e05-12716ff8b760",
            "_links": {
                "self": {
                    "href": "/vnflcm/v1/vnf_instances/ce0c98a3-7433-44b4-8e76-a86cbefdf25c"
                },
                "instantiate": {
                    "href": "/vnflcm/v1/vnf_instances/ce0c98a3-7433-44b4-8e76-a86cbefdf25c/instantiate"
                }
            }
        }
    ],
    "headers": {
        "Content-Length": "597",
        "Content-Type": "application/json",
        "X-Openstack-Request-Id": "req-97a017d6-be93-4f43-ab8a-df66b8890028",
        "Date": "Thu, 04 Mar 2021 03:20:33 GMT",
        "Connection": "keep-alive"
    }
}

Ying Yao (yaoying)
Changed in tacker:
assignee: nobody → Ying Yao (yaoying)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tacker (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tacker/+/802647

Changed in tacker:
status: New → In Progress
Yasufumi Ogawa (yasufum)
Changed in tacker:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker (master)

Reviewed: https://review.opendev.org/c/openstack/tacker/+/802647
Committed: https://opendev.org/openstack/tacker/commit/3bb8791f181a65661dda84296ea63b90fb6bda9a
Submitter: "Zuul (22348)"
Branch: master

commit 3bb8791f181a65661dda84296ea63b90fb6bda9a
Author: Yi Feng <email address hidden>
Date: Wed Jul 28 11:38:52 2021 +0900

    Fix get information about multiple VNF instances

    When getting information about multiple VNF instances with invalid
    attribute selector or invalid attribute-based filtering parameters,
    tacker return a response with HTTP Code 200 and all information
    about VNF instances. However, according to the specification file,
    the HTTP code 400 Bad Request shall be returned.

    To fix this bug, this patch adds a new check for this api`s
    parameters. If it contains unsupported parameters, the HTTP code
    400 Bad Request will be returned.

    Closes-Bug: #1938108
    Change-Id: I3cca6d6fa664dd8f88791516042892369e4972a2

Changed in tacker:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tacker (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/tacker/+/810277

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/tacker/+/810277
Committed: https://opendev.org/openstack/tacker/commit/292e05dc29da8fbd2505d7bb97b36d79f436e65b
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 292e05dc29da8fbd2505d7bb97b36d79f436e65b
Author: Yi Feng <email address hidden>
Date: Wed Jul 28 11:38:52 2021 +0900

    Fix get information about multiple VNF instances

    When getting information about multiple VNF instances with invalid
    attribute selector or invalid attribute-based filtering parameters,
    tacker return a response with HTTP Code 200 and all information
    about VNF instances. However, according to the specification file,
    the HTTP code 400 Bad Request shall be returned.

    To fix this bug, this patch adds a new check for this api`s
    parameters. If it contains unsupported parameters, the HTTP code
    400 Bad Request will be returned.

    Closes-Bug: #1938108
    Change-Id: I3cca6d6fa664dd8f88791516042892369e4972a2

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tacker 6.0.0.0rc2

This issue was fixed in the openstack/tacker 6.0.0.0rc2 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tacker 7.0.0.0rc1

This issue was fixed in the openstack/tacker 7.0.0.0rc1 release candidate.

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.