Forum Discussion
Mike_MacLynn_61
Feb 15, 2012Nimbostratus
Parameters for LocalLB.VirtualServer.create
Hi,
I'm using Java and Apache Axis to invoke LocalLBVirtualServer.create(). The method description states
"Takes additional, optional parameters, that enable you to override the d...
Feb 15, 2012
Mike. sorry for the confusion. On most of our methods that take arrays, we expect you to pass equal size arrays for all the parameters. For the VirtualServer's create method, it looks like this:
LocalLB::VirtualServer::create(
in Common::VirtualServerDefinition [] definitions,
in String [] wildmasks,
in LocalLB::VirtualServer::VirtualServerResource [] resources,
in LocalLB::VirtualServer::VirtualServerProfile [] [] profiles
);
Each of the parameters take an array of values, the first dimension for each virtual server. In the case of the the "profiles" parameter, it is a 2-D array. The first dimension for the virtual, and the second for a list of profiles for that given virtual.
The server code loops through the parameters but assumes that you are passing in an equal array size for each of them. For instance, if you passed in more wildmasks than you did definitions, it would ignore the extra wildmasks. The code essentially takes the value of the lowest size of the parameters and ignores the rest. When you pass in a null value (array size 0) for the resources value, the server code is treating this like a no-op procedure.
To get this to work, you must supply the four parameters. I believe the "optional" section in the documentation is referring to the profiles parameter where you can choose to supply, or not, additional profiles for the virtual you are creating.
Here's an example I wrote a while back that uses PowerShell to create a virtual server.
http://devcentral.f5.com/wiki/iControl.PsProvisionVEForLocalDev.ashx
Hope this helps...
-Joe
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