Skip to content

Commit

Permalink
openstack: Fix nil HostManager in openstackContext
Browse files Browse the repository at this point in the history
Refactoring in [1] left the openstackContext uninitialized.

[1] #553

Signed-off-by: Andrea Panattoni <[email protected]>
  • Loading branch information
zeeke committed Feb 1, 2024
1 parent a3a5ba9 commit 58e0d3c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/platforms/openstack/openstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
sriovnetworkv1 "github.com/k8snetworkplumbingwg/sriov-network-operator/api/v1"
"github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/consts"
"github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/host"
"github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/utils"
)

const (
Expand Down Expand Up @@ -103,7 +104,11 @@ type OSPDeviceInfo struct {
}

func New() OpenstackInterface {
return &openstackContext{}
utilsHelper := utils.New()
hostManager := host.NewHostManager(utilsHelper)
return &openstackContext{
hostManager: hostManager,
}
}

// GetOpenstackData gets the metadata and network_data
Expand Down

0 comments on commit 58e0d3c

Please sign in to comment.