Removed MSB Dependencies
[holmes/common.git] / holmes-actions / src / main / java / org / onap / holmes / common / msb / entity / MicroServiceInfo.java
1 /**
2  * Copyright 2023 ZTE Corporation.
3  * <p>
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  * <p>
8  * http://www.apache.org/licenses/LICENSE-2.0
9  * <p>
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.onap.holmes.common.msb.entity;
18
19 import java.io.Serializable;
20 import java.util.Iterator;
21
22 public class MicroServiceInfo extends Service<Node> implements Serializable {
23     private static final long serialVersionUID = 1L;
24
25     public MicroServiceInfo() {
26     }
27
28     public String toString() {
29         StringBuilder buf = new StringBuilder();
30         buf.append("MicroService List:").append("\r\n");
31         buf.append("serviceName:").append(this.getServiceName()).append("\r\n");
32         buf.append("version:").append(this.getVersion()).append("\r\n");
33         buf.append("url:").append(this.getUrl()).append("\r\n");
34         buf.append("protocol:").append(this.getProtocol()).append("\r\n");
35         buf.append("visualRange:").append(this.getVisualRange()).append("\r\n");
36         buf.append("enable_ssl:").append(this.isEnable_ssl()).append("\r\n");
37         buf.append("nodes:").append("\r\n");
38         Iterator nodes = this.getNodes().iterator();
39
40         while (nodes.hasNext()) {
41             Node nodeInstace = (Node) nodes.next();
42             buf.append("  ip-").append(nodeInstace.getIp()).append("\r\n");
43             buf.append("  port-").append(nodeInstace.getPort()).append("\r\n");
44             buf.append("  ttl-").append(nodeInstace.getTtl()).append("\r\n");
45         }
46
47         return buf.toString();
48     }
49 }