Forum Discussion
Oxenburger_1420
Nimbostratus
Jun 21, 2017Python SDK create FQDN nodes and add to Pool
Hi, Does anyone know how to create an FQDN node using Python SDK? Adding a stock standard node seems to be really straight forward but can't figure out the syntax needed for adding FQDN nodes...
Oxenburger_1420
Nimbostratus
Jun 21, 2017This link below answered my question - nodes/fqdn defined under a structure, so wrapping parenthesis around the name and string did the trick.
https://clouddocs.f5.com/api/icontrol-rest/APIRef_tm_ltm_node.html
Here is the piece of code that made it work.
if v_method == 'addnodesfqdn':
mynode = bigip.ltm.nodes.node.create(name=v_nodesFQDN, address=v_nodeaddress, partition=v_ltmPartition, description=v_description, fqdn={'name':"%s" % (v_nodesFQDN)})
The part that seems most relevant is : fqdn={"name":"%s" % (v_nodesFQDN)})
Without the variable names it would look something like this:
if v_method == 'addnodesfqdn':
mynode = bigip.ltm.nodes.node.create(name='server1.test.com', address='any6', partition='Test', description='test node', fqdn={"name":"server1.test.com"})
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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