anomaly / anomaly/gallagher

Allow range as parameters in the CLI for batch operations e.g provide IDs as multiple values or ranges like `2200-2210`

Đang mở
#55 1 bình luận 0 reaction 1 người được giao Được @devraj nhận Xem trên GitHub
cli documentation enhancement
Ngôn ngữ chính
Python
Star
17
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**Is your feature request related to a problem? Please describe.**
The idea came to me when I was doing some support work for my own command centre where while configuring a 7000 controller I had a series of `Invalid certificate` alarms for the controller purely from having to reset it.

While it's absolutely legitimate that the user interface requires a user to acknowledge each alarm on its own (signifying that the user has actually looked at the alarm or event).

```
AttributeError: 'NoneType' object has no attribute 'href'
(gallagher-py3.11) ➜ gallagher git:(alpha-5) ✗ gala alarm process 2230
[22:16:48] Finding alarm ... alarms.py:219
Processing 2230 without comment ... alarms.py:227
Processed alarm
(gallagher-py3.11) ➜ gallagher git:(alpha-5) ✗ gala alarm process 2230
[22:16:50] Finding alarm ... alarms.py:219
Processing 2230 without comment ... alarms.py:227
Processed alarm
(gallagher-py3.11) ➜ gallagher git:(alpha-5) ✗ gala alarm list
```

It occurred to me that it would be handy to batch process these events and alarms through a power tool like the `cli` or the `tui` for that matter.

**Describe the solution you'd like**
This solution requires no modification to the SDK per say as each event or alarm would still have to be processed one at a time i.e multiple REST calls.

The command line on the other hand would provide the options such as:

- `gala alarm process 2230 2231 -m "message"`
- `gala alarm process 2200-2210 -m "message"`

for the CLI to process those range of alarms of events.

I would expect the CLI tool to:
- Present a summary message of each one of those alarms or events processed (success or failure on each one of them)
- Possibly ask for confirmation before it proceeds to do a bulk operations with an `--confirm` style argument for non interactive execution

**Describe alternatives you've considered**
You could use `--json` output and then pipe this through the `cli` via bash?

**Additional context**
Standard Unix commands would provide multiple values by
- repeating parameters `grep -e pattern1 -e pattern2 file.txt`
- providing a list of values `ls file1.txt file2.txt file3.txt`

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.