HostSnmpSystem hss = host.getHostSnmpSystem();
HostSnmpConfigSpec spec = new HostSnmpConfigSpec();
spec.setEnabled(true);
spec.setReadOnlyCommunities(new String[] {"visdk"});
HostSnmpDestination dest = new HostSnmpDestination();
dest.setCommunity("visdk");
dest.setHostName("192.168.8.8");
dest.setPort(162);
spec.setTrapTargets(new HostSnmpDestination[] {dest});
hss.reconfigureSnmpAgent(spec);
si.getServerConnection().logout();