Search in sources :

Example 1 with AmbariBlueprintsResponse

use of com.sequenceiq.it.spark.ambari.AmbariBlueprintsResponse in project cloudbreak by hortonworks.

the class MockClusterCreationWithSaltFailTest method addAmbariMappings.

private void addAmbariMappings(Map<String, CloudVmMetaDataStatus> instanceMap) {
    get(AMBARI_API_ROOT + "/clusters/:cluster/requests/:request", new AmbariStatusResponse());
    post(AMBARI_API_ROOT + "/views/:view/versions/1.0.0/instances/*", new EmptyAmbariResponse());
    get(AMBARI_API_ROOT + "/clusters", new AmbariClusterResponse(instanceMap));
    post(AMBARI_API_ROOT + "/clusters/:cluster/requests", new AmbariClusterRequestsResponse());
    post(AMBARI_API_ROOT + "/clusters/:cluster", new EmptyAmbariResponse(), gson()::toJson);
    get(AMBARI_API_ROOT + "/services/AMBARI/components/AMBARI_SERVER", new AmbariServicesComponentsResponse(), gson()::toJson);
    get(AMBARI_API_ROOT + "/hosts", new AmbariHostsResponse(instanceMap), gson()::toJson);
    get(AMBARI_API_ROOT + "/blueprints/*", new AmbariBlueprintsResponse());
    post(AMBARI_API_ROOT + "/blueprints/*", new EmptyAmbariResponse());
    put(AMBARI_API_ROOT + "/users/admin", new EmptyAmbariResponse());
    get(AMBARI_API_ROOT + "/check", new AmbariCheckResponse());
    get(AMBARI_API_ROOT + "/clusters/:cluster/hosts", new AmbariClustersHostsResponse(instanceMap, "SUCCESSFUL"));
}
Also used : AmbariStatusResponse(com.sequenceiq.it.spark.ambari.AmbariStatusResponse) EmptyAmbariResponse(com.sequenceiq.it.spark.ambari.EmptyAmbariResponse) AmbariClusterResponse(com.sequenceiq.it.spark.ambari.AmbariClusterResponse) AmbariHostsResponse(com.sequenceiq.it.spark.ambari.AmbariHostsResponse) AmbariClustersHostsResponse(com.sequenceiq.it.spark.ambari.AmbariClustersHostsResponse) AmbariServicesComponentsResponse(com.sequenceiq.it.spark.ambari.AmbariServicesComponentsResponse) AmbariBlueprintsResponse(com.sequenceiq.it.spark.ambari.AmbariBlueprintsResponse) AmbariCheckResponse(com.sequenceiq.it.spark.ambari.AmbariCheckResponse) AmbariClusterRequestsResponse(com.sequenceiq.it.spark.ambari.AmbariClusterRequestsResponse)

Aggregations

AmbariBlueprintsResponse (com.sequenceiq.it.spark.ambari.AmbariBlueprintsResponse)1 AmbariCheckResponse (com.sequenceiq.it.spark.ambari.AmbariCheckResponse)1 AmbariClusterRequestsResponse (com.sequenceiq.it.spark.ambari.AmbariClusterRequestsResponse)1 AmbariClusterResponse (com.sequenceiq.it.spark.ambari.AmbariClusterResponse)1 AmbariClustersHostsResponse (com.sequenceiq.it.spark.ambari.AmbariClustersHostsResponse)1 AmbariHostsResponse (com.sequenceiq.it.spark.ambari.AmbariHostsResponse)1 AmbariServicesComponentsResponse (com.sequenceiq.it.spark.ambari.AmbariServicesComponentsResponse)1 AmbariStatusResponse (com.sequenceiq.it.spark.ambari.AmbariStatusResponse)1 EmptyAmbariResponse (com.sequenceiq.it.spark.ambari.EmptyAmbariResponse)1