示例#1
0
文件: main.py 项目: lamkapiu/First
def addProject(fname):
    data = dataformat.yamlFileToBaseData(fname)
    data['key'] = key
    # print(data)
    url = base_url + "/project/add"
    r = requests.post(url, json.dumps(data))
    print(r.text)
示例#2
0
文件: main.py 项目: lamkapiu/First
def addMachine(fname):
    '''
    添加机器:
    :param fname: fname--文件名,add_data目录下的machinedata.yaml文件名
    :return:
    '''
    data = dataformat.yamlFileToBaseData(fname)
    data['key'] = key
    # print(data)
    url = base_url + "/machine/add"
    r = requests.post(url, json.dumps(data))
    print(r.text)
示例#3
0
文件: main.py 项目: lamkapiu/First
def editMachine(fname):
    data = dataformat.yamlFileToBaseData(fname)
    data['key'] = key
    url = base_url + "/machine/edit"
    r = requests.post(url, json.dumps(data))
    print(r.text)