mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[Brightbox] Merge in various spec corrections
This commit is contained in:
commit
598b031375
3 changed files with 45 additions and 7 deletions
|
@ -95,6 +95,7 @@ module Fog
|
|||
request :update_account
|
||||
request :update_api_client
|
||||
request :update_cloud_ip
|
||||
request :update_firewall_rule
|
||||
request :update_image
|
||||
request :update_load_balancer
|
||||
request :update_server
|
||||
|
|
13
lib/fog/brightbox/requests/compute/update_firewall_rule.rb
Normal file
13
lib/fog/brightbox/requests/compute/update_firewall_rule.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
module Fog
|
||||
module Compute
|
||||
class Brightbox
|
||||
class Real
|
||||
|
||||
def update_firewall_rule(id, options)
|
||||
request("put", "/1.0/firewall_rules/#{id}", [202], options)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -2,6 +2,7 @@ module Fog
|
|||
module Brightbox
|
||||
module Nullable
|
||||
module Account; end
|
||||
module FirewallPolicy; end
|
||||
module Image; end
|
||||
module Interface; end
|
||||
module LoadBalancer; end
|
||||
|
@ -14,6 +15,9 @@ end
|
|||
Hash.send :include, Fog::Brightbox::Nullable::Account
|
||||
NilClass.send :include, Fog::Brightbox::Nullable::Account
|
||||
|
||||
Hash.send :include, Fog::Brightbox::Nullable::FirewallPolicy
|
||||
NilClass.send :include, Fog::Brightbox::Nullable::FirewallPolicy
|
||||
|
||||
Hash.send :include, Fog::Brightbox::Nullable::Image
|
||||
NilClass.send :include, Fog::Brightbox::Nullable::Image
|
||||
|
||||
|
@ -105,7 +109,9 @@ class Brightbox
|
|||
"resource_type" => String,
|
||||
"url" => String,
|
||||
"name" => String,
|
||||
"default" => Fog::Boolean
|
||||
"default" => Fog::Boolean,
|
||||
"created_at" => String,
|
||||
"description" => Fog::Nullable::String
|
||||
}
|
||||
|
||||
FIREWALL_RULE = {
|
||||
|
@ -144,6 +150,16 @@ class Brightbox
|
|||
"mac_address" => String
|
||||
}
|
||||
|
||||
LOAD_BALANCER = {
|
||||
"id" => String,
|
||||
"resource_type" => String,
|
||||
"url" => String,
|
||||
"name" => String,
|
||||
"status" => String,
|
||||
"created_at" => String,
|
||||
"deleted_at" => Fog::Nullable::String
|
||||
}
|
||||
|
||||
SERVER = {
|
||||
"id" => String,
|
||||
"resource_type" => String,
|
||||
|
@ -263,12 +279,12 @@ class Brightbox
|
|||
"compatibility_mode" => Fog::Boolean,
|
||||
"virtual_size" => Integer,
|
||||
"disk_size" => Integer,
|
||||
"min_ram" => Fog::Nullable::Integer,
|
||||
"ancestor" => Fog::Brightbox::Nullable::Image,
|
||||
"username" => Fog::Nullable::String
|
||||
}
|
||||
|
||||
LOAD_BALANCER = {
|
||||
"cloud_ips" => Array,
|
||||
"id" => String,
|
||||
"resource_type" => String,
|
||||
"url" => String,
|
||||
|
@ -276,9 +292,10 @@ class Brightbox
|
|||
"status" => String,
|
||||
"created_at" => String,
|
||||
"deleted_at" => Fog::Nullable::String,
|
||||
"cloud_ips" => [Brightbox::Compute::Formats::Nested::CLOUD_IP],
|
||||
"account" => Brightbox::Compute::Formats::Nested::ACCOUNT,
|
||||
"nodes" => [Brightbox::Compute::Formats::Nested::SERVER],
|
||||
"cloud_ips" => [Brightbox::Compute::Formats::Nested::CLOUD_IP]
|
||||
"listeners" => [Brightbox::Compute::Formats::Struct::LB_LISTENER],
|
||||
"nodes" => [Brightbox::Compute::Formats::Nested::SERVER]
|
||||
}
|
||||
|
||||
SERVER = {
|
||||
|
@ -312,7 +329,8 @@ class Brightbox
|
|||
"default" => Fog::Boolean,
|
||||
"created_at" => String,
|
||||
"account" => Brightbox::Compute::Formats::Nested::ACCOUNT,
|
||||
"servers" => [Brightbox::Compute::Formats::Nested::SERVER]
|
||||
"servers" => [Brightbox::Compute::Formats::Nested::SERVER],
|
||||
"firewall_policy" => Fog::Brightbox::Nullable::FirewallPolicy
|
||||
}
|
||||
|
||||
SERVER_TYPE = {
|
||||
|
@ -381,6 +399,10 @@ class Brightbox
|
|||
"users" => [Brightbox::Compute::Formats::Nested::USER],
|
||||
"clients" => [Brightbox::Compute::Formats::Nested::API_CLIENT],
|
||||
"servers" => [Brightbox::Compute::Formats::Nested::SERVER],
|
||||
"load_balancers" => [Brightbox::Compute::Formats::Nested::LOAD_BALANCER],
|
||||
"cloud_ips" => [Brightbox::Compute::Formats::Nested::CLOUD_IP],
|
||||
"server_groups" => [Brightbox::Compute::Formats::Nested::SERVER_GROUP],
|
||||
"firewall_policies" => [Brightbox::Compute::Formats::Nested::FIREWALL_POLICY],
|
||||
"images" => [Brightbox::Compute::Formats::Nested::IMAGE],
|
||||
"zones" => [Brightbox::Compute::Formats::Nested::ZONE]
|
||||
}
|
||||
|
@ -451,6 +473,7 @@ class Brightbox
|
|||
"compatibility_mode" => Fog::Boolean,
|
||||
"virtual_size" => Integer,
|
||||
"disk_size" => Integer,
|
||||
"min_ram" => Fog::Nullable::Integer,
|
||||
"ancestor" => Fog::Brightbox::Nullable::Image,
|
||||
"username" => Fog::Nullable::String
|
||||
}
|
||||
|
@ -502,7 +525,7 @@ class Brightbox
|
|||
"snapshots" => [Brightbox::Compute::Formats::Nested::IMAGE],
|
||||
"server_groups" => [Brightbox::Compute::Formats::Nested::SERVER_GROUP],
|
||||
"interfaces" => [Brightbox::Compute::Formats::Nested::INTERFACE],
|
||||
"zone" => Brightbox::Compute::Formats::Nested::ZONE,
|
||||
"zone" => Fog::Brightbox::Nullable::Zone,
|
||||
"username" => Fog::Nullable::String
|
||||
}
|
||||
|
||||
|
@ -516,7 +539,8 @@ class Brightbox
|
|||
"default" => Fog::Boolean,
|
||||
"created_at" => String,
|
||||
"account" => Brightbox::Compute::Formats::Nested::ACCOUNT,
|
||||
"servers" => [Brightbox::Compute::Formats::Nested::SERVER]
|
||||
"servers" => [Brightbox::Compute::Formats::Nested::SERVER],
|
||||
"firewall_policy" => Fog::Brightbox::Nullable::FirewallPolicy
|
||||
}
|
||||
|
||||
SERVER_TYPE = {
|
||||
|
|
Loading…
Reference in a new issue