lp://staging/~frankban/charms/precise/juju-gui/ftests-fixes

Created by Francesco Banconi and last modified
Get this branch:
bzr branch lp://staging/~frankban/charms/precise/juju-gui/ftests-fixes
Only Francesco Banconi can upload to this branch. If you are Francesco Banconi please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Francesco Banconi
Status:
Development

Recent revisions

89. By Francesco Banconi

Updated test.

88. By Francesco Banconi

Checkpoint.

87. By Nicola Larosa

Refactor the config generation logic.

As requested by reviews, change the server configuration generation logic
so that the various server configuration files are present on the
filesystem only for the actually deployed and started servers.

This is implemented by creating additional start_* and stop_* functions
in hooks/utils.py, called by the mixins in hooks/backend.py, and moving
there/creating the logic that generates, writes and remove the various
configuration files.

In addition:

- factor out common SSL code between HaproxyApacheMixin and
  BuiltinServerMixin;
- rename options.http to options.insecure in server/guiserver/manage.py
- remove unused code and backend properties;
- miscellaneous cleanup.

The diff is still a bit big, even after moving the builtin server
integration changes to another branch. Sorry about that.

R=frankban, bac
CC=
https://codereview.appspot.com/12467044

86. By Francesco Banconi

Authentication fixes.

Fixed an error in the guiserver authentication
when the request id is set to 0.

Moved the auth_backend from the app to the
handler: it is only relevant in the WebSocketHandler
context.

Some clean up in the tests.

R=benjamin.saller, matthew.scott
CC=
https://codereview.appspot.com/12612043

85. By Francesco Banconi

Merged charmers trunk.

84. By Francesco Banconi

Merged charmers trunk.

83. By Madison Scott-Clary

Merge readme.

82. By Francesco Banconi

Support serving the GUI over a non secure conn.

The GUI server can be configured to run the
GUI static files server and the WebSocket server over
an HTTP connection.
This way we support the secure=false charm option.

Tests:
  Run `make unittest` from the branch root.

R=gary.poster, teknico
CC=
https://codereview.appspot.com/12088046

81. By Nicola Larosa

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

80. By Francesco Banconi

GUI server supports serving GUI tests.

Added support for serving GUI unit tests
from the Tornado server if the --servetest
parameter is passed.

Also added support for the "ssl-cert-path"
option: the path where the SSL key and cert
files are stored.

Tests:
Run `make unittest` from the branch root.

R=teknico, gary.poster
CC=
https://codereview.appspot.com/11841043

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp://staging/charms/juju-gui
This branch contains Public information 
Everyone can see this information.