Agile deployment method with docker
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -82,3 +82,29 @@ def req_ip_recommendation():
|
||||
print(req_dump)
|
||||
|
||||
return json.dumps(req_dump)
|
||||
|
||||
def reg_bulk(data):
|
||||
|
||||
inf_s = get_session()
|
||||
req_url = 'http://10.30.1.138:5000/api/new-client'
|
||||
|
||||
# req = inf_s.post(req_url, req_val)
|
||||
|
||||
|
||||
for x in data:
|
||||
|
||||
uname = x[0]
|
||||
email = x[1]
|
||||
code = x[2]
|
||||
org = x[3]
|
||||
|
||||
data = {"name":uname,"email":email,"code":code,"org":org}
|
||||
# data = {"name":uname,"email":email,"allocated_ips":suggest_ips,"allowed_ips":allowed_ips,"extra_allowed_ips":[],"use_server_dns":true,"enabled":true,"preshared_key":true}
|
||||
|
||||
print(data)
|
||||
|
||||
|
||||
# ret_reg=$(curl -s --location --request POST 'http://10.30.1.138:5000/new-client' \
|
||||
# --header 'Content-Type: application/json' \
|
||||
# --cookie .tmp-cookie \
|
||||
# --data-raw '{"name":"'$uname'","email":"'$email'","allocated_ips":'$suggest_ips',"allowed_ips":["10.0.0.0/8", "192.168.100.0/24"],"extra_allowed_ips":[],"use_server_dns":true,"enabled":true,"preshared_key":true}' )
|
||||
|
||||
Reference in New Issue
Block a user