(client *client.Client)
| 186 | } |
| 187 | |
| 188 | func getAllAccountsForSshMachine(client *client.Client) ([]accounts.IAccount, error) { |
| 189 | allAccounts, err := client.Accounts.GetAll() |
| 190 | if err != nil { |
| 191 | return nil, err |
| 192 | } |
| 193 | |
| 194 | var accounts []accounts.IAccount |
| 195 | for _, a := range allAccounts { |
| 196 | if canBeUsedForSSH(a) { |
| 197 | accounts = append(accounts, a) |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | return accounts, nil |
| 202 | } |
| 203 | |
| 204 | func canBeUsedForSSH(account accounts.IAccount) bool { |
| 205 | accountType := account.GetAccountType() |
no test coverage detected