Commit cd4146d6 authored by Łukasz Nowak's avatar Łukasz Nowak

Follow updated docs: do not require Accept header.

parent b80d2591
...@@ -254,8 +254,7 @@ class InstancePublisher(GenericPublisher): ...@@ -254,8 +254,7 @@ class InstancePublisher(GenericPublisher):
"""Instance publisher""" """Instance publisher"""
@responseSupport() @responseSupport()
@requireHeader({'Accept': 'application/json', @requireHeader({'Content-Type': '^application/json.*'})
'Content-Type': '^application/json.*'})
@requireJson(dict( @requireJson(dict(
title=(unicode, encode_utf8), title=(unicode, encode_utf8),
connection=dict connection=dict
...@@ -290,8 +289,7 @@ class InstancePublisher(GenericPublisher): ...@@ -290,8 +289,7 @@ class InstancePublisher(GenericPublisher):
self.REQUEST.response.setBody(jsonify(d)) self.REQUEST.response.setBody(jsonify(d))
return self.REQUEST.response return self.REQUEST.response
@requireHeader({'Accept': 'application/json', @requireHeader({'Content-Type': '^application/json.*'})
'Content-Type': '^application/json.*'})
@requireJson(dict(log=unicode)) @requireJson(dict(log=unicode))
@extractDocument(['Software Instance', 'Slave Instance']) @extractDocument(['Software Instance', 'Slave Instance'])
def __bang(self): def __bang(self):
...@@ -308,8 +306,7 @@ class InstancePublisher(GenericPublisher): ...@@ -308,8 +306,7 @@ class InstancePublisher(GenericPublisher):
self.REQUEST.response.setStatus(204) self.REQUEST.response.setStatus(204)
return self.REQUEST.response return self.REQUEST.response
@requireHeader({'Accept': 'application/json', @requireHeader({'Content-Type': '^application/json.*'})
'Content-Type': '^application/json.*'})
@requireJson(dict( @requireJson(dict(
slave=bool, slave=bool,
software_release=(unicode, encode_utf8), software_release=(unicode, encode_utf8),
...@@ -353,7 +350,6 @@ class InstancePublisher(GenericPublisher): ...@@ -353,7 +350,6 @@ class InstancePublisher(GenericPublisher):
self.REQUEST.response.setBody(jsonify({'status':'processing'})) self.REQUEST.response.setBody(jsonify({'status':'processing'}))
return self.REQUEST.response return self.REQUEST.response
@requireHeader({'Accept': 'application/json'})
@extractDocument(['Software Instance', 'Slave Instance']) @extractDocument(['Software Instance', 'Slave Instance'])
@supportModifiedSince('document_url') @supportModifiedSince('document_url')
def __instance_info(self): def __instance_info(self):
...@@ -407,7 +403,6 @@ class InstancePublisher(GenericPublisher): ...@@ -407,7 +403,6 @@ class InstancePublisher(GenericPublisher):
return self.REQUEST.response return self.REQUEST.response
software_instance_module = 'software_instance_module' software_instance_module = 'software_instance_module'
@requireHeader({'Accept': 'application/json'})
def __instance_list(self): def __instance_list(self):
kw = dict( kw = dict(
portal_type=('Software Instance', 'Slave Instance'), portal_type=('Software Instance', 'Slave Instance'),
...@@ -444,8 +439,7 @@ class InstancePublisher(GenericPublisher): ...@@ -444,8 +439,7 @@ class InstancePublisher(GenericPublisher):
class ComputerPublisher(GenericPublisher): class ComputerPublisher(GenericPublisher):
@responseSupport() @responseSupport()
@requireHeader({'Accept': 'application/json', @requireHeader({'Content-Type': '^application/json.*'})
'Content-Type': '^application/json.*'})
@extractDocument('Computer') @extractDocument('Computer')
@requireJson(dict( @requireJson(dict(
partition=list, partition=list,
...@@ -529,7 +523,6 @@ class VifibRestAPIV1(Implicit): ...@@ -529,7 +523,6 @@ class VifibRestAPIV1(Implicit):
security.declarePublic('__call__') security.declarePublic('__call__')
@responseSupport(True) @responseSupport(True)
@requireHeader({'Accept': 'application/json'})
def __call__(self): def __call__(self):
"""Possible API discovery""" """Possible API discovery"""
self.REQUEST.response.setStatus(400) self.REQUEST.response.setStatus(400)
......
10 11
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment