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