Merge lp:~gnuoy/charm-helpers/amulet-test-updates into lp:charm-helpers

Proposed by Liam Young
Status: Merged
Merged at revision: 448
Proposed branch: lp:~gnuoy/charm-helpers/amulet-test-updates
Merge into: lp:charm-helpers
Diff against target: 63 lines (+13/-12)
2 files modified
charmhelpers/contrib/amulet/deployment.py (+4/-2)
charmhelpers/contrib/openstack/amulet/deployment.py (+9/-10)
To merge this branch: bzr merge lp:~gnuoy/charm-helpers/amulet-test-updates
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+270878@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'charmhelpers/contrib/amulet/deployment.py'
2--- charmhelpers/contrib/amulet/deployment.py 2015-01-22 06:06:03 +0000
3+++ charmhelpers/contrib/amulet/deployment.py 2015-09-12 10:12:34 +0000
4@@ -51,7 +51,8 @@
5 if 'units' not in this_service:
6 this_service['units'] = 1
7
8- self.d.add(this_service['name'], units=this_service['units'])
9+ self.d.add(this_service['name'], units=this_service['units'],
10+ constraints=this_service.get('constraints'))
11
12 for svc in other_services:
13 if 'location' in svc:
14@@ -64,7 +65,8 @@
15 if 'units' not in svc:
16 svc['units'] = 1
17
18- self.d.add(svc['name'], charm=branch_location, units=svc['units'])
19+ self.d.add(svc['name'], charm=branch_location, units=svc['units'],
20+ constraints=svc.get('constraints'))
21
22 def _add_relations(self, relations):
23 """Add all of the relations for the services."""
24
25=== modified file 'charmhelpers/contrib/openstack/amulet/deployment.py'
26--- charmhelpers/contrib/openstack/amulet/deployment.py 2015-08-13 18:54:45 +0000
27+++ charmhelpers/contrib/openstack/amulet/deployment.py 2015-09-12 10:12:34 +0000
28@@ -58,19 +58,17 @@
29 else:
30 base_series = self.current_next
31
32- if self.stable:
33- for svc in other_services:
34- if svc['name'] in force_series_current:
35- base_series = self.current_next
36-
37+ for svc in other_services:
38+ if svc['name'] in force_series_current:
39+ base_series = self.current_next
40+ # If a location has been explicitly set, use it
41+ if svc.get('location'):
42+ continue
43+ if self.stable:
44 temp = 'lp:charms/{}/{}'
45 svc['location'] = temp.format(base_series,
46 svc['name'])
47- else:
48- for svc in other_services:
49- if svc['name'] in force_series_current:
50- base_series = self.current_next
51-
52+ else:
53 if svc['name'] in base_charms:
54 temp = 'lp:charms/{}/{}'
55 svc['location'] = temp.format(base_series,
56@@ -79,6 +77,7 @@
57 temp = 'lp:~openstack-charmers/charms/{}/{}/next'
58 svc['location'] = temp.format(self.current_next,
59 svc['name'])
60+
61 return other_services
62
63 def _add_services(self, this_service, other_services):

Subscribers

People subscribed via source and target branches