~axwalk/charms/trusty/ceph/trunk

« back to all changes in this revision

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

  • Committer: Liam Young
  • Date: 2015-04-16 10:27:24 UTC
  • Revision ID: liam.young@canonical.com-20150416102724-yt527xwgyvv3gd53
[gnuoy,trivial] Pre-release charmhelper sync

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
16
16
 
17
17
import six
 
18
from collections import OrderedDict
18
19
from charmhelpers.contrib.amulet.deployment import (
19
20
    AmuletDeployment
20
21
)
43
44
           Determine if the local branch being tested is derived from its
44
45
           stable or next (dev) branch, and based on this, use the corresonding
45
46
           stable or next branches for the other_services."""
46
 
        base_charms = ['mysql', 'mongodb', 'rabbitmq-server']
 
47
        base_charms = ['mysql', 'mongodb']
47
48
 
48
49
        if self.stable:
49
50
            for svc in other_services:
100
101
           """
101
102
        (self.precise_essex, self.precise_folsom, self.precise_grizzly,
102
103
         self.precise_havana, self.precise_icehouse,
103
 
         self.trusty_icehouse) = range(6)
 
104
         self.trusty_icehouse, self.trusty_juno, self.trusty_kilo) = range(8)
104
105
        releases = {
105
106
            ('precise', None): self.precise_essex,
106
107
            ('precise', 'cloud:precise-folsom'): self.precise_folsom,
107
108
            ('precise', 'cloud:precise-grizzly'): self.precise_grizzly,
108
109
            ('precise', 'cloud:precise-havana'): self.precise_havana,
109
110
            ('precise', 'cloud:precise-icehouse'): self.precise_icehouse,
110
 
            ('trusty', None): self.trusty_icehouse}
 
111
            ('trusty', None): self.trusty_icehouse,
 
112
            ('trusty', 'cloud:trusty-juno'): self.trusty_juno,
 
113
            ('trusty', 'cloud:trusty-kilo'): self.trusty_kilo}
111
114
        return releases[(self.series, self.openstack)]
 
115
 
 
116
    def _get_openstack_release_string(self):
 
117
        """Get openstack release string.
 
118
 
 
119
           Return a string representing the openstack release.
 
120
           """
 
121
        releases = OrderedDict([
 
122
            ('precise', 'essex'),
 
123
            ('quantal', 'folsom'),
 
124
            ('raring', 'grizzly'),
 
125
            ('saucy', 'havana'),
 
126
            ('trusty', 'icehouse'),
 
127
            ('utopic', 'juno'),
 
128
            ('vivid', 'kilo'),
 
129
        ])
 
130
        if self.openstack:
 
131
            os_origin = self.openstack.split(':')[1]
 
132
            return os_origin.split('%s-' % self.series)[1].split('/')[0]
 
133
        else:
 
134
            return releases[self.series]