f5-icontrol-rest-python

Overview

The F5 Networks® icontrol module is used to send commands to the BIGIP® iControl® REST API. The library maintains a HTTP session (which is a requests.Session) and does URL validation and logging.

Installation

Using Pip

$ pip install f5-icontrol-rest

Examples

from icontrol.session import iControlRESTSession
icr_session = iControlRESTSession('myuser', 'mypass')

# GET to https://bigip.example.com/mgmt/tm/ltm/nat/~Common~mynat
icr_session.get(
    'https://bigip.example.com/mgmt/tm/ltm/nat',
    name='mynat',
    partition='Common')

# GET to https://bigip.example.com/mgmt/tm/ltm/nat
icr_session.get('https://bigip.example.com/mgmt/tm/ltm/nat')

# POST with json data
icr_session.post('https://bigip.example.com/mgmt/tm/ltm/nat', \
json={'name': 'myname', 'partition': 'Common'})

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.