summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-02-06 15:45:20 -0500
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-02-06 15:45:20 -0500
commit2169edc1bba82076db776b75db89b79d6f2f4786 (patch)
tree25b7f500015bc61bf30927239297381ef8c82abd /src/lib/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.py
parentc7aae4303ff622474af6ddd3014ad39b8ef0a92c (diff)
downloadbcfg2-2169edc1bba82076db776b75db89b79d6f2f4786.tar.gz
bcfg2-2169edc1bba82076db776b75db89b79d6f2f4786.tar.bz2
bcfg2-2169edc1bba82076db776b75db89b79d6f2f4786.zip
converted InfoXML objects from XMLSrc to StructFile
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.py b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.py
index 3b6fc8fa0..886b3993b 100644
--- a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.py
+++ b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgInfoXML.py
@@ -1,6 +1,6 @@
""" Handle info.xml files """
-from Bcfg2.Server.Plugin import PluginExecutionError, InfoXML
+from Bcfg2.Server.Plugin import InfoXML
from Bcfg2.Server.Plugins.Cfg import CfgInfo
@@ -17,21 +17,9 @@ class CfgInfoXML(CfgInfo):
__init__.__doc__ = CfgInfo.__init__.__doc__
def bind_info_to_entry(self, entry, metadata):
- mdata = dict()
- self.infoxml.pnode.Match(metadata, mdata, entry=entry)
- if 'Info' not in mdata:
- raise PluginExecutionError("Failed to set metadata for file %s" %
- entry.get('name'))
- self._set_info(entry, mdata['Info'][None])
+ self.infoxml.BindEntry(entry, metadata)
bind_info_to_entry.__doc__ = CfgInfo.bind_info_to_entry.__doc__
def handle_event(self, event):
self.infoxml.HandleEvent()
handle_event.__doc__ = CfgInfo.handle_event.__doc__
-
- def _set_info(self, entry, info):
- CfgInfo._set_info(self, entry, info)
- if '__children__' in info:
- for child in info['__children__']:
- entry.append(child)
- _set_info.__doc__ = CfgInfo._set_info.__doc__