Skip to content

Commit

Permalink
No need for multiple ports with bm instances (#822)
Browse files Browse the repository at this point in the history
The baremetal instances have been moved to port-groups,
so all physical NICs are grouped to a bond.
No need to guess the number of NICs by the flavor anymore
  • Loading branch information
fwiesel committed Jul 26, 2023
1 parent def0ff3 commit f49af43
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions pkg/client/openstack/kluster/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"os"
"strings"

"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/bootfromvolume"
Expand Down Expand Up @@ -63,22 +62,6 @@ func (c *klusterClient) CreateNode(kluster *v1.Kluster, pool *models.NodePool, n
configDrive := true

networks := []servers.Network{{UUID: kluster.Spec.Openstack.NetworkID}}

if strings.HasPrefix(pool.Flavor, "zh") {
networks = []servers.Network{
{UUID: kluster.Spec.Openstack.NetworkID},
{UUID: kluster.Spec.Openstack.NetworkID},
{UUID: kluster.Spec.Openstack.NetworkID},
{UUID: kluster.Spec.Openstack.NetworkID},
}
}

if strings.HasPrefix(pool.Flavor, "zg") {
networks = []servers.Network{
{UUID: kluster.Spec.Openstack.NetworkID},
{UUID: kluster.Spec.Openstack.NetworkID},
}
}
flavorID, err := flavorutil.IDFromName(c.ComputeClient, pool.Flavor)
if err != nil {
return "", fmt.Errorf("Failed to find id for flavor %s: %w", pool.Flavor, err)
Expand Down

0 comments on commit f49af43

Please sign in to comment.