@Override public String toString() { return getVersionInfo().getServer().getName() + " v" + getVersionInfo().getServer().getVersion(); } }
/** * Return meta information about the Skipper server. * * @return Detailed information about the enabled features, versions of implementation * libraries, and security configuration */ @RequestMapping(method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) public AboutResource getAboutResource() { final AboutResource aboutResource = new AboutResource(); final VersionInfo versionInfo = getVersionInfo(); aboutResource.setVersionInfo(versionInfo); return aboutResource; }
@Bean @Primary public SkipperClient skipperClientMock() { SkipperClient skipperClient = mock(SkipperClient.class); AboutResource about = new AboutResource(); about.setVersionInfo(new VersionInfo()); about.getVersionInfo().setServer(new Dependency()); about.getVersionInfo().getServer().setName("Test Server"); about.getVersionInfo().getServer().setVersion("Test Version"); when(skipperClient.info()).thenReturn(about); when(skipperClient.listDeployers()).thenReturn(new Resources<>(new ArrayList<>(), new ArrayList<>())); return skipperClient; }
public void mockSkipperAboutInfo() { AboutResource about = new AboutResource(); about.setVersionInfo(new VersionInfo()); about.getVersionInfo().setServer(new Dependency()); about.getVersionInfo().getServer().setName("Test Server"); about.getVersionInfo().getServer().setVersion("Test Version"); when(this.skipperClient.info()).thenReturn(about); when(this.skipperClient.listDeployers()).thenReturn(new Resources<>(new ArrayList<>(), new ArrayList<>())); }
@Override public String toString() { return getVersionInfo().getServer().getName() + " v" + getVersionInfo().getServer().getVersion(); } }
/** * Return meta information about the Skipper server. * * @return Detailed information about the enabled features, versions of implementation * libraries, and security configuration */ @RequestMapping(method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) public AboutResource getAboutResource() { final AboutResource aboutResource = new AboutResource(); final VersionInfo versionInfo = getVersionInfo(); aboutResource.setVersionInfo(versionInfo); return aboutResource; }
@Override public RuntimeEnvironmentInfo environmentInfo() { AboutResource skipperInfo = skipperClient.info(); Resources<Deployer> deployers = skipperClient.listDeployers(); RuntimeEnvironmentInfo.Builder builder = new RuntimeEnvironmentInfo.Builder() .implementationName(skipperInfo.getVersionInfo().getServer().getName()) .implementationVersion(skipperInfo.getVersionInfo().getServer().getVersion()) .platformApiVersion("") .platformClientVersion("") .platformHostVersion("") .platformType("Skipper Managed") .spiClass(SkipperClient.class); for (Deployer d : deployers) { builder.addPlatformSpecificInfo(d.getName(), d.getType()); } return builder.build(); }
@Override public RuntimeEnvironmentInfo environmentInfo() { AboutResource skipperInfo = skipperClient.info(); Resources<Deployer> deployers = skipperClient.listDeployers(); RuntimeEnvironmentInfo.Builder builder = new RuntimeEnvironmentInfo.Builder() .implementationName(skipperInfo.getVersionInfo().getServer().getName()) .implementationVersion(skipperInfo.getVersionInfo().getServer().getVersion()) .platformApiVersion("") .platformClientVersion("") .platformHostVersion("") .platformType("Skipper Managed") .spiClass(SkipperClient.class); for (Deployer d : deployers) { builder.addPlatformSpecificInfo(d.getName(), d.getType()); } return builder.build(); }