<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Times New Roman" size="3"><span style="font-size:12pt;"><a name="_MailEndCompose"></a>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Do we need to use a CLI tool to implement a fence agent? I rather stay away from redfishtool to avoid having it as a dependency (and Python v3) and would rather just use the requests library directly.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">I created a fence agent for redfish, the agent can take as argument the Systems URI or can programmatically find it as it will be different across OEMs:</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"><a href="https://github.com/jose-delarosa/fence-agents/blob/add_redfish_fence_agent/agents/redfish/fence_redfish.py"><font color="#0563C1"><u>https://github.com/jose-delarosa/fence-agents/blob/add_redfish_fence_agent/agents/redfish/fence_redfish.py</u></font></a></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Looking for initial feedback please.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">I usually don’t use tabs to indent lines, is this a requirement?</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Jose Delarosa</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Linux Engineering</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Dell EMC|Infrastructure Solutions Group </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<a name="_____replyseparator"></a>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">-----Original Message-----<br>

From: Developers [<a href="mailto:developers-bounces@clusterlabs.org">mailto:developers-bounces@clusterlabs.org</a>] On Behalf Of Andrei Borzenkov<br>

Sent: Thursday, November 15, 2018 10:09 PM<br>

To: developers@clusterlabs.org<br>

Subject: Re: [ClusterLabs Developers] [fence-agents] How to "login" other than ssh or telnet?</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">[EXTERNAL EMAIL] </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">16.11.2018 0:31, <a href="mailto:Jose.Delarosa@dell.com">Jose.Delarosa@dell.com</a><font face="Calibri Cyr"> пишет:</font></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> All,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> I am looking at writing a fence agent for Redfish, which uses REST APIs to run "commands" like power off/on/status. There is no ssh login per se, as the APIs are accessed through HTTP methods
(GET/POST/PATCH, etc.), so none of these can be used:</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> <a href="https://github.com/ClusterLabs/fence-agents/blob/master/lib/fencing.py">https://github.com/ClusterLabs/fence-agents/blob/master/lib/fencing.py</a></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> .py#L968-L976 </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> <<a href=""></a>https://github.com/ClusterLabs/fence-agents/blob/master/agents/autode</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> tect/fencing.py#L888-L896> I'm new to this project, so looking for </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> insightful feedback from the project maintainers or more experience developers here as to the best way to implement a fence "login" for Redfish.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">python redfishtool.py -r <rhost> -u <username> -p <password> Systems reset ForceRestart</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">At which point you can take any of existing fencing/stonith agent as template and fill in actual command.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"><a href="https://github.com/DMTF/Redfishtool">https://github.com/DMTF/Redfishtool</a></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Also, is anyone here also looking at developing a Redfish fence agent? </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> I see <a href="https://github.com/ClusterLabs/fence-agents/issues/230">https://github.com/ClusterLabs/fence-agents/issues/230</a>, but not much activity, happy to collaborate.> Thank you all.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Jose Delarosa</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> _______________________________________________</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Developers mailing list</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> <a href="mailto:Developers@clusterlabs.org">Developers@clusterlabs.org</a></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> <a href="https://lists.clusterlabs.org/mailman/listinfo/developers">https://lists.clusterlabs.org/mailman/listinfo/developers</a></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">_______________________________________________</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Developers mailing list</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"><a href="mailto:Developers@clusterlabs.org">Developers@clusterlabs.org</a></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"><a href="https://lists.clusterlabs.org/mailman/listinfo/developers">https://lists.clusterlabs.org/mailman/listinfo/developers</a></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
</span></font>
</body>
</html>