Skip to content
Za Wilgustus edited this page Dec 18, 2015 · 7 revisions

This page will document the BigIP API:

The intent is that the client using the f5-common-python REST API can access BigIP uri's as Python objects. For example, a user that wants to create a new Nat instance on the BigIP device can use any of the three following equivalent patterns:

Preamble:

from f5.bigip import BigIP

bigip = BigIP("HOSTNAME", "USERNAME", "PASSWORD")

all examples should start with the preamble.

nat_obj =  bigip.ltm.nat
nat_obj.create(folder="Common", instance_name="SOMEUSER")

The local Python object contains a complete representation of the JSON returned by calling HTTP GET against the corresponding uri on the BigIP. Elements of the JSON object are attributes of the Python object. This implies a second method for instantiating an ltm/nat service on the BigIP:

nat_obj = bigip.ltm.nat
nat_obj.folder = "Common"
nat_obj.instance_name = "SOMEUSER"
nat_obj.update()
nat_obj = bigip.ltm.nat.create(folder="Common", instance_name="SOMEUSER")
Clone this wiki locally