43
43
self.openstack = openstack
44
44
self.source = source
45
45
self.stable = stable
46
# Note(coreycb): this needs to be changed when new next branches come
48
self.current_next = "trusty"
50
47
def get_logger(self, name="deployment-logger", level=logging.DEBUG):
51
48
"""Get a logger object that will log to stdout."""
73
70
self.log.info('OpenStackAmuletDeployment: determine branch locations')
75
# Charms outside the lp:~openstack-charmers namespace
76
base_charms = ['mysql', 'mongodb', 'nrpe']
78
# Force these charms to current series even when using an older series.
79
# ie. Use trusty/nrpe even when series is precise, as the P charm
80
# does not possess the necessary external master config and hooks.
81
force_series_current = ['nrpe']
83
if self.series in ['precise', 'trusty']:
84
base_series = self.series
86
base_series = self.current_next
72
# Charms outside the ~openstack-charmers
74
'mysql': ['precise', 'trusty'],
75
'mongodb': ['precise', 'trusty'],
76
'nrpe': ['precise', 'trusty'],
88
79
for svc in other_services:
89
if svc['name'] in force_series_current:
90
base_series = self.current_next
91
80
# If a location has been explicitly set, use it
92
81
if svc.get('location'):
95
temp = 'lp:charms/{}/{}'
96
svc['location'] = temp.format(base_series,
83
if svc['name'] in base_charms:
84
# NOTE: not all charms have support for all series we
85
# want/need to test against, so fix to most recent
86
# that each base charm supports
87
target_series = self.series
88
if self.series not in base_charms[svc['name']]:
89
target_series = base_charms[svc['name']][-1]
90
svc['location'] = 'cs:{}/{}'.format(target_series,
93
svc['location'] = 'cs:{}/{}'.format(self.series,
99
if svc['name'] in base_charms:
100
temp = 'lp:charms/{}/{}'
101
svc['location'] = temp.format(base_series,
104
temp = 'lp:~openstack-charmers/charms/{}/{}/next'
105
svc['location'] = temp.format(self.current_next,
96
svc['location'] = 'cs:~openstack-charmers-next/{}/{}'.format(
108
101
return other_services