You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2020/02/03 15:19:30 UTC

[GitHub] [knox] moresandeep commented on a change in pull request #249: KNOX-2213 - Service Discovery Support for CM UI, API

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_r374161836
 
 

 ##########
 File path: gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/ClouderaManagerServiceDiscovery.java
 ##########
 @@ -216,18 +220,38 @@ private static ClouderaManagerCluster discoverCluster(DiscoveryApiClient client,
     Set<ServiceModel> serviceModels = new HashSet<>();
 
     ApiServiceList serviceList = getClusterServices(servicesResourceApi, clusterName);
+
+    /*
+    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
+    */
+    final ApiService cmService = new ApiService();
+    cmService.setName(CM_SERVICE_TYPE.toLowerCase(Locale.ROOT));
+    cmService.setType(CM_SERVICE_TYPE);
+    serviceList.addItemsItem(cmService);
 
 Review comment:
   Thanks, updated the PR.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services