The response data in test_routers_client is inconsistent with the Reference API document

Bug #1838005 reported by linanbj
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Martin Kopec

Bug Description

In the client for network, in the path 'tempest\tests\lib\services\network\test_routers_client.py', the
value

FAKE_CREATE_ROUTER = {
        "router": {
            "name": u'\u2740(*\xb4\u25e1`*)\u2740',
            "external_gateway_info": {
                "network_id": "8ca37218-28ff-41cb-9b10-039601ea7e6b",
                "enable_snat": True,
                "external_fixed_ips": [
                    {
                        "subnet_id": "255.255.255.0",
                        "ip": "192.168.10.1"
                    }
                ]
            },
            "admin_state_up": True,
            "id": "8604a0de-7f6b-409a-a47c-a1cc7bc77b2e"
        }
    }

But in Reference API document http://developer.openstack.org/api-ref/networking/v2/index.html#create-router', the response data is format like:

{
    "router": {
        "admin_state_up": true,
        "availability_zone_hints": [],
        "availability_zones": [
            "nova"
        ],
        "created_at": "2018-03-19T19:17:04Z",
        "description": "",
        "distributed": false,
        "external_gateway_info": {
            "enable_snat": true,
            "external_fixed_ips": [
                {
                    "ip_address": "172.24.4.6",
                    "subnet_id": "b930d7f6-ceb7-40a0-8b81-a425dd994ccf"
                }
            ],
            "network_id": "ae34051f-aa6c-4c75-abf5-50dc9ac99ef3"
        },
        "flavor_id": "f7b14d9a-b0dc-4fbe-bb14-a0f4970a69e0",
        "ha": false,
        "id": "f8a44de0-fc8e-45df-93c7-f79bf3b01c95",
        "name": "router1",
        "routes": [],
        "revision_number": 1,
        "status": "ACTIVE",
        "updated_at": "2018-03-19T19:17:22Z",
        "project_id": "0bd18306d801447bb457a46252d82d13",
        "tenant_id": "0bd18306d801447bb457a46252d82d13",
        "service_type_id": null,
        "tags": ["tag1,tag2"],
        "conntrack_helpers": []
    }
}

The format of two data are different.

Revision history for this message
linanbj (linanbj) wrote :
Revision history for this message
linanbj (linanbj) wrote :
Revision history for this message
Martin Kopec (mkopec) wrote :

Yeah, seems like the fake data needs a little modification.

Changed in tempest:
status: New → Confirmed
tags: added: low-hanging-fruit
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.opendev.org/704248

Changed in tempest:
assignee: nobody → Martin Kopec (mkopec)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.opendev.org/704248
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=d19d7f8dc429275e802d1ce549592f8416c7e076
Submitter: Zuul
Branch: master

commit d19d7f8dc429275e802d1ce549592f8416c7e076
Author: Martin Kopec <email address hidden>
Date: Sun Jan 26 12:10:34 2020 +0000

    Improve response data of test_routers_client

    The response data of test_routers_client are edited in order to be
    consistent with the Reference API document [1]

    [1] https://docs.openstack.org/api-ref/network/v2/index.html

    Closes-Bug: 1838005
    Change-Id: I9f5e57a3114ac047f87762def08b165bf377b600

Changed in tempest:
status: In Progress → Fix Released
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.