dell / omsdk

Dell EMC OpenManage Python SDK
Apache License 2.0
57 stars 20 forks source link

smtp_ip_address can't be hostname #22

Closed Klaas- closed 1 year ago

Klaas- commented 2 years ago

QwikContext

smtp_ip_address can't be a hostname, error message: IPAddressField returned failure for mail.example.com but using a hostname should be possible

Details

According to https://raw.githubusercontent.com/dell/omsdk/devel/docs/OMSDK%20API%20Reference%20Guide.pdf it can be: "Enter the IPv4 or IPv6 address of the SMTP server or the FQDN / DNS name. The IP address entered must be in the dot separated format. For example, 143.166.154.1." Using an IP works fine, using a fqdn/dns name does not work

Repro Steps

I am not using the sdk directly, but via https://github.com/dell/dellemc-openmanage-ansible-modules Reproduce via a simple task:

- name: Configure Mail Alerts
  dellemc.openmanage.dellemc_configure_idrac_eventing:
    idrac_ip: 123.123.123.123
    idrac_user: username
    idrac_password: password
    share_name: "{{ playbook_dir }}"
    email_alert_state: "Enabled"
    address: target@example.com
    smtp_ip_address: mail.example.com
    alert_number: 1

Impact

Can not set a fqdn/dns name for smtp server, in our setup we have multiple smtp servers behind a round robin dns entry.

NeedBy

Me and anyone not setting an IP as smtp server

Tested omsdk version: 1.2.478

Severity

Severity 3

Klaas- commented 2 years ago

I think https://github.com/dell/omsdk/blob/9c659e3508fda7c9dbc0a4c6cb45b3a5632b184a/omdrivers/types/iDRAC/iDRAC.py#L2740 needs to be changed to a String field, I'll give it a try and report back

iehrenwaldDK commented 2 years ago

Any idea when/if this would be merged into main via PR? My org. is running into this issue too and it's annoying.

Klaas- commented 2 years ago

@felixs88 @jagadeeshnv ?

kozubmat commented 2 years ago

Hi! Is there any chance to resolve / workaround with fqdn smtp address ? @Klaas

Klaas- commented 2 years ago

@kozubmat you can manually apply the patch proposed in https://github.com/dell/omsdk/pull/24