diff options
author | Daniil Baturin <daniil@baturin.org> | 2016-12-30 23:23:16 +0700 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2016-12-30 23:23:16 +0700 |
commit | 766a2cb172eb2bce67f05350c9712e7a7f3adb9c (patch) | |
tree | 6dd541cdc1813ff598eed75dc4daf62221be1820 /src | |
parent | 4f69b2c58a53e405eb23d5763de774e9526420a0 (diff) | |
download | vyconf-766a2cb172eb2bce67f05350c9712e7a7f3adb9c.tar.gz vyconf-766a2cb172eb2bce67f05350c9712e7a7f3adb9c.zip |
Remove the extends attribute from <interfaceDefinition>
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/reference_tree.ml | 5 |
1 files changed, 1 insertions, 4 deletions
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 <interfaceDefinition>") in try |