blob: 7783b4ea09c4582a7108ba026d1f1d1fc0708f96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/usr/bin/python
from codes import *
from modules import web_svc
class Test(web_svc.WebSvc):
def __init__(self):
self.methods = {
"test_add": self.add,
"test_blippy": self.blippy,
}
web_svc.WebSvc.__init__(self)
def add(self, numb1, numb2):
return success(int(numb1) + int(numb2))
def blippy(self, foo):
fh = open("/tmp/blippy","w+")
fh.close()
return success(foo)
methods = Test()
register_rpc = methods.register_rpc
|