f5sdk.bigip.mgmt_client module

BIG-IP management client

class f5sdk.bigip.mgmt_client.ManagementClient(host, **kwargs)

A class used as a management client for BIG-IP

host

the hostname of the device

Type

str

port

the port of the device

Type

str

token

the token of the device

Type

str

token_details

the token details of the device

Type

dict

logger

instantiated logger object

Type

object

get_info()

Refer to method documentation

make_request()

Refer to method documentation

make_ssh_request()

Refer to method documentation

get_info()

Gets device info

Parameters

None

Returns

the device information

{
    'version': 'x.x.x.x'
}

Return type

dict

make_request(uri, **kwargs)

Makes request to device (HTTP/S)

Parameters
  • uri (str) – the URI where the request should be made

  • **kwargs – optional keyword arguments

Keyword Arguments
  • method (str) – the HTTP method to use

  • headers (str) – the HTTP headers to use

  • body (str) – the HTTP body to use

  • body_content_type (str) – the HTTP body content type to use

  • bool_response (bool) – return boolean based on HTTP success/failure

  • advanced_return (bool) – return additional information, like HTTP status code to caller

Returns

a dictionary containing the JSON response

Return type

dict

make_ssh_request(command)

Makes request to device (SSH)

Parameters

command (str) – the command to execute on the device

Returns

the command response

Return type

str