Documentation ¶
Index ¶
- func AddAnnotation(baremetalId string, namespace string, poolId string, serverId string, ...) error
- func BaremetalFound(name string) bool
- func CreateNewBaremetal(bm Baremetal)
- func CreateNewPool(pool Pool)
- func CreateNewServer(poolId string, serverId string, baremetalName string, schema string)
- func DeleteBaremetal(name string)
- func DeletePool(poolId string, logger logr.Logger)
- func DeleteServer(serverId string, poolId string)
- func GetBrokerClient(kubeconfig *rest.Config) (*rest.RESTClient, error)
- func GetK8SClient(kubeconfig *rest.Config) (*kubernetes.Clientset, error)
- func HandleBrokerApiRequests(setupLog logr.Logger)
- func InitBrokerData(setupLog logr.Logger) error
- func IsBrokerDataEmpty() bool
- func PoolFound(name string) bool
- func ServerFound(name string, poolid string) bool
- func UpdateBaremetal(bm Baremetal)
- func UpdatePoolValues(name string, poolValues Pool)
- func ValidateBaremetalDataRequest(baremetalValues Baremetal) error
- func ValidatePoolDataRequest(poolValues Pool) error
- func ValidateServerDataRequest(serverValues ServerRequest) error
- func VerifyPoolAuthent(username string, password string) bool
- type AuthRequest
- type Baremetal
- type BrokerData
- type ErrorResponse
- type PatchSpec
- type Pool
- type PoolResponse
- type ServerData
- type ServerRequest
- type ServerResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAnnotation ¶
func BaremetalFound ¶
func CreateNewBaremetal ¶
func CreateNewBaremetal(bm Baremetal)
func CreateNewPool ¶
func CreateNewPool(pool Pool)
func CreateNewServer ¶
func DeleteBaremetal ¶
func DeleteBaremetal(name string)
func DeletePool ¶
func DeleteServer ¶
func GetBrokerClient ¶
func GetBrokerClient( kubeconfig *rest.Config, ) (*rest.RESTClient, error)
func GetK8SClient ¶
func GetK8SClient(kubeconfig *rest.Config) (*kubernetes.Clientset, error)
func HandleBrokerApiRequests ¶
func InitBrokerData ¶
func IsBrokerDataEmpty ¶
func IsBrokerDataEmpty() bool
func ServerFound ¶
func UpdateBaremetal ¶
func UpdateBaremetal(bm Baremetal)
func UpdatePoolValues ¶
func ValidatePoolDataRequest ¶
func ValidateServerDataRequest ¶
func ValidateServerDataRequest(serverValues ServerRequest) error
func VerifyPoolAuthent ¶
//////////////////////////////////////////////////////////////
Types ¶
type AuthRequest ¶
type Baremetal ¶
type Baremetal struct { Id string `json:"id"` Url string `json:"url"` Username string `json:"username"` Password string `json:"password"` MacAddress string `json:"macAddress"` K8sLabels map[string]string `json:"k8slabels"` K8sAnnotations map[string]string `json:"k8sannotations"` DeviceName string `json:"devicename"` DisableCertificateVerification bool `json:"disablecertificateverification"` }
func GetBaremetal ¶
func RetrieveAllBaremetals ¶
func RetrieveAllBaremetals() []Baremetal
type BrokerData ¶
var ( BROKERDATA BrokerData = BrokerData{ Baremetals: make(map[string]Baremetal), Pools: make(map[string]Pool), } Mutex sync.Mutex )
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"message"`
}
type PoolResponse ¶
type PoolResponse struct { Id string `json:"id"` Username string `json:"username"` Password string `json:"password"` LabelSelector map[string]string `json:"labelSelector"` MaxServers int `json:"maxServers"` }
func GetPool ¶
func GetPool(poolId string) *PoolResponse
func RetrieveAllPools ¶
func RetrieveAllPools() []PoolResponse
type ServerData ¶
type ServerRequest ¶
type ServerResponse ¶
type ServerResponse struct { Id string `json:"id"` K8sLabels map[string]string `json:"k8slabels"` K8sAnnotations map[string]string `json:"k8sannotations"` Baremetal string `json:"baremetal"` Url string `json:"url"` MacAddress string `json:"macAddress"` DeviceName string `json:"devicename"` DisableCertificateVerification bool `json:"disablecertificateverification"` }
func RetrieveAllServers ¶
func RetrieveAllServers(poolId string) []ServerResponse
Click to show internal directories.
Click to hide internal directories.