AosApiClient

API client for interacting with Alcatel-Lucent OmniSwitch AOS8 HTTP API.

This client provides a high-level interface for authentication and making GET, POST, PUT, and DELETE requests to various AOS8 API endpoints.

__init__(username, password, base_url, verify_ssl=False, debug=False)

Initialize the AOS API client and log in.

Parameters:
  • username (str) –

    AOS API username.

  • password (str) –

    AOS API password.

  • base_url (str) –

    Base URL of the AOS device.

  • verify_ssl (bool, default: False ) –

    Whether to verify SSL certificates.

  • debug (bool, default: False ) –

    Enable debug logging.

close()

Close the underlying HTTP connection pool.

delete(path, **kwargs)

Send a DELETE request.

Parameters:
  • path (str) –

    API endpoint path.

  • **kwargs

    Additional parameters for the request.

Returns:
  • Response

    Response object.

get(path, **kwargs)

Send a GET request.

Parameters:
  • path (str) –

    API endpoint path.

  • **kwargs

    Additional parameters for the request.

Returns:
  • Response

    Response object.

post(path, data=None, **kwargs)

Send a POST request.

Parameters:
  • path (str) –

    API endpoint path.

  • data (dict, default: None ) –

    Dictionary to send in the body.

  • **kwargs

    Additional parameters for the request.

Returns:
  • Response

    Response object.

put(path, data=None, **kwargs)

Send a PUT request.

Parameters:
  • path (str) –

    API endpoint path.

  • data (dict, default: None ) –

    Dictionary to send in the body.

  • **kwargs

    Additional parameters for the request.

Returns:
  • Response

    Response object.