Merge lp:~wallyworld/juju-core/fix-tools-sources into lp:~go-bot/juju-core/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Ian Booth | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 1896 | ||||
Proposed branch: | lp:~wallyworld/juju-core/fix-tools-sources | ||||
Merge into: | lp:~go-bot/juju-core/trunk | ||||
Diff against target: |
126 lines (+42/-2) 4 files modified
provider/azure/environ.go (+5/-1) provider/azure/environ_test.go (+4/-1) provider/local/environ.go (+12/-0) provider/local/environ_test.go (+21/-0) |
||||
To merge this branch: | bzr merge lp:~wallyworld/juju-core/fix-tools-sources | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+187959@code.launchpad.net |
Commit message
Fix tools sources for local and azure
The local provider did not implement CustomToolsSources,
so when it tried to get tools via simplestreams, it
failed and then used the legacy fallback. But this meant
that checksum and size info was missing.
The azure provider did implement CustomToolsSources, but
until the official tools repository comes online, the
tools sources do need to include the public container
from which tools can be fetched, or else simplestreams
will fail and revert to legacy tools code.
Description of the change
Fix tools sources for local and azure
The local provider did not implement CustomToolsSources,
so when it tried to get tools via simplestreams, it
failed and then used the legacy fallback. But this meant
that checksum and size info was missing.
The azure provider did implement CustomToolsSources, but
until the official tools repository comes online, the
tools sources do need to include the public container
from which tools can be fetched, or else simplestreams
will fail and revert to legacy tools code.
Reviewers: mp+187959_ code.launchpad. net,
Message:
Please take a look.
Description:
Fix tools sources for local and azure
The local provider did not implement CustomToolsSources,
so when it tried to get tools via simplestreams, it
failed and then used the legacy fallback. But this meant
that checksum and size info was missing.
The azure provider did implement CustomToolsSources, but
until the official tools repository comes online, the
tools sources do need to include the public container
from which tools can be fetched, or else simplestreams
will fail and revert to legacy tools code.
https:/ /code.launchpad .net/~wallyworl d/juju- core/fix- tools-sources/ +merge/ 187959
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/14011043/
Affected files (+46, -2 lines): azure/environ. go azure/environ_ test.go local/environ. go local/local_ test.go
A [revision details]
M provider/
M provider/
M provider/
M provider/
Index: [revision details] 20130926184157- 5d305cr4rb895ln t
=== 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: provider/ azure/environ. go azure/environ. go' azure/environ. go 2013-09-26 09:18:36 +0000 azure/environ. go 2013-09-27 00:23:48 +0000 s.DataSource, .DataSource{ storage. NewStorageSimpl eStreamsDataSou rce(env. Storage( ), BaseToolsPath) }, nil .DataSource{ NewStorageSimpl eStreamsDataSou rce(env. Storage( ), BaseToolsPath) , NewURLDataSourc e( /jujutools. blob.core. windows. net/juju- tools/tools", VerifySSLHostna mes)}
=== modified file 'provider/
--- provider/
+++ provider/
@@ -918,7 +918,11 @@
// GetToolsSources returns a list of sources which are used to search for
simplestreams tools metadata.
func (env *azureEnviron) GetToolsSources() ([]simplestream
error) {
// Add the simplestreams source off the control bucket.
- return
[]simplestreams
storage.
+ sources := []simplestreams
+ storage.
storage.
+ simplestreams.
+ "https:/
simplestreams.
+ return sources, nil
}
// getImageStream returns the name of the simplestreams stream from which
Index: provider/ azure/environ_ test.go azure/environ_ test.go' azure/environ_ test.go 2013-09-26 12:28:28 +0000 azure/environ_ test.go 2013-09-27 00:23:48 +0000
=== modified file 'provider/
--- provider/
+++ provider/
@@ -1313,6 +1313,9 @@
sources, err := tools.GetMetada taSources( env) len(sources) , gc.Equals, 1) len(sources) , gc.Equals, 2) Contents( c, sources[0], "filename", data) /jujutools. blob.core. windows. net/juju- tools/tools/")
c.Assert(err, gc.IsNil)
- c.Assert(
+ c.Assert(
assertSource
+ url, err := sources[1].URL("")
+ c.Assert(err, gc.IsNil)
+ c.Assert(url,
gc.Equals, "https:/
}
Index: provider/ local/environ. go local/environ. go' local/environ. go 2013-09-26 09:18:36 +0000 local/environ. go 2013-09-27 00:23:48 +0000 net/juju- core/environs/ config" net/juju- core/environs/ filestorage" net/juju- core/environs/ httpstorage"
=== modified file 'provider/
--- provider/
+++ provider/
@@ -23,7 +23,9 @@
"launchpad.
"launchpad.
"launchpad.
+ "l...