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

4
Godeps/Godeps.json generated
View File

@ -1336,8 +1336,8 @@
},
{
"ImportPath": "github.com/xanzy/go-cloudstack/cloudstack",
"Comment": "2.0.0-2-gcfbfb48",
"Rev": "cfbfb481e04c131cb89df1c6141b082f2714bc29"
"Comment": "2.0.0-6-g5686bcd",
"Rev": "5686bcde5af20565d8c7a3f66b5441430ac54186"
},
{
"ImportPath": "github.com/xanzy/ssh-agent",

View File

@ -2008,12 +2008,12 @@ func (s *LoadBalancerService) ListLoadBalancerRuleInstances(p *ListLoadBalancerR
type ListLoadBalancerRuleInstancesResponse struct {
Count int `json:"count"`
LoadBalancerRuleInstances []*LoadBalancerRuleInstance `json:"loadbalancerruleinstance"`
LoadBalancerRuleInstances []*LoadBalancerRuleInstance `json:"lbrulevmidip"`
}
type LoadBalancerRuleInstance struct {
Lbvmipaddresses []string `json:"lbvmipaddresses,omitempty"`
Loadbalancerruleinstance string `json:"loadbalancerruleinstance,omitempty"`
Lbvmipaddresses []string `json:"lbvmipaddresses,omitempty"`
Loadbalancerruleinstance *VirtualMachine `json:"loadbalancerruleinstance,omitempty"`
}
type UpdateLoadBalancerRuleParams struct {

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
}