magellan

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IPMI_PORT  = 623
	SSH_PORT   = 22
	HTTPS_PORT = 443
)

Variables

This section is empty.

Functions

func CollectAll

func CollectAll(probeStates *[]ScannedResult, l *log.Logger, q *QueryParams) error

func CollectBios

func CollectBios(client *bmclib.Client, q *QueryParams) ([]byte, error)

func CollectChassis

func CollectChassis(c *gofish.APIClient, q *QueryParams) ([]map[string]any, error)

func CollectEthernetInterfaces

func CollectEthernetInterfaces(c *gofish.APIClient, q *QueryParams, systemID string) ([]byte, error)

func CollectInventory

func CollectInventory(client *bmclib.Client, q *QueryParams) ([]byte, error)

func CollectMetadata

func CollectMetadata(client *bmclib.Client, q *QueryParams) ([]byte, error)

func CollectPowerState

func CollectPowerState(client *bmclib.Client, q *QueryParams) ([]byte, error)

func CollectProcessors

func CollectProcessors(q *QueryParams) ([]byte, error)

func CollectRegisteries

func CollectRegisteries(c *gofish.APIClient, q *QueryParams) ([]byte, error)

func CollectStorage

func CollectStorage(c *gofish.APIClient, q *QueryParams) ([]byte, error)

func CollectSystems

func CollectSystems(c *gofish.APIClient, q *QueryParams) ([]map[string]any, error)

func CollectUsers

func CollectUsers(client *bmclib.Client, q *QueryParams) ([]byte, error)

func GenerateHosts

func GenerateHosts(subnet string, subnetMask *net.IP) []string

func GetDefaultPorts

func GetDefaultPorts() []int

func GetUpdateStatus

func GetUpdateStatus(q *UpdateParams) error

func LoadConfig added in v0.0.7

func LoadConfig(path string) error

func Login added in v0.0.7

func Login(loginUrl string, targetHost string, targetPort int) (string, error)

func UpdateFirmware

func UpdateFirmware(client *bmclib.Client, l *log.Logger, q *UpdateParams) error

NOTE: Does not work since OpenBMC, whic bmclib uses underneath, does not support multipart updates. See issue: https://github.com/bmc-toolbox/bmclib/issues/341

func UpdateFirmwareRemote

func UpdateFirmwareRemote(q *UpdateParams) error

Types

type QueryParams

type QueryParams struct {
	Host         string
	Port         int
	Protocol     string
	User         string
	Pass         string
	Drivers      []string
	Concurrency  int
	Preferred    string
	Timeout      int
	CaCertPath   string
	Verbose      bool
	IpmitoolPath string
	OutputPath   string
	ForceUpdate  bool
	AccessToken  string
}

NOTE: ...params were getting too long...

type ScannedResult

type ScannedResult struct {
	Host      string    `json:"host"`
	Port      int       `json:"port"`
	Protocol  string    `json:"protocol"`
	State     bool      `json:"state"`
	Timestamp time.Time `json:"timestamp"`
}

func ScanForAssets

func ScanForAssets(hosts []string, ports []int, threads int, timeout int, disableProbing bool, verbose bool) []ScannedResult

type UpdateParams

type UpdateParams struct {
	QueryParams
	FirmwarePath     string
	FirmwareVersion  string
	Component        string
	TransferProtocol string
}

Directories

Path Synopsis
api
smd
db

Jump to

Keyboard shortcuts

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