MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / getAllAccountsForSshMachine

Function getAllAccountsForSshMachine

pkg/machinescommon/ssh_common.go:188–202  ·  view source on GitHub ↗
(client *client.Client)

Source from the content-addressed store, hash-verified

186}
187
188func 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
204func canBeUsedForSSH(account accounts.IAccount) bool {
205 accountType := account.GetAccountType()

Callers 1

NewSshCommonOptsFunction · 0.85

Calls 1

canBeUsedForSSHFunction · 0.85

Tested by

no test coverage detected