Closed donzef closed 2 years ago
Hi @donzef ,
Kindly try the below IPv4StaticAddresses=f"[{{ {ad}, {nm}, {gtw} }}]" if pyhton 3 IPv4StaticAddresses="[{{ {}, {}, {} }}]".format(ad,nm,gtw) if python 2
here assumption is that IPv4StaticAddresses is sent in string format .
Thanks & Regards, iLORest Team
I'm also struggling with setting a static IP to an ILO. Can someone please show a working example? I failed to find one. There are some example but none that really goes to the end.
How should I use the example above with HPEs ilorest tool? Why is it so hard to set a static ILO IP with this tool? No working example anywhere.
IPv4StaticAddresses=f"[{{ {ad}, {nm}, {gtw} }}]" if pyhton 3
select EthernetInterface.v1_4_1
get IPv4Addresses --filter "@odata.id=/redfish/v1/Managers/1/EthernetInterfaces/1/"
IPv4StaticAddresses=
SubnetMask=255.255.255.0
Gateway=172.17.21.1
Address=172.17.21.34
set IPv4StaticAddresses=172.17.21.34 --filter "@odata.id=/redfish/v1/Managers/1/EthernetInterfaces/1/"
'172.17.21.34' is not a valid setting for 'IPv4StaticAddresses', expecting an array
'172.17.21.34' is not a valid setting for 'IPv4StaticAddresses'
set IPv4StaticAddresses=f"[{{ {172.17.21.34}, {255.255.255.0}, {172.17.21.1} }}] --filter "@odata.id=/redfish/v1/Managers/1/EthernetInterfaces/1/"
'f"[{{' is not a valid setting for 'IPv4StaticAddresses', expecting an array
'f"[{{' is not a valid setting for 'IPv4StaticAddresses'
What is the syntax to set the first element of the IPv4StaticAddresses array ? I tried multiple variants of the following but failed with ilorest 3.1.1 against iLO 5 2.30:
As a result, the array is wrongly filled up with 3 elements, like in the attached picture.