This repository has been archived by the owner on Jan 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #629 from ripienaar/628
(#628) copy scout ddl files
- Loading branch information
Showing
3 changed files
with
364 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
metadata :name => "scout", | ||
:description => "Choria Scout Management API", | ||
:author => "R.I.Pienaar <[email protected]>", | ||
:license => "Apache-2.0", | ||
:version => "0.0.1", | ||
:url => "https://choria.io", | ||
:provider => "golang", | ||
:timeout => 5 | ||
|
||
|
||
action "checks", :description => "Obtain a list of checks and their current status" do | ||
display :ok | ||
|
||
|
||
|
||
output :checks, | ||
:description => "Details about each check", | ||
:type => "array", | ||
:display_as => "Checks" | ||
|
||
end | ||
|
||
action "resume", :description => "Resume active checking of one or more checks" do | ||
display :failed | ||
|
||
input :checks, | ||
:prompt => "Checks", | ||
:description => "Check to resume, empty means all", | ||
:type => :array, | ||
:optional => true | ||
|
||
|
||
|
||
|
||
output :failed, | ||
:description => "List of checks that could not be resumed", | ||
:type => "array", | ||
:display_as => "Failed" | ||
|
||
output :skipped, | ||
:description => "List of checks that was skipped", | ||
:type => "array", | ||
:display_as => "Skipped" | ||
|
||
output :transitioned, | ||
:description => "List of checks that were resumed", | ||
:type => "array", | ||
:display_as => "Triggered" | ||
|
||
end | ||
|
||
action "maintenance", :description => "Pause checking of one or more checks" do | ||
display :failed | ||
|
||
input :checks, | ||
:prompt => "Checks", | ||
:description => "Check to pause, empty means all", | ||
:type => :array, | ||
:optional => true | ||
|
||
|
||
|
||
|
||
output :failed, | ||
:description => "List of checks that could not be paused", | ||
:type => "array", | ||
:display_as => "Failed" | ||
|
||
output :skipped, | ||
:description => "List of checks that was skipped", | ||
:type => "array", | ||
:display_as => "Skipped" | ||
|
||
output :transitioned, | ||
:description => "List of checks that were paused", | ||
:type => "array", | ||
:display_as => "Triggered" | ||
|
||
end | ||
|
||
action "goss_validate", :description => "Performs a Goss validation using a specific file" do | ||
display :always | ||
|
||
input :file, | ||
:prompt => "Goss File", | ||
:description => "Path to the Goss validation specification", | ||
:type => :string, | ||
:validation => '.+', | ||
:maxlength => 256, | ||
:optional => false | ||
|
||
|
||
input :vars, | ||
:prompt => "Vars File", | ||
:description => "Path to a file to use as template variables", | ||
:type => :string, | ||
:validation => '.+', | ||
:maxlength => 256, | ||
:optional => true | ||
|
||
|
||
|
||
|
||
output :failures, | ||
:description => "The number of tests that failed", | ||
:type => "integer", | ||
:display_as => "Failed Tests" | ||
|
||
output :results, | ||
:description => "The full test results", | ||
:type => "array", | ||
:display_as => "Results" | ||
|
||
output :runtime, | ||
:description => "The time it took to run the tests, in seconds", | ||
:type => "integer", | ||
:display_as => "Runtime" | ||
|
||
output :success, | ||
:description => "Indicates if the test passed", | ||
:type => "string", | ||
:display_as => "Success" | ||
|
||
output :summary, | ||
:description => "A human friendly test result", | ||
:type => "string", | ||
:display_as => "Summary" | ||
|
||
output :tests, | ||
:description => "The number of tests that were run", | ||
:type => "integer", | ||
:display_as => "Tests" | ||
|
||
summarize do | ||
aggregate summary(:tests) | ||
aggregate summary(:failures) | ||
aggregate summary(:success) | ||
end | ||
end | ||
|
||
action "trigger", :description => "Force an immediate check of one or more checks" do | ||
display :failed | ||
|
||
input :checks, | ||
:prompt => "Checks", | ||
:description => "Check to trigger, empty means all", | ||
:type => :array, | ||
:optional => true | ||
|
||
|
||
|
||
|
||
output :failed, | ||
:description => "List of checks that could not be triggered", | ||
:type => "array", | ||
:display_as => "Failed" | ||
|
||
output :skipped, | ||
:description => "List of checks that was skipped", | ||
:type => "array", | ||
:display_as => "Skipped" | ||
|
||
output :transitioned, | ||
:description => "List of checks that were triggered", | ||
:type => "array", | ||
:display_as => "Triggered" | ||
|
||
end | ||
|
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,193 @@ | ||
{ | ||
"$schema": "https://choria.io/schemas/mcorpc/ddl/v1/agent.json", | ||
"metadata": { | ||
"license": "Apache-2.0", | ||
"author": "R.I.Pienaar <[email protected]>", | ||
"timeout": 5, | ||
"name": "scout", | ||
"version": "0.0.1", | ||
"url": "https://choria.io", | ||
"description": "Choria Scout Management API", | ||
"provider": "golang" | ||
}, | ||
"actions": [ | ||
{ | ||
"action": "checks", | ||
"display": "ok", | ||
"description": "Obtain a list of checks and their current status", | ||
"input": {}, | ||
"output": { | ||
"checks": { | ||
"description": "Details about each check", | ||
"type": "array", | ||
"display_as": "Checks" | ||
} | ||
} | ||
}, | ||
{ | ||
"action": "resume", | ||
"input": { | ||
"checks": { | ||
"prompt": "Checks", | ||
"description": "Check to resume, empty means all", | ||
"type": "array", | ||
"optional": true | ||
} | ||
}, | ||
"output": { | ||
"failed": { | ||
"description": "List of checks that could not be resumed", | ||
"display_as": "Failed", | ||
"type": "array" | ||
}, | ||
"transitioned": { | ||
"description": "List of checks that were resumed", | ||
"display_as": "Triggered", | ||
"type": "array" | ||
}, | ||
"skipped": { | ||
"description": "List of checks that was skipped", | ||
"display_as": "Skipped", | ||
"type": "array" | ||
} | ||
}, | ||
"display": "failed", | ||
"description": "Resume active checking of one or more checks" | ||
}, | ||
{ | ||
"action": "maintenance", | ||
"input": { | ||
"checks": { | ||
"prompt": "Checks", | ||
"description": "Check to pause, empty means all", | ||
"type": "array", | ||
"optional": true | ||
} | ||
}, | ||
"output": { | ||
"failed": { | ||
"description": "List of checks that could not be paused", | ||
"display_as": "Failed", | ||
"type": "array" | ||
}, | ||
"transitioned": { | ||
"description": "List of checks that were paused", | ||
"display_as": "Triggered", | ||
"type": "array" | ||
}, | ||
"skipped": { | ||
"description": "List of checks that was skipped", | ||
"display_as": "Skipped", | ||
"type": "array" | ||
} | ||
}, | ||
"display": "failed", | ||
"description": "Pause checking of one or more checks" | ||
}, | ||
{ | ||
"action": "goss_validate", | ||
"description": "Performs a Goss validation using a specific file", | ||
"display": "always", | ||
"aggregate": [ | ||
{ | ||
"function": "summary", | ||
"args": [ | ||
"tests" | ||
] | ||
}, | ||
{ | ||
"function": "summary", | ||
"args": [ | ||
"failures" | ||
] | ||
}, | ||
{ | ||
"function": "summary", | ||
"args": [ | ||
"success" | ||
] | ||
} | ||
], | ||
"input": { | ||
"file": { | ||
"prompt": "Goss File", | ||
"description": "Path to the Goss validation specification", | ||
"type": "string", | ||
"maxlength": 256, | ||
"validation": ".+", | ||
"optional": false | ||
}, | ||
"vars": { | ||
"prompt": "Vars File", | ||
"description": "Path to a file to use as template variables", | ||
"type": "string", | ||
"maxlength": 256, | ||
"validation": ".+", | ||
"optional": true | ||
} | ||
}, | ||
"output": { | ||
"tests": { | ||
"description": "The number of tests that were run", | ||
"display_as": "Tests", | ||
"type": "integer" | ||
}, | ||
"failures": { | ||
"description": "The number of tests that failed", | ||
"display_as": "Failed Tests", | ||
"type": "integer" | ||
}, | ||
"runtime": { | ||
"description": "The time it took to run the tests, in seconds", | ||
"display_as": "Runtime", | ||
"type": "integer" | ||
}, | ||
"success": { | ||
"description": "Indicates if the test passed", | ||
"display_as": "Success", | ||
"type": "string" | ||
}, | ||
"summary": { | ||
"description": "A human friendly test result", | ||
"display_as": "Summary", | ||
"type": "string" | ||
}, | ||
"results": { | ||
"description": "The full test results", | ||
"display_as": "Results", | ||
"type": "array" | ||
} | ||
} | ||
}, | ||
{ | ||
"action": "trigger", | ||
"input": { | ||
"checks": { | ||
"prompt": "Checks", | ||
"description": "Check to trigger, empty means all", | ||
"type": "array", | ||
"optional": true | ||
} | ||
}, | ||
"output": { | ||
"failed": { | ||
"description": "List of checks that could not be triggered", | ||
"display_as": "Failed", | ||
"type": "array" | ||
}, | ||
"transitioned": { | ||
"description": "List of checks that were triggered", | ||
"display_as": "Triggered", | ||
"type": "array" | ||
}, | ||
"skipped": { | ||
"description": "List of checks that was skipped", | ||
"display_as": "Skipped", | ||
"type": "array" | ||
} | ||
}, | ||
"display": "failed", | ||
"description": "Force an immediate check of one or more checks" | ||
} | ||
] | ||
} |
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