Allow to set additional custom keys on services
authorSimo Sorce <simo@redhat.com>
Fri, 11 Apr 2014 20:46:24 +0000 (16:46 -0400)
committerSimo Sorce <simo@redhat.com>
Fri, 11 Apr 2014 21:25:54 +0000 (17:25 -0400)
Signed-off-by: Simo Sorce <simo@redhat.com>
ipsilon/tools/saml2metadata.py

index b86e727..27eddb9 100755 (executable)
@@ -107,10 +107,12 @@ class Metadata(object):
         if enccert:
             self.add_cert(enccert.get_cert(), 'encryption')
 
-    def add_service(self, service, location):
+    def add_service(self, service, location, **kwargs):
         svc = mdElement(self.role, service[0])
         svc.set('Binding', service[1])
         svc.set('Location', location)
+        for key, value in kwargs.iteritems():
+            svc.set(key, value)
 
     def add_allowed_name_format(self, name_format):
         nameidfmt = mdElement(self.role, 'NameIDFormat')