Giter Site home page Giter Site logo

omsdk's Introduction

Dell OpenManage Python SDK

Dell OpenManage Python SDK (OMSDK) is a python library that helps developers and customers to automate the lifecycle management of PowerEdge Servers. OMSDK module leverages the iDRAC's REST APIs based on DMTF Redfish standards as well as WS-Man and SNMP protocols for configuration, deployment, updates and monitoring of PowerEdge Servers. In addition, OMSDK also supports monitoring and querying inventory information for PowerEdge Modular Infrastructure (M1000e, VRTX and FX2).

Supported Systems

All Dell PowerEdge 12th and above Generation of PowerEdge Servers, and Chassis Management Controllers of Dell PowerEdge M1000e, Dell PowerEdge VRTX and Dell PowerEdge FX2 Chassis

  • iDRAC7 and iDRAC8 with Firmware Versions 2.41.40.40 or above
  • iDRAC9 with Firmware Versions 3.00.00.00 or above

Prerequisites

Dell OpenManage Python SDK is supported for python 2.7 and above.

  • Install the prerequisites using the requirements file on python 2.x as:

    pip install -r requirements-python2x.txt

  • Install the prerequisites using the requirements file on python 3.x as:

    pip3 install -r requirements-python3x.txt

Installation

  • This branch contains the build version 1.2.513

  • Install the latest development version from github:

    git clone https://github.com/dell/omsdk.git
    cd omsdk
    sh build.sh 1.2 513
    cd dist
    pip install omsdk-1.2.513-py2.py3-none-any.whl
    
    • If omsdk build creation fails due to python command error, configure python to launch either python2 or python3. Accordingly configure the pip command.

    • Upgrading to latest version of python setuptools and wheel is recommended.

    • omsdk installation may fail with pip version 10.0 and above, follow one of the following steps in such scenario

      • Downgrade pip version to lower than 10.0 and then install omsdk
      • Force install omsdk using: pip install --ignore-installed omsdk-1.2.513-py2.py3-none-any.whl

Uninstallation

  • Uninstall this module as follows:

       pip uninstall omsdk
    

Documentation

Refer to the documentation for details on how to use this SDK

Licensing

Licensed under the Apache Software License, version 2.0 (the "License"); you may not use this file except in compliance with the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Support

  • Dell OpenManage Python SDK is supported by OpenManage developers team.
  • If you want to report any issue, then please report it by creating a new issue here
  • If you have any requirements that is not currently addressed, then please let us know by creating a new issue here
  • If you want to provide any feedback to the development team, then you can do so by sending an email to [email protected]

Authors

OpenManageSDK ([email protected])

omsdk's People

Contributors

eviden-simon-hill avatar felixs88 avatar felsen avatar jagadeeshnv avatar klaas- avatar rajeevarakkal avatar sachin-apa avatar thebeanogamer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

omsdk's Issues

Dell EMC OMSDK library is required for this module

Hi,

I have created a playbook to update the Dell servers, but I am getting the following error, when I checked, the package seems to be installed.

Thanks,

  • FAILED! => {"changed": false, "msg": "Dell EMC OMSDK library is required for this **module"}

OS: Ubuntu 22.04.1 LTS

ansible --version
ansible [core 2.13.3]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]
jinja version = 3.0.3
libyaml = True

