Fuchan_Tan_3092
Nimbostratus
Feb 17, 2012How to properly construct statsNames?
Hi,
Given the follwing tcl script that create a stats profile:
profile stats my_stats_profile {
defaults from stats
field1 total
field2 winners
}
To create the profile as described above using iControl Assember, I started the code as follows:
public void createLocalStatsProfile(String hostName, String profileName) throws Exception{
String [] profile_names = new String[1];
profile_names[0] = profileName;
// create profile
i_interfaces.getLocalLBProfileUserStatistic().create(profile_names);
// set statistic_name
iControl.LocalLBProfileUserStatisticUserStatisticName[][] statsNames = new iControl.LocalLBProfileUserStatisticUserStatisticName[1][2];
//help is need here to properly construct statsNames
.....
.....
.....
i_interfaces.getLocalLBProfileUserStatistic().set_statistic_name(profile_names, statsNames);
// set default profile String [] defaults = new String[1]; defaults[0] = "stats"; i_interfaces.getLocalLBProfileUserStatistic().set_default_profile(profile_names, defaults);
}
Thanks in advance.
Mike Tan