Code review comment for lp:~bac/juju-quickstart/auth

Revision history for this message
Brad Crittenden (bac) wrote :

Reviewers: mp+203631_code.launchpad.net,

Message:
Please take a look.

Description:
Get admin_secret from juju-generated jenv file.

As of Juju v 1.17 the admin-secret is stored in a generated file,
located in
$JUJU_HOME/environments/<environment>.jenv.

If an admin-secret is provided in environments.yaml, it is used and also
stored in the jenv file. If none is given, then juju fabricates one and
stores it in the jenv file.

The admin-secret *field* is marked as optional now. For the case where
a
local environment is used, Quickstart previously would generate an
admin-secret. That behavior is maintained by forcing 'admin-secret' to
be in
the missing_fields list. This approach ensures backwards compatibility.

Note that the Juju-generated admin-secret is not available until after
bootstrapping the environment. Due to this behavior, when using juju
v1.16
and not admin-secret is configured in the environments.yaml file, the
failure
will not be reported until after bootstrapping. This approach seemed
better
than introducing hard version checking.

https://code.launchpad.net/~bac/juju-quickstart/auth/+merge/203631

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/57900043/

Affected files (+174, -31 lines):
   A [revision details]
   M quickstart/manage.py
   M quickstart/models/envs.py
   M quickstart/tests/cli/test_views.py
   M quickstart/tests/models/test_envs.py
   M quickstart/tests/test_manage.py

« Back to merge proposal