From cb5b281d03b24c75f72f4710117151aa4229c498 Mon Sep 17 00:00:00 2001 From: Cyrus <24922493+cyrus-dev@users.noreply.github.com> Date: Thu, 21 Sep 2023 16:25:01 -0400 Subject: [PATCH] Missed updated constructor for Device --- .../persist/entity/userdefined/Device.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/userdefined/Device.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/userdefined/Device.java index b01c0bbb..118cd3d7 100644 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/userdefined/Device.java +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/userdefined/Device.java @@ -58,6 +58,16 @@ public class Device extends AbstractEntity { @Column(name = "summary_id") private String summaryId; + public Device(final DeviceInfoReport deviceInfoReport) { + super(); + if (deviceInfoReport != null) { + this.name = deviceInfoReport.getNetworkInfo().getHostname(); + this.deviceInfo = deviceInfoReport; + } else { + name = ""; + } + } + public String toString() { return String.format("Device Name: %s%nStatus: %s%nSummary: %s", name, healthStatus.getStatus(),