Sonar Cloud migration changes
[dmaap/messagerouter/mirroragent.git] / src / main / java / org / onap / dmaap / mr / dmaapMMAgent / MirrorMakerAgent.java
1 /*******************************************************************************
2  *  ============LICENSE_START=======================================================
3  *  org.onap.dmaap
4  *  ================================================================================
5  *  Copyright © 2017 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
10  *        http://www.apache.org/licenses/LICENSE-2.0
11  *  
12  *  Unless required by applicable law or agreed to in writing, software
13  *  distributed under the License is distributed on an "AS IS" BASIS,
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *  See the License for the specific language governing permissions and
16  *  limitations under the License.
17  *  ============LICENSE_END=========================================================
18  *
19  *  ECOMP is a trademark and service mark of AT&T Intellectual Property.
20  *  
21  *******************************************************************************/
22 package org.onap.dmaap.mr.dmaapMMAgent;
23
24 import java.io.File;
25 import java.io.FileInputStream;
26 import java.io.FileOutputStream;
27 import java.io.IOException;
28 import java.io.InputStream;
29 import java.io.OutputStream;
30 import java.util.ArrayList;
31 import java.util.Properties;
32
33 import org.apache.log4j.Logger;
34 import org.jasypt.util.text.BasicTextEncryptor;
35 import org.json.JSONObject;
36 import org.onap.dmaap.mr.dmaapMMAgent.dao.CreateMirrorMaker;
37 import org.onap.dmaap.mr.dmaapMMAgent.dao.DeleteMirrorMaker;
38 import org.onap.dmaap.mr.dmaapMMAgent.dao.ListMirrorMaker;
39 import org.onap.dmaap.mr.dmaapMMAgent.dao.MirrorMaker;
40 import org.onap.dmaap.mr.dmaapMMAgent.dao.UpdateMirrorMaker;
41 import org.onap.dmaap.mr.dmaapMMAgent.dao.UpdateWhiteList;
42 import org.onap.dmaap.mr.dmaapMMAgent.utils.MirrorMakerProcessHandler;
43
44 import com.google.gson.Gson;
45 import com.google.gson.internal.LinkedTreeMap;
46
47 public class MirrorMakerAgent {
48         static final Logger logger = Logger.getLogger(MirrorMakerAgent.class);
49         Properties mirrorMakerProperties = new Properties();
50         ListMirrorMaker mirrorMakers = null;
51         String mmagenthome = "/opt";
52         String kafkahome = "";
53         String topicURL = "";
54         String topicname = "";
55         String mechid = "";
56         String password = "";
57         String grepLog = "";
58         public boolean exitLoop = false;
59         TopicUtil topicUtil = new TopicUtil();
60         private static String secret = "utdfpWlgyDQ2ZB8SLVRtmN834I1JcT9J";
61
62         public static void main(String[] args) {
63                 if (args != null && args.length == 2) {
64                         if (args[0].equals("-encrypt")) {
65                                 BasicTextEncryptor textEncryptor = new BasicTextEncryptor();
66                                 textEncryptor.setPassword(secret);
67                                 String plainText = textEncryptor.encrypt(args[1]);
68                                 System.out.println("Encrypted Password is :" + plainText);
69                                 return;
70                         }
71                 } else if (args != null && args.length > 0) {
72                         System.out.println(
73                                         "Usage: ./mmagent to run with the configuration \n -encrypt <password> to Encrypt Password for config ");
74                         return;
75                 }
76                 MirrorMakerAgent agent = new MirrorMakerAgent();
77                 if (agent.checkStartup()) {
78                         logger.info("mmagent started, loading properties");
79                         try {
80                                 agent.checkAgentProcess();
81                         } catch (Exception e) {
82                             logger.error("exception occured in checkAgentProcess ", e);
83                         }
84                         agent.readAgentTopic();
85                 } else {
86                         System.out.println(
87                                         "ERROR: mmagent startup unsuccessful, please make sure the mmagenthome /etc/mmagent.config is set and mechid have the rights to the topic");
88                 }
89         }
90
91         private boolean checkStartup() {
92                 FileInputStream input = null;
93                 try {
94                         input = new FileInputStream(mmagenthome + "/etc/mmagent.config");
95                         logger.info("mmagenthome is set :" + mmagenthome + " loading properties at /etc/mmagent.config");
96                 } catch (IOException ex) {
97                         logger.error(mmagenthome + "/etc/mmagent.config not found.", ex);
98                         return false;
99                 } finally {
100                         if (input != null) {
101                                 try {
102                                         input.close();
103                                 } catch (IOException e) {
104                                         logger.error("exception occured in checkStartup "+e);
105                                 }
106                         }
107                 }
108                 loadProperties();
109                 input = null;
110                 try {
111                         input = new FileInputStream(kafkahome + "/bin/kafka-run-class.sh");
112                         logger.info("kafkahome is set :" + kafkahome);
113                 } catch (IOException ex) {
114                         logger.error(kafkahome + "/bin/kafka-run-class.sh not found.  Make sure kafka home is set correctly", ex);
115                         return false;
116                 } finally {
117                         if (input != null) {
118                                 try {
119                                         input.close();
120                                 } catch (IOException e) {
121                                         logger.error("exception occured in checkStartup "+e);
122                                 }
123                         }
124                 }
125                 String response = topicUtil.publishTopic(topicURL, topicname, mechid, password, "{\"test\":\"test\"}");
126                 if (response.startsWith("ERROR:")) {
127                         logger.error("Problem publishing to topic, please verify the config " + this.topicname + " MR URL is:"
128                                         + this.topicURL + " Error is:  " + response);
129                         return false;
130                 }
131                 logger.info("Published to Topic :" + this.topicname + " Successfully");
132                 response = topicUtil.subscribeTopic(topicURL, topicname, "1", mechid, password);
133                 if (response != null && response.startsWith("ERROR:")) {
134                         logger.error("Problem subscribing to topic, please verify the config " + this.topicname + " MR URL is:"
135                                         + this.topicURL + " Error is:  " + response);
136                         return false;
137                 }
138                 logger.info("Subscribed to Topic :" + this.topicname + " Successfully");
139                 return true;
140         }
141
142         private void checkPropertiesFile(MirrorMaker mm, String propName, boolean refresh) {
143                 InputStream input = null;
144                 OutputStream out = null;
145                 try {
146                         if (refresh) {
147                                 throw new IOException();
148                         }
149                         input = new FileInputStream(mmagenthome + "/etc/" + mm.name + propName + ".properties");
150                 } catch (IOException ex) {
151                         try {
152                                 input = new FileInputStream(mmagenthome + "/etc/" + propName + ".properties");
153                                 Properties prop = new Properties();
154                                 prop.load(input);
155                                 if (propName.equals("consumer")) {
156                                         prop.setProperty("group.id", mm.name);
157
158                                         prop.setProperty("bootstrap.servers", mm.consumer);
159                                         prop.setProperty("client.id", mm.name + "MM_consumer");
160                                 } else {
161                                         prop.setProperty("bootstrap.servers", mm.producer);
162                                         prop.setProperty("client.id", mm.name + "MM_producer");
163
164                                 }
165                                 out = new FileOutputStream(mmagenthome + "/etc/" + mm.name + propName + ".properties");
166                                 prop.store(out, "");
167
168                         } catch (Exception e) {
169                                 logger.error("exception occured in checkPropertiesFile "+e);
170                         }
171                 } finally {
172                         if (input != null) {
173                                 try {
174                                         input.close();
175                                 } catch (IOException e) {
176                                     logger.error("exception occured in checkPropertiesFile ", e);
177                                 }
178                         }
179                         if (out != null) {
180                                 try {
181                                         out.close();
182                                 } catch (IOException e) {
183                                         logger.error("exception occured in checkPropertiesFile "+e);
184                                 }
185                         }
186                 }
187         }
188
189         private void checkAgentProcess() throws Exception {
190                 logger.info("Checking MirrorMaker Process");
191                 if (mirrorMakers != null) {
192                         int mirrorMakersCount = mirrorMakers.getListMirrorMaker().size();
193                         for (int i = 0; i < mirrorMakersCount; i++) {
194                                 MirrorMaker mm = mirrorMakers.getListMirrorMaker().get(i);
195                                 if (MirrorMakerProcessHandler.checkMirrorMakerProcess(mm.name, mm.enablelogCheck,
196                                                 this.grepLog) == false) {
197                                         checkPropertiesFile(mm, "consumer", false);
198                                         checkPropertiesFile(mm, "producer", false);
199
200                                         if (mm.whitelist != null && !mm.whitelist.equals("")) {
201                                                 logger.info(
202                                                                 "MirrorMaker " + mm.name + " is not running, restarting.  Check Logs for more Details");
203                                                 MirrorMakerProcessHandler.startMirrorMaker(this.mmagenthome, this.kafkahome, mm.name,
204                                                                 mmagenthome + "/etc/" + mm.name + "consumer.properties",
205                                                                 mmagenthome + "/etc/" + mm.name + "producer.properties", mm.numStreams, mm.whitelist);
206                                                 mm.setStatus("RESTARTING");
207
208                                         } else {
209                                                 logger.info("MirrorMaker " + mm.name + " is STOPPED");
210                                                 mm.setStatus("STOPPED");
211                                         }
212                                         try {
213                                                 Thread.sleep(1000);
214                                         } catch (InterruptedException e) {
215                                         }
216                                         mirrorMakers.getListMirrorMaker().set(i, mm);
217                                 } else {
218                                         logger.info("MirrorMaker " + mm.name + " is running");
219                                         mm.setStatus("RUNNING");
220                                         mirrorMakers.getListMirrorMaker().set(i, mm);
221                                 }
222                         }
223                 }
224                 // Gson g = new Gson();
225                 // System.out.println(g.toJson(mirrorMakers));
226         }
227
228         public void readAgentTopic() {
229                 try {
230                         int connectionattempt = 0;
231                         while (true) {
232                                 logger.info("--------------------------------");
233                                 logger.info("Waiting for Messages for 60 secs");
234                                 String topicMessage = topicUtil.subscribeTopic(topicURL, topicname, "60000", mechid, password);
235                                 Gson g = new Gson();
236                                 LinkedTreeMap<?, ?> object = null;
237                                 if (topicMessage != null) {
238                                         try {
239                                                 // Check and parse if String object returned by consumer
240                                                 // API
241                                                 // else use the jsonObject
242                                                 if (topicMessage.startsWith("\"")) {
243                                                         topicMessage = g.fromJson(topicMessage.toString(), String.class);
244                                                 }
245                                                 object = g.fromJson(topicMessage, LinkedTreeMap.class);
246
247                                                 // Cast the 1st item (since limit=1 and see the type of
248                                                 // object
249                                                 readAgent(object, topicMessage);
250                                         } catch (Exception ex) {
251                                                 connectionattempt++;
252                                                 if (connectionattempt > 5) {
253                                                         logger.info("Can't connect to the topic, mmagent shutting down , " + topicMessage);
254                                                         return;
255                                                 }
256                                                 logger.info("Can't connect to the topic, " + topicMessage + " Retrying " + connectionattempt
257                                                                 + " of 5 times in 1 minute" + " Error:" + ex.getLocalizedMessage());
258                                                 Thread.sleep(60000);
259                                         }
260                                 } else {
261                                         // Check all MirrorMaker every min
262                                         connectionattempt = 0;
263                                         checkAgentProcess();
264                                 }
265                                 if (exitLoop) {
266                                         break;
267                                 }
268
269                         }
270                 } catch (Exception e) {
271                     logger.error("exception occured in readAgentTopic ", e);
272                 }
273
274         }
275
276         public void createMirrorMaker(MirrorMaker newMirrorMaker) {
277                 boolean exists = false;
278                 if (mirrorMakers != null) {
279                         int mirrorMakersCount = mirrorMakers.getListMirrorMaker().size();
280                         for (int i = 0; i < mirrorMakersCount; i++) {
281                                 MirrorMaker mm = mirrorMakers.getListMirrorMaker().get(i);
282                                 if (mm.name.equals(newMirrorMaker.name)) {
283                                         exists = true;
284                                         logger.info("MirrorMaker already exist for:" + newMirrorMaker.name);
285                                         return;
286                                 }
287                         }
288                 }
289                 logger.info("Adding new MirrorMaker:" + newMirrorMaker.name);
290                 if (exists == false && mirrorMakers != null) {
291                         mirrorMakers.getListMirrorMaker().add(newMirrorMaker);
292                 } else if (exists == false && mirrorMakers == null) {
293                         mirrorMakers = new ListMirrorMaker();
294                         ArrayList<MirrorMaker> list = mirrorMakers.getListMirrorMaker();
295                         list = new ArrayList<MirrorMaker>();
296                         list.add(newMirrorMaker);
297                         mirrorMakers.setListMirrorMaker(list);
298                 }
299                 checkPropertiesFile(newMirrorMaker, "consumer", true);
300                 checkPropertiesFile(newMirrorMaker, "producer", true);
301
302                 Gson g = new Gson();
303                 mirrorMakerProperties.setProperty("mirrormakers", g.toJson(this.mirrorMakers));
304                 OutputStream out = null;
305                 try {
306                         out = new FileOutputStream(mmagenthome + "/etc/mmagent.config");
307                         mirrorMakerProperties.store(out, "");
308                 } catch (IOException ex) {
309                     logger.error("exception occured in createMirrorMaker ", ex);
310                 } finally {
311                         if (out != null) {
312                                 try {
313                                         out.close();
314                                 } catch (IOException e) {
315                                     logger.error("exception occured in createMirrorMaker ", e);
316                                 }
317                         }
318                 }
319         }
320
321         private void updateMirrorMaker(MirrorMaker newMirrorMaker) {
322                 boolean exists = false;
323                 if (mirrorMakers != null) {
324                         int mirrorMakersCount = mirrorMakers.getListMirrorMaker().size();
325                         for (int i = 0; i < mirrorMakersCount; i++) {
326                                 MirrorMaker mm = mirrorMakers.getListMirrorMaker().get(i);
327                                 if (mm.name.equals(newMirrorMaker.name)) {
328                                         exists = true;
329                                         if (null != newMirrorMaker.getConsumer()) {
330                                                 mm.setConsumer(newMirrorMaker.getConsumer());
331                                         }
332                                         if (null != newMirrorMaker.getProducer()) {
333                                                 mm.setProducer(newMirrorMaker.getProducer());
334                                         }
335                                         if (newMirrorMaker.getNumStreams() >= 1) {
336                                                 mm.setNumStreams(newMirrorMaker.getNumStreams());
337                                         }
338
339                                         mm.setEnablelogCheck(newMirrorMaker.enablelogCheck);
340
341                                         mirrorMakers.getListMirrorMaker().set(i, mm);
342                                         newMirrorMaker = mm;
343                                         logger.info("Updating MirrorMaker:" + newMirrorMaker.name);
344                                 }
345                         }
346                 }
347                 if (exists) {
348                         checkPropertiesFile(newMirrorMaker, "consumer", true);
349                         checkPropertiesFile(newMirrorMaker, "producer", true);
350
351                         Gson g = new Gson();
352                         mirrorMakerProperties.setProperty("mirrormakers", g.toJson(this.mirrorMakers));
353                         OutputStream out = null;
354                         try {
355                                 out = new FileOutputStream(mmagenthome + "/etc/mmagent.config");
356                                 mirrorMakerProperties.store(out, "");
357                                 MirrorMakerProcessHandler.stopMirrorMaker(newMirrorMaker.name);
358                                 try {
359                                         Thread.sleep(1000);
360                                 } catch (InterruptedException e) {
361                                 }
362                         } catch (IOException ex) {
363                             logger.error("exception occured in updateMirrorMaker ", ex);
364                         } finally {
365                                 if (out != null) {
366                                         try {
367                                                 out.close();
368                                         } catch (IOException e) {
369                                             logger.error("exception occured in updateMirrorMaker ", e);
370                                         }
371                                 }
372                         }
373                 } else {
374                         logger.info("MirrorMaker Not found for:" + newMirrorMaker.name);
375                 }
376         }
377
378         private void updateWhiteList(MirrorMaker newMirrorMaker) {
379                 boolean exists = false;
380                 if (mirrorMakers != null) {
381                         int mirrorMakersCount = mirrorMakers.getListMirrorMaker().size();
382                         for (int i = 0; i < mirrorMakersCount; i++) {
383                                 MirrorMaker mm = mirrorMakers.getListMirrorMaker().get(i);
384                                 if (mm.name.equals(newMirrorMaker.name)) {
385                                         exists = true;
386                                         mm.setWhitelist(newMirrorMaker.whitelist);
387                                         mirrorMakers.getListMirrorMaker().set(i, mm);
388                                         logger.info("Updating MirrorMaker WhiteList:" + newMirrorMaker.name + " WhiteList:"
389                                                         + newMirrorMaker.whitelist);
390                                 }
391                         }
392                 }
393                 if (exists) {
394                         Gson g = new Gson();
395                         mirrorMakerProperties.setProperty("mirrormakers", g.toJson(this.mirrorMakers));
396                         OutputStream out = null;
397                         try {
398                                 out = new FileOutputStream(mmagenthome + "/etc/mmagent.config");
399                                 mirrorMakerProperties.store(out, "");
400                                 MirrorMakerProcessHandler.stopMirrorMaker(newMirrorMaker.name);
401                                 try {
402                                         Thread.sleep(1000);
403                                 } catch (InterruptedException e) {
404                                 }
405                         } catch (IOException ex) {
406                             logger.error("exception occured in updateWhiteList ", ex);
407                         } finally {
408                                 if (out != null) {
409                                         try {
410                                                 out.close();
411                                         } catch (IOException e) {
412                                             logger.error("exception occured in updateWhiteList ", e);
413                                         }
414                                 }
415                         }
416                 } else {
417                         logger.info("MirrorMaker Not found for:" + newMirrorMaker.name);
418                 }
419         }
420
421         private void deleteMirrorMaker(MirrorMaker newMirrorMaker) {
422                 boolean exists = false;
423                 if (mirrorMakers != null) {
424                         int mirrorMakersCount = mirrorMakers.getListMirrorMaker().size();
425                         for (int i = 0; i < mirrorMakersCount; i++) {
426                                 MirrorMaker mm = mirrorMakers.getListMirrorMaker().get(i);
427                                 if (mm.name.equals(newMirrorMaker.name)) {
428                                         exists = true;
429                                         mirrorMakers.getListMirrorMaker().remove(i);
430                                         logger.info("Removing MirrorMaker:" + newMirrorMaker.name);
431                                         i = mirrorMakersCount;
432                                 }
433                         }
434                 }
435                 if (exists) {
436                         try {
437                                 String path = mmagenthome + "/etc/" + newMirrorMaker.name + "consumer" + ".properties";
438                                 File file = new File(path);
439                                 file.delete();
440                         } catch (Exception ex) {
441                             logger.error("exception occured in deleteMirrorMaker ", ex);
442                         }
443                         try {
444                                 String path = mmagenthome + "/etc/" + newMirrorMaker.name + "producer" + ".properties";
445                                 File file = new File(path);
446                                 file.delete();
447                         } catch (Exception ex) {
448                             logger.error("exception occured in deleteMirrorMaker ", ex);
449                         }
450                         Gson g = new Gson();
451                         mirrorMakerProperties.setProperty("mirrormakers", g.toJson(this.mirrorMakers));
452                         OutputStream out = null;
453                         try {
454                                 out = new FileOutputStream(mmagenthome + "/etc/mmagent.config");
455                                 mirrorMakerProperties.store(out, "");
456                                 MirrorMakerProcessHandler.stopMirrorMaker(newMirrorMaker.name);
457                         } catch (IOException ex) {
458                             logger.error("exception occured in deleteMirrorMaker ", ex);
459                         } finally {
460                                 if (out != null) {
461                                         try {
462                                                 out.close();
463                                         } catch (IOException e) {
464                                             logger.error("exception occured in deleteMirrorMaker ", e);
465                                         }
466                                 }
467                         }
468                 } else {
469                         logger.info("MirrorMaker Not found for:" + newMirrorMaker.name);
470                 }
471         }
472
473         private void loadProperties() {
474                 InputStream input = null;
475                 try {
476
477                         input = new FileInputStream(mmagenthome + "/etc/mmagent.config");
478                         mirrorMakerProperties.load(input);
479                         Gson g = new Gson();
480                         if (mirrorMakerProperties.getProperty("mirrormakers") == null) {
481                                 this.mirrorMakers = new ListMirrorMaker();
482                                 ArrayList<MirrorMaker> list = this.mirrorMakers.getListMirrorMaker();
483                                 list = new ArrayList<>();
484                                 this.mirrorMakers.setListMirrorMaker(list);
485                         } else {
486                                 this.mirrorMakers = g.fromJson(mirrorMakerProperties.getProperty("mirrormakers"),
487                                                 ListMirrorMaker.class);
488                         }
489
490                         this.kafkahome = mirrorMakerProperties.getProperty("kafkahome");
491                         this.topicURL = mirrorMakerProperties.getProperty("topicURL");
492                         this.topicname = mirrorMakerProperties.getProperty("topicname");
493                         this.mechid = mirrorMakerProperties.getProperty("mechid");
494                         this.grepLog = mirrorMakerProperties.getProperty("grepLog");
495
496                         BasicTextEncryptor textEncryptor = new BasicTextEncryptor();
497                         textEncryptor.setPassword(secret);
498                         this.password = textEncryptor.decrypt(mirrorMakerProperties.getProperty("password"));
499                 } catch (Exception ex) {
500                     logger.error("exception occured in loadProperties ", ex);
501                 } finally {
502                         if (input != null) {
503                                 try {
504                                         input.close();
505                                 } catch (IOException e) {
506                                     logger.error("exception occured in loadProperties ", e);
507                                 }
508                         }
509                 }
510
511         }
512
513         public void readAgent(LinkedTreeMap<?, ?> object, String topicMessage) throws Exception{
514
515                 Gson g = new Gson();
516
517                 if (object.get("createMirrorMaker") != null) {
518                         logger.info("Received createMirrorMaker request from topic");
519                         CreateMirrorMaker m = g.fromJson(topicMessage, CreateMirrorMaker.class);
520                         createMirrorMaker(m.getCreateMirrorMaker());
521                         checkAgentProcess();
522                         mirrorMakers.setMessageID(m.getMessageID());
523                         topicUtil.publishTopic(topicURL, topicname, mechid, password, g.toJson(mirrorMakers));
524                         mirrorMakers.setMessageID("");
525                 } else if (object.get("updateMirrorMaker") != null) {
526                         logger.info("Received updateMirrorMaker request from topic");
527                         UpdateMirrorMaker m = g.fromJson(topicMessage, UpdateMirrorMaker.class);
528                         JSONObject json = new JSONObject(topicMessage);
529                         JSONObject json2 = (JSONObject) json.get("updateMirrorMaker");
530                         if (!json2.has("numStreams")) {
531                                 m.getUpdateMirrorMaker().setNumStreams(0);
532                         }
533                         updateMirrorMaker(m.getUpdateMirrorMaker());
534                         checkAgentProcess();
535                         mirrorMakers.setMessageID(m.getMessageID());
536                         topicUtil.publishTopic(topicURL, topicname, mechid, password, g.toJson(mirrorMakers));
537                         mirrorMakers.setMessageID("");
538                 } else if (object.get("deleteMirrorMaker") != null) {
539                         logger.info("Received deleteMirrorMaker request from topic");
540                         DeleteMirrorMaker m = g.fromJson(topicMessage, DeleteMirrorMaker.class);
541                         deleteMirrorMaker(m.getDeleteMirrorMaker());
542                         checkAgentProcess();
543                         mirrorMakers.setMessageID(m.getMessageID());
544                         topicUtil.publishTopic(topicURL, topicname, mechid, password, g.toJson(mirrorMakers));
545                         mirrorMakers.setMessageID("");
546                 } else if (object.get("listAllMirrorMaker") != null) {
547                         logger.info("Received listALLMirrorMaker request from topic");
548                         checkAgentProcess();
549                         mirrorMakers.setMessageID((String) object.get("messageID"));
550                         topicUtil.publishTopic(topicURL, topicname, mechid, password, g.toJson(mirrorMakers));
551                         mirrorMakers.setMessageID("");
552                 } else if (object.get("updateWhiteList") != null) {
553                         logger.info("Received updateWhiteList request from topic");
554                         UpdateWhiteList m = g.fromJson(topicMessage, UpdateWhiteList.class);
555                         updateWhiteList(m.getUpdateWhiteList());
556                         checkAgentProcess();
557                         mirrorMakers.setMessageID(m.getMessageID());
558                         topicUtil.publishTopic(topicURL, topicname, mechid, password, g.toJson(mirrorMakers));
559                         mirrorMakers.setMessageID("");
560                 } else if (object.get("listMirrorMaker") != null) {
561                         logger.info("Received listMirrorMaker from topic, skipping messages");
562                 } else {
563                         logger.info("Received unknown request from topic");
564                 }
565
566         }
567 }

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use