Skip to content

Commit 51cf034

Browse files
committed
Implemented logger facility, code clean-up
Release 0.4.1 - removed camel-casing - cleaned-up code (see issue #7) - using logger facility (see issue #6) - removed -q / --quiet parameters by using logger facility
1 parent d68b47b commit 51cf034

File tree

2 files changed

+139
-156
lines changed

2 files changed

+139
-156
lines changed

README.md

+20-57
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
arsa
2-
====
3-
1+
# arsa
42
`arsa.py` is a script for archiving and removing old [Spacewalk](http://www.spacewalkproject.org/), [Red Hat Satellite](http://www.redhat.com/products/enterprise-linux/satellite/) or [SUSE Manager](http://www.suse.com/products/suse-manager/) actions.
53

64
The login credentials **are prompted** when running the script. If you need to automate this (*e.g. cronjobs*) you have two options:
75

8-
**1.Setting two shell variables:**
6+
## Setting two shell variables
7+
The following shell variables are used:
98
* **SATELLITE_LOGIN** - a username
109
* **SATELLITE_PASSWORD** - the appropriate password
1110

@@ -14,66 +13,30 @@ You might also want to set the HISTFILE variable (*depending on your shell*) to
1413
$ HISTFILE="" SATELLITE_LOGIN=mylogin SATELLITE_PASSWORD=mypass ./arsa.py -n
1514
```
1615

17-
**2.Using an authfile**
18-
16+
## Using an authfile
1917
A better possibility is to create a authfile with permisions **0600**. Just enter the username in the first line and the password in the second line and hand the path to the script:
2018
```
2119
$ ./arsa.py -n -a myauthfile
2220
```
2321

2422
By default the script archives completed actions but you can also remove archived actions.
2523

26-
Parameters
27-
==========
28-
29-
Show internal help:
30-
```
31-
$ ./arsa.py -h
32-
```
33-
34-
Archive completed actions and remove all archived actions afterwards:
35-
```
36-
$ ./arsa.py -r
37-
```
38-
39-
Only list which actions would be deleted (*dry-run*):
40-
```
41-
$ ./arsa.py -n
42-
```
43-
44-
Archive and remove all actions (*completed, already archived and also failed actions*):
45-
```
46-
$ ./arsa.py -rf
47-
```
48-
49-
Only archive and remove tasks executed automatically by Satellite (*such as updating package and hardware profiles*):
50-
```
51-
$ ./arsa.py -rft
52-
```
53-
54-
Specify a different Spacewalk/Red Hat Satellite/SUSE Manager server than **localhost**:
55-
```
56-
$ ./arsa.py -s 192.168.178.100
57-
```
58-
59-
Suppress status outputs:
60-
```
61-
$ ./arsa.py -q
62-
```
63-
64-
Enable debugging outputs for troubleshooting purposes:
65-
```
66-
$ ./arsa.py -d
67-
```
68-
69-
The parameters can also be combined - e.g. doing a dry-run of removing all completed and archived actions:
70-
```
71-
$ ./arsa.py -rl
72-
```
73-
74-
Examples
75-
========
76-
24+
# Parameters
25+
The following parameters can be specified:
26+
27+
| Parameter | Description |
28+
|:----------|:------------|
29+
| `-d` / `--debug` | enable debugging outputs (*default: no*) |
30+
| `-h` / `--help` | shows help and quits |
31+
| `-a` / `--authfile` | defines an authfile to instead of shell variables |
32+
| `-s` / `--server` | defines the server to use (*default: localhost*) |
33+
| `-r` / `--remove` | archives completed actions and removes all archvied actions (*default: no*) |
34+
| `-n` / `--dry-run` | only lists actions that would be archived (*default: no*) |
35+
| `-f` / `--include-failed` | also include failed actions (*default: no*) |
36+
| `-t` / `--only-system-tasks` | only consider automated system tasks such as package list refresh (*default: no*) |
37+
| `--version` | prints programm version and quits |
38+
39+
# Examples
7740
Listing all completed actions (*login information are passed using shell variables*):
7841
```
7942
$ SATELLITE_LOGIN=mylogin SATELLITE_PASSWORD=mypass ./arsa.py -n

0 commit comments

Comments
 (0)