| 60 | } |
| 61 | |
| 62 | func NewSshCommonOpts(dependencies *cmd.Dependencies) *SshCommonOptions { |
| 63 | return &SshCommonOptions{ |
| 64 | Dependencies: dependencies, |
| 65 | GetAllAccountsForSshMachine: func() ([]accounts.IAccount, error) { |
| 66 | return getAllAccountsForSshMachine(dependencies.Client) |
| 67 | }, |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | func RegisterSshCommonFlags(cmd *cobra.Command, flags *SshCommonFlags, entityType string) { |
| 72 | cmd.Flags().StringVar(&flags.Account.Value, flags.Account.Name, "", "The name or ID of the SSH key pair or username/password account") |