Skip to content

Commit a58c1bf

Browse files
committed
better name
1 parent d6cbb98 commit a58c1bf

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

cli/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Manages **Scheduled Repair** in AxonOps.
148148
This parameter accepts a string value.
149149
* `--paxosonly` Run paxos repair only. Default is false.
150150
* `--skippaxos` Skip paxos repair. Default is false.
151-
* `--disabled` Disable Scheduled Repair. This option needs to be paired with a tags value to identify which scheduled
151+
* `--delete` Delete Scheduled Repair. This option needs to be paired with a tags value to identify which scheduled
152152
repair job to disable.
153153

154154
#### Examples:
@@ -266,8 +266,8 @@ Run a scheduled repair skipping paxos repair with a cron expression:
266266
$ pipenv run python axonops.py scheduledrepair --scheduleexpr '0 0 * * 0' --paxosonly
267267
```
268268

269-
Disable a scheduled repair job with specific tags:
269+
Delete a scheduled repair job with specific tags:
270270

271271
```shell
272-
$ pipenv run python axonops.py scheduledrepair --disabled --tags 'Weekly repair'
272+
$ pipenv run python axonops.py scheduledrepair --delete --tags 'Weekly repair'
273273
```

cli/axonopscli/application.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ def run(self, argv: Sequence):
120120
help='Comma-separated list of datacenters to repair, if not specified all datacenters are included')
121121
scheduledrepair_parser.add_argument('--tags', type=str, required=False,
122122
help='Tag for the repair job', default="")
123-
scheduledrepair_parser.add_argument('--disabled', action='store_true',
124-
help='Disable the scheduled repair instead of enabling it')
123+
scheduledrepair_parser.add_argument('--delete', action='store_true',
124+
help='Delete the scheduled repair instead of enabling it')
125125

126126
paxos_group = scheduledrepair_parser.add_mutually_exclusive_group()
127127
paxos_group.add_argument('--paxosonly', action='store_true', default=False,
@@ -136,8 +136,8 @@ def run(self, argv: Sequence):
136136
parser.error("--tables requires --keyspace")
137137

138138
# ensure --disabled is only used together with tags
139-
if getattr(parsed_result, "disabled", None) and not getattr(parsed_result, "tags", None):
140-
parser.error("--disabled requires --tags")
139+
if getattr(parsed_result, "delete", None) and not getattr(parsed_result, "tags", None):
140+
parser.error("--delete requires --tags")
141141

142142
# ensure --excludedtables is only used together with --keyspace
143143
if getattr(parsed_result, "excludedtables", None) and not getattr(parsed_result, "keyspace", None):

cli/axonopscli/components/scheduled_repair.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def remove_old_repairs_from_axonops(self):
3131
if self.args.v:
3232
print("No response received when checking for existing scheduled repair")
3333
return
34-
elif 'ScheduledRepairs' in response:
34+
elif 'ScheduledRepairs' in response and response['ScheduledRepairs']:
3535
for repair in response['ScheduledRepairs']:
3636
if self.args.v:
3737
print(f"Checking scheduled repair: {repair['ID']}")
@@ -40,7 +40,7 @@ def remove_old_repairs_from_axonops(self):
4040
print(repair['Params'])
4141

4242
else:
43-
print("Invalid outcome when checking for existing scheduled repair")
43+
print("Repair tag not found, this will be threaded as a new scheduled repair")
4444
else:
4545
if self.args.v:
4646
print("No tag provided, this will be threaded as a new scheduled repair")
@@ -100,9 +100,9 @@ def set_repair(self):
100100
if self.args.v:
101101
print("POST", self.full_add_repair_url, self.repair_data)
102102

103-
if self.args.disabled:
103+
if self.args.delete:
104104
if self.args.v:
105-
print("This scheduled repair is disabled, not sending to AxonOps")
105+
print("This scheduled repair is delete, not sending to AxonOps")
106106
return
107107

108108
self.axonops.do_request(

0 commit comments

Comments
 (0)