Delete cloudstack dir, revendor

This commit is contained in:
Megan Marsh
2021-04-20 13:46:11 -07:00
parent dc63b9a7a4
commit 9044deeb05
91 changed files with 872 additions and 3418 deletions
+1 -29
View File
@@ -156,7 +156,7 @@ func newClient(apiurl string, apikey string, secret string, async bool, verifyss
}).DialContext,
MaxIdleConns: 100,
IdleConnTimeout: 90 * time.Second,
TLSClientConfig: &tls.Config{InsecureSkipVerify: !verifyssl},
TLSClientConfig: &tls.Config{InsecureSkipVerify: !verifyssl}, // If verifyssl is true, skipping the verify should be false and vice versa
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
},
@@ -419,34 +419,6 @@ func getRawValue(b json.RawMessage) (json.RawMessage, error) {
return nil, fmt.Errorf("Unable to extract the raw value from:\n\n%s\n\n", string(b))
}
// DomainIDSetter is an interface that every type that can set a domain ID must implement
type DomainIDSetter interface {
SetDomainid(string)
}
// WithDomain takes either a domain name or ID and sets the `domainid` parameter
func WithDomain(domain string) OptionFunc {
return func(cs *CloudStackClient, p interface{}) error {
ps, ok := p.(DomainIDSetter)
if !ok || domain == "" {
return nil
}
if !IsID(domain) {
id, _, err := cs.Domain.GetDomainID(domain)
if err != nil {
return err
}
domain = id
}
ps.SetDomainid(domain)
return nil
}
}
// ProjectIDSetter is an interface that every type that can set a project ID must implement
type ProjectIDSetter interface {
SetProjectid(string)