GetAllVariables retrieves all variables for the specified host in Execinternal.
()
| 49 | |
| 50 | // GetAllVariables retrieves all variables for the specified host in Execinternal. |
| 51 | func (o ExecOptions) GetAllVariables() (map[string]any, error) { |
| 52 | ha, err := o.Get(variable.GetAllVariable(o.Host)) |
| 53 | if err != nil { |
| 54 | return nil, err |
| 55 | } |
| 56 | |
| 57 | vd, ok := ha.(map[string]any) |
| 58 | if !ok { |
| 59 | return nil, errors.Errorf("host: %s variable is not a map", o.Host) |
| 60 | } |
| 61 | |
| 62 | return vd, nil |
| 63 | } |
| 64 | |
| 65 | // GetConnector returns a connector for the specified host in Execinternal. |
| 66 | func (o ExecOptions) GetConnector(ctx context.Context) (connector.Connector, error) { |
no test coverage detected