mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-28 10:44:02 -04:00
Delete cloudstack dir, revendor
This commit is contained in:
+1
-29
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user