Scripting: Overcome the warning in the gui for "Update from template" #690
Replies: 2 comments
-
I'm a little unclear on what you're asking. When I run the Powershell command you quoted, I don't get any warning and the process completes without any user interaction, as I would expect. If you're getting something different, could you provide more details ? Screenshots ? |
Beta Was this translation helpful? Give feedback.
-
Vincent, My apologies. I included the wrong cmdlets when making my point about this. I will try to be better about providing detail with this message. There were some moments in my testing at some point where I was seeing the warning in the GUI on the server profile, but you're correct in that this syntax that I included here done by itself without some other factors (which I can't remember now) does not trigger it. It was a question I posed to HPE support a while back, but since then I have come up with a better way to do what I am trying to do after doing a good amount of online research. However the new and better way still has the same problem, whereby when you change the firmware baseline within a server profile template, and that server profile template has its "consistency checking" set to "Exact Match" (see screenshot 1). I went back and looked at my newer solution to changing the Firmware Baseline inside the SPT. Its actually part of a long script. I'll include the relevant parts here: - Create variable string for Server Profile Template to be modified:$template= (Read-Host "Enter the name of OV Server Profile Template that you want to change the baseline for") - Create variable string for Firmware Baseline (a.k.a. Bundle) to change the profile to:$newBaseline= (Read-Host "Enter the name of OV Firmware Baseline that is to be the new baseline for the Server Profile Template") Get profile template$thisTemplate = Get-OVServerProfileTemplate -name $template -ErrorAction Stop if ($NULL -ne $thisTemplate)
The key line in the script above is this: $thisTemplate.firmware.firmwareBaselineUri = $baselineUri ...that line changes the firmware baseline in the server profile template. But really the script syntax above isn't super important except for the fact that I am trying to understand if there is a way using Powershell to not have the OneView GUI throw up a warning that wants me to verify in the server profile that its OK to update the baseline in the profile. This GUI warning and subsequent manual clicking I have to do happens because the profile is associated with a server profile template that has "consistency checking" set to "Exact Match". In fact it really happens even when you just change the baseline in the GUI manually. The same pop up warning... see screenshots 2 thru 4 for that. So what I'm trying to do is to run the above syntax and add some additional syntax that stops that prompt to approve the firmware baseline change in the GUI from happening. Andy |
Beta Was this translation helpful? Give feedback.
-
In HPE oneView PowerShell module (v9.1), is there a way to overcome the warning in the gui for "Update from template" function when I run this cmdlet:
Get-OVServerProfile -Name <my_profile_name> | Update-OVServerProfile -Baseline -reapply -Confirm:$false
... basically trying to force that process to complete without interaction for the script to complete with minimal user interaction.
Beta Was this translation helpful? Give feedback.
All reactions