Documentation ¶
Index ¶
- Constants
- Variables
- func NeedRegistration(host *host.Host) (bool, error)
- func Register(name string, r *RegisteredRegistrator)
- func RegisterHostVM(host *host.Host, param *RegistrationParameters) (bool, error)
- func SetDetector(newDetector Detector)
- func UnregisterHostVM(host *host.Host, param *RegistrationParameters) (bool, error)
- type Detector
- type RedHatRegistrator
- type RegisteredRegistrator
- type RegistrationHostActionFunc
- type RegistrationParameters
- type Registrator
- type StandardRegistrator
Constants ¶
View Source
const (
RHSMName = " Red Hat Developers or Red Hat Subscription Management (RHSM)"
)
Variables ¶
View Source
var (
ErrDetectionFailed = errors.New("Distribution type not recognized to Registration")
)
Functions ¶
func NeedRegistration ¶ added in v1.2.0
Detect supported Registrator
func Register ¶
func Register(name string, r *RegisteredRegistrator)
func RegisterHostVM ¶
func RegisterHostVM(host *host.Host, param *RegistrationParameters) (bool, error)
Register host VM
func SetDetector ¶
func SetDetector(newDetector Detector)
func UnregisterHostVM ¶
func UnregisterHostVM(host *host.Host, param *RegistrationParameters) (bool, error)
Unregister host VM
Types ¶
type Detector ¶
type Detector interface {
DetectRegistrator(c provision.SSHCommander) (Registrator, bool, error)
}
type RedHatRegistrator ¶
type RedHatRegistrator struct {
provision.SSHCommander
}
func (*RedHatRegistrator) CompatibleWithDistribution ¶
func (registrator *RedHatRegistrator) CompatibleWithDistribution(osReleaseInfo *provision.OsRelease) bool
CompatibleWithDistribution returns true if system supports registration with RHSM
func (*RedHatRegistrator) Register ¶
func (registrator *RedHatRegistrator) Register(param *RegistrationParameters) error
Register attempts to register the system with RHSM
func (*RedHatRegistrator) Unregister ¶
func (registrator *RedHatRegistrator) Unregister(param *RegistrationParameters) error
Unregister attempts to unregister the system from RHSM
type RegisteredRegistrator ¶
type RegisteredRegistrator struct {
New func(c provision.SSHCommander) Registrator
}
RegisteredRegistrator creates a new registrator
type RegistrationHostActionFunc ¶ added in v1.4.0
type RegistrationHostActionFunc func(param *RegistrationParameters) error
type RegistrationParameters ¶
type Registrator ¶
type Registrator interface { provision.SSHCommander // Register Register(param *RegistrationParameters) error // Return the auth options used to configure remote connection for the daemon. Unregister(param *RegistrationParameters) error // Figure out whether this is a matching registrar CompatibleWithDistribution(osReleaseInfo *provision.OsRelease) bool }
Registration defines distribution specific actions
func DetectRegistrator ¶
func DetectRegistrator(c provision.SSHCommander) (Registrator, bool, error)
func NewRedHatRegistrator ¶
func NewRedHatRegistrator(c provision.SSHCommander) Registrator
type StandardRegistrator ¶
type StandardRegistrator struct{}
func (StandardRegistrator) DetectRegistrator ¶
func (detector StandardRegistrator) DetectRegistrator(c provision.SSHCommander) (Registrator, bool, error)
Click to show internal directories.
Click to hide internal directories.