[bluebox|blb] clean up, define types returned
This commit is contained in:
parent
129945dcb5
commit
16eba31509
|
@ -6,12 +6,17 @@ module Fog
|
|||
# Get details of a lb_application.
|
||||
#
|
||||
# ==== Parameters
|
||||
# * lb_application_id<~Integer> - Id of block to lookup
|
||||
# * lb_application_id<~Integer> - ID of application
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~Hash>:
|
||||
# TODO
|
||||
# * 'id'<~String> - UUID of application
|
||||
# * 'ip_v4'<~Array> - IPv4 addresses
|
||||
# * 'ip_v6'<~String> - IPv6 address
|
||||
# * 'name'<~String> - The hostname
|
||||
# * 'lb_services'<~Array> - Listening services
|
||||
# * 'source_ip_v4'<~String> - address that application connects to pool members from (v1 only)
|
||||
def get_lb_application(lb_application_id)
|
||||
request(
|
||||
:expects => 200,
|
||||
|
@ -19,11 +24,11 @@ module Fog
|
|||
:path => "api/lb_applications/#{lb_application_id}.json"
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Mock
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,17 +2,18 @@ module Fog
|
|||
module Bluebox
|
||||
class BLB
|
||||
class Real
|
||||
|
||||
# Get list of blocks
|
||||
# Get list of applications
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~Array>:
|
||||
# * 'ip-v4'<~Array> - Ip addresses
|
||||
# * 'ip-v6'<~String> - IP v6 address
|
||||
# * 'name'<~String> - The hostname
|
||||
# * 'source-ip-v4'<~String> - Where traffic comes from
|
||||
# * 'services'<~Array> - Listening services
|
||||
# * 'application'<~Hash>:
|
||||
# * 'id'<~String> - UUID of application
|
||||
# * 'ip_v4'<~Array> - IPv4 addresses
|
||||
# * 'ip_v6'<~String> - IPv6 address
|
||||
# * 'name'<~String> - The hostname
|
||||
# * 'lb_services'<~Array> - Listening services
|
||||
# * 'source_ip_v4'<~String> - address that application connects to pool members from (v1 only)
|
||||
def get_lb_applications
|
||||
request(
|
||||
:expects => 200,
|
||||
|
@ -20,10 +21,11 @@ module Fog
|
|||
:path => 'api/lb_applications.json'
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Mock
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,16 +3,23 @@ module Fog
|
|||
class BLB
|
||||
class Real
|
||||
|
||||
# Get details of a lb_backend.
|
||||
# Get details of an lb_backend.
|
||||
#
|
||||
# ==== Parameters
|
||||
# * lb_service_id - service backend belongs to
|
||||
# * lb_backend_id<~Integer> - backend to look up
|
||||
# * lb_service_id<~String> - service backend belongs to
|
||||
# * lb_backend_id<~String> - backend to look up
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~Hash>:
|
||||
# TODO
|
||||
# * id<~String> - backend ID
|
||||
# * backend_name<~String>
|
||||
# * lb_machines<~Array> - array of backend members
|
||||
# * acl_name<~String> - name of ACL for this backend
|
||||
# * acl_rule<~String>
|
||||
# * monitoring_url_hostname<~String> - HTTP host header for health check
|
||||
# * monitoring_url<~String> - URL for health check
|
||||
# * check_interval<~Integer> - time between checks, in milliseconds
|
||||
def get_lb_backend(lb_service_id, lb_backend_id)
|
||||
request(
|
||||
:expects => 200,
|
||||
|
@ -20,11 +27,11 @@ module Fog
|
|||
:path => "api/lb_services/#{lb_service_id}/lb_backends/#{lb_backend_id}.json"
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Mock
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,16 +6,20 @@ module Fog
|
|||
# Get list of backends
|
||||
#
|
||||
# ==== Parameters
|
||||
# * lb_service_id - service containing backends
|
||||
# * lb_service_id<~String> - service containing backends
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~Array>:
|
||||
# * 'ip-v4'<~Array> - Ip addresses
|
||||
# * 'ip-v6'<~String> - IP v6 address
|
||||
# * 'name'<~String> - The hostname
|
||||
# * 'source-ip-v4'<~String> - Where traffic comes from
|
||||
# * 'services'<~Array> - Listening services
|
||||
# * backend<~Hash>:
|
||||
# * id<~String> - backend ID
|
||||
# * backend_name<~String>
|
||||
# * lb_machines<~Array> - array of backend members
|
||||
# * acl_name<~String> - name of ACL for this backend
|
||||
# * acl_rule<~String>
|
||||
# * monitoring_url_hostname<~String> - HTTP host header for health check
|
||||
# * monitoring_url<~String> - URL for health check
|
||||
# * check_interval<~Integer> - time between checks, in milliseconds
|
||||
def get_lb_backends(lb_service_id)
|
||||
request(
|
||||
:expects => 200,
|
||||
|
@ -23,10 +27,11 @@ module Fog
|
|||
:path => "api/lb_services/#{lb_service_id}/lb_backends.json"
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Mock
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,13 +6,20 @@ module Fog
|
|||
# Get details of a lb_service.
|
||||
#
|
||||
# ==== Parameters
|
||||
# * lb_application_id<~String> - Id of application the service is in
|
||||
# * lb_service_id<~String> - Id of service to lookup
|
||||
# * lb_application_id<~String> - ID of application the service belongs to
|
||||
# * lb_service_id<~String> - ID of service to look up
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~Hash>:
|
||||
# TODO
|
||||
# * name<~String> - service name
|
||||
# * port<~Integer> - port of load balanced service
|
||||
# * private<~Boolean> - whether service is only available internally
|
||||
# * status_username<~String> - HTTP basic auth username
|
||||
# * status_password<~String> - HTTP basic auth password
|
||||
# * status_url<~String> - URL of stats page
|
||||
# * service_type<~String> - proto being load balanced (e.g. 'http', 'tcp')
|
||||
# * created<~DateTime> - when service was created
|
||||
def get_lb_service(lb_application_id, lb_service_id)
|
||||
request(
|
||||
:expects => 200,
|
||||
|
@ -20,11 +27,11 @@ module Fog
|
|||
:path => "api/lb_applications/#{lb_application_id}/lb_services/#{lb_service_id}.json"
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Mock
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,6 +11,15 @@ module Fog
|
|||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~Array>:
|
||||
# * backend<~Hash>:
|
||||
# * name<~String> - service name
|
||||
# * port<~Integer> - port of load balanced service
|
||||
# * private<~Boolean> - whether service is only available internally
|
||||
# * status_username<~String> - HTTP basic auth username
|
||||
# * status_password<~String> - HTTP basic auth password
|
||||
# * status_url<~String> - URL of stats page
|
||||
# * service_type<~String> - proto being load balanced (e.g. 'http', 'tcp')
|
||||
# * created<~DateTime> - when service was created
|
||||
def get_lb_services(lb_application_id)
|
||||
request(
|
||||
:expects => 200,
|
||||
|
@ -18,10 +27,11 @@ module Fog
|
|||
:path => "api/lb_applications/#{lb_application_id}/lb_services.json"
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Mock
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue