44
44
Determine if the local branch being tested is derived from its
45
45
stable or next (dev) branch, and based on this, use the corresonding
46
46
stable or next branches for the other_services."""
47
base_charms = ['mysql', 'mongodb']
48
# Charms outside the lp:~openstack-charmers namespace
49
base_charms = ['mysql', 'mongodb', 'nrpe']
51
# Force these charms to current series even when using an older series.
52
# ie. Use trusty/nrpe even when series is precise, as the P charm
53
# does not possess the necessary external master config and hooks.
54
force_series_current = ['nrpe']
49
56
if self.series in ['precise', 'trusty']:
50
57
base_series = self.series
52
59
base_series = self.current_next
55
for svc in other_services:
61
for svc in other_services:
62
if svc['name'] in force_series_current:
63
base_series = self.current_next
64
# If a location has been explicitly set, use it
65
if svc.get('location'):
56
68
temp = 'lp:charms/{}/{}'
57
69
svc['location'] = temp.format(base_series,
60
for svc in other_services:
61
72
if svc['name'] in base_charms:
62
73
temp = 'lp:charms/{}/{}'
63
74
svc['location'] = temp.format(base_series,
66
77
temp = 'lp:~openstack-charmers/charms/{}/{}/next'
67
78
svc['location'] = temp.format(self.current_next,
69
81
return other_services
71
83
def _add_services(self, this_service, other_services):
78
90
services = other_services
79
91
services.append(this_service)
93
# Charms which should use the source config option
80
94
use_source = ['mysql', 'mongodb', 'rabbitmq-server', 'ceph',
81
95
'ceph-osd', 'ceph-radosgw']
82
# Most OpenStack subordinate charms do not expose an origin option
83
# as that is controlled by the principle.
84
ignore = ['cinder-ceph', 'hacluster', 'neutron-openvswitch']
97
# Charms which can not use openstack-origin, ie. many subordinates
98
no_origin = ['cinder-ceph', 'hacluster', 'neutron-openvswitch', 'nrpe']
86
100
if self.openstack:
87
101
for svc in services:
88
if svc['name'] not in use_source + ignore:
102
if svc['name'] not in use_source + no_origin:
89
103
config = {'openstack-origin': self.openstack}
90
104
self.d.configure(svc['name'], config)
93
107
for svc in services:
94
if svc['name'] in use_source and svc['name'] not in ignore:
108
if svc['name'] in use_source and svc['name'] not in no_origin:
95
109
config = {'source': self.source}
96
110
self.d.configure(svc['name'], config)