LauraMersive / APIdemo

Demo Scripts for the Solstice OpenControl API
4 stars 5 forks source link

Reboot pod using API call with Python requests #1

Open bandwith opened 6 years ago

bandwith commented 6 years ago

Hi @LauraMersive,

I'm looking for a way to systematically reboot pods using the API.

I'm trying variations of this:

if (rstats.get('m_connectedUsers')) == None: requests.get(rebooturl, verify=False)

I receive the error: http.client.RemoteDisconnected: Remote end closed connection without response

aroach commented 3 years ago

@bandwith sorry we had missed your issue. Here is an example to reboot pods and the new, official location: https://github.com/Mersive-Technologies/opencontrolv1-examples/blob/main/reboot_pods.py

Hopefully, it could be a good starting point for you.