2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
19 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
20 * ============LICENSE_END=========================================================
23 package org.onap.ccsdk.sli.adaptors.ansible.model;
26 * Simple class to store code and message returned by POST/GET to an Ansible Server
28 public class AnsibleResult {
30 private static final String EMPTY_VALUE = "UNKNOWN";
32 private int statusCode;
33 private String statusMessage;
34 private String results;
35 private String output;
36 private String serverIp;
37 private String configData;
39 public AnsibleResult() {
40 this(-1, EMPTY_VALUE, EMPTY_VALUE);
43 public AnsibleResult(int code, String message) {
44 this(code, message, EMPTY_VALUE);
47 public AnsibleResult(int code, String message, String result) {
49 statusMessage = message;
53 public AnsibleResult(int code, String message, String result, String outputData) {
55 statusMessage = message;
60 public String getOutput() {
64 public void setOutput(String output) {
68 void set(int code, String message, String results, String output) {
69 this.statusCode = code;
70 this.statusMessage = message;
71 this.results = results;
75 public int getStatusCode() {
76 return this.statusCode;
79 public void setStatusCode(int code) {
80 this.statusCode = code;
83 public String getStatusMessage() {
84 return this.statusMessage;
87 public void setStatusMessage(String message) {
88 this.statusMessage = message;
91 public String getResults() {
95 public void setResults(String results) {
96 this.results = results;
99 public String getServerIp() {
100 return this.serverIp;
103 public void setServerIp(String serverIp) {
104 this.serverIp = serverIp;
107 public String getConfigData() {
108 return this.configData;
111 public void setConfigData(String configData) {
112 this.configData = configData;