From 587753834e1bd22965c234cbc750fcaf1b28d009 Mon Sep 17 00:00:00 2001 From: Pengpeng Wang Date: Fri, 10 Jul 2020 15:07:02 +0800 Subject: [PATCH] Count number of chassis Signed-off-by: Pengpeng Wang --- .../java/com/vmware/flowgate/service/SummaryService.java | 6 ++++++ .../com/vmware/flowgate/common/model/NlyteSummary.java | 9 +++++++++ .../com/vmware/flowgate/common/model/SystemSummary.java | 9 +++++++++ 3 files changed, 24 insertions(+) diff --git a/flowgate-api/src/main/java/com/vmware/flowgate/service/SummaryService.java b/flowgate-api/src/main/java/com/vmware/flowgate/service/SummaryService.java index 13645328e..21e580643 100644 --- a/flowgate-api/src/main/java/com/vmware/flowgate/service/SummaryService.java +++ b/flowgate-api/src/main/java/com/vmware/flowgate/service/SummaryService.java @@ -176,6 +176,9 @@ public NlyteSummary getNlyteSummary(FacilitySoftwareConfig nlyte) { case "Networks": nlyteSummary.setSwitchNum((Integer)map.get("count")); break; + case "Chassis": + nlyteSummary.setChassisNum((Integer)map.get("count")); + break; default: break; } @@ -207,6 +210,9 @@ public SystemSummary getAssetNumGroupByCategory(SystemSummary data) { case "Networks": data.setSwitchNum((Integer)map.get("count")); break; + case "Chassis": + data.setChassisNum((Integer)map.get("count")); + break; default: break; } diff --git a/flowgate-common/src/main/java/com/vmware/flowgate/common/model/NlyteSummary.java b/flowgate-common/src/main/java/com/vmware/flowgate/common/model/NlyteSummary.java index 309dead80..c08182efd 100644 --- a/flowgate-common/src/main/java/com/vmware/flowgate/common/model/NlyteSummary.java +++ b/flowgate-common/src/main/java/com/vmware/flowgate/common/model/NlyteSummary.java @@ -12,6 +12,7 @@ public class NlyteSummary { private int cabinetNum = 0; private int switchNum = 0; private int sensorNum = 0; + private int chassisNum; public String getName() { return name; @@ -69,4 +70,12 @@ public void setSensorNum(int sensorNum) { this.sensorNum = sensorNum; } + public int getChassisNum() { + return chassisNum; + } + + public void setChassisNum(int chassisNum) { + this.chassisNum = chassisNum; + } + } diff --git a/flowgate-common/src/main/java/com/vmware/flowgate/common/model/SystemSummary.java b/flowgate-common/src/main/java/com/vmware/flowgate/common/model/SystemSummary.java index 285621377..5039df79a 100644 --- a/flowgate-common/src/main/java/com/vmware/flowgate/common/model/SystemSummary.java +++ b/flowgate-common/src/main/java/com/vmware/flowgate/common/model/SystemSummary.java @@ -18,6 +18,7 @@ public class SystemSummary implements Serializable { private int cabinetNum = 0; private int switchNum = 0; private int sensorNum = 0; + private int chassisNum; private int humiditySensorNum = 0; private int temperatureSensorNum = 0; @@ -203,5 +204,13 @@ public void setVroSummary(List vroSummary) { this.vroSummary = vroSummary; } + public int getChassisNum() { + return chassisNum; + } + + public void setChassisNum(int chassisNum) { + this.chassisNum = chassisNum; + } + }