~mfoord/juju-core/tests-replset

« back to all changes in this revision

Viewing changes to state/service.go

  • Committer: Benji York
  • Date: 2013-03-18 19:33:51 UTC
  • mto: This revision was merged to the branch mainline in revision 1040.
  • Revision ID: benji.york@canonical.com-20130318193351-dnz4jtdb4gn2k8ts
checkpoint: tests pass; major refactoring to avoid import cycle completed

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
        "labix.org/v2/mgo/bson"
8
8
        "labix.org/v2/mgo/txn"
9
9
        "launchpad.net/juju-core/charm"
 
10
        "launchpad.net/juju-core/constraints"
10
11
        "launchpad.net/juju-core/trivial"
11
12
        "sort"
12
13
        "strconv"
521
522
}
522
523
 
523
524
// Constraints returns the current service constraints.
524
 
func (s *Service) Constraints() (Constraints, error) {
 
525
func (s *Service) Constraints() (constraints.Value, error) {
525
526
        return readConstraints(s.st, s.globalKey())
526
527
}
527
528
 
528
529
// SetConstraints replaces the current service constraints.
529
 
func (s *Service) SetConstraints(cons Constraints) error {
 
530
func (s *Service) SetConstraints(cons constraints.Value) error {
530
531
        return writeConstraints(s.st, s.globalKey(), cons)
531
532
}