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
The full traceback is:
Traceback (most recent call last):
File "x/ansible/modules/cloud/ovirt/ovirt_vm.py", line 2477, in main
File "x/ansible/module_utils/ovirt.py", line 622, in create
self.build_entity(),
File "x/ansible/modules/cloud/ovirt/ovirt_vm.py", line 1376, in build_entity
File "x/ansible/modules/cloud/ovirt/ovirt_vm.py", line 1293, in __get_template_with_version
AttributeError: 'NoneType' object has no attribute 'data_center'
EXPECTED RESULTS
You should obtain an explicit error which explains that cluster name was not found.
CODE ISSUE
In __get_template_with_version (file ovirt_vm.py, line 1293), the cluster variable is initialized with :
cluster=search_by_name(clusters_service, self.param('cluster'))
ifclusterisNone:
raiseValueError("Cluster with name '%s' was not found"% ( self.param('cluster')))
data_center=self._connection.follow_link(cluster.data_center)
The text was updated successfully, but these errors were encountered:
ovirt_vm
STEPS TO REPRODUCE
With
ovirt_vm
, specify an invalid cluster name like this :ACTUAL RESULTS
You will have the following error :
EXPECTED RESULTS
You should obtain an explicit error which explains that cluster name was not found.
CODE ISSUE
In
__get_template_with_version
(fileovirt_vm.py
, line 1293), thecluster
variable is initialized with :And just after,
cluster
is used to get it'sdata_center
attribute without testing if it's value isNone
:A test shoud be added between :
The text was updated successfully, but these errors were encountered: