use of com.cloudera.api.swagger.model.ApiVersionInfo in project cloudbreak by hortonworks.
the class ClouderaManagerConfigService method isVersionAtLeast.
private boolean isVersionAtLeast(Versioned requiredVersion, ClouderaManagerResourceApi resourceApiInstance) throws ApiException {
ApiVersionInfo versionInfo = resourceApiInstance.getVersion();
LOGGER.debug("CM version is {}, used version string {}", versionInfo, versionInfo.getVersion());
if (isVersionNewerOrEqualThanLimited(versionInfo.getVersion(), requiredVersion)) {
return true;
}
LOGGER.debug("Version is smaller than {}, not setting cdp_environment", requiredVersion.getVersion());
return false;
}
use of com.cloudera.api.swagger.model.ApiVersionInfo in project cloudbreak by hortonworks.
the class ClouderaManagerConfigServiceTest method setUpCMVersion.
private void setUpCMVersion(String version) throws ApiException {
ClouderaManagerResourceApi clouderaManagerResourceApi = mock(ClouderaManagerResourceApi.class);
when(clouderaManagerApiFactory.getClouderaManagerResourceApi(any())).thenReturn(clouderaManagerResourceApi);
ApiVersionInfo version701 = new ApiVersionInfo().version(version);
when(clouderaManagerResourceApi.getVersion()).thenReturn(version701);
}
Aggregations