Merge lp:~1chb1n/charm-helpers/charm-helpers.liberty-fetch-init into lp:charm-helpers

Proposed by Ryan Beisner
Status: Merged
Merged at revision: 425
Proposed branch: lp:~1chb1n/charm-helpers/charm-helpers.liberty-fetch-init
Merge into: lp:charm-helpers
Diff against target: 79 lines (+25/-5)
3 files modified
charmhelpers/contrib/amulet/utils.py (+15/-3)
charmhelpers/contrib/openstack/amulet/deployment.py (+2/-2)
charmhelpers/fetch/__init__.py (+8/-0)
To merge this branch: bzr merge lp:~1chb1n/charm-helpers/charm-helpers.liberty-fetch-init
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+267515@code.launchpad.net

Commit message

add liberty to fetch/init; update amulet helpers for pid, nrpe and service tests.

Description of the change

add liberty to fetch/init; update amulet helpers for pid, nrpe and service tests.

To post a comment you must log in.
428. By Ryan Beisner

lint cleanup

429. By Ryan Beisner

add nrpe to amulet helper for base charm url calculation

430. By Ryan Beisner

ignore nrpe in amulet helper for setting openstack-origin

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'charmhelpers/contrib/amulet/utils.py'
2--- charmhelpers/contrib/amulet/utils.py 2015-06-29 13:19:46 +0000
3+++ charmhelpers/contrib/amulet/utils.py 2015-08-10 19:56:46 +0000
4@@ -142,7 +142,7 @@
5
6 for service_name in services_list:
7 if (self.ubuntu_releases.index(release) >= systemd_switch or
8- service_name == "rabbitmq-server"):
9+ service_name in ['rabbitmq-server', 'apache2']):
10 # init is systemd
11 cmd = 'sudo service {} status'.format(service_name)
12 elif self.ubuntu_releases.index(release) < systemd_switch:
13@@ -507,11 +507,23 @@
14 '{}'.format(e_proc_name, a_proc_name))
15
16 a_pids_length = len(a_pids)
17- if e_pids_length != a_pids_length:
18- return ('PID count mismatch. {} ({}) expected, actual: '
19+ fail_msg = ('PID count mismatch. {} ({}) expected, actual: '
20 '{}, {} ({})'.format(e_sentry_name, e_proc_name,
21 e_pids_length, a_pids_length,
22 a_pids))
23+
24+ # If expected is not bool, ensure PID quantities match
25+ if not isinstance(e_pids_length, bool) and \
26+ a_pids_length != e_pids_length:
27+ return fail_msg
28+ # If expected is bool True, ensure 1 or more PIDs exist
29+ elif isinstance(e_pids_length, bool) and \
30+ e_pids_length is True and a_pids_length < 1:
31+ return fail_msg
32+ # If expected is bool False, ensure 0 PIDs exist
33+ elif isinstance(e_pids_length, bool) and \
34+ e_pids_length is False and a_pids_length != 0:
35+ return fail_msg
36 else:
37 self.log.debug('PID check OK: {} {} {}: '
38 '{}'.format(e_sentry_name, e_proc_name,
39
40=== modified file 'charmhelpers/contrib/openstack/amulet/deployment.py'
41--- charmhelpers/contrib/openstack/amulet/deployment.py 2015-06-29 13:19:46 +0000
42+++ charmhelpers/contrib/openstack/amulet/deployment.py 2015-08-10 19:56:46 +0000
43@@ -44,7 +44,7 @@
44 Determine if the local branch being tested is derived from its
45 stable or next (dev) branch, and based on this, use the corresonding
46 stable or next branches for the other_services."""
47- base_charms = ['mysql', 'mongodb']
48+ base_charms = ['mysql', 'mongodb', 'nrpe']
49
50 if self.series in ['precise', 'trusty']:
51 base_series = self.series
52@@ -81,7 +81,7 @@
53 'ceph-osd', 'ceph-radosgw']
54 # Most OpenStack subordinate charms do not expose an origin option
55 # as that is controlled by the principle.
56- ignore = ['cinder-ceph', 'hacluster', 'neutron-openvswitch']
57+ ignore = ['cinder-ceph', 'hacluster', 'neutron-openvswitch', 'nrpe']
58
59 if self.openstack:
60 for svc in services:
61
62=== modified file 'charmhelpers/fetch/__init__.py'
63--- charmhelpers/fetch/__init__.py 2015-07-09 19:56:05 +0000
64+++ charmhelpers/fetch/__init__.py 2015-08-10 19:56:46 +0000
65@@ -90,6 +90,14 @@
66 'kilo/proposed': 'trusty-proposed/kilo',
67 'trusty-kilo/proposed': 'trusty-proposed/kilo',
68 'trusty-proposed/kilo': 'trusty-proposed/kilo',
69+ # Liberty
70+ 'liberty': 'trusty-updates/liberty',
71+ 'trusty-liberty': 'trusty-updates/liberty',
72+ 'trusty-liberty/updates': 'trusty-updates/liberty',
73+ 'trusty-updates/liberty': 'trusty-updates/liberty',
74+ 'liberty/proposed': 'trusty-proposed/liberty',
75+ 'trusty-liberty/proposed': 'trusty-proposed/liberty',
76+ 'trusty-proposed/liberty': 'trusty-proposed/liberty',
77 }
78
79 # The order of this list is very important. Handlers should be listed in from

Subscribers

People subscribed via source and target branches