Forum Discussion
Prakash_Krishna
Nimbostratus
May 15, 2015[iControl-SOAP]Setting Partition and retrieving the objects from all the partition mis-behaves
Hi All,
I am using the iControl SOAP API in Java to retrieve the Virtual Server of all the partition. Every time when i run , the total list of all partition is differs at time.
iControl.M...
uchi_122495
Cirrus
May 17, 2015Hi prakash.
Management :: Partition has been deprecated (as of 11.0.0). You need to use Management::Folder and System::Session in its stead.
sample code is :
Interfaces interfaces = new Interfaces("your_ltm", 443L, "account", "password");
// get session identifier
String session_identifier = String.valueOf(interfaces.getSystemSession().get_session_identifier());
// set session identifier to header
interfaces.getSystemSession().setHeader("urn:iControl", "session", session_identifier);
interfaces.getManagementFolder().setHeader("urn:iControl", "session", session_identifier);
interfaces.getLocalLBVirtualServer().setHeader("urn:iControl", "session", session_identifier);
interfaces.getSystemSession().set_active_folder("/");
String[] folder_list = interfaces.getManagementFolder().get_list();
for(String folder : folder_list){
interfaces.getSystemSession().set_active_folder(folder);
String[] virtualserver_list = interfaces.getLocalLBVirtualServer().get_list();
for(String virtualserver : virtualserver_list){
System.out.println(virtualserver);
}
}
or you can retreave all virtual server list with set_recursive_query_state option
// set active folder to root ("/") and recursive state enabled
interfaces.getSystemSession().set_active_folder("/");
interfaces.getSystemSession().set_recursive_query_state(CommonEnabledState.STATE_ENABLED);
// get all virtual server list
String[] virtualserver_list = interfaces.getLocalLBVirtualServer().get_list();
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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