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:
parent
9f3820da7e
commit
fae5d3357a
1 changed files with 6 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue