public static String GetSumMemory() { List <VMConfig> confs = VMDao.getConfigs(); long sumMemory = 0; foreach (VMConfig vm in confs) { sumMemory += vm.Memory; } return(sumMemory.ToString()); }
public static String GetSumCpu() { List <VMConfig> confs = VMDao.getConfigs(); int sumCpu = 0; foreach (VMConfig vm in confs) { sumCpu += vm.CPU; } return(sumCpu.ToString()); }
public static String GetVmNumber() { List <VMConfig> confs = VMDao.getConfigs(); return(confs.Count().ToString()); }