parent
02accd6fd6
commit
70ca4fedfe
@ -0,0 +1,21 @@
|
||||
|
||||
import requests
|
||||
import sys
|
||||
import json
|
||||
def server():
|
||||
|
||||
url = "http://10.129.28.219:5001/register/function/image-blur"
|
||||
files = [
|
||||
('pythonfile', open(sys.argv[1],'rb')),
|
||||
('dockerfile', open(sys.argv[2],'rb')),
|
||||
('requirements.txt', open(sys.argv[3],'rb'))
|
||||
]
|
||||
reply = requests.post(url = url,files = files,verify=False)
|
||||
print(reply.json())
|
||||
|
||||
def main():
|
||||
server()
|
||||
|
||||
if __name__=="__main__":
|
||||
main()
|
||||
|
@ -0,0 +1,21 @@
|
||||
|
||||
import requests
|
||||
import sys
|
||||
import json
|
||||
|
||||
def server():
|
||||
url = "http://10.129.28.219:5001/register/trigger/"
|
||||
input_json_file = open(sys.argv[1])
|
||||
params = json.load(input_json_file)
|
||||
reply = requests.post(url = url,json = params,verify=False)
|
||||
print(reply.json())
|
||||
|
||||
|
||||
def main():
|
||||
server()
|
||||
|
||||
if __name__=="__main__":
|
||||
main()
|
||||
|
||||
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"trigger_name": "mydagtrigger",
|
||||
"type":"dag",
|
||||
"dags": ["toonify"],
|
||||
"functions":""
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"trigger_name": "myfunctiontrigger-1",
|
||||
"type":"function",
|
||||
"dags":"",
|
||||
"functions": ["decode-function"]
|
||||
}
|
Loading…
Reference in new issue