managers

package
v0.0.0-...-81c02da Latest Latest
Warning

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

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

Documentation

Overview

Package managers ...

Index

Constants

This section is empty.

Variables

This section is empty.

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
	SavePluginTaskInfo  func(context.Context, string, string, string, 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) (mgrcommon.PluginTaskInfo, response.RPC)
	ContactClient         func(context.Context, string, string, string, string, interface{}, map[string]string) (*http.Response, error)
	DecryptDevicePassword func([]byte) ([]byte, error)
	EncryptDevicePassword func([]byte) ([]byte, error)
}

Device struct to inject the contact device function into the handlers

type ExternalInterface

type ExternalInterface struct {
	Device Device
	DB     DB
	RPC    RPC
}

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,
	taskID string)

CreateRemoteAccountService is used to create BMC account user

func (*ExternalInterface) DeleteRemoteAccountService

func (e *ExternalInterface) DeleteRemoteAccountService(ctx context.Context, req *managersproto.ManagerRequest,
	taskID string)

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 function. 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) UpdatePassword

func (e ExternalInterface) UpdatePassword(ctx context.Context, uuid, password string, userName string, statusCode int32)

UpdatePassword method used to update system password

func (*ExternalInterface) UpdateRemoteAccountPasswordService

func (e *ExternalInterface) UpdateRemoteAccountPasswordService(ctx context.Context, req *managersproto.ManagerRequest)

UpdateRemoteAccountService is used to update BMC account

func (*ExternalInterface) UpdateRemoteAccountService

func (e *ExternalInterface) UpdateRemoteAccountService(ctx context.Context, req *managersproto.ManagerRequest,
	taskID string)

UpdateRemoteAccountService is used to update BMC account

func (*ExternalInterface) VirtualMediaActions

func (e *ExternalInterface) VirtualMediaActions(ctx context.Context, req *managersproto.ManagerRequest, taskID string)

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

type RPC

type RPC struct {
	UpdateTask func(context.Context, common.TaskData) error
}

RPC struct to inject the rpc call to other services

Jump to

Keyboard shortcuts

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