{"action":"created","issue":{"url":"https://api.github.com/repos/packethost/packet-rb/issues/9","repository_url":"https://api.github.com/repos/packethost/packet-rb","labels_url":"https://api.github.com/repos/packethost/packet-rb/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/packethost/packet-rb/issues/9/comments","events_url":"https://api.github.com/repos/packethost/packet-rb/issues/9/events","html_url":"https://github.com/packethost/packet-rb/pull/9","id":156925113,"number":9,"title":"Device power state actions","user":{"login":"kke","id":224971,"avatar_url":"https://avatars.githubusercontent.com/u/224971?v=3","gravatar_id":"","url":"https://api.github.com/users/kke","html_url":"https://github.com/kke","followers_url":"https://api.github.com/users/kke/followers","following_url":"https://api.github.com/users/kke/following{/other_user}","gists_url":"https://api.github.com/users/kke/gists{/gist_id}","starred_url":"https://api.github.com/users/kke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kke/subscriptions","organizations_url":"https://api.github.com/users/kke/orgs","repos_url":"https://api.github.com/users/kke/repos","events_url":"https://api.github.com/users/kke/events{/privacy}","received_events_url":"https://api.github.com/users/kke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-26T07:53:22Z","updated_at":"2016-05-26T11:28:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/packethost/packet-rb/pulls/9","html_url":"https://github.com/packethost/packet-rb/pull/9","diff_url":"https://github.com/packethost/packet-rb/pull/9.diff","patch_url":"https://github.com/packethost/packet-rb/pull/9.patch"},"body":"Added:\r\n\r\n- `client.power_on_device(device)`\r\n- `client.power_off_device(device)`\r\n- `client.reboot_device(device)`\r\n- `client.rebuild_device(device)`\r\n\r\nThe tests for device actions would just be testing the mock framework.\r\n\r\n```ruby\r\n> client = Packet::Client.new(API_KEY)\r\n> client.power_off_device(client.get_device(DEVICE_ID))\r\n => true\r\n> client.power_off_device(client.get_device(DEVICE_ID))\r\nPacket::Error: {\"errors\"=>[\"Device must be powered on\"]}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/packethost/packet-rb/issues/comments/221846027","html_url":"https://github.com/packethost/packet-rb/pull/9#issuecomment-221846027","issue_url":"https://api.github.com/repos/packethost/packet-rb/issues/9","id":221846027,"user":{"login":"betawaffle","id":48613,"avatar_url":"https://avatars.githubusercontent.com/u/48613?v=3","gravatar_id":"","url":"https://api.github.com/users/betawaffle","html_url":"https://github.com/betawaffle","followers_url":"https://api.github.com/users/betawaffle/followers","following_url":"https://api.github.com/users/betawaffle/following{/other_user}","gists_url":"https://api.github.com/users/betawaffle/gists{/gist_id}","starred_url":"https://api.github.com/users/betawaffle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betawaffle/subscriptions","organizations_url":"https://api.github.com/users/betawaffle/orgs","repos_url":"https://api.github.com/users/betawaffle/repos","events_url":"https://api.github.com/users/betawaffle/events{/privacy}","received_events_url":"https://api.github.com/users/betawaffle/received_events","type":"User","site_admin":false},"created_at":"2016-05-26T11:28:05Z","updated_at":"2016-05-26T11:28:05Z","body":"This is great! One thing though, we don't support rebuild, even though it's in our API docs. It used to work, but some things changed since then and nobody ever used it. We also plan to support something like it in the future, but it won't be exactly the same.\r\n\r\nAlso, perhaps you'll want to add a method for our new `rescue` action (which reboots the server into alpine so you can fix disk and network issues)."}}
{"actor":{"display_login":"betawaffle"}}