Revision 381a548c snf-cyclades-app/synnefo/api/servers.py

b/snf-cyclades-app/synnefo/api/servers.py
70 70
    elif request.method == 'POST':
71 71
        return create_server(request)
72 72
    else:
73
        return api.api_method_not_allowed(request)
73
        return api.api_method_not_allowed(request,
74
                                          allowed_methods=['GET', 'POST'])
74 75

  
75 76

  
76 77
def server_demux(request, server_id):
......
81 82
    elif request.method == 'DELETE':
82 83
        return delete_server(request, server_id)
83 84
    else:
84
        return api.api_method_not_allowed(request)
85
        return api.api_method_not_allowed(request,
86
                                          allowed_methods=['GET',
87
                                                           'PUT',
88
                                                           'DELETE'])
85 89

  
86 90

  
87 91
def metadata_demux(request, server_id):
......
90 94
    elif request.method == 'POST':
91 95
        return update_metadata(request, server_id)
92 96
    else:
93
        return api.api_method_not_allowed(request)
97
        return api.api_method_not_allowed(request,
98
                                          allowed_methods=['GET', 'POST'])
94 99

  
95 100

  
96 101
def metadata_item_demux(request, server_id, key):
......
101 106
    elif request.method == 'DELETE':
102 107
        return delete_metadata_item(request, server_id, key)
103 108
    else:
104
        return api.api_method_not_allowed(request)
109
        return api.api_method_not_allowed(request,
110
                                          allowed_methods=['GET',
111
                                                           'PUT',
112
                                                           'DELETE'])
105 113

  
106 114

  
107 115
def nic_to_dict(nic):

Also available in: Unified diff