You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having trouble accessing properties of a host using opera version 0.7.0.
The scenario works fine using opera version 0.6.9.
I think this is related to #257, however, producing the error AttributeError: 'Node' object has no attribute 'find_host'.
Greetings
Miles
Steps
Here is a minimal service template that should be deployed.
The some_property of node_software accesses the another_property of its host.
When using opera version 0.7.0 the following happens.
opera validate service-template.yaml works:
Validating TOSCA CSAR or service template...
Done.
opera validate -e service-template.yaml throws the error:
Validating TOSCA CSAR or service template...
[Worker_0] Deploying node_compute_0
[Worker_0] Deployment of node_compute_0 complete
[Worker_0] Deploying node_software_0
Traceback (most recent call last):
File "/home/stoetzms/opera-0.7.0/.venv/bin/opera", line 8, in <module>
sys.exit(main())
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/cli.py", line 61, in main
return args.func(args)
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/commands/deploy.py", line 130, in _parser_callback
deploy_service_template(csar_or_st_path, inputs, storage,
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/commands/deploy.py", line 165, in deploy_service_template
topology.deploy(verbose_mode, workdir, num_workers)
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/instance/topology.py", line 65, in deploy
do_deploy = executor.wait_results()
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/threading/node_executor.py", line 33, in wait_results
errors = self.process_results(results)
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/threading/node_executor.py", line 57, in process_results
future.result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 451, in result
return self.__get_result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/instance/node.py", line 124, in deploy
self.run_operation(OperationHost.HOST, StandardInterfaceOperation.shorthand_name(),
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/instance/base.py", line 86, in run_operation
success, outputs, attributes = self.run(operation, host, verbose, workdir, validate)
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/instance/base.py", line 123, in run
actual_host = self.get_host(operation.host or host)
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/instance/node.py", line 233, in get_host
return self.find_host()
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/instance/node.py", line 257, in find_host
host = next((
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/instance/node.py", line 258, in <genexpr>
r.target.find_host()
AttributeError: 'Node' object has no attribute 'find_host'
opera deploy service-template.yaml throws the same error as previously:
[Worker_0] Deploying node_compute_0
[Worker_0] Deployment of node_compute_0 complete
[Worker_0] Deploying node_software_0
Traceback (most recent call last):
File "/home/stoetzms/opera-0.7.0/.venv/bin/opera", line 8, in <module>
sys.exit(main())
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/cli.py", line 61, in main
return args.func(args)
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/commands/deploy.py", line 130, in _parser_callback
deploy_service_template(csar_or_st_path, inputs, storage,
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/commands/deploy.py", line 165, in deploy_service_template
topology.deploy(verbose_mode, workdir, num_workers)
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/instance/topology.py", line 65, in deploy
do_deploy = executor.wait_results()
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/threading/node_executor.py", line 33, in wait_results
errors = self.process_results(results)
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/threading/node_executor.py", line 57, in process_results
future.result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 451, in result
return self.__get_result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/instance/node.py", line 124, in deploy
self.run_operation(OperationHost.HOST, StandardInterfaceOperation.shorthand_name(),
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/instance/base.py", line 86, in run_operation
success, outputs, attributes = self.run(operation, host, verbose, workdir, validate)
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/instance/base.py", line 123, in run
actual_host = self.get_host(operation.host or host)
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/instance/node.py", line 233, in get_host
return self.find_host()
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/instance/node.py", line 257, in find_host
host = next((
File "/home/stoetzms/opera-0.7.0/.venv/lib/python3.10/site-packages/opera/instance/node.py", line 258, in <genexpr>
r.target.find_host()
AttributeError: 'Node' object has no attribute 'find_host'
Expected Behaviour (Version 0.6.9)
I would expect that this still works in 0.7.0.
When using opera 0.6.9 everything works as expected.
opera validate service-template.yaml works:
Validating TOSCA CSAR or service template...
Done.
opera validate -e service-template.yaml works:
Validating TOSCA CSAR or service template...
[Worker_0] Validating node_software_0
[Worker_0] Validation of node_software_0 complete
[Worker_0] Validating node_compute_0
[Worker_0] Validation of node_compute_0 complete
Done.
opera deploy service-template.yaml works:
[Worker_0] Deploying node_software_0
[Worker_0] Deployment of node_software_0 complete
The text was updated successfully, but these errors were encountered:
Description
Hey,
I am having trouble accessing properties of a host using opera version 0.7.0.
The scenario works fine using opera version 0.6.9.
I think this is related to #257, however, producing the error
AttributeError: 'Node' object has no attribute 'find_host'
.Greetings
Miles
Steps
Here is a minimal service template that should be deployed.
The
some_property
ofnode_software
accesses theanother_property
of its host.Current Behaviour (Version 0.7.0)
When using opera version 0.7.0 the following happens.
opera validate service-template.yaml
works:opera validate -e service-template.yaml
throws the error:opera deploy service-template.yaml
throws the same error as previously:Expected Behaviour (Version 0.6.9)
I would expect that this still works in 0.7.0.
When using opera 0.6.9 everything works as expected.
opera validate service-template.yaml
works:opera validate -e service-template.yaml
works:opera deploy service-template.yaml
works:The text was updated successfully, but these errors were encountered: