Highlighted
Contributor
Contributor

Set "Load Balancer Global Configuration" via the API possible?

Im deploying loadbalancers on my Edge with a script and setting them as "enabled" in their loadbalancer configs, however they wont work until ive also enabled the loadbalancer slider in the Load Balancer Global Configuration. I can do this manually but I cant seem to find any information in the API manual on how to do it via this method. Im currently attempting the following call, which yields an error:

<loadBalancer><enabled>true</enabled><enableServiceInsertion>false</enableServiceInsertion>
<accelerationEnabled>true</accelerationEnabled><logging><enable>true</enable><logLevel>debug</logLevel>
<virtualServer><virtualServerId>virtualServer-3</virtualServerId><name>APICreatedVirtualServer-1</name><enabled>true</enabled><ipAddress>123.123.123.123</ipAddress><protocol>http</protocol><port>80</port><connectionLimit>0</connectionLimit><enableServiceInsertion>false</enableServiceInsertion><accelerationEnabled>true</accelerationEnabled></virtualServer>
</loadBalancer>

Anyone who can tell me if this is the way to set the global configs? Or how to do it via the API?

0 Kudos
3 Replies
Highlighted
Commander
Commander

Hey @KalleBuilds 

I presume you are talking about here right?

Lalegre_0-1605285791047.png

As per the API guide the correct syntax that you need is:

<enabled>true</enabled> inside <loadBalancer> properties.

However this is the same you pointed in the post:

 
 
 
 
 
 
 
 
 
 
 
 

Screenshot_1.png

You can see that here: https://vdc-repo.vmware.com/raw.githubusercontent.com/vmware/nsxraml/6.4/html-version/nsxvapi.html#4...

 

 

 

Highlighted
Contributor
Contributor

Yes that is the one, and as you see im already setting that in my query unless im misunderstanding something, however its not working. Maybe the Global Load Balancer Configuration need to be set seperate from the Virtual Server somehow? 

For instance I expected that I would have to set the Global Load Balancer Configurations like so, but there are no documentation on it as it only covers Global routing. Enabling loadbalancers is only mentioned in the Virtual Server objects, which im not sure is the right place to set a Global Config.

KalleBuilds_0-1605513096971.png

 

0 Kudos
Highlighted
Commander
Commander

What if you only try to run the API to enable the Global Load Balancing without enabling or creating the Virtual Servers? Does it work? Maybe as you said is the solution.

0 Kudos