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 configure property bash completion and the help text for each property #1390

Open
zzhou1 opened this issue Apr 16, 2024 · 2 comments
Open

Comments

@zzhou1
Copy link
Contributor

zzhou1 commented Apr 16, 2024

Few more findings:

  1. Can we provide bash completion for crm configure property <TAB><TAB>? Just like the interactive mode which is very good.

  2. Similar, to provide meta-data description completion, for example, crm configure property stonith-timeout= <TAB><TAB>

  3. crm configure property --help could be revised accordingly to use the above approach instead of referring to crm ra info

Originally posted by @liangxin1300 in #1379 (comment)

@liangxin1300
Copy link
Collaborator

liangxin1300 commented Apr 17, 2024

2. Similar, to provide meta-data description completion, for example, crm configure property stonith-timeout= <TAB><TAB>

Should be impossible to show the description at non-interactive mode

Like

# crm configure property dc-deadtime=
dc-deadtime (time, [20s]): How long to wait for a response from other nodes during start-up
    The optimal value will depend on the speed and load of your network and the type of switches used.

The cursor will be positioned after the string

At interactive mode, the description will be shown in a loop

crm(live/15sp5-2)configure# property dc-deadtime=
dc-deadtime (time, [20s]): How long to wait for a response from other nodes during start-up
    The optimal value will depend on the speed and load of your network and the type of switches used.

crm(live/15sp5-2)configure# property dc-deadtime=

That's why we wrote this condition https://github.com/ClusterLabs/crmsh/blob/master/crmsh/ui_configure.py#L228

@liangxin1300
Copy link
Collaborator

I'm inclined to show help info for that property after the command failed, instead to show help info with

alp-1:~ # crm configure property no-quorum-policy=
ERROR: syntax in property: Empty value for no-quorum-policy is not allowed parsing 'property no-quorum-policy='
# Add help info here for no-quorum-policy

alp-1:~ # crm configure property no-quorum-policy
ERROR: syntax in property: Unknown arguments: no-quorum-policy near <no-quorum-policy> parsing 'property no-quorum-policy'
# Add help info here for no-quorum-policy

@liangxin1300 liangxin1300 reopened this Apr 28, 2024
@zzhou1 zzhou1 changed the title crm configure property bash completion and adjust --help accordingly crm configure property bash completion and the help text for each property Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants