Class: Splunk::Pickaxe::FieldExtractions
- Inherits:
-
Objects
- Object
- Objects
- Splunk::Pickaxe::FieldExtractions
show all
- Defined in:
- lib/splunk/pickaxe/objects/field_extractions.rb
Instance Attribute Summary
Attributes inherited from Objects
#environment, #pickaxe_config, #service
Instance Method Summary
collapse
Methods inherited from Objects
#config, #create, #entity_file_extensions, #initialize, #name, #skip?, #splunk_config, #sync
Instance Method Details
#entity_dir ⇒ Object
14
15
16
|
# File 'lib/splunk/pickaxe/objects/field_extractions.rb', line 14
def entity_dir
DIR
end
|
#find(entity) ⇒ Object
18
19
20
21
22
23
24
25
|
# File 'lib/splunk/pickaxe/objects/field_extractions.rb', line 18
def find(entity)
find_entity = Hash.new(entity)
find_entity['name'] = "#{entity['config']['stanza']} : #{entity['config']['type']}-#{entity['name']}"
super(find_entity)
end
|
#needs_update?(splunk_entity, entity) ⇒ Boolean
32
33
34
35
|
# File 'lib/splunk/pickaxe/objects/field_extractions.rb', line 32
def needs_update?(splunk_entity, entity)
splunk_entity['value'] != splunk_config(entity)['value']
end
|
#splunk_resource ⇒ Object
10
11
12
|
# File 'lib/splunk/pickaxe/objects/field_extractions.rb', line 10
def splunk_resource
%w[data props extractions]
end
|
#update(splunk_entity, entity) ⇒ Object
27
28
29
30
|
# File 'lib/splunk/pickaxe/objects/field_extractions.rb', line 27
def update(splunk_entity, entity)
splunk_entity.update('value' => splunk_config(entity)['value'])
end
|