registration

package
v1.0.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDetectionFailed = errors.New("Distribution type not recognized to Registration")
)

Functions

func Register

func Register(name string, r *RegisteredRegistrator)

func RegisterHostVM

func RegisterHostVM(host *host.Host, param *RegistrationParameters) error

Register host VM

func SetDetector

func SetDetector(newDetector Detector)

func UnregisterHostVM

func UnregisterHostVM(host *host.Host, param *RegistrationParameters) 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

func (*RedHatRegistrator) Register

func (registrator *RedHatRegistrator) Register(param *RegistrationParameters) error

func (*RedHatRegistrator) Unregister

func (registrator *RedHatRegistrator) Unregister(param *RegistrationParameters) error

type RegisteredRegistrator

type RegisteredRegistrator struct {
	New func(c provision.SSHCommander) Registrator
}

RegisteredRegistrator creates a new registrator

type RegistrationParameters

type RegistrationParameters struct {
	Username string
	Password string
}

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL