Open DungKHoang opened 1 year ago
Hello Dung The quick fix I'm using : Generate-NetConnection-Script function (around line 15808 in the 6.60.3332.3428 library module file):
$netName = Get-NamefromUri -Uri $netUri
if ($netUri.StartsWith("/rest/network-sets")) {
$thisNetwork = Get-OVNetworkSet -Name $netName -ErrorAction Stop
} else {
$thisNetwork = Get-OVNetwork -Type $ConnType -Name $netName -ErrorAction Stop
}
Olivier
This can be simplified with the following code instead:
Try
{
# Just get the whole object in order to get the type and name
$thisNetwork = Send-OVRequest -Uri $netUri
$netName = $thisNetwork.name
}
Catch
{
$PSCmdlet.ThrowTerminatingError($_)
}
Which is what the library will use to fix this issue.
Expected Behavior
Get-OVServerprofile | Convertto-OVPOwershell script genrates error on network set attached to profile connec tion See attached file from get-OVCommandTrace
Version Information
HPE OneView PowerShell Library Version (
Get-HPOVVersion
or$PSLibraryVersion
): HPEOneView.660 HPE OneView Appliance Version (Get-HPOVVersion -ApplianceVer
): OneView 6.62301271509_HPEOV_transcript.log