~sidnei/juju-core/lxc-clone-with-overlayfs

« back to all changes in this revision

Viewing changes to state/apiserver/testing/fakeauthorizer.go

[r=dimitern] apiserver/uniter: Service-related API calls

This implements the needed server-side uniter API
service methods:
* WatchServiceRelations

In addition:
* Life
* Watch
* CharmURL
Were changed to handle both unit and service tags.

https://codereview.appspot.com/12849043/

R=gz, jameinel, rogpeppe

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
package testing
5
5
 
 
6
import (
 
7
        "launchpad.net/juju-core/state"
 
8
)
 
9
 
6
10
// FakeAuthorizer implements the common.Authorizer interface.
7
11
type FakeAuthorizer struct {
8
12
        Tag          string
11
15
        MachineAgent bool
12
16
        UnitAgent    bool
13
17
        Client       bool
 
18
        Entity       state.Entity
14
19
}
15
20
 
16
21
func (fa FakeAuthorizer) AuthOwner(tag string) bool {
36
41
func (fa FakeAuthorizer) GetAuthTag() string {
37
42
        return fa.Tag
38
43
}
 
44
 
 
45
func (fa FakeAuthorizer) GetAuthEntity() state.Entity {
 
46
        return fa.Entity
 
47
}