+ def _get_elines_and_elans(self):
+ """
+ Get the E-Line, E-LAN, E-Tree links from the NSD.
+ """
+ # Attention: Only done if ""forwarding_graphs" section in NSD exists,
+ # even if "forwarding_graphs" are not used directly.
+ eline_fwd_links = list()
+ elan_fwd_links = list()
+ if "virtual_links" in self.nsd and "forwarding_graphs" in self.nsd:
+ vlinks = self.nsd["virtual_links"]
+ # constituent virtual links are not checked
+ eline_fwd_links = [l for l in vlinks if (
+ l["connectivity_type"] == "E-Line")]
+ elan_fwd_links = [l for l in vlinks if (
+ l["connectivity_type"] == "E-LAN" or
+ l["connectivity_type"] == "E-Tree")] # Treat E-Tree as E-LAN
+ return eline_fwd_links, elan_fwd_links
+