Skip to content

Commit 09f4d27

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 7c9f7fe commit 09f4d27

File tree

8 files changed

+2
-26
lines changed

8 files changed

+2
-26
lines changed

GDPR.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ So, briefing:
2828
- For LIVE executions
2929
- No data is stored
3030
- For non-LIVE executions
31-
3231
- `risu.json` in sosreport folder or the path you've defined with -o
3332
- `magui*.json` in the folder where you executed `magui`
3433

doc/changelog.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ Several changes introduced recently:
7878
### 2018-01-24
7979

8080
- Faraday extension
81-
8281
- Some files must be equal or different across sosreports, actually we do have `release` and `ceilometer-yaml` one that rely on this, but this is hard to mantain as each new file will require a new plugin for Risu plus a new plugin for Magui.
8382

8483
- In order to simplify this a new extension has been created so adding a new file to monitor no longer requires new plugins for `risu` or `magui` but just creating a text file with some data within as documented on `risuclient/plugins/faraday/README.md`

doc/development/REVIEWER.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Below are some examples of things we do usually review:
2626
- Not mangle `RISU\_` variables (usually leftovers when testing without using the provided `env-for-debug.sh` variable)
2727
- Trailing spaces on lines or empty lines
2828
- Reuse as maximum code between Live and snapshot mode
29-
3029
- Use TRAP to generate files we might see in Live and use vars for it, for example:
3130

3231
```sh

doc/development/magui-plugin-development.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Magui plugins should conform to the following standards:
1212

1313
- Written in python and stored in the `maguiclient/plugins` folder following whatever desired hierarchy (for example, try to match Risu plugins structure for simplicity in filtering)
1414
- Implement some base functions keeping arguments and data returned as in others:
15-
1615
- `init()`
1716
- Returns list of triggers (array with strings) (contains Risu plugin ID data to act on)
1817
- `run(data)`
@@ -21,7 +20,6 @@ Magui plugins should conform to the following standards:
2120
- Returns string with description of plugin
2221

2322
- Plugins for Magui should refer to processing of Risu data for doing it's work
24-
2523
- In order to do so, each Risu plugins has a unique UID calculated via md5sum via relative path and plugin name.
2624
- Results are then filtered to get the data for that plugin ID, for example:
2725

doc/magui.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Check latest changes on [changelog](changelog.md)
5858
Linked script /home/iranzo/.local/bin/magui.py
5959
Done.
6060
```
61+
6162
- Pipsi will take care of installing a virtual environment and link to binary folder so you can call risu.py or magui.py directly
6263
- Remember that pypi package might not contain all the latests plugins features as the github repo one.
6364
- Container:

doc/plugins/core.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Risu tests should conform to the following standards:
2626

2727
- The test should return one of the following error codes to indicate
2828
the test result:
29-
3029
- \$RC_OKAY -- success
3130
- \$RC_FAILED -- failure
3231
- \$RC_SKIPPED -- skipped
@@ -90,7 +89,6 @@ location of various files. To use this script you can source it at the top:
9089
systemctl list units file.
9190

9291
- `iniparser` -- parses ini file and returns value in lowercase
93-
9492
- Example:
9593
```sh
9694
if [[ "$(iniparser $config_file DEFAULT debug)" == "true" ]]; then
@@ -99,21 +97,18 @@ location of various files. To use this script you can source it at the top:
9997
```
10098

10199
- `is_active $service` -- reports if service is active either based on live or snapshoot
102-
103100
- Example:
104101
```sh
105102
if is_active ntpd; then echo "NTP Running";fi
106103
```
107104

