mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Get partial log content via method call; add to log_file model attributes
This commit is contained in:
parent
860628dc5f
commit
639daf9a5c
1 changed files with 11 additions and 1 deletions
|
@ -6,11 +6,21 @@ module Fog
|
|||
|
||||
class LogFile < Fog::Model
|
||||
|
||||
attribute :name, :aliases => %w(LogFileName)
|
||||
attribute :rds_id, :aliases => 'DBInstanceIdentifier'
|
||||
attribute :name, :aliases => 'LogFileName'
|
||||
attribute :size, :aliases => 'Size', :type => :integer
|
||||
attribute :last_written, :aliases => 'LastWritten', :type => :time
|
||||
attribute :content, :aliases => 'LogFileData'
|
||||
attribute :marker, :aliases => 'Marker'
|
||||
attribute :more_content_available, :aliases => 'AdditionalDataPending', :type => :boolean
|
||||
|
||||
def content_excerpt(marker=nil)
|
||||
result = service.download_db_logfile_portion(self.rds_id, self.name, {:marker => marker})
|
||||
merge_attributes(result.body['DownloadDBLogFilePortionResult'])
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue