Comment 6 for bug 1173284

Revision history for this message
Stephen Ma (stephen-ma) wrote : Re: quantum remote-router-interface should return 204 and no response body

The reason for response status being 201 for create and 204 for delete is by the action_status dictionary in resource.py. The action for a "quantum router_interface_delete" command is "remove_router_interface". So adding a new definition to the action_status dictionary will allow router_interface_action to have a status of 204.

This is what I mean:

 git diff origin/master quantum/api/v2/resource.py
diff --git a/quantum/api/v2/resource.py b/quantum/api/v2/resource.py
index 97fc8a8..c9931b9 100644
--- a/quantum/api/v2/resource.py
+++ b/quantum/api/v2/resource.py
@@ -46,7 +46,7 @@ def Resource(controller, faults=None, deserializers=None, serializers=None):
                            'application/json': wsgi.JSONDictSerializer()}
     format_types = {'xml': 'application/xml',
                     'json': 'application/json'}
- action_status = dict(create=201, delete=204)
+ action_status = dict(create=201, delete=204, remove_router_interface=204)

     default_deserializers.update(deserializers or {})
     default_serializers.update(serializers or {})