Update vmware/govmomi vendor: add vapi package
Zones implementation for vSphere cloud provider needs dependencies which are not included in current vmware/govmomi vendor. So this update added "vapi" package to support zones.
This commit is contained in:
17
vendor/github.com/vmware/govmomi/vim25/soap/client.go
generated
vendored
17
vendor/github.com/vmware/govmomi/vim25/soap/client.go
generated
vendored
@@ -77,6 +77,17 @@ type Client struct {
|
||||
|
||||
var schemeMatch = regexp.MustCompile(`^\w+://`)
|
||||
|
||||
type errInvalidCACertificate struct {
|
||||
File string
|
||||
}
|
||||
|
||||
func (e errInvalidCACertificate) Error() string {
|
||||
return fmt.Sprintf(
|
||||
"invalid certificate '%s', cannot be used as a trusted CA certificate",
|
||||
e.File,
|
||||
)
|
||||
}
|
||||
|
||||
// ParseURL is wrapper around url.Parse, where Scheme defaults to "https" and Path defaults to "/sdk"
|
||||
func ParseURL(s string) (*url.URL, error) {
|
||||
var err error
|
||||
@@ -200,7 +211,11 @@ func (c *Client) SetRootCAs(file string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
pool.AppendCertsFromPEM(pem)
|
||||
if ok := pool.AppendCertsFromPEM(pem); !ok {
|
||||
return errInvalidCACertificate{
|
||||
File: name,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
c.t.TLSClientConfig.RootCAs = pool
|
||||
|
||||
Reference in New Issue
Block a user