mex-docs

Deleting a VM 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-vm.py.

Example Run

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

Deleting the application...
{}

Process finished with exit code 0