Add external tls info to bpgenerator and component spec schema
[dcaegen2/platform.git] / mod / bpgenerator / src / main / java / org / onap / blueprintgenerator / models / componentspec / Auxilary.java
index 01844f9..a36deb5 100644 (file)
@@ -3,6 +3,8 @@
  ================================================================================
  Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
  ================================================================================
+ Modifications Copyright (c) 2020 Nokia. All rights reserved.
+ ================================================================================
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
@@ -67,6 +69,15 @@ public class Auxilary {
        
        /** The healthcheck. */
        private HealthCheck healthcheck;
+
+       /**log-directory**/
+       @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
+       private TreeMap<String, Object> log_info;
+
+       /**tls-info**/
+       @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
+       private TreeMap<String, Object> tls_info;
+
        /** The volumes. */
        private Volumes[] volumes;
 
@@ -74,6 +85,7 @@ public class Auxilary {
        private Policy policy;
 
        /** The ports. */
+       @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
        private ArrayList<Object> ports;
 
        /** The reconfigs. */
@@ -84,35 +96,35 @@ public class Auxilary {
        private TreeMap<String, String> databases;
 
 
-       public TreeMap<String, LinkedHashMap<String, Object>> createPorts(TreeMap<String, LinkedHashMap<String, Object>> inps) {
-               TreeMap<String, LinkedHashMap<String, Object>> retInputs = inps;
-               LinkedHashMap<String, Object> portType = new LinkedHashMap();
-               portType.put("type", "string");
-
-               ArrayList<Object> ports = new ArrayList();
-               String external = "";
-               boolean foundPort = false;
-               for(Object o: this.getPorts()) {
-                       String internal = "";
-                       String p = o.toString();
-                       for(int i = 0; i < p.length(); i++) {
-                               if(p.charAt(i) == ':') {
-                                       internal = '"' + internal + '"';
-                                       internal = "concat: ['" + internal + "', {get_input: external_port}]"; 
-                                       ports.add(internal);
-                               }
-                               if(p.charAt(i) == ':' && !foundPort) {
-                                       external = p.substring(i);
-                                       portType.put("default", external);
-                                       retInputs.put("external_port", portType);
-
-                               }
-                               internal = internal + p.charAt(i);
-
-                       }
-               }
-
-               this.setPorts(ports);
-               return retInputs;
-       }
-}
\ No newline at end of file
+//     public TreeMap<String, LinkedHashMap<String, Object>> createPorts(TreeMap<String, LinkedHashMap<String, Object>> inps) {
+//             TreeMap<String, LinkedHashMap<String, Object>> retInputs = inps;
+//             LinkedHashMap<String, Object> portType = new LinkedHashMap();
+//             portType.put("type", "string");
+//
+//             ArrayList<Object> ports = new ArrayList();
+//             String external = "";
+//             boolean foundPort = false;
+//             for(Object o: this.getPorts()) {
+//                     String internal = "";
+//                     String p = o.toString();
+//                     for(int i = 0; i < p.length(); i++) {
+//                             if(p.charAt(i) == ':') {
+//                                     internal = '"' + internal + '"';
+//                                     internal = "concat: ['" + internal + "', {get_input: external_port}]";
+//                                     ports.add(internal);
+//                             }
+//                             if(p.charAt(i) == ':' && !foundPort) {
+//                                     external = p.substring(i);
+//                                     portType.put("default", external);
+//                                     retInputs.put("external_port", portType);
+//
+//                             }
+//                             internal = internal + p.charAt(i);
+//
+//                     }
+//             }
+//
+//             this.setPorts(ports);
+//             return retInputs;
+//     }
+}