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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user