Creating RequestSpec from flavor tries to use nonexistent attribute
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Opinion
|
Undecided
|
Unassigned |
Bug Description
Description
===========
Calling RequestSpec.
Steps to reproduce
==================
* I directly imported RequestSpec via "from nova.objects.
* I called RequestSpec.
* RequestSpec.
* RequestSpec.
Expected result
===============
I should have received a RequestSpec object or another error if the data provided was incorrect.
Actual result
=============
The exception "AttributeError: module 'nova.objects' has no attribute 'Flavor'" is raised.
Traceback:
RequestSpec.
File "/home/
spec.
File "/home/
if isinstance(flavor, objects.Flavor):
AttributeError: module 'nova.objects' has no attribute 'Flavor'
Environment
===========
I use Nova 21.2.4 from PyPi, Python 3.10 on Ubuntu 20.04.
Thanks for reporting this bug. It is legit, but it needs to be discussed as the RequestSpec. from_primitives method is deprecated and should be removed at some point. So we need to discuss whether it is worth fixing or simply removing the method.