// set ipconfigs field even IPs are not yet retrieved, otherwise if
// Tomcat crashes, we will lost the ipconfigs template
for (NicSpec nicSpec : vNode.getNics().values()) {
NetworkEntity networkEntity =
networkMgr.getNetworkEntityByName(nicSpec.getNetworkName());
NicEntity nicEntity = nodeEntity.findNic(networkEntity);
if (nicEntity == null) {
nicEntity = new NicEntity();
nodeEntity.getNics().add(nicEntity);
}
nicEntity.setIpv4Address(nicSpec.getIpv4Address());
nicEntity.setIpv6Address(nicSpec.getIpv6Address());
nicEntity.setMacAddress(nicSpec.getMacAddress());
nicEntity.setNetTrafficDefs(nicSpec.getNetTrafficDefinitionSet());
nicEntity.setNetworkEntity(networkEntity);
nicEntity.setNodeEntity(nodeEntity);
if (vNode.getVmMobId() != null) {
VcVmUtil.populateNicInfo(nicEntity, vNode.getVmMobId(),
networkEntity.getPortGroup());
}
}