Documentation
¶
Index ¶
- Variables
- func ApplyDOCAVersionFromISO(bfs *provisioningv1.BlueFieldSoftware, isoPath string) error
- func ComponentDownloadFilename(bfs *provisioningv1.BlueFieldSoftware, componentType ComponentType, ...) string
- func ExtractDOCAVersionFromISO(isoPath string) (formatted string, raw string, err error)
- func FilenameFromHTTPURL(rawURL string) string
- func GenerateComponentTaskName(bfs provisioningv1.BlueFieldSoftware, componentType ComponentType) string
- func PldmComponentFilename(bfs *provisioningv1.BlueFieldSoftware, psid, url string) string
- func PldmFwBundles(bfs *provisioningv1.BlueFieldSoftware) map[string]string
- func PldmTaskName(bfs *provisioningv1.BlueFieldSoftware, psid string) string
- func SpecURLForComponent(bfs *provisioningv1.BlueFieldSoftware, componentType ComponentType) string
- type ComponentDownloadTask
- type ComponentType
Constants ¶
This section is empty.
Variables ¶
var DownloadingTaskMap sync.Map
Functions ¶
func ApplyDOCAVersionFromISO ¶
func ApplyDOCAVersionFromISO(bfs *provisioningv1.BlueFieldSoftware, isoPath string) error
ApplyDOCAVersionFromISO extracts DOCA version metadata from the OS ISO and writes it to BlueFieldSoftware status.
func ComponentDownloadFilename ¶
func ComponentDownloadFilename(bfs *provisioningv1.BlueFieldSoftware, componentType ComponentType, specValue string) string
ComponentDownloadFilename returns the local filename for a component given the spec field value. For http(s) URLs it uses {namespace}-{name}-{URL basename} so different BlueFieldSoftware objects never collide under the shared components dir.
func ExtractDOCAVersionFromISO ¶
ExtractDOCAVersionFromISO derives the DOCA version for an OS ISO from its filename. The published bf4-os-doca-bundle images encode the version there (e.g. bf4-os-doca-bundle-3.3.0-341_...), so the version can be read without unpacking the image. It returns the formatted user-facing DOCA version plus the raw version.
func FilenameFromHTTPURL ¶
FilenameFromHTTPURL returns the last path segment of rawURL when it is a valid http(s) URL with a usable filename. Otherwise it returns "".
func GenerateComponentTaskName ¶
func GenerateComponentTaskName(bfs provisioningv1.BlueFieldSoftware, componentType ComponentType) string
func PldmComponentFilename ¶
func PldmComponentFilename(bfs *provisioningv1.BlueFieldSoftware, psid, url string) string
PldmComponentFilename returns the on-disk filename for a per-PSID DPU PLDM bundle. The PSID is part of the name so bundles for different PSIDs (which may share a URL basename) never collide on shared bfb storage; an empty PSID collapses to {namespace}-{name}-{base}.
func PldmFwBundles ¶
func PldmFwBundles(bfs *provisioningv1.BlueFieldSoftware) map[string]string
PldmFwBundles returns the spec DPU PLDM firmware bundles keyed by PSID (nil-safe). Empty URLs are dropped so callers never attempt an empty download.
func PldmTaskName ¶
func PldmTaskName(bfs *provisioningv1.BlueFieldSoftware, psid string) string
PldmTaskName returns the download task name for the DPU PLDM bundle of a specific PSID, keeping per-PSID downloads of the same BlueFieldSoftware distinct. An empty PSID collapses to the plain bundle name (no trailing separator).
func SpecURLForComponent ¶
func SpecURLForComponent(bfs *provisioningv1.BlueFieldSoftware, componentType ComponentType) string
SpecURLForComponent returns the spec value (typically a URL) for single-valued componentTypes. The DPU PLDM bundle is keyed per-PSID (see PldmFwBundles), so it is not single-valued and always returns "" here.
Types ¶
type ComponentDownloadTask ¶
type ComponentType ¶
type ComponentType string
ComponentType represents the type of component to download
const ( ComponentTypeFwBundle ComponentType = "fwbundle" ComponentTypePlatformFwBundle ComponentType = "platformpldmfwbundle" ComponentTypeOSISO ComponentType = "osiso" ComponentTypeNicFw ComponentType = "nicfw" )