use of com.vmware.flowgate.common.model.PduInlet in project flowgate by vmware.
the class PowerIQService method generatePduInletString.
private String generatePduInletString(List<Inlet> pduInlets) throws JsonProcessingException {
List<PduInlet> pduInletsSaveToFlowgate = new ArrayList<PduInlet>();
for (Inlet inlet : pduInlets) {
PduInlet pduInlet = new PduInlet();
pduInlet.setId(inlet.getId());
pduInlet.setOrdinal(inlet.getOrdinal());
pduInlet.setPduId(inlet.getPduId());
pduInlet.setPowerSource(inlet.isSource());
pduInlet.setPueIt(inlet.isPueIt());
pduInlet.setPueTotal(inlet.isPueTotal());
pduInlet.setRatedAmps(inlet.getRatedAmps());
pduInlet.setFormatedName(FlowgateConstant.INLET_NAME_PREFIX + inlet.getOrdinal());
pduInletsSaveToFlowgate.add(pduInlet);
}
return mapper.writeValueAsString(pduInletsSaveToFlowgate);
}