private static Map<String, NicSpec> convertNics(Set<NicEntity> nicEntities) {
Map<String, NicSpec> nicSpecMap = new HashMap<String, NicSpec>();
if (nicEntities != null) {
for (NicEntity nicEntity : nicEntities) {
String pgName = nicEntity.getNetworkEntity().getPortGroup();
NicSpec nicSpec = new NicSpec();
nicSpec.setIpv4Address(nicEntity.getIpv4Address());
nicSpec.setIpv6Address(nicEntity.getIpv6Address());
nicSpec.setMacAddress(nicEntity.getMacAddress());
nicSpec.setNetworkName(nicEntity.getNetworkEntity().getName());
nicSpec.setNetTrafficDefinitionSet(nicEntity.getNetTrafficDefs());
nicSpecMap.put(pgName, nicSpec);
}
}
return nicSpecMap;
}