From 42430c8d254c9600651c327938384c30884af15e Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Mon, 20 May 2024 15:56:17 -0500 Subject: [PATCH] Make Attribute UpperBound a big.Int Some Dell systems have been found to return an UpperBound value that overflows an int64, causing unmarshalling errors. This makes the upper bould a big.Int to accomodate really large values. Signed-off-by: Sean McGinnis --- redfish/attributeregistry.go | 3 ++- .../{attrubuteregistry_test.go => attributeregistry_test.go} | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename redfish/{attrubuteregistry_test.go => attributeregistry_test.go} (100%) diff --git a/redfish/attributeregistry.go b/redfish/attributeregistry.go index 6e2e4f88..bd2db796 100644 --- a/redfish/attributeregistry.go +++ b/redfish/attributeregistry.go @@ -6,6 +6,7 @@ package redfish import ( "encoding/json" + "math/big" "github.com/stmcginnis/gofish/common" ) @@ -86,7 +87,7 @@ type Attribute struct { // The UEFI namespace ID for the attribute. UefiNamespaceID string `json:"UefiNamespaceId"` // The upper limit for an integer attribute. - UpperBound int64 + UpperBound big.Int // An array of the possible values for enumerated attribute values. Value []AttributeValue // A valid regular expression, according to the Perl regular expression dialect, diff --git a/redfish/attrubuteregistry_test.go b/redfish/attributeregistry_test.go similarity index 100% rename from redfish/attrubuteregistry_test.go rename to redfish/attributeregistry_test.go