Search in sources :

Example 1 with ClouderaManagerStackRepoDetailsV4Response

use of com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.ClouderaManagerStackRepoDetailsV4Response in project cloudbreak by hortonworks.

the class ImagesToImagesV4ResponseConverter method getDefaultCdhStackInfo.

private List<ClouderaManagerStackDetailsV4Response> getDefaultCdhStackInfo(Map<String, ImageBasedDefaultCDHInfo> defaultStackInfo) {
    List<ClouderaManagerStackDetailsV4Response> result = new ArrayList<>();
    for (ImageBasedDefaultCDHInfo info : defaultStackInfo.values()) {
        ClouderaManagerStackDetailsV4Response json = new ClouderaManagerStackDetailsV4Response();
        ClouderaManagerStackRepoDetailsV4Response repoJson = new ClouderaManagerStackRepoDetailsV4Response();
        Map<String, String> stackRepo = info.getDefaultCDHInfo().getRepo().getStack();
        if (stackRepo != null) {
            repoJson.setStack(stackRepo);
        }
        json.setRepository(repoJson);
        json.setVersion(info.getDefaultCDHInfo().getVersion());
        result.add(json);
    }
    return result;
}
Also used : ClouderaManagerStackRepoDetailsV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.ClouderaManagerStackRepoDetailsV4Response) ClouderaManagerStackDetailsV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.ClouderaManagerStackDetailsV4Response) ImageBasedDefaultCDHInfo(com.sequenceiq.cloudbreak.cloud.model.component.ImageBasedDefaultCDHInfo) ArrayList(java.util.ArrayList)

Example 2 with ClouderaManagerStackRepoDetailsV4Response

use of com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.ClouderaManagerStackRepoDetailsV4Response in project cloudbreak by hortonworks.

the class StackInfoToClouderaManagerStackDescriptorV4ResponseConverter method defaultStackRepoDetailsToStackRepoDetailsV4Response.

private ClouderaManagerStackRepoDetailsV4Response defaultStackRepoDetailsToStackRepoDetailsV4Response(ClouderaManagerDefaultStackRepoDetails cmDefaultStackRepoDetails) {
    if (cmDefaultStackRepoDetails == null) {
        return null;
    }
    ClouderaManagerStackRepoDetailsV4Response cmStackRepoDetailsV4Response = new ClouderaManagerStackRepoDetailsV4Response();
    cmStackRepoDetailsV4Response.setStack(cmDefaultStackRepoDetails.getStack());
    return cmStackRepoDetailsV4Response;
}
Also used : ClouderaManagerStackRepoDetailsV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.ClouderaManagerStackRepoDetailsV4Response)

Example 3 with ClouderaManagerStackRepoDetailsV4Response

use of com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.ClouderaManagerStackRepoDetailsV4Response in project cloudbreak by hortonworks.

the class ImagesToImagesV4ResponseConverter method convertClouderaManagerStackRepoDetailsToJson.

private ClouderaManagerStackRepoDetailsV4Response convertClouderaManagerStackRepoDetailsToJson(StackRepoDetails repo) {
    ClouderaManagerStackRepoDetailsV4Response json = new ClouderaManagerStackRepoDetailsV4Response();
    json.setStack(new HashMap<>(repo.getStack()));
    return json;
}
Also used : ClouderaManagerStackRepoDetailsV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.ClouderaManagerStackRepoDetailsV4Response)

Example 4 with ClouderaManagerStackRepoDetailsV4Response

use of com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.ClouderaManagerStackRepoDetailsV4Response in project cloudbreak by hortonworks.

the class RepoTestUtil method getCMStackRepoDetailsResponse.

public static ClouderaManagerStackRepoDetailsV4Response getCMStackRepoDetailsResponse(String version) {
    ClouderaManagerStackRepoDetailsV4Response cmStackRepoDetailsV4Response = new ClouderaManagerStackRepoDetailsV4Response();
    cmStackRepoDetailsV4Response.setStack(getStackRepo(version, StackType.CDH));
    return cmStackRepoDetailsV4Response;
}
Also used : ClouderaManagerStackRepoDetailsV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.ClouderaManagerStackRepoDetailsV4Response)

Aggregations

ClouderaManagerStackRepoDetailsV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.ClouderaManagerStackRepoDetailsV4Response)4 ClouderaManagerStackDetailsV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.ClouderaManagerStackDetailsV4Response)1 ImageBasedDefaultCDHInfo (com.sequenceiq.cloudbreak.cloud.model.component.ImageBasedDefaultCDHInfo)1 ArrayList (java.util.ArrayList)1