Merge lp:~axwalk/juju-core/provisioningscript-api-disableaptcommands into lp:~go-bot/juju-core/trunk
Proposed by
Andrew Wilkins
Status: | Merged |
---|---|
Approved by: | Andrew Wilkins |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2277 |
Proposed branch: | lp:~axwalk/juju-core/provisioningscript-api-disableaptcommands |
Merge into: | lp:~go-bot/juju-core/trunk |
Diff against target: |
114 lines (+45/-8) 5 files modified
environs/manual/provisioner.go (+4/-1) state/api/client.go (+1/-5) state/api/params/params.go (+8/-1) state/apiserver/client/client.go (+1/-0) state/apiserver/client/client_test.go (+31/-1) |
To merge this branch: | bzr merge lp:~axwalk/juju-core/provisioningscript-api-disableaptcommands |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+203866@code.launchpad.net |
Commit message
Add option to disable apt in ProvisioningScript
The ProvisioningScript API is updated to take a
boolean option DisablePackageC
disable all package-related commands (apt-get, etc.)
This is for the benefit of external provisioners
that require more control over which packages are
installed and from where.
Description of the change
Add option to disable apt in ProvisioningScript
The ProvisioningScript API is updated to take a
boolean option DisablePackageC
disable all package-related commands (apt-get, etc.)
This is for the benefit of external provisioners
that require more control over which packages are
installed and from where.
To post a comment you must log in.
Reviewers: mp+203866_ code.launchpad. net,
Message:
Please take a look.
Description:
Add option to disable apt in ProvisioningScript
The ProvisioningScript API is updated to take a ommands to completely
boolean option DisablePackageC
disable all package-related commands (apt-get, etc.)
This is for the benefit of external provisioners
that require more control over which packages are
installed and from where.
https:/ /code.launchpad .net/~axwalk/ juju-core/ provisioningscr ipt-api- disableaptcomma nds/+merge/ 203866
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/58490043/
Affected files (+41, -8 lines): manual/ provisioner. go params/ params. go /client/ client. go /client/ client_ test.go
A [revision details]
M environs/
M state/api/client.go
M state/api/
M state/apiserver
M state/apiserver
Index: [revision details] 20140130015505- n3kdp8ga69rxk1t y
=== 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: tarmac-
+New revision: <email address hidden>
Index: environs/ manual/ provisioner. go manual/ provisioner. go' manual/ provisioner. go 2014-01-28 04:58:43 +0000 manual/ provisioner. go 2014-01-30 02:20:09 +0000
=== modified file 'environs/
--- environs/
+++ environs/
@@ -133,7 +133,10 @@
var provisioningScript string ProvisioningScr ipt(machineId, Nonce) ProvisioningScr ipt(params. ProvisioningScr iptParams{ Nonce,
if stateConn == nil {
- provisioningScript, err = client.
machineParams.
+ provisioningScript, err =
client.
+ MachineId: machineId,
+ Nonce: machineParams.
+ })
if err != nil {
return "", err
}
Index: state/api/client.go api/client. go'
=== modified file 'state/
--- state/api/client.go 2014-01-22 03:37:36 +0000
+++ state/api/client.go 2014-01-30 02:20:09 +0000
@@ -173,11 +173,7 @@
// ProvisioningScript returns a shell script that, when run, ipt(machineId, nonce string) (script ProvisioningScr iptParams{ ipt(args params. ProvisioningScr iptParams) ProvisioningScr iptResult ript", args, &result);
// provisions a machine agent on the machine executing the script.
-func (c *Client) ProvisioningScr
string, err error) {
- args := params.
- MachineId: machineId,
- Nonce: nonce,
- }
+func (c *Client) ProvisioningScr
(script string, err error) {
var result params.
if err = c.st.Call("Client", "", "ProvisioningSc
err != nil {
return "", err
Index: state/api/ params/ params. go api/params/ params. go' params/ params. go 2014-01-22 03:37:36 +0000 params/ params. go 2014-01-30 02:20:09 +0000 iptParams struct { ommands may be set to disable all package-related ommands bool
=== modified file 'state/
--- state/api/
+++ state/api/
@@ -520,7 +520,14 @@
type ProvisioningScr
MachineId string
Nonce string
- DataDir string
+
+ // DataDir may be "", in which case the default will be used.
+ DataDir string
+
+ // DisablePackageC
+ // commands. It is then the responsibility of the provisioner to
+ // ensure that all the packages required by Juju are available.
+ DisablePackageC
}
// ProvisioningScr iptResult contains...