Add the 'containers' field back to capsule

The capsule object is used to have the 'containers' field which
is the list of container objects. This field was accidentally
removed during the merging of data model into container.
This commit adds this field back.

Change-Id: I2cdf365ae4c394eeef6672eed59855f36e7006fc
This commit is contained in:
Hongbin Lu 2019-03-10 19:06:16 +00:00
parent 56c939dc9c
commit 47f9fb16cb
1 changed files with 5 additions and 0 deletions

View File

@ -392,6 +392,11 @@ class Capsule(ContainerBase):
nullable=True),
}
def as_dict(self):
capsule_dict = super(Capsule, self).as_dict()
capsule_dict['containers'] = [c.as_dict() for c in self.containers]
return capsule_dict
def obj_load_attr(self, attrname):
if attrname == 'containers':
self._load_capsule_containers()