Skip to content

Commit

Permalink
Use fields.common.yml for libbeat (#2985)
Browse files Browse the repository at this point in the history
* Rename fields.yml to fields.common.yml
* Add generated file also for libbeat
  • Loading branch information
ruflin authored and tsg committed Nov 15, 2016
1 parent 281e1ee commit 9d0bbc1
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 86 deletions.
4 changes: 2 additions & 2 deletions libbeat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include scripts/Makefile
# Collects all fields from processors
.PHONY: fields
fields:
cat _meta/fields_base.yml > _meta/fields.yml
cat processors/*/_meta/fields.yml >> _meta/fields.yml
cat _meta/fields.common.yml > _meta/fields.generated.yml
cat processors/*/_meta/fields.yml >> _meta/fields.generated.yml

# Collects all dependencies and then calls update
.PHONY: collect
Expand Down
File renamed without changes.
80 changes: 0 additions & 80 deletions libbeat/_meta/fields.yml

This file was deleted.

2 changes: 1 addition & 1 deletion libbeat/scripts/generate_fields_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def fields_to_asciidoc(input, output, beat):
fields = f.read()

# Prepends beat fields from libbeat
with open(es_beats + "/libbeat/_meta/fields.yml") as f:
with open(es_beats + "/libbeat/_meta/fields.generated.yml") as f:
fields = f.read() + fields

output = open(beat_path + "/docs/fields.asciidoc", 'w')
Expand Down
2 changes: 1 addition & 1 deletion libbeat/scripts/generate_index_pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def get_index_pattern_name(index):
fields = f.read()

# Prepend beat fields from libbeat
with open(args.libbeat + "/_meta/fields.yml") as f:
with open(args.libbeat + "/_meta/fields.generated.yml") as f:
fields = f.read() + fields

# with open(target, 'w') as output:
Expand Down
2 changes: 1 addition & 1 deletion libbeat/scripts/generate_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def fill_field_properties(args, field, defaults, path):
fields = f.read()

# Prepend beat fields from libbeat
with open(args.es_beats + "/libbeat/_meta/fields.yml") as f:
with open(args.es_beats + "/libbeat/_meta/fields.generated.yml") as f:
fields = f.read() + fields

with open(args.es_beats + "/dev-tools/packer/version.yml") as file:
Expand Down
3 changes: 2 additions & 1 deletion libbeat/tests/system/beat/beat.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,10 @@ def extract_fields(doc_list, name):
# TODO: Make fields_doc path more generic to work with beat-generator
with open(fields_doc, "r") as f:
# TODO: Make this path more generic to work with beat-generator.
with open("../../../libbeat/_meta/fields.yml") as f2:
with open("../../../libbeat/_meta/fields.common.yml") as f2:
content = f2.read()

#content = "fields:\n"
content += f.read()
doc = yaml.load(content)

Expand Down

0 comments on commit 9d0bbc1

Please sign in to comment.