OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 Canonical Ltd. |
| 2 // Licensed under the AGPLv3, see LICENCE file for details. |
| 3 |
| 4 package common |
| 5 |
| 6 import ( |
| 7 "launchpad.net/juju-core/constraints" |
| 8 "launchpad.net/juju-core/state" |
| 9 ) |
| 10 |
| 11 // SupportsUnitPlacementPolicy provides an |
| 12 // implementation of SupportsUnitPlacement |
| 13 // that never returns an error, and is |
| 14 // intended for embedding in environs.Environ |
| 15 // implementations. |
| 16 type SupportsUnitPlacementPolicy struct{} |
| 17 |
| 18 func (*SupportsUnitPlacementPolicy) SupportsUnitPlacement() error { |
| 19 return nil |
| 20 } |
| 21 |
| 22 // NopPrecheckerPolicy provides an implementation of the |
| 23 // state.Prechecker interface that passes all checks. |
| 24 type NopPrecheckerPolicy struct{} |
| 25 |
| 26 var _ state.Prechecker = (*NopPrecheckerPolicy)(nil) |
| 27 |
| 28 func (*NopPrecheckerPolicy) PrecheckInstance(series string, cons constraints.Val
ue) error { |
| 29 return nil |
| 30 } |
OLD | NEW |