Skip to content

Commit

Permalink
Set status when only PreprovisioningNetworkDataName is used
Browse files Browse the repository at this point in the history
Set bmhStatus.NetworkDataSecretName correctly when only
PreprovisioningNetworkDataName is provided.

Signed-off-by: rabi <[email protected]>
  • Loading branch information
rabi committed Sep 27, 2024
1 parent 43602b8 commit 660a683
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/openstackbaremetalset/baremetalhost.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,11 @@ func BaremetalHostProvision(
// Update status with BMH provisioning details
//
bmhStatus.UserDataSecretName = userDataSecret.Name
bmhStatus.NetworkDataSecretName = networkDataSecret.Name
if networkDataSecret != nil {
bmhStatus.NetworkDataSecretName = networkDataSecret.Name
} else {
bmhStatus.NetworkDataSecretName = preProvNetworkData
}
bmhStatus.ProvisioningState = baremetalv1.ProvisioningState(foundBaremetalHost.Status.Provisioning.State)
instance.Status.BaremetalHosts[hostName] = bmhStatus

Expand Down

0 comments on commit 660a683

Please sign in to comment.