omsdk/dist# pip list -v
ansible 6.3.0 /usr/lib/python3/dist-packages
ansible-core 2.13.3 /usr/lib/python3/dist-packages
attrs 21.2.0 /usr/lib/python3/dist-packages
Automat 20.2.0 /usr/lib/python3/dist-packages
Babel 2.8.0 /usr/lib/python3/dist-packages
bcrypt 3.2.0 /usr/lib/python3/dist-packages
blinker 1.4 /usr/lib/python3/dist-packages
certifi 2020.6.20 /usr/lib/python3/dist-packages
chardet 4.0.0 /usr/lib/python3/dist-packages
click 8.0.3 /usr/lib/python3/dist-packages
cloud-init 22.2 /usr/lib/python3/dist-packages
colorama 0.4.4 /usr/lib/python3/dist-packages
command-not-found 0.3 /usr/lib/python3/dist-packages
configobj 5.0.6 /usr/lib/python3/dist-packages
constantly 15.1.0 /usr/lib/python3/dist-packages
cryptography 3.4.8 /usr/lib/python3/dist-packages
dbus-python 1.2.18 /usr/lib/python3/dist-packages
distro 1.7.0 /usr/lib/python3/dist-packages
distro-info 1.1build1 /usr/lib/python3/dist-packages
docopt 0.6.2 /usr/local/lib/python3.10/dist-packages pip
future 0.18.2 /usr/local/lib/python3.10/dist-packages pip
httplib2 0.20.2 /usr/lib/python3/dist-packages
hyperlink 21.0.0 /usr/lib/python3/dist-packages
idna 3.3 /usr/lib/python3/dist-packages
importlib-metadata 4.6.4 /usr/lib/python3/dist-packages
incremental 21.3.0 /usr/lib/python3/dist-packages
ipaddress 1.0.23 /usr/local/lib/python3.10/dist-packages pip
jeepney 0.7.1 /usr/lib/python3/dist-packages flit
Jinja2 3.0.3 /usr/lib/python3/dist-packages
jmespath 0.10.0 /usr/lib/python3/dist-packages
jsonpatch 1.32 /usr/lib/python3/dist-packages
jsonpointer 2.0 /usr/lib/python3/dist-packages
jsonschema 3.2.0 /usr/lib/python3/dist-packages
keyring 23.5.0 /usr/lib/python3/dist-packages
launchpadlib 1.10.16 /usr/lib/python3/dist-packages
lazr.restfulclient 0.14.4 /usr/lib/python3/dist-packages
lazr.uri 1.0.6 /usr/lib/python3/dist-packages
MarkupSafe 2.0.1 /usr/lib/python3/dist-packages
more-itertools 8.10.0 /usr/lib/python3/dist-packages
netifaces 0.11.0 /usr/lib/python3/dist-packages
ntlm-auth 1.4.0 /usr/lib/python3/dist-packages
oauthlib 3.2.0 /usr/lib/python3/dist-packages
omsdk 1.2.490 /usr/local/lib/python3.10/dist-packages pip
packaging 21.3 /usr/lib/python3/dist-packages
paramiko 2.9.3 /usr/lib/python3/dist-packages
pexpect 4.8.0 /usr/lib/python3/dist-packages
pip 22.0.2 /usr/lib/python3/dist-packages
ply 3.11 /usr/local/lib/python3.10/dist-packages pip
prompt-toolkit 3.0.31 /usr/local/lib/python3.10/dist-packages pip
ptyprocess 0.7.0 /usr/lib/python3/dist-packages flit
pyasn1 0.4.8 /usr/lib/python3/dist-packages
pyasn1-modules 0.2.1 /usr/lib/python3/dist-packages
pycryptodomex 3.15.0 /usr/local/lib/python3.10/dist-packages pip
pyflakes 2.5.0 /usr/local/lib/python3.10/dist-packages pip
Pygments 2.13.0 /usr/local/lib/python3.10/dist-packages pip
PyGObject 3.42.1 /usr/lib/python3/dist-packages
PyHamcrest 2.0.2 /usr/lib/python3/dist-packages
PyJWT 2.3.0 /usr/lib/python3/dist-packages
pykerberos 1.1.14 /usr/lib/python3/dist-packages
pymacaroons 0.13.0 /usr/lib/python3/dist-packages
PyNaCl 1.5.0 /usr/lib/python3/dist-packages
pyOpenSSL 21.0.0 /usr/lib/python3/dist-packages
pyparsing 2.4.7 /usr/lib/python3/dist-packages
pyrsistent 0.18.1 /usr/lib/python3/dist-packages
pyserial 3.5 /usr/lib/python3/dist-packages
pysmi 0.3.4 /usr/local/lib/python3.10/dist-packages pip
pysnmp 4.4.12 /usr/local/lib/python3.10/dist-packages pip
pysnmp-mibs 0.1.6 /usr/local/lib/python3.10/dist-packages pip
python-apt 2.3.0+ubuntu2.1 /usr/lib/python3/dist-packages
python-debian 0.1.43ubuntu1 /usr/lib/python3/dist-packages
pytz 2022.1 /usr/lib/python3/dist-packages
pyvim 3.0.3 /usr/local/lib/python3.10/dist-packages pip
pyvmomi 7.0.3 /usr/local/lib/python3.10/dist-packages pip
pywinrm 0.3.0 /usr/lib/python3/dist-packages
PyYAML 5.4.1 /usr/lib/python3/dist-packages
requests 2.25.1 /usr/lib/python3/dist-packages
requests-kerberos 0.12.0 /usr/lib/python3/dist-packages
requests-ntlm 1.1.0 /usr/lib/python3/dist-packages
resolvelib 0.8.1 /usr/lib/python3/dist-packages
SecretStorage 3.3.1 /usr/lib/python3/dist-packages
service-identity 18.1.0 /usr/lib/python3/dist-packages
setuptools 59.6.0 /usr/lib/python3/dist-packages
six 1.16.0 /usr/lib/python3/dist-packages
sos 4.3 /usr/lib/python3/dist-packages
ssh-import-id 5.11 /usr/lib/python3/dist-packages
systemd-python 234 /usr/lib/python3/dist-packages
Twisted 22.1.0 /usr/lib/python3/dist-packages
ubuntu-advantage-tools 27.9 /usr/lib/python3/dist-packages
ufw 0.36.1 /usr/lib/python3/dist-packages
unattended-upgrades 0.1 /usr/lib/python3/dist-packages
urllib3 1.26.5 /usr/lib/python3/dist-packages
wadllib 1.3.6 /usr/lib/python3/dist-packages
wcwidth 0.2.5 /usr/local/lib/python3.10/dist-packages pip
wheel 0.37.1 /usr/lib/python3/dist-packages
xmltodict 0.12.0 /usr/lib/python3/dist-packages
zipp 1.0.0 /usr/lib/python3/dist-packages
zope.interface 5.4.0 /usr/lib/python3/dist-packages

