Merge lp:~jameinel/juju-core/api-named-resources-datadir into lp:~go-bot/juju-core/trunk
Status: | Merged |
---|---|
Approved by: | John A Meinel |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2754 |
Proposed branch: | lp:~jameinel/juju-core/api-named-resources-datadir |
Merge into: | lp:~go-bot/juju-core/trunk |
Prerequisite: | lp:~jameinel/juju-core/api-named-resources |
Diff against target: |
120 lines (+35/-6) 5 files modified
state/apiserver/client/client.go (+1/-3) state/apiserver/client/run.go (+11/-2) state/apiserver/common/resource.go (+12/-0) state/apiserver/common/resource_test.go (+9/-0) state/apiserver/root.go (+2/-1) |
To merge this branch: | bzr merge lp:~jameinel/juju-core/api-named-resources-datadir |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+220215@code.launchpad.net |
Commit message
state/apiserver
This adds a new resource type: common.
register "dataDir" as a Resource, instead of having to give Client
secret insight into attributes of the srvRoot object. That brings us
closer to having all of the Facades all part of a simple Registry
instead of having special cases.
Description of the change
state/apiserver
This adds a new resource type: common.
register "dataDir" as a Resource, instead of having to give Client
secret insight into attributes of the srvRoot object. That brings us
closer to having all of the Facades all part of a simple Registry
instead of having special cases.
Reviewers: mp+220215_ code.launchpad. net,
Message:
Please take a look.
Description: /common: StringResource
state/apiserver
This adds a new resource type: common. StringResource. It just lets us
register "dataDir" as a Resource, instead of having to give Client
secret insight into attributes of the srvRoot object. That brings us
closer to having all of the Facades all part of a simple Registry
instead of having special cases.
https:/ /code.launchpad .net/~jameinel/ juju-core/ api-named- resources- datadir/ +merge/ 220215
Requires: /code.launchpad .net/~jameinel/ juju-core/ api-named- resources/ +merge/ 220208
https:/
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/99410043/
Affected files (+37, -6 lines): /client/ client. go /client/ run.go /common/ resource. go /common/ resource_ test.go /root.go
A [revision details]
M state/apiserver
M state/apiserver
M state/apiserver
M state/apiserver
M state/apiserver
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>
Index: state/apiserver /root.go apiserver/ root.go' /root.go 2014-05-20 08:17:21 +0000 /root.go 2014-05-20 09:42:11 +0000 NewResources( ), NewAPI( r.srv.state, r.resources, r, RegisterNamed( "dataDir" , common. StringResource( r.srv.dataDir) ) NewAPI( r.srv.state, r.resources, r)
=== modified file 'state/
--- state/apiserver
+++ state/apiserver
@@ -73,7 +73,8 @@
resources: common.
entity: entity,
}
- r.clientAPI.API = client.
r.srv.dataDir)
+ r.resources.
+ r.clientAPI.API = client.
return r
}
Index: state/apiserver /client/ client. go apiserver/ client/ client. go' /client/ client. go 2014-05-13 04:50:10 +0000 /client/ client. go 2014-05-20 09:42:11 +0000 StatusSetter
=== modified file 'state/
--- state/apiserver
+++ state/apiserver
@@ -36,7 +36,6 @@
auth common.Authorizer
resources *common.Resources
client *Client
- dataDir string
// statusSetter provides common methods for updating an entity's
provisioning status.
statusSetter *common.
}
@@ -47,12 +46,11 @@
}
// NewAPI creates a new instance of the Client API. NewStatusSetter (st, common. AuthAlways( true)),
-func NewAPI(st *state.State, resources *common.Resources, authorizer
common.Authorizer, datadir string) *API {
+func NewAPI(st *state.State, resources *common.Resources, authorizer
common.Authorizer) *API {
r := &API{
state: st,
auth: authorizer,
resources: resources,
- dataDir: datadir,
statusSetter: common.
}
r.client = &Client{
Index: state/apiserver /client/ run.go apiserver/ client/ run.go' /client/ run.go 2014-04-23 08:50:28 +0000 /client/ run.go 2014-05-20 09:42:11 +0000 net/juju- core/instance" net/juju- core/state" net/juju- core/state/ api/params" net/juju- core/state/ apiserver/ common" net/juju- cor...
=== modified file 'state/
--- state/apiserver
+++ state/apiserver
@@ -14,6 +14,7 @@
"launchpad.
"launchpad.
"launchpad.
+ "launchpad.
"launchpad.