Forum Discussion

vimal1771_20809's avatar
vimal1771_20809
Icon for Nimbostratus rankNimbostratus
Jun 24, 2015

Not able to add pool-member by name using curl command

Hi, I am not able to add pool member (node) by name using curl command. Node does not exist. However it works fine through GUI. I am using v11.5.1.

 

curl --insecure -u test:test -H "Content-Type: application/json" -X POST --data '{"name":"NodeTT:http"}' https:///mgmt/tm/ltm/pool/BIGIQPOOL/members

 

{"code":404,"message":"01020036:3: The requested node (/Common/NodeTT) was not found.","errorStack":[]}

 

3 Replies

  • the command is the following:

    curl -k -u admin:admin -X POST -d '{"kind":"tm:ltm:node:nodestate", "name":"MonNode", "address":"1.2.3.4"}' -H "Content-Type: application/json" https://X.X.X.X/mgmt/tm/ltm/node/
    
  • As Stanislas indicates, you need to supply the address field if naming the node, however, as you are adding a pool member and not the node itself here, this curl statement should work for you:

    
    curl -k -u admin:admin -X POST -d '{"name":"NodeTT:80","address":"10.10.10.10"}' -H "Content-Type: application/json" https://x.x.x.x/mgmt/tm/ltm/pool/BIGIQPOOL/members/
    
    

    For my system, I slightly modified for a locally defined pool:

    request
    curl -k -u admin:admin -X POST -d '{"name":"NodeTT:80","address":"10.10.10.10"}' -H "Content-Type: application/json" https://172.16.44.128/mgmt/tm/ltm/pool/testpool/members
    
    returned data 
    {"kind":"tm:ltm:pool:members:membersstate","name":"NodeTT:80","fullPath":"NodeTT:80","generation":229,"selfLink":"https://localhost/mgmt/tm/ltm/pool/testpool/members/NodeTT:80?ver=11.6.0"}