@@ -46,8 +46,8 @@ type Connector struct {
46
46
Multipath bool `json:"multipath"`
47
47
RetryCount int32 `json:"retry_count"`
48
48
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 "`
51
51
}
52
52
53
53
func init () {
@@ -277,17 +277,17 @@ func Connect(c Connector) (string, error) {
277
277
}
278
278
}
279
279
280
- if c .Discovery {
280
+ if c .DoDiscovery {
281
281
// 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 {
283
283
debug .Printf ("Error in discovery of the target: %s\n " , err .Error ())
284
284
lastErr = err
285
285
continue
286
286
}
287
287
}
288
288
289
289
// 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 )
291
291
if err != nil {
292
292
debug .Printf ("Error creating db entry: %s\n " , err .Error ())
293
293
continue
0 commit comments