mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge in updates from 'brightbox/fog'
This commit is contained in:
commit
e282c7ff31
12 changed files with 58 additions and 55 deletions
|
@ -5,7 +5,7 @@ Shindo.tests('Fog::Compute[:brightbox] | account requests', ['brightbox']) do
|
|||
tests("#get_account") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].get_account
|
||||
formats(Brightbox::Compute::Formats::Full::ACCOUNT) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::ACCOUNT, false) { result }
|
||||
test("ftp password is blanked") { result["library_ftp_password"].nil? }
|
||||
end
|
||||
|
||||
|
@ -13,13 +13,13 @@ Shindo.tests('Fog::Compute[:brightbox] | account requests', ['brightbox']) do
|
|||
tests("#update_account(#{update_options.inspect})") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].update_account(update_options)
|
||||
formats(Brightbox::Compute::Formats::Full::ACCOUNT) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::ACCOUNT, false) { result }
|
||||
end
|
||||
|
||||
tests("#reset_ftp_password_account") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].reset_ftp_password_account
|
||||
formats(Brightbox::Compute::Formats::Full::ACCOUNT) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::ACCOUNT, false) { result }
|
||||
test("new ftp password is visible") { ! result["library_ftp_password"].nil? }
|
||||
end
|
||||
|
||||
|
|
|
@ -11,39 +11,39 @@ Shindo.tests('Fog::Compute[:brightbox] | api client requests', ['brightbox']) do
|
|||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].create_api_client(create_options)
|
||||
@api_client_id = result["id"]
|
||||
formats(Brightbox::Compute::Formats::Full::API_CLIENT) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::API_CLIENT, false) { result }
|
||||
end
|
||||
|
||||
tests("#list_api_clients") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].list_api_clients
|
||||
formats(Brightbox::Compute::Formats::Collection::API_CLIENTS) { result }
|
||||
formats(Brightbox::Compute::Formats::Collection::API_CLIENTS, false) { result }
|
||||
end
|
||||
|
||||
tests("#get_api_client('#{@api_client_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].get_api_client(@api_client_id)
|
||||
formats(Brightbox::Compute::Formats::Full::API_CLIENT) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::API_CLIENT, false) { result }
|
||||
end
|
||||
|
||||
update_options = {:name => "Fog@#{Time.now.iso8601}"}
|
||||
tests("#update_api_client('#{@api_client_id}', #{update_options.inspect})") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].update_api_client(@api_client_id, update_options)
|
||||
formats(Brightbox::Compute::Formats::Full::API_CLIENT) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::API_CLIENT, false) { result }
|
||||
end
|
||||
|
||||
tests("#reset_secret_api_client('#{@api_client_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].reset_secret_api_client(@api_client_id)
|
||||
formats(Brightbox::Compute::Formats::Full::API_CLIENT) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::API_CLIENT, false) { result }
|
||||
test("new secret is visible") { ! result["secret"].nil? }
|
||||
end
|
||||
|
||||
tests("#destroy_api_client('#{@api_client_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].destroy_api_client(@api_client_id)
|
||||
formats(Brightbox::Compute::Formats::Full::API_CLIENT) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::API_CLIENT, false) { result }
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -10,19 +10,19 @@ Shindo.tests('Fog::Compute[:brightbox] | cloud ip requests', ['brightbox']) do
|
|||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].create_cloud_ip
|
||||
@cloud_ip_id = result["id"]
|
||||
formats(Brightbox::Compute::Formats::Full::CLOUD_IP) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::CLOUD_IP, false) { result }
|
||||
end
|
||||
|
||||
tests("#list_cloud_ips") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].list_cloud_ips
|
||||
formats(Brightbox::Compute::Formats::Collection::CLOUD_IPS) { result }
|
||||
formats(Brightbox::Compute::Formats::Collection::CLOUD_IPS, false) { result }
|
||||
end
|
||||
|
||||
tests("#get_cloud_ip('#{@cloud_ip_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].get_cloud_ip(@cloud_ip_id)
|
||||
formats(Brightbox::Compute::Formats::Full::CLOUD_IP) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::CLOUD_IP, false) { result }
|
||||
end
|
||||
|
||||
unless Fog.mocking?
|
||||
|
@ -32,7 +32,7 @@ Shindo.tests('Fog::Compute[:brightbox] | cloud ip requests', ['brightbox']) do
|
|||
tests("#map_cloud_ip('#{@cloud_ip_id}', #{map_options.inspect})") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].map_cloud_ip(@cloud_ip_id, map_options)
|
||||
formats(Brightbox::Compute::Formats::Full::CLOUD_IP) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::CLOUD_IP, false) { result }
|
||||
end
|
||||
|
||||
unless Fog.mocking?
|
||||
|
@ -42,7 +42,7 @@ Shindo.tests('Fog::Compute[:brightbox] | cloud ip requests', ['brightbox']) do
|
|||
tests("#unmap_cloud_ip('#{@cloud_ip_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].unmap_cloud_ip(@cloud_ip_id)
|
||||
formats(Brightbox::Compute::Formats::Full::CLOUD_IP) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::CLOUD_IP, false) { result }
|
||||
end
|
||||
|
||||
unless Fog.mocking?
|
||||
|
@ -52,14 +52,14 @@ Shindo.tests('Fog::Compute[:brightbox] | cloud ip requests', ['brightbox']) do
|
|||
tests("#update_cloud_ip('#{@cloud_ip_id}', #{update_options.inspect})") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].update_cloud_ip(@cloud_ip_id, update_options)
|
||||
formats(Brightbox::Compute::Formats::Full::CLOUD_IP) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::CLOUD_IP, false) { result }
|
||||
result = Fog::Compute[:brightbox].update_cloud_ip(@cloud_ip_id, {:reverse_dns => ""})
|
||||
end
|
||||
|
||||
tests("#destroy_cloud_ip('#{@cloud_ip_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].destroy_cloud_ip(@cloud_ip_id)
|
||||
formats(Brightbox::Compute::Formats::Full::CLOUD_IP) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::CLOUD_IP, false) { result }
|
||||
end
|
||||
|
||||
unless Fog.mocking?
|
||||
|
|
|
@ -64,7 +64,8 @@ class Brightbox
|
|||
LB_LISTENER = {
|
||||
"in" => Integer,
|
||||
"out" => Integer,
|
||||
"protocol" => String
|
||||
"protocol" => String,
|
||||
"timeout" => Integer
|
||||
}
|
||||
LB_HEALTHCHECK = {
|
||||
"type" => String,
|
||||
|
|
|
@ -19,13 +19,13 @@ Shindo.tests('Fog::Compute[:brightbox] | image requests', ['brightbox']) do
|
|||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].list_images
|
||||
@image_id = result.first["id"]
|
||||
formats(Brightbox::Compute::Formats::Collection::IMAGES) { result }
|
||||
formats(Brightbox::Compute::Formats::Collection::IMAGES, false) { result }
|
||||
end
|
||||
|
||||
tests("#get_image('#{@image_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].get_image(@image_id)
|
||||
formats(Brightbox::Compute::Formats::Full::IMAGE) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::IMAGE, false) { result }
|
||||
end
|
||||
|
||||
## Until Image creation can be automated, we shouldn't be updating Images randomly
|
||||
|
|
|
@ -10,7 +10,7 @@ Shindo.tests('Fog::Compute[:brightbox] | interface requests', ['brightbox']) do
|
|||
tests("#get_interface('#{@interface_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].get_interface(@interface_id)
|
||||
formats(Brightbox::Compute::Formats::Full::INTERFACE) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::INTERFACE, false) { result }
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -26,7 +26,7 @@ Shindo.tests('Fog::Compute[:brightbox] | load balancer requests', ['brightbox'])
|
|||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].create_load_balancer(create_options)
|
||||
@load_balancer_id = result["id"]
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER, false) { result }
|
||||
end
|
||||
|
||||
unless Fog.mocking?
|
||||
|
@ -36,34 +36,34 @@ Shindo.tests('Fog::Compute[:brightbox] | load balancer requests', ['brightbox'])
|
|||
tests("#list_load_balancers()") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].list_load_balancers
|
||||
formats(Brightbox::Compute::Formats::Collection::LOAD_BALANCERS) { result }
|
||||
formats(Brightbox::Compute::Formats::Collection::LOAD_BALANCERS, false) { result }
|
||||
end
|
||||
|
||||
tests("#get_load_balancer('#{@load_balancer_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].get_load_balancer(@load_balancer_id)
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER, false) { result }
|
||||
end
|
||||
|
||||
update_options = {:name => "New name"}
|
||||
tests("#update_load_balancer('#{@load_balancer_id}', #{update_options.inspect})") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].update_load_balancer(@load_balancer_id, update_options)
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER, false) { result }
|
||||
end
|
||||
|
||||
add_listeners_options = {:listeners=>[{:out=>28080, :in=>8080, :protocol=>"http"}]}
|
||||
tests("#add_listeners_load_balancer('#{@load_balancer_id}', #{add_listeners_options.inspect})") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].add_listeners_load_balancer(@load_balancer_id, add_listeners_options)
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER, false) { result }
|
||||
end
|
||||
|
||||
remove_listeners_options = {:listeners=>[{:out=>28080, :in=>8080, :protocol=>"http"}]}
|
||||
tests("#remove_listeners_load_balancer('#{@load_balancer_id}', #{remove_listeners_options.inspect})") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].remove_listeners_load_balancer(@load_balancer_id, remove_listeners_options)
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER, false) { result }
|
||||
end
|
||||
|
||||
unless Fog.mocking?
|
||||
|
@ -76,7 +76,7 @@ Shindo.tests('Fog::Compute[:brightbox] | load balancer requests', ['brightbox'])
|
|||
tests("#add_nodes_load_balancer('#{@load_balancer_id}', #{add_nodes_options.inspect})") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].add_nodes_load_balancer(@load_balancer_id, add_nodes_options)
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER, false) { result }
|
||||
end
|
||||
|
||||
# ...before we can attempt to remove either
|
||||
|
@ -84,13 +84,13 @@ Shindo.tests('Fog::Compute[:brightbox] | load balancer requests', ['brightbox'])
|
|||
tests("#remove_nodes_load_balancer('#{@load_balancer_id}', #{remove_nodes_options.inspect})") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].remove_nodes_load_balancer(@load_balancer_id, remove_nodes_options)
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER, false) { result }
|
||||
end
|
||||
|
||||
tests("#destroy_load_balancer('#{@load_balancer_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].destroy_load_balancer(@load_balancer_id)
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER, false) { result }
|
||||
end
|
||||
|
||||
unless Fog.mocking?
|
||||
|
|
|
@ -18,55 +18,55 @@ Shindo.tests('Fog::Compute[:brightbox] | server group requests', ['brightbox'])
|
|||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].create_server_group(create_options)
|
||||
@server_group_id = result["id"]
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_GROUP) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_GROUP, false) { result }
|
||||
end
|
||||
|
||||
tests("#list_server_groups") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].list_server_groups
|
||||
formats(Brightbox::Compute::Formats::Collection::SERVER_GROUPS) { result }
|
||||
formats(Brightbox::Compute::Formats::Collection::SERVER_GROUPS, false) { result }
|
||||
@default_group_id = result.select {|grp| grp["default"] == true }.first["id"]
|
||||
end
|
||||
|
||||
tests("#get_server_group('#{@server_group_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].get_server_group(@server_group_id)
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_GROUP) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_GROUP, false) { result }
|
||||
end
|
||||
|
||||
update_options = {:name => "Fog@#{Time.now.iso8601}"}
|
||||
tests("#update_server_group('#{@server_group_id}', #{update_options.inspect})") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].update_server_group(@server_group_id, update_options)
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_GROUP) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_GROUP, false) { result }
|
||||
end
|
||||
|
||||
remove_options = {:servers => [{:server => server_id}]}
|
||||
tests("#remove_servers_server_group('#{@server_group_id}', #{remove_options.inspect})") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].remove_servers_server_group(@server_group_id, remove_options)
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_GROUP) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_GROUP, false) { result }
|
||||
end
|
||||
|
||||
add_options = {:servers => [{:server => server_id}]}
|
||||
tests("#add_servers_server_group('#{@server_group_id}', #{remove_options.inspect})") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].add_servers_server_group(@server_group_id, add_options)
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_GROUP) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_GROUP, false) { result }
|
||||
end
|
||||
|
||||
move_options = {:destination => @default_group_id, :servers => [{:server => server_id}]}
|
||||
tests("#move_servers_server_group('#{@server_group_id}', #{move_options.inspect})") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].move_servers_server_group(@server_group_id, move_options)
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_GROUP) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_GROUP, false) { result }
|
||||
test("group is emptied") { result["servers"].empty? }
|
||||
end
|
||||
|
||||
tests("#destroy_server_group('#{@server_group_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].destroy_server_group(@server_group_id)
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_GROUP) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_GROUP, false) { result }
|
||||
end
|
||||
|
||||
unless Fog.mocking?
|
||||
|
|
|
@ -11,7 +11,7 @@ Shindo.tests('Fog::Compute[:brightbox] | server requests', ['brightbox']) do
|
|||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].create_server(:image => image_id)
|
||||
server_id = result["id"]
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER, false) { result }
|
||||
end
|
||||
|
||||
unless Fog.mocking?
|
||||
|
@ -21,58 +21,60 @@ Shindo.tests('Fog::Compute[:brightbox] | server requests', ['brightbox']) do
|
|||
tests("#list_servers") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].list_servers
|
||||
formats(Brightbox::Compute::Formats::Collection::SERVERS) { result }
|
||||
formats(Brightbox::Compute::Formats::Collection::SERVERS, false) { result }
|
||||
end
|
||||
|
||||
tests("#get_server('#{server_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].get_server(server_id)
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER, false) { result }
|
||||
end
|
||||
|
||||
tests("#update_server('#{server_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].update_server(server_id, :name => "Fog@#{Time.now.iso8601}")
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER, false) { result }
|
||||
end
|
||||
|
||||
tests("#activate_console_server('#{server_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].activate_console_server(server_id)
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER, false) { result }
|
||||
end
|
||||
|
||||
tests("#stop_server('#{server_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].stop_server(server_id)
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER, false) { result }
|
||||
end
|
||||
|
||||
tests("#start_server('#{server_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].start_server(server_id)
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER, false) { result }
|
||||
end
|
||||
|
||||
tests("#shutdown_server('#{server_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].shutdown_server(server_id)
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER, false) { result }
|
||||
end
|
||||
|
||||
tests("#snapshot_server('#{server_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].snapshot_server(server_id)
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER) { result }
|
||||
snapshot_id = result["id"]
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER, false) { result }
|
||||
# Server should be exclusively for our test so assume we can delete the snapshot
|
||||
snapshot_id = result["snapshots"].first["id"]
|
||||
@snapshot = Fog::Compute[:brightbox].images.get(snapshot_id)
|
||||
@snapshot.wait_for { ready? }
|
||||
@snapshot.destroy
|
||||
end
|
||||
|
||||
tests("#destroy_server('#{server_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].destroy_server(server_id)
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER, false) { result }
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -6,13 +6,13 @@ Shindo.tests('Fog::Compute[:brightbox] | server type requests', ['brightbox']) d
|
|||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].list_server_types
|
||||
@server_type_id = result.first["id"]
|
||||
formats(Brightbox::Compute::Formats::Collection::SERVER_TYPES) { result }
|
||||
formats(Brightbox::Compute::Formats::Collection::SERVER_TYPES, false) { result }
|
||||
end
|
||||
|
||||
tests("#get_server_type('#{@server_type_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].get_server_type(@server_type_id)
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_TYPE) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::SERVER_TYPE, false) { result }
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -6,20 +6,20 @@ Shindo.tests('Fog::Compute[:brightbox] | user requests', ['brightbox']) do
|
|||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].list_users
|
||||
@user_id = result.first["id"]
|
||||
formats(Brightbox::Compute::Formats::Collection::USERS) { result }
|
||||
formats(Brightbox::Compute::Formats::Collection::USERS, false) { result }
|
||||
end
|
||||
|
||||
tests("#get_user('#{@user_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].get_user(@user_id)
|
||||
formats(Brightbox::Compute::Formats::Full::USER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::USER, false) { result }
|
||||
end
|
||||
|
||||
update_options = { :name => "Example User" }
|
||||
tests("#update_user('#{@user_id}', #{update_options.inspect})") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].update_user(@user_id, update_options)
|
||||
formats(Brightbox::Compute::Formats::Full::USER) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::USER, false) { result }
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -6,13 +6,13 @@ Shindo.tests('Fog::Compute[:brightbox] | zone requests', ['brightbox']) do
|
|||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].list_zones
|
||||
@zone_id = result.first["id"]
|
||||
formats(Brightbox::Compute::Formats::Collection::ZONES) { result }
|
||||
formats(Brightbox::Compute::Formats::Collection::ZONES, false) { result }
|
||||
end
|
||||
|
||||
tests("#get_zone('#{@zone_id}')") do
|
||||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].get_zone(@zone_id)
|
||||
formats(Brightbox::Compute::Formats::Full::ZONE) { result }
|
||||
formats(Brightbox::Compute::Formats::Full::ZONE, false) { result }
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue