From 3466343395e5c871eb1c959d96fbeadbe5f1f8be Mon Sep 17 00:00:00 2001 From: Nicolas Ruflin Date: Mon, 29 Jun 2020 09:47:46 +0200 Subject: [PATCH] Remove os specific config examples and code (#549) As discussed in https://github.com/elastic/package-registry/issues/533 the os specific configs should be removed from now. --- .../package/datasources/1.0.0/index.json | 56 ++----------------- .../1.0.0/dataset/examplelog1/manifest.yml | 8 --- .../1.0.0/dataset/examplelog2/manifest.yml | 8 --- util/dataset.go | 6 -- 4 files changed, 4 insertions(+), 74 deletions(-) diff --git a/testdata/generated/package/datasources/1.0.0/index.json b/testdata/generated/package/datasources/1.0.0/index.json index 3f27a3500..52e5b437b 100644 --- a/testdata/generated/package/datasources/1.0.0/index.json +++ b/testdata/generated/package/datasources/1.0.0/index.json @@ -55,19 +55,7 @@ "show_user": false, "default": [ "/var/log/nginx/error.log*" - ], - "os": { - "darwin": { - "default": [ - "/usr/local/var/log/nginx/error.log*" - ] - }, - "windows": { - "default": [ - "c:/programdata/nginx/logs/*error.log*" - ] - } - } + ] } ], "template_path": "logs.yml", @@ -104,19 +92,7 @@ "show_user": false, "default": [ "/var/log/nginx/access.log*" - ], - "os": { - "darwin": { - "default": [ - "/usr/local/var/log/nginx/access.log*" - ] - }, - "windows": { - "default": [ - "c:/programdata/nginx/logs/*access.log*" - ] - } - } + ] } ], "title": "Title of the stream", @@ -239,19 +215,7 @@ "show_user": false, "default": [ "/var/log/nginx/error.log*" - ], - "os": { - "darwin": { - "default": [ - "/usr/local/var/log/nginx/error.log*" - ] - }, - "windows": { - "default": [ - "c:/programdata/nginx/logs/*error.log*" - ] - } - } + ] } ], "dataset": "datasources.examplelog1", @@ -273,19 +237,7 @@ "show_user": false, "default": [ "/var/log/nginx/access.log*" - ], - "os": { - "darwin": { - "default": [ - "/usr/local/var/log/nginx/access.log*" - ] - }, - "windows": { - "default": [ - "c:/programdata/nginx/logs/*access.log*" - ] - } - } + ] } ], "dataset": "datasources.examplelog2", diff --git a/testdata/package/datasources/1.0.0/dataset/examplelog1/manifest.yml b/testdata/package/datasources/1.0.0/dataset/examplelog1/manifest.yml index ce6a8b66f..ea024ba87 100644 --- a/testdata/package/datasources/1.0.0/dataset/examplelog1/manifest.yml +++ b/testdata/package/datasources/1.0.0/dataset/examplelog1/manifest.yml @@ -14,14 +14,6 @@ streams: multi: true default: - /var/log/nginx/error.log* - # I suggest to use ECS fields for this config options here: https://github.com/elastic/ecs/blob/master/schemas/os.yml - # This would need to be based on a predefined definition on what can be filtered on - os.darwin: - default: - - /usr/local/var/log/nginx/error.log* - os.windows: - default: - - c:/programdata/nginx/logs/*error.log* - input: syslog title: Title of the stream diff --git a/testdata/package/datasources/1.0.0/dataset/examplelog2/manifest.yml b/testdata/package/datasources/1.0.0/dataset/examplelog2/manifest.yml index efe178001..72c4c936e 100644 --- a/testdata/package/datasources/1.0.0/dataset/examplelog2/manifest.yml +++ b/testdata/package/datasources/1.0.0/dataset/examplelog2/manifest.yml @@ -14,11 +14,3 @@ streams: multi: true default: - /var/log/nginx/access.log* - # I suggest to use ECS fields for this config options here: https://github.com/elastic/ecs/blob/master/schemas/os.yml - # This would need to be based on a predefined definition on what can be filtered on - os.darwin: - default: - - /usr/local/var/log/nginx/access.log* - os.windows: - default: - - c:/programdata/nginx/logs/*access.log* diff --git a/util/dataset.go b/util/dataset.go index 0e8200cd0..44fe749fd 100644 --- a/util/dataset.go +++ b/util/dataset.go @@ -76,12 +76,6 @@ type Variable struct { Required bool `config:"required" json:"required" yaml:"required"` ShowUser bool `config:"show_user" json:"show_user" yaml:"show_user"` Default interface{} `config:"default" json:"default,omitempty" yaml:"default,omitempty"` - Os *Os `config:"os" json:"os,omitempty" yaml:"os,omitempty"` -} - -type Os struct { - Darwin interface{} `config:"darwin" json:"darwin,omitempty" yaml:"darwin,omitempty"` - Windows interface{} `config:"windows" json:"windows,omitempty" yaml:"windows,omitempty"` } type fieldEntry struct {