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

b/snf-cyclades-app/synnefo/api/images.py
65 65
    elif request.method == 'POST':
66 66
        return create_image(request)
67 67
    else:
68
        return api.api_method_not_allowed(request)
68
        return api.api_method_not_allowed(request,
69
                                          allowed_methods=['GET', 'POST'])
69 70

  
70 71

  
71 72
def image_demux(request, image_id):
......
74 75
    elif request.method == 'DELETE':
75 76
        return delete_image(request, image_id)
76 77
    else:
77
        return api.api_method_not_allowed(request)
78
        return api.api_method_not_allowed(request,
79
                                          allowed_methods=['GET', 'DELETE'])
78 80

  
79 81

  
80 82
def metadata_demux(request, image_id):
......
83 85
    elif request.method == 'POST':
84 86
        return update_metadata(request, image_id)
85 87
    else:
86
        return api.api_method_not_allowed(request)
88
        return api.api_method_not_allowed(request,
89
                                          allowed_methods=['GET', 'POST'])
87 90

  
88 91

  
89 92
def metadata_item_demux(request, image_id, key):
......
94 97
    elif request.method == 'DELETE':
95 98
        return delete_metadata_item(request, image_id, key)
96 99
    else:
97
        return api.api_method_not_allowed(request)
100
        return api.api_method_not_allowed(request,
101
                                          allowed_methods=['GET',
102
                                                           'PUT',
103
                                                           'DELETE'])
98 104

  
99 105

  
100 106
def image_to_dict(image, detail=True):

Also available in: Unified diff