mirror of
https://github.com/ctripcorp/zeus.git
synced 2024-09-22 08:36:24 +08:00
code cleansing
This commit is contained in:
parent
927d353ac5
commit
791c9f2ba3
|
@ -12,8 +12,6 @@ public interface VirtualServerRepository {
|
||||||
|
|
||||||
List<GroupVirtualServer> listGroupVsByGroups(Long[] groupIds) throws Exception;
|
List<GroupVirtualServer> listGroupVsByGroups(Long[] groupIds) throws Exception;
|
||||||
|
|
||||||
List<GroupVirtualServer> listGroupVsByVsId(Long virtualServerId) throws Exception;
|
|
||||||
|
|
||||||
List<VirtualServer> listAll(Long[] vsIds) throws Exception;
|
List<VirtualServer> listAll(Long[] vsIds) throws Exception;
|
||||||
|
|
||||||
VirtualServer getById(Long virtualServerId) throws Exception;
|
VirtualServer getById(Long virtualServerId) throws Exception;
|
||||||
|
|
|
@ -43,11 +43,6 @@ public class VirtualServerRepositoryImpl implements VirtualServerRepository {
|
||||||
return batchFetch(groupSlbDao.findAllByGroups(groupIds, GroupSlbEntity.READSET_FULL));
|
return batchFetch(groupSlbDao.findAllByGroups(groupIds, GroupSlbEntity.READSET_FULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<GroupVirtualServer> listGroupVsByVsId(Long virtualServerId) throws Exception {
|
|
||||||
return batchFetch(groupSlbDao.findAllByVirtualServer(virtualServerId, GroupSlbEntity.READSET_FULL));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<VirtualServer> listAll(Long[] vsIds) throws Exception {
|
public List<VirtualServer> listAll(Long[] vsIds) throws Exception {
|
||||||
List<VirtualServer> result = new ArrayList<>();
|
List<VirtualServer> result = new ArrayList<>();
|
||||||
|
|
|
@ -257,15 +257,6 @@ public class ModelServiceTest extends AbstractSpringTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testGroupVsByVsId() throws Exception {
|
|
||||||
List<GroupVirtualServer> groupVirtualServers = virtualServerRepository.listGroupVsByVsId(defaultSlb.getVirtualServers().get(0).getId());
|
|
||||||
Assert.assertEquals(6, groupVirtualServers.size());
|
|
||||||
for (GroupVirtualServer groupVirtualServer : groupVirtualServers) {
|
|
||||||
Assert.assertNotNull(groupVirtualServer.getVirtualServer());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testVirtualServerGet() throws Exception {
|
public void testVirtualServerGet() throws Exception {
|
||||||
virtualServerRepository.addVirtualServer(defaultSlb.getId(), new VirtualServer().setSlbId(defaultSlb.getId()).setName("www.testGet1.com").setSsl(false).setPort("80")
|
virtualServerRepository.addVirtualServer(defaultSlb.getId(), new VirtualServer().setSlbId(defaultSlb.getId()).setName("www.testGet1.com").setSsl(false).setPort("80")
|
||||||
|
|
Loading…
Reference in a new issue