Skip to content

Commit

Permalink
Make sonarcloud happy
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Arlt <[email protected]>
  • Loading branch information
parlt91 committed Feb 27, 2025
1 parent f8171c4 commit cc68d3c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
8 changes: 3 additions & 5 deletions java/code/src/com/redhat/rhn/domain/org/Org.java
Original file line number Diff line number Diff line change
Expand Up @@ -506,11 +506,9 @@ public Set<Entitlement> getValidAddOnEntitlementsForOrg() {
if (!sgt.isBase()) {
Entitlement ent = EntitlementManager.getByName(sgt.getLabel());
if (ent != null) {
if (EntitlementManager.OSIMAGE_BUILD_HOST_ENTITLED.equals(ent.getLabel()) &&
!Config.get().getBoolean(ConfigDefaults.KIWI_OS_IMAGE_BUILDING_ENABLED)) {
continue;
}
else if (EntitlementManager.ANSIBLE_MANAGED_ENTITLED.equals(ent.getLabel())) {
if ((EntitlementManager.OSIMAGE_BUILD_HOST_ENTITLED.equals(ent.getLabel()) &&
!Config.get().getBoolean(ConfigDefaults.KIWI_OS_IMAGE_BUILDING_ENABLED)) ||
EntitlementManager.ANSIBLE_MANAGED_ENTITLED.equals(ent.getLabel())) {
continue;
}
addonEntitlements.add(ent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,7 @@ public static List<Map<String, Object>> generateBeacon(MinionServer minion) {

if (!inventories.isEmpty()) {
Map<String, Object> files = new HashMap<>();
inventories.forEach(i -> {
files.put(i.getPath().toString(), Map.of("mask", List.of("modify")));
});
inventories.forEach(i -> files.put(i.getPath().toString(), Map.of("mask", List.of("modify"))));
beacon.add(Map.of("files", files));
beacon.add(Map.of("interval", 5));
beacon.add(Map.of("disable_during_state_run", true));
Expand Down Expand Up @@ -582,13 +580,13 @@ public void createDefaultPaths(MinionServer minionServer) {
createAnsiblePath(AnsiblePath.Type.INVENTORY.getLabel(), minionServer, inventory);
}
catch (ValidatorException e) {
log.info("Inventory path: '" + inventory + "' already exists. Skipping...");
log.info(String.format("Inventory path: '%s' already exists. Skipping...", inventory));
}
try {
createAnsiblePath(AnsiblePath.Type.PLAYBOOK.getLabel(), minionServer, playbook);
}
catch (ValidatorException e) {
log.info("Playbook path: '" + playbook + "' already exists. Skipping...");
log.info(String.format("Playbook path: '%s' already exists. Skipping...", playbook));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1753,7 +1753,7 @@ private LocalCall<?> executeInventoryActionCall(InventoryAction action) {
InventoryActionDetails details = action.getDetails();
String inventoryPath = details.getInventoryPath();

return new LocalCall<>("ansible.targets", empty(), of(Map.of("inventory", inventoryPath)),
return new LocalCall<>(ANSIBLE_INVENTORIES, empty(), of(Map.of("inventory", inventoryPath)),
new TypeToken<>() { });
}

Expand Down

0 comments on commit cc68d3c

Please sign in to comment.