F5 Python SDK Documentation

Build Status Documentation Status

Introduction

This project implements an object model based SDK for the F5 Networks BIG-IP iControl REST interface. Users of this library can create, edit, update, and delete configuration objects on a BIG-IP device. For more information on the basic principals that the SDK uses see the User Guide.

Quick Start

Installation

$> pip install f5-sdk

Note

If you are using a pre-release version you must use the --pre option with the pip command.

Basic Example

from f5.bigip import BigIP

# Connect to the BigIP
bigip = BigIP("bigip.example.com", "admin", "somepassword")

# Get a list of all pools on the BigIP and print their name and their
# members' name
pools = bigip.ltm.pools.get_collection()
for pool in pools:
    print pool.name
    for member in pool.members_s.get_collection():
         print member.name

# Create a new pool on the BigIP
mypool = bigip.ltm.pools.pool.create(name='mypool', partition='Common')

# Load an existing pool and update its description
pool_a = bigip.ltm.pools.pool.load(name='mypool', partition='Common')
pool_a.description = "New description"
pool_a.update()

# Delete a pool if it exists
if bigip.ltm.pools.pool.exists(name='mypool', partition='Common'):
    pool_b = bigip.ltm.pools.pool.load(name='mypool', partition='Common')
    pool_b.delete()

Support

Maintenance and support of the unmodified F5 code is provided only to customers who have an existing support contract, purchased separately subject to F5’s support policies available at http://www.f5.com/about/guidelines-policies/ and http://askf5.com. F5 will not provide maintenance and support services of modified F5 code or code that does not have an existing support contract.

License

Apache V2.0

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contributor License Agreement

Individuals or business entities who contribute to this project must have completed and submitted the F5 Contributor License Agreement to Openstack_CLA@f5.com prior to their code submission being included in this project.