python-dracclient

Christopher.Dearborn at dell.com Christopher.Dearborn at dell.com
Tue Jun 16 13:46:53 UTC 2020


My apologies if this email is a duplicate.  Resending because I had some issues with my subscription and can’t tell if the original was actually delivered to the list or not.


Thanks,

Chris

From: Dearborn, Chris
Sent: Monday, June 15, 2020 4:52 PM
To: 'Ewan Hamilton'
Cc: 'openstack-discuss at lists.openstack.org'
Subject: RE: python-dracclient

Hey Ewan,

Good to meet you!  We’re thrilled that you are looking at using python-dracclient to work with your Dell EMC servers.

Python-dracclient was originally developed for use by the iDRAC driver in the Ironic project.  The iDRAC driver documentation needed quite a bit of work as well, and I’m happy to say that we did overhaul it in a recent release.  Since python-dracclient has been a library primarily used by Ironic, the documentation for it has been overlooked up to this point.  We instead have focused on adding new features and functionality, as well as fixing the occasional bug in both python-dracclient and the Ironic iDRAC driver.  As a result of your email, we’re looking at updating the documentation for python-dracclient in our upcoming release.

In the meantime, there are some great opensource examples that use python-dracclient, which will hopefully be helpful to you:

  *   This is a simple utility that checks to see if the iDRAC is ready to receive commands:
     *   https://github.com/dsp-jetpack/JetPack/blob/master/src/pilot/is_idrac_ready.py
     *   Note that this “is ready?” check is built into python-dracclient, so it’s not something you will need to do in your code.  You could replace the call to is_idrac_ready() in the example with another call though.
  *   This is a utility that resets the iDRAC, clears the job queue,  then configures the boot mode, boot device, iDRAC settings, and it will even optionally change the iDRAC password.  Note that this script works in a tripleo environment, so it will need some tweaking if you want to use it stand-alone:
     *   https://github.com/dsp-jetpack/JetPack/blob/master/src/pilot/config_idrac.py
  *   This is a utility that discovers iDRACs in an IP range that you provide including discovering the service tag and server model:
     *   https://github.com/dsp-jetpack/JetPack/blob/master/src/pilot/discover_nodes/discover_nodes.py
  *   And finally, the Ironic iDRAC driver makes extensive use of python-dracclient, but it is also probably the most complicated example:
     *   https://github.com/openstack/ironic/tree/master/ironic/drivers/modules/drac

As far as how python-dracclient originally got it’s name, I’m not really sure about that as we inherited the original repo from other developers who no longer work on the project.  I suspect it was picked because it followed the naming conventions of at least some other library repos in OpenStack at that time.

The WSManClient class is defined in https://github.com/openstack/python-dracclient/blob/master/dracclient/client.py, and it is a class that is only used internally to python-dracclient.  To use python-dracclient, you should only have to:

from dracclient import client

Then, you can call any method in the DRACClient class here:
https://github.com/openstack/python-dracclient/blob/master/dracclient/client.py#L41

If you want to view the python-dracclient code in a development environment editor, then you would need to modify the PYTHONPATH or equivalent in the dev environment to include the path to the directory containing python-dracclient/dracclient/client.py, and then it should be able to resolve everything.

Feel free to reply on this list if you need a hand, or you can always email me directly.


Thanks and happy hacking!

Chris Dearborn
Software Sr Principal Engr
Dell EMC | Service Provider Engineering
Christopher.Dearborn at Dell.com<mailto:Christopher.Dearborn at Dell.com>

From: Ewan Hamilton <ewan.hamilton at managed.co.uk<mailto:ewan.hamilton at managed.co.uk>>
Sent: Monday, June 15, 2020 1:43 PM
To: openstack-discuss at lists.openstack.org<mailto:openstack-discuss at lists.openstack.org>
Subject: python-dracclient


[EXTERNAL EMAIL]
Hi guys,

Your documentation for python-dracclient begins here: https://docs.openstack.org/python-dracclient/latest/usage.html  with


Usage
Create a client object by providing the connection details of the DRAC card:

client = wsmanclient.client.DRACClient('1.2.3.4', 'username', 's3cr3t')


There is no import statement – and when I have searched google and found “import dracclient” because the assumed “import python-dracclient” doesn’t work due to a hyphen (why would you name your module with a hyphen in the first place?!), it doesn’t recognise “wsmanclient” in the editor still.

Can you see just how frustrating this is for someone who expects documentation that actually works and explains how to actually use the module?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20200616/0c802b8a/attachment-0001.html>


More information about the openstack-discuss mailing list