2012-02-10 10:10:49 -05:00
|
|
|
Shindo.tests("Fog::Compute[:joyent] | dataset requests", ["joyent"]) do
|
|
|
|
@dataset_format = {
|
2012-02-20 10:09:09 -05:00
|
|
|
"description" => String,
|
2012-07-28 12:06:00 -04:00
|
|
|
"requirements" => {
|
|
|
|
"max_memory" => Integer,
|
|
|
|
"min_memory" => Integer
|
|
|
|
},
|
2012-02-10 10:10:49 -05:00
|
|
|
"name" => String,
|
|
|
|
"version" => String,
|
|
|
|
"os" => String,
|
|
|
|
"id" => String,
|
|
|
|
"urn" => String,
|
|
|
|
"default" => Fog::Boolean,
|
|
|
|
"type" => String,
|
2012-02-21 03:31:22 -05:00
|
|
|
"created" => Time,
|
2012-02-10 10:10:49 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
if Fog.mock?
|
|
|
|
Fog::Compute[:joyent].data[:datasets] = {
|
2012-02-21 03:31:22 -05:00
|
|
|
"33904834-1f01-49d3-bed3-b642e158c375" => {
|
|
|
|
"id" => "33904834-1f01-49d3-bed3-b642e158c375",
|
|
|
|
"urn" => "sdc:sdc:zeus-simple-lb-200mbps:1.1.1",
|
|
|
|
"name" => "zeus-simple-lb-200mbps",
|
2012-02-10 10:10:49 -05:00
|
|
|
"os" => "smartos",
|
|
|
|
"type" => "smartmachine",
|
2012-02-21 03:31:22 -05:00
|
|
|
"description" => "Zeus Simple Load Balancer 200 Mbps SmartMachine",
|
|
|
|
"default" => false,
|
2012-07-28 12:06:00 -04:00
|
|
|
"requirements" => {
|
|
|
|
"max_memory" => 32768,
|
|
|
|
"min_memory" => 4096
|
|
|
|
},
|
2012-02-21 03:31:22 -05:00
|
|
|
"version" => "1.1.1",
|
|
|
|
"created" => Time.parse("2011-09-15T07:39:13+00:00")
|
2012-02-10 10:10:49 -05:00
|
|
|
},
|
2012-02-21 03:31:22 -05:00
|
|
|
"3fcf35d2-dd79-11e0-bdcd-b3c7ac8aeea6" => {
|
|
|
|
"id" => "3fcf35d2-dd79-11e0-bdcd-b3c7ac8aeea6",
|
|
|
|
"urn" => "sdc:sdc:mysql:1.4.1",
|
|
|
|
"name" => "mysql",
|
2012-02-10 10:10:49 -05:00
|
|
|
"os" => "smartos",
|
|
|
|
"type" => "smartmachine",
|
2012-02-21 03:31:22 -05:00
|
|
|
"description" => "MySQL SmartMachine",
|
|
|
|
"default" => false,
|
2012-07-28 12:06:00 -04:00
|
|
|
"requirements" => {
|
|
|
|
"max_memory" => 32768,
|
|
|
|
"min_memory" => 4096
|
|
|
|
},
|
2012-02-21 03:31:22 -05:00
|
|
|
"version" => "1.4.1",
|
|
|
|
"created" => Time.parse("2011-09-15T05:01:34+00:00")
|
2012-02-10 10:10:49 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("#list_datasets") do
|
|
|
|
formats(@dataset_format) do
|
|
|
|
Fog::Compute[:joyent].list_datasets.body.first
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|