New plugin - juju-remove

beta
seeking-testers

#1

One of the things that has bugged me about Juju is that we have have dozens of “remove-*” commands. It feels slightly irritating to need to specify the exact command, when Juju could be inspecting the arguments and calling the right command.

Under the hood, juju-remove makes use of pylibjuju that @simonrichardson has been working hard to improve. As I get time, I’ll write up the structure I’ve used to make it easier for other people to write their own plugins.

Here is a comparison of the juju-remove syntax vs the Juju syntax:

juju remove 0 juju remove-machine 0
juju remove ubuntu juju remove-application ubuntu
juju remove ubuntu/0 juju remove-unit ubuntu/0
juju remove webapp postgresql juju remove-relation webapp postgresql

I would love to accept patches from anyone interested in supporting other things, such as cleaning up storage.

More details, including installation instructions, are available in the code repository:

https://github.com/timClicks/juju-remove

The instructions are deliberately not a 1 click install, because this plugin needs some testing first.


#2

This is pretty cool. I often wonder about how we have commands that repeat for different “nouns” in Juju but they look so different in normal use that something like this would be possible.