moresandeep commented on a change in pull request #249: KNOX-2213 - Service 
Discovery Support for CM UI, API
URL: https://github.com/apache/knox/pull/249#discussion_r373580969
 
 

 ##########
 File path: 
gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/ClouderaManagerServiceDiscovery.java
 ##########
 @@ -202,6 +204,22 @@ private static Cluster discoverCluster(DiscoveryApiClient 
client, String cluster
           }
         }
       }
+      /* Since Cloudera Manager does not have a service for itself, we will 
add a skeleton CM
+      service so that we can add CM service to topology when auto-discovery is
+      turned on and CM service is selected in the descriptor */
+      List<ServiceModelGenerator> smgList = serviceModelGenerators
+          .get(CM_SERVICE_TYPE);
+      if (smgList != null) {
+        for (ServiceModelGenerator serviceModelGenerator : smgList) {
+          if (serviceModelGenerator != null) {
+            serviceModelGenerator.setApiClient(client);
+            ServiceModel serviceModel = serviceModelGenerator
+                .generateService(null, null, null, null);
+            serviceModels.add(serviceModel);
+          }
+        }
+      }
+
 
 Review comment:
   Sure, I'll update the PR with this change.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to