Merge "docstring and unused code removal"

This commit is contained in:
Jenkins
2017-07-26 23:44:07 +00:00
committed by Gerrit Code Review

View File

@@ -1799,6 +1799,11 @@ class AllocationList(base.ObjectListBase, base.NovaObject):
:raises `exception.ResourceClassNotFound` if any resource class in any
allocation in allocs cannot be found in either the standard
classes or the DB.
:raises `exception.InvalidAllocationCapacityExceeded` if any inventory
would be exhausted by the allocation.
:raises `InvalidAllocationConstraintsViolated` if any of the
`step_size`, `min_unit` or `max_unit` constraints in an
inventory will be violated by any one of the allocations.
"""
_ensure_rc_cache(context)
conn = context.session.connection()
@@ -1810,7 +1815,6 @@ class AllocationList(base.ObjectListBase, base.NovaObject):
if 'id' in alloc:
raise exception.ObjectActionError(action='create',
reason='already created')
_RC_CACHE.id_from_string(alloc.resource_class)
# Before writing any allocation records, we check that the submitted
# allocations do not cause any inventory capacity to be exceeded for