Skip to content

Commit 21b0a9e

Browse files
Backport FCP fixes.
1 parent 1a8c012 commit 21b0a9e

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

persistent_store/crd/apis/netapp/v1/node.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ func (in *TridentNode) Apply(persistent *models.Node) error {
4242
in.IQN = persistent.IQN
4343
in.NQN = persistent.NQN
4444
in.IPs = persistent.IPs
45+
in.HostWWPNMap = persistent.HostWWPNMap
4546
in.Deleted = persistent.Deleted
4647
in.PublicationState = string(persistent.PublicationState)
4748
in.LogLevel = persistent.LogLevel
@@ -75,6 +76,7 @@ func (in *TridentNode) Persistent() (*models.Node, error) {
7576
IQN: in.IQN,
7677
NQN: in.NQN,
7778
IPs: in.IPs,
79+
HostWWPNMap: in.HostWWPNMap,
7880
NodePrep: &models.NodePrep{},
7981
HostInfo: &models.HostSystem{},
8082
Deleted: in.Deleted,

persistent_store/crd/apis/netapp/v1/types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,8 @@ type TridentNode struct {
368368
NQN string `json:"nqn,omitempty"`
369369
// IPs is a list of IP addresses for the TridentNode
370370
IPs []string `json:"ips,omitempty"`
371+
// HostWWPNMap is the map of host WWPNs
372+
HostWWPNMap map[string][]string `json:"hostWWPNMap,omitempty"`
371373
// NodePrep is the current status of node preparation for this node
372374
NodePrep runtime.RawExtension `json:"nodePrep,omitempty"`
373375
// HostInfo contains information about the node's host machine

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)