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

onetemplate_helper.rb lacks 'boolean' case of USER_INPUTS #4075

Closed
7 tasks
sw37th opened this issue Jan 4, 2020 · 1 comment
Closed
7 tasks

onetemplate_helper.rb lacks 'boolean' case of USER_INPUTS #4075

sw37th opened this issue Jan 4, 2020 · 1 comment

Comments

@sw37th
Copy link
Contributor

sw37th commented Jan 4, 2020

Description

It fails instantiate the template which it has boolean type USER_INPUTS by onetemplate command, because src/cli/one_helper/onetemplate_helper.rb lacks 'boolean' case.

To Reproduce

$ onetemplate list --no_expand
  ID USER     GROUP    NAME                    REGTIME
  11 oneadmin oneadmin something_tmpl   01/04 22:06:48

$ cat ./user_inputs_boolean.txt
USER_INPUTS=[
  BOOLEAN_VAR="M|boolean|SAMPLE| |NO" ]

$ onetemplate update -a something_tmpl ./user_inputs_boolean.txt

$ onetemplate show something_tmpl | grep -A2 '^USER_INPUTS'
USER_INPUTS=[
  BOOLEAN_VAR="M|boolean|SAMPLE| |NO" ]

$ onetemplate instantiate something_tmpl
There are some parameters that require user input. Use the string <<EDITOR>> to launch an editor (e.g. for multi-line inputs)
  * (BOOLEAN_VAR) SAMPLE
Wrong type for user input:
  BOOLEAN_VAR: M|boolean|SAMPLE| |NO

$ echo $?
255

Expected behavior

The prompt accepts user input which it is stricted YES or NO.

Details

  • Affected Component: onetemplate command (opennebula-tools package)
  • Hypervisor: KVM
  • Version: 5.10.1

Additional context

I have found this problem when trying Service Kubernetes Appliance exported from Marketplace.

Progress Status

  • Branch created
  • Code committed to development branch
  • Testing - QA
  • Documentation
  • Release notes - resolved issues, compatibility, known issues
  • Code committed to upstream release/hotfix branches
  • Documentation committed to upstream release/hotfix branches
@al3xhh
Copy link
Contributor

al3xhh commented Jan 24, 2020

rsmontero pushed a commit that referenced this issue Jan 24, 2020
rsmontero pushed a commit to OpenNebula/docs that referenced this issue Jan 24, 2020
atodorov-storpool pushed a commit to storpool/one that referenced this issue Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants