$ juju switch --format

Jesse Meek jesse.meek at canonical.com
Thu Jun 5 21:55:50 UTC 2014


I have a branch proposed that displays extra environment information 
when the --format flag is used with switch e.g:

$ juju switch local --format yaml
environ-name: local
previous-environ-name: ec2
state-servers:
     - example.com
     - kremvax.ru
username: joe

There is some debate over this. Roger has summarised the key issues well 
in his review comment:

"I think this is a bit odd. In every other command AFAIK, choosing a 
format does not affect the actual information displayed, just the format 
that it's printed in.

Why are we printing all this info with the "switch" command anyway? 
Personally I'd think that a new command was warranted here, perhaps 
"juju current", or "juju show" or "juju info"."

My first implementation used a --env-info flag, but through review this 
was deemed to be not user friendly. I think the UX needs some discussion.

Addressing the concerns, can we not:

  $ juju switch [env]
  $ juju info
     # display env info of env user just switched into

Providing the previous-environ-name would take some extra thought, or if 
this is not important we could drop it. Are there good reasons not to do 
this?






More information about the Juju-dev mailing list