Merge lp://qastaging/~frankban/juju-quickstart/new-auth-api-endpoint into lp://qastaging/juju-quickstart
Status: | Merged |
---|---|
Merged at revision: | 121 |
Proposed branch: | lp://qastaging/~frankban/juju-quickstart/new-auth-api-endpoint |
Merge into: | lp://qastaging/juju-quickstart |
Diff against target: |
1044 lines (+441/-91) 12 files modified
quickstart/app.py (+36/-19) quickstart/jujutools.py (+42/-1) quickstart/manage.py (+19/-7) quickstart/models/charms.py (+4/-0) quickstart/models/jenv.py (+17/-0) quickstart/settings.py (+8/-2) quickstart/tests/helpers.py (+1/-0) quickstart/tests/models/test_charms.py (+28/-0) quickstart/tests/models/test_jenv.py (+24/-0) quickstart/tests/test_app.py (+79/-44) quickstart/tests/test_jujutools.py (+118/-0) quickstart/tests/test_manage.py (+65/-18) |
To merge this branch: | bzr merge lp://qastaging/~frankban/juju-quickstart/new-auth-api-endpoint |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email: mp+249102@code.qastaging.launchpad.net |
Description of the change
Add support for new Juju WebSocket API endpoints.
Recent Juju versions introduced a new API endpoint
path. In essence, instead of the usual
"wss://
"wss://
is used to connect to the API.
This allows for connecting to a specific environment
in a multi-environment state server scenario.
In this branch the new API endpoint is used if a recent
Juju version is in use, and if it is possible to retrieve
the environment UUID from the jenv file.
Also, when connecting to the GUI server (for creating
the auth token or for deploying bundles), use the new
GUI server API endpoints when possible, i.e. when the
charm is recent enough to support redirecting requests
to the new Juju endpoints.
Note that this feature is assumed to land in the next
juju-gui charm release (see settings.py). If that's
not the case, we'll need to increase the charm revisions
in settings.
before releasing the new Quickstart.
Tests: `make check`
QA:
- bootstrap quickstart as usual: `devenv/
- check that, if you are using juju devel (1.22beta), quickstart
properly connect to the new API endpoint;
- run quickstart again to deploy a bundle, e.g.:
`devenv/
- ensure that the deployment request succeeds;
- if possible, do the above with and older version of Juju,
to ensure backward compatibility.
Done, thank you!
Reviewers: mp+249102_ code.launchpad. net,
Message:
Please take a look.
Description:
Add support for new Juju WebSocket API endpoints.
Recent Juju versions introduced a new API endpoint <address> :17070" , the new <address> :17070/ environment/ <env-uuid> /api"
path. In essence, instead of the usual
"wss://
"wss://
is used to connect to the API.
This allows for connecting to a specific environment
in a multi-environment state server scenario.
In this branch the new API endpoint is used if a recent
Juju version is in use, and if it is possible to retrieve
the environment UUID from the jenv file.
Also, when connecting to the GUI server (for creating MINIMUM_ REVISIONS_ FOR_NEW_ API_ENDPOINT
the auth token or for deploying bundles), use the new
GUI server API endpoints when possible, i.e. when the
charm is recent enough to support redirecting requests
to the new Juju endpoints.
Note that this feature is assumed to land in the next
juju-gui charm release (see settings.py). If that's
not the case, we'll need to increase the charm revisions
in settings.
before releasing the new Quickstart.
Tests: `make check`
QA: bin/juju- quickstart` ; bin/juju- quickstart bundle: mediawiki/ single` ;
- bootstrap quickstart as usual: `devenv/
- check that, if you are using juju devel (1.22beta), quickstart
properly connect to the new API endpoint;
- run quickstart again to deploy a bundle, e.g.:
`devenv/
- ensure that the deployment request succeeds;
- if possible, do the above with and older version of Juju,
to ensure backward compatibility.
Done, thank you!
https:/ /code.launchpad .net/~frankban/ juju-quickstart /new-auth- api-endpoint/ +merge/ 249102
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/199490043/
Affected files (+443, -91 lines): jujutools. py manage. py models/ charms. py models/ jenv.py settings. py tests/helpers. py tests/models/ test_charms. py tests/models/ test_jenv. py tests/test_ app.py tests/test_ jujutools. py tests/test_ manage. py
A [revision details]
M quickstart/app.py
M quickstart/
M quickstart/
M quickstart/
M quickstart/
M quickstart/
M quickstart/
M quickstart/
M quickstart/
M quickstart/
M quickstart/
M quickstart/