~1chb1n/charms/trusty/nova-cloud-controller/15.10-stable-flip-tests-helper-syncs

« back to all changes in this revision

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

  • Committer: james.page at ubuntu
  • Date: 2015-08-10 16:36:50 UTC
  • Revision ID: james.page@ubuntu.com-20150810163650-bpjo4l0dru4txcji
Tags: 15.07
[gnuoy] 15.07 Charm release

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
        services.append(this_service)
80
80
        use_source = ['mysql', 'mongodb', 'rabbitmq-server', 'ceph',
81
81
                      'ceph-osd', 'ceph-radosgw']
82
 
        # Openstack subordinate charms do not expose an origin option as that
83
 
        # is controlled by the principle
84
 
        ignore = ['neutron-openvswitch']
 
82
        # Most OpenStack subordinate charms do not expose an origin option
 
83
        # as that is controlled by the principle.
 
84
        ignore = ['cinder-ceph', 'hacluster', 'neutron-openvswitch']
85
85
 
86
86
        if self.openstack:
87
87
            for svc in services:
110
110
        (self.precise_essex, self.precise_folsom, self.precise_grizzly,
111
111
         self.precise_havana, self.precise_icehouse,
112
112
         self.trusty_icehouse, self.trusty_juno, self.utopic_juno,
113
 
         self.trusty_kilo, self.vivid_kilo) = range(10)
 
113
         self.trusty_kilo, self.vivid_kilo, self.trusty_liberty,
 
114
         self.wily_liberty) = range(12)
114
115
 
115
116
        releases = {
116
117
            ('precise', None): self.precise_essex,
121
122
            ('trusty', None): self.trusty_icehouse,
122
123
            ('trusty', 'cloud:trusty-juno'): self.trusty_juno,
123
124
            ('trusty', 'cloud:trusty-kilo'): self.trusty_kilo,
 
125
            ('trusty', 'cloud:trusty-liberty'): self.trusty_liberty,
124
126
            ('utopic', None): self.utopic_juno,
125
 
            ('vivid', None): self.vivid_kilo}
 
127
            ('vivid', None): self.vivid_kilo,
 
128
            ('wily', None): self.wily_liberty}
126
129
        return releases[(self.series, self.openstack)]
127
130
 
128
131
    def _get_openstack_release_string(self):
138
141
            ('trusty', 'icehouse'),
139
142
            ('utopic', 'juno'),
140
143
            ('vivid', 'kilo'),
 
144
            ('wily', 'liberty'),
141
145
        ])
142
146
        if self.openstack:
143
147
            os_origin = self.openstack.split(':')[1]
144
148
            return os_origin.split('%s-' % self.series)[1].split('/')[0]
145
149
        else:
146
150
            return releases[self.series]
 
151
 
 
152
    def get_ceph_expected_pools(self, radosgw=False):
 
153
        """Return a list of expected ceph pools in a ceph + cinder + glance
 
154
        test scenario, based on OpenStack release and whether ceph radosgw
 
155
        is flagged as present or not."""
 
156
 
 
157
        if self._get_openstack_release() >= self.trusty_kilo:
 
158
            # Kilo or later
 
159
            pools = [
 
160
                'rbd',
 
161
                'cinder',
 
162
                'glance'
 
163
            ]
 
164
        else:
 
165
            # Juno or earlier
 
166
            pools = [
 
167
                'data',
 
168
                'metadata',
 
169
                'rbd',
 
170
                'cinder',
 
171
                'glance'
 
172
            ]
 
173
 
 
174
        if radosgw:
 
175
            pools.extend([
 
176
                '.rgw.root',
 
177
                '.rgw.control',
 
178
                '.rgw',
 
179
                '.rgw.gc',
 
180
                '.users.uid'
 
181
            ])
 
182
 
 
183
        return pools