Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
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)