~billy-olsen/charms/trusty/glance/backport-lp1398182

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/openstack/amulet/deployment.py

  • Committer: Liam Young
  • Date: 2015-04-23 14:52:07 UTC
  • Revision ID: liam.young@canonical.com-20150423145207-o44dsomh1hvlpawp
Tags: 15.04
[gnuoy,trivial] Pre-release charmhelper sync

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
           stable or next branches for the other_services."""
47
47
        base_charms = ['mysql', 'mongodb']
48
48
 
 
49
        if self.series in ['precise', 'trusty']:
 
50
            base_series = self.series
 
51
        else:
 
52
            base_series = self.current_next
 
53
 
49
54
        if self.stable:
50
55
            for svc in other_services:
51
 
                temp = 'lp:charms/{}'
52
 
                svc['location'] = temp.format(svc['name'])
 
56
                temp = 'lp:charms/{}/{}'
 
57
                svc['location'] = temp.format(base_series,
 
58
                                              svc['name'])
53
59
        else:
54
60
            for svc in other_services:
55
61
                if svc['name'] in base_charms:
56
 
                    temp = 'lp:charms/{}'
57
 
                    svc['location'] = temp.format(svc['name'])
 
62
                    temp = 'lp:charms/{}/{}'
 
63
                    svc['location'] = temp.format(base_series,
 
64
                                                  svc['name'])
58
65
                else:
59
66
                    temp = 'lp:~openstack-charmers/charms/{}/{}/next'
60
67
                    svc['location'] = temp.format(self.current_next,
99
106
           Return an integer representing the enum value of the openstack
100
107
           release.
101
108
           """
 
109
        # Must be ordered by OpenStack release (not by Ubuntu release):
102
110
        (self.precise_essex, self.precise_folsom, self.precise_grizzly,
103
111
         self.precise_havana, self.precise_icehouse,
104
 
         self.trusty_icehouse, self.trusty_juno, self.trusty_kilo,
105
 
         self.utopic_juno, self.vivid_kilo) = range(10)
 
112
         self.trusty_icehouse, self.trusty_juno, self.utopic_juno,
 
113
         self.trusty_kilo, self.vivid_kilo) = range(10)
 
114
 
106
115
        releases = {
107
116
            ('precise', None): self.precise_essex,
108
117
            ('precise', 'cloud:precise-folsom'): self.precise_folsom,