<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:remialcxesans;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle22
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.pl-k
{mso-style-name:pl-k;}
span.pl-s1
{mso-style-name:pl-s1;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1451507653;
mso-list-type:hybrid;
mso-list-template-ids:1423231988 1621661366 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Calibri",sans-serif;
mso-fareast-font-family:Calibri;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hey Ewan,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Good to meet you! We’re thrilled that you are looking at using python-dracclient to work with your Dell EMC servers.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In the meantime, there are some great opensource examples that use python-dracclient, which will hopefully be helpful to you as examples:<o:p></o:p></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">This is a simple utility that checks to see if the iDRAC is ready to receive commands:<o:p></o:p>
<ul style="margin-top:0in" type="circle">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level2 lfo1"><a href="https://github.com/dsp-jetpack/JetPack/blob/master/src/pilot/is_idrac_ready.py">https://github.com/dsp-jetpack/JetPack/blob/master/src/pilot/is_idrac_ready.py</a><o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level2 lfo1">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.<o:p></o:p></li></ul>
</li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">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:<o:p></o:p>
<ul style="margin-top:0in" type="circle">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level2 lfo1"><a href="https://github.com/dsp-jetpack/JetPack/blob/master/src/pilot/config_idrac.py">https://github.com/dsp-jetpack/JetPack/blob/master/src/pilot/config_idrac.py</a><o:p></o:p></li></ul>
</li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">This is a utility that discovers iDRACs in an IP range that you provide including discovering the service tag and server model:<o:p></o:p>
<ul style="margin-top:0in" type="circle">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level2 lfo1"><a href="https://github.com/dsp-jetpack/JetPack/blob/master/src/pilot/discover_nodes/discover_nodes.py">https://github.com/dsp-jetpack/JetPack/blob/master/src/pilot/discover_nodes/discover_nodes.py</a><o:p></o:p></li></ul>
</li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">And finally, the Ironic iDRAC driver makes extensive use of python-dracclient, but it is also probably the most complicated example:<o:p></o:p>
<ul style="margin-top:0in" type="circle">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level2 lfo1"><a href="https://github.com/openstack/ironic/tree/master/ironic/drivers/modules/drac">https://github.com/openstack/ironic/tree/master/ironic/drivers/modules/drac</a><o:p></o:p></li></ul>
</li></ul>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The WSManClient class is defined in <a href="https://github.com/openstack/python-dracclient/blob/master/dracclient/client.py">
https://github.com/openstack/python-dracclient/blob/master/dracclient/client.py</a>, and it is a class that is only used internally to python-dracclient. To use python-dracclient, you should only have to:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span class="pl-k"><span style="font-family:"Courier New"">from</span></span><span style="font-family:"Courier New"">
<span class="pl-s1">dracclient</span> <span class="pl-k">import</span> <span class="pl-s1">
client<o:p></o:p></span></span></p>
<p class="MsoNormal"><span class="pl-s1"><o:p> </o:p></span></p>
<p class="MsoNormal"><span class="pl-s1">Then, you can call any method in the DRACClient class here:<o:p></o:p></span></p>
<p class="MsoNormal"><span class="pl-s1"><a href="https://github.com/openstack/python-dracclient/blob/master/dracclient/client.py#L41">https://github.com/openstack/python-dracclient/blob/master/dracclient/client.py#L41</a><o:p></o:p></span></p>
<p class="MsoNormal"><span class="pl-s1"><o:p> </o:p></span></p>
<p class="MsoNormal"><span class="pl-s1">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span class="pl-s1"><o:p> </o:p></span></p>
<p class="MsoNormal"><span class="pl-s1">Feel free to reply on this list if you need a hand, or you can always email me directly.</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks and happy hacking!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">Chris Dearborn</span></b><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#444444"><br>
</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#000001">Software Sr Principal Engr</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#444444"><br>
</span><b><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#007DB8">Dell</span></b><b><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:gray"> EMC</span></b><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#010101">
| </span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:black">Service Provider Engineering</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#444444"><br>
<a href="mailto:Christopher.Dearborn@Dell.com"><span style="color:#007DB8">Christopher.Dearborn@Dell.com</span></a></span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#000001"> </span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Ewan Hamilton <ewan.hamilton@managed.co.uk> <br>
<b>Sent:</b> Monday, June 15, 2020 1:43 PM<br>
<b>To:</b> openstack-discuss@lists.openstack.org<br>
<b>Subject:</b> python-dracclient<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p><span lang="EN-GB" style="color:#CE1126">[EXTERNAL EMAIL] <o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-GB">Hi guys,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Your documentation for python-dracclient begins here:
<a href="https://docs.openstack.org/python-dracclient/latest/usage.html">https://docs.openstack.org/python-dracclient/latest/usage.html</a> with<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span lang="EN-GB">Usage<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span lang="EN-GB">Create a client object by providing the connection details of the DRAC card:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span lang="EN-GB">client = wsmanclient.client.DRACClient('1.2.3.4', 'username', 's3cr3t')<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Can you see just how frustrating this is for someone who expects documentation that actually works and explains how to actually use the module?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">This is a pathetic job here.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%">
<tbody>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="border:none;border-right:solid #B6B3B3 1.0pt;padding:0in 7.5pt 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:0in 22.5pt 0in 22.5pt">
<p class="MsoNormal"><span style="font-size:1.0pt"><img border="0" width="120" height="67" style="width:1.25in;height:.7in" id="_x0000_i1025" src="cid:image001.png@01D6432D.E183F840"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
<td style="padding:7.5pt 0in 7.5pt 7.5pt">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%">
<tbody>
<tr>
<td style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%">
<tbody>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:#000001">Ewan Hamilton</span></b><b><span style="font-size:1.0pt;font-family:remialcxesans;color:white"></span></b><b><span style="color:#000001"><o:p></o:p></span></b></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:#005668">3rd Line Networks Analyst<o:p></o:p></span></b></p>
</td>
</tr>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:3.0pt 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:9.0pt;color:#000001"> t: 0800 033 4800 <o:p></o:p></span></p>
</td>
<td valign="top" style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:9.0pt;color:#000001">ext. <a href="tel:2212" target="_blank"><strong><span style="font-family:"Calibri",sans-serif;color:#000001;font-weight:normal;text-decoration:none">2212</span></strong></a><o:p></o:p></span></p>
</td>
<td valign="top" style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:9.0pt;color:#000001"> | <o:p></o:p></span></p>
</td>
<td valign="top" style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:9.0pt;color:#000001">m: 07772 001 625<o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:7.5pt 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:0in 2.25pt 0in 0in">
<p class="MsoNormal"><span style="font-size:1.0pt"><a href="https://www.linkedin.com/company/managed247-ltd/" target="_blank"><span style="text-decoration:none"><img border="0" width="18" height="18" style="width:.1875in;height:.1875in" id="_x0000_i1026" src="cid:image002.png@01D6432D.E183F840" alt="LinkedIn"></span></a><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:0in 2.25pt 0in 0in">
<p class="MsoNormal"><span style="font-size:1.0pt"><a href="https://twitter.com/managed247" target="_blank"><span style="text-decoration:none"><img border="0" width="18" height="18" style="width:.1875in;height:.1875in" id="_x0000_i1027" src="cid:image003.png@01D6432D.E183F840" alt="Twitter"></span></a><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top" style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:1.0pt"><a href="http://www.managed.co.uk/" target="_blank"><span style="text-decoration:none"><img border="0" width="18" height="18" style="width:.1875in;height:.1875in" id="_x0000_i1028" src="cid:image004.png@01D6432D.E183F840" alt="Website"></span></a><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:7.5pt 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:9.0pt;color:#000001">Technology House, 151 Silbury Boulevard, Milton Keynes, MK9 1LH<o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%">
<tbody>
<tr>
<td valign="top" style="padding:3.0pt 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%">
<tbody>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal" style="text-align:justify"><span style="font-size:7.0pt;color:#A1A1A1">managed. is a trading name of Managed247 Ltd<br>
Managed247 Ltd is a company registered in England and Wales under number 7019261</span><span style="color:#A1A1A1"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>