From afe73ad96ae97c1f48ae34634f071c0bb36a7dfc Mon Sep 17 00:00:00 2001 From: Chris Lynch Date: Mon, 3 Dec 2018 13:51:23 -0800 Subject: [PATCH] -- Fixed New-HPOVServerProfileConnection where -VirtualFunctions parameter was not being honored correctly, and iSCSI connection type regression. -- Fixed Get-HPOVIloSso to return correct iLO REST API root URI based on iLO4 or iLO5. --- HPOneView.410.psd1 | 7 +- HPOneView.410.psm1 | 111 ++++++++++++++---- ...e-361b-4ec0-b168-060eac70561d_HelpInfo.xml | 2 +- Server.format.ps1xml | 2 +- en-US/HPOneView.410.psm1-help.xml | 62 ++++++++-- en-US/about_HPOneView.410.help.txt | 6 +- 6 files changed, 151 insertions(+), 39 deletions(-) diff --git a/HPOneView.410.psd1 b/HPOneView.410.psd1 index 1e7dcff..1a91bbd 100644 --- a/HPOneView.410.psd1 +++ b/HPOneView.410.psd1 @@ -27,7 +27,7 @@ THE SOFTWARE. RootModule = 'HPOneView.410.psm1' # Version number of this module. - ModuleVersion = '4.10.1865.3905' + ModuleVersion = '4.10.1889.2173' # ID used to uniquely identify this module GUID = '2c99a71e-361b-4ec0-b168-060eac70561d' @@ -123,7 +123,7 @@ THE SOFTWARE. LicenseUri = 'https://github.com/HewlettPackard/POSH-HPOneView/blob/master/LICENSE'; ProjectUri = 'http://hewlettpackard.github.io/POSH-HPOneView'; IconUri = ''; - ReleaseNotes = 'Release 4.10.1865.3905 + ReleaseNotes = 'Release 4.10.1889.2173 * Updated New-HPOVServerProfile and New-HPOVServerProfileTemplate with -PassThru parameter, which will return the object back to the caller to modify it before creating it with Save-HPOVServerProfile or Save-HPOVServerProfileTemplate Cmdlets. * [#372] Updated HostOSType parameters for New-HPOVServerProfile, New-HPOVServerProfileTemplate, and New-HPOVServerProfileAttachVolume Cmdlets. @@ -135,8 +135,9 @@ THE SOFTWARE. * Fixed Get-HPOVInterconnect where SAS Interconnects were not part of the API call to index. * Fixed Copy-HPOVServerProfile where server hardware validation was incorrectly being handled. * Fixed New-HPOVServerProfile where server hardware validation was incorrectly being handled. -* Fixed New-HPOVServerProfileConnection where -VirtualFunctions parameter was not being honored correctly. +* Fixed New-HPOVServerProfileConnection where -VirtualFunctions parameter was not being honored correctly, and iSCSI connection type regression. * Fixed New-HPOVSnmpConfiguration which was missing SNMPv3 configuration parameters. +* Fixed Get-HPOVIloSso to return correct iLO REST API root URI based on iLO4 or iLO5. * [#382] Fixed New-HPOVServerProfileTemplate where -BootMode $false would not set the appropriate values to unmanage settings. * Updated New-HPOVServerProfile to make -AssignmentType a non-mandatory parameter, which now defaults to "Server". * Added Cmdlets to get and set HPE Synergy Reserved VLAN Range; Get-HPOVReservedVlanRange, Set-HPOVReservedVlanRange' diff --git a/HPOneView.410.psm1 b/HPOneView.410.psm1 index 50f0574..f545f42 100644 --- a/HPOneView.410.psm1 +++ b/HPOneView.410.psm1 @@ -33,7 +33,7 @@ THE SOFTWARE. #> # Set HPOneView POSH Library Version -[Version]$ModuleVersion = '4.10.1865.3905' +[Version]$ModuleVersion = '4.10.1889.2173' New-Variable -Name PSLibraryVersion -Scope Global -Value (New-Object HPOneView.Library.Version($ModuleVersion)) -Option Constant -ErrorAction SilentlyContinue $Global:CallStack = Get-PSCallStack $script:ModuleVerbose = [bool]($Global:CallStack | Where-Object { $_.Command -eq "" }).position.text -match "-verbose" @@ -958,6 +958,7 @@ function NewObject [switch]$ServerProfileBootMode, [switch]$ServerProfileBootModeLegacyBios, [switch]$ServerProfileEthernetConnection, + [switch]$ServerProfileIscsiConnection, [switch]$ServerProfileFCConnection, [switch]$ServerProfileEthBootableConnection, [switch]$ServerProfileEthBootableConnectionWithTargets, @@ -2521,11 +2522,12 @@ function NewObject }; firmware = [PSCustomObject]@{ - manageFirmware = $false; - firmwareBaselineUri = $null; - forceInstallFirmware = $false; - firmwareInstallType = 'FirmwareAndOSDrivers'; - firmwareActivationType = 'Immediate' + manageFirmware = $false; + firmwareBaselineUri = $null; + forceInstallFirmware = $false; + firmwareInstallType = 'FirmwareAndOSDrivers'; + firmwareActivationType = 'Immediate'; + firmwareScheduleDateTime = $null }; boot = [PSCustomObject]@{ @@ -2908,6 +2910,28 @@ function NewObject } + 'ServerProfileIscsiConnection' + { + + Return [PSCustomObject]@{ + + id = 1; + functionType = 'Ethernet'; + name = $null; + portId = $null; + networkUri = $null; + requestedMbps = 2000; + boot = $null; + macType = 'Virtual'; + mac = $null; + ipv4 = $null; + lagName = $null; + ApplianceConnection = $null + + } + + } + 'ServerProfileFCConnection' { @@ -31666,6 +31690,21 @@ function Get-HPOVIloSso "[{0}] Server Profile was provided." -f $MyInvocation.InvocationName.ToString().ToUpper(), $InputObject.name | Write-Verbose $_uri = $InputObject.serverHardwareUri + # get server hardware from resource + try + { + + $_Server = Send-HPOVRequest -Uri $_uri -Hostname $InputObject.ApplianceConnection + + } + + Catch + { + + $PSCmdlet.ThrowTerminatingError($_) + + } + } else @@ -31674,6 +31713,8 @@ function Get-HPOVIloSso "[{0}] Server Hardware was provided." -f $MyInvocation.InvocationName.ToString().ToUpper(), $InputObject.name | Write-Verbose $_uri = $InputObject.uri + $_Server = $InputObject + } if ($PSBoundParameters['RemoteConsoleOnly']) @@ -31719,8 +31760,6 @@ function Get-HPOVIloSso else { - # Get-HPOVServer | Select -First 1 | Get-HPOVIloSso -IloRestSession -OutVariable IloUrl - "[{0}] Generating and returning iLO REST/RedFish SSO Session object" -f $MyInvocation.InvocationName.ToString().ToUpper() | Write-Verbose Try @@ -31752,8 +31791,28 @@ function Get-HPOVIloSso } "[{0}] Building iLO Session Object." -f $MyInvocation.InvocationName.ToString().ToUpper() | Write-Verbose + + switch ($_Server.mpModel) + { + + 'iLO5' + { + + $_RootUri = "https://{0}/redfish/v1" -f ([URI]$_ssoresp.iloSsoUrl).Host + + } + + 'iLO4' + { + + $_RootUri = "https://{0}/rest/v1" -f ([URI]$_ssoresp.iloSsoUrl).Host + + } + + } + $IloSession = NewObject -IloRestSession - $IloSession.RootUri = "https://{0}/rest/v1" -f ([URI]$_ssoresp.iloSsoUrl).Host + $IloSession.RootUri = $_RootUri $IloSession.'X-Auth-Token' = $SessionID.Replace('sessionKey=',$null) $IloSession @@ -66128,7 +66187,7 @@ function Get-HPOVReservedVlanRange } -# // TODO: DOC UNITTEST +# // TODO: UNITTEST function Set-HPOVReservedVlanRange { @@ -87367,14 +87426,7 @@ function New-HPOVServerProfileTemplate } - if ("UEFI" -eq $BootMode -and $ServerHardwareType.model -match "Gen9" -and -not $PSBoundParameters['SecureBoot']) - { - - $_spt.bootMode.secureBoot = 'Disabled' - - } - - elseif ("UEFIOptimized" -eq $BootMode -and $ServerHardwareType.model -match "Gen9" -and -not $PSBoundParameters['SecureBoot']) + if ($ServerHardwareType.model -match "Gen9" -and -not $PSBoundParameters['SecureBoot']) { $_spt.bootMode.secureBoot = 'Unmanaged' @@ -89970,7 +90022,19 @@ function New-HPOVServerProfileConnection {"ethernet-networks", "network-sets" -contains $_} { - $_conn = NewObject -ServerProfileEthernetConnection + if ($ConnectionType -eq 'iSCSI' -or ('IscsiPrimary', 'IscsiSecondary' -contains $Priority) -or $PSCmdlet.ParameterSetName -eq "ISCSI") + { + + $_conn = NewObject -ServerProfileIscsiConnection + + } + + else + { + + $_conn = NewObject -ServerProfileEthernetConnection + + } } @@ -90136,7 +90200,8 @@ function New-HPOVServerProfileConnection } $_conn.boot.iscsi = NewObject -IscsiBootEntry - $_conn | Add-Member -NotePropertyName ipv4 -NotePropertyValue (NewObject -IscsiIPv4Configuration) + # $_conn.ipv4 | Add-Member -NotePropertyName ipv4 -NotePropertyValue (NewObject -IscsiIPv4Configuration) + $_conn.ipv4 = NewObject -IscsiIPv4Configuration if ($PSBoundParameters['BootVolumeSource']) { @@ -90355,6 +90420,12 @@ function New-HPOVServerProfileConnection } + # elseif (-not $PSboundParameters['Virtualfunctions'] -and $_conn.functionType -eq 'Ethernet' -and $PSCmdlet.ParameterSetName -ne 'ISCSI') + # { + + + # } + if ($PSboundParameters['UserDefined']) { diff --git a/HPOneView.410_2c99a71e-361b-4ec0-b168-060eac70561d_HelpInfo.xml b/HPOneView.410_2c99a71e-361b-4ec0-b168-060eac70561d_HelpInfo.xml index 824dda5..9668b09 100644 --- a/HPOneView.410_2c99a71e-361b-4ec0-b168-060eac70561d_HelpInfo.xml +++ b/HPOneView.410_2c99a71e-361b-4ec0-b168-060eac70561d_HelpInfo.xml @@ -4,7 +4,7 @@ en-US - 4.10.1865.3907 + 4.10.1889.2173 \ No newline at end of file diff --git a/Server.format.ps1xml b/Server.format.ps1xml index f2f4cb3..d332d0b 100644 --- a/Server.format.ps1xml +++ b/Server.format.ps1xml @@ -823,7 +823,7 @@ Enclosure - HPOneView.Enclosure + HPOneView.Servers.Enclosure diff --git a/en-US/HPOneView.410.psm1-help.xml b/en-US/HPOneView.410.psm1-help.xml index 3fca7a6..0c62d22 100644 --- a/en-US/HPOneView.410.psm1-help.xml +++ b/en-US/HPOneView.410.psm1-help.xml @@ -24332,13 +24332,13 @@ appliance1.domain.com False Get-HPOVReservedVlanRange - Default content + Get the reserved VLAN range for HPE Synergy. Get HPOVReservedVlanRange - Default content + By default, HPE Synergy reserves a sepcific VLAN range for Tunnel, untagged and FC networks for HPE Synergy Virtual Connect. This default range is 3967-4095. The range can be modified using Set-HPOVReservedVlanRange if none of the specified network resources have been created. @@ -24377,9 +24377,27 @@ Default Value: ${Global:ConnectedSessions} | ? Default + + + None. You cannot pipe objects to this cmdlet. + + + + + + + + HPOneView.Networking.ReservedVlanRange + + + + The reserved VLAN range object + + + @@ -24391,7 +24409,7 @@ Default Value: ${Global:ConnectedSessions} | ? Default Get-HPOVReservedVlanRange - Default example + Get the defined reserved VLAN range on the connected HPE Synergy appliance. @@ -79165,13 +79183,15 @@ Default value: 514 Set-HPOVReservedVlanRange - Default content + Modify the reserved VLAN range for HPE Synergy. Set HPOVReservedVlanRange - Default content + By default, HPE Synergy reserves VLANs 3967-4095. In order to modify the default range, Tunnel, untagged and FC networks must not exist. The -Length parameter must not exceed 128. The reserved VLAN range is concurrent. + +Required permissions: Network administrator, Infrastructure administrator @@ -79180,14 +79200,14 @@ Default value: 514 Start - + The starting VLAN ID. int Length - + Must not exceed 128. int @@ -79224,7 +79244,7 @@ Default Value: ${Global:ConnectedSessions} | ? Default Length - + Must not exceed 128. int @@ -79235,7 +79255,7 @@ Default Value: ${Global:ConnectedSessions} | ? Default Start - + The starting VLAN ID. int @@ -79246,9 +79266,27 @@ Default Value: ${Global:ConnectedSessions} | ? Default + + + None. You cannot pipe objects to this cmdlet. + + + + + + + + HPOneView.Appliance.TaskResource [System.Management.Automation.PSCustomObject] + + + + Async task Resource object for configuring port monitoring on the requested logical intercinnect. + + + @@ -79257,10 +79295,10 @@ Default Value: ${Global:ConnectedSessions} | ? Default - Set-HPOVReservedVlanRange + Set-HPOVReservedVlanRange -Start 2700 -Length 128 - Default example + Change the reserved VLAN range to start at 2700, and end at 2828. @@ -90547,5 +90585,5 @@ The uri or object of the task resource to wait for. - + \ No newline at end of file diff --git a/en-US/about_HPOneView.410.help.txt b/en-US/about_HPOneView.410.help.txt index 25117a8..ed0bf8e 100644 --- a/en-US/about_HPOneView.410.help.txt +++ b/en-US/about_HPOneView.410.help.txt @@ -32,7 +32,7 @@ SHORT DESCRIPTION WHAT'S NEW - Release 4.10.1865.3905 + Release 4.10.1889.2173 -- Updated New-HPOVServerProfile and New-HPOVServerProfileTemplate with -PassThru parameter, which will return the object back to the caller to modify it before creating it with Save-HPOVServerProfile @@ -48,8 +48,10 @@ WHAT'S NEW -- Fixed Get-HPOVInterconnect where SAS Interconnects were not part of the API call to index. -- Fixed Copy-HPOVServerProfile where server hardware validation was incorrectly being handled. -- Fixed New-HPOVServerProfile where server hardware validation was incorrectly being handled. - -- Fixed New-HPOVServerProfileConnection where -VirtualFunctions parameter was not being honored correctly. + -- Fixed New-HPOVServerProfileConnection where -VirtualFunctions parameter was not being honored correctly, and iSCSI + connection type regression. -- Fixed New-HPOVSnmpConfiguration which was missing SNMPv3 configuration parameters. + -- Fixed Get-HPOVIloSso to return correct iLO REST API root URI based on iLO4 or iLO5. -- [#382] Fixed New-HPOVServerProfileTemplate where -BootMode $false would not set the appropriate values to unmanage settings. -- Updated New-HPOVServerProfile to make -AssignmentType a non-mandatory parameter, which now defaults to "Server".