From 766a2cb172eb2bce67f05350c9712e7a7f3adb9c Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Fri, 30 Dec 2016 23:23:16 +0700 Subject: Remove the extends attribute from It's problematic for multiple reasons: 1. It's plaintext and is hard to verify 2. If it's wrong, it may have a very "interesting" effect on the resulting reference tree, such as lots of misplaced nodes 3. It's hardly ever needed as most nodes only go one or two levels deep in VyOS, such as "service $something" or "interfaces $something", and I think it's unlikely that other appliances will differ much. --- src/reference_tree.ml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/reference_tree.ml b/src/reference_tree.ml index 29b4265..b717d19 100644 --- a/src/reference_tree.ml +++ b/src/reference_tree.ml @@ -115,10 +115,7 @@ let load_from_xml reftree file = let xml_to_reftree xml reftree = match xml with | Xml.Element ("interfaceDefinition", attrs, children) -> - let basepath = - try Pcre.split (Xml.attrib xml "extends") - with _ -> [] - in List.fold_left (insert_from_xml basepath) reftree children + List.fold_left (insert_from_xml []) reftree children | _ -> raise (Bad_interface_definition "Should start with ") in try -- cgit v1.2.3