~1chb1n/charms/trusty/cinder-ceph/next.1601-test-update2

« back to all changes in this revision

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

  • Committer: James Page
  • Date: 2015-10-08 23:44:50 UTC
  • mfrom: (44.1.1 cinder-ceph)
  • Revision ID: james.page@ubuntu.com-20151008234450-u3n2c74xbpue41l3
Tags: 15.10
Add support for unit status

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
        else:
59
59
            base_series = self.current_next
60
60
 
61
 
        if self.stable:
62
 
            for svc in other_services:
63
 
                if svc['name'] in force_series_current:
64
 
                    base_series = self.current_next
65
 
 
 
61
        for svc in other_services:
 
62
            if svc['name'] in force_series_current:
 
63
                base_series = self.current_next
 
64
            # If a location has been explicitly set, use it
 
65
            if svc.get('location'):
 
66
                continue
 
67
            if self.stable:
66
68
                temp = 'lp:charms/{}/{}'
67
69
                svc['location'] = temp.format(base_series,
68
70
                                              svc['name'])
69
 
        else:
70
 
            for svc in other_services:
71
 
                if svc['name'] in force_series_current:
72
 
                    base_series = self.current_next
73
 
 
 
71
            else:
74
72
                if svc['name'] in base_charms:
75
73
                    temp = 'lp:charms/{}/{}'
76
74
                    svc['location'] = temp.format(base_series,
79
77
                    temp = 'lp:~openstack-charmers/charms/{}/{}/next'
80
78
                    svc['location'] = temp.format(self.current_next,
81
79
                                                  svc['name'])
 
80
 
82
81
        return other_services
83
82
 
84
83
    def _add_services(self, this_service, other_services):