HewlettPackard / POSH-HPEOneView

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

New-OVLogicalInterconnectGroup for FabricModuleType SEVC32FC return an error #554

Closed nightzone closed 3 years ago

nightzone commented 3 years ago

Expected Behavior

New-OVLogicalInterconnectGroup -Bays @{Frame1 = @{Bay1 = "SEVC32FC"; Bay4 = "SEVC32FC"}} -FabricModuleType SEVC32FC -FrameCount 1 -InterconnectBaySet 1 -Name test1 

Should pass without errors. Tried different Bay1 and Bay4 parameters.

Actual Behavior

Getting an error.

New-OVLogicalInterconnectGroup -Bays @{Frame1 = @{Bay1 = "SEVC32FC"; Bay4 = "SEVC32FC"}} -FabricModuleType SEVC32FC -FrameCount 1 -InterconnectBaySet 1 -Name test1

New-OVLogicalInterconnectGroup : The enclosure index range values are -1, or 1 - 5. Retry the operation with a valid enclosure index
range value. 
At line:1 char:1
+ New-OVLogicalInterconnectGroup -Bays @{Frame1 = @{Bay1 = "SEVC32FC";  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (logical-interconnect-groups:String) [New-OVLogicalInterconnectGroup], InvalidOpera 
   tionException
    + FullyQualifiedErrorId : CRM_ENCLOSURE_INDEX_VALUE_OUT_OF_RANGE,New-OVLogicalInterconnectGroup 

Steps to reproduce

# 1. Capture verbose output using the Get-HPOVCommandTrace for HPOneView.310 or newer, or append the -Verbose switch to your Cmdlet call.
# 2. Put your code and/or captured output here.
```powershell
New-OVLogicalInterconnectGroup -Bays @{Frame1 = @{Bay1 = "SEVC32FC"; Bay4 = "SEVC32FC"}} -FabricModuleType SEVC32FC -FrameCount 1 -InterconnectBaySet 1 -Name test1

Version Information

HPE OneView PowerShell Library Version (Get-HPOVVersion or $PSLibraryVersion): HPEOneView.550; Version=5.50.2607.2724 HPE OneView Appliance Version (Get-HPOVVersion -ApplianceVer):

5.50.00-0426657 "modelNumber": "HPE OneView - Demo VM"

Output from $PSVersionTable on your Windows Host:

# Output from $PSVersionTable
PS C:\Users\OleshcSe> $PSVersionTable

Name                           Value                                                                                                
----                           -----                                                                                                
PSVersion                      5.1.18362.1171                                                                                       
PSEdition                      Desktop                                                                                              
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                              
BuildVersion                   10.0.18362.1171                                                                                      
CLRVersion                     4.0.30319.42000                                                                                      
WSManStackVersion              3.0                                                                                                  
PSRemotingProtocolVersion      2.3                                                                                                  
SerializationVersion           1.1.0.1    
ChrisLynchHPE commented 3 years ago

This is caused by a typo in the module name used in the Cmdlet, that isn't being handled correctly in an internal function to build an API compliant resource for interconnect bay mappings. I will have this addressed in a library update.

nightzone commented 3 years ago

I was using wrong parameters for VCFC32Gb module. Found correct: $lig_bays = @{ Frame1 = @{Bay1 = "SEVC32GbFC"} } New-OVLogicalInterconnectGroup -FabricModuleType "SEVCFC"

Sorry, it was my mistake.