dell / iDRAC-Redfish-Scripting

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

Configuring DNS Server #156

Closed markuszeiter closed 3 years ago

markuszeiter commented 3 years ago

As far as I can see you do not have implemented to configure DNS Servers: racadm set iDRAC.IPv4.DNSFromDHCP 0 racadm set iDRAC.IPv4.DNS1 y.y.y.y racadm set iDRAC.IPv4.DNS2 y.y.y.y

do you have any plans to implement this in the near future?

texroemer commented 3 years ago

Hi @markuszeiter

If using iDRAC 9, you can leverage "SetIdracLcSystemAttributesREDFISH.py" script to set these attributes using Redfish. See example below of using this script to set these attributes.

If you're using iDRAC 7/8, this script is not supported and you need to use Server Configuration Profile (SCP) feature. If you are using iDRAC 7/8 and need an example, let me know.

C:\Python39>SetIdracLcSystemAttributesREDFISH.py -ip 192.168.0.120 -u root -p calvin -s idrac -an IPv4.1.DNSFromDHCP,IPv4.1.DNS1,IPv4.1.DNS2 -av Disabled,"10.10.1.10","11.11.1.11"

- INFO, configuring "IDRAC" attributes

 Attribute Name: IPv4.1.DNSFromDHCP, setting new value to: Disabled
 Attribute Name: IPv4.1.DNS1, setting new value to: 10.10.1.10
 Attribute Name: IPv4.1.DNS2, setting new value to: 11.11.1.11

- PASS, PATCH command passed to successfully set "IDRAC" attribute(s), status code 200 returned

- INFO, getting new attribute current values

Attribute Name: IPv4.1.DNSFromDHCP, Attribute Value: Disabled
Attribute Name: IPv4.1.DNS1, Attribute Value: 10.10.1.10
Attribute Name: IPv4.1.DNS2, Attribute Value: 11.11.1.11
markuszeiter commented 3 years ago

HI @texroemer

Thank you very much for your message and example. This is working great ;).

Cheers Markus