managers

package
v0.0.0-...-8d2fcc7 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package managers ...

Index

Constants

This section is empty.

Variables

View Source
var (
	JsonUnMarshalFunc              = json.Unmarshal
	RequestParamsCaseValidatorFunc = common.RequestParamsCaseValidator
)

Functions

This section is empty.

Types

type DB

type DB struct {
	GetAllKeysFromTable func(string) ([]string, error)
	GetManagerByURL     func(string) (string, *errors.Error)
	GetPluginData       func(string) (mgrmodel.Plugin, *errors.Error)
	UpdateData          func(string, map[string]interface{}, string) error
	GetResource         func(string, string) (string, *errors.Error)
}

DB struct to inject the contact DB function into the handlers

type Device

type Device struct {
	GetDeviceInfo         func(context.Context, mgrcommon.ResourceInfoRequest) (string, error)
	DeviceRequest         func(context.Context, mgrcommon.ResourceInfoRequest) response.RPC
	ContactClient         func(context.Context, string, string, string, string, interface{}, map[string]string) (*http.Response, error)
	DecryptDevicePassword func([]byte) ([]byte, error)
}

Device struct to inject the contact device function into the handlers

type ExternalInterface

type ExternalInterface struct {
	Device Device
	DB     DB
}

ExternalInterface holds all the external connections managers package functions uses

func GetExternalInterface

func GetExternalInterface() *ExternalInterface

GetExternalInterface retrieves all the external connections managers package functions uses

func (*ExternalInterface) CreateRemoteAccountService

func (e *ExternalInterface) CreateRemoteAccountService(ctx context.Context, req *managersproto.ManagerRequest) response.RPC

CreateRemoteAccountService is used to create BMC account user

func (*ExternalInterface) DeleteRemoteAccountService

func (e *ExternalInterface) DeleteRemoteAccountService(ctx context.Context, req *managersproto.ManagerRequest) response.RPC

DeleteRemoteAccountService is used to delete the BMC account user

func (*ExternalInterface) GetManagers

GetManagers will fetch individual manager details with the given ID

func (*ExternalInterface) GetManagersCollection

func (e *ExternalInterface) GetManagersCollection(ctx context.Context, req *managersproto.ManagerRequest) (response.RPC, error)

GetManagersCollection will get the all the managers(odimra, Plugins, Servers)

func (*ExternalInterface) GetManagersResource

func (e *ExternalInterface) GetManagersResource(ctx context.Context, req *managersproto.ManagerRequest) response.RPC

GetManagersResource is used to fetch resource data. The function is supposed to be used as part of RPC For getting system resource information, parameters need to be passed GetSystemsRequest . GetManagersResource holds the Uuid,Url and Resourceid , Url will be parsed from that search key will created There will be two return values for the fuction. One is the RPC response, which contains the status code, status message, headers and body and the second value is error.

func (*ExternalInterface) GetRemoteAccountService

func (e *ExternalInterface) GetRemoteAccountService(ctx context.Context, req *managersproto.ManagerRequest) response.RPC

GetRemoteAccountService is used to fetch resource data for BMC account service. ManagerRequest holds the UUID, URL and ResourceId , There will be two return values for the function. One is the RPC response, which contains the status code, status message, headers and body and the second value is error.

func (*ExternalInterface) UpdateRemoteAccountService

func (e *ExternalInterface) UpdateRemoteAccountService(ctx context.Context, req *managersproto.ManagerRequest) response.RPC

UpdateRemoteAccountService is used to update BMC account

func (*ExternalInterface) VirtualMediaActions

func (e *ExternalInterface) VirtualMediaActions(ctx context.Context, req *managersproto.ManagerRequest) response.RPC

VirtualMediaActions is used to perform action on VirtualMedia. For insert and eject of virtual media this function is used

Jump to

Keyboard shortcuts

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