HewlettPackard / POSH-HPEOneView

PowerShell language bindings library for HPE OneView.
http://hewlettpackard.github.io/POSH-HPEOneView/
125 stars 52 forks source link

Get-OVMigratableServer Should Capture Server Profile State #639

Open jacobhopkins117 opened 1 year ago

jacobhopkins117 commented 1 year ago

Expected Behavior

Get-OVMigratableServer should capture/print Server Profile state. It currently only captures Server Hardware state. This will cause issues if one Server Profile in the object is not in a ProfileApplied, Monitored, NoProfileApplied state. This makes using the input object with Invoke-OVMigrateServer difficult to use.

A nice-to-have would also include checking for iLO version minimums for 8.0, or at least printing the versions in the table/object. image

Actual Behavior

image

Steps to reproduce

Any Server Profile that does not have a ProfileApplied, Monitored, NoProfileApplied state will stop the migration and kill the Invoke-OVMigrateServer process.

Version Information

HPE OneView PowerShell Library Version: 8.0.3439.1646 HPE OneView Appliance Version: 8.00.00.470555.00 Output from $PSVersionTable on your Windows Host:

Name                           Value
----                           -----
PSVersion                      7.3.3
PSEdition                      Core
GitCommitId                    7.3.3
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
ChrisLynchHPE commented 1 year ago

This isn't really an issue with the Cmdlet. The Cmdlet is behaving as designed. As there are many different validation errors to be handled, I leave it up to the target OV appliance to reject the request if there is a validation error. Yes, the Cmdlet will generate a terminating error upon receiving an HTTP 400 error (which indicates a client request error). You can handle this by catching the exception in a Try{} Catch{} block.