Skip to content

Commit

Permalink
Add key for VSphere Login URL (#349)
Browse files Browse the repository at this point in the history
* Add key for login url

* Add dot.
  • Loading branch information
Hakan Memisoglu authored and mergify[bot] committed Oct 11, 2019
1 parent b33a7ae commit 1e65cda
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/blockstorage/vmware/vmware.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ import (
var _ blockstorage.Provider = (*fcdProvider)(nil)

const (
// VSphereLoginURLKey represents key in config to establish connection.
// It should contain the username and the password.
VSphereLoginURLKey = "VSphereLoginURL"

noDescription = ""
defaultWaitTime = 10 * time.Minute
)
Expand All @@ -32,7 +36,7 @@ type fcdProvider struct {
// NewProvider creates new VMWare FCD provider with the config.
// URL taken from config helps to establish connection.
func NewProvider(config map[string]string) (blockstorage.Provider, error) {
u, err := soap.ParseURL(config["url"])
u, err := soap.ParseURL(config[VSphereLoginURLKey])
if err != nil {
return nil, errors.Wrap(err, "Failed to get config")
}
Expand Down

0 comments on commit 1e65cda

Please sign in to comment.