1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/glesys/requests/compute/helper.rb

267 lines
7.4 KiB
Ruby
Raw Normal View History

2011-08-17 11:53:20 -04:00
class Glesys
module Compute
module Formats
module Servers
LIST = {
'debug' => {
2013-02-05 14:45:05 -05:00
'input' => Array
},
2011-08-17 11:53:20 -04:00
'servers' => [{
'serverid' => String,
'hostname' => String,
'datacenter' => String,
'platform' => String
2011-08-17 11:53:20 -04:00
}],
'status' => {
'timestamp' => String,
'code' => Integer,
'text' => String
2011-08-17 11:53:20 -04:00
}
}
DETAILS = {
'debug' => {
'input' => {
'serverid' => Fog::Nullable::String
}
},
2011-08-17 11:53:20 -04:00
'server' => {
'managedhosting' => String,
'cost' => {
'amount' => Float,
'timeperiod' => String,
2011-08-17 11:53:20 -04:00
'currency' => String
},
'serverid' => String,
'datacenter' => String,
'memorysize' => Integer,
'cpucores' => Integer,
'transfer' => Integer,
'templatename' => String,
'iplist' => [{
'cost' => Integer,
'version' => Fog::Nullable::Integer,
'ipaddress' => Fog::Nullable::String,
'currency' => String
2011-08-17 11:53:20 -04:00
}],
'description' => String,
'hostname' => String,
'disksize' => Integer,
'platform' => String,
'state' => Fog::Nullable::String
},
2011-08-17 11:53:20 -04:00
'status' => {
'timestamp' => String,
'code' => Integer,
'text' => String
2011-08-17 11:53:20 -04:00
}
}
STOP = DETAILS.merge(
'debug' => {
'input' => {
'serverid' => Fog::Nullable::String,
'type' => String
}
}
)
CREATE = DETAILS.merge(
'debug' => {
'input' => {
'serverid' => Fog::Nullable::String,
'hostname' => String,
'rootpassword' => String,
'datacenter' => String,
'platform' => String,
'templatename' => String,
'disksize' => String,
'memorysize' => String,
'cpucores' => String,
'transfer' => String,
'description' => String
}
}
)
2011-08-17 11:53:20 -04:00
STATUS = {
'debug' => {
'input' => {
'serverid' => String
}
},
2011-08-17 11:53:20 -04:00
'server' => {
'memory' => {
'usage' => Fog::Nullable::Integer,
'max' => Fog::Nullable::Integer,
'unit' => Fog::Nullable::String
},
'transfer' => {
'usage' => Fog::Nullable::Integer,
'max' => Fog::Nullable::Integer,
'unit' => Fog::Nullable::String
},
'disk' => {
'usage' => Fog::Nullable::Integer,
'max' => Fog::Nullable::Integer,
'unit' => Fog::Nullable::String
},
'state' => String,
'transfer' => {
'usage' => Fog::Nullable::Integer,
'max' => Fog::Nullable::Integer,
'unit' => Fog::Nullable::String
},
'cpu' => {
'usage' => Fog::Nullable::Integer,
'max' => Fog::Nullable::Integer,
'unit' => Fog::Nullable::String
},
'uptime' => {
'current' => Fog::Nullable::Integer,
'unit' => String
},
'warnings' => []
2011-08-17 11:53:20 -04:00
},
'status' => {
'timestamp' => String,
'code' => Integer,
'text' => String
2011-08-17 11:53:20 -04:00
}
}
2011-08-17 11:53:20 -04:00
DESTROY = {
'debug' => {
'input' => {
'serverid' => String,
'keepip' => String
}
},
'status' => {
'timestamp' => String,
'code' => Integer,
'text' => String
}
}
2011-08-17 11:53:20 -04:00
end
module Ips
2011-08-17 11:53:20 -04:00
IPLIST = {
'debug' => {
'input' => []
},
2011-08-17 11:53:20 -04:00
'iplist' => [{
'cost' => {
'amount' => Integer,
'timeperiod' => String,
'currency' => String
2011-08-17 11:53:20 -04:00
},
'netmask' => Fog::Nullable::String,
'broadcast' => Fog::Nullable::String,
'gateway' => Fog::Nullable::String,
2013-02-05 14:45:05 -05:00
'nameservers' => Array,
'datacenter' => String,
'serverid' => Fog::Nullable::String,
'platform' => String,
'ipaddress' => String,
'ipversion' => Integer,
'ptr' => String,
'reserved' => String
2011-08-17 11:53:20 -04:00
}],
'status' => {
'timestamp' => String,
'code' => Integer,
'text' => String
2011-08-17 11:53:20 -04:00
}
}
2011-08-17 11:53:20 -04:00
IPLIST_ALL = {
'debug' => {
'input' => {
'datacenter' => String,
'ipversion' => String,
'platform' => String
}
2011-08-17 11:53:20 -04:00
},
'iplist' => {
'ipversion' => Integer,
'datacenter' => String,
'platform' => String,
2013-02-05 14:45:05 -05:00
"ipaddresses" => Array
},
2011-08-17 11:53:20 -04:00
'status' => {
'timestamp' => String,
'code' => Integer,
'text' => String
2011-08-17 11:53:20 -04:00
},
}
IPLIST_CATCH_RELEASE = {
'debug' => {
'input' => {
'ipaddress' => String,
}
},
'details' => {
'cost' => {
'amount' => Integer,
'timeperiod' => String,
'currency' => String
},
'ipaddress' => String,
'netmask' => String,
'broadcast' => String,
'gateway' => String,
2013-02-05 14:45:05 -05:00
'nameservers' => Array,
'datacenter' => String,
'serverid' => Fog::Nullable::String,
'platform' => String,
'ipaddress' => String,
'ipversion' => Integer,
'ptr' => String,
'reserved' => String
},
2011-08-17 11:53:20 -04:00
'status' => {
'timestamp' => String,
'code' => Integer,
'text' => String
2011-08-17 11:53:20 -04:00
}
}
end
module Templates
LIST = {
'debug' => {
'input' => []
},
'templates' => {
2011-08-17 11:53:20 -04:00
'Xen' => [{
'name' => String,
'operatingsystem' => String,
'minimummemorysize' => Integer,
'minimumdisksize' => Integer,
'platform' => String
2011-08-17 11:53:20 -04:00
}],
'OpenVZ' => [{
'name' => String,
'operatingsystem' => String,
'minimummemorysize' => Integer,
'minimumdisksize' => Integer,
'platform' => String
2011-08-17 11:53:20 -04:00
}]
},
'status' => {
'timestamp' => String,
'code' => Integer,
'text' => String
2011-08-17 11:53:20 -04:00
}
}
end
end
end
end