@Test public void testDecoratePillarWithClouderaManagerRepoWithNoJsonLicense() throws IOException, CloudbreakOrchestratorFailedException { String license = FileReaderUtils.readFileFromClasspath("cm-license-nojson.txt"); ClouderaManagerRepo clouderaManagerRepo = new ClouderaManagerRepo(); clouderaManagerRepo.setVersion("7.2.0"); clouderaManagerRepo.setBaseUrl("https: Map<String, SaltPillarProperties> pillar = new HashMap<>(); underTest.decoratePillarWithClouderaManagerRepo(clouderaManagerRepo, pillar, Optional.of(license)); SaltPillarProperties resultPillar = pillar.get("cloudera-manager-repo"); Map<String, Object> properties = resultPillar.getProperties(); Map<String, Object> values = (Map<String, Object>) properties.get("cloudera-manager"); assertEquals("7.2.0", ((ClouderaManagerRepo) values.get("repo")).getVersion()); assertEquals("https: assertNull(values.get("paywall_username")); assertNull(values.get("paywall_password")); }
public void decoratePillarWithClouderaManagerRepo(ClouderaManagerRepo repo, Map<String, SaltPillarProperties> servicePillar, Optional<String> license) { servicePillar.put("cloudera-manager-repo", new SaltPillarProperties("/cloudera-manager/repo.sls", singletonMap("cloudera-manager", createCMRepoPillar(repo, license)))); }
ClusterHostServiceRunner { public void decoratePillarWithClouderaManagerRepo(ClouderaManagerRepo repo, Map<String, SaltPillarProperties> servicePillar, Optional<String> license) { servicePillar.put("cloudera-manager-repo", new SaltPillarProperties("/cloudera-manager/repo.sls", singletonMap("cloudera-manager", createCMRepoPillar(repo, license)))); } }
ClusterHostServiceRunner { public void decoratePillarWithClouderaManagerRepo(ClouderaManagerRepo repo, Map<String, SaltPillarProperties> servicePillar, Optional<String> license) { servicePillar.put("cloudera-manager-repo", new SaltPillarProperties("/cloudera-manager/repo.sls", singletonMap("cloudera-manager", createCMRepoPillar(repo, license)))); }  }
ClusterHostServiceRunner { public void decoratePillarWithClouderaManagerRepo(ClouderaManagerRepo repo, Map<String, SaltPillarProperties> servicePillar, Optional<String> license) { servicePillar.put("cloudera-manager-repo", new SaltPillarProperties("/cloudera-manager/repo.sls", singletonMap("cloudera-manager", createCMRepoPillar(repo, license)))); }  void runClusterServices(@Nonnull Stack stack, @Nonnull Cluster cluster, List<String> candidateAddresses); void updateClusterConfigs(@Nonnull Stack stack, @Nonnull Cluster cluster, List<String> candidateAddresses); Map<String, String> addClusterServices(Long stackId, String hostGroupName, Integer scalingAdjustment); String changePrimaryGateway(Stack stack); void redeployGatewayCertificate(@Nonnull Stack stack, @Nonnull Cluster cluster); Optional<String> decoratePillarWithClouderaManagerLicense(Long stackId, Map<String, SaltPillarProperties> servicePillar); void decoratePillarWithClouderaManagerRepo(ClouderaManagerRepo repo, Map<String, SaltPillarProperties> servicePillar, Optional<String> license); void decoratePillarWithClouderaManagerSettings(Map<String, SaltPillarProperties> servicePillar, ClouderaManagerRepo clouderaManagerRepo); }
ClusterHostServiceRunner { public void decoratePillarWithClouderaManagerRepo(ClouderaManagerRepo repo, Map<String, SaltPillarProperties> servicePillar, Optional<String> license) { servicePillar.put("cloudera-manager-repo", new SaltPillarProperties("/cloudera-manager/repo.sls", singletonMap("cloudera-manager", createCMRepoPillar(repo, license)))); }  void runClusterServices(@Nonnull Stack stack, @Nonnull Cluster cluster, List<String> candidateAddresses); void updateClusterConfigs(@Nonnull Stack stack, @Nonnull Cluster cluster, List<String> candidateAddresses); Map<String, String> addClusterServices(Long stackId, String hostGroupName, Integer scalingAdjustment); String changePrimaryGateway(Stack stack); void redeployGatewayCertificate(@Nonnull Stack stack, @Nonnull Cluster cluster); Optional<String> decoratePillarWithClouderaManagerLicense(Long stackId, Map<String, SaltPillarProperties> servicePillar); void decoratePillarWithClouderaManagerRepo(ClouderaManagerRepo repo, Map<String, SaltPillarProperties> servicePillar, Optional<String> license); void decoratePillarWithClouderaManagerSettings(Map<String, SaltPillarProperties> servicePillar, ClouderaManagerRepo clouderaManagerRepo);  }