Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
how many ways to pass parameter to python script
« previous
next »
Print
Pages: [
1
]
Author
Topic: how many ways to pass parameter to python script (Read 2099 times)
moonmoonbird
Newbie
Posts: 26
Karma: 0
how many ways to pass parameter to python script
«
on:
October 30, 2020, 05:29:49 am »
I implemented a shell command plugin named myshell, The whole procedure of a request from a button click to the python script:
1, fill the command into textfield in the form, and click send button, 'set' api called;
2,updated and reloaded the config file with form data;
3, then called 'execute' api, which routed to Service Action, in here , Backend()->configdRun('myshell execute'), which called python script;
4,in the python script, we can retreive the form data through the config file which template and jinja2 generated, and do something and return.
What i want to ask is that except for this way of parameter delivery, can i pass it through configdRun() or api restful like?
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
how many ways to pass parameter to python script