lib/fog/linode/requests/compute/linode_reboot.rb in fog-1.3.1 vs lib/fog/linode/requests/compute/linode_reboot.rb in fog-1.4.0
- old
+ new
@@ -11,18 +11,31 @@
# * configId<~Boolean>: id of config to boot server with
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Array>:
- # TODO: docs
+ # TODO: docs
def linode_reboot(linode_id, options={})
request(
:expects => 200,
:method => 'GET',
:query => { :api_action => 'linode.reboot', :linodeId => linode_id }.merge!(options)
)
end
+ end
+
+ class Mock
+ def linode_reboot(linode_id, options={})
+ response = Excon::Response.new
+ response.status = 200
+ response.body = {
+ "ERRORARRAY" => [],
+ "ACTION" => "linode.reboot",
+ "DATA" => { "JobID" => rand(1000..9999) }
+ }
+ response
+ end
end
end
end
end