Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document reuseable.order attribute #1207

Open
ebeahan opened this issue Dec 18, 2020 · 0 comments
Open

Document reuseable.order attribute #1207

ebeahan opened this issue Dec 18, 2020 · 0 comments
Assignees
Labels
ready Issues we'd like to address in the future.

Comments

@ebeahan
Copy link
Member

ebeahan commented Dec 18, 2020

Summary

The optional attribute reusable.order was introduced in #864 to ensure chained reuses happen in the right order. It may be a necessary setting when dealing with chained reuses.

This attribute should be added to the schemas/README.md doc.

Background

As of ECS 1.7.0, reusable.order is configured on the group fieldset to handle the group => user, user => many places chained reuse case.

Custom fields may also use reusable.order for custom chained reuse. Example:

./custom_schemas/host.yml:

---
- name: host
  title: Host
  type: group
  reusable:
    order: 3
    top_level: true
    expected:
    - acme

./custom_schemas/acme.yml:

---
- name: acme
  title: acme
  group: 2
  description: >
    acme
  type: group

  fields:

  - name: products
    level: custom
    type: keyword
    required: true
    description: >
      products

  - name: people
    level: custom
    type: keyword
    description: >
      people

Generator script command:

$ python scripts/generator.py --include _testing/discuss/schemas --out _testing/discuss/output

Without adding order: 3 in host.yml, the generator will default order to 2. Under the default, host won't have all the expected nestings before host is reused under acme.

Documenting this parameter will be useful for users dealing with this particular scenario.

@ebeahan ebeahan self-assigned this Dec 18, 2020
@ebeahan ebeahan added the ready Issues we'd like to address in the future. label Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Issues we'd like to address in the future.
Projects
None yet
Development

No branches or pull requests

1 participant