Skip to content

Commit b0ed988

Browse files
author
Utkarsh Mani Tripathi
committed
rename discovery flags in Connector struct
Signed-off-by: Utkarsh Mani Tripathi <[email protected]>
1 parent b5a02fd commit b0ed988

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

iscsi/iscsi.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ type Connector struct {
4646
Multipath bool `json:"multipath"`
4747
RetryCount int32 `json:"retry_count"`
4848
CheckInterval int32 `json:"check_interval"`
49-
Discovery bool `json:"discovery"`
50-
CHAPDiscovery bool `json:"chap_discovery"`
49+
DoDiscovery bool `json:"do_discovery"`
50+
DoCHAPDiscovery bool `json:"do_chap_discovery"`
5151
}
5252

5353
func init() {
@@ -277,17 +277,17 @@ func Connect(c Connector) (string, error) {
277277
}
278278
}
279279

280-
if c.Discovery {
280+
if c.DoDiscovery {
281281
// build discoverydb and discover iscsi target
282-
if err := Discovery(p, iFace, c.DiscoverySecrets, c.CHAPDiscovery); err != nil {
282+
if err := Discovery(p, iFace, c.DiscoverySecrets, c.DoCHAPDiscovery); err != nil {
283283
debug.Printf("Error in discovery of the target: %s\n", err.Error())
284284
lastErr = err
285285
continue
286286
}
287287
}
288288

289289
// Make sure we don't log the secrets
290-
err := CreateDBEntry(c.TargetIqn, p, iFace, c.DiscoverySecrets, c.SessionSecrets, c.CHAPDiscovery)
290+
err := CreateDBEntry(c.TargetIqn, p, iFace, c.DiscoverySecrets, c.SessionSecrets, c.DoCHAPDiscovery)
291291
if err != nil {
292292
debug.Printf("Error creating db entry: %s\n", err.Error())
293293
continue

0 commit comments

Comments
 (0)