use of io.cdap.cdap.runtime.spi.profile.ProfileStatus in project cdap by caskdata.
the class AppFabricTestBase method getProfileStatus.
protected Optional<ProfileStatus> getProfileStatus(ProfileId profileId, int expectedCode) throws Exception {
HttpResponse response = doGet(String.format("/v3/namespaces/%s/profiles/%s/status", profileId.getNamespace(), profileId.getProfile()));
assertResponseCode(expectedCode, response);
if (expectedCode == HttpResponseStatus.OK.code()) {
return Optional.of(GSON.fromJson(response.getResponseBodyAsString(), ProfileStatus.class));
}
return Optional.empty();
}
Aggregations