Documentation
¶
Overview ¶
* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- type FirmwareEntry
- type FirmwareFetcher
- type FirmwareRepo
- type FirmwareUpdater
- type FirmwareUpgrade
- type LiteonUpgradeRule
- type Manager
- func (manager *Manager) CanUpdate(ctx context.Context, pmc *pmc.PMC, component powershelf.Component, ...) (bool, error)
- func (manager *Manager) GetFirmwareUpdate(ctx context.Context, mac net.HardwareAddr, component powershelf.Component) (*powershelf.FirmwareUpdate, error)
- func (manager *Manager) ListAvailableFirmware(ctx context.Context, pmc *pmc.PMC) ([]FirmwareUpgrade, error)
- func (manager *Manager) SetDryRun(dryRun bool)
- func (manager *Manager) SetUpdateState(ctx context.Context, update model.FirmwareUpdate, ...) error
- func (manager *Manager) Summary() (string, error)
- func (manager *Manager) Upgrade(ctx context.Context, pmc *pmc.PMC, component powershelf.Component, ...) error
- type Registry
- func (ps *Registry) GetFwUpdate(ctx context.Context, mac net.HardwareAddr, component powershelf.Component) (*powershelf.FirmwareUpdate, error)
- func (ps *Registry) QueueFwUpdate(ctx context.Context, fwUpdate *powershelf.FirmwareUpdate) error
- func (ps *Registry) Start(ctx context.Context) error
- func (ps *Registry) Stop(ctx context.Context) error
- type UpgradeRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FirmwareEntry ¶
type FirmwareEntry struct {
// contains filtered or unexported fields
}
FirmwareEntry identifies a firmware artifact by name and embedded FS path.
type FirmwareFetcher ¶
type FirmwareFetcher struct {
// contains filtered or unexported fields
}
FirmwareFetcher provides read-only access to embedded firmware assets organized as firmware/<vendor>/pmc.
type FirmwareRepo ¶
type FirmwareRepo struct {
// contains filtered or unexported fields
}
FirmwareRepo holds parsed firmware upgrade edges and the supported starting-version range for a vendor.
type FirmwareUpdater ¶
type FirmwareUpdater struct {
// contains filtered or unexported fields
}
FirmwareUpdater encapsulates a vendor’s FirmwareRepo and UpgradeRule to select and execute upgrades.
func (*FirmwareUpdater) Summary ¶
func (updater *FirmwareUpdater) Summary() (string, error)
Summary returns the repo and rule summaries for the vendor.
type FirmwareUpgrade ¶
type FirmwareUpgrade struct {
// contains filtered or unexported fields
}
FirmwareUpgrade represents a single directed edge from a source firmware version to a target version, with the artifact path.
func (*FirmwareUpgrade) UpgradeTo ¶
func (upgrade *FirmwareUpgrade) UpgradeTo() firmwareVersion
type LiteonUpgradeRule ¶
type LiteonUpgradeRule struct{}
LiteonUpgradeRule allows only direct upgrades where the device’s current version equals the edge’s source.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager aggregates per-vendor FirmwareUpdater instances and exposes a vendor-agnostic API for firmware operations.
func New ¶
func New(ctx context.Context, c cdb.Config, pmcManager *pmcmanager.PmcManager, dryRun bool) (*Manager, error)
New constructs a Manager by creating updaters for all supported vendors.
func (*Manager) CanUpdate ¶
func (manager *Manager) CanUpdate(ctx context.Context, pmc *pmc.PMC, component powershelf.Component, targetVersion string) (bool, error)
CanUpdate returns whether a PMC’s current firmware is within the supported range.
func (*Manager) GetFirmwareUpdate ¶
func (manager *Manager) GetFirmwareUpdate(ctx context.Context, mac net.HardwareAddr, component powershelf.Component) (*powershelf.FirmwareUpdate, error)
GetFirmwareUpdate returns the status of a firmware update for the specified PMC MAC and component.
func (*Manager) ListAvailableFirmware ¶
func (manager *Manager) ListAvailableFirmware(ctx context.Context, pmc *pmc.PMC) ([]FirmwareUpgrade, error)
CanUpdate returns whether a PMC’s current firmware is within the supported range.
func (*Manager) SetUpdateState ¶
func (manager *Manager) SetUpdateState(ctx context.Context, update model.FirmwareUpdate, newState powershelf.FirmwareState, errMsg string) error
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) GetFwUpdate ¶
func (ps *Registry) GetFwUpdate( ctx context.Context, mac net.HardwareAddr, component powershelf.Component, ) (*powershelf.FirmwareUpdate, error)
func (*Registry) QueueFwUpdate ¶
func (ps *Registry) QueueFwUpdate(ctx context.Context, fwUpdate *powershelf.FirmwareUpdate) error
QueueFwUpdate creates a FirmwareUpdate row, mapping domain → DAO.
type UpgradeRule ¶
type UpgradeRule interface {
// contains filtered or unexported methods
}
UpgradeRule determines whether a given upgrade edge is permissible from a current firmware version.