Merge lp:~frankban/charms/trusty/juju-gui/config-version into lp:~juju-gui/charms/trusty/juju-gui/trunk
Status: | Merged |
---|---|
Merged at revision: | 223 |
Proposed branch: | lp:~frankban/charms/trusty/juju-gui/config-version |
Merge into: | lp:~juju-gui/charms/trusty/juju-gui/trunk |
Diff against target: |
144 lines (+48/-2) 6 files modified
config.yaml (+6/-0) config/config.js.template (+2/-1) hooks/backend.py (+1/-0) hooks/utils.py (+5/-1) tests/test_backends.py (+2/-0) tests/test_utils.py (+32/-0) |
To merge this branch: | bzr merge lp:~frankban/charms/trusty/juju-gui/config-version |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email: mp+244273@code.launchpad.net |
Description of the change
Add the Juju version to the GUI config file.
The version can be specified using a charm option.
If not specified, the Juju version is retrieved
dynamically by calling jujud --version.
Initial implementation by Huw.
Tests: `make unittest`.
QA:
- bootstrap an environment;
- run `make deploy`;
- wait for the unit to be ready;
- run `juju ssh juju-gui/0 cat /var/lib/
and check the Juju version is included in the config file;
- run `juju set juju-gui juju-core-
- check the version is changed to the one specified;
- run `juju unset juju-gui juju-core-version`;
- check the correct version is back in the config file;
- destroy the environment.
Done, thank you!
Reviewers: mp+244273_ code.launchpad. net,
Message:
Please take a look.
Description:
Add the Juju version to the GUI config file.
The version can be specified using a charm option.
If not specified, the Juju version is retrieved
dynamically by calling jujud --version.
Initial implementation by Huw.
Tests: `make unittest`.
QA: juju-gui/ juju-gui/ build-prod/ juju-ui/ assets/ config. js` version= 42.47`;
- bootstrap an environment;
- run `make deploy`;
- wait for the unit to be ready;
- run `juju ssh juju-gui/0 cat
/var/lib/
and check the Juju version is included in the config file;
- run `juju set juju-gui juju-core-
- check the version is changed to the one specified;
- run `juju unset juju-gui juju-core-version`;
- check the correct version is back in the config file;
- destroy the environment.
Done, thank you!
https:/ /code.launchpad .net/~frankban/ charms/ trusty/ juju-gui/ config- version/ +merge/ 244273
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/188890043/
Affected files (+50, -2 lines): config. js.template backends. py
A [revision details]
M config.yaml
M config/
M hooks/backend.py
M hooks/utils.py
M tests/test_
M tests/test_utils.py
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision:
<email address hidden>
Index: config.yaml
=== modified file 'config.yaml'
--- config.yaml 2014-11-14 11:35:36 +0000
+++ config.yaml 2014-12-10 10:19:42 +0000
@@ -193,3 +193,9 @@
fonts will let the GUI load much faster and render properly.
type: boolean
default: false
+ juju-core-version:
+ description: |
+ The version of Juju tools used for the charm deployment. If left
empty,
+ the Juju version is dynamically retrieved.
+ type: string
+ default:
Index: config/ config. js.template config. js.template' config. js.template 2014-02-04 20:07:31 +0000 config. js.template 2014-12-10 03:16:32 +0000 get_juju_ button} } get_juju_ button} }, core_version} }
=== modified file 'config/
--- config/
+++ config/
@@ -25,5 +25,6 @@
sandbox: {{sandbox}},
GA_key: {{ga_key}},
login_help: {{login_help}},
- showGetJujuButton: {{show_
+ showGetJujuButton: {{show_
+ jujuCoreVersion: {{juju_
};
Index: hooks/backend.py
build_dir, secure= config[ 'secure' ], sandbox= config[ 'sandbox' ],
cached_ fonts=config[ 'cached- fonts'] , ga_key= config[ 'ga-key' ],
show_get_ juju_button= config[ 'show-get- juju-button' ], version= config. get('juju- core-version' ),
password= config. get('password' ))
previous_ port = backend. prev_config. get('port' )
=== modified file 'hooks/backend.py'
--- hooks/backend.py 2014-11-14 09:14:54 +0000
+++ hooks/backend.py 2014-12-10 10:47:53 +0000
@@ -131,6 +131,7 @@
+ juju_core_
# Set up TCP ports.
Index: hooks/utils.py
=== modified file 'hooks/utils.py'
--- hooks/utils.py 2014-11-14 13:14:33 +0000
+++ hooks/utils.py 2014-12-10 10:4...