- for vld in self._nsd['vld']:
- if vld.get('mgmt-network', False) is False:
- vld_desc_entry = {}
- cp_refs = [ep_ref['member-vnf-index-ref'] for ep_ref in vld['vnfd-connection-point-ref']]
- if len(cp_refs) == 2:
- vld_desc_entry['cp_refs'] = cp_refs
- if 'link-constraint' in vld.keys():
- for constraint in vld['link-constraint']:
- if constraint['constraint-type'] == 'LATENCY':
- vld_desc_entry['latency'] = constraint['value']
- elif constraint['constraint-type'] == 'JITTER':
- vld_desc_entry['jitter'] = constraint['value']
- vld_desc.append(vld_desc_entry)
+ for vld in self._nsd.get('virtual-link-desc', ()):
+ if vld.get('mgmt-network', False) is True:
+ continue
+ vld_desc_entry = {}
+ cp_refs = all_vld_member_vnf_index_refs[vld.get('id')]
+ if len(cp_refs) == 2:
+ vld_desc_entry['cp_refs'] = cp_refs
+ # TODO: Change for multiple DF support
+ vld_df = vld.get('df', [{}])[0]
+ for constraint in vld_df.get('qos', {}):
+ if constraint == 'latency':
+ vld_desc_entry['latency'] = vld_df['qos'][constraint]
+ elif constraint == 'packet-delay-variation':
+ vld_desc_entry['jitter'] = vld_df['qos'][constraint]
+ vld_desc.append(vld_desc_entry)