@@ -115,46 +115,6 @@ func distributeFingerprintImpl(distributeRequest func([]string, string, string,
115
115
return result
116
116
}
117
117
118
- func getMinionFingerprintFromSaltCall () (model.Response , error ) {
119
- log .Println ("[getMinionFingerprintFromSaltCall] get minion fingerprint using salt-call" )
120
-
121
- saltLocation := SaltLocation
122
- out , err := ExecCmd ("find" , saltLocation , "-name" , "salt-call" )
123
- if err != nil {
124
- log .Printf ("[getMinionFingerprintFromSaltCall] cannot execute find command, err: %s" , err .Error ())
125
- return model.Response {}, err
126
- }
127
-
128
- var saltCallLocation string
129
- for _ , findResult := range strings .Split (out , "\n " ) {
130
- if strings .Contains (findResult , "salt-call" ) {
131
- saltCallLocation = findResult
132
- break
133
- }
134
- }
135
- if len (saltCallLocation ) == 0 {
136
- log .Printf ("[getMinionFingerprintFromSaltCall] cannot find salt-call executable at %s" , saltLocation )
137
- return model.Response {}, errors .New ("cannot find salt-call executable" )
138
- }
139
- log .Printf ("[getMinionFingerprintFromSaltCall] found salt-call at %s" , saltCallLocation )
140
-
141
- out , err = ExecCmd (saltCallLocation , "-local" , "key.finger" )
142
- if err != nil {
143
- log .Printf ("[getMinionFingerprintFromSaltCall] cannot execute salt-call command, err: %s" , err .Error ())
144
- return model.Response {}, err
145
- }
146
- fingerLines := strings .Split (out , "\n " )
147
- if len (fingerLines ) != 2 {
148
- log .Printf ("[getMinionFingerprintFromSaltCall] unknown result returned from salt-call: %s" , out )
149
- return model.Response {}, errors .New ("unknown result returned from salt-call" )
150
- }
151
-
152
- fingerprint := strings .Trim (fingerLines [1 ], " " )
153
- log .Printf ("[getMinionFingerprintFromSaltCall] fingerprint: %s" , fingerprint )
154
-
155
- return model.Response {Status : fingerprint }, nil
156
- }
157
-
158
118
func getMinionFingerprintFromPrivateKey () model.Response {
159
119
keyLocation := MinionKey
160
120
log .Println ("[getMinionFingerprintFromPrivateKey] generate the fingerprint from the minion's private key: " + keyLocation )
0 commit comments