Skip to content

Commit

Permalink
Code changes verified for no-trunk OVS deployment.
Browse files Browse the repository at this point in the history
  • Loading branch information
jingczhang committed May 31, 2023
1 parent e88afe9 commit 0490264
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pkg/openstack/instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,9 @@ func getSubInterfaces(interfaces []attachinterfaces.Interface, network *gophercl
klog.Errorf("It is not expected to see more than one trunk on a single port %s", iface.PortID)
return subports, err
}
if len(allTrunks) == 0 {
continue
}
// Get subports attached to the trunks
trunk := allTrunks[0]
klog.V(5).Infof("Subports for trunk %s: %v", trunk.ID, trunk.Subports)
Expand Down
2 changes: 1 addition & 1 deletion pkg/openstack/openstack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ func TestNodeAddressesWithSubports(t *testing.T) {
"OS-EXT-IPS:type": "fixed",
},
},
"mycluster-01-vlan703_network": []interface{}{
"mycluster-01-vlan702_network": []interface{}{
map[string]interface{}{
"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:36:b7:8f",
"version": float64(4),
Expand Down

0 comments on commit 0490264

Please sign in to comment.