Alteon’s REST API
AlteonOS has a reach REST API for monitor, operation, and configuration.REST can be used/called with verity of programming languages, or even just using wget. However, since this blog was already using TCL for AppShape++ scripting, we may as well keep using TCL for REST too. However, RESTing with TCL is a bit pain in the ..., so this time I'll use python instead.
All most forgot to explain what REST is. Its a way to run remote procedures calls using HTTP. Example calls:
- Read interface counters
- Update real's weight
- Bring down a real inside a group
Here are two screenshots. The first is how I get the current status of real 1, and the second is how I disable real 1.
Lab goal
Using the base setup, create python script to toggle the status of real 1 from not enabled to enabled and from disable to enable.