~openstack-charmers-archive/charms/precise/ceph-radosgw/trunk

« back to all changes in this revision

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

[beisner,r=james-page] auto normalize amulet test definitions and amulet make targets; charm-helper 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,
 
105
         self.utopic_juno, self.vivid_kilo) = range(10)
104
106
        releases = {
105
107
            ('precise', None): self.precise_essex,
106
108
            ('precise', 'cloud:precise-folsom'): self.precise_folsom,
107
109
            ('precise', 'cloud:precise-grizzly'): self.precise_grizzly,
108
110
            ('precise', 'cloud:precise-havana'): self.precise_havana,
109
111
            ('precise', 'cloud:precise-icehouse'): self.precise_icehouse,
110
 
            ('trusty', None): self.trusty_icehouse}
 
112
            ('trusty', None): self.trusty_icehouse,
 
113
            ('trusty', 'cloud:trusty-juno'): self.trusty_juno,
 
114
            ('trusty', 'cloud:trusty-kilo'): self.trusty_kilo,
 
115
            ('utopic', None): self.utopic_juno,
 
116
            ('vivid', None): self.vivid_kilo}
111
117
        return releases[(self.series, self.openstack)]
 
118
 
 
119
    def _get_openstack_release_string(self):
 
120
        """Get openstack release string.
 
121
 
 
122
           Return a string representing the openstack release.
 
123
           """
 
124
        releases = OrderedDict([
 
125
            ('precise', 'essex'),
 
126
            ('quantal', 'folsom'),
 
127
            ('raring', 'grizzly'),
 
128
            ('saucy', 'havana'),
 
129
            ('trusty', 'icehouse'),
 
130
            ('utopic', 'juno'),
 
131
            ('vivid', 'kilo'),
 
132
        ])
 
133
        if self.openstack:
 
134
            os_origin = self.openstack.split(':')[1]
 
135
            return os_origin.split('%s-' % self.series)[1].split('/')[0]
 
136
        else:
 
137
            return releases[self.series]