2011-07-13 16:27:55 -04:00
|
|
|
SINGLE_NODE_FORMAT = {'address' => String, 'id' => Integer, 'status' => String, 'weight' => Fog::Nullable::Integer, 'port' => Integer, 'condition' => String}
|
|
|
|
NODE_FORMAT = {'node' => SINGLE_NODE_FORMAT}
|
|
|
|
NODES_FORMAT = {'nodes' => [SINGLE_NODE_FORMAT]}
|
|
|
|
VIRTUAL_IP_FORMAT = {'type' => String, 'id' => Integer, 'type' => String, 'ipVersion' => String, 'address' => String}
|
2011-07-15 00:07:29 -04:00
|
|
|
VIRTUAL_IPS_FORMAT = { 'virtualIps' => [VIRTUAL_IP_FORMAT] }
|
2011-11-24 12:32:53 -05:00
|
|
|
SOURCE_ADDRESSES = {
|
|
|
|
'ipv4Servicenet' => String,
|
|
|
|
'ipv4Public' => String,
|
|
|
|
'ipv6Public' => String,
|
|
|
|
}
|
2011-07-27 21:53:33 -04:00
|
|
|
LOAD_BALANCER_USAGE_FORMAT = {
|
|
|
|
'loadBalancerUsageRecords' => [
|
|
|
|
{
|
|
|
|
'id' => Fog::Nullable::Integer,
|
|
|
|
'eventType' => Fog::Nullable::String,
|
|
|
|
'averageNumConnections' => Fog::Nullable::Float,
|
|
|
|
'incomingTransfer' => Fog::Nullable::Integer,
|
|
|
|
'outgoingTransfer' => Fog::Nullable::Integer,
|
|
|
|
'numVips' => Fog::Nullable::Integer,
|
|
|
|
'numPolls' => Fog::Nullable::Integer,
|
|
|
|
'startTime' => Fog::Nullable::String,
|
2011-09-26 17:56:32 -04:00
|
|
|
'endTime' => Fog::Nullable::String,
|
|
|
|
'vipType' => Fog::Nullable::String,
|
2011-07-27 21:53:33 -04:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2011-07-27 21:44:43 -04:00
|
|
|
USAGE_FORMAT = {
|
|
|
|
'accountId' => Integer,
|
|
|
|
'loadBalancerUsages' => [
|
|
|
|
{
|
|
|
|
'loadBalancerId' => Fog::Nullable::Integer,
|
2011-07-27 21:53:33 -04:00
|
|
|
'loadBalancerName' => Fog::Nullable::String
|
|
|
|
}.merge(LOAD_BALANCER_USAGE_FORMAT)
|
2011-07-27 21:44:43 -04:00
|
|
|
],
|
|
|
|
'accountUsage' => [
|
|
|
|
{
|
|
|
|
'startTime' => Fog::Nullable::String,
|
|
|
|
'numLoadBalancers' => Fog::Nullable::Integer,
|
|
|
|
'numPublicVips' => Fog::Nullable::Integer,
|
|
|
|
'numServicenetVips' => Fog::Nullable::Integer
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2011-07-21 10:41:40 -04:00
|
|
|
CONNECTION_LOGGING_FORMAT = {
|
|
|
|
'connectionLogging' => {
|
|
|
|
'enabled' => Fog::Boolean
|
|
|
|
}
|
|
|
|
}
|
2011-07-27 17:19:44 -04:00
|
|
|
CONNECTION_THROTTLING_FORMAT = {
|
|
|
|
'connectionThrottle' => {
|
|
|
|
'maxConnections' => Fog::Nullable::Integer,
|
|
|
|
'minConnections' => Fog::Nullable::Integer,
|
|
|
|
'maxConnectionRate' => Fog::Nullable::Integer,
|
|
|
|
'rateInterval' => Fog::Nullable::Integer
|
|
|
|
}
|
|
|
|
}
|
2011-07-27 17:06:24 -04:00
|
|
|
SESSION_PERSISTENCE_FORMAT = {
|
|
|
|
'sessionPersistence' => {
|
|
|
|
'persistenceType' => Fog::Nullable::String
|
|
|
|
}
|
|
|
|
}
|
2011-07-13 16:27:55 -04:00
|
|
|
|
2011-07-27 16:55:01 -04:00
|
|
|
ACCESS_LIST_FORMAT = {
|
|
|
|
'accessList' => [
|
|
|
|
{
|
|
|
|
'address' => String,
|
|
|
|
'id' => Integer,
|
|
|
|
'type' => String
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2011-07-27 21:12:46 -04:00
|
|
|
HEALTH_MONITOR_FORMAT = {
|
|
|
|
'healthMonitor' => {
|
|
|
|
'type' => Fog::Nullable::String,
|
|
|
|
'delay' => Fog::Nullable::Integer,
|
|
|
|
'timeout' => Fog::Nullable::Integer,
|
|
|
|
'attemptsBeforeDeactivation' => Fog::Nullable::Integer,
|
|
|
|
'path' => Fog::Nullable::String,
|
|
|
|
'bodyRegex' => Fog::Nullable::String,
|
|
|
|
'statusRegex' => Fog::Nullable::String
|
|
|
|
}
|
|
|
|
}
|
2011-07-27 16:55:01 -04:00
|
|
|
|
2011-07-13 16:27:55 -04:00
|
|
|
STATUS_ACTIVE = 'ACTIVE'
|
|
|
|
|
|
|
|
LOAD_BALANCERS_FORMAT = {
|
|
|
|
'loadBalancers' => [
|
|
|
|
{
|
|
|
|
'name' => String,
|
|
|
|
'id' => Integer,
|
|
|
|
'port' => Integer,
|
|
|
|
'protocol' => String,
|
|
|
|
'algorithm' => String,
|
2011-11-24 12:32:53 -05:00
|
|
|
'status' => String,
|
|
|
|
'virtualIps' => [VIRTUAL_IP_FORMAT],
|
|
|
|
'created' => { 'time' => String },
|
|
|
|
'updated' => { 'time' => String }
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
|
|
|
|
LOAD_BALANCERS_DETAIL_FORMAT = {
|
|
|
|
'loadBalancers' => [
|
|
|
|
{
|
|
|
|
'name' => String,
|
|
|
|
'id' => Integer,
|
|
|
|
'port' => Integer,
|
|
|
|
'protocol' => String,
|
|
|
|
'algorithm' => String,
|
|
|
|
'sourceAddresses' => SOURCE_ADDRESSES,
|
2011-07-13 16:27:55 -04:00
|
|
|
'status' => String,
|
|
|
|
'virtualIps' => [VIRTUAL_IP_FORMAT],
|
2011-07-19 18:48:21 -04:00
|
|
|
'nodes' => [SINGLE_NODE_FORMAT],
|
2011-07-13 16:27:55 -04:00
|
|
|
'created' => { 'time' => String },
|
|
|
|
'updated' => { 'time' => String }
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
LOAD_BALANCER_FORMAT = {
|
|
|
|
'loadBalancer' => {
|
|
|
|
'name' => String,
|
|
|
|
'id' => Integer,
|
|
|
|
'port' => Integer,
|
|
|
|
'protocol' => String,
|
|
|
|
'algorithm' => String,
|
2011-11-24 12:32:53 -05:00
|
|
|
'sourceAddresses' => SOURCE_ADDRESSES,
|
2011-07-13 16:27:55 -04:00
|
|
|
'status' => String,
|
|
|
|
'cluster' => { 'name' => String },
|
|
|
|
'virtualIps' => [VIRTUAL_IP_FORMAT],
|
2011-07-19 18:48:21 -04:00
|
|
|
'nodes' => [SINGLE_NODE_FORMAT],
|
2011-07-13 16:27:55 -04:00
|
|
|
'created' => { 'time' => String },
|
|
|
|
'updated' => { 'time' => String },
|
2011-07-21 10:41:40 -04:00
|
|
|
}.merge(CONNECTION_LOGGING_FORMAT)
|
|
|
|
}
|