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

cleaned up code to use att_XX methods

This commit is contained in:
Nicholas Ricketts 2011-10-05 17:59:32 -04:00
parent 9f3820da7e
commit fae5d3357a

View file

@ -5,10 +5,16 @@ module Fog
class Linode
class Server < Fog::Compute::Server
attr_reader :stack_script
attr_accessor :private_key, :username
identity :id
attribute :name
attribute :status
def initialize(attributes={})
super
self.username = 'root'
end
def ips
Fog::Compute::Linode::Ips.new :server => self, :connection => connection
end
@ -17,13 +23,6 @@ module Fog
ips.select{|ip| ip.ip !~ /^192/}.first.ip
end
def username
'root'
end
def private_key
end
def disks
Fog::Compute::Linode::Disks.new :server => self, :connection => connection
end