Skip to content

Commit fe6eeb8

Browse files
Fix SANType for FCP
1 parent 6afcddf commit fe6eeb8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

storage_drivers/ontap/ontap_factory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func GetDriverProtocol(driverName, configJSON string) (string, error) {
111111
if driverName == config.OntapSANStorageDriverName {
112112
SANType := strings.ToLower(pool.SANType)
113113
switch SANType {
114-
case sa.ISCSI, sa.NVMe:
114+
case sa.ISCSI, sa.NVMe, sa.FCP:
115115
return SANType, nil
116116
case "":
117117
// Old iSCSI backends will have no value for SANType

storage_drivers/ontap/ontap_factory_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ func TestGetDriverProtocol(t *testing.T) {
2323
assert.Equal(t, SANType, sa.NVMe, "Incorrect protocol type.")
2424
assert.NoError(t, err, "Failed to get protocol type.")
2525

26+
// SANType as FCP
27+
SANType, err = GetDriverProtocol(driverName, `{"SANType": "fcp"}`)
28+
assert.Equal(t, SANType, sa.FCP, "Incorrect protocol type.")
29+
assert.NoError(t, err, "Failed to get protocol type.")
30+
2631
// Empty SANType
2732
SANType, err = GetDriverProtocol(driverName, `{}`)
2833
assert.Equal(t, sa.ISCSI, SANType, "Incorrect protocol type.")

0 commit comments

Comments
 (0)