mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
4d33ccb7a7
- Focus on adding additional vm actions support - New request types are not fully tested
27 lines
730 B
Ruby
27 lines
730 B
Ruby
module Fog
|
|
module Compute
|
|
class OpenStack
|
|
class Real
|
|
# Retrieve server actions.
|
|
#
|
|
# === Parameters
|
|
# * server_id <~String> - The ID of the server to query for available actions.
|
|
# === Returns
|
|
# * actions <~Array>
|
|
def server_actions(server_id)
|
|
request(
|
|
:expects => 200,
|
|
:method => 'GET',
|
|
:path => "servers/#{server_id}/actions"
|
|
).body['actions']
|
|
end # def server_actions
|
|
end # class Real
|
|
|
|
class Mock
|
|
def server_actions(server_id)
|
|
Array.new
|
|
end # def server_actions
|
|
end # class Mock
|
|
end # class OpenStack
|
|
end # module Compute
|
|
end # moduel Fog
|