~le-charmers/charms/trusty/rabbitmq-server/leadership-election

« back to all changes in this revision

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

  • Committer: Liam Young
  • Date: 2015-05-11 08:03:57 UTC
  • mfrom: (83.1.14 rabbitmq-server)
  • Revision ID: liam.young@canonical.com-20150511080357-3ftop9kxb6o0e3mq
Merged trunk in + LE charmhelper sync

Show diffs side-by-side

added added

removed removed

Lines of Context:
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', 'rabbitmq-server']
 
47
        base_charms = ['mysql', 'mongodb']
 
48
 
 
49
        if self.series in ['precise', 'trusty']:
 
50
            base_series = self.series
 
51
        else:
 
52
            base_series = self.current_next
48
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) = range(8)
 
112
         self.trusty_icehouse, self.trusty_juno, self.utopic_juno,
 
113
         self.trusty_kilo, self.vivid_kilo) = range(10)
 
114
 
105
115
        releases = {
106
116
            ('precise', None): self.precise_essex,
107
117
            ('precise', 'cloud:precise-folsom'): self.precise_folsom,
110
120
            ('precise', 'cloud:precise-icehouse'): self.precise_icehouse,
111
121
            ('trusty', None): self.trusty_icehouse,
112
122
            ('trusty', 'cloud:trusty-juno'): self.trusty_juno,
113
 
            ('trusty', 'cloud:trusty-kilo'): self.trusty_kilo}
 
123
            ('trusty', 'cloud:trusty-kilo'): self.trusty_kilo,
 
124
            ('utopic', None): self.utopic_juno,
 
125
            ('vivid', None): self.vivid_kilo}
114
126
        return releases[(self.series, self.openstack)]
115
127
 
116
128
    def _get_openstack_release_string(self):