The evolution of Restsh #6
JuergenMang
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If you not already know what Restsh is: Restsh is a shell environment to work with REST-API's on the command line. It is primarily designed for the F5 and GitLab APIs.
It started as a collection of shell scripts to automate F5 tasks for F5s. At the beginning I wrote simple TMOS scripts, but parsing the output was always not as easy it should be. That's why I started to use the iControl REST API that accepts JSON and returns JSON.
The number of scripts kept growing, and I kept copying code from one script to the next, making only minor changes. That's why I started writing core functions and integrating this custom Shell library in my scripts. That was the early phase of Restsh.
After that, I integrated the interactive mode into Restsh to move away from my Postman collection and get rid of those long curl command-line commands. With this version it was already possible to explore REST API's interactively.
The next improvement was the integration of autocompletion for API commands. F5 unfortunately does not provide an OpenAPI file, that's why I wrote a crawler to find all the available API endpoints. The implementation of the crawler can be found in the
/restsh/modules/autocomplete/folder.At this stage, I always added a wrapper script whenever I needed to access a specific endpoint. In this way, Restsh grew organically through its use.
In another project, I had already written CI/CD pipeline scripts to create and deploy declarative WAF policies from templates. So it made sense to combine the two and make Restsh pipeline-ready. After that I adapted the template engine and pipelines for AS3 deployments and Declarative Onboarding.
During this phase, I started working with GitLab more and more, so I ended up writing a GitLab module to make the deployment of the infrastructure for F5's automated deployment scriptable.
Beta Was this translation helpful? Give feedback.
All reactions