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

driver: digitalloggers_restapi: enable REST API #1512

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 21, 2024

  1. driver: digitalloggers_restapi: enable REST API

    The legacy HTTP API does not work on newer units without manually
    changing the configuration in Setup.
    
    This driver is based on https://www.digital-loggers.com/restapi.pdf
    
    Curl examples that were used for development are included as comments
    so that users can test their access outside of labgrid.
    
    The REST API seems to only allow authenticated users, so the host:
    parameter is parsed to pass user and password to HTTPDigestAuth.
    CSRF is also required, so a valid (simple) header is provided.
    Non-authenticated URLs are supported, but most likely will not
    work.
    
    HTTPS is recommended, but the units ship with self-signed certificates
    so SSL certificate verification warnings are intentionally ignored.
    
    Add to test_powerdriver.py import test.
    
    Example usage in lg-env.yaml (default as-shipped settings):
    
    NetworkPowerPort:
        model: 'digitalloggers_restapi'
        host: 'http://admin:[email protected]'
        index: 0
    
    Signed-off-by: Tim Orling <[email protected]>
    [[email protected]: removed unused and sorted imports]
    Signed-off-by: Rouven Czerwinski <[email protected]>
    moto-timo authored and Emantor committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    6579cf6 View commit details
    Browse the repository at this point in the history