From: Simo Sorce Date: Fri, 11 Apr 2014 20:46:24 +0000 (-0400) Subject: Allow to set additional custom keys on services X-Git-Tag: v0.2.2~28 X-Git-Url: http://git.cascardo.info/?p=cascardo%2Fipsilon.git;a=commitdiff_plain;h=2bed65a8810b7f81ec2be93275fa06f4da52e56f;hp=11242b8a3cab8d1594644cf22285e94639cca158 Allow to set additional custom keys on services Signed-off-by: Simo Sorce --- diff --git a/ipsilon/tools/saml2metadata.py b/ipsilon/tools/saml2metadata.py index b86e727..27eddb9 100755 --- a/ipsilon/tools/saml2metadata.py +++ b/ipsilon/tools/saml2metadata.py @@ -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')