Update go-cloudstack dependency

This commit is contained in:
Sander van Harmelen
2016-05-18 14:37:34 +02:00
parent 62639620e1
commit 640152e310
3 changed files with 25 additions and 5 deletions

View File

@@ -411,6 +411,26 @@ func WithProject(project string) OptionFunc {
}
}
// VPCIDSetter is an interface that every type that can set a vpc ID must implement
type VPCIDSetter interface {
SetVpcid(string)
}
// WithVPCID takes a vpc ID and sets the `vpcid` parameter
func WithVPCID(id string) OptionFunc {
return func(cs *CloudStackClient, p interface{}) error {
vs, ok := p.(VPCIDSetter)
if !ok || id == "" {
return nil
}
vs.SetVpcid(id)
return nil
}
}
type APIDiscoveryService struct {
cs *CloudStackClient
}