Documentation ¶
Overview ¶
Package summary provides the entrypoint to process the results of the provider and baseline validations, applying filters and transformations to the data.
Index ¶
- Constants
- type ConsolidatedSummary
- type ConsolidatedSummaryInput
- type Node
- type OpenShiftSummary
- func (os *OpenShiftSummary) GetClusterNetwork() (*SummaryOpenShiftClusterNetworkV1, error)
- func (os *OpenShiftSummary) GetClusterOperator() (*SummaryClusterOperatorOutput, error)
- func (os *OpenShiftSummary) GetClusterVersion() (*SummaryClusterVersionOutput, error)
- func (os *OpenShiftSummary) GetClusterVersionXY() (string, error)
- func (os *OpenShiftSummary) GetInfrastructure() (*SummaryOpenShiftInfrastructureV1, error)
- func (os *OpenShiftSummary) GetInfrastructurePlatformType() string
- func (os *OpenShiftSummary) GetNodes() []*Node
- func (os *OpenShiftSummary) GetResultArtifactsCollector() *plugin.OPCTPluginSummary
- func (os *OpenShiftSummary) GetResultConformanceReplay() *plugin.OPCTPluginSummary
- func (os *OpenShiftSummary) GetResultConformanceUpgrade() *plugin.OPCTPluginSummary
- func (os *OpenShiftSummary) GetResultK8SValidated() *plugin.OPCTPluginSummary
- func (os *OpenShiftSummary) GetResultOCPValidated() *plugin.OPCTPluginSummary
- func (os *OpenShiftSummary) SetClusterNetwork(cn *configv1.NetworkList) error
- func (os *OpenShiftSummary) SetClusterOperators(cr *configv1.ClusterOperatorList) error
- func (os *OpenShiftSummary) SetClusterVersion(cr *configv1.ClusterVersionList) error
- func (os *OpenShiftSummary) SetInfrastructure(cr *configv1.InfrastructureList) error
- func (os *OpenShiftSummary) SetNodes(nodes *v1.NodeList) error
- func (os *OpenShiftSummary) SetPluginResult(in *plugin.OPCTPluginSummary) error
- type OpenshiftTestsSuite
- type OpenshiftTestsSuites
- type ResultSummary
- func (rs *ResultSummary) GetOpenShift() *OpenShiftSummary
- func (rs *ResultSummary) GetSonobuoy() *SonobuoySummary
- func (rs *ResultSummary) GetSonobuoyCluster() *discovery.ClusterSummary
- func (rs *ResultSummary) GetSuites() *OpenshiftTestsSuites
- func (rs *ResultSummary) HasValidResults() bool
- func (rs *ResultSummary) Populate() error
- type SonobuoyPluginDefinition
- type SonobuoyPluginDefinitionManifest
- type SonobuoySummary
- func (s *SonobuoySummary) ParseMetaConfig(metaConfig *archive.MetaConfigSonobuoy)
- func (s *SonobuoySummary) ParseMetaRunlogs(logLines *bytes.Buffer)
- func (s *SonobuoySummary) ParseOpctConfigMap(cm *v1.ConfigMapList)
- func (s *SonobuoySummary) SetCluster(c *discovery.ClusterSummary) error
- func (s *SonobuoySummary) SetPluginDefinition(name string, def *SonobuoyPluginDefinition)
- func (s *SonobuoySummary) SetPluginsDefinition(p map[string]*SonobuoyPluginDefinition) error
- type SummaryClusterOperatorOutput
- type SummaryClusterVersionOutput
- type SummaryOpenShiftClusterNetworkV1
- type SummaryOpenShiftInfrastructureV1
- type SummaryOpenShiftNetworkV1
Constants ¶
const ( ResultSourceNameProvider = "provider" ResultSourceNameBaseline = "baseline" )
const ( SuiteNameKubernetesConformance = "kubernetes/conformance" SuiteNameOpenshiftConformance = "openshift/conformance" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsolidatedSummary ¶
type ConsolidatedSummary struct { Verbose bool Timers *metrics.Timers Provider *ResultSummary Baseline *ResultSummary BaselineAPI *baseline.BaselineConfig }
ConsolidatedSummary Aggregate the results of provider and baseline
func NewConsolidatedSummary ¶
func NewConsolidatedSummary(in *ConsolidatedSummaryInput) *ConsolidatedSummary
func (*ConsolidatedSummary) GetBaseline ¶
func (cs *ConsolidatedSummary) GetBaseline() *ResultSummary
GetBaseline get the baseline results.
func (*ConsolidatedSummary) GetProvider ¶
func (cs *ConsolidatedSummary) GetProvider() *ResultSummary
GetProvider get the provider results.
func (*ConsolidatedSummary) HasBaselineResults ¶
func (cs *ConsolidatedSummary) HasBaselineResults() bool
HasBaselineResults checks if the baseline results was set (--dif), and has valid data.
func (*ConsolidatedSummary) Process ¶
func (cs *ConsolidatedSummary) Process() error
Process entrypoint to read and fill all summaries for each archive, plugin and suites applying any transformation it needs through filters.
func (*ConsolidatedSummary) SaveResults ¶
func (cs *ConsolidatedSummary) SaveResults(path string) error
SaveResults dump all the results and processed to the disk to be used on the review process.
type Node ¶
type Node struct { Hostname string `json:"hostname,omitempty"` Architecture string `json:"architecture,omitempty"` OperatingSystem string `json:"os,omitempty"` OperatingSystemId string `json:"osId,omitempty"` CreationDate string `json:"creationDate,omitempty"` NodeRoles string `json:"nodeRoles,omitempty"` TaintsNodeRole string `json:"taints,omitempty"` CapacityCPU string `json:"capacityCpu,omitempty"` CapacityStorageGB string `json:"capacityStorageGB,omitempty"` CapacityMemGB string `json:"capacityMemGB,omitempty"` Labels map[string]string `json:"labels,omitempty"` ControlPlane bool `json:"controlPlane,omitempty"` }
type OpenShiftSummary ¶
type OpenShiftSummary struct { Infrastructure *configv1.Infrastructure ClusterVersion *configv1.ClusterVersion ClusterOperators *configv1.ClusterOperatorList ClusterNetwork *configv1.Network Nodes []*Node // Plugin Results PluginResultK8sConformance *plugin.OPCTPluginSummary PluginResultOCPValidated *plugin.OPCTPluginSummary PluginResultConformanceUpgrade *plugin.OPCTPluginSummary PluginResultArtifactsCollector *plugin.OPCTPluginSummary PluginResultConformanceReplay *plugin.OPCTPluginSummary // get from Sonobuoy metadata VersionK8S string }
OpenShiftSummary holds the data collected from artifacts related to OpenShift objects.
func NewOpenShiftSummary ¶
func NewOpenShiftSummary() *OpenShiftSummary
func (*OpenShiftSummary) GetClusterNetwork ¶
func (os *OpenShiftSummary) GetClusterNetwork() (*SummaryOpenShiftClusterNetworkV1, error)
func (*OpenShiftSummary) GetClusterOperator ¶
func (os *OpenShiftSummary) GetClusterOperator() (*SummaryClusterOperatorOutput, error)
func (*OpenShiftSummary) GetClusterVersion ¶
func (os *OpenShiftSummary) GetClusterVersion() (*SummaryClusterVersionOutput, error)
func (*OpenShiftSummary) GetClusterVersionXY ¶
func (os *OpenShiftSummary) GetClusterVersionXY() (string, error)
func (*OpenShiftSummary) GetInfrastructure ¶
func (os *OpenShiftSummary) GetInfrastructure() (*SummaryOpenShiftInfrastructureV1, error)
func (*OpenShiftSummary) GetInfrastructurePlatformType ¶
func (os *OpenShiftSummary) GetInfrastructurePlatformType() string
func (*OpenShiftSummary) GetNodes ¶
func (os *OpenShiftSummary) GetNodes() []*Node
func (*OpenShiftSummary) GetResultArtifactsCollector ¶
func (os *OpenShiftSummary) GetResultArtifactsCollector() *plugin.OPCTPluginSummary
func (*OpenShiftSummary) GetResultConformanceReplay ¶
func (os *OpenShiftSummary) GetResultConformanceReplay() *plugin.OPCTPluginSummary
func (*OpenShiftSummary) GetResultConformanceUpgrade ¶
func (os *OpenShiftSummary) GetResultConformanceUpgrade() *plugin.OPCTPluginSummary
func (*OpenShiftSummary) GetResultK8SValidated ¶
func (os *OpenShiftSummary) GetResultK8SValidated() *plugin.OPCTPluginSummary
func (*OpenShiftSummary) GetResultOCPValidated ¶
func (os *OpenShiftSummary) GetResultOCPValidated() *plugin.OPCTPluginSummary
func (*OpenShiftSummary) SetClusterNetwork ¶
func (os *OpenShiftSummary) SetClusterNetwork(cn *configv1.NetworkList) error
func (*OpenShiftSummary) SetClusterOperators ¶
func (os *OpenShiftSummary) SetClusterOperators(cr *configv1.ClusterOperatorList) error
func (*OpenShiftSummary) SetClusterVersion ¶
func (os *OpenShiftSummary) SetClusterVersion(cr *configv1.ClusterVersionList) error
func (*OpenShiftSummary) SetInfrastructure ¶
func (os *OpenShiftSummary) SetInfrastructure(cr *configv1.InfrastructureList) error
func (*OpenShiftSummary) SetPluginResult ¶
func (os *OpenShiftSummary) SetPluginResult(in *plugin.OPCTPluginSummary) error
type OpenshiftTestsSuite ¶
type OpenshiftTestsSuites ¶
type OpenshiftTestsSuites struct { KubernetesConformance *OpenshiftTestsSuite OpenshiftConformance *OpenshiftTestsSuite }
func (*OpenshiftTestsSuites) GetTotalK8S ¶
func (ts *OpenshiftTestsSuites) GetTotalK8S() int
func (*OpenshiftTestsSuites) GetTotalOCP ¶
func (ts *OpenshiftTestsSuites) GetTotalOCP() int
type ResultSummary ¶
type ResultSummary struct { Name string Archive string Sonobuoy *SonobuoySummary OpenShift *OpenShiftSummary Suites *OpenshiftTestsSuites // SavePath is the target path to save the extracted report. SavePath string // MustGather stores the extracted items from must-gather. MustGather *mustgather.MustGather HasCAMGI bool HasMetrics bool HasInstallConfig bool // Metrics stores the extracted items from must-gather metrics. Metrics *mustgathermetrics.MustGatherMetrics // Plugin Know failures TestSuiteKnownFailures []string // BaselineAPI holds the data fetched from the baseline API. BaselineAPI string // contains filtered or unexported fields }
ResultSummary persists the reference of results archive.
func (*ResultSummary) GetOpenShift ¶
func (rs *ResultSummary) GetOpenShift() *OpenShiftSummary
GetOpenShift returns the OpenShift objects parsed from results
func (*ResultSummary) GetSonobuoy ¶
func (rs *ResultSummary) GetSonobuoy() *SonobuoySummary
GetSonobuoy returns the Sonobuoy objects parsed from results
func (*ResultSummary) GetSonobuoyCluster ¶
func (rs *ResultSummary) GetSonobuoyCluster() *discovery.ClusterSummary
GetSonobuoyCluster returns the SonobuoyCluster object parsed from results
func (*ResultSummary) GetSuites ¶
func (rs *ResultSummary) GetSuites() *OpenshiftTestsSuites
GetSuites returns the Conformance suites collected from results
func (*ResultSummary) HasValidResults ¶
func (rs *ResultSummary) HasValidResults() bool
HasValidResults checks if the result instance has valid archive to be processed, returning true if it's valid. Invalid results happens when the baseline archive was not set on the CLI arguments, making the 'process' command to ignore the comparisons and filters related.
func (*ResultSummary) Populate ¶
func (rs *ResultSummary) Populate() error
Populate open the archive and process the files to populate the summary structures.
type SonobuoyPluginDefinition ¶
type SonobuoyPluginDefinition struct { Definition *SonobuoyPluginDefinitionManifest `json:"Definition"` SonobuoyImage string `json:"SonobuoyImage"` }
Plugin is the sonobuoy plugin definitoin.
type SonobuoySummary ¶
type SonobuoySummary struct { Cluster *discovery.ClusterSummary MetaRuntime []*archive.RuntimeInfoItem MetaConfig []*archive.RuntimeInfoItem OpctConfig []*archive.RuntimeInfoItem PluginsDefinition map[string]*SonobuoyPluginDefinition }
func NewSonobuoySummary ¶
func NewSonobuoySummary() *SonobuoySummary
func (*SonobuoySummary) ParseMetaConfig ¶
func (s *SonobuoySummary) ParseMetaConfig(metaConfig *archive.MetaConfigSonobuoy)
func (*SonobuoySummary) ParseMetaRunlogs ¶
func (s *SonobuoySummary) ParseMetaRunlogs(logLines *bytes.Buffer)
func (*SonobuoySummary) ParseOpctConfigMap ¶
func (s *SonobuoySummary) ParseOpctConfigMap(cm *v1.ConfigMapList)
func (*SonobuoySummary) SetCluster ¶
func (s *SonobuoySummary) SetCluster(c *discovery.ClusterSummary) error
func (*SonobuoySummary) SetPluginDefinition ¶
func (s *SonobuoySummary) SetPluginDefinition(name string, def *SonobuoyPluginDefinition)
func (*SonobuoySummary) SetPluginsDefinition ¶
func (s *SonobuoySummary) SetPluginsDefinition(p map[string]*SonobuoyPluginDefinition) error
type SummaryClusterVersionOutput ¶
type SummaryClusterVersionOutput struct { Desired string `json:"desired"` Previous string `json:"previous"` Channel string `json:"channel"` ClusterID string `json:"clusterID"` OverallStatus string `json:"overallStatus"` OverallStatusReason string `json:"overallStatusReason,omitempty"` OverallStatusMessage string `json:"overallStatusMessage,omitempty"` CondAvailable string `json:"conditionAvailable,omitempty"` CondFailing string `json:"conditionFailing,omitempty"` CondProgressing string `json:"conditionProgressing,omitempty"` CondProgressingMessage string `json:"conditionProgressingMessage,omitempty"` CondRetrievedUpdates string `json:"conditionUpdates,omitempty"` CondImplicitlyEnabledCapabilities string `json:"conditionImplicitlyEnabledCapabilities,omitempty"` CondReleaseAccepted string `json:"conditionReleaseAccepted,omitempty"` }
type SummaryOpenShiftInfrastructureV1 ¶
type SummaryOpenShiftInfrastructureV1 = configv1.Infrastructure