Demo entry 6636509

py

   

Submitted by anonymous on Aug 25, 2017 at 08:45
Language: Python. Code size: 941 Bytes.

#!/usr/bin/python
# -*- coding: utf-8 -*-
import requests


def send():
    file_data = {
        'file': open('/root/checkIN.sql', 'rb')
    }
    
    headers = {'deployid':'03b8acba-3c6c-11e7-826c-fa163e9474c9',
               'mysql.host.password':'123456',
               'mysql.host.user': 'root',
               'mysql.password' :'123456',
               'mysql.user' :'root',
               'mysql.ip' :'172.28.36.218',
               'mysql.port' :'3306',
               'mysql.database' :'mysql',
               'mysql.script' : '',
               'docker.ip' :'172.28.36.210',
               'docker.image.url' :'arp.reg.innertoon.com/qitoon.checkin/qitoon.checkin:20170517101336'}
            
    resp = requests.post('http://172.28.11.111:8001/api/deploy/deploys', headers=headers,files=file_data)
    #resp = requests.post('http://172.28.11.111:8005/upload', files=data)
    print resp


if __name__ == '__main__':
    send()

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).