Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(856)

Unified Diff: juju/conn.go

Issue 9824043: Move assignment policy to global env config (Closed)
Patch Set: Move assignment policy to global env config Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « environs/openstack/provider.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: juju/conn.go
=== modified file 'juju/conn.go'
--- juju/conn.go 2013-05-31 01:02:53 +0000
+++ juju/conn.go 2013-06-10 10:30:13 +0000
@@ -292,10 +292,9 @@
// to them as necessary.
func (conn *Conn) AddUnits(svc *state.Service, n int, mid string) ([]*state.Unit, error) {
units := make([]*state.Unit, n)
- // TODO store AssignmentPolicy in state, thus removing the need for this
- // to use conn.Environ (so the method can be moved off Conn, and into
- // State.
- policy := conn.Environ.AssignmentPolicy()
+ // Hard code for now till we implement a constraints based approach.
+ // We currently only support AssignNew.
+ policy := state.AssignNew
// TODO what do we do if we fail half-way through this process?
for i := 0; i < n; i++ {
unit, err := svc.AddUnit()
« no previous file with comments | « environs/openstack/provider.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b