github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/internal/fs/ddl/cache/agent/scout.ddl (about) 1 -- Copyright (c) 2024, R.I. Pienaar and the Choria Project contributors 2 -- 3 -- SPDX-License-Identifier: Apache-2.0 4 5 metadata :name => "scout", 6 :description => "Choria Scout Agent Management API", 7 :author => "R.I.Pienaar <rip@devco.net>", 8 :license => "Apache-2.0", 9 :version => "0.28.0", 10 :url => "https://choria.io", 11 :provider => "golang", 12 :timeout => 5 13 14 15 action "checks", :description => "Obtain a list of checks and their current status" do 16 display :ok 17 18 19 20 output :checks, 21 :description => "Details about each check", 22 :type => "array", 23 :display_as => "Checks" 24 25 end 26 27 action "resume", :description => "Resume active checking of one or more checks" do 28 display :failed 29 30 input :checks, 31 :prompt => "Checks", 32 :description => "Check to resume, empty means all", 33 :type => :array, 34 :optional => true 35 36 37 38 39 output :failed, 40 :description => "List of checks that could not be resumed", 41 :type => "array", 42 :display_as => "Failed" 43 44 output :skipped, 45 :description => "List of checks that was skipped", 46 :type => "array", 47 :display_as => "Skipped" 48 49 output :transitioned, 50 :description => "List of checks that were resumed", 51 :type => "array", 52 :display_as => "Triggered" 53 54 end 55 56 action "maintenance", :description => "Pause checking of one or more checks" do 57 display :failed 58 59 input :checks, 60 :prompt => "Checks", 61 :description => "Check to pause, empty means all", 62 :type => :array, 63 :optional => true 64 65 66 67 68 output :failed, 69 :description => "List of checks that could not be paused", 70 :type => "array", 71 :display_as => "Failed" 72 73 output :skipped, 74 :description => "List of checks that was skipped", 75 :type => "array", 76 :display_as => "Skipped" 77 78 output :transitioned, 79 :description => "List of checks that were paused", 80 :type => "array", 81 :display_as => "Triggered" 82 83 end 84 85 action "goss_validate", :description => "Performs a Goss validation using a specific file" do 86 display :failed 87 88 input :file, 89 :prompt => "Goss File", 90 :description => "Path to the Goss validation specification", 91 :type => :string, 92 :validation => '.+', 93 :maxlength => 256, 94 :optional => true 95 96 97 input :vars, 98 :prompt => "Vars File", 99 :description => "Path to a file to use as template variables", 100 :type => :string, 101 :validation => '.+', 102 :maxlength => 256, 103 :optional => true 104 105 106 input :yaml_rules, 107 :prompt => "Gossfile contents", 108 :description => "Contents of the Gossfile to validate", 109 :type => :string, 110 :validation => '.', 111 :maxlength => 5120, 112 :optional => true 113 114 115 input :yaml_vars, 116 :prompt => "Variables YAML", 117 :description => "YAML data to use as variables", 118 :type => :string, 119 :validation => '.+', 120 :maxlength => 5120, 121 :optional => true 122 123 124 125 126 output :failures, 127 :description => "The number of tests that failed", 128 :type => "integer", 129 :display_as => "Failed Tests" 130 131 output :results, 132 :description => "The full test results", 133 :type => "array", 134 :display_as => "Results" 135 136 output :runtime, 137 :description => "The time it took to run the tests, in seconds", 138 :type => "integer", 139 :display_as => "Runtime" 140 141 output :skipped, 142 :description => "Indicates how many tests were skipped", 143 :type => "integer", 144 :display_as => "Skipped" 145 146 output :success, 147 :description => "Indicates how many tests passed", 148 :type => "integer", 149 :display_as => "Success" 150 151 output :summary, 152 :description => "A human friendly test result", 153 :type => "string", 154 :display_as => "Summary" 155 156 output :tests, 157 :description => "The number of tests that were run", 158 :type => "integer", 159 :display_as => "Tests" 160 161 summarize do 162 aggregate summary(:tests, :format => "%s Tests on %d node(s)") 163 aggregate summary(:failures, :format => "%s Failed test on %d node(s)") 164 aggregate summary(:success, :format => "%s Passed tests on %d node(s)") 165 end 166 end 167 168 action "trigger", :description => "Force an immediate check of one or more checks" do 169 display :failed 170 171 input :checks, 172 :prompt => "Checks", 173 :description => "Check to trigger, empty means all", 174 :type => :array, 175 :optional => true 176 177 178 179 180 output :failed, 181 :description => "List of checks that could not be triggered", 182 :type => "array", 183 :display_as => "Failed" 184 185 output :skipped, 186 :description => "List of checks that was skipped", 187 :type => "array", 188 :display_as => "Skipped" 189 190 output :transitioned, 191 :description => "List of checks that were triggered", 192 :type => "array", 193 :display_as => "Triggered" 194 195 end 196