Add resolve callout rule support to YAML parser

The callout to resolve is specified in the YAML.

Change-Id: If613fae1959c6a54279b2a50c7d858f3e7d831b9
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/src/Makefile.am b/src/Makefile.am
index 29a4ba7..c20b9dd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,7 +31,8 @@
 	templates/journal.mako.cpp \
 	templates/elog.mako.cpp \
 	templates/errors.mako.hpp \
-	templates/method.mako.cpp
+	templates/method.mako.cpp \
+	templates/resolve_errors.mako.cpp
 
 generated.hpp: $(PDMGEN) $(YAML_PATH) $(TEMPLATES)
 	$(AM_V_GEN)$(PYTHON) ${PDMGEN} \
diff --git a/src/pdmgen.py b/src/pdmgen.py
index 693b149..9ed27cd 100755
--- a/src/pdmgen.py
+++ b/src/pdmgen.py
@@ -699,6 +699,21 @@
             indent=indent)
 
 
+class ResolveCallout(Callback, Renderer):
+    '''Handle the 'resolve callout' callback config file directive.'''
+
+    def __init__(self, *a, **kw):
+        self.callout = kw.pop('callout')
+        super(ResolveCallout, self).__init__(**kw)
+
+    def construct(self, loader, indent):
+        return self.render(
+            loader,
+            'resolve_errors.mako.cpp',
+            c=self,
+            indent=indent)
+
+
 class Method(ConfigEntry, Renderer):
     '''Handle the method callback config file directive.'''
 
@@ -869,6 +884,7 @@
                 'elog': Elog,
                 'group': GroupOfCallbacks,
                 'method': Method,
+                'resolve callout': ResolveCallout,
             },
             'condition': {
                 'count': CountCondition,
diff --git a/src/templates/generated.mako.hpp b/src/templates/generated.mako.hpp
index 04f2bde..740acfa 100644
--- a/src/templates/generated.mako.hpp
+++ b/src/templates/generated.mako.hpp
@@ -12,6 +12,7 @@
 #include "errors.hpp"
 #include "method.hpp"
 #include "propertywatchimpl.hpp"
+#include "resolve_errors.hpp"
 #include "sdbusplus.hpp"
 #include "sdevent.hpp"
 
diff --git a/src/templates/resolve_errors.mako.cpp b/src/templates/resolve_errors.mako.cpp
new file mode 100644
index 0000000..8b49031
--- /dev/null
+++ b/src/templates/resolve_errors.mako.cpp
@@ -0,0 +1 @@
+std::make_unique<ResolveCallout>("${c.callout}")\