Overall looks good. I just ran a deploy of 3 units in front of apache, everything worked as expected. Please note that i didn't
tried any specific configuration option, just the vanilla installation.
Proofing charm.. OK
Tests runs .. OK
LInt ... OK
The test coverage , looks pretty good ;
hooks 553 80 86%
Only a few comments:
1) By default my system uses python 3.4 instead of 2.7, and this causes the 'make test' command to fail, since
the synchronized charmhelpers and the hooks code are not compatible with python 3.4, adding the following
lines will force the usage of 2.7.
@lazypower,
Overall looks good. I just ran a deploy of 3 units in front of apache, everything worked as expected. Please note that i didn't
tried any specific configuration option, just the vanilla installation.
Proofing charm.. OK
Tests runs .. OK
LInt ... OK
The test coverage , looks pretty good ;
hooks 553 80 86%
Only a few comments:
1) By default my system uses python 3.4 instead of 2.7, and this causes the 'make test' command to fail, since
the synchronized charmhelpers and the hooks code are not compatible with python 3.4, adding the following
lines will force the usage of 2.7.
=== modified file 'Makefile'
--- Makefile 2014-09-11 18:50:46 +0000
+++ Makefile 2014-10-01 22:29:02 +0000
@@ -19,7 +19,7 @@
.venv: site-packages site-packages
sudo apt-get install -y python-apt python-virtualenv
- virtualenv .venv --system-
+ virtualenv --python=python2.7 .venv --system-
.venv/bin/pip install -I nose testtools mock pyyaml
test: .venv
2) The following lines could be factorized using the @hooks. hook("hook_ name") decorator:
if hook_name == "install":
install_ hook()
install_ hook()
config_ changed( )
update_ nrpe_config( )
config_ changed( )
update_ nrpe_config( )
start_ hook() relation- broken" :
config_ changed( ) relation- changed" :
reverseproxy_ interface( "changed" ) relation- departed" :
reverseproxy_ interface( "departed" ) relation- joined" :
website_ interface( "joined" ) relation- changed" :
website_ interface( "changed" ) joined" :
website_ interface( "joined" ) changed" :
reverseproxy_ interface( "changed" ) external- master- relation- joined" ,
"local- monitors- relation- joined" ):
update_ nrpe_config( )
elif hook_name == "upgrade-charm":
elif hook_name == "config-changed":
elif hook_name == "start":
elif hook_name == "stop":
stop_hook()
elif hook_name == "reverseproxy-
elif hook_name == "reverseproxy-
elif hook_name == "reverseproxy-
elif hook_name == "website-
elif hook_name == "website-
elif hook_name == "peer-relation-
elif hook_name == "peer-relation-
elif hook_name in ("nrpe-
else:
print "Unknown hook
3) Method's documentation is not complaining with python docstrings ( http:// legacy. python. org/dev/ peps/pep- 0257/ )