Context secion in vm template
Description Issues on the Context section of the vm template:
Issue 1:
'Start script' field has to be START_SCRIPT attribute if 'Encode script in Base64' is false and START_SCRIPT_BASE64 attribute if it's true. Now, it's always START_SCRIPT. Also, the 'Encode script in Base64' field is now saved as true or false in the ENCODE_START_SCRIPT attribute, but is not an attribute that has to be saved, always it's to control if we need to save START_SCRIPT or START_SCRIPT_BASE64. So, fix the behavior of 'Start script' and don't save 'Encode script in Base64'. Also, the 'Encode script in Base64' has to be true by default.
To Reproduce
- Create a template
- Go to the Context tab
- Check 'Encode script in Base64'
- Add some content in the 'Start script' field
- Save the template.
Expected behavior That ENCODE_START_SCRIPT is not saved and if the 'Encode script in Base64' is true, the attribute for 'Start script' it's START_SCRIPT_BASE64 instead START_SCRIPT.
Issue 2: The fields 'Init scripts' and 'Files' are a text field, but in the template this text represents space-separated list, Ex. “init.sh users.sh mysql.sh" so, to improve performance, both fields should be a a text field where you can type a name, press enter, and the name will be added as an element (INPUT_TYPES.AUTOCOMPLETE) in FireEdge. After the user inserts many elements as he wants, the final string will be a string with all the elements separated by a space.
To Reproduce
- Create a template
- Go to the Context tab
- Expand the Files subsection
- Type some text on File datastores and Init scripts.
- Save the template.
Expected behavior That INIT_SCRIPTS and FILES_DS are a string representing a space-separated list using the autocomplete element.
Details
- Affected Component: FireEdge
- Hypervisor: N/A
- Version: 6.8
Additional context Also, some testing is needed in the templateadvanced.func.spec.js tests:
- Add delete and update text for context custom vars.
- Add drag and drop tests for the user inputs order (only drag and drop, the create and delete user inputs tests exists).
- Tests to check the boot order:
- Add drag and drop tests for the boot order.
- Add or delete disks and nics and check that the boot order is updated.
Tasks
- [ ] Issue 1
- [ ] Issue 2
- [ ] Testing custom vars
- [ ] Testing user inputs order
- [ ] Testing boot order
Progress Status
- [ ] Code committed
- [ ] Testing - QA
- [ ] Documentation (Release notes - resolved issues, compatibility, known issues)