Skip to content

Commit

Permalink
Update transform to pass Crunchy Bridge system info
Browse files Browse the repository at this point in the history
  • Loading branch information
keiko713 committed Nov 28, 2023
1 parent 2aad31c commit 8fa3a92
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion output/transform/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8fa3a92

Please sign in to comment.