class AutonomiccsSystemVmsGuru implements VirtualMachineGuru, InitializingBean {

    protected void setIpAddressOfEachNic(AutonomiccsSystemVm autonomiccsSystemVm, DataCenter dc, List<NicProfile> nics) {
        for (NicProfile nic : nics) {
            if (nic.getTrafficType() == TrafficType.Management) {
                autonomiccsSystemVm.setManagementIpAddress(nic.getIPv4Address());
                continue;
            }
            if (nic.getTrafficType() == TrafficType.Control) {
                autonomiccsSystemVm.setPrivateIpAddress(nic.getIPv4Address());
                continue;
            }
            if ((nic.getTrafficType() == TrafficType.Public && dc.getNetworkType() == NetworkType.Advanced)
                    || (nic.getTrafficType() == TrafficType.Guest && (dc.getNetworkType() == NetworkType.Basic || dc.isSecurityGroupEnabled()))) {
                autonomiccsSystemVm.setPublicIpAddress(nic.getIPv4Address());
            }
        }
    }

}