1
0
mirror of https://github.com/rancher/os.git synced 2025-09-16 15:09:27 +00:00

Refactor a little so 'ros os list' also uses the configured proxy info

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-09-15 12:14:40 +10:00
parent a608098c39
commit baee5d18ea
4 changed files with 13 additions and 14 deletions

View File

@@ -19,6 +19,7 @@ import (
"github.com/rancher/os/config/cloudinit/datasource"
"github.com/rancher/os/config/cloudinit/pkg"
"github.com/rancher/os/util/network"
)
type RemoteFile struct {
@@ -31,6 +32,7 @@ func NewDatasource(url string) *RemoteFile {
}
func (f *RemoteFile) IsAvailable() bool {
network.SetProxyEnvironmentVariables()
client := pkg.NewHTTPClient()
_, f.lastError = client.Get(f.url)
return (f.lastError == nil)