use of com.sequenceiq.cloudbreak.telemetry.nodestatus.NodeStatusConfigView in project cloudbreak by hortonworks.
the class TelemetryDecorator method setupNodeStatusMonitor.
private void setupNodeStatusMonitor(Map<String, SaltPillarProperties> servicePillar, Stack stack) {
char[] passwordInput = null;
if (StringUtils.isNotBlank(stack.getCluster().getCdpNodeStatusMonitorPassword())) {
passwordInput = stack.getCluster().getCdpNodeStatusMonitorPassword().toCharArray();
}
String accountId = Crn.safeFromString(stack.getResourceCrn()).getAccountId();
boolean saltPingEnabled = entitlementService.nodestatusSaltPingEnabled(accountId);
NodeStatusConfigView nodeStatusConfigView = nodeStatusConfigService.createNodeStatusConfig(stack.getCluster().getCdpNodeStatusMonitorUser(), passwordInput, saltPingEnabled);
Map<String, Object> nodeStatusConfig = nodeStatusConfigView.toMap();
servicePillar.put("nodestatus", new SaltPillarProperties("/nodestatus/init.sls", singletonMap("nodestatus", nodeStatusConfig)));
}
Aggregations