diff --git a/lib/fog/openstack/requests/compute/get_console_output.rb b/lib/fog/openstack/requests/compute/get_console_output.rb new file mode 100644 index 000000000..ead09f6e1 --- /dev/null +++ b/lib/fog/openstack/requests/compute/get_console_output.rb @@ -0,0 +1,28 @@ +module Fog + module Compute + class OpenStack + class Real + + def get_console_output(server_id, log_length) + + body = { 'os-getConsoleOutput' => { + 'length' => log_length + }} + server_action(server_id, body) + + end + + end + + class Mock + + def get_console_output(server_id, log_length) + response = Excon::Response.new + response.status = 202 + response + end + + end + end + end +end diff --git a/lib/fog/openstack/requests/compute/live_migrate_server.rb b/lib/fog/openstack/requests/compute/live_migrate_server.rb new file mode 100644 index 000000000..76eb8dd1b --- /dev/null +++ b/lib/fog/openstack/requests/compute/live_migrate_server.rb @@ -0,0 +1,30 @@ +module Fog + module Compute + class OpenStack + class Real + + def live_migrate_server(server_id, host, block_migration, disk_over_commit) + + body = { 'os-migrateLive' => { + 'host' => host, + 'block_migration' => block_migration, + 'disk_over_commit' => disk_over_commit, + }} + server_action(server_id, body) + + end + + end + + class Mock + + def live_migrate_server(server_id, host, block_migration, disk_over_commit) + response = Excon::Response.new + response.status = 202 + response + end + + end + end + end +end diff --git a/lib/fog/openstack/requests/compute/migrate_server.rb b/lib/fog/openstack/requests/compute/migrate_server.rb new file mode 100644 index 000000000..4d26cd2d7 --- /dev/null +++ b/lib/fog/openstack/requests/compute/migrate_server.rb @@ -0,0 +1,26 @@ +module Fog + module Compute + class OpenStack + class Real + + def migrate_server(server_id) + + body = { 'migrate' => nil } + server_action(server_id, body) + + end + + end + + class Mock + + def migrate_server(server_id) + response = Excon::Response.new + response.status = 202 + response + end + + end + end + end +end