Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using REST APIs #1054

Open
an-ky opened this issue Jan 8, 2024 · 1 comment
Open

Using REST APIs #1054

an-ky opened this issue Jan 8, 2024 · 1 comment

Comments

@an-ky
Copy link

an-ky commented Jan 8, 2024

Is your feature request related to a problem? Please describe

Pyinfra seems to be based around the sole idea of SSH accessible hosts. I have some devices which are most convenient to configure using the provided REST API. Redfish stands out here IMHO as it allows to provision a system without having a OS installed, thus no or just rather primitive SSH access. Currently I'm using Ansible to send the according API commands but I'd like to move my whole IaC repo to pyinfra.

Describe the solution you'd like

Would it be sufficient to implement a Connector which establishes the connection to the REST API and a bunch of Commands for every task to accomplish. I'd like to contribute but need some starting point/tips as I'm rather new to pyinfra.

@maisim
Copy link
Contributor

maisim commented Jan 8, 2024

Hi @an-ky

There are other connectors than ssh:
https://docs.pyinfra.com/en/2.x/connectors.html

I think you can't use connector but python operations to meet your need:
https://docs.pyinfra.com/en/2.x/operations/python.html

Greetings,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants