Support dictionary subnets in segments

Change-Id: I772a9ccf77fa57f6864f95ba6337b3237ca35119
This commit is contained in:
asarfaty 2020-05-20 10:03:36 +02:00
parent 1e12405dc7
commit a1b5793114
1 changed files with 1 additions and 0 deletions

View File

@ -897,6 +897,7 @@ class BaseSegmentDef(ResourceDef):
subnets = []
if self.get_attr('subnets'):
subnets = [subnet.get_obj_dict(self.nsx_version)
if isinstance(subnet, Subnet) else subnet
for subnet in self.get_attr('subnets')]
self._set_attr_if_specified(body, 'subnets', value=subnets)