Forum Discussion

Jozef_Hamar's avatar
Jozef_Hamar
Icon for Altostratus rankAltostratus
Jul 02, 2018

How to reference an exiting node by IP using iApp REST

Hi guys,

 

I'm using REST API to create a new Virtual Server (). It works and I'm able to create one if I use a name reference to an existing node, e.g.:

 

{
"name":"pool__members","columnNames":["addr","port","connection_limit"],"rows":[
    {"row":["/Common/Node_Debian_1","80","0"]}]
}

However, I'm struggling to do the same using an IP of a node in case the node already exists (if the node did not exist before my REST call, a new one is created).

 

e.g. If I use this:

 

{
"name":"pool__members","columnNames":["addr","port","connection_limit"],"rows":[{"row":["/Common/172.19.81.210","80","0"]}]
}

I get this:

 

{
    "code": 400,
    "message": "0107003a:3: Pool member node (/Common/172.19.81.201) and existing node (/Common/Node_Debian_1) cannot use the same IP Address (172.19.81.201).",
    "errorStack": []
}

I would prefer to not do the workaround in my code - I would prefer the F5 simply takes the IP and either use an existing node, or create a new one - exactly the same way as the GUI does if creating a service from template: the GUI simply takes the IP and if an existing node exists, it will be used, if not, new will be created.

 

Any advice, please?

 

Running version 11.5.4.

 

Thank you.

 

Jozef

 

No RepliesBe the first to reply