Switching between models and controllers can be laborious, as you have to remember what the previous model or controller name was. I suggested on IRC that
juju switch should have
-, similar to
git checkout - or
cd -. Rather than giving Juju the ability to remember, make a plugin and you can do what you want…
To switch to a model:
juju stash push modelB
To switch back to the previous model:
juju stash pop
To see what’s in your history:
juju stash list
If you want to ping-pong between models, you can do the following:
juju stash pop --store
This will store the popped model into the history. Calling it multiple times will mean you can ping-pong between
modelB with out having to remember their names.
--status along with the
pop command will also dump the
juju status into the stdout so you can keep track of what’s happening where!
Last updated 1 year, 3 months ago.