-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: enhance rulebook validation during project import (#702)
- Loading branch information
Showing
16 changed files
with
245 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[ | ||
{ | ||
"name": "good.yml", | ||
"rulesets": [ | ||
{ | ||
"name": "Hello Events", | ||
"rules": [ | ||
{ | ||
"name": "Say Hello", | ||
"action": { | ||
"run_playbook": { | ||
"name": "ansible.eda.hello" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |
13 changes: 13 additions & 0 deletions
13
tests/integration/services/data/project-05/extensions/eda/rulebooks/bad1.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
name: Hello Events | ||
hosts: all | ||
sources: | ||
- ansible.eda.range: | ||
limit: 5 | ||
rules: | ||
- name: Say Hello | ||
condition: event.i == 1 | ||
action: | ||
run_playbook: | ||
name: ansible.eda.hello | ||
... |
11 changes: 11 additions & 0 deletions
11
tests/integration/services/data/project-05/extensions/eda/rulebooks/bad10.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- name: Hello Events | ||
hosts: all | ||
sources: | ||
- ansible.eda.range: | ||
limit: 5 | ||
rules: | ||
- name: Say Hello | ||
condition: event.i == 1 | ||
action: | ||
... |
8 changes: 8 additions & 0 deletions
8
tests/integration/services/data/project-05/extensions/eda/rulebooks/bad2.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
- name: Hello Events | ||
hosts: all | ||
sources: | ||
- ansible.eda.range: | ||
limit: 5 | ||
rules: bad | ||
... |
8 changes: 8 additions & 0 deletions
8
tests/integration/services/data/project-05/extensions/eda/rulebooks/bad3.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
- name: Hello Events | ||
hosts: all | ||
sources: | ||
- ansible.eda.range: | ||
limit: 5 | ||
rules: | ||
... |
13 changes: 13 additions & 0 deletions
13
tests/integration/services/data/project-05/extensions/eda/rulebooks/bad4.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- name: Hello Events | ||
hosts: all | ||
sources: | ||
- ansible.eda.range: | ||
limit: 5 | ||
rules: | ||
name: Say Hello | ||
condition: event.i == 1 | ||
action: | ||
run_playbook: | ||
name: ansible.eda.hello | ||
... |
12 changes: 12 additions & 0 deletions
12
tests/integration/services/data/project-05/extensions/eda/rulebooks/bad5.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
- name: Hello Events | ||
hosts: all | ||
sources: | ||
- ansible.eda.range: | ||
limit: 5 | ||
rules: | ||
- condition: event.i == 1 | ||
action: | ||
run_playbook: | ||
name: ansible.eda.hello | ||
... |
13 changes: 13 additions & 0 deletions
13
tests/integration/services/data/project-05/extensions/eda/rulebooks/bad6.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- name: Hello Events | ||
hosts: all | ||
sources: | ||
- ansible.eda.range: | ||
limit: 5 | ||
rules: | ||
- name: | ||
condition: event.i == 1 | ||
action: | ||
run_playbook: | ||
name: ansible.eda.hello | ||
... |
12 changes: 12 additions & 0 deletions
12
tests/integration/services/data/project-05/extensions/eda/rulebooks/bad7.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
- name: Hello Events | ||
hosts: all | ||
sources: | ||
- ansible.eda.range: | ||
limit: 5 | ||
rules: | ||
- name: Say Hello | ||
action: | ||
run_playbook: | ||
name: ansible.eda.hello | ||
... |
13 changes: 13 additions & 0 deletions
13
tests/integration/services/data/project-05/extensions/eda/rulebooks/bad8.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- name: Hello Events | ||
hosts: all | ||
sources: | ||
- ansible.eda.range: | ||
limit: 5 | ||
rules: | ||
- name: Say Hello | ||
condition: | ||
action: | ||
run_playbook: | ||
name: ansible.eda.hello | ||
... |
10 changes: 10 additions & 0 deletions
10
tests/integration/services/data/project-05/extensions/eda/rulebooks/bad9.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- name: Hello Events | ||
hosts: all | ||
sources: | ||
- ansible.eda.range: | ||
limit: 5 | ||
rules: | ||
- name: Say Hello | ||
condition: event.i == 1 | ||
... |
13 changes: 13 additions & 0 deletions
13
tests/integration/services/data/project-05/extensions/eda/rulebooks/good.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- name: Hello Events | ||
hosts: all | ||
sources: | ||
- ansible.eda.range: | ||
limit: 5 | ||
rules: | ||
- name: Say Hello | ||
condition: event.i == 1 | ||
action: | ||
run_playbook: | ||
name: ansible.eda.hello | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters