Search in sources :

Example 1 with PduOutlet

use of com.vmware.flowgate.common.model.PduOutlet in project flowgate by vmware.

the class PowerIQService method generatePduOutletString.

private String generatePduOutletString(List<Outlet> pduOutlets) throws JsonProcessingException {
    List<PduOutlet> outletsSaveToFlowgate = new ArrayList<PduOutlet>();
    for (Outlet outlet : pduOutlets) {
        PduOutlet pduoutlet = new PduOutlet();
        pduoutlet.setDeviceId(outlet.getDeviceId());
        pduoutlet.setId(outlet.getId());
        pduoutlet.setName(outlet.getName());
        pduoutlet.setOrdinal(outlet.getOrdinal());
        pduoutlet.setPduId(outlet.getPduId());
        pduoutlet.setRatedAmps(outlet.getRatedAmps());
        pduoutlet.setState(outlet.getState());
        pduoutlet.setFormatedName(FlowgateConstant.OUTLET_NAME_PREFIX + outlet.getOrdinal());
        outletsSaveToFlowgate.add(pduoutlet);
    }
    return mapper.writeValueAsString(outletsSaveToFlowgate);
}
Also used : ArrayList(java.util.ArrayList) PduOutlet(com.vmware.flowgate.common.model.PduOutlet) Outlet(com.vmware.flowgate.poweriqworker.model.Outlet) PduOutlet(com.vmware.flowgate.common.model.PduOutlet)

Aggregations

PduOutlet (com.vmware.flowgate.common.model.PduOutlet)1 Outlet (com.vmware.flowgate.poweriqworker.model.Outlet)1 ArrayList (java.util.ArrayList)1