Skip to content

Rebuild does not return root_password #181

@pchandra19

Description

@pchandra19

Bug Report

Current Behavior
'Rebuild' returns the BoundAction but does not return the "root_password"

Input Code

server = self.client.servers.get_by_name(name='server')
res = server.rebuild(Image(id='image_id'))
print(res)

Expected behavior/code
The 'rebuild' should return the root_password along with the BoundAction.
The response from the Hetzner API is below ( See possible solution)

Environment

  • Python Version: 3.11.2
  • Hcloud-Python Version: 1.18.2

Possible Solution

{
  "action": {
    "command": "rebuild_server",
    "error": {
      "code": "action_failed",
      "message": "Action failed"
    },
    "finished": null,
    "id": 13,
    "progress": 0,
    "resources": [
      {
        "id": 42,
        "type": "server"
      }
    ],
    "started": "2016-01-30T23:50:00+00:00",
    "status": "running"
  },
  "root_password": null
}

Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions