Skip to content

Commit

Permalink
refactor: format toml files to use table layout
Browse files Browse the repository at this point in the history
Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
  • Loading branch information
reubenmiller committed Oct 4, 2024
1 parent 30acbd3 commit c2c3f79
Show file tree
Hide file tree
Showing 9 changed files with 149 additions and 40 deletions.
17 changes: 13 additions & 4 deletions images/alpine-s6/tedge-configuration-plugin.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
files = [
{ path = '/etc/tedge/tedge.toml', type = 'tedge.toml', user = 'tedge', group = 'tedge', mode = 0o444 },
{ path = '/etc/tedge/system.toml', type = 'system.toml', user = 'tedge', group = 'tedge', mode = 0o444 },
]
[[files]]
path = '/etc/tedge/tedge.toml'
type = 'tedge.toml'
user = 'tedge'
group = 'tedge'
mode = 0o444

[[files]]
path = '/etc/tedge/system.toml'
type = 'system.toml'
user = 'tedge'
group = 'tedge'
mode = 0o444
11 changes: 7 additions & 4 deletions images/alpine-s6/tedge-log-plugin.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
files = [
{ type = "software-management", path = "/var/log/tedge/agent/workflow-software*" },
{ type = "shell", path = "/var/log/tedge/agent/c8y_Command-*" },
]
[[files]]
type = "software-management"
path = "/var/log/tedge/agent/workflow-software*"

[[files]]
type = "shell"
path = "/var/log/tedge/agent/c8y_Command-*"
49 changes: 41 additions & 8 deletions images/common/config/tedge-configuration-plugin.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,41 @@
files = [
{ path = '/etc/tedge/tedge.toml', type = 'tedge.toml', user = 'tedge', group = 'tedge', mode = 0o444 },
{ path = '/etc/tedge/plugins/tedge-log-plugin.toml', type = 'tedge-log-plugin', user = 'tedge', group = 'tedge', mode = 0o644 },
{ path = '/etc/tedge/system.toml', type = 'system.toml', user = 'tedge', group = 'tedge', mode = 0o444 },
{ path = '/etc/mosquitto/conf.d/mosquitto.conf', type = 'mosquitto.conf', user = 'root', group = 'root', mode = 0o644 },
{ path = '/etc/collectd/collectd.conf', type = 'collectd.conf', user = 'root', group = 'root', mode = 0o644 },
{ path = '/etc/c8y-command-plugin/env', type = 'shell', user = 'tedge', group = 'tedge', mode = 0o644 },
]
[[files]]
path = '/etc/tedge/tedge.toml'
type = 'tedge.toml'
user = 'tedge'
group = 'tedge'
mode = 0o444

[[files]]
path = '/etc/tedge/plugins/tedge-log-plugin.toml'
type = 'tedge-log-plugin'
user = 'tedge'
group = 'tedge'
mode = 0o644

[[files]]
path = '/etc/tedge/system.toml'
type = 'system.toml'
user = 'tedge'
group = 'tedge'
mode = 0o444

[[files]]
path = '/etc/mosquitto/conf.d/mosquitto.conf'
type = 'mosquitto.conf'
user = 'root'
group = 'root'
mode = 0o644

[[files]]
path = '/etc/collectd/collectd.conf'
type = 'collectd.conf'
user = 'root'
group = 'root'
mode = 0o644

[[files]]
path = '/etc/c8y-command-plugin/env'
type = 'shell'
user = 'tedge'
group = 'tedge'
mode = 0o644
21 changes: 15 additions & 6 deletions images/common/config/tedge-log-plugin.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
files = [
{ type = "software-management", path = "/var/log/tedge/agent/workflow-software*" },
{ type = "shell", path = "/var/log/tedge/agent/c8y_Command-*" },
{ type = "dpkg", path = "/var/log/dpkg.log" },
{ type = "apt-terminal-log", path = "/var/log/apt/term.log" },
]
[[files]]
type = "software-management"
path = "/var/log/tedge/agent/workflow-software*"

[[files]]
type = "shell"
path = "/var/log/tedge/agent/c8y_Command-*"

[[files]]
type = "dpkg"
path = "/var/log/dpkg.log"

