Skip to content

Commit 0a2b8ff

Browse files
refactor: rename API to HostAPI
1 parent a2485c0 commit 0a2b8ff

File tree

25 files changed

+61
-58
lines changed

25 files changed

+61
-58
lines changed

integrationtests/disk_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111

1212
"github.com/kubernetes-csi/csi-proxy/pkg/disk"
13-
diskapi "github.com/kubernetes-csi/csi-proxy/pkg/disk/api"
13+
diskapi "github.com/kubernetes-csi/csi-proxy/pkg/disk/hostapi"
1414
"github.com/stretchr/testify/assert"
1515
"github.com/stretchr/testify/require"
1616
)

integrationtests/filesystem_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/stretchr/testify/require"
1616

1717
"github.com/kubernetes-csi/csi-proxy/pkg/filesystem"
18-
filesystemapi "github.com/kubernetes-csi/csi-proxy/pkg/filesystem/api"
18+
filesystemapi "github.com/kubernetes-csi/csi-proxy/pkg/filesystem/hostapi"
1919
)
2020

2121
func TestFilesystem(t *testing.T) {

integrationtests/iscsi_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
"testing"
88

99
disk "github.com/kubernetes-csi/csi-proxy/pkg/disk"
10-
diskapi "github.com/kubernetes-csi/csi-proxy/pkg/disk/api"
10+
diskapi "github.com/kubernetes-csi/csi-proxy/pkg/disk/hostapi"
1111
iscsi "github.com/kubernetes-csi/csi-proxy/pkg/iscsi"
12-
iscsiapi "github.com/kubernetes-csi/csi-proxy/pkg/iscsi/api"
12+
iscsiapi "github.com/kubernetes-csi/csi-proxy/pkg/iscsi/hostapi"
1313
system "github.com/kubernetes-csi/csi-proxy/pkg/system"
14-
systemapi "github.com/kubernetes-csi/csi-proxy/pkg/system/api"
14+
systemapi "github.com/kubernetes-csi/csi-proxy/pkg/system/hostapi"
1515

1616
"github.com/stretchr/testify/assert"
1717
"github.com/stretchr/testify/require"

integrationtests/smb_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import (
1515
"github.com/stretchr/testify/require"
1616

1717
fs "github.com/kubernetes-csi/csi-proxy/pkg/filesystem"
18-
fsapi "github.com/kubernetes-csi/csi-proxy/pkg/filesystem/api"
18+
fsapi "github.com/kubernetes-csi/csi-proxy/pkg/filesystem/hostapi"
1919
"github.com/kubernetes-csi/csi-proxy/pkg/smb"
20-
smbapi "github.com/kubernetes-csi/csi-proxy/pkg/smb/api"
20+
smbapi "github.com/kubernetes-csi/csi-proxy/pkg/smb/hostapi"
2121
)
2222

2323
func TestSMB(t *testing.T) {

integrationtests/system_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"testing"
1010

1111
system "github.com/kubernetes-csi/csi-proxy/pkg/system"
12-
systemapi "github.com/kubernetes-csi/csi-proxy/pkg/system/api"
12+
systemapi "github.com/kubernetes-csi/csi-proxy/pkg/system/hostapi"
1313

1414
"github.com/stretchr/testify/assert"
1515
"github.com/stretchr/testify/require"

integrationtests/volume_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"testing"
1010

1111
disk "github.com/kubernetes-csi/csi-proxy/pkg/disk"
12-
diskapi "github.com/kubernetes-csi/csi-proxy/pkg/disk/api"
12+
diskapi "github.com/kubernetes-csi/csi-proxy/pkg/disk/hostapi"
1313
volume "github.com/kubernetes-csi/csi-proxy/pkg/volume"
14-
volumeapi "github.com/kubernetes-csi/csi-proxy/pkg/volume/api"
14+
volumeapi "github.com/kubernetes-csi/csi-proxy/pkg/volume/hostapi"
1515

1616
"github.com/stretchr/testify/require"
1717
)

pkg/disk/disk.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ package disk
33
import (
44
"context"
55

6-
diskapi "github.com/kubernetes-csi/csi-proxy/pkg/disk/api"
6+
diskapi "github.com/kubernetes-csi/csi-proxy/pkg/disk/hostapi"
77
"k8s.io/klog/v2"
88
)
99

1010
type Disk struct {
11-
hostAPI diskapi.API
11+
hostAPI diskapi.HostAPI
1212
}
1313

1414
type Interface interface {
@@ -39,7 +39,7 @@ type Interface interface {
3939
// check that Disk implements Interface
4040
var _ Interface = &Disk{}
4141

42-
func New(hostAPI diskapi.API) (*Disk, error) {
42+
func New(hostAPI diskapi.HostAPI) (*Disk, error) {
4343
return &Disk{
4444
hostAPI: hostAPI,
4545
}, nil
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ const (
2323
IOCTL_STORAGE_QUERY_PROPERTY = 0x002d1400
2424
)
2525

26-
// API declares the interface exposed by the internal API
27-
type API interface {
26+
// HostAPI declares the interface exposed by the internal API
27+
type HostAPI interface {
2828
// ListDiskLocations - constructs a map with the disk number as the key and the DiskLocation structure
2929
// as the value. The DiskLocation struct has various fields like the Adapter, Bus, Target and LUNID.
3030
ListDiskLocations() (map[uint32]DiskLocation, error)
@@ -55,7 +55,7 @@ type API interface {
5555
type DiskAPI struct{}
5656

5757
// ensure that DiskAPI implements the exposed API
58-
var _ API = &DiskAPI{}
58+
var _ HostAPI = &DiskAPI{}
5959

6060
func New() DiskAPI {
6161
return DiskAPI{}

pkg/filesystem/filesystem.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ package filesystem
33
import (
44
"context"
55

6-
filesystemapi "github.com/kubernetes-csi/csi-proxy/pkg/filesystem/api"
6+
filesystemapi "github.com/kubernetes-csi/csi-proxy/pkg/filesystem/hostapi"
77
"k8s.io/klog/v2"
88
)
99

1010
type Filesystem struct {
11-
hostAPI filesystemapi.API
11+
hostAPI filesystemapi.HostAPI
1212
}
1313

1414
type Interface interface {
@@ -41,7 +41,7 @@ type Interface interface {
4141
// check that Filesystem implements Interface
4242
var _ Interface = &Filesystem{}
4343

44-
func New(hostAPI filesystemapi.API) (*Filesystem, error) {
44+
func New(hostAPI filesystemapi.HostAPI) (*Filesystem, error) {
4545
return &Filesystem{
4646
hostAPI: hostAPI,
4747
}, nil

0 commit comments

Comments
 (0)