private VDS createServer(Guid serverId, String hostname) { VDS vds = new VDS(); vds.setId(serverId); vds.setHostName(hostname); vds.setStatus(VDSStatus.Up); return vds; }
private List<VDS> mockVdsInDb(VDSStatus status) { List<VDS> vdsList = new ArrayList<>(); VDS vds = new VDS(); vds.setStatus(status); vdsList.add(vds); return vdsList; }
private void vdsExist() { VDS vds = new VDS(); vds.setStatus(VDSStatus.Up); List<VDS> vdsList = new ArrayList<>(); vdsList.add(vds); when(vdsDao.getAllForCluster(any(Guid.class))).thenReturn(vdsList); }
private VDS getVds(VDSStatus status) { VDS vds = new VDS(); vds.setId(Guid.newGuid()); vds.setVdsName("gfs1"); vds.setVdsGroupId(CLUSTER_ID); vds.setStatus(status); return vds; }
private void clusterHasVds() { VDS vds = new VDS(); vds.setStatus(VDSStatus.Up); vds.setSupportedClusterLevels(VERSION_1_1.toString()); List<VDS> vdsList = new ArrayList<>(); vdsList.add(vds); when(vdsDao.getAllForCluster(any(Guid.class))).thenReturn(vdsList); }
private void vdsExistWithHigherVersion() { VDS vds = new VDS(); vds.setStatus(VDSStatus.Up); vds.setClusterCompatibilityVersion(VERSION_1_2); List<VDS> vdsList = new ArrayList<>(); vdsList.add(vds); when(vdsDao.getAllForCluster(any(Guid.class))).thenReturn(vdsList); }
private VDS getVds(VDSStatus status) { VDS vds = new VDS(); vds.setId(Guid.newGuid()); vds.setVdsName("gfs1"); vds.setClusterId(clusterId); vds.setStatus(status); return vds; }