[[files]]
type = "apt-terminal-log"
path = "/var/log/apt/term.log"
7 changes: 7 additions & 0 deletions images/tedge/tedge-configuration-plugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ type = "system.toml"
user = "tedge"
group = "tedge"
mode = 0o444

[[files]]
path = '/etc/tedge/plugins/tedge-log-plugin.toml'
type = 'tedge-log-plugin'
user = 'tedge'
group = 'tedge'
mode = 0o644
17 changes: 13 additions & 4 deletions tests/alpine-s6/children/tedge-configuration-plugin-1.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
files = [
{ path = '/etc/tedge/tedge.toml', type = 'tedge.toml', user = 'tedge', group = 'tedge', mode = 0o444 },
{ path = '/etc/tedge/system.toml', type = 'system.toml', user = 'tedge', group = 'tedge', mode = 0o444 },
]
[[files]]
path = '/etc/tedge/tedge.toml'
type = 'tedge.toml'
user = 'tedge'
group = 'tedge'
mode = 0o444

[[files]]
path = '/etc/tedge/system.toml'
type = 'system.toml'
user = 'tedge'
group = 'tedge'
mode = 0o444
25 changes: 20 additions & 5 deletions tests/alpine-s6/children/tedge-configuration-plugin-2.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
files = [
{ path = '/etc/tedge/tedge.toml', type = 'tedge.toml', user = 'tedge', group = 'tedge', mode = 0o444 },
{ path = '/etc/tedge/system.toml', type = 'system.toml', user = 'tedge', group = 'tedge', mode = 0o444 },
{ path = '/etc/tedge/plugins/tedge-log-plugin.toml', type = 'tedge-log-plugin.toml', user = 'tedge', group = 'tedge', mode = 0o644 },
]
[[files]]
path = '/etc/tedge/tedge.toml'
type = 'tedge.toml'
user = 'tedge'
group = 'tedge'
mode = 0o444

[[files]]
path = '/etc/tedge/system.toml'
type = 'system.toml'
user = 'tedge'
group = 'tedge'
mode = 0o444

[[files]]
path = '/etc/tedge/plugins/tedge-log-plugin.toml'
type = 'tedge-log-plugin.toml'
user = 'tedge'
group = 'tedge'
mode = 0o644
17 changes: 13 additions & 4 deletions tests/tedge/data/tedge-configuration-plugin-1.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
files = [
{ path = '/etc/tedge/tedge.toml', type = 'tedge.toml', user = 'tedge', group = 'tedge', mode = 0o444 },
{ path = '/etc/tedge/system.toml', type = 'system.toml', user = 'tedge', group = 'tedge', mode = 0o444 },
]
[[files]]
path = '/etc/tedge/tedge.toml'
type = 'tedge.toml'
user = 'tedge'
group = 'tedge'
mode = 0o444

[[files]]
path = '/etc/tedge/system.toml'
type = 'system.toml'
user = 'tedge'
group = 'tedge'
mode = 0o444
25 changes: 20 additions & 5 deletions tests/tedge/data/tedge-configuration-plugin-2.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
files = [
{ path = '/etc/tedge/tedge.toml', type = 'tedge.toml', user = 'tedge', group = 'tedge', mode = 0o444 },
{ path = '/etc/tedge/system.toml', type = 'system.toml', user = 'tedge', group = 'tedge', mode = 0o444 },
{ path = '/etc/tedge/plugins/tedge-log-plugin.toml', type = 'tedge-log-plugin.toml', user = 'tedge', group = 'tedge', mode = 0o644 },
]
[[files]]
path = '/etc/tedge/tedge.toml'
type = 'tedge.toml'
user = 'tedge'
group = 'tedge'
mode = 0o444

[[files]]
path = '/etc/tedge/system.toml'
type = 'system.toml'
user = 'tedge'
group = 'tedge'
mode = 0o444

[[files]]
path = '/etc/tedge/plugins/tedge-log-plugin.toml'
type = 'tedge-log-plugin.toml'
user = 'tedge'
group = 'tedge'
mode = 0o644

0 comments on commit c2c3f79

Please sign in to comment.