Forum Discussion

Muhammad_64435's avatar
Icon for Nimbostratus rankNimbostratus
Feb 15, 2019

F5-SDK : How to update Virtual Address Traffic Group

I have an Active-Active LTM Deployment. Virtual Servers ( and Virtual Addresses ) are split between two units. I am trying to use F5-SDK to update traffic group so that VS/VA will move between two units.

BigIP_IP = ""
V_IP = ""
New_TG = "/Common/traffic-group-2"

new_mgmt = ManagementRoot(BigIP_IP, username, password)

v_a_info =, partition='Common')

Assign new TG
v_a_info.trafficGroup = New_TG

 Update Virtual Address 

But getting this Error :

Traceback (most recent call last):
File "", line 13, in 
v_a_info =, partition='Common')
File "/usr/lib/python3.6/site-packages/f5/bigip/", line 655, in load
raise InvalidResource(error_message)
f5.sdk_exception.InvalidResource: Only Resources support 'load'.

Then found out that "Virtual Addresses" are "Collections" and I able to read them fine using below command and loop through all attributes of a Virtual Address:

v_a_info =

But then questions comes up how to update an Attribute of a "Virtual Address" in a Collection and push it back to the LTM to implement the change

F5-SDK : 3.0.20
LTM : 12.1.2 HF2

I highly appreciate any help or link to resolve this issue


1 Reply

  • Hi Muhammad, virtual_address_s is a collection, you need the resource to load:

    v_a_info =, partition='Common')