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

Exit gracefully if reset isn't available for a server. #6

Open
aszlig opened this issue Mar 18, 2014 · 3 comments
Open

Exit gracefully if reset isn't available for a server. #6

aszlig opened this issue Mar 18, 2014 · 3 comments
Labels
Milestone

Comments

@aszlig
Copy link
Owner

aszlig commented Mar 18, 2014

This is what's returned when trying to reset a server which doesn't have the option:

{
  "error": {
    "status": 404,
    "code": "RESET_NOT_AVAILABLE",
    "message": "resetting this server is not possible"
  }
}

So let's try to raise a better exception than RobotError

@aszlig
Copy link
Owner Author

aszlig commented May 15, 2014

@cyberplant: What do you get back for the DELL server if you do a GET /reset/IP? Because if just doing a POST on the server is going to be unreliable in return it might be necessary to query it using GET first.

@aszlig aszlig added this to the Version 0.7.1 milestone May 15, 2014
@aszlig aszlig added the bug label May 15, 2014
@dangra
Copy link
Contributor

dangra commented May 15, 2014

GET /reset/IP returns:

$ curl -sn https://robot-ws.your-server.de/reset/88.xxx.xxx.146 -vv 
* Connected to robot-ws.your-server.de (78.46.1.93) port 443 (#0)
> GET /reset/88.198.113.146 HTTP/1.1
> Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> User-Agent: curl/7.36.0
> Host: robot-ws.your-server.de
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Thu, 15 May 2014 14:46:53 GMT
* Server Apache is not blacklisted
< Server: Apache
< X-Powered-By: PHP/5.3.28
< Content-Length: 78
< Content-Type: application/json
< 
* Connection #0 to host robot-ws.your-server.de left intact
{"reset":{"server_ip":"88.xxx.xxx.146","server_number":325951,"type":["man"]}}

@dangra
Copy link
Contributor

dangra commented May 15, 2014

This is the output for POST /reset/IP

> POST /reset/88.xxx.xxx.146 HTTP/1.1
> Authorization: Basic xxxxxxxxxxxxxxxxxxxx
> User-Agent: curl/7.36.0
> Host: robot-ws.your-server.de
> Accept: */*
> Content-Length: 7
> Content-Type: application/x-www-form-urlencoded
> 

< HTTP/1.1 400 Bad Request
< Date: Thu, 15 May 2014 14:51:19 GMT
< Server: Apache
< X-Powered-By: PHP/5.3.28
< Content-Length: 107
< Connection: close
< Content-Type: application/json
< 
{"error":{"status":400,"code":"INVALID_INPUT","message":"invalid input","missing":null,"invalid":["type"]}}

@aszlig aszlig modified the milestones: Version 0.8.0, Version 0.7.1 May 16, 2014
@aszlig aszlig modified the milestones: Version 0.8.0, Version 0.9.0 Nov 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants