Forum Discussion
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