Skip to content

Commit

Permalink
restapi: add iSCSI multipath status
Browse files Browse the repository at this point in the history
A new field has been added <active_paths> to the /ovirt-engine/api/hosts/xxxx/storage endpoint that represents the multipaths that are NOT faulty as an integer value.

Signed-off-by: Jasper Berton <jasper.berton@team.blue>
  • Loading branch information
JasperB-TeamBlue authored and dupondje committed Feb 28, 2025
1 parent 0d22370 commit 8d33abc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ public int getPathCount() {
return getPathsDictionary() == null ? 0 : getPathsDictionary().size();
}

public int getActivePathCount() {
return getPathsDictionary() == null ? 0 : (int) getPathsDictionary().values().stream().filter(o -> o).count();
}

public Map<String, Boolean> getPathsDictionary() {
return pathsDictionary;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public static LogicalUnit map(LUNs entity, LogicalUnit template) {
model.setTarget(lunConnection.getIqn());
}

model.setActivePaths(entity.getActivePathCount());
model.setPaths(entity.getPathCount());
return model;
}
Expand Down

0 comments on commit 8d33abc

Please sign in to comment.