用于python的自以为是的fleet api客户端
fleetp的Python项目详细描述
python的一个自以为是的fleet api客户端。
用法
importfleetpyclient=fleetpy.Client('https://fleet.myenv.com')unit=client.unit('consul',from_file='consul.service')# Submit the unit, but keep it inactiveunit.submit()# Start the unitunit.start()# Stop the unitunit.stop()# List the state of all unitsstate=client.state()# List the machinesmachines=client.machines()# List the unitsunits=client.units()# Get the state of a remote unitunit=client.unit('remote.service')unit.refresh()print(unit.state)