Closed ralfgro closed 1 year ago
Perso, I use a rawpatch
command with the following:
Identify the dedicated network interface URI:
ilorest get --json "@odata.id" --filter Name="Manager Dedicated Network Interface"
Perform rawpatch
on the resulting URI:
ilorest rawpatch SetDedicatedEthernetInterface.json
with the following content:
{
"/redfish/v1/Managers/1/EthernetInterfaces/1/": {
"DHCPv4": {
"DHCPEnabled": false,
"UseDNSServers": false,
"UseDomainName": false,
"UseGateway": false,
"UseNTPServers": false,
"UseStaticRoutes": false
},
"IPv4Addresses": [{
"Address": "172.228.75.2",
"Gateway": "172.228.72.1",
"SubnetMask": "255.255.252.0"
}]
}
}
ilorest iloreset
Thanks for the hint. It seems that I can't just c&p everything from the get command.
An I first need to select the type. Maybe because I've ilorest version 3.1-
iLOrest > get --json "@odata.id" --filter Name="Manager Dedicated Network Interface"
Unable to locate instance for 'ethernet' and filter 'Name="Manager'
iLOrest > select EthernetInterface.v1_4_1
iLOrest > get --json --filter Name="Manager Dedicated Network Interface"
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
------------------------------------------------------------------------------------------------------------------------------------------------------
{
"AutoNeg": true,
"DHCPv4": {
...
iLOrest > rawpatch /tmp/SetDedicatedEthernetInterface.json
The operation completed successfully.
{
"/redfish/v1/Managers/1/EthernetInterfaces/1/": {
"DHCPv4": {
"DHCPEnabled": false,
"UseDNSServers": false,
"UseDomainName": false,
"UseGateway": false,
"UseNTPServers": false,
"UseStaticRoutes": false
},
"IPv4Addresses": [{
"Address": "172.17.21.34",
"Gateway": "172.17.21.1",
"SubnetMask": "255.255.255.0"
}]
}
}
While it would be a good idea to update to the latest iLOrest version, I've forgotten to specify the selection of the EthernetInterface type in the command retrieving the URI of the dedicated manager interface:
ilorest get --json "@odata.id" --filter Name="Manager Dedicated Network Interface" --select EthernetInterface.
My bad. Sorry.
{ "@odata.id": "/redfish/v1/Managers/1/EthernetInterfaces/1/" }
I found this issue https://github.com/HewlettPackard/python-redfish-utility/issues/32 but the answer there does not help me to set a static address.
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 examples but none that really has all steps in a real world env.
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