[
https://issues.apache.org/jira/browse/KNOX-2213?focusedWorklogId=380077&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-380077
]
ASF GitHub Bot logged work on KNOX-2213:
----------------------------------------
Author: ASF GitHub Bot
Created on: 31/Jan/20 16:34
Start Date: 31/Jan/20 16:34
Worklog Time Spent: 10m
Work Description: smolnar82 commented on pull request #249: KNOX-2213 -
Service Discovery Support for CM UI, API
URL: https://github.com/apache/knox/pull/249#discussion_r373570304
##########
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:
I believe it would be easier to read and understand later on if you add the
CM service above to `serviceList` and modify `getRoles(rolesResourceApi,
clusterName, serviceName)` to fetch the roles using the CM REST API for other
services and add CM API/UI role manually. Then you would not have to copy-paste
the logic which checks service model generators
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 380077)
Time Spent: 20m (was: 10m)
> Service Discovery Support for CM UI, API
> ----------------------------------------
>
> Key: KNOX-2213
> URL: https://issues.apache.org/jira/browse/KNOX-2213
> Project: Apache Knox
> Issue Type: Sub-task
> Reporter: Sandeep More
> Assignee: Sandeep More
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Add Knox service discovery support for Cloudera Manager UI and API. The
> service discovery would be different than others given we need CM to discover
> other services. Here we need to look into the descriptor and fetch CM URL and
> lay down CM and CM API service in the topology.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)