### Install acos-client from source Source: https://github.com/a10networks/acos-client/blob/master/README.md Clone the repository, checkout the stable/stein branch, and install in editable mode. Useful for development or when you need the latest source code. ```sh $ git clone https://github.com/a10networks/acos-client.git $ cd acos-client $ git checkout stable/stein $ pip install -e . ``` -------------------------------- ### Install acos-client via pip Source: https://github.com/a10networks/acos-client/blob/master/README.md Install the ACOS client library using pip. Requires Python and pip. The command installs the latest version compatible with ACOS 6.0.7. ```sh $ pip install acos-client>=3.0 ``` -------------------------------- ### Run tests with tox Source: https://github.com/a10networks/acos-client/blob/master/README.md Install tox and run the test suite. Use pip2 if on Arch Linux. Requires navigating to the acos_client directory. ```sh $ sudo pip install tox # use pip2 if using Arch Linux $ cd /path/to/acos_client $ tox ``` -------------------------------- ### Set up an SLB with ACOS Client Source: https://github.com/a10networks/acos-client/blob/master/README.md Create servers, a service group, a virtual server, a health monitor, and add members. Demonstrates typical SLB configuration using the acos_client library. ```python import acos_client as acos c = acos.Client('1.2.3.4', acos.AXAPI_30, 'admin', 'password') c.slb.server.create('s1', '1.1.1.1') c.slb.server.create('s2', '1.1.1.2') c.slb.service_group.create('pool1', c.slb.service_group.TCP, c.slb.service_group.ROUND_ROBIN) c.slb.virtual_server.create('vip1', '1.1.1.3') c.slb.hm.create('hm1', c.slb.hm.HTTP, 5, 5, 5, 'GET', '/', '200', 80) c.slb.service_group.update('pool1', health_monitor='hm1') c.slb.service_group.member.create('pool1', 's1', 80) c.slb.service_group.member.create('pool1', 's2', 80) ``` -------------------------------- ### Initialize ACOS Client Source: https://github.com/a10networks/acos-client/blob/master/README.md Create a client instance to connect to an ACOS device. Requires hostname, API version (AXAPI_30), username, and password. ```python c = acos_client.Client('somehost.example.com', acos_client.AXAPI_30, 'admin', 'password') ```