# octavia.amphorae.backends.utils package

## Submodules

## octavia.amphorae.backends.utils.haproxy_query module

class `HAProxyQuery`(stats_socket)

  Bases: `object`

  Class used for querying the HAProxy statistics socket.

  The CSV output is defined in the HAProxy documentation:

  http://cbonte.github.io/haproxy-dconv/configuration-1.4.html#9

  `get_pool_status`()

    Get status for each server and the pool as a whole.

    Returns: | pool data structure {<pool-name>: { ‘uuid’: <uuid>, ‘status’: ‘UP’|’DOWN’, ‘members’: [<name>: ‘UP’|’DOWN’|’DRAIN’|’no check’] }}

  `show_info`()

    Get and parse output from ‘show info’ command.

  `show_stat`(proxy_iid=-1, object_type=-1, server_id=-1)

    Get and parse output from ‘show stat’ command.

    Parameters:

    - proxy_iid – Proxy ID (column 27 in CSV output). -1 for all.
    - object_type – Select the type of dumpable object. Values can be ORed. -1 - everything 1 - frontends 2 - backends 4 - servers
    - server_id – Server ID (column 28 in CSV output?), or -1 for everything.

    Returns: | stats (split into an array by newline)

## octavia.amphorae.backends.utils.keepalivedlvs_query module

`get_ipvsadm_info`(ns_name, is_stats_cmd=False)

`get_listener_realserver_mapping`(ns_name, listener_ip_port, health_monitor_enabled)

`get_udp_listener_pool_status`(listener_id)

`get_udp_listener_resource_ipports_nsname`(listener_id)

`get_udp_listeners_stats`()

`read_kernel_file`(ns_name, file_path)

## Module contents

this page last updated: 2020-04-10 18:17:54

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug questions?