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

Drop not needed introspection.

parent 9a47141e
......@@ -521,92 +521,6 @@ class VifibRestAPIV1(Implicit):
"""Computer publisher"""
return ComputerPublisher().__of__(self)
# set this date to moment of API modification
api_modification_date = DateTime('2012/05/24 10:00 GMT+2')
@supportModifiedSince(modified_property_id='api_modification_date')
def __api_discovery(self):
self.REQUEST.response.setHeader('Last-Modified',
rfc1123_date(self.api_modification_date))
self.REQUEST.response.setHeader('Cache-Control', 'must-revalidate')
self.REQUEST.response.setStatus(200)
d = {
"computer_update": {
"authentication": True,
"url": '{computer_url}',
"method": "PUT",
"required": {},
"optional": {
"software": "list",
"address": "list"
}
},
"discovery": {
"authentication": False,
"url": self.absolute_url(),
"method": "GET",
"required": {},
"optional": {}
},
"instance_list": {
"authentication": True,
"url": self.absolute_url() + '/instance',
"method": "GET",
"required": {},
"optional": {}
},
"instance_bang": {
"authentication": True,
"url": "{instance_url}/bang",
"method": "POST",
"required": {
"log": "unicode"
},
"optional": {}
},
"instance_certificate": {
"authentication": True,
"url": "{instance_url}/certificate",
"method": "GET",
"required": {},
"optional": {}
},
"instance_edit": {
"authentication": True,
"url": "{instance_url}",
"method": "PUT",
"required": {},
"optional": {
"title": "unicode",
"connection": "object"
},
},
"instance_info": {
"authentication": True,
"url": "{instance_url}",
"method": "GET",
"required": {},
"optional": {}
},
'request_instance': {
"authentication": True,
'url': self.absolute_url() + '/instance',
'method': 'POST',
'required': {
"status": "unicode",
"slave": "bool",
"title": "unicode",
"software_release": "unicode",
"software_type": "unicode",
"parameter": "object",
"sla": "object"
},
'optional' : {}
}
}
self.REQUEST.response.setBody(jsonify(d))
return self.REQUEST.response
@responseSupport(True)
def OPTIONS(self, *args, **kwargs):
"""HTTP OPTIONS implementation"""
......@@ -618,7 +532,5 @@ class VifibRestAPIV1(Implicit):
@requireHeader({'Accept': 'application/json'})
def __call__(self):
"""Possible API discovery"""
if self.REQUEST['REQUEST_METHOD'] == 'GET':
return self.__api_discovery()
self.REQUEST.response.setStatus(400)
return self.REQUEST.response
9
\ No newline at end of file
10
\ 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