Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add per provider config: #326

Merged
merged 21 commits into from
May 11, 2023
Merged

Commits on May 8, 2023

  1. Add per provider config:

    There exists some config that cannot be
    shared across all providers. For example,
    the port for ipmitool is generally 623, but
    is generally 16992 for intelAMT. Allowing
    per provider config enables customizing this
    type of data.
    
    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    8ebc70c View commit details
    Browse the repository at this point in the history
  2. Refactor to use provider specific config structs:

    This allows the provider to specify all config it needs.
    
    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    6bb0b1d View commit details
    Browse the repository at this point in the history
  3. Updated go.mod

    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    f9f861f View commit details
    Browse the repository at this point in the history
  4. Move all option related code to option.go

    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    a6d27a5 View commit details
    Browse the repository at this point in the history
  5. Remove error return from default http.Client constructor:

    This makes New functions cleaner.
    
    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    02f085e View commit details
    Browse the repository at this point in the history
  6. Update internal ipmi:

    Add functional arguments for optional Ipmi struct
    values. Add additional struct values. Make cipher
    suite 3 the first suite tried. 3 is more commonly
    used then 17 so most machines will not try with 17 first.
    Add debug logging of ipmitool command line options.
    
    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    e1aff89 View commit details
    Browse the repository at this point in the history
  7. Update default http.Client constructor:

    The new function signature does not return
    an error.
    
    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    fe4dfaa View commit details
    Browse the repository at this point in the history
  8. Add functional arguments and options:

    This uniforms providers to using func args.
    Updates the client to work with this.
    
    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    fbec04f View commit details
    Browse the repository at this point in the history
  9. Fix merge conflicts:

    Fix basic auth test and example.
    
    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    cfa88bf View commit details
    Browse the repository at this point in the history
  10. Fix defaultTimeout test:

    The registering of ipmitool provider doesnt
    ignore the error when its constructor is called.
    This means that systems without ipmitool will see
    that the ipmitool provider does not get registered.
    Previously it would always be registered.
    
    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    54a32d9 View commit details
    Browse the repository at this point in the history
  11. Fix defaultTimeout test:

    Allow for a 10 millisecond error of margin.
    
    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    47f65c1 View commit details
    Browse the repository at this point in the history
  12. Make gofish port customizable:

    Previously it was not.
    
    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    f0e83f8 View commit details
    Browse the repository at this point in the history
  13. Use gofish opts for port instead of a func parameter:

    This makes it more flexible and follows the pattern the
    other providers are using.
    
    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    b52ee97 View commit details
    Browse the repository at this point in the history
  14. Make asrockrack port configurable.

    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    a22508e View commit details
    Browse the repository at this point in the history
  15. Add missing function back after main merge.

    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    7dd578a View commit details
    Browse the repository at this point in the history
  16. Main merge clean up

    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 8, 2023
    Configuration menu
    Copy the full SHA
    d91f2e7 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2023

  1. Rename gofish options to redfish:

    gofish is an implementation detail that shouldnt
    be exposed like this.
    
    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 10, 2023
    Configuration menu
    Copy the full SHA
    054fde6 View commit details
    Browse the repository at this point in the history
  2. Remove debug print line, run go fmt:

    Clean up.
    
    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 10, 2023
    Configuration menu
    Copy the full SHA
    d1528bf View commit details
    Browse the repository at this point in the history
  3. Clone the http.Client transport for each provider:

    Extra precaution for race conditions.
    
    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 10, 2023
    Configuration menu
    Copy the full SHA
    532dade View commit details
    Browse the repository at this point in the history
  4. Update README to reflect function signature change

    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 10, 2023
    Configuration menu
    Copy the full SHA
    9e2d7b3 View commit details
    Browse the repository at this point in the history
  5. Enable CGO:

    `-race` flag was added to `make test` and requires CGO.
    go: -race requires cgo; enable cgo by setting CGO_ENABLED=1
    
    Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
    jacobweinstock committed May 10, 2023
    Configuration menu
    Copy the full SHA
    46acd6e View commit details
    Browse the repository at this point in the history