HAProxyQuery(stats_socket)[source]¶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()[source]¶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_stat(proxy_iid=-1, object_type=-1, server_id=-1)[source]¶Get and parse output from ‘show stat’ command.
| Parameters: |
|
|---|---|
| Returns: | stats (split into an array by newline) |
calculate_icmpv6_checksum(packet)[source]¶Calculate the ICMPv6 checksum for a packet.
| Parameters: | packet – The packet bytes to checksum. |
|---|---|
| Returns: | The checksum integer. |
garp(interface, ip_address, net_ns=None)[source]¶Sends a gratuitous ARP for ip_address on the interface.
| Parameters: |
|
|---|---|
| Returns: | None |
neighbor_advertisement(interface, ip_address, net_ns=None)[source]¶Sends a unsolicited neighbor advertisement for an ip on the interface.
| Parameters: |
|
|---|---|
| Returns: | None |
send_ip_advertisement(interface, ip_address, net_ns=None)[source]¶Send an address advertisement.
This method will send either GARP (IPv4) or neighbor advertisements (IPv6) for the ip address specified.
| Parameters: |
|
|---|---|
| Returns: | None |
get_interface_name(ip_address, net_ns=None)[source]¶Gets the interface name from an IP address.
| Parameters: |
|
|---|---|
| Returns: | The interface name. |
| Raises: |
|
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.