Skip to content

Commit

Permalink
Support for update Volume tags via RIAAS (#211)
Browse files Browse the repository at this point in the history
* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS

* Support for update Volume tags via RIAAS
  • Loading branch information
sameshai authored Jan 30, 2025
1 parent ad8796f commit da0ed14
Show file tree
Hide file tree
Showing 28 changed files with 411 additions and 90 deletions.
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"github.com/IBM/ibm-csi-common/pkg/metrics"
mountManager "github.com/IBM/ibm-csi-common/pkg/mountmanager"
"github.com/IBM/ibm-csi-common/pkg/utils"
"github.com/IBM/ibm-csi-common/pkg/watcher"
"github.com/IBM/ibmcloud-volume-vpc/pkg/watcher"
csiConfig "github.com/kubernetes-sigs/ibm-vpc-block-csi-driver/config"
driver "github.com/kubernetes-sigs/ibm-vpc-block-csi-driver/pkg/ibmcsidriver"
"go.uber.org/zap"
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.22.0

require (
github.com/IBM/ibm-csi-common v1.1.18
github.com/IBM/ibmcloud-volume-interface v1.2.6
github.com/IBM/ibmcloud-volume-vpc v1.1.12
github.com/IBM/ibmcloud-volume-interface v1.2.9
github.com/IBM/ibmcloud-volume-vpc v1.1.14
github.com/IBM/secret-utils-lib v1.1.11
github.com/container-storage-interface/spec v1.9.0
github.com/golang/glog v1.2.1
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ github.com/IBM/go-sdk-core/v5 v5.17.4 h1:VGb9+mRrnS2HpHZFM5hy4J6ppIWnwNrw0G+tLSg
github.com/IBM/go-sdk-core/v5 v5.17.4/go.mod h1:KsAAI7eStAWwQa4F96MLy+whYSh39JzNjklZRbN/8ns=
github.com/IBM/ibm-csi-common v1.1.18 h1:CbzoONFN6vdmPLoXGxygiq3sbr2xtAcVUb0Vqj3/HNI=
github.com/IBM/ibm-csi-common v1.1.18/go.mod h1:bDs9CLfr09kFpSMcR35e9AmyR2pSydx8goHjagFPrHs=
github.com/IBM/ibmcloud-volume-interface v1.2.6 h1:OLumrSQ0XTOp6gW+k0z2X53uTYOIt1wWSkTCXzK/vAM=
github.com/IBM/ibmcloud-volume-interface v1.2.6/go.mod h1:sDeQiPuN8k9yTRl9FbE2GZCXPNg4cV3oldUfL8wwGNA=
github.com/IBM/ibmcloud-volume-vpc v1.1.12 h1:DSC+YfddhegnixdX3stOgsIqyKlbc5wF5ofWomyMIsI=
github.com/IBM/ibmcloud-volume-vpc v1.1.12/go.mod h1:bdVgIWQmiq4ehs4buHpMYwFh6nlIaKBOxRGJoTh6bwY=
github.com/IBM/ibmcloud-volume-interface v1.2.9 h1:ug55V2mzK/IaFkfuKDOt74yzhLapSR/+qVgfQblfAjw=
github.com/IBM/ibmcloud-volume-interface v1.2.9/go.mod h1:sDeQiPuN8k9yTRl9FbE2GZCXPNg4cV3oldUfL8wwGNA=
github.com/IBM/ibmcloud-volume-vpc v1.1.14 h1:rs8f4OO+lP3jOIi5tpgiWVyVEL6g4lazGfMEsLpsfUI=
github.com/IBM/ibmcloud-volume-vpc v1.1.14/go.mod h1:CSAsBgEXN6WL8y/EpEj9GA+w+vs3fVLoRadtuCWUAz8=
github.com/IBM/secret-common-lib v1.1.11 h1:EpfEe1gT1bnFQ3bxQPrh6bzTPeGjUo1NReVkCCP+TOc=
github.com/IBM/secret-common-lib v1.1.11/go.mod h1:7YJF0ipT979nHIPkiCpvjFboFoIhrmYnIliE1vjCjZM=
github.com/IBM/secret-utils-lib v1.1.11 h1:w87BzkddoFFlhRuWRteuGj3/561lEUg6Oo0RajVC87A=
Expand Down
2 changes: 1 addition & 1 deletion pkg/ibmcsidriver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ import (
"strings"
"time"

cloudProvider "github.com/IBM/ibm-csi-common/pkg/ibmcloudprovider"
commonError "github.com/IBM/ibm-csi-common/pkg/messages"
"github.com/IBM/ibm-csi-common/pkg/metrics"
"github.com/IBM/ibm-csi-common/pkg/utils"
"github.com/IBM/ibmcloud-volume-interface/lib/provider"
providerError "github.com/IBM/ibmcloud-volume-interface/lib/utils"
utilReasonCode "github.com/IBM/ibmcloud-volume-interface/lib/utils/reasoncode"
userError "github.com/IBM/ibmcloud-volume-vpc/common/messages"
cloudProvider "github.com/IBM/ibmcloud-volume-vpc/pkg/ibmcloudprovider"
csi "github.com/container-storage-interface/spec/lib/go/csi"

"go.uber.org/zap"
Expand Down
32 changes: 13 additions & 19 deletions pkg/ibmcsidriver/controller_helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"fmt"
"testing"

cloudProvider "github.com/IBM/ibm-csi-common/pkg/ibmcloudprovider"
"github.com/IBM/ibm-csi-common/pkg/utils"
"github.com/IBM/ibmcloud-volume-interface/config"
"github.com/IBM/ibmcloud-volume-interface/lib/provider"
cloudProvider "github.com/IBM/ibmcloud-volume-vpc/pkg/ibmcloudprovider"
csi "github.com/container-storage-interface/spec/lib/go/csi"
"github.com/stretchr/testify/assert"
)
Expand Down Expand Up @@ -198,9 +198,8 @@ func TestGetVolumeParameters(t *testing.T) {
},
expectedVolume: &provider.Volume{Name: &volumeName,
Capacity: &volumeSize,
VPCVolume: provider.VPCVolume{VPCBlockVolume: provider.VPCBlockVolume{
Tags: []string{createdByIBM},
},
VPCVolume: provider.VPCVolume{
Tags: []string{createdByIBM},
Profile: &provider.Profile{Name: "general-purpose"},
ResourceGroup: &provider.ResourceGroup{ID: "myresourcegroups"},
},
Expand Down Expand Up @@ -333,9 +332,8 @@ func TestGetVolumeParameters(t *testing.T) {
},
expectedVolume: &provider.Volume{Name: &volumeName,
Capacity: &volumeSize,
VPCVolume: provider.VPCVolume{VPCBlockVolume: provider.VPCBlockVolume{
Tags: []string{createdByIBM},
},
VPCVolume: provider.VPCVolume{
Tags: []string{createdByIBM},
Profile: &provider.Profile{Name: "general-purpose"},
ResourceGroup: &provider.ResourceGroup{ID: "myresourcegroups"},
},
Expand Down Expand Up @@ -421,9 +419,8 @@ func TestOverrideParams(t *testing.T) {
},
expectedVolume: &provider.Volume{Name: &volumeName,
Capacity: &volumeSize,
VPCVolume: provider.VPCVolume{VPCBlockVolume: provider.VPCBlockVolume{
Tags: []string{createdByIBM},
},
VPCVolume: provider.VPCVolume{
Tags: []string{createdByIBM},
Profile: &provider.Profile{Name: "general-purpose"},
ResourceGroup: &provider.ResourceGroup{ID: "secret-rg"},
},
Expand Down Expand Up @@ -507,9 +504,8 @@ func TestOverrideParams(t *testing.T) {
},
expectedVolume: &provider.Volume{Name: &volumeName,
Capacity: &volumeSize,
VPCVolume: provider.VPCVolume{VPCBlockVolume: provider.VPCBlockVolume{
Tags: []string{createdByIBM},
},
VPCVolume: provider.VPCVolume{
Tags: []string{createdByIBM},
Profile: &provider.Profile{Name: "custom"},
ResourceGroup: &provider.ResourceGroup{ID: "myresourcegroups"},
},
Expand Down Expand Up @@ -604,9 +600,8 @@ func TestCreateCSIVolumeResponse(t *testing.T) {
{
testCaseName: "Valid volume response",
requestVol: provider.Volume{VolumeID: volumeID,
VPCVolume: provider.VPCVolume{VPCBlockVolume: provider.VPCBlockVolume{
Tags: []string{createdByIBM},
},
VPCVolume: provider.VPCVolume{
Tags: []string{createdByIBM},
Profile: &provider.Profile{Name: "general-purpose"},
ResourceGroup: &provider.ResourceGroup{ID: "myresourcegroups"},
},
Expand Down Expand Up @@ -636,9 +631,8 @@ func TestCreateCSIVolumeResponse(t *testing.T) {
{
testCaseName: "Valid volume response with region in vol request empty",
requestVol: provider.Volume{VolumeID: volumeID,
VPCVolume: provider.VPCVolume{VPCBlockVolume: provider.VPCBlockVolume{
Tags: []string{createdByIBM},
},
VPCVolume: provider.VPCVolume{
Tags: []string{createdByIBM},
Profile: &provider.Profile{Name: "general-purpose"},
ResourceGroup: &provider.ResourceGroup{ID: "myresourcegroups"},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/ibmcsidriver/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (
csi "github.com/container-storage-interface/spec/lib/go/csi"
"github.com/stretchr/testify/assert"

cloudProvider "github.com/IBM/ibm-csi-common/pkg/ibmcloudprovider"
"github.com/IBM/ibmcloud-volume-interface/lib/provider/fake"
cloudProvider "github.com/IBM/ibmcloud-volume-vpc/pkg/ibmcloudprovider"
"golang.org/x/net/context"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
2 changes: 1 addition & 1 deletion pkg/ibmcsidriver/fileOps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"os"
"testing"

cloudProvider "github.com/IBM/ibm-csi-common/pkg/ibmcloudprovider"
cloudProvider "github.com/IBM/ibmcloud-volume-vpc/pkg/ibmcloudprovider"
"github.com/kubernetes-sigs/ibm-vpc-block-csi-driver/pkg/ibmcsidriver/ibmcsidriverfakes"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ibmcsidriver/ibm_csi_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ package ibmcsidriver
import (
"fmt"

cloudProvider "github.com/IBM/ibm-csi-common/pkg/ibmcloudprovider"
commonError "github.com/IBM/ibm-csi-common/pkg/messages"
nodeMetadata "github.com/IBM/ibm-csi-common/pkg/metadata"
mountManager "github.com/IBM/ibm-csi-common/pkg/mountmanager"
"github.com/IBM/ibm-csi-common/pkg/utils"
cloudProvider "github.com/IBM/ibmcloud-volume-vpc/pkg/ibmcloudprovider"
csi "github.com/container-storage-interface/spec/lib/go/csi"
"go.uber.org/zap"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ibmcsidriver/ibm_csi_driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (

testingexec "k8s.io/utils/exec/testing"

cloudProvider "github.com/IBM/ibm-csi-common/pkg/ibmcloudprovider"
nodeMetadata "github.com/IBM/ibm-csi-common/pkg/metadata"
nodeInfo "github.com/IBM/ibm-csi-common/pkg/metadata/fake"
mountManager "github.com/IBM/ibm-csi-common/pkg/mountmanager"
cloudProvider "github.com/IBM/ibmcloud-volume-vpc/pkg/ibmcloudprovider"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/ibmcsidriver/node_helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package ibmcsidriver
import (
"testing"

cloudProvider "github.com/IBM/ibm-csi-common/pkg/ibmcloudprovider"
cloudProvider "github.com/IBM/ibmcloud-volume-vpc/pkg/ibmcloudprovider"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/ibmcsidriver/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"flag"
"testing"

cloudProvider "github.com/IBM/ibm-csi-common/pkg/ibmcloudprovider"
cloudProvider "github.com/IBM/ibmcloud-volume-vpc/pkg/ibmcloudprovider"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/sanity/sanity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

cloudProvider "github.com/IBM/ibm-csi-common/pkg/ibmcloudprovider"
nodeMetadata "github.com/IBM/ibm-csi-common/pkg/metadata"
cloudProvider "github.com/IBM/ibmcloud-volume-vpc/pkg/ibmcloudprovider"

mountManager "github.com/IBM/ibm-csi-common/pkg/mountmanager"

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions vendor/github.com/IBM/ibmcloud-volume-vpc/block/provider/util.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit da0ed14

Please sign in to comment.