Blame internal/osbuild/rhsm_stage.go
|
Packit Service |
bcdfb1 |
package osbuild
|
|
Packit Service |
bcdfb1 |
|
|
Packit Service |
bcdfb1 |
// RHSMStageOptions describes configuration of the RHSM stage.
|
|
Packit Service |
bcdfb1 |
//
|
|
Packit Service |
bcdfb1 |
// The RHSM stage allows configuration of Red Hat Subscription Manager (RHSM)
|
|
Packit Service |
bcdfb1 |
// related components. Currently it allows only configuration of the enablement
|
|
Packit Service |
bcdfb1 |
// state of DNF plugins used by the Subscription Manager.
|
|
Packit Service |
bcdfb1 |
type RHSMStageOptions struct {
|
|
Packit Service |
bcdfb1 |
DnfPlugins *RHSMStageOptionsDnfPlugins `json:"dnf-plugins,omitempty"`
|
|
Packit Service |
bcdfb1 |
}
|
|
Packit Service |
bcdfb1 |
|
|
Packit Service |
bcdfb1 |
func (RHSMStageOptions) isStageOptions() {}
|
|
Packit Service |
bcdfb1 |
|
|
Packit Service |
bcdfb1 |
// RHSMStageOptionsDnfPlugins describes configuration of all RHSM DNF plugins
|
|
Packit Service |
bcdfb1 |
type RHSMStageOptionsDnfPlugins struct {
|
|
Packit Service |
bcdfb1 |
ProductID *RHSMStageOptionsDnfPlugin `json:"product-id,omitempty"`
|
|
Packit Service |
bcdfb1 |
SubscriptionManager *RHSMStageOptionsDnfPlugin `json:"subscription-manager,omitempty"`
|
|
Packit Service |
bcdfb1 |
}
|
|
Packit Service |
bcdfb1 |
|
|
Packit Service |
bcdfb1 |
// RHSMStageOptionsDnfPlugin describes configuration of a specific RHSM DNF
|
|
Packit Service |
bcdfb1 |
// plugin
|
|
Packit Service |
bcdfb1 |
//
|
|
Packit Service |
bcdfb1 |
// Only the enablement state of a DNF plugin can be currenlty set.
|
|
Packit Service |
bcdfb1 |
type RHSMStageOptionsDnfPlugin struct {
|
|
Packit Service |
bcdfb1 |
Enabled bool `json:"enabled"`
|
|
Packit Service |
bcdfb1 |
}
|
|
Packit Service |
bcdfb1 |
|
|
Packit Service |
bcdfb1 |
// NewRHSMStage creates a new RHSM stage
|
|
Packit Service |
bcdfb1 |
func NewRHSMStage(options *RHSMStageOptions) *Stage {
|
|
Packit Service |
bcdfb1 |
return &Stage{
|
|
Packit Service |
bcdfb1 |
Name: "org.osbuild.rhsm",
|
|
Packit Service |
bcdfb1 |
Options: options,
|
|
Packit Service |
bcdfb1 |
}
|
|
Packit Service |
bcdfb1 |
}
|