Cannot snapshot volumes with volume types
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cinderlib |
Fix Released
|
Undecided
|
Rajat Dhasmana |
Bug Description
When we try to create a snapshot from a volume that has a volume type we get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/
snap.create()
File "/home/
self.save()
File "/home/
self.
File "/home/
changed = self.get_
File "/home/
if ('qos_specs' in resource.
File "/home/
return getattr(self._ovo, name)
AttributeError: 'Snapshot' object has no attribute 'volume_type'
Changed in cinderlib: | |
assignee: | nobody → Rajat Dhasmana (whoami-rajat) |
Changed in cinderlib: | |
status: | New → In Progress |
Reviewed: https:/ /review. opendev. org/670887 /git.openstack. org/cgit/ openstack/ cinderlib/ commit/ ?id=d6bec909e0a 4ab20ec8448f952 1485f796d08370
Committed: https:/
Submitter: Zuul
Branch: master
commit d6bec909e0a4ab2 0ec8448f9521485 f796d08370
Author: whoami-rajat <email address hidden>
Date: Mon Jul 15 22:41:49 2019 +0530
Fix: Snapshot creation with volume types
This patch corrects the functionality where a resource with type_id' field is assumed to have a 'volume_type' field
'volume_
which isn't the case for snapshots.
This patch also adds minimal test coverage for get_changed_fields
method.
Closes-Bug: #1836724
Change-Id: If7816bf3deb37c 526b86b0baed500 bebe637bd40