108105
- `is_required_file $file` -- continues if file exists or exits `$RC_SKIPPED` if doesn't
109-
110106
- Example:
111107
```sh
112108
is_required_file "${RISU_ROOT}/var/log/messages"
113109
```
114110
115111
- `discover_osp_version $openstack-nova-common-version_package` -- echos osp version based on `openstack-nova-common version`
116-
117112
- Example:
118113
```sh
119114
if [[ "$(discover_osp_version)" -eq "10" ]]; then echo "We're Newton";fi
@@ -126,21 +121,18 @@ location of various files. To use this script you can source it at the top:
126121
```
127122
128123
* `is_process $process` -- returns if process exists on the system
129-
130124
- Example:
131125
```sh
132126
if is_process ntpd; then echo "NTP Running!";fi
133127
```
134128
135129
* `is_lineinfile $pattern $files` -- returns if pattern match is found in file
136-
137130
- Example:
138131
```sh
139132
if is_lineinfile "^debug[ \t]*=[ \t]*true" "$config_file"; then echo "Debug enabled."; fi
140133
```
141134
142135
* `is_required_containerized` -- continues if environment is containerized works only against OSP12 and later
143-
144136
- Example:
145137
```sh
146138
if is_required_containerized; then
@@ -149,7 +141,6 @@ location of various files. To use this script you can source it at the top:
149141
```
150142
151143
* `is_containerized` -- returns true or false if environment is containerized works only against OSP12 and later
152-
153144
- Example:
154145
```sh
155146
if is_containerized; then
@@ -160,15 +151,13 @@ location of various files. To use this script you can source it at the top:
160151
```
161152
162153
* `docker_runit` -- execute the command inside docker works only with docker
163-
164154
- Example:
165155
```sh
166156
# docker exec -i $(docker ps | grep rabbitmq-bundle | cut -d" " -f1) sh -c "rabbitmqctl report"
167157
docker_runit "rabbitmq-bundle" "rabbitmqctl report" | grep partitions
168158
```
169159
170160
* `discover_rhrelease` -- find RH Release number based on /etc/redhat-release code name
171-
172161
- Example:
173162
```sh
174163
if [[ $(discover_rhrelease) -eq "7" ]] ; then
@@ -184,22 +173,19 @@ location of various files. To use this script you can source it at the top:
184173
To early leave the script
185174

186175
* `is_pkg $pkg` -- returns package version if installed on system (RHEL/Centos/Fedora | Debian)
187-
188176
- Example:
189177
```sh
190178
# is_pkg systat
191179
sos-3.2-15.el7.noarch
192180
```
193181

194182
* `is_required_pkg $pkg` -- continues if package is installed or exits with `$RC_SKIPPED` if required package is missing
195-
196183
- Example:
197184
```sh
198185
is_required_pkg sysstat
199186
```
200187

201188
* `is_pkg_over $pkg` -- Checks if provided package is over specific release
202-
203189
- Example:
204190
```sh
205191
if is_pkg_over dracut dracut-033-502; then ## Note, version string is DISTRO dependent
@@ -216,15 +202,13 @@ location of various files. To use this script you can source it at the top:
216202
```
217203

218204
- `is_rpm $rpm` -- returns rpm name as installed on the system
219-
220205
- Example:
221206
```sh
222207
# is_rpm sos
223208
sos-3.2-15.el7.noarch
224209
```
225210

226211
- `is_dpkg $dpkg` -- returns dpkg version as installed on the system
227-
228212
- Example:
229213
```sh
230214
# is_dpkg libc6
@@ -240,7 +224,6 @@ location of various files. To use this script you can source it at the top:
240224
- `is_required_dpkg_over` -- Fallsback to `is_required_pkg_over $package` after forcing `dpkg` distro check.
241225

242226
- `are_dates_diff_over` -- Checks if two dates are over X days in diff
243-
244227
- Example:
245228
```sh
246229
are_dates_diff_over 5 "2017-12-01 14:40" "2017-12-31 14:45"

doc/presentations/presentation-revealmd.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,6 @@ For additional questions, come to #risu on [Libera](https://libera.chat/) or ema
415415
<small>
416416

417417
1. What sort of logic are scripts using to determine if the check is failed/ok or should be skipped
418-
419418
- Exit status for commands like `grep`, etc
420419
- Check requirements to run, target environment and matching details
421420
- bash conditionals
@@ -438,7 +437,6 @@ Note:
438437
<small>
439438

440439
1. What do I need to do if I want to add my scripts
441-
442440
- Modify risu.py to define new path
443441
- Use include filter to add it
444442
- chmod +x the script in the plugins folder
@@ -461,7 +459,6 @@ Note:
461459
<small>
462460

463461
1. What languages are supported for scripts?
464-
465462
- bash, python, ruby
466463
- python, bash, c++
467464
- golang, perl
@@ -480,7 +477,6 @@ Note:
480477
<small>
481478

482479
1. What are the valid return status for scripts?
483-
484480
- RC_WARNING
485481
- RC_OKAY
486482
- RC_SKIPPED

doc/risu.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Check for plugins listing on [risuclient/plugins/](risuclient/plugins/)
3737
Linked script /home/iranzo/.local/bin/magui.py
3838
Done.
3939
```
40+
4041
- Pipsi will take care of installing a virtual environment and link to binary folder so you can call risu.py or magui.py directly
4142
- Remember that pypi package might not contain all the latests plugins features as the github repo one.
4243
- Container:

0 commit comments

Comments
 (0)