Skip to content

Commit

Permalink
Converted iqns fetched to lowercase for csi-unity
Browse files Browse the repository at this point in the history
  • Loading branch information
rajendraindukuri committed Jul 10, 2023
1 parent dc8f2e0 commit 10b7e17
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions service/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1493,16 +1493,22 @@ func (s *service) addNodeInformationIntoArray(ctx context.Context, array *Storag
}
}

//Get FC Initiator WWNs
// Get FC Initiator WWNs
wwns, errFc := utils.GetFCInitiators(ctx)
if errFc != nil {
log.Warn("'FC Initiators' cannot be retrieved.")
}

//Get iSCSI Initiator IQN
iqns, errIscsi := s.iscsiClient.GetInitiators("")
// Get iSCSI Initiator IQN
iqnsOrig, errIscsi := s.iscsiClient.GetInitiators("")
iqns := iqnsOrig
if errIscsi != nil {
log.Warn("'iSCSI Initiators' cannot be retrieved.")
} else if len(iqns) > 0 {
// converting iqn values to lowercase since they are registered to array in lowercase
for i := 0; i < len(iqns); i++ {
iqns[i] = strings.ToLower(iqns[i])
}
}

if errFc != nil && errIscsi != nil {
Expand Down

0 comments on commit 10b7e17

Please sign in to comment.