+ # decode api_method_caller
+ if api_method == "session":
+ api_method_caller = Sessions(wobj.api, {'session_id': args[0]["session"]})
+ if api_method_caller == []:
+ return
+ elif api_method_caller[0]["person_id"] != None:
+ api_method_caller = Persons(wobj.api, api_method_caller[0]["person_id"])[0]["email"]
+ elif api_method_caller[0]["node_id"] != None:
+ api_method_caller = Nodes(wobj.api, api_method_caller[0]["node_id"])[0]["hostname"]
+ else:
+ api_method_caller = args[0]["session"]
+ elif api_method == "password" or api_method == "capability":
+ api_method_caller = args[0]["Username"]
+ elif api_method == "gpg":
+ api_method_caller = args[0]["name"]
+ elif api_method == "hmac" or api_method == "hmac_dummybox":
+ api_method_caller = args[0]["node_id"]
+ elif api_method == "anonymous":
+ api_method_caller = "anonymous"
+ else:
+ api_method_caller = "unknown"
+
+ # excludes
+ if api_method_source == None or api_method_source[0] == socket.gethostbyname(self.config.PLC_API_HOST) or api_method_source[0] in self.whitelist: