I’m trying to retrieve a simple list of virtual servers on a 3dns unit.
Looking at the SDK it mentions:
ITCMGlobalLB.BaseServer.get_virtual_server_list
Parameters:
key ServerKey (The key of the server)
What is this key??
I might be looking in the wrong place. I’m basically trying to get a similar output to get_wideip_list
thanks
Here’s how the GlobalLB BaseServer interface works. 3-DNS has “servers” configured at the top level which are of the types (3-DNS, BIG-IP, HOST,
EDGEFX, or ROUTER). A “server” can have 0-n virtual servers contained in it.
So, if you want to find the virtual servers, you need to first make the ITCMGlobalLB::BaseServer::get_server_list() call
struct ITCMGlobalLB::ServerKey {
String name;
String addr;
AppType type;
};
struct ITCMGlobalLB::ServerAttribute {
ServerKey server;
short number_virtual_servers;
EnableStatus status;
StatColor state;
};
ServerAttribute[] get_server_list(
in AppType type
);
which will return a list of ServerAttributes containing the ServerKey’s that correspond to the AppType you requested. You then use these values to in the ITCMGlobalLB::BaseServer::get_virtual_server_list() method to get the information about the virtual servers contained in those servers.
struct ITCMGlobalLB::VirtualServerAttribute {
IPPortDefinition source;
IPPortDefinition translated;
IPPortDefinition[] depends;
long ratio;
EnableStatus status;
StatColor state;
};
VirtualServerAttribute[] get_virtual_server_list(
in ServerKey key
);
Hope this clears things up…
-Joe