-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathactions.py
34 lines (27 loc) · 819 Bytes
/
actions.py
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
27
28
29
30
31
32
33
from pyparsing import *
from megaco import *
transactionList = []
contextList = []
termList = []
def commandRequestListAction(tokens):
print "commandRequestList"
def actionRequestAction(tokens):
global termList
print "actionRequest"
print "&&&&&&&&&&"
print contextList, termList
print "&&&&&&&&&&"
context = Context(tokens["ContextID"],termList)
contextList.append(context)
termList = []
def commandRequestAction(tokens):
print "commandRequest"
term = Termination(tokens["termID"],tokens["commandType"])
termList.append(term)
# print tokens.keys()
# print tokens["termID"]
def megacoMessageAction(tokens):
print "megacoMessageAction"
print tokens.keys()
tran = Transaction(tokens["transactionID"],contextList)
transactionList.append(tran)