Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[crm] add crm config clear cli command #644

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AmitKaushik7
Copy link
Contributor

- What I did
Added the "crm config clear" cli command to remove the polling interval configured and remove the threshold settings configured.

- How I did it
Added crm config clear command in crm/main.py by deleting the deleting the CRM table from the config DB.

- How to verify it
Default:
crm show thresholds all => Error: will show empty table at reset
crm show summary => Error! could not get CRM configuration
Configure Polling interval and CRM threshold for any resource (say fdb)
crm config polling interval 10
crm config thresholds fdb type percentage
crm config thresholds fdb low 10
crm config thresholds fdb high 60
Verify the config
crm show thresholds all => Will show the configure Thresholds entries for FDB
crm show summary => Will show Polling interval as 10 second(s)
Execute Clear command
crm config clear
Verify the config
crm show thresholds all => Error: will show empty table at reset
crm show summary => Error! could not get CRM configuration

- Previous command output (if the output of a command-line utility has changed)
NA- no change in the format of the output.
- New command output (if the output of a command-line utility has changed)
NA
-->

@AmitKaushik7
Copy link
Contributor Author

CI:Rerun

@AmitKaushik7
Copy link
Contributor Author

CI:rerun

@jleveque
Copy link
Contributor

Retest this please

@prsunny
Copy link
Contributor

prsunny commented Sep 25, 2019

Why do we need this change? Also this is an unsupported operation for CRM Orch. The current support is only to set config values and not delete config.

@AmitKaushik7
Copy link
Contributor Author

Agreed. This is an enhancement and useful in automation scripts to undo the CRM Threshold config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants