Documentation tells that to create subnet and port (using xml formatted body), no request body is required while without request body subnet or port can't be created

Bug #1207196 reported by Mh Raies
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-site
Fix Released
Low
Diane Fleming

Bug Description

In the page http://api.openstack.org/api-ref.html#netconn-api
Subnet and Port section tells that subnet/port creation does not require a request body.

While without request body no subnet/port can be created.
When I tried subnet creation without body then 400(bad request response) and body required error displayed.

Tags: netconn-api
Revision history for this message
Mh Raies (raiesmh08) wrote :

I tried by following request body for subnet creation and subnet is successfully created -

curl -i http://<ip>:9696/v2.0/subnets.xml -X POST -H "X-Auth-Token: <id> -H "Content-Type: application/xml" -H "Accept: application/xml" -H "User-Agent: python-neutronclient" -d '<subnet ><network_id >id</network_id><ip_version >4</ip_version><cidr >cidr</cidr></subnet>'

Thus required body is like -

<subnet ><network_id >network_id_here</network_id><cidr >required_cidr_here</cidr></subnet>

summary: - Documentation tells that to create subnet and port , no request body is
- required while without request body subnet or port can't be created
+ Documentation tells that to create subnet and port (using xml formatted
+ body), no request body is required while without request body subnet or
+ port can't be created
Revision history for this message
Mh Raies (raiesmh08) wrote :

I tried by following request body for portt creation and port is successfully created -

curl -i http://<ip>:9696/v2.0/ports.xml -X POST -H "X-Auth-Token: <id> -H "Content-Type: application/xml" -H "Accept: application/xml" -H "User-Agent: python-neutronclient" -d '<port ><network_id >id</network_id></port>'

Thus required body is like -

'<port ><network_id >network_id_here</network_id></port>

Revision history for this message
Mh Raies (raiesmh08) wrote :

In comment 1 : request body will require ip version also -

<subnet ><network_id >network_id_here</network_id><ip_version>4_or_6</ip_version><cidr >required_cidr_here</cidr></subnet>

Changed in openstack-api-site:
status: New → Confirmed
Changed in neutron:
status: New → Opinion
Akihiro Motoki (amotoki)
tags: added: netconn-api
Changed in openstack-api-site:
assignee: nobody → Diane Fleming (diane-fleming)
milestone: none → kilo
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to api-site (master)

Fix proposed to branch: master
Review: https://review.openstack.org/164478

Changed in openstack-api-site:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to api-site (master)

Reviewed: https://review.openstack.org/164478
Committed: https://git.openstack.org/cgit/openstack/api-site/commit/?id=dbbc9c76d69427b12c8d75fe638f440d7aa500b3
Submitter: Jenkins
Branch: master

commit dbbc9c76d69427b12c8d75fe638f440d7aa500b3
Author: Diane Fleming <email address hidden>
Date: Sat Mar 14 21:10:59 2015 -0500

    Changes to create subnet and create port descriptions.

    For create subnet, changed ip_version to required.
    For create port, changed mediaType to "application/xml"
    for the XML sample so that it shows up correctly.
    Minor edits to active voice.

    Change-Id: Ic1b50f69ed874fd44f43371504560012c09f24cc
    Closes-Bug: #1207196

Changed in openstack-api-site:
status: In Progress → Fix Released
no longer affects: neutron
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.