Forum Discussion
Chandu_14820
May 27, 2010Nimbostratus
Retrive Virtual server name by passing Virtual address string
Hi Everyone,
I am trying retrieve Virtual server name by passing virtual address as argument. Vis Versa is possible by fucntion.
my_icontrol_interface.LocalLBVirtualServer.get_destination("vs_test")...
Raghu_Nair_7463
Mar 28, 2012Nimbostratus
Here is the implementation for getAllSSLVirtualIPs for a given managment ip. If Experts this can be improved please respond.
public Set getVirtalIPs() throws F5ServiceException{
Set virutalAddresses = new TreeSet();
try{
String []vNames = virtualServerManagement.get_list();
for ( String n:vNames){
LocalLBVirtualServerVirtualServerProfileAttribute [][] attrs = virtualServerManagement.get_profile(new String[]{n});
for (LocalLBVirtualServerVirtualServerProfileAttribute[] aa:attrs ){
for (LocalLBVirtualServerVirtualServerProfileAttribute a:aa){
//System.out.println(a.getProfile_context());
if( LocalLBProfileType.PROFILE_TYPE_CLIENT_SSL.equals(a.getProfile_type())){
System.out.println(a.getProfile_name());
CommonIPPortDefinition [] ipPorts = virtualServerManagement.get_destination(new String[]{n});
for ( CommonIPPortDefinition ip:ipPorts){
virutalAddresses.add(ip.getAddress());
}
}
}
}
}
}catch(Exception e){
throw new F5ServiceException(e);
}
return virutalAddresses;
}
Thanks,
Raghu
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