Skip to content

Commit

Permalink
add a default flavor for rackspace server
Browse files Browse the repository at this point in the history
  • Loading branch information
geemus committed Jun 20, 2010
1 parent a662e86 commit 7f91db2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fog/aws/models/ec2/server.rb
Expand Up @@ -31,7 +31,7 @@ class Server < Fog::Model
attribute :state, 'instanceState'
attribute :user_data

def initialize(attributes)
def initialize(attributes={})
@groups ||= ["default"]
@flavor_id ||= 'm1.small'
super
Expand Down
5 changes: 5 additions & 0 deletions lib/fog/rackspace/models/servers/server.rb
Expand Up @@ -20,6 +20,11 @@ class Server < Fog::Model

attr_accessor :password, :private_key_path, :public_key_path

def initialize(attributes={})
@flavor_id ||= 1
super
end

def destroy
requires :id
connection.delete_server(@id)
Expand Down

0 comments on commit 7f91db2

Please sign in to comment.