added stop container

This commit is contained in:
2022-10-18 14:14:53 -05:00
parent f4e7273735
commit 808dc294b9
5 changed files with 31 additions and 10 deletions

View File

@@ -11,4 +11,9 @@ def c_get_containers(req_obj, host, port, jwt, endpoint):
def c_start_container(req_obj, host, port, jwt, endpoint, cid):
url = f'https://{host}:{port}/api/endpoints/{endpoint}/docker/containers/{cid}/start'
c_start_container_response = req_obj.post(url, headers={"Authorization": f"Bearer {jwt}"},verify=False)
return c_start_container_response.status_code
def c_stop_container(req_obj, host, port, jwt, endpoint, cid):
url = f'https://{host}:{port}/api/endpoints/{endpoint}/docker/containers/{cid}/stop'
c_start_container_response = req_obj.post(url, headers={"Authorization": f"Bearer {jwt}"},verify=False)
return c_start_container_response.status_code