dell / iDRAC-Redfish-Scripting

Python and PowerShell scripting for Dell EMC PowerEdge iDRAC REST API with DMTF Redfish
GNU General Public License v2.0
603 stars 279 forks source link

Fibre Channel - PUT/Patch via redfish api #268

Closed yograj099 closed 11 months ago

yograj099 commented 1 year ago

Hi,

What all fibre channel parameters can be write through redfish api ? I am able to change boot mode and push targets. Any other I can write ?

texroemer commented 1 year ago

Hi @yograj099

For FC cards DMTF supports a limited number of properties you can change. Since there is a limited number of properties iDRAC added OEM extension support to configure more properties, basically all the same properties you can configure on the card from F2 Device Settings.

Example below of supported DMTF properties:

 C:\Python310>python SetNetworkDevicePropertiesREDFISH.py -ip 192.168.0.120 -u root -p calvin --get-properties FC.Slot.2-1

- Properties for network device FC.Slot.2-1 -

 - FibreChannel Attributes -

BootTargets: [{'LUNID': '0', 'WWPN': '00:00:00:00:00:00:00:00'}]
BootTargets@odata.count: 1
FCoEActiveVLANId: None
FCoELocalVLANId: None
PermanentWWNN: 20:00:00:10:9B:90:66:30
PermanentWWPN: 10:00:00:10:9B:90:66:30
WWNN: 20:00:00:10:9B:90:66:30
WWNSource: ProvidedByFabric
WWPN: 10:00:00:10:9B:90:66:30

Example below of supported OEM properties:

C:\Python310>python GetSetOemNetworkDevicePropertiesREDFISH.py -ip 192.168.0.120 -u root -p calvin --get-all-attributes FC.Slot.2-1

- FC.Slot.2-1 Attributes -

Attribute Name: DeviceName, Attribute Value: LPe35002-M2-D
Attribute Name: WWN, Attribute Value: 20:00:00:10:9B:90:66:30
Attribute Name: WWPN, Attribute Value: 10:00:00:10:9B:90:66:30
Attribute Name: VirtualWWN, Attribute Value: 20:00:00:10:9B:90:66:30
Attribute Name: VirtualWWPN, Attribute Value: 10:00:00:10:9B:90:66:30
Attribute Name: FirstNVMeTargetNQN, Attribute Value: None
Attribute Name: FirstNVMeTargetWWPN, Attribute Value: 00:00:00:00:00:00:00:00
Attribute Name: FirstNVMeTgtCntlrID, Attribute Value: 00000
Attribute Name: FirstNVMeTgtNSID, Attribute Value: 0000000000
Attribute Name: SecondNVMeTargetNQN, Attribute Value: None
Attribute Name: SecondNVMeTargetWWPN, Attribute Value: 00:00:00:00:00:00:00:00
Attribute Name: SecondNVMeTgtCntlrID, Attribute Value: 00000
Attribute Name: SecondNVMeTgtNSID, Attribute Value: 0000000000
Attribute Name: ThirdNVMeTargetNQN, Attribute Value: None
Attribute Name: ThirdNVMeTargetWWPN, Attribute Value: 00:00:00:00:00:00:00:00
Attribute Name: ThirdNVMeTgtCntlrID, Attribute Value: 00000
Attribute Name: ThirdNVMeTgtNSID, Attribute Value: 0000000000
Attribute Name: FourthNVMeTargetNQN, Attribute Value: None
Attribute Name: FourthNVMeTargetWWPN, Attribute Value: 00:00:00:00:00:00:00:00
Attribute Name: FourthNVMeTgtCntlrID, Attribute Value: 00000
Attribute Name: FourthNVMeTgtNSID, Attribute Value: 0000000000
Attribute Name: BusDeviceFunction, Attribute Value: A1:00:00
Attribute Name: PCIDeviceID, Attribute Value: F400
Attribute Name: FamilyVersion, Attribute Value: 03.07.16
Attribute Name: EFIVersion, Attribute Value: 14.2.566.12
Attribute Name: FirstFCTargetWWPN, Attribute Value: 00:00:00:00:00:00:00:00
Attribute Name: SecondFCTargetWWPN, Attribute Value: 00:00:00:00:00:00:00:00
Attribute Name: ELX_ThirdFCTargetWWPN, Attribute Value: 00:00:00:00:00:00:00:00
Attribute Name: ELX_FourthFCTargetWWPN, Attribute Value: 00:00:00:00:00:00:00:00
Attribute Name: ELX_FifthFCTargetWWPN, Attribute Value: 00:00:00:00:00:00:00:00
Attribute Name: ELX_SixthFCTargetWWPN, Attribute Value: 00:00:00:00:00:00:00:00
Attribute Name: ELX_SeventhFCTargetWWPN, Attribute Value: 00:00:00:00:00:00:00:00
Attribute Name: ELX_EighthFCTargetWWPN, Attribute Value: 00:00:00:00:00:00:00:00
Attribute Name: PortNumber, Attribute Value: 0
Attribute Name: PortLoginTimeout, Attribute Value: 1
Attribute Name: ELX_MaxLUNSPerTarget, Attribute Value: 256
Attribute Name: ELX_FirstFCBootDeviceOrder, Attribute Value: 0
Attribute Name: ELX_SecondFCBootDeviceOrder, Attribute Value: 0
Attribute Name: ELX_ThirdFCBootDeviceOrder, Attribute Value: 0
Attribute Name: ELX_FourthFCBootDeviceOrder, Attribute Value: 0
Attribute Name: ELX_FifthFCBootDeviceOrder, Attribute Value: 0
Attribute Name: ELX_SixthFCBootDeviceOrder, Attribute Value: 0
Attribute Name: ELX_SeventhFCBootDeviceOrder, Attribute Value: 0
Attribute Name: ELX_EighthFCBootDeviceOrder, Attribute Value: 0
Attribute Name: FirstFCTargetLUN, Attribute Value: 0
Attribute Name: SecondFCTargetLUN, Attribute Value: 0
Attribute Name: ELX_ThirdFCTargetLUN, Attribute Value: 0
Attribute Name: ELX_FourthFCTargetLUN, Attribute Value: 0
Attribute Name: ELX_FifthFCTargetLUN, Attribute Value: 0
Attribute Name: ELX_SixthFCTargetLUN, Attribute Value: 0
Attribute Name: ELX_SeventhFCTargetLUN, Attribute Value: 0
Attribute Name: ELX_EighthFCTargetLUN, Attribute Value: 0
Attribute Name: PortSpeed, Attribute Value: Auto
Attribute Name: ELX_BootTargetScanMethod, Attribute Value: NVRAM_BOOTSCAN
Attribute Name: ELX_FaPWWNSupport, Attribute Value: Disabled
Attribute Name: ELX_FABLSupport, Attribute Value: Disabled
Attribute Name: ELX_FECSupport, Attribute Value: Enabled
Attribute Name: ELX_LegacySpin, Attribute Value: Disabled
Attribute Name: ELX_LegacyEDD, Attribute Value: Disabled
Attribute Name: ELX_LegacyStartUnit, Attribute Value: Disabled
Attribute Name: ELX_LegacyEnvVar, Attribute Value: Disabled
Attribute Name: ELX_LegacyAutoBoot, Attribute Value: Disabled
Attribute Name: ELX_LegacyAutoScan, Attribute Value: DISABLE_AUTOSCAN
Attribute Name: ELX_TrunkModeSupport, Attribute Value: Disabled
Attribute Name: ELX_TrunkPort1LinkSpeed, Attribute Value: NA
Attribute Name: ELX_TrunkingLink1State, Attribute Value: Inactive
Attribute Name: ELX_TrunkingLink2State, Attribute Value: Inactive
Attribute Name: EnableNVMeBoot, Attribute Value: Disabled
Attribute Name: BootScanSelection, Attribute Value: Disabled

For attribute information (attribute type, if read write, regex, possible values, etc) refer to the attribute registry:

https://dl.dell.com/content/manual66164609-integrated-dell-remote-access-controller-9-version-7-xx-series-attribute-registry.pdf?language=en-us

Thanks Tex