~ubuntu-branches/ubuntu/trusty/juju-core/trusty

« back to all changes in this revision

Viewing changes to src/launchpad.net/juju-core/state/environ.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-03-24 16:05:44 UTC
  • mfrom: (1.1.20)
  • Revision ID: package-import@ubuntu.com-20140324160544-g8lsfufby18d5fj4
Tags: 1.17.6-0ubuntu1
* New upstream point release, including fixes for:
  - br0 not bought up by cloud-init with MAAS provider (LP: #1271144).
  - ppc64el enablement for juju/lxc (LP: #1273769).
  - juju userdata should not restart networking (LP: #1248283).
  - error detecting hardware characteristics (LP: #1276909).
  - juju instances not including the default security group (LP: #1129720).
  - juju bootstrap does not honor https_proxy (LP: #1240260).
* d/control,rules: Drop BD on bash-completion, install bash-completion
  direct from upstream source code.
* d/rules: Set HOME prior to generating man pages.
* d/control: Drop alternative dependency on mongodb-server; juju now only
  works on trusty with juju-mongodb.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
import (
7
7
        "labix.org/v2/mgo"
 
8
        "labix.org/v2/mgo/bson"
8
9
        "labix.org/v2/mgo/txn"
9
10
 
10
11
        "launchpad.net/juju-core/errors"
102
103
        ops := []txn.Op{{
103
104
                C:      e.st.environments.Name,
104
105
                Id:     e.doc.UUID,
105
 
                Update: D{{"$set", D{{"life", Dying}}}},
 
106
                Update: bson.D{{"$set", bson.D{{"life", Dying}}}},
106
107
                Assert: isEnvAliveDoc,
107
108
        }, e.st.newCleanupOp("services", "")}
108
109
        err := e.st.runTransaction(ops)
144
145
// Environment documents from versions of Juju prior to 1.17
145
146
// do not have the life field; if it does not exist, it should
146
147
// be considered to have the value Alive.
147
 
var isEnvAliveDoc = D{
148
 
        {"life", D{{"$in", []interface{}{Alive, nil}}}},
 
148
var isEnvAliveDoc = bson.D{
 
149
        {"life", bson.D{{"$in", []interface{}{Alive, nil}}}},
149
150
}