Add method for tag and operation
This commit is contained in:
16
main.py
16
main.py
@@ -163,6 +163,22 @@ async def fastapi_redo(network: str):
|
||||
async def fastapi_have_snapshot(network: str, tag: str) -> bool:
|
||||
return have_snapshot(network, tag)
|
||||
|
||||
@app.get('/havesnapshotforoperation/')
|
||||
async def fastapi_have_snapshot_for_operation(network: str, operation: int) -> bool:
|
||||
return have_snapshot_for_operation(network, operation)
|
||||
|
||||
@app.get('/havesnapshotforcurrentoperation/')
|
||||
async def fastapi_have_snapshot_for_current_operation(network: str) -> bool:
|
||||
return have_snapshot_for_current_operation(network)
|
||||
|
||||
@app.post('/takesnapshotforoperation/')
|
||||
async def fastapi_take_snapshot_for_operation(network: str, operation: int, tag: str) -> None:
|
||||
return take_snapshot_for_operation(network, operation, tag)
|
||||
|
||||
@app.post('takenapshotforcurrentoperation')
|
||||
async def fastapi_take_snapshot_for_current_operation(network: str, tag: str) -> None:
|
||||
return take_snapshot_for_current_operation(network, tag)
|
||||
|
||||
@app.post('/takesnapshot/')
|
||||
def fastapi_take_snapshot(network: str, tag: str) -> int | None:
|
||||
return take_snapshot(network, tag)
|
||||
|
||||
Reference in New Issue
Block a user