1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Update allowed attributes and defaults.

This commit is contained in:
Sean Handley 2012-07-16 20:22:30 +02:00
parent 70efaa16db
commit 9feb2638fb
2 changed files with 10 additions and 2 deletions

View file

@ -47,12 +47,19 @@ module Fog
end
def allowed_attributes
allowed = [:name, :cpu, :mem, :persistent, :vnc_password]
allowed = [
:name, :cpu, :mem, :persistent,
:vnc_password, :vnc,
:ide_0_0, :ide_0_1, :ide_1_0, :ide_1_1,
:boot, :nic_0_model, :nic_0_dhcp
]
attributes.select {|k,v| allowed.include? k}
end
def self.defaults
{ 'nic:0:model' => 'e1000', 'nic:0:dhcp' => 'auto' }
# TODO: Document default settings.
# Note that VNC password standards are strict (need explaining)
{ 'nic:0:model' => 'e1000', 'nic:0:dhcp' => 'auto', 'vnc' => 'auto', 'vnc:password' => 'QXBwKEKQ' }
end
end
end

View file

@ -9,6 +9,7 @@ Shindo.tests('Fog::Compute[:serverlove] | server requests', ['serverlove']) do
'cpu' => Integer,
'mem' => Integer,
'persistent' => Fog::Nullable::String,
'vnc' => Fog::Nullable::String,
'vnc:password' => Fog::Nullable::String,
'nic:0:dhcp' => String,
'nic:0:model' => String