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 Linode
|
||||||
class Server < Fog::Compute::Server
|
class Server < Fog::Compute::Server
|
||||||
attr_reader :stack_script
|
attr_reader :stack_script
|
||||||
|
attr_accessor :private_key, :username
|
||||||
identity :id
|
identity :id
|
||||||
attribute :name
|
attribute :name
|
||||||
attribute :status
|
attribute :status
|
||||||
|
|
||||||
|
def initialize(attributes={})
|
||||||
|
super
|
||||||
|
self.username = 'root'
|
||||||
|
end
|
||||||
|
|
||||||
def ips
|
def ips
|
||||||
Fog::Compute::Linode::Ips.new :server => self, :connection => connection
|
Fog::Compute::Linode::Ips.new :server => self, :connection => connection
|
||||||
end
|
end
|
||||||
|
@ -17,13 +23,6 @@ module Fog
|
||||||
ips.select{|ip| ip.ip !~ /^192/}.first.ip
|
ips.select{|ip| ip.ip !~ /^192/}.first.ip
|
||||||
end
|
end
|
||||||
|
|
||||||
def username
|
|
||||||
'root'
|
|
||||||
end
|
|
||||||
|
|
||||||
def private_key
|
|
||||||
end
|
|
||||||
|
|
||||||
def disks
|
def disks
|
||||||
Fog::Compute::Linode::Disks.new :server => self, :connection => connection
|
Fog::Compute::Linode::Disks.new :server => self, :connection => connection
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue