Skip to content
Permalink
Browse files
Merge pull request #26 from benjvi/listNetworks
Fixes for API requests that contain maps and lists
  • Loading branch information
Sander van Harmelen committed Jun 8, 2015
2 parents 7362689 + 3b8d5cc commit 3c31a8498959d22df0b9acb2844b8ce674e397a3
Show file tree
Hide file tree
Showing 22 changed files with 117 additions and 63 deletions.
@@ -506,11 +506,11 @@ func (p *UpdateVMAffinityGroupParams) toURLValues() url.Values {
return u
}
if v, found := p.p["affinitygroupids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("affinitygroupids", vv)
}
if v, found := p.p["affinitygroupnames"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("affinitygroupnames", vv)
}
if v, found := p.p["id"]; found {
@@ -223,7 +223,7 @@ func (p *ArchiveAlertsParams) toURLValues() url.Values {
u.Set("enddate", v.(string))
}
if v, found := p.p["ids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("ids", vv)
}
if v, found := p.p["startdate"]; found {
@@ -307,7 +307,7 @@ func (p *DeleteAlertsParams) toURLValues() url.Values {
u.Set("enddate", v.(string))
}
if v, found := p.p["ids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("ids", vv)
}
if v, found := p.p["startdate"]; found {
@@ -267,7 +267,7 @@ func (p *CreateAutoScalePolicyParams) toURLValues() url.Values {
u.Set("action", v.(string))
}
if v, found := p.p["conditionids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("conditionids", vv)
}
if v, found := p.p["duration"]; found {
@@ -557,11 +557,11 @@ func (p *CreateAutoScaleVmGroupParams) toURLValues() url.Values {
u.Set("minmembers", vv)
}
if v, found := p.p["scaledownpolicyids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("scaledownpolicyids", vv)
}
if v, found := p.p["scaleuppolicyids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("scaleuppolicyids", vv)
}
if v, found := p.p["vmprofileid"]; found {
@@ -2270,7 +2270,7 @@ func (p *UpdateAutoScalePolicyParams) toURLValues() url.Values {
return u
}
if v, found := p.p["conditionids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("conditionids", vv)
}
if v, found := p.p["duration"]; found {
@@ -2537,11 +2537,11 @@ func (p *UpdateAutoScaleVmGroupParams) toURLValues() url.Values {
u.Set("minmembers", vv)
}
if v, found := p.p["scaledownpolicyids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("scaledownpolicyids", vv)
}
if v, found := p.p["scaleuppolicyids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("scaleuppolicyids", vv)
}
return u
@@ -348,7 +348,7 @@ func (p *ArchiveEventsParams) toURLValues() url.Values {
u.Set("enddate", v.(string))
}
if v, found := p.p["ids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("ids", vv)
}
if v, found := p.p["startdate"]; found {
@@ -432,7 +432,7 @@ func (p *DeleteEventsParams) toURLValues() url.Values {
u.Set("enddate", v.(string))
}
if v, found := p.p["ids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("ids", vv)
}
if v, found := p.p["startdate"]; found {
@@ -286,7 +286,7 @@ func (p *CreatePortForwardingRuleParams) toURLValues() url.Values {
return u
}
if v, found := p.p["cidrlist"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("cidrlist", vv)
}
if v, found := p.p["ipaddressid"]; found {
@@ -731,7 +731,7 @@ func (p *CreateFirewallRuleParams) toURLValues() url.Values {
return u
}
if v, found := p.p["cidrlist"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("cidrlist", vv)
}
if v, found := p.p["endport"]; found {
@@ -1226,7 +1226,7 @@ func (p *CreateEgressFirewallRuleParams) toURLValues() url.Values {
return u
}
if v, found := p.p["cidrlist"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("cidrlist", vv)
}
if v, found := p.p["endport"]; found {
@@ -43,7 +43,7 @@ func (p *AddHostParams) toURLValues() url.Values {
u.Set("clustername", v.(string))
}
if v, found := p.p["hosttags"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("hosttags", vv)
}
if v, found := p.p["hypervisor"]; found {
@@ -351,7 +351,7 @@ func (p *UpdateHostParams) toURLValues() url.Values {
u.Set("allocationstate", v.(string))
}
if v, found := p.p["hosttags"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("hosttags", vv)
}
if v, found := p.p["id"]; found {
@@ -796,7 +796,7 @@ func (p *ListHostsParams) toURLValues() url.Values {
u.Set("clusterid", v.(string))
}
if v, found := p.p["details"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("details", vv)
}
if v, found := p.p["hahost"]; found {
@@ -1479,7 +1479,7 @@ func (p *AddBaremetalHostParams) toURLValues() url.Values {
u.Set("clustername", v.(string))
}
if v, found := p.p["hosttags"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("hosttags", vv)
}
if v, found := p.p["hypervisor"]; found {
@@ -1524,7 +1524,7 @@ func (p *UpdateIsoPermissionsParams) toURLValues() url.Values {
return u
}
if v, found := p.p["accounts"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("accounts", vv)
}
if v, found := p.p["id"]; found {
@@ -1546,7 +1546,7 @@ func (p *UpdateIsoPermissionsParams) toURLValues() url.Values {
u.Set("op", v.(string))
}
if v, found := p.p["projectids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("projectids", vv)
}
return u
@@ -40,7 +40,7 @@ func (p *CreateLoadBalancerRuleParams) toURLValues() url.Values {
u.Set("algorithm", v.(string))
}
if v, found := p.p["cidrlist"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("cidrlist", vv)
}
if v, found := p.p["description"]; found {
@@ -347,7 +347,7 @@ func (p *RemoveFromLoadBalancerRuleParams) toURLValues() url.Values {
u.Set("id", v.(string))
}
if v, found := p.p["virtualmachineids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("virtualmachineids", vv)
}
return u
@@ -429,7 +429,7 @@ func (p *AssignToLoadBalancerRuleParams) toURLValues() url.Values {
u.Set("id", v.(string))
}
if v, found := p.p["virtualmachineids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("virtualmachineids", vv)
}
return u
@@ -2893,7 +2893,7 @@ func (p *ConfigureNetscalerLoadBalancerParams) toURLValues() url.Values {
u.Set("lbdeviceid", v.(string))
}
if v, found := p.p["podids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("podids", vv)
}
return u
@@ -3870,7 +3870,7 @@ func (p *AssignToGlobalLoadBalancerRuleParams) toURLValues() url.Values {
u.Set("id", v.(string))
}
if v, found := p.p["loadbalancerrulelist"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("loadbalancerrulelist", vv)
}
return u
@@ -3960,7 +3960,7 @@ func (p *RemoveFromGlobalLoadBalancerRuleParams) toURLValues() url.Values {
u.Set("id", v.(string))
}
if v, found := p.p["loadbalancerrulelist"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("loadbalancerrulelist", vv)
}
return u
@@ -119,7 +119,7 @@ func (p *CreateIpForwardingRuleParams) toURLValues() url.Values {
return u
}
if v, found := p.p["cidrlist"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("cidrlist", vv)
}
if v, found := p.p["endport"]; found {
@@ -40,7 +40,7 @@ func (p *CreateNetworkACLParams) toURLValues() url.Values {
u.Set("action", v.(string))
}
if v, found := p.p["cidrlist"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("cidrlist", vv)
}
if v, found := p.p["endport"]; found {
@@ -249,7 +249,7 @@ func (p *UpdateNetworkACLItemParams) toURLValues() url.Values {
u.Set("action", v.(string))
}
if v, found := p.p["cidrlist"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("cidrlist", vv)
}
if v, found := p.p["endport"]; found {
@@ -105,7 +105,7 @@ func (p *CreateNetworkOfferingParams) toURLValues() url.Values {
u.Set("specifyvlan", vv)
}
if v, found := p.p["supportedservices"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("supportedservices", vv)
}
if v, found := p.p["tags"]; found {
@@ -618,7 +618,7 @@ func (p *ListNetworkOfferingsParams) toURLValues() url.Values {
u.Set("state", v.(string))
}
if v, found := p.p["supportedservices"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("supportedservices", vv)
}
if v, found := p.p["tags"]; found {
@@ -713,7 +713,7 @@ func (p *ListNetworksParams) toURLValues() url.Values {
u.Set("specifyipranges", vv)
}
if v, found := p.p["supportedservices"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("supportedservices", vv)
}
if v, found := p.p["tags"]; found {
@@ -1468,7 +1468,7 @@ func (p *CreatePhysicalNetworkParams) toURLValues() url.Values {
u.Set("domainid", v.(string))
}
if v, found := p.p["isolationmethods"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("isolationmethods", vv)
}
if v, found := p.p["name"]; found {
@@ -1478,7 +1478,7 @@ func (p *CreatePhysicalNetworkParams) toURLValues() url.Values {
u.Set("networkspeed", v.(string))
}
if v, found := p.p["tags"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("tags", vv)
}
if v, found := p.p["vlan"]; found {
@@ -1893,7 +1893,7 @@ func (p *UpdatePhysicalNetworkParams) toURLValues() url.Values {
u.Set("state", v.(string))
}
if v, found := p.p["tags"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("tags", vv)
}
if v, found := p.p["vlan"]; found {
@@ -2134,7 +2134,7 @@ func (p *AddNetworkServiceProviderParams) toURLValues() url.Values {
u.Set("physicalnetworkid", v.(string))
}
if v, found := p.p["servicelist"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("servicelist", vv)
}
return u
@@ -2458,7 +2458,7 @@ func (p *UpdateNetworkServiceProviderParams) toURLValues() url.Values {
u.Set("id", v.(string))
}
if v, found := p.p["servicelist"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("servicelist", vv)
}
if v, found := p.p["state"]; found {
@@ -516,7 +516,7 @@ func (p *UpdateStoragePoolParams) toURLValues() url.Values {
u.Set("id", v.(string))
}
if v, found := p.p["tags"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("tags", vv)
}
return u
@@ -37,7 +37,7 @@ func (p *CreateTagsParams) toURLValues() url.Values {
u.Set("customer", v.(string))
}
if v, found := p.p["resourceids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("resourceids", vv)
}
if v, found := p.p["resourcetype"]; found {
@@ -144,7 +144,7 @@ func (p *DeleteTagsParams) toURLValues() url.Values {
return u
}
if v, found := p.p["resourceids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("resourceids", vv)
}
if v, found := p.p["resourcetype"]; found {
@@ -266,7 +266,7 @@ func (p *AuthorizeSecurityGroupIngressParams) toURLValues() url.Values {
u.Set("account", v.(string))
}
if v, found := p.p["cidrlist"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("cidrlist", vv)
}
if v, found := p.p["domainid"]; found {
@@ -546,7 +546,7 @@ func (p *AuthorizeSecurityGroupEgressParams) toURLValues() url.Values {
u.Set("account", v.(string))
}
if v, found := p.p["cidrlist"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("cidrlist", vv)
}
if v, found := p.p["domainid"]; found {
@@ -685,7 +685,7 @@ func (p *DeleteSnapshotPoliciesParams) toURLValues() url.Values {
u.Set("id", v.(string))
}
if v, found := p.p["ids"]; found {
vv := strings.Join(v.([]string), ", ")
vv := strings.Join(v.([]string), ",")
u.Set("ids", vv)
}
return u

0 comments on commit 3c31a84

Please sign in to comment.