mex-docs

Deleting Docker via Python

Prerequisites

This has been tested under Python3, and requires the following modules:

Building and testing have been done under PyCharm CE on MacOS.

Notes

This script is a very rough POC and is not in any way intended for production.

Source

A copy of the file can be seen in this repository, at bin/delete-docker.py.

Example Run

/Users/jschmidt/PycharmProjects/mexapi/venv/bin/python /Users/jschmidt/PycharmProjects/mexapi/delete-docker.py
Deleting the AppInst...
{"data":{"message":"Deleting"}}
{"data":{"message":"NotPresent"}}
{"data":{"message":"Deleted AppInst successfully"}}

Deleting the cluster...
{"data":{"message":"Deleting"}}
{"data":{"message":"NotPresent"}}
{"data":{"message":"Deleted ClusterInst successfully"}}

Deleting the application...
{"message":"App key {\"developer_key\":{\"name\":\"demoorg\"},\"name\":\"testapp\",\"version\":\"1.1\"} already exists"}

Process finished with exit code 0