2011-08-17 11:53:20 -04:00
|
|
|
class Glesys
|
|
|
|
module Compute
|
|
|
|
module Formats
|
|
|
|
module Servers
|
|
|
|
|
|
|
|
LIST = {
|
2011-11-29 13:00:45 -05:00
|
|
|
'debug' => {
|
|
|
|
'input' => []
|
|
|
|
},
|
2011-08-17 11:53:20 -04:00
|
|
|
'servers' => [{
|
|
|
|
'serverid' => String,
|
2011-11-14 12:47:55 -05:00
|
|
|
'hostname' => String,
|
|
|
|
'datacenter' => String,
|
2012-02-20 14:36:39 -05:00
|
|
|
'platform' => String
|
2011-08-17 11:53:20 -04:00
|
|
|
}],
|
|
|
|
'status' => {
|
2012-02-20 14:36:39 -05:00
|
|
|
'timestamp' => String,
|
|
|
|
'code' => Integer,
|
|
|
|
'text' => String
|
2011-08-17 11:53:20 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
DETAILS = {
|
2011-11-29 13:00:45 -05:00
|
|
|
'debug' => {
|
|
|
|
'input' => {
|
2012-02-20 14:36:39 -05:00
|
|
|
'serverid' => Fog::Nullable::String
|
2011-11-29 13:00:45 -05:00
|
|
|
}
|
|
|
|
},
|
2011-08-17 11:53:20 -04:00
|
|
|
'server' => {
|
|
|
|
'managedhosting' => String,
|
|
|
|
'cost' => {
|
|
|
|
'amount' => Float,
|
2011-11-29 13:00:45 -05:00
|
|
|
'timeperiod' => String,
|
2011-08-17 11:53:20 -04:00
|
|
|
'currency' => String
|
2012-02-20 14:36:39 -05:00
|
|
|
},
|
|
|
|
'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,
|
2011-11-29 13:00:45 -05:00
|
|
|
'hostname' => String,
|
2012-02-20 14:36:39 -05:00
|
|
|
'disksize' => Integer,
|
|
|
|
'platform' => String,
|
|
|
|
'state' => Fog::Nullable::String
|
2011-11-29 13:00:45 -05:00
|
|
|
},
|
2011-08-17 11:53:20 -04:00
|
|
|
'status' => {
|
2012-02-20 14:36:39 -05:00
|
|
|
'timestamp' => String,
|
|
|
|
'code' => Integer,
|
|
|
|
'text' => String
|
2011-08-17 11:53:20 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-02-20 14:36:39 -05: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 = {
|
2011-11-29 13:00:45 -05:00
|
|
|
'debug' => {
|
|
|
|
'input' => {
|
|
|
|
'serverid' => String
|
|
|
|
}
|
|
|
|
},
|
2011-08-17 11:53:20 -04:00
|
|
|
'server' => {
|
2012-02-20 14:36:39 -05:00
|
|
|
'memory' => {
|
|
|
|
'usage' => Fog::Nullable::Integer,
|
|
|
|
'max' => Fog::Nullable::Integer,
|
|
|
|
'unit' => Fog::Nullable::String
|
2011-11-29 13:00:45 -05:00
|
|
|
},
|
2012-02-20 14:36:39 -05:00
|
|
|
'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
|
|
|
|
},
|
2012-05-04 09:30:58 -04:00
|
|
|
'cpu' => {
|
|
|
|
'usage' => Fog::Nullable::Integer,
|
|
|
|
'max' => Fog::Nullable::Integer,
|
|
|
|
'unit' => Fog::Nullable::String
|
|
|
|
},
|
2012-02-20 14:36:39 -05:00
|
|
|
'uptime' => {
|
|
|
|
'current' => Fog::Nullable::Integer,
|
|
|
|
'unit' => String
|
2012-05-04 09:30:58 -04:00
|
|
|
},
|
|
|
|
'warnings' => []
|
2011-08-17 11:53:20 -04:00
|
|
|
},
|
2011-09-08 16:52:43 -04:00
|
|
|
'status' => {
|
2012-02-20 14:36:39 -05:00
|
|
|
'timestamp' => String,
|
|
|
|
'code' => Integer,
|
|
|
|
'text' => String
|
2011-08-17 11:53:20 -04:00
|
|
|
}
|
2012-02-20 14:36:39 -05:00
|
|
|
}
|
2011-08-17 11:53:20 -04:00
|
|
|
|
2012-02-20 14:36:39 -05:00
|
|
|
DESTROY = {
|
2011-11-29 13:00:45 -05:00
|
|
|
'debug' => {
|
|
|
|
'input' => {
|
2012-02-20 14:36:39 -05:00
|
|
|
'serverid' => String,
|
|
|
|
'keepip' => String
|
2011-11-29 13:00:45 -05:00
|
|
|
}
|
2011-09-08 16:52:43 -04:00
|
|
|
},
|
|
|
|
'status' => {
|
2012-02-20 14:36:39 -05:00
|
|
|
'timestamp' => String,
|
|
|
|
'code' => Integer,
|
|
|
|
'text' => String
|
2011-09-08 16:52:43 -04:00
|
|
|
}
|
|
|
|
}
|
2011-08-17 11:53:20 -04:00
|
|
|
|
|
|
|
end
|
|
|
|
module Ips
|
2011-11-29 13:00:45 -05:00
|
|
|
|
2011-08-17 11:53:20 -04:00
|
|
|
IPLIST = {
|
2011-11-29 13:00:45 -05:00
|
|
|
'debug' => {
|
|
|
|
'input' => []
|
|
|
|
},
|
2011-08-17 11:53:20 -04:00
|
|
|
'iplist' => [{
|
2012-02-20 14:36:39 -05:00
|
|
|
'cost' => {
|
|
|
|
'amount' => Integer,
|
|
|
|
'timeperiod' => String,
|
|
|
|
'currency' => String
|
2011-08-17 11:53:20 -04:00
|
|
|
},
|
2012-02-20 14:36:39 -05:00
|
|
|
'netmask' => Fog::Nullable::String,
|
|
|
|
'broadcast' => Fog::Nullable::String,
|
|
|
|
'gateway' => Fog::Nullable::String,
|
|
|
|
'nameservers' => [],
|
|
|
|
'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' => {
|
2012-02-20 14:36:39 -05:00
|
|
|
'timestamp' => String,
|
|
|
|
'code' => Integer,
|
|
|
|
'text' => String
|
2011-08-17 11:53:20 -04:00
|
|
|
}
|
|
|
|
}
|
2011-11-29 13:00:45 -05:00
|
|
|
|
2011-08-17 11:53:20 -04:00
|
|
|
IPLIST_ALL = {
|
2011-11-29 13:00:45 -05:00
|
|
|
'debug' => {
|
|
|
|
'input' => {
|
|
|
|
'datacenter' => String,
|
|
|
|
'ipversion' => String,
|
|
|
|
'platform' => String
|
|
|
|
}
|
2011-08-17 11:53:20 -04:00
|
|
|
},
|
2012-02-20 14:36:39 -05:00
|
|
|
'iplist' => {
|
|
|
|
'ipversion' => Integer,
|
|
|
|
'datacenter' => String,
|
|
|
|
'platform' => String,
|
|
|
|
"ipaddresses" => []
|
|
|
|
},
|
2011-08-17 11:53:20 -04:00
|
|
|
'status' => {
|
2012-02-20 14:36:39 -05:00
|
|
|
'timestamp' => String,
|
|
|
|
'code' => Integer,
|
|
|
|
'text' => String
|
2011-08-17 11:53:20 -04:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
IPLIST_CATCH_RELEASE = {
|
2011-11-29 13:00:45 -05:00
|
|
|
'debug' => {
|
|
|
|
'input' => {
|
|
|
|
'ipaddress' => String,
|
|
|
|
}
|
|
|
|
},
|
2012-02-20 14:36:39 -05:00
|
|
|
'details' => {
|
|
|
|
'cost' => {
|
|
|
|
'amount' => Integer,
|
|
|
|
'timeperiod' => String,
|
|
|
|
'currency' => String
|
|
|
|
},
|
|
|
|
'ipaddress' => String,
|
|
|
|
'netmask' => String,
|
|
|
|
'broadcast' => String,
|
|
|
|
'gateway' => String,
|
|
|
|
'nameservers' => [],
|
|
|
|
'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' => {
|
2012-02-20 14:36:39 -05:00
|
|
|
'timestamp' => String,
|
|
|
|
'code' => Integer,
|
|
|
|
'text' => String
|
2011-08-17 11:53:20 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
end
|
|
|
|
module Templates
|
|
|
|
|
|
|
|
LIST = {
|
2011-11-29 13:00:45 -05:00
|
|
|
'debug' => {
|
|
|
|
'input' => []
|
|
|
|
},
|
|
|
|
'templates' => {
|
2011-08-17 11:53:20 -04:00
|
|
|
'Xen' => [{
|
2012-02-20 14:36:39 -05:00
|
|
|
'name' => String,
|
|
|
|
'operatingsystem' => String,
|
|
|
|
'minimummemorysize' => Integer,
|
|
|
|
'minimumdisksize' => Integer,
|
|
|
|
'platform' => String
|
2011-08-17 11:53:20 -04:00
|
|
|
}],
|
|
|
|
'OpenVZ' => [{
|
2012-02-20 14:36:39 -05:00
|
|
|
'name' => String,
|
|
|
|
'operatingsystem' => String,
|
|
|
|
'minimummemorysize' => Integer,
|
|
|
|
'minimumdisksize' => Integer,
|
|
|
|
'platform' => String
|
2011-08-17 11:53:20 -04:00
|
|
|
}]
|
|
|
|
},
|
|
|
|
'status' => {
|
2012-02-20 14:36:39 -05:00
|
|
|
'timestamp' => String,
|
|
|
|
'code' => Integer,
|
|
|
|
'text' => String
|
2011-08-17 11:53:20 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|