Unverified Commit bfac72ac authored by Joseph Kregloh's avatar Joseph Kregloh
Browse files

Added cutoffTimestamp and cutoffRelativeTime as optional properties.

parent 6d491036
......@@ -87,6 +87,7 @@ suites:
- recipe[source-resource::script_create]
- recipe[source-resource::syslog_create]
- recipe[source-resource::graphite_create]
- recipe[source-resource::local_file_cutoff]
attributes:
SUMO_ACCESS_ID: <%= ENV['SUMO_ACCESS_ID'] %>
SUMO_ACCESS_KEY: <%= ENV['SUMO_ACCESS_KEY'] %>
......
......@@ -5,6 +5,10 @@ This CHANGELOG (now) follows the format listed at [Keep A Changelog](http://keep
## [Unreleased]
## [1.3.1] - 2018-06-22
### Added
- Added `cutoffTimestamp` and `cutoffRelativeTime` properties.
## [1.3.0] - 2018-04-19
### Added
- using node run state added as a viable option to supply credentials
......
......@@ -57,6 +57,8 @@ class Chef
hash['source']['defaultDateFormat'] = new_resource.default_date_format unless new_resource.default_date_format.nil?
hash['source']['filters'] = new_resource.filters unless new_resource.filters.nil?
hash['source']['alive'] = new_resource.alive unless new_resource.alive.nil?
hash['source']['cutoffTimestamp'] = new_resource.cuttoff_timestamp unless new_resource.cuttoff_timestamp.nil?
hash['source']['cutoffRelativeTime'] = new_resource.cuttoff_relative_time unless new_resource.cuttoff_relative_time.nil?
hash
end
......
......@@ -42,6 +42,8 @@ class Chef
attribute :default_date_format, kind_of: String
attribute :filters, kind_of: Array
attribute :alive, kind_of: [TrueClass, FalseClass]
attribute :cuttoff_timestamp, kind_of: String
attribute :cuttoff_relative_time, kind_of: String
end
end
end
# frozen_string_literal: true
sumo_source_local_file 'local_file_cuttoff_timestamp' do
source_json_directory node['sumologic']['sumo_json_path']
path_expression '/tmp/example'
cuttoff_timestamp "1529339004"
end
sumo_source_local_file 'local_file_cuttoff_relative_time' do
source_json_directory node['sumologic']['sumo_json_path']
path_expression '/tmp/example'
cuttoff_relative_time '-1d'
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment