When parsing "key:value" from a -m/--match opt, it should read the key as the value up to the first ":", not the last one. Otherwise, you get this behavior when trying to match a MAC address:
python3 redfishtool.py ... EthernetInterfaces -m "MACAddress:08:00:69:17:A1:1B"
Traceback (most recent call last):
File "redfishtool.py", line 18, in <module>
main(sys.argv)
File "/root/Redfishtool/redfishtool/redfishtoolMain.py", line 362, in main
rc,r,j,d=runSubCmd(rft)
File "/root/Redfishtool/redfishtool/redfishtoolMain.py", line 439, in runSubCmd
rc,r,j,d=subCmdTable[rft.subcommand](rft,cmdTop=True)
File "/root/Redfishtool/redfishtool/Managers.py", line 159, in ManagersMain
rc,r,j,d = self.runOperation(rft)
File "/root/Redfishtool/redfishtool/Managers.py", line 116, in runOperation
rc,r,j,d=operationTable[self.operation](self, op, rft, cmdTop=True)
File "/root/Redfishtool/redfishtool/Managers.py", line 521, in getEnetInterfaces
path2,rc,r,j,d=rft.getLevel2ResourceById(rft,r,d)
File "/root/Redfishtool/redfishtool/redfishtoolTransport.py", line 964, in getLevel2ResourceById
if( d[rft.matchLevel2Prop] == rft.matchLevel2Value ):
KeyError: 'MACAddress:08:00:69:17:A1'
From the above stack trace, it appears that from MACAddress:08:00:69:17:A1:1B it reads "1B" as the value and all before that as the key.
When parsing "key:value" from a -m/--match opt, it should read the key as the value up to the first ":", not the last one. Otherwise, you get this behavior when trying to match a MAC address:
From the above stack trace, it appears that from MACAddress:08:00:69:17:A1:1B it reads "1B" as the value and all before that as the key.