pip install from github repository fails

QwikContext

pip install from github repository fails

Details

anupam@ubuntu:~/workspace$ pip install git+https://github.com/dell/omsdk.git
Collecting git+https://github.com/dell/omsdk.git
  Cloning https://github.com/dell/omsdk.git to /tmp/pip-xvprwQ-build
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    IOError: [Errno 2] No such file or directory: '/tmp/pip-xvprwQ-build/setup.py'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-xvprwQ-build/

Repro Steps

Try running the pip command listed in above section for installing omsdk module from github repository

Impact

I prefer to use pip to install the python modules from github branch directly as that is so much easy than cloning the branch, building the wheels package and then use pip to install the wheels package.

NeedBy

Immediately

Severity

Severity 3 - Low

Ability to gunzip a Catalog XML

QwikContext

We are currently trying to use the dellemc-openmanage-ansible-modules to install iDrac firmware updates from ftp.dell.com, however the Catalog.xml at Dell's website is gzipped. We need the ability for these modules (specifically the SDK) to be able to gunzip the downloaded file.

Details

See above.

Repro Steps

Attempt to update an iDrac (using dellemc-openmanage-ansible-modules) firmware from ftp.dell.com.

Impact

Unable to update from dell.com.

NeedBy

ASAP?

Severity

... High? ๐Ÿ˜…

Installation on macos no recognised

QwikContext

Installation on macos goes well but it does not work.

Details

Installation on macos 11.4 is possible and goes well but trying a simple playbook returns always following error:
fatal: [idrac-er099-rminv2]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "Dell EMC OMSDK library is required for this module"}

Repro Steps

% python --version
Python 3.9.6
% pip install omsdk --upgrade
% ansible-playbook test.yaml -i inventory_idrac -l net -k
SSH password:

PLAY [all] **********************************************************************************************************************************************************************

TASK [Get hardware inventory] ***************************************************************************************************************************************************
[WARNING]: Platform darwin on host idrac-er099-rminv2 is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python interpreter could
change the meaning of that path. See https://docs.ansible.com/ansible/2.11/reference_appendices/interpreter_discovery.html for more information.
fatal: [idrac-er099-rminv2]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "Dell EMC OMSDK library is required for this module"}
[WARNING]: Platform darwin on host idrac-er095-rminv2 is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python interpreter could
change the meaning of that path. See https://docs.ansible.com/ansible/2.11/reference_appendices/interpreter_discovery.html for more information.
fatal: [idrac-er095-rminv2]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "Dell EMC OMSDK library is required for this module"}

