summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/client/MulticloudClient.java143
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/client/SoCallbackClient.java41
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/CheckInstanceRequest.java42
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/InstanceRequest.java28
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/HealthCheckInstanceResponse.java60
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/HealthCheckResponse.java31
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/K8sRbInstanceHealthCheck.java28
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/K8sRbInstanceHealthCheckSimple.java37
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/K8sRbInstanceGvk.java43
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/K8sRbInstanceResourceStatus.java47
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/K8sRbInstanceStatus.java67
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/StatusCheckInstanceResponse.java60
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/StatusCheckResponse.java31
13 files changed, 658 insertions, 0 deletions
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/client/MulticloudClient.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/client/MulticloudClient.java
new file mode 100644
index 0000000..762f192
--- /dev/null
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/client/MulticloudClient.java
@@ -0,0 +1,143 @@
+package org.onap.so.adapters.cnf.client;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onap.so.adapters.cnf.MulticloudConfiguration;
+import org.onap.so.adapters.cnf.model.healthcheck.K8sRbInstanceHealthCheck;
+import org.onap.so.adapters.cnf.model.healthcheck.K8sRbInstanceHealthCheckSimple;
+import org.onap.so.adapters.cnf.model.statuscheck.K8sRbInstanceStatus;
+import org.onap.so.client.exception.BadResponseException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.springframework.http.HttpMethod.DELETE;
+import static org.springframework.http.HttpMethod.GET;
+import static org.springframework.http.HttpMethod.POST;
+
+@Component
+public class MulticloudClient {
+
+ private static final Logger log = LoggerFactory.getLogger(MulticloudClient.class);
+
+ private final RestTemplate restTemplate;
+ private final MulticloudConfiguration multicloudConfiguration;
+ private final ObjectMapper objectMapper;
+
+ public MulticloudClient(RestTemplate restTemplate, MulticloudConfiguration multicloudConfiguration) {
+ this.restTemplate = restTemplate;
+ this.multicloudConfiguration = multicloudConfiguration;
+ this.objectMapper = new ObjectMapper();
+ }
+
+ public K8sRbInstanceStatus getInstanceStatus(String instanceId) throws BadResponseException {
+ MulticloudApiUrl multicloudApiUrl = new MulticloudApiUrl(multicloudConfiguration);
+ multicloudApiUrl.setInstanceId(instanceId);
+ String endpoint = multicloudApiUrl.apiUrl() + "/status";
+ ResponseEntity<String> result = restTemplate.exchange(endpoint, GET, getHttpEntity(), String.class);
+ checkResponseStatusCode(result);
+ log.info("getInstanceStatus response status: {}", result.getStatusCode());
+ String body = result.getBody();
+ log.debug("getInstanceStatus response body: {}", body);
+
+ try {
+ return objectMapper.readValue(body, K8sRbInstanceStatus.class);
+ } catch (JsonProcessingException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ public K8sRbInstanceHealthCheckSimple startInstanceHealthCheck(String instanceId) throws BadResponseException {
+ MulticloudApiUrl multicloudApiUrl = new MulticloudApiUrl(multicloudConfiguration);
+ multicloudApiUrl.setInstanceId(instanceId);
+ String endpoint = multicloudApiUrl.apiUrl() + "/healthcheck";
+ ResponseEntity<String> result = restTemplate.exchange(endpoint, POST, getHttpEntity(), String.class);
+ checkResponseStatusCode(result);
+ log.info("startInstanceHealthCheck response status: {}", result.getStatusCode());
+ String body = result.getBody();
+ log.debug("startInstanceHealthCheck response body: {}", body);
+
+ try {
+ return objectMapper.readValue(body, K8sRbInstanceHealthCheckSimple.class);
+ } catch (JsonProcessingException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public K8sRbInstanceHealthCheck getInstanceHealthCheck(String instanceId, String healthCheckInstance) throws BadResponseException {
+ MulticloudApiUrl multicloudApiUrl = new MulticloudApiUrl(multicloudConfiguration);
+ multicloudApiUrl.setInstanceId(instanceId);
+ String endpoint = multicloudApiUrl.apiUrl() + "/healthcheck/" + healthCheckInstance;
+ ResponseEntity<String> result = restTemplate.exchange(endpoint, GET, getHttpEntity(), String.class);
+ checkResponseStatusCode(result);
+ log.info("getInstanceHealthCheck response status: {}", result.getStatusCode());
+ String body = result.getBody();
+ log.debug("getInstanceHealthCheck response body: {}", body);
+
+ try {
+ return objectMapper.readValue(body, K8sRbInstanceHealthCheck.class);
+ } catch (JsonProcessingException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public void deleteInstanceHealthCheck(String instanceId, String healthCheckInstance) throws BadResponseException {
+ MulticloudApiUrl multicloudApiUrl = new MulticloudApiUrl(multicloudConfiguration);
+ multicloudApiUrl.setInstanceId(instanceId);
+ String endpoint = multicloudApiUrl.apiUrl() + "/healthcheck/" + healthCheckInstance;
+ ResponseEntity<String> result = restTemplate.exchange(endpoint, DELETE, getHttpEntity(), String.class);
+ checkResponseStatusCode(result);
+ log.info("deleteInstanceHealthCheck response status: {}", result.getStatusCode());
+ String body = result.getBody();
+ log.debug("deleteInstanceHealthCheck response body: {}", body);
+
+ if (!result.getStatusCode().is2xxSuccessful()) {
+ throw new IllegalStateException("Delete response different than 2xx:" + result.getStatusCode());
+ }
+ }
+
+ private HttpEntity<?> getHttpEntity() {
+ HttpHeaders headers = new HttpHeaders();
+ List<MediaType> acceptableMediaTypes = new ArrayList<>();
+ acceptableMediaTypes.add(MediaType.APPLICATION_JSON);
+ headers.setAccept(acceptableMediaTypes);
+ headers.setContentType(MediaType.APPLICATION_JSON);
+
+ return new HttpEntity<>(headers);
+ }
+
+ private void checkResponseStatusCode(ResponseEntity<String> result) throws BadResponseException {
+ HttpStatus statusCode = result.getStatusCode();
+ if (!statusCode.is2xxSuccessful()) {
+ throw new BadResponseException("Multicloud response status error", String.valueOf(statusCode.value()));
+ }
+ }
+
+ private class MulticloudApiUrl {
+
+ private String instanceId;
+ private final MulticloudConfiguration multicloudConfiguration;
+
+ MulticloudApiUrl(MulticloudConfiguration multicloudConfiguration1) {
+ this.multicloudConfiguration = multicloudConfiguration1;
+ }
+
+ String apiUrl() {
+ String instanceUri = multicloudConfiguration.getMulticloudUrl() + "/v1/instance/";
+ return instanceId.equals("") ? instanceUri : instanceUri + instanceId;
+ }
+
+ void setInstanceId(String instanceId) {
+ this.instanceId = instanceId;
+ }
+ }
+}
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/client/SoCallbackClient.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/client/SoCallbackClient.java
new file mode 100644
index 0000000..f6e39e8
--- /dev/null
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/client/SoCallbackClient.java
@@ -0,0 +1,41 @@
+package org.onap.so.adapters.cnf.client;
+
+import com.google.gson.Gson;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.springframework.http.HttpMethod.POST;
+
+@Component
+public class SoCallbackClient {
+
+ private final RestTemplate restTemplate;
+ private final static Gson gson = new Gson();
+
+ @Autowired
+ public SoCallbackClient(RestTemplate restTemplate) {
+ this.restTemplate = restTemplate;
+ }
+
+ public ResponseEntity<String> sendPostCallback(String url, Object body) {
+ return restTemplate.exchange(url, POST, httpEntity(body), String.class);
+ }
+
+ private HttpEntity<?> httpEntity(Object body) {
+ HttpHeaders headers = new HttpHeaders();
+ List<MediaType> acceptableMediaTypes = new ArrayList<>();
+ acceptableMediaTypes.add(MediaType.APPLICATION_JSON);
+ headers.setAccept(acceptableMediaTypes);
+ headers.setContentType(MediaType.APPLICATION_JSON);
+
+ return new HttpEntity<>(gson.toJson(body), headers);
+ }
+}
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/CheckInstanceRequest.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/CheckInstanceRequest.java
new file mode 100644
index 0000000..ac8fe54
--- /dev/null
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/CheckInstanceRequest.java
@@ -0,0 +1,42 @@
+package org.onap.so.adapters.cnf.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class CheckInstanceRequest {
+
+ @JsonProperty("requestedInstances")
+ private List<InstanceRequest> instances;
+
+ @JsonProperty("callbackUrl")
+ private String callbackUrl;
+
+ public List<InstanceRequest> getInstances() {
+ return instances;
+ }
+
+ public void setInstances(List<InstanceRequest> instances) {
+ this.instances = instances;
+ }
+
+ public String getCallbackUrl() {
+ return callbackUrl;
+ }
+
+ public void setCallbackUrl(String callbackUrl) {
+ this.callbackUrl = callbackUrl;
+ }
+
+ @Override
+ public String toString() {
+ return "CheckInstanceRequest{" +
+ "instances=" + instances +
+ ", callbackUrl='" + callbackUrl + '\'' +
+ '}';
+ }
+}
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/InstanceRequest.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/InstanceRequest.java
new file mode 100644
index 0000000..da34b3a
--- /dev/null
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/InstanceRequest.java
@@ -0,0 +1,28 @@
+package org.onap.so.adapters.cnf.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class InstanceRequest {
+
+ @JsonProperty("instanceId")
+ private String instanceId;
+
+ public String getInstanceId() {
+ return instanceId;
+ }
+
+ public void setInstanceId(String instanceId) {
+ this.instanceId = instanceId;
+ }
+
+ @Override
+ public String toString() {
+ return "InstanceRequest{" +
+ "instanceId='" + instanceId + '\'' +
+ '}';
+ }
+}
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/HealthCheckInstanceResponse.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/HealthCheckInstanceResponse.java
new file mode 100644
index 0000000..7811fe1
--- /dev/null
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/HealthCheckInstanceResponse.java
@@ -0,0 +1,60 @@
+package org.onap.so.adapters.cnf.model.healthcheck;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class HealthCheckInstanceResponse {
+
+ @JsonProperty("instanceId")
+ private String instanceId;
+
+ @JsonProperty("reason")
+ private String reason;
+
+ @JsonProperty("status")
+ private String status;
+
+ public HealthCheckInstanceResponse() { }
+
+ public HealthCheckInstanceResponse(String instanceId, String reason, String status) {
+ this.instanceId = instanceId;
+ this.reason = reason;
+ this.status = status;
+ }
+
+ public String getInstanceId() {
+ return instanceId;
+ }
+
+ public void setInstanceId(String instanceId) {
+ this.instanceId = instanceId;
+ }
+
+ public String getReason() {
+ return reason;
+ }
+
+ public void setReason(String reason) {
+ this.reason = reason;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ @Override
+ public String toString() {
+ return "StatusCheckInstanceResponse{" +
+ "instanceId='" + instanceId + '\'' +
+ ", reason='" + reason + '\'' +
+ ", status=" + status +
+ '}';
+ }
+}
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/HealthCheckResponse.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/HealthCheckResponse.java
new file mode 100644
index 0000000..aabd490
--- /dev/null
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/HealthCheckResponse.java
@@ -0,0 +1,31 @@
+package org.onap.so.adapters.cnf.model.healthcheck;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class HealthCheckResponse {
+
+ @JsonProperty("result")
+ private List<HealthCheckInstanceResponse> instanceResponse;
+
+ public List<HealthCheckInstanceResponse> getInstanceResponse() {
+ return instanceResponse;
+ }
+
+ public void setInstanceResponse(List<HealthCheckInstanceResponse> instanceResponse) {
+ this.instanceResponse = instanceResponse;
+ }
+
+ @Override
+ public String toString() {
+ return "StatusCheckResponse{" +
+ "instanceResponse=" + instanceResponse +
+ '}';
+ }
+
+}
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/K8sRbInstanceHealthCheck.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/K8sRbInstanceHealthCheck.java
new file mode 100644
index 0000000..bab6a5a
--- /dev/null
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/K8sRbInstanceHealthCheck.java
@@ -0,0 +1,28 @@
+package org.onap.so.adapters.cnf.model.healthcheck;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class K8sRbInstanceHealthCheck {
+
+ @JsonProperty("status")
+ private String status;
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ @Override
+ public String toString() {
+ return "K8sRbInstanceHealthCheck{" +
+ "status='" + status + '\'' +
+ '}';
+ }
+}
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/K8sRbInstanceHealthCheckSimple.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/K8sRbInstanceHealthCheckSimple.java
new file mode 100644
index 0000000..8a2590d
--- /dev/null
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/healthcheck/K8sRbInstanceHealthCheckSimple.java
@@ -0,0 +1,37 @@
+package org.onap.so.adapters.cnf.model.healthcheck;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class K8sRbInstanceHealthCheckSimple {
+
+ @JsonProperty("healthcheck-id")
+ private String id;
+
+ @JsonProperty("status")
+ private String status;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ @Override
+ public String toString() {
+ return "K8sRbInstanceHealthCheckSimple{" +
+ "id='" + id + '\'' +
+ ", status='" + status + '\'' +
+ '}';
+ }
+
+}
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/K8sRbInstanceGvk.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/K8sRbInstanceGvk.java
new file mode 100644
index 0000000..fee6496
--- /dev/null
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/K8sRbInstanceGvk.java
@@ -0,0 +1,43 @@
+package org.onap.so.adapters.cnf.model.statuscheck;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class K8sRbInstanceGvk {
+
+ @JsonProperty("Group")
+ private String group;
+
+ @JsonProperty("Kind")
+ private String kind;
+
+ @JsonProperty("Version")
+ private String version;
+
+ public String getGroup() {
+ return group;
+ }
+
+ public void setGroup(String group) {
+ this.group = group;
+ }
+
+ public String getKind() {
+ return kind;
+ }
+
+ public void setKind(String kind) {
+ this.kind = kind;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+}
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/K8sRbInstanceResourceStatus.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/K8sRbInstanceResourceStatus.java
new file mode 100644
index 0000000..27a3c39
--- /dev/null
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/K8sRbInstanceResourceStatus.java
@@ -0,0 +1,47 @@
+package org.onap.so.adapters.cnf.model.statuscheck;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.Map;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class K8sRbInstanceResourceStatus {
+
+ @JsonProperty("name")
+ private String name;
+
+ @JsonProperty("GVK")
+ private K8sRbInstanceGvk gvk;
+
+ @JsonProperty("status")
+ private Map<String, Object> status;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public K8sRbInstanceGvk getGvk() {
+ return gvk;
+ }
+
+ public void setGvk(K8sRbInstanceGvk gvk) {
+ this.gvk = gvk;
+ }
+
+ public Map<String, Object> getStatus() {
+ return status;
+ }
+
+ public void setStatus(Map<String, Object> status) {
+ this.status = status;
+ }
+
+}
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/K8sRbInstanceStatus.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/K8sRbInstanceStatus.java
new file mode 100644
index 0000000..f8680af
--- /dev/null
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/K8sRbInstanceStatus.java
@@ -0,0 +1,67 @@
+package org.onap.so.adapters.cnf.model.statuscheck;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.onap.so.adapters.cnf.model.MulticloudInstanceRequest;
+
+import java.util.List;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class K8sRbInstanceStatus {
+
+ @JsonProperty("request")
+ private MulticloudInstanceRequest request;
+
+ @JsonProperty("resourceCount")
+ private int resourceCount;
+
+ @JsonProperty("ready")
+ private boolean ready;
+
+ @JsonProperty("resourcesStatus")
+ private List<K8sRbInstanceResourceStatus> resourcesStatus;
+
+ public MulticloudInstanceRequest getRequest() {
+ return request;
+ }
+
+ public void setRequest(MulticloudInstanceRequest request) {
+ this.request = request;
+ }
+
+ public int getResourceCount() {
+ return resourceCount;
+ }
+
+ public void setResourceCount(int resourceCount) {
+ this.resourceCount = resourceCount;
+ }
+
+ public boolean isReady() {
+ return ready;
+ }
+
+ public void setReady(boolean ready) {
+ this.ready = ready;
+ }
+
+ public List<K8sRbInstanceResourceStatus> getResourcesStatus() {
+ return resourcesStatus;
+ }
+
+ public void setResourcesStatus(List<K8sRbInstanceResourceStatus> resourcesStatus) {
+ this.resourcesStatus = resourcesStatus;
+ }
+
+ @Override
+ public String toString() {
+ return "K8sRbInstanceStatus{" +
+ "request=" + request +
+ ", resourceCount=" + resourceCount +
+ ", ready=" + ready +
+ ", resourcesStatus=" + resourcesStatus +
+ '}';
+ }
+}
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/StatusCheckInstanceResponse.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/StatusCheckInstanceResponse.java
new file mode 100644
index 0000000..fc5da9b
--- /dev/null
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/StatusCheckInstanceResponse.java
@@ -0,0 +1,60 @@
+package org.onap.so.adapters.cnf.model.statuscheck;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class StatusCheckInstanceResponse {
+
+ @JsonProperty("instanceId")
+ private String instanceId;
+
+ @JsonProperty("reason")
+ private String reason;
+
+ @JsonProperty("status")
+ private boolean status;
+
+ public StatusCheckInstanceResponse() { }
+
+ public StatusCheckInstanceResponse(String instanceId, String reason, boolean status) {
+ this.instanceId = instanceId;
+ this.reason = reason;
+ this.status = status;
+ }
+
+ public String getInstanceId() {
+ return instanceId;
+ }
+
+ public void setInstanceId(String instanceId) {
+ this.instanceId = instanceId;
+ }
+
+ public String getReason() {
+ return reason;
+ }
+
+ public void setReason(String reason) {
+ this.reason = reason;
+ }
+
+ public boolean isStatus() {
+ return status;
+ }
+
+ public void setStatus(boolean status) {
+ this.status = status;
+ }
+
+ @Override
+ public String toString() {
+ return "StatusCheckInstanceResponse{" +
+ "instanceId='" + instanceId + '\'' +
+ ", reason='" + reason + '\'' +
+ ", status=" + status +
+ '}';
+ }
+}
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/StatusCheckResponse.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/StatusCheckResponse.java
new file mode 100644
index 0000000..36c3068
--- /dev/null
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/statuscheck/StatusCheckResponse.java
@@ -0,0 +1,31 @@
+package org.onap.so.adapters.cnf.model.statuscheck;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class StatusCheckResponse {
+
+ @JsonProperty("result")
+ private List<StatusCheckInstanceResponse> instanceResponse;
+
+ public List<StatusCheckInstanceResponse> getInstanceResponse() {
+ return instanceResponse;
+ }
+
+ public void setInstanceResponse(List<StatusCheckInstanceResponse> instanceResponse) {
+ this.instanceResponse = instanceResponse;
+ }
+
+ @Override
+ public String toString() {
+ return "StatusCheckResponse{" +
+ "instanceResponse=" + instanceResponse +
+ '}';
+ }
+
+}