From 8fa3a9256e37430f8ae76e300d471bd951d7fc59 Mon Sep 17 00:00:00 2001 From: Keiko Oda Date: Tue, 28 Nov 2023 16:56:51 +0900 Subject: [PATCH] Update transform to pass Crunchy Bridge system info --- output/transform/system.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/output/transform/system.go b/output/transform/system.go index ca1e7a3a5..b55a860d7 100644 --- a/output/transform/system.go +++ b/output/transform/system.go @@ -97,7 +97,19 @@ func transformSystem(systemState state.SystemState, diffState state.DiffState) * } else if systemState.Info.Type == state.CrunchyBridgeSystem { system.SystemInformation.Type = snapshot.SystemInformation_CRUNCHY_BRIDGE_SYSTEM if systemState.Info.CrunchyBridge != nil { - // TODO have a special info for Crunchy Bridge (require snapshot update) + createdAt := timestamppb.New(systemState.Info.CrunchyBridge.CreatedAt) + system.SystemInformation.Info = &snapshot.SystemInformation_CrunchyBridge{ + CrunchyBridge: &snapshot.SystemInformationCrunchyBridge{ + ClusterName: systemState.Info.CrunchyBridge.ClusterName, + CreatedAt: createdAt, + PlanId: systemState.Info.CrunchyBridge.PlanID, + ProviderId: systemState.Info.CrunchyBridge.ProviderID, + RegionId: systemState.Info.CrunchyBridge.RegionID, + CpuUnits: systemState.Info.CrunchyBridge.CPUUnits, + StorageGb: systemState.Info.CrunchyBridge.StorageGB, + MemoryGb: float64(systemState.Info.CrunchyBridge.MemoryGB), + }, + } } } else if systemState.Info.Type == state.AivenSystem { system.SystemInformation.Type = snapshot.SystemInformation_AIVEN_SYSTEM