Skip to content

Commit

Permalink
Changes in OpenStack cloud provider for latest gophercloud
Browse files Browse the repository at this point in the history
  • Loading branch information
dims committed Sep 2, 2017
1 parent daf400c commit bc7c602
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion openstack_loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ func (lbaas *LbaasV2) EnsureLoadBalancer(clusterName string, apiService *v1.Serv
}

portID := loadbalancer.VipPortID
update_opts := neutronports.UpdateOpts{SecurityGroups: []string{lbSecGroup.ID}}
update_opts := neutronports.UpdateOpts{SecurityGroups: &[]string{lbSecGroup.ID}}
res := neutronports.Update(lbaas.network, portID, update_opts)
if res.Err != nil {
glog.Errorf("Error occured updating port: %s", portID)
Expand Down
4 changes: 2 additions & 2 deletions openstack_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func updateAllowedAddressPairs(network *gophercloud.ServiceClient, port *neutron
origPairs := port.AllowedAddressPairs // shallow copy

_, err := neutronports.Update(network, port.ID, neutronports.UpdateOpts{
AllowedAddressPairs: newPairs,
AllowedAddressPairs: &newPairs,
}).Extract()
if err != nil {
return nil, err
Expand All @@ -130,7 +130,7 @@ func updateAllowedAddressPairs(network *gophercloud.ServiceClient, port *neutron
unwinder := func() {
glog.V(4).Info("Reverting allowed-address-pairs change to port ", port.ID)
_, err := neutronports.Update(network, port.ID, neutronports.UpdateOpts{
AllowedAddressPairs: origPairs,
AllowedAddressPairs: &origPairs,
}).Extract()
if err != nil {
glog.Warning("Unable to reset allowed-address-pairs during error unwind: ", err)
Expand Down

0 comments on commit bc7c602

Please sign in to comment.