Exemple #1
0
def parse_webservice(webservice):
    """

    :param webservice:
    :return:
    """
    assert type(webservice) == dict
    assert 'type' in webservice

    return WebService.parse(webservice)
Exemple #2
0
 def parse(data):
     # obj = WebServiceJson()
     # WebServiceJson.__init__(WebService.parse(data))
     obj = WebService.parse(data)
     obj.value = data.get('value', None)
     return obj
Exemple #3
0
 def marshal(self):
     obj = WebService.marshal(self)
     obj.update({'value': self.value})
Exemple #4
0
 def __init__(self, *args, **kwargs):
     WebService.__init__(self, *args, **kwargs)
     self.service_type = 'json'
     self.value = 23
 def parse(data):
     obj = WebService.parse(data)
     return obj
 def __init__(self, *args, **kwargs):
     WebService.__init__(self, *args, **kwargs)
     self.service_type = 'nodeinfo'
Exemple #7
0
 def parse(data):
     # obj = WebServiceStatic.__init__(WebService.parse(data))
     # obj.directory = data.get('directory', None)
     obj = WebService.parse(data)
     obj.directory = data.get('directory', None)
     return obj
Exemple #8
0
 def marshal(self):
     obj = WebService.marshal(self)
     obj.update({'directory': self.directory})
Exemple #9
0
 def __init__(self, *args, **kwargs):
     WebService.__init__(self, *args, **kwargs)
     self.service_type = 'static'
     self.directory = '.'