Forum Discussion
Kevin_Davies_40
Sep 22, 2017Nacreous
Python data class values
I have some python code (bigsuds) I use to display data class members names but do not know how to display the data group values. What I would like is to output the following name value
name val...
Joel_Breton
Nimbostratus
Hi Kevin,
I'm not sure how to accomplish this with bigsuds but here's the solution with the Python SDK.
from f5.bigip import ManagementRoot
import urllib3
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
mgmt = ManagementRoot('192.168.1.1', 'admin', 'admin')
dgrp = mgmt.tm.ltm.data_group.internals.get_collection()
for datagroup in dgrp:
print(datagroup.name)
for record in datagroup.records:
print(record)
Kevin_Davies
Aug 02, 2018MVP
Joel can you provide an example of retrieving the data group values. I am trying data = bigip.ltm.data_group.internal.load(name='k2test',partition='Common') and its failing
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects