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

« back to all changes in this revision

Viewing changes to src/launchpad.net/juju-core/state/addmachine.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:
7
7
        "fmt"
8
8
        "strconv"
9
9
 
 
10
        "labix.org/v2/mgo/bson"
10
11
        "labix.org/v2/mgo/txn"
11
12
 
12
13
        "launchpad.net/juju-core/constraints"
447
448
        ops := []txn.Op{{
448
449
                C:  st.stateServers.Name,
449
450
                Id: environGlobalKey,
450
 
                Assert: D{{
451
 
                        "$and", []D{
452
 
                                {{"machineids", D{{"$size", len(currentInfo.MachineIds)}}}},
453
 
                                {{"votingmachineids", D{{"$size", len(currentInfo.VotingMachineIds)}}}},
 
451
                Assert: bson.D{{
 
452
                        "$and", []bson.D{
 
453
                                {{"machineids", bson.D{{"$size", len(currentInfo.MachineIds)}}}},
 
454
                                {{"votingmachineids", bson.D{{"$size", len(currentInfo.VotingMachineIds)}}}},
454
455
                        },
455
456
                }},
456
 
                Update: D{
457
 
                        {"$addToSet", D{{"machineids", D{{"$each", newIds}}}}},
458
 
                        {"$addToSet", D{{"votingmachineids", D{{"$each", newVotingIds}}}}},
 
457
                Update: bson.D{
 
458
                        {"$addToSet", bson.D{{"machineids", bson.D{{"$each", newIds}}}}},
 
459
                        {"$addToSet", bson.D{{"votingmachineids", bson.D{{"$each", newVotingIds}}}}},
459
460
                },
460
461
        }}
461
462
        return ops, nil