~frankban/charms/precise/juju-gui/guiserver-async-watcher

  • Committer: Nicola Larosa
  • Date: 2013-07-30 10:14:55 UTC
  • mfrom: (79.1.6 refactor-gui-startup)
  • Revision ID: nicola.larosa@canonical.com-20130730101455-muso2td9nwy2ybln
Refactor for easier builtin server integration.

Refactor the charm code to ease integration of the builtin server.
Detail of the changes, per file:

hooks/backend.py:

- order the mixins code as they are called, to ease readability;
- merge InstallMixin into GuiMixin;
- rename UpstartMixin to HaproxyApacheMixin;
- reimplement GuiMixin.install using the new functions from the split of
  hooks/utils.py#fetch_gui (see below);
- reimplement GuiMixin.start using the new functions from the split of
  hooks/utils.py#start_gui (see below);
- move here the chain and merge functions from hooks/utils.py, renaming
  them to be less generic;
- further simplify the backend constructor code.

hooks/utils.py:

- rename JUJU_GUI_SITE and JUJU_GUI_PORTS to APACHE_SITE and
  APACHE_PORTS respectively;
- split the start_gui function into compute_build_dir, write_gui_config
  and write_haproxy_config;
- split the fetch_gui function into fetch_gui_from_branch and
  fetch_gui_release;
- move the chain and merge functions to hooks/backend.py.

tests/test_backends.py:

- rename, add mocks and reorder to make tests pass again.

tests/test_utils.py:

- rename TestStartStop to TestStartImprovAgentGui;
- split the start_gui function tests in TestStartImprovAgentGui into
  tests for compute_build_dir, write_gui_config, write_haproxy_config
  and write_apache_config;

Sorry for the big diff. It was even bigger, but I moved some of the
changes to a future branch.

R=bac, gary.poster
CC=
https://codereview.appspot.com/12022044
Filename Latest Rev Last Changed Committer Comment Size
..
config 3.2.2 11 years ago Francesco Banconi Base structure of the charm. All hooks translated Diff
exec.d 41.2.1 11 years ago Matthew Wedgwood support for pre-install hooks such as basenode Diff
hooks 3.2.1 11 years ago Francesco Banconi Install hook. Diff
server 71.1.1 11 years ago Francesco Banconi Base structure for the server. Diff
tests 3.1.1 11 years ago Benji York initial project structure, especially tests Diff
.bzrignore 71.1.13 11 years ago Francesco Banconi Update bzrignore. 89 bytes Diff Download File
.lbox 62.1.1 11 years ago Brad Crittenden Add .lbox for specifying the target branch 60 bytes Diff Download File
File .lbox.check 65.3.10 11 years ago Francesco Banconi lbox.check fix. 30 bytes Diff Download File
config.yaml 70.1.3 11 years ago j.c.sackett Changed setting name to match actual app setting. 7.2 KB Diff Download File
COPYING 65.2.1 11 years ago Nicola Larosa Added the COPYING file, and headers to source file 33.7 KB Diff Download File
copyright 65.2.1 11 years ago Nicola Larosa Added the COPYING file, and headers to source file 770 bytes Diff Download File
Dependencies.md 71.2.1 11 years ago Nicola Larosa Very first server docs. 2.3 KB Diff Download File
HACKING.md 60.2.7 11 years ago Gary Poster merge ~juju-gui charm 6.3 KB Diff Download File
icon.svg 42.1.1 11 years ago Benjamin Saller basic apache support 8.8 KB Diff Download File
Makefile 71.1.5 11 years ago Francesco Banconi Integrate the server in the testing/lint environme 2.3 KB Diff Download File
metadata.yaml 65.2.2 11 years ago Nicola Larosa Add headers to Makefile and YAML files. 1 KB Diff Download File
Operation.md 79.1.5 11 years ago Nicola Larosa Move not urgent changes to other branch to make th 1.1 KB Diff Download File
README.md 71.1.15 11 years ago Francesco Banconi Merged trunk. 3.6 KB Diff Download File
revision 78.1.7 11 years ago Francesco Banconi Bumped revision up. 3 bytes Diff Download File