[openstack-dev] [OpenStack-dev][neutron] A question about cisco network_profiles.xxxx uri

Yangxurong yangxurong at huawei.com
Wed Jul 23 12:02:05 UTC 2014


Hi folks,

I'm planning to fix bug/1330095[1], which aims to solve the invalid suffix uri as follow, but I hit a problem of cisco n1kv plugin testing case[2].

[1] https://bugs.launchpad.net/neutron/+bug/1330095
When submitting a REST request as follow:

POST http://localhost:9696/v2.0/routers.@@@xxx
body:
{
    "router":{
      "name": "ddd"
    }
}

the request finishes without error.

Generally the string following "." in the request path will be matched as the format which specifies the format of the request body, like xml or json. I think we need to check the validity of the suffix and filter out invalid format like "@@@xxx".

I hit one testing case failure in cisco n1kv plugin when I submit my patch: https://review.openstack.org/108683

[2] the issues in network_profiles.xxx uri test case:
/network_profiles.{'network_profile': {'segment_range': '10000-10010', 'segment_type': 'overlay', 'name': 'netp1', 'tenant_id': 'some_tenant', 'sub_type': 'enhanced', 'multicast_ip_range': '224.1.1.1-224.1.1.10'}}

So the content in the dictionary was matched as the format. This test case expects to catch a HTTP 400 exception. I am not sure whether this test case is testing an invalid request path, or cisco n1kv plugin supports such path, it's some mistakes in the dictionary that cause the exception.

Any good idea or suggestion about this issue?

Regards,
XuRong Yang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140723/683507ab/attachment.html>


More information about the OpenStack-dev mailing list