PLAY RECAP **********************************************************************************************************************************************************************
idrac-er095-rminv2         : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
idrac-er099-rminv2         : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Severity

Blocking

How do i install on RHEL 8

QwikContext

Trying to install omsdk on rhel 8

Details

While trying to get Dell idrac Firmware details with Ansible module

TASK [Import Server Configuration Profile from a network] ***************************************************************************************************
fatal: [idrac_hosts]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/libexec/platform-python"}, "changed": false, "msg": "Dell EMC OMSDK library is required for this module"}

Repro Steps

Create playbook as below:

  • hosts: hosts
    name: Get Installed Firmware Inventory
    gather_facts: False

    tasks:

    • name: Import Server Configuration Profile from a network
      idrac_server_config_profile:
      idrac_ip: "IP"
      idrac_user: "username"
      idrac_password: "password"
      command: "import"
      share_name: "/home/ansible"
      share_user: "username"
      share_password: "password"
      scp_file: "scp_filename.yml"
      scp_components: "ALL"
      job_wait: True

Impact

Not able to install on rhel 8 server

NeedBy

When do you need this issue fixed

Severity

What is the severity of the issue.

Bad Release (1.2.370) on PyPI

QwikContext

The 1.2.370 on PyPI does not contain what's tagged in 1.2.370-master or 1.2.730-devel. Specifically we noticed that the function update_from_repo_url is missing from iDRACUpdate.py.

Details

We're trying to use the iDRACUpdate's update_from_repo_url function, however when you pip install omsdk and it installs via the PyPI package, that function is not there (even though it is present in the git tag).

This leads me to believe that it was a bad release to PyPI.

Repro Steps

Adjust the grep command as needed depending on where your packages are installed to.

pip install omsdk
grep update_from_repo_url ~/.pyenv/versions/2.7.15/envs/testvenv/lib/python2.7/site-packages/omdrivers/lifecycle/iDRAC/iDRACUpdate.py
  • Notice that there is no result.
git clone -b v1.2.370-devel https://github.com/dell/omsdk.git 
cd omsdk
sh build.sh 1.2 370 
cd dist 
pip install omsdk-1.2.370-py2.py3-none-any.whl omdrivers-1.2.370-py2.py3-none-any.whl
grep update_from_repo_url ~/.pyenv/versions/2.7.15/envs/cyclops-ansible/lib/python2.7/site-packages/omdrivers/lifecycle/iDRAC/iDRACUpdate.py
  • Notice how the function is there.

Impact

What areas, configurations and use cases does this issue impact
Is there a data loss? No

NeedBy

We would just like a properly working release pushed to PyPI.

Severity

Low

Not compatible with Python 3.6 due to enum34 requirement

QwikContext

Not compatible with Python 3.6 due to enum34 requirement

Details

enum34 does not appear to be compatible with Python 3.6 and when you install omsdk via pip it installs enum34 and breaks other Python 3.6 applications.

Repro Steps

Steps to reproduce the problem
/opt/rh/rh-python36/root/usr/bin/pip3 install omsdk
or via documented build steps.

Impact

What areas, configurations and use cases does this issue impact
Unable to use omsdk due to this issue.

NeedBy

When do you need this issue fixed
As soon as possible. Currently unable to use omsdk until this is resolved.

Severity

What is the severity of the issue.
High

TypeManager issue: is_changed() returns False when you set an EnumTypeField to a String

QwikContext

TypeManager issue: is_changed() returns False when you set an EnumTypeField to a String

Details

>>> idrac.config_mgr._sysconfig.BIOS.PxeDev2EnDis = "Enabled"
>>> idrac.config_mgr._sysconfig.BIOS.is_changed()
False
>>> idrac.config_mgr._sysconfig.BIOS.PxeDev2EnDis = TypeHelper.convert_to_enum("Enabled", PxeDev2EnDisTypes)
>>> idrac.config_mgr._sysconfig.BIOS.is_changed() 
True

Repro Steps

Run the above code snippet

Impact

Not able to import the Server Configuration Profile since is_changed returns False.

NeedBy

Immediately

Severity

Severity -2 - Medium

Use of Deprecated PySNMP Listener

QwikContext

omsdk.sdksnmptrap uses pysnmp.carrier.asynsock, which will be removed in future pysnmp releases and does not work on Python 3.12.

Details

omsdk.sdksnmptrap and omsdk.sdktrapreceiver import pysnmp.carrier.asynsock. This will be removed from PySNMP soon (etingof/pysnmp@b186168) however this poses a more immediate problem for Python 3.12. Python 3.12 has removed support for asyncore entirely (python/cpython#96580), so it'd probably be best to switch to the asyncio support in PySNMP on Python 3.

Repro Steps

  1. Install Python 3.12 (a Fedora Rawhide container is probably the fastest way).
  2. pip install omsdk
  3. Import omsdk.sdksnmptrap in a Python file.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.12/site-packages/omsdk/sdksnmptrap.py", line 23, in <module>
    from pysnmp.carrier.asynsock.dispatch import AsynsockDispatcher
  File "/usr/local/lib/python3.12/site-packages/pysnmp/carrier/asynsock/dispatch.py", line 7, in <module>
    from pysnmp.carrier.asyncore.dispatch import *
  File "/usr/local/lib/python3.12/site-packages/pysnmp/carrier/asyncore/dispatch.py", line 10, in <module>
    from asyncore import socket_map
ModuleNotFoundError: No module named 'asyncore'

Impact

Unable to use omsdk.sdksnmptrap or omsdk.sdktrapreceiver on Python 3.12.

NeedBy

Before Python 3.12 becomes mainstream.

Severity

Medium

Exporting SCP from redfish is currently not using the right method

QwikContext

For exporting SCP using redfish (and local share), we are using _scp_export_to_local_share_redfish, this method is not defined in https://github.com/dell/omsdk/blob/5d2ead24b10fd213fb32d5bb9a8a8fb6ef8be2a2/omdrivers/lifecycle/iDRAC/iDRACConfig.py#L2372

Details

_scp_export_to_local_share_redfish is actually defined in https://github.com/dell/omsdk/blob/5d2ead24b10fd213fb32d5bb9a8a8fb6ef8be2a2/omdrivers/lifecycle/iDRAC/iDRACConfig.py#L197 which is as I understand it is for WsMan only, meaning that when we instantiate PREDFISH, we're getting commands from https://github.com/dell/omsdk/blob/5d2ead24b10fd213fb32d5bb9a8a8fb6ef8be2a2/omdrivers/lifecycle/iDRAC/iDRACConfig.py#L2372 which lacks that method.

The call for that method is here: https://github.com/dell/omsdk/blob/master/omdrivers/lifecycle/iDRAC/iDRACConfig.py#L4964

That comment seems to imply that actions are ongoing around these methods: https://github.com/dell/omsdk/blob/master/omdrivers/lifecycle/iDRAC/iDRACConfig.py#L2064

Repro Steps

Use https://github.com/dell/Dell-EMC-Ansible-Modules-for-iDRAC with the following configuration:

---
- hosts: oob
  name: Export Server Configuration Profile to local folder
  connection: local
  gather_facts: False

  tasks:
    - name: Export Server Configuration Profile to local folder
      dellemc_export_server_config_profile:
        idrac_ip:        "{{ inventory_hostname }}"
        idrac_user:      "root"
        idrac_pwd:       'password'
        share_name:      "{{ playbook_dir }}"
        scp_components:  "ALL"
        job_wait:        "True"
      tags:
        - scp_components_bios
      delegate_to: localhost

It'll return an empty dict that won't be written to the file you specify in share_name.

Impact

I can't export SCP to local file, import seems to be impacted as well if I read it correctly.

NeedBy

ASAP, happy to help, I can probably copy/move the methods over to https://github.com/dell/omsdk/blob/5d2ead24b10fd213fb32d5bb9a8a8fb6ef8be2a2/omdrivers/lifecycle/iDRAC/iDRACConfig.py#L2372 but I'm not sure if their absence is intended or n

Severity

Export is not working so Major.

AttributeError: 'iDRACCredsMgmt' object has no attribute 'create_user'

QwikContext

Client version (where I run the code):

  • Python3.9 (with omsdk: 1.2.509)
  • Rocky Linux release 8.5

Target server: Dell EMC R720xd

Details

I found in the doc the way to create a user, but it's not working for some reason. Here is the code I'm using:

from omsdk.sdkcreds import UserCredentials
from omsdk.sdkinfra import sdkinfra

sd = sdkinfra()
sd.importPath()

idrac = sd.find_driver("<ip>", UserCredentials("<username>","<password>"))
if idrac:
  idrac.user_mgr.create_user("<new_username>", "<new_password>", "<user_priv>")
  idrac.disconnect()
else:
  print("Cannot connect to the server")

Here is the output:

(.venv) $ python3.9 main.py 
Traceback (most recent call last):
  File "main.py", line 9, in <module>
    idrac.user_mgr.create_user("<new_username>", "<new_password>", "<user_priv>")
AttributeError: 'iDRACCredsMgmt' object has no attribute 'create_user'

Repro Steps

Run the code above

Impact

N/A

NeedBy

As soon as possible

Severity

N/A

Mechanism for installing via RPM

QwikContext

I think many sysadmins would prefer to install via RPM(s) in RHEL-like environments.

Details

To support the building of RPMs a RPM spec file is required. I think dependencies can also be pulled from EPEL rather than PyPI.

Impact

See #18 and #19 for users that might benefit from this.

Query About Repository Structure

QwikContext

I'm not clear on why the Wheel for omsdk includes omdrivers rather than depending on it and would appreciate some clarification please.

Details

Apologies if this isn't the correct place to raise this, but I haven't been able to figure it out on my own. I'm currently attempting to package omsdk for Fedora (and by extension, RHEL), but I'm running into issues with the way this repo is laid out. Could you please explain why omsdk bundles omdrivers into its wheel, rather than depending on it?

I've got a Fedora-friendly RPM for omdrivers, and am trying to make one for omsdk, but don't think I can without unpicking the two modules.

This does also mean that if you pip install omsdk omdrivers, then you will end up with duplicate installs.

Repro Steps

N/A

Impact

I am very confused.

NeedBy

When convenient.

Severity

Low.

Enhancement to add CMC Chassis Controller MAC Address to enum

QwikContext
Enhancement to retrieve Chassis Controller MAC Address, not referring to FlexMAC.

Details
Requesting to add Chassis Controller MAC Address to Controller or CMC json output, if possible.

cmc.get_partial_entityjson(cmc.ComponentEnum.Controller)
cmc.get_partial_entityjson(cmc.ComponentEnum.CMC)

If possible have as default in a enum list add Chassis Controller MAC Address, just like HostName and AssetTag. (Only for CMC, WSMan)

ret['System'][0]['PermanentMACAddress']

Impact
No impact. This is an enhancement request.

Severity
Severity 4 - Low

OMSDK incompatible with Python 3.12

Problem

OMSDK does not work with Python 3.12

Details

It's trying to import the imp module which has been removed from 3.12.

Repro Steps

Works in 3.9:

(py3.9) โžœ  ~ python3.9
Python 3.9.6 (default, Dec  7 2023, 05:42:47)
[Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from omsdk.sdkinfra import sdkinfra
>>>

Not working in 3.12:

(py3) โžœ ~ python 
Python 3.12.1 (main, Dec  7 2023, 20:45:44) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import omsdk
>>> from omsdk.sdkinfra import sdkinfra
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/bugreport/.local/py3/lib/python3.12/site-packages/omsdk/sdkinfra.py", line 24, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'
>>>

Impact

The dellemc_idrac_storage_volume Ansible module depends on this.

NeedBy

Update sdkinfra.py to use importlib?

Severity

This prevents any organizations to upgrade to Python3.12 on machines managing Dell machines using Ansible.

"iDRACLicense is not defined" error when running dellemc_nagios_discovery_service_utility

QwikContext

context : nagios 4.4.6 running on redhat 8.6 using omsdk 1.2.490 with python 3.6.8
target : DELL server R740xd iDRAC9 firmware 3.21.21.21 running Esxi 6.7

Details

got the following error message when running the command dellemc_nagios_discovery_service_utility.py
Command execution is in progress...
Dell EMC device discovery is in progress...
Process Process-1:
Traceback (most recent call last):
NameError: name 'iDRACLicense' is not defined
SNMPTT is not installed/configured. Traps service will not be created

Repro Steps

install omsdk directly (pip not used)
install Dell_EMC_OpenManage_Plugin_v3.1_Nagios_Core_A00.tar.gz without snmp
run the following command
[root@mymachine nagios]# python3 dell/scripts/dellemc_nagios_discovery_service_utility.py --host=192.168.0.100 --prefProtocol=3 --http.user=root --http.password=mypassword --output.file=/etc/nagios/dell/config/objects/

Impact

NeedBy

Severity

Adding Subject Alternative Names support to CSR generation

QwikContext

The SecurityCSC does not allow you to specify subject Alternative Names when creating a certificate signing request.

Details

iDRAC 4.40 introduced the ability to generate a CSR with subject alternative names through the RedFish API. The documentation can be seen here

Repro Steps

Steps to reproduce the problem

Impact

This would be extending the existing certificate signing request functionality.

NeedBy

Sooner the better would be nice :)

Severity

Low

ModuleNotFoundError: No module named 'omsdk.sdkproto'

QwikContext

As in a subject line: ModuleNotFoundError: No module named 'omsdk.sdkproto'

Details

Traceback (most recent call last):
File "/usr/local/nagios/dell/scripts/dellemc_device_check.py", line 26, in
from omsdk.sdkproto import SNMPOptions
ModuleNotFoundError: No module named 'omsdk.sdkproto'

Repro Steps

python3.9 dellemc_device_check.py --host x.x.x.x

Impact

OpenManage Plug-in Version 3.2.0 does not work on Nagios

NeedBy

ASAP

Severity

N/A

Untracked Dependancy on pywinrm

QwikContext

omsdk.http.sdkwmi requires winrm to function, but it is not in requirements.txt

Details

omsdk.http.sdkwmi imports functions from the winrm module, but this dependency is not expressed anywhere. That means that anyone installing this module from PyPi will get an error if they try and use that class. Given that Ansible also uses pywinrm (https://docs.ansible.com/ansible/latest/os_guide/windows_winrm.html#what-is-winrm), I'm guessing that this was missed by accident as it was already installed.

Repro Steps

  1. pip install omsdk
  2. Import omsdk.http.sdkwmi in a Python file.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.12/site-packages/omsdk/http/sdkwmi.py", line 25, in <module>
    from winrm.transport import Transport
ModuleNotFoundError: No module named 'winrm'

Impact

Error when using omsdk.http.sdkwmi until user manually runs pip install pywinrm.

NeedBy

Whenever convenient.

Severity

Low.

python-future is now deprecated

Details

python-future is now deprecated and does not work with python 3.12. From gentoo's package notes:

# Deprecated, doesn't work with python 3.12. Unmaintained with last
# serious release in 2019, and another release in 2024 that claims
# to support python 3.12 but fails tests if you actually do. No
# route to making it work with python 3.13 at all, and upstream
# explicitly states that future "like Python 2, is now done". The
# package is entirely redundant to packages not supporting python
# 2 anymore, and the ones that do support it should be using
# dev-python/six instead, anyways.  Bug #888271
# Removal on 2024-04-13.

Impact

If this project does depend on future (as stated in requirements-python3x.txt), it will stop working or present with issues starting with python 3.12.

NeedBy

future library should be purged from this project before distributions ship with python 3.12 or potentially 3.13 as the default. Until fixed, users should be instructed to use a virtualenv with <python-3.12.

Severity

Moderate.

smtp_ip_address can't be hostname

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: [email protected]
    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

Import Error - SNIMissingWarning

QwikContext

With urllib3 > 1.26.11 importing omsdk fails with an error that SNIMissingWarning is undefined

Details

SLES 15.4 with Python 3.10. Importing OMSDK to use dellemc.openmanage module in ansible.
Getting an error any time I try to invoke "dellemc.openmanage.idrac_reset" that OMSDK must be installed - however it is installed.

Further debugging reveals that it is failing on import due to this line in omsdk/http/sdkhttpep.py (line28):
from requests.packages.urllib3.exceptions import SNIMissingWarning

After release 1.26.11 urllib3 removed this definition

Repro Steps

With urllib3 > 1.26.11 attempt to import omsdk.

Impact

Loss of function for OMSDK and dependent packages like dellemc.openmanage.

NeedBy

When do you need this issue fixed

Severity

What is the severity of the issue.

IndexError: string index out of range

Error Message:

File "/usr/local/python3/lib/python3.7/site-packages/omsdk/sdkbase.py", line 489, in get_entityjson
    if not self.my_get_entityjson():
  File "/usr/local/python3/lib/python3.7/site-packages/omsdk/sdkbase.py", line 447, in my_get_entityjson
    return self.get_partial_entityjson(*plist)
  File "/usr/local/python3/lib/python3.7/site-packages/omsdk/sdkbase.py", line 461, in get_partial_entityjson
    enjson = self.cfactory.enumerate_list(self.entityjson, *comps)
  File "/usr/local/python3/lib/python3.7/site-packages/omsdk/sdkconnfactory.py", line 191, in enumerate_list
    comp_details = self.enumerate_view(comp)
  File "/usr/local/python3/lib/python3.7/site-packages/omsdk/sdkconnfactory.py", line 126, in enumerate_view
    retval = connection.enumerate_view(index, True)
  File "/usr/local/python3/lib/python3.7/site-packages/omsdk/sdkproto.py", line 411, in enumerate_view
    return self._enumerate_view(index, self.views, bTrue)
  File "/usr/local/python3/lib/python3.7/site-packages/omsdk/sdkproto.py", line 471, in _enumerate_view
    self._apply_spec(i, en)
  File "/usr/local/python3/lib/python3.7/site-packages/omsdk/sdkproto.py", line 344, in _apply_spec
    rjson[i] = str(':'.join([s[j] + s[j + 1] for j in range(2, 12, 2)]))
  File "/usr/local/python3/lib/python3.7/site-packages/omsdk/sdkproto.py", line 344, in <listcomp>
    rjson[i] = str(':'.join([s[j] + s[j + 1] for j in range(2, 12, 2)]))

Although I worked it out that way๏ผš
Edit sdkproto.py
image
I still hope the official can adjust it.
THX.

SCP import fails via CIFS/NFS

QwikContext

iDRAC firmware 3.30.30.30 changed the parameter for "UserName" to "Username" in iDRACConfig.py _scp_import_redfish

This prevents OMAM from working correctly.
dell/dellemc-openmanage-ansible-modules#45

System: R7415
iDRAC version: 3.30.30.30
BIOS: 1.7.6

Details

Detailed description of the issue. Include screenshots or API examples if needed.

Repro Steps

14G Server with 3.30.30.30 iDRAC firmware.
see here: dell/dellemc-openmanage-ansible-modules#45
And here:
#5

Impact

Can't change profiles anymore via SCPs on network shares

OMSDK is Now Available in Fedora

OMSDK and OMDrivers are now available in Fedora!

We use this library extensively at @LMAX-Exchange as part of https://github.com/dell/dellemc-openmanage-ansible-modules, so have put the effort into packaging this as an RPM.

Over the next week or two, python-omsdk will become available in Fedora 37-40, which may cause it to be included in RHEL 10. You can monitor this rollout on https://packages.fedoraproject.org/pkgs/python-omsdk/python3-omsdk/.

Don't worry, this doesn't require any action from you. When you create a new GitHub release, this will be automatically merged into Fedora by https://packit.dev/.

Feel free to close this issue, I've just raised it for awareness. If you've any questions about this, I'm more than happy to answer them.

Install Dell-EMC-Ansible-Modules-for-iDRAC [failed]

QwikContext

I have failure when I tried to install Dell-EMC-Ansible-Modules-for-iDRAC

Details

Ansible is not installed.
FAILED: Dell EMC OpenManage Ansible Modules installation failed.

ASAP

Severity

p2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.