Merge pull request #3132 from brianokeefe/linode-cores

[linode|compute] Get number of CPU cores from the API
This commit is contained in:
Wesley Beary 2014-08-29 15:47:22 -05:00
commit 4e6929c772
3 changed files with 4 additions and 26 deletions

View File

@ -9,31 +9,7 @@ module Fog
attribute :name
attribute :ram
attribute :price
def cores
case id
when 1
1
when 2
2
when 4
4
when 6
6
when 7
8
when 8
12
when 9
16
when 10
20
when 12
20
else
0
end
end
attribute :cores
def bits
0 # these are determined by images you select not the hardware

View File

@ -56,6 +56,7 @@ module Fog
{ "PRICE" => 19.95, "RAM" => 512, "XFER" => 200,
"PLANID" => linodeplan_id, "LABEL" => "Linode #{linodeplan_id}",
"DISK" => 20,
"CORES" => 1,
"AVAIL" => {
"3"=>48, "2"=>207, "7"=>161, "6"=>143, "4"=>108, "8"=>60
}

View File

@ -15,7 +15,8 @@ Shindo.tests('Fog::Compute[:linode] | linodeplans requests', ['linode']) do
'PRICE' => Float,
'RAM' => Integer,
'LABEL' => String,
'XFER' => Integer
'XFER' => Integer,
'CORES' => Integer
}]
})