Skip to content

Commit

Permalink
Removed Hostname from Rest struct and Unit test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Oct 17, 2017
1 parent 9488467 commit 629e50d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions local/spectrumscale/connectors/rest_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,25 +125,23 @@ func NewSpectrumRestV2(logger *log.Logger, restConfig resources.RestConfig) (Spe
endpoint := restConfig.Endpoint
user := restConfig.User
password := restConfig.Password
hostname := restConfig.Hostname

tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
return &spectrumRestV2{logger: logger, httpClient: &http.Client{Transport: tr}, endpoint: endpoint, user: user, password: password, hostname: hostname}, nil
return &spectrumRestV2{logger: logger, httpClient: &http.Client{Transport: tr}, endpoint: endpoint, user: user, password: password}, nil
}

func NewspectrumRestV2WithClient(logger *log.Logger, restConfig resources.RestConfig) (SpectrumScaleConnector, *http.Client, error) {
endpoint := restConfig.Endpoint
user := restConfig.User
password := restConfig.Password
hostname := restConfig.Hostname

tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
client := &http.Client{Transport: tr}
return &spectrumRestV2{logger: logger, httpClient: client, endpoint: endpoint, user: user, password: password, hostname: hostname}, client, nil
return &spectrumRestV2{logger: logger, httpClient: client, endpoint: endpoint, user: user, password: password}, client, nil

}

Expand Down
1 change: 0 additions & 1 deletion resources/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ type RestConfig struct {
Endpoint string
User string
Password string
Hostname string
}

type SpectrumNfsRemoteConfig struct {
Expand Down

0 comments on commit 629e50d

Please sign in to comment.