I've discovered some issues with CLI commands in our latest opera version 0.6.7. I'm listing them below:
Steps
opera info:
(.venv) anzoman@ubuntu:~/Desktop/xopera-examples/misc/hello-world$ opera info
Traceback (most recent call last):
File "/home/anzoman/Desktop/xopera-examples/.venv/bin/opera", line 8, in <module>
sys.exit(main())
File "/home/anzoman/Desktop/xopera-examples/.venv/lib/python3.9/site-packages/opera/cli.py", line 47, in main
return args.func(args)
File "/home/anzoman/Desktop/xopera-examples/.venv/lib/python3.9/site-packages/opera/commands/info.py", line 55, in _parser_callback
outs = info(PurePath(csar_path), storage)
File "/home/anzoman/Desktop/xopera-examples/.venv/lib/python3.9/site-packages/opera/commands/info.py", line 97, in info
info_dict["csar_metadata"] = csar_meta.to_dict()
AttributeError: 'NoneType' object has no attribute 'to_dict'
opera package:
(.venv) anzoman@ubuntu:~/Desktop/xopera-examples/misc/hello-world$ opera package .
Traceback (most recent call last):
File "/home/anzoman/Desktop/xopera-examples/.venv/bin/opera", line 8, in <module>
sys.exit(main())
File "/home/anzoman/Desktop/xopera-examples/.venv/lib/python3.9/site-packages/opera/cli.py", line 47, in main
return args.func(args)
File "/home/anzoman/Desktop/xopera-examples/.venv/lib/python3.9/site-packages/opera/commands/package.py", line 57, in _parser_callback
output_package = package(PurePath(args.service_template_folder), csar_output, PurePath(args.service_template),
File "/usr/lib/python3.9/pathlib.py", line 675, in __new__
return cls._from_parts(args)
File "/usr/lib/python3.9/pathlib.py", line 707, in _from_parts
drv, root, parts = self._parse_args(args)
File "/usr/lib/python3.9/pathlib.py", line 691, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
There are also cases when opera validate command fails because it cannot fully validate Ansible executors. I think that instead of validating executors by default we could validate only TOSCA and replace the current --tosca-only switch with --executors/-e switch.
Description
I've discovered some issues with CLI commands in our latest opera version 0.6.7. I'm listing them below:
Steps
opera info
:opera package
:There are also cases when
opera validate
command fails because it cannot fully validate Ansible executors. I think that instead of validating executors by default we could validate only TOSCA and replace the current--tosca-only
switch with--executors/-e
switch.Current behaviour
The CLI commands have some bugs.
Expected results
To fix the bugs in the CLI commands.