use of com.sequenceiq.it.cloudbreak.CloudbreakClient in project cloudbreak by hortonworks.
the class StackTestDto method deleteForCleanup.
@Override
public void deleteForCleanup() {
try {
CloudbreakClient client = getClientForCleanup();
client.getDefaultClient().stackV4Endpoint().delete(0L, getName(), true, Crn.fromString(getCrn()).getAccountId());
awaitWithClient(STACK_DELETED, client);
} catch (NotFoundException nfe) {
LOGGER.info("resource not found, thus cleanup not needed.");
}
}
use of com.sequenceiq.it.cloudbreak.CloudbreakClient in project cloudbreak by hortonworks.
the class BlueprintV4Action method post.
public static void post(IntegrationTestContext integrationTestContext, Entity entity) {
BlueprintTestDto blueprintEntity = (BlueprintTestDto) entity;
CloudbreakClient client;
client = integrationTestContext.getContextParam(CloudbreakClient.CLOUDBREAK_CLIENT, CloudbreakClient.class);
Long workspaceId = integrationTestContext.getContextParam(CloudbreakTest.WORKSPACE_ID, Long.class);
Log.log(" post ".concat(blueprintEntity.getName()).concat(" private blueprint. "));
blueprintEntity.setResponse(client.getDefaultClient().blueprintV4Endpoint().post(workspaceId, blueprintEntity.getRequest()));
integrationTestContext.putCleanUpParam(blueprintEntity.getName(), blueprintEntity.getResponse().getCrn());
}
use of com.sequenceiq.it.cloudbreak.CloudbreakClient in project cloudbreak by hortonworks.
the class BlueprintV4Action method get.
public static void get(IntegrationTestContext integrationTestContext, Entity entity) throws IOException {
BlueprintTestDto blueprintEntity = (BlueprintTestDto) entity;
CloudbreakClient client;
client = integrationTestContext.getContextParam(CloudbreakClient.CLOUDBREAK_CLIENT, CloudbreakClient.class);
Long workspaceId = integrationTestContext.getContextParam(CloudbreakTest.WORKSPACE_ID, Long.class);
Log.log(" getByName ".concat(blueprintEntity.getName()).concat(" private blueprint by Name. "));
blueprintEntity.setResponse(client.getDefaultClient().blueprintV4Endpoint().getByName(workspaceId, blueprintEntity.getName()));
Log.whenJson(" getByName ".concat(blueprintEntity.getName()).concat(" blueprint response: "), blueprintEntity.getResponse());
}
use of com.sequenceiq.it.cloudbreak.CloudbreakClient in project cloudbreak by hortonworks.
the class ClusterTemplateV4Action method getAll.
public static void getAll(IntegrationTestContext integrationTestContext, Entity entity) {
ClusterTemplateV4TestDto clusterTemplateV4Entity = (ClusterTemplateV4TestDto) entity;
CloudbreakClient client;
client = integrationTestContext.getContextParam(CloudbreakClient.CLOUDBREAK_CLIENT, CloudbreakClient.class);
Long workspaceId = integrationTestContext.getContextParam(CloudbreakTest.WORKSPACE_ID, Long.class);
Log.log(" get all cluster templates. ");
clusterTemplateV4Entity.setResponses(ClusterTemplateUtil.getResponseFromViews(client.getDefaultClient().clusterTemplateV4EndPoint().list(workspaceId).getResponses()));
}
use of com.sequenceiq.it.cloudbreak.CloudbreakClient in project cloudbreak by hortonworks.
the class ClusterTemplateV4Action method delete.
public static void delete(IntegrationTestContext integrationTestContext, Entity entity) {
ClusterTemplateV4TestDto clusterTemplateV4Entity = (ClusterTemplateV4TestDto) entity;
CloudbreakClient client;
client = integrationTestContext.getContextParam(CloudbreakClient.CLOUDBREAK_CLIENT, CloudbreakClient.class);
Long workspaceId = integrationTestContext.getContextParam(CloudbreakTest.WORKSPACE_ID, Long.class);
Log.log(String.format(" delete %s cluster template with Name. ", clusterTemplateV4Entity.getName()));
client.getDefaultClient().clusterTemplateV4EndPoint().deleteByName(workspaceId, clusterTemplateV4Entity.getName());
}
Aggregations