Merge pull request #3047 from barsoom/new_glesys_attribute

[glesys] API change, new attribute :bandwidth added
This commit is contained in:
Wesley Beary 2014-07-10 09:21:29 -05:00
Родитель 8452317c68 6a95a0f6d6
Коммит 11127f6ac4
3 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@ -14,6 +14,7 @@ module Fog
attribute :memorysize
attribute :disksize
attribute :transfer
attribute :bandwidth
attribute :uptime
attribute :templatename
attribute :managedhosting
@ -65,6 +66,7 @@ module Fog
:cpucores => cpucores || "1",
:rootpassword => rootpassword,
:transfer => transfer || "500",
:bandwidth => bandwidth || "10",
}
# optional options when creating a server:

Просмотреть файл

@ -37,6 +37,7 @@ class Glesys
'memorysize' => Integer,
'cpucores' => Integer,
'transfer' => Integer,
'bandwidth' => Integer,
'templatename' => String,
'iplist' => [{
'cost' => Integer,
@ -79,6 +80,7 @@ class Glesys
'memorysize' => String,
'cpucores' => String,
'transfer' => String,
'bandwidth' => String,
'description' => String
}
}

Просмотреть файл

@ -5,11 +5,11 @@ Shindo.tests('Fog::Compute[:glesys] | server requests', ['glesys']) do
@create = ":hostname => #@hostname, :rootpassword => 'pw#{Time.now.to_i}', "+
":datacenter => 'Falkenberg', :platform => 'Xen', :templatename => 'Debian-6 x64', "+
":disksize => '10', :memorysize => '512', :cpucores => '1', :transfer => '500'"
":disksize => '10', :memorysize => '512', :cpucores => '1', :transfer => '500', :bandwidth => '10'"
@create_vz = ":hostname => #@hostname, :rootpassword => 'pw#{Time.now.to_i}', "+
":datacenter => 'Stockholm', :platform => 'OpenVZ', :templatename => 'Debian 6.0 64-bit', "+
":disksize => '10', :memorysize => '256', :cpucores => '2', :transfer => '500'"
":disksize => '10', :memorysize => '256', :cpucores => '2', :transfer => '500', :bandwidth => '10'"
tests('success') do
@ -29,7 +29,8 @@ Shindo.tests('Fog::Compute[:glesys] | server requests', ['glesys']) do
:disksize => "10",
:memorysize => "512",
:cpucores => "1",
:transfer => "500"
:transfer => "500",
:bandwidth => "10"
)
@serverid = vm.body['response']['server']['serverid']
@ -89,7 +90,8 @@ Shindo.tests('Fog::Compute[:glesys] | server requests', ['glesys']) do
:disksize => "10",
:memorysize => "256",
:cpucores => "2",
:transfer => "500"
:transfer => "500",
:bandwidth => "10"
)
@serverid = vm.body['response']['server']['serverid']