-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request fog#3647 from Ladas/openstack_compute_add_shelve_r…
…elated_actions OpenStack compute add shelve related actions
- Loading branch information
Showing
6 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
lib/fog/openstack/requests/compute/shelve_offload_server.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module Fog | ||
module Compute | ||
class OpenStack | ||
class Real | ||
# Shelve Off load the server. Data and resource associations are deleted. | ||
# | ||
# === Parameters | ||
# * server_id <~String> - The ID of the server to be shelve off loaded | ||
# === Returns | ||
# * success <~Boolean> | ||
def shelve_offload_server(server_id) | ||
body = { 'shelveOffload' => nil } | ||
server_action(server_id, body).status == 202 | ||
end # def shelve_off_load_server | ||
end # class Real | ||
|
||
class Mock | ||
def shelve_offload_server(server_id) | ||
true | ||
end # def shelve_off_load_server | ||
end # class Mock | ||
end # class OpenStack | ||
end # module Compute | ||
end # module Fog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module Fog | ||
module Compute | ||
class OpenStack | ||
class Real | ||
# Shelve the server. | ||
# | ||
# === Parameters | ||
# * server_id <~String> - The ID of the server to be shelved | ||
# === Returns | ||
# * success <~Boolean> | ||
def shelve_server(server_id) | ||
body = { 'shelve' => nil } | ||
server_action(server_id, body).status == 202 | ||
end # def shelve_server | ||
end # class Real | ||
|
||
class Mock | ||
def shelve_server(server_id) | ||
true | ||
end # def shelve_server | ||
end # class Mock | ||
end # class OpenStack | ||
end # module Compute | ||
end # module Fog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module Fog | ||
module Compute | ||
class OpenStack | ||
class Real | ||
# Unshelve the server. | ||
# | ||
# === Parameters | ||
# * server_id <~String> - The ID of the server to be unshelved | ||
# === Returns | ||
# * success <~Boolean> | ||
def unshelve_server(server_id) | ||
body = { 'unshelve' => nil } | ||
server_action(server_id, body).status == 202 | ||
end # def unshelve_server | ||
end # class Real | ||
|
||
class Mock | ||
def unshelve_server(server_id) | ||
true | ||
end # def unshelve_server | ||
end # class Mock | ||
end # class OpenStack | ||
end # module Compute | ||
end # module Fog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters