Getting Started with the f5-common-python SDK
Updated Jun 06, 2023
Version 2.0Was this article helpful?
The partitionAccess field is a list of attributes on the primary user object, but not a subcollection. A true subcollection, like pool members, is addressed like this:
>>pool = b.tm.pools.pool.load(name='testpool')
>>members = pool.members_s.get_collection()
>>for member in members:
... print member.name
10.10.10.100:80
192.168.103.20:80
To get to your attributes and change them, you just need to pull the dictionary indexed at list item 0:
>>> u = b.tm.auth.users.user.load(name='jason')
>>> u.partitionAccess[0]['role']
u'irule-manager'
>>> u.partitionAccess[0]['role'] = 'guest'
>>> u.update()