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

redfishpower: support test mode #143

Merged
merged 7 commits into from
Feb 10, 2024
Merged

Commits on Feb 9, 2024

  1. redfishpower: fix invalid tabbing

    Problem: There is some inconsistent tabbing.
    
    Fix it!
    chu11 committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    678e111 View commit details
    Browse the repository at this point in the history
  2. redfishpower: group curl code together

    Problem: In several functions curl API calls are not "grouped"
    together.  They are oddly called at different points in the
    function even though it is not necessary.  This is likely due to
    early development and cleanup was forgotten.
    
    Group the curl API calls together so the code is a little cleaner.
    chu11 committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    b95f917 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2024

  1. redfishpower: create macros for commands

    Problem: The commands "stat", "on", "off", and "cycle" are hard coded
    everywhere.  This isn't good programming practice.
    
    Create macros CMD_STAT, CMD_ON, CMD_OFF, and CMD_CYCLE instead of
    hard coding it everywhere.
    chu11 committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    5361ca9 View commit details
    Browse the repository at this point in the history
  2. redfishpower: support a test mode

    Problem: As redfishpower gets more complex, testing of the actual
    redfishpower co-process instead of the simulated one under t/simulators
    will become important.
    
    Add a test-mode into redfishpower via a --test-mode option.  The
    test mode essentially disables all internal curl API calls so no
    actual network communication is done.  All network calls are just
    assumed to work immediately.  The power status of all hosts is
    tracked after off/on/cycle calls are made.
    
    Fixes chaos#131
    chu11 committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    36962fe View commit details
    Browse the repository at this point in the history
  3. t: use redfishpower --test-mode

    Problem: Redfishpower now has a test mode, but it is not being
    used.
    
    Use it in t0029-redfish.t.
    chu11 committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    cbd6432 View commit details
    Browse the repository at this point in the history
  4. t: remove redfishpower simulator

    Problem: Redfishpower now has a --test-mode option, so the redfishpower
    simulator is no longer needed.
    
    Remove the redfishpower simulator from t/simulators.
    chu11 committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    e578b46 View commit details
    Browse the repository at this point in the history
  5. workflows: build redfishpower in distcheck

    Problem: The t0029-redfish.t test now uses the redfishpower
    --test-mode option, not the redfishpower simulator.  This
    requires 'make distcheck' to build redfishpower.
    
    Set the DISTCHECK_CONFIGURE_FLAGS environment variable to
    ensure distcheck builds redfishpower.
    chu11 committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    9a44768 View commit details
    Browse the repository at this point in the history