Merge lp:~aisrael/charms/precise/hacluster/fix-charm-proof-lint-test into lp:charms/hacluster

Proposed by Adam Israel
Status: Needs review
Proposed branch: lp:~aisrael/charms/precise/hacluster/fix-charm-proof-lint-test
Merge into: lp:charms/hacluster
Diff against target: 74 lines (+13/-3)
4 files modified
Makefile (+7/-2)
config.yaml (+3/-0)
hooks/hooks.py (+1/-1)
metadata.yaml (+2/-0)
To merge this branch: bzr merge lp:~aisrael/charms/precise/hacluster/fix-charm-proof-lint-test
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+234363@code.launchpad.net

Description of the change

Fixed charm proof warnings and make lint/test failures.

To post a comment you must log in.

Unmerged revisions

24. By Adam Israel

Add categories to metadata.yaml, default: stanzas to config.yaml, and generic icon.svg, in order to pass charm proof
Fixed error in hooks.py so make lint passes
Added virtualenv to Makefile so that make test passes
Added empty unit_test directory so make test passes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2014-04-11 09:57:50 +0000
3+++ Makefile 2014-09-11 19:00:42 +0000
4@@ -1,13 +1,18 @@
5 #!/usr/bin/make
6 PYTHON := /usr/bin/env python
7
8+.venv:
9+ sudo apt-get install -y python-apt python-virtualenv
10+ virtualenv .venv --system-site-packages
11+ .venv/bin/pip install -I nose testtools mock
12 lint:
13 @flake8 --exclude hooks/charmhelpers hooks
14 @charm proof
15
16-test:
17+test: .venv
18 @echo Starting tests...
19- @$(PYTHON) /usr/bin/nosetests --nologcapture --with-coverage unit_tests
20+ .venv/bin/nosetests --nologcapture --with-coverage unit_tests
21
22 sync:
23 @charm-helper-sync -c charm-helpers.yaml
24+
25
26=== modified file 'config.yaml'
27--- config.yaml 2014-01-29 20:48:59 +0000
28+++ config.yaml 2014-09-11 19:00:42 +0000
29@@ -32,9 +32,11 @@
30 This requires MAAS credentials be provided and each node's power
31 parameters are properly configured in its invenvory.
32 maas_url:
33+ default:
34 type: string
35 description: MAAS API endpoint (required for STONITH).
36 maas_credentials:
37+ default:
38 type: string
39 description: MAAS credentials (required for STONITH).
40 cluster_count:
41@@ -42,6 +44,7 @@
42 default: 2
43 description: Number of peer units required to bootstrap cluster services.
44 monitor_host:
45+ default:
46 type: string
47 description: |
48 One or more IPs, separated by space, that will be used as a saftey check
49
50=== modified file 'hooks/hooks.py'
51--- hooks/hooks.py 2014-04-11 10:14:56 +0000
52+++ hooks/hooks.py 2014-09-11 19:00:42 +0000
53@@ -260,7 +260,7 @@
54 # Put the services in HA, if not already done so
55 # if not pcmk.is_resource_present(res_name):
56 if not pcmk.crm_opt_exists(res_name):
57- if not res_name in resource_params:
58+ if res_name not in resource_params:
59 cmd = 'crm -w -F configure primitive %s %s' % (res_name,
60 res_type)
61 else:
62
63=== modified file 'metadata.yaml'
64--- metadata.yaml 2012-11-20 20:06:11 +0000
65+++ metadata.yaml 2014-09-11 19:00:42 +0000
66@@ -4,6 +4,8 @@
67 subordinate: true
68 description: |
69 Corosync/Pacemaker
70+categories:
71+- misc
72 requires:
73 juju-info:
74 interface: juju-info

Subscribers

People subscribed via source and target branches