Hi,
Is there a util method to read payload parameters in Python Cartridge
agent? I am writing a plugin/extension which needs to read payload
parameters to function.
Currently I am reading the file and access the properties
launch_params_file =
os.path.abspath(os.path.dirname(__file__)).split("extensions")[0] +
"payload/launch-params"
metadata_file = open(launch_params_file, "r")
properties = {}
for param in metadata_payload_content.split(","):
if param.strip() != "":
param_value = param.strip().split("=")
properties[param_value[0]] = param_value[1]
token = properties['TOKEN']
Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware
web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897