[ClusterLabs Developers] [fence-agents] How to "login" other than ssh or telnet?

Jose.Delarosa at dell.com Jose.Delarosa at dell.com
Mon Nov 19 21:30:19 UTC 2018


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.

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:

https://github.com/jose-delarosa/fence-agents/blob/add_redfish_fence_agent/agents/redfish/fence_redfish.py

Looking for initial feedback please.

I usually don’t use tabs to indent lines, is this a requirement?

Jose Delarosa
Linux Engineering
Dell EMC|Infrastructure Solutions Group



-----Original Message-----
From: Developers [mailto:developers-bounces at clusterlabs.org] On Behalf Of Andrei Borzenkov
Sent: Thursday, November 15, 2018 10:09 PM
To: developers at clusterlabs.org
Subject: Re: [ClusterLabs Developers] [fence-agents] How to "login" other than ssh or telnet?


[EXTERNAL EMAIL]

16.11.2018 0:31, Jose.Delarosa at dell.com<mailto:Jose.Delarosa at dell.com> пишет:
> All,
>
> 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:
>
> https://github.com/ClusterLabs/fence-agents/blob/master/lib/fencing.py
> .py#L968-L976
> <https://github.com/ClusterLabs/fence-agents/blob/master/agents/autode
> tect/fencing.py#L888-L896> I'm new to this project, so looking for
> insightful feedback from the project maintainers or more experience developers here as to the best way to implement a fence "login" for Redfish.

python redfishtool.py -r <rhost> -u <username> -p <password> Systems reset ForceRestart

At which point you can take any of existing fencing/stonith agent as template and fill in actual command.

https://github.com/DMTF/Redfishtool

>
> Also, is anyone here also looking at developing a Redfish fence agent?
> I see https://github.com/ClusterLabs/fence-agents/issues/230, but not much activity, happy to collaborate.> Thank you all.
>
> Jose Delarosa
>
>
>
>
>
> _______________________________________________
> Developers mailing list
> Developers at clusterlabs.org<mailto:Developers at clusterlabs.org>
> https://lists.clusterlabs.org/mailman/listinfo/developers
>

_______________________________________________
Developers mailing list
Developers at clusterlabs.org<mailto:Developers at clusterlabs.org>
https://lists.clusterlabs.org/mailman/listinfo/developers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/developers/attachments/20181119/aa118730/attachment.htm>


More information about the Developers mailing list