Skip to content

Commit

Permalink
update to latest nmstate api module, but stick to v1beta1
Browse files Browse the repository at this point in the history
  • Loading branch information
stuggi committed Jun 26, 2023
1 parent d6d1f98 commit dca110e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 477 deletions.
7 changes: 3 additions & 4 deletions api/v1beta1/openstackdeploy_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/webhook"

nmstateshared "github.com/nmstate/kubernetes-nmstate/api/shared"
nmstatev1 "github.com/nmstate/kubernetes-nmstate/api/v1"
nmstatev1beta1 "github.com/nmstate/kubernetes-nmstate/api/v1beta1"
nmstatev1 "github.com/nmstate/kubernetes-nmstate/api/v1beta1"
"github.com/openstack-k8s-operators/osp-director-operator/api/shared"
nmstate "github.com/openstack-k8s-operators/osp-director-operator/pkg/nmstate"
)
Expand Down Expand Up @@ -156,7 +155,7 @@ func (r *OpenStackDeploy) validateNNCP() error {
} else if condition.Type == nmstateshared.NodeNetworkConfigurationPolicyConditionDegraded {

// get NNCE list to receive more details on why nncp is Degraded
nnceList := &nmstatev1beta1.NodeNetworkConfigurationEnactmentList{}
nnceList := &nmstatev1.NodeNetworkConfigurationEnactmentList{}
listOpts := []client.ListOption{
client.MatchingLabels(
map[string]string{
Expand All @@ -170,7 +169,7 @@ func (r *OpenStackDeploy) validateNNCP() error {
}

var nnceError string
var nnce nmstatev1beta1.NodeNetworkConfigurationEnactment
var nnce nmstatev1.NodeNetworkConfigurationEnactment
for _, nnce = range nnceList.Items {
if nnce.Status.Conditions != nil && len(nnce.Status.Conditions) > 0 {
condition := nmstate.GetCurrentCondition(nnce.Status.Conditions)
Expand Down
2 changes: 1 addition & 1 deletion controllers/openstacknetattachment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (

"github.com/go-logr/logr"
nmstateshared "github.com/nmstate/kubernetes-nmstate/api/shared"
nmstatev1 "github.com/nmstate/kubernetes-nmstate/api/v1"
nmstatev1 "github.com/nmstate/kubernetes-nmstate/api/v1beta1"
sriovnetworkv1 "github.com/openshift/sriov-network-operator/api/v1"
"github.com/openstack-k8s-operators/osp-director-operator/api/shared"
ospdirectorv1beta1 "github.com/openstack-k8s-operators/osp-director-operator/api/v1beta1"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/gophercloud/gophercloud v1.3.0
github.com/k8snetworkplumbingwg/network-attachment-definition-client v0.0.0-20200626054723-37f83d1996bc
github.com/metal3-io/baremetal-operator/apis v0.0.0-20220105105621-0ee9ce37c7bc
github.com/nmstate/kubernetes-nmstate v0.60.0
github.com/nmstate/kubernetes-nmstate/api v0.0.0-20230518145043-eefd3b0fcd65
github.com/onsi/ginkgo/v2 v2.9.2
github.com/onsi/gomega v1.27.6
github.com/openshift/cluster-api v0.0.0-20191129101638-b09907ac6668
Expand Down
Loading

0 comments on commit dca110e

Please sign in to comment.