cloudprovider

package
v0.0.0-...-24ed54c Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

cloudprovider is the abstraction layer for communicating with the IP management of the cloud OCP is running in.

Index

Constants

View Source
const (
	DefaultFailureRegion     = "Kunchom"
	DefaultMaxIPsPerInstance = 8
)

Variables

View Source
var (
	FailureRegion     string
	MaxIPsPerInstance int
)

Functions

This section is empty.

Types

type CloudProvider

type CloudProvider interface {
	// AddRandomIP adds a random IP to the specified host.
	// It will return the IP or the error.
	AddRandomIP(hostName string) (*net.IP, error)
	// AddSpecifiedIP adds a predefined IP to the specified host.
	// It will return an error or nil.
	AddSpecifiedIP(ip *net.IP, hostName string) error
	// CheckIP will check if the specified IP is assigned on the specified host.
	// it will return an error or nil.
	CheckIP(ip *net.IP, hostName string) error
	// MoveIP will move the specified IP from oldHost to newHost.
	// It will return an error or nil.
	MoveIP(ip *net.IP, oldHostName string, newHostName string) error
	// RemoveIP will remove the given IP from the specified host.
	// It will return an error or nil.
	RemoveIP(ip *net.IP, hostName string) error
}

func NewCloudProvider

func NewCloudProvider(cloudProviderType string, logger logr.Logger) (*CloudProvider, error)

NewCloudProvider initializes the cloudprovider configured for this system.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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