Skip to content

Commit 8d33abc

Browse files
JasperB-TeamBluedupondje
authored andcommitted
restapi: add iSCSI multipath status
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 <[email protected]>
1 parent 0d22370 commit 8d33abc

File tree

2 files changed

+5
-0
lines changed
  • backend/manager/modules

2 files changed

+5
-0
lines changed

Diff for: backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/LUNs.java

+4
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,10 @@ public int getPathCount() {
269269
return getPathsDictionary() == null ? 0 : getPathsDictionary().size();
270270
}
271271

272+
public int getActivePathCount() {
273+
return getPathsDictionary() == null ? 0 : (int) getPathsDictionary().values().stream().filter(o -> o).count();
274+
}
275+
272276
public Map<String, Boolean> getPathsDictionary() {
273277
return pathsDictionary;
274278
}

Diff for: backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/StorageLogicalUnitMapper.java

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public static LogicalUnit map(LUNs entity, LogicalUnit template) {
5858
model.setTarget(lunConnection.getIqn());
5959
}
6060

61+
model.setActivePaths(entity.getActivePathCount());
6162
model.setPaths(entity.getPathCount());
6263
return model;
6364
}

0 commit comments

Comments
 (0)