pimgen: Add support for rendering propertyIs

Change-Id: Ic0e304849f25a3119bd2d985650496e6983d71ad
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/pimgen.py b/pimgen.py
index a7d2a2e..6835258 100755
--- a/pimgen.py
+++ b/pimgen.py
@@ -297,6 +297,26 @@
         super(PropertyChanged, self).__init__(**kw)
 
 
+class PropertyIs(Filter):
+    '''Assemble a propertyIs filter.'''
+
+    def __init__(self, **kw):
+        args = []
+        args.append(TrivialArgument(value=kw.pop('path'), type='string'))
+        args.append(TrivialArgument(value=kw.pop('interface'), type='string'))
+        args.append(TrivialArgument(value=kw.pop('property'), type='string'))
+        args.append(TrivialArgument(
+            decorators=[
+                Literal(kw['value'].get('type', None))], **kw.pop('value')))
+
+        service = kw.pop('service', None)
+        if service:
+            args.append(TrivialArgument(value=service, type='string'))
+
+        kw['args'] = args
+        super(PropertyIs, self).__init__(**kw)
+
+
 class Event(MethodCall):
     '''Assemble an inventory manager event.'''
 
@@ -307,6 +327,7 @@
 
     filter_map = {
         'propertyChangedTo': PropertyChanged,
+        'propertyIs': PropertyIs,
     }
 
     def __init__(self, **kw):