Search in sources :

Example 1 with PduInlet

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);
}
Also used : ArrayList(java.util.ArrayList) PduInlet(com.vmware.flowgate.common.model.PduInlet) PduInlet(com.vmware.flowgate.common.model.PduInlet) Inlet(com.vmware.flowgate.poweriqworker.model.Inlet)

Aggregations

PduInlet (com.vmware.flowgate.common.model.PduInlet)1 Inlet (com.vmware.flowgate.poweriqworker.model.Inlet)1 ArrayList (java.util.ArrayList)1