|
|
3f51ca |
From a87278422807aa4004b63e8e46ad38dab5a911f3 Mon Sep 17 00:00:00 2001
|
|
|
3f51ca |
From: Fraser Tweedale <ftweedal@redhat.com>
|
|
|
3f51ca |
Date: Thu, 30 Nov 2017 12:00:53 +1100
|
|
|
3f51ca |
Subject: [PATCH] pep8: reduce line lengths in CAInstance.__enable_crl_publish
|
|
|
3f51ca |
|
|
|
3f51ca |
Part of: https://pagure.io/freeipa/issue/7288
|
|
|
3f51ca |
|
|
|
3f51ca |
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
|
|
|
3f51ca |
---
|
|
|
3f51ca |
ipaserver/install/cainstance.py | 71 ++++++++++++++++++++++++-----------------
|
|
|
3f51ca |
1 file changed, 41 insertions(+), 30 deletions(-)
|
|
|
3f51ca |
|
|
|
3f51ca |
diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py
|
|
|
3f51ca |
index f45d2c8b89ba4b81be5acbbe85f256e85ef630fb..dd410d1c97cb4b27d35086bb2f511c42c02d022f 100644
|
|
|
3f51ca |
--- a/ipaserver/install/cainstance.py
|
|
|
3f51ca |
+++ b/ipaserver/install/cainstance.py
|
|
|
3f51ca |
@@ -907,52 +907,63 @@ class CAInstance(DogtagInstance):
|
|
|
3f51ca |
|
|
|
3f51ca |
https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Certificate_System/8.0/html/Admin_Guide/Setting_up_Publishing.html
|
|
|
3f51ca |
"""
|
|
|
3f51ca |
- caconfig = paths.CA_CS_CFG_PATH
|
|
|
3f51ca |
|
|
|
3f51ca |
- publishdir = self.prepare_crl_publish_dir()
|
|
|
3f51ca |
+ def put(k, v):
|
|
|
3f51ca |
+ installutils.set_directive(
|
|
|
3f51ca |
+ paths.CA_CS_CFG_PATH, k, v, quotes=False, separator='=')
|
|
|
3f51ca |
|
|
|
3f51ca |
# Enable file publishing, disable LDAP
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.enable', 'true', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.ldappublish.enable', 'false', quotes=False, separator='=')
|
|
|
3f51ca |
+ put('ca.publish.enable', 'true')
|
|
|
3f51ca |
+ put('ca.publish.ldappublish.enable', 'false')
|
|
|
3f51ca |
|
|
|
3f51ca |
# Create the file publisher, der only, not b64
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.publisher.impl.FileBasedPublisher.class','com.netscape.cms.publish.publishers.FileBasedPublisher', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.publisher.instance.FileBaseCRLPublisher.crlLinkExt', 'bin', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.publisher.instance.FileBaseCRLPublisher.directory', publishdir, quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.publisher.instance.FileBaseCRLPublisher.latestCrlLink', 'true', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.publisher.instance.FileBaseCRLPublisher.pluginName', 'FileBasedPublisher', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.publisher.instance.FileBaseCRLPublisher.timeStamp', 'LocalTime', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.publisher.instance.FileBaseCRLPublisher.zipCRLs', 'false', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.publisher.instance.FileBaseCRLPublisher.zipLevel', '9', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.publisher.instance.FileBaseCRLPublisher.Filename.b64', 'false', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.publisher.instance.FileBaseCRLPublisher.Filename.der', 'true', quotes=False, separator='=')
|
|
|
3f51ca |
+ put('ca.publish.publisher.impl.FileBasedPublisher.class',
|
|
|
3f51ca |
+ 'com.netscape.cms.publish.publishers.FileBasedPublisher')
|
|
|
3f51ca |
+ put('ca.publish.publisher.instance.FileBaseCRLPublisher.crlLinkExt',
|
|
|
3f51ca |
+ 'bin')
|
|
|
3f51ca |
+ put('ca.publish.publisher.instance.FileBaseCRLPublisher.directory',
|
|
|
3f51ca |
+ self.prepare_crl_publish_dir())
|
|
|
3f51ca |
+ put('ca.publish.publisher.instance.FileBaseCRLPublisher.latestCrlLink',
|
|
|
3f51ca |
+ 'true')
|
|
|
3f51ca |
+ put('ca.publish.publisher.instance.FileBaseCRLPublisher.pluginName',
|
|
|
3f51ca |
+ 'FileBasedPublisher')
|
|
|
3f51ca |
+ put('ca.publish.publisher.instance.FileBaseCRLPublisher.timeStamp',
|
|
|
3f51ca |
+ 'LocalTime')
|
|
|
3f51ca |
+ put('ca.publish.publisher.instance.FileBaseCRLPublisher.zipCRLs',
|
|
|
3f51ca |
+ 'false')
|
|
|
3f51ca |
+ put('ca.publish.publisher.instance.FileBaseCRLPublisher.zipLevel', '9')
|
|
|
3f51ca |
+ put('ca.publish.publisher.instance.FileBaseCRLPublisher.Filename.b64',
|
|
|
3f51ca |
+ 'false')
|
|
|
3f51ca |
+ put('ca.publish.publisher.instance.FileBaseCRLPublisher.Filename.der',
|
|
|
3f51ca |
+ 'true')
|
|
|
3f51ca |
|
|
|
3f51ca |
# The publishing rule
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.rule.instance.FileCrlRule.enable', 'true', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.rule.instance.FileCrlRule.mapper', 'NoMap', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.rule.instance.FileCrlRule.pluginName', 'Rule', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.rule.instance.FileCrlRule.predicate', '', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.rule.instance.FileCrlRule.publisher', 'FileBaseCRLPublisher', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.rule.instance.FileCrlRule.type', 'crl', quotes=False, separator='=')
|
|
|
3f51ca |
+ put('ca.publish.rule.instance.FileCrlRule.enable', 'true')
|
|
|
3f51ca |
+ put('ca.publish.rule.instance.FileCrlRule.mapper', 'NoMap')
|
|
|
3f51ca |
+ put('ca.publish.rule.instance.FileCrlRule.pluginName', 'Rule')
|
|
|
3f51ca |
+ put('ca.publish.rule.instance.FileCrlRule.predicate', '')
|
|
|
3f51ca |
+ put('ca.publish.rule.instance.FileCrlRule.publisher',
|
|
|
3f51ca |
+ 'FileBaseCRLPublisher')
|
|
|
3f51ca |
+ put('ca.publish.rule.instance.FileCrlRule.type', 'crl')
|
|
|
3f51ca |
|
|
|
3f51ca |
# Now disable LDAP publishing
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.rule.instance.LdapCaCertRule.enable', 'false', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.rule.instance.LdapCrlRule.enable', 'false', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.rule.instance.LdapUserCertRule.enable', 'false', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.publish.rule.instance.LdapXCertRule.enable', 'false', quotes=False, separator='=')
|
|
|
3f51ca |
+ put('ca.publish.rule.instance.LdapCaCertRule.enable', 'false')
|
|
|
3f51ca |
+ put('ca.publish.rule.instance.LdapCrlRule.enable', 'false')
|
|
|
3f51ca |
+ put('ca.publish.rule.instance.LdapUserCertRule.enable', 'false')
|
|
|
3f51ca |
+ put('ca.publish.rule.instance.LdapXCertRule.enable', 'false')
|
|
|
3f51ca |
|
|
|
3f51ca |
# If we are the initial master then we are the CRL generator, otherwise
|
|
|
3f51ca |
# we point to that master for CRLs.
|
|
|
3f51ca |
if not self.clone:
|
|
|
3f51ca |
# These next two are defaults, but I want to be explicit that the
|
|
|
3f51ca |
# initial master is the CRL generator.
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.crl.MasterCRL.enableCRLCache', 'true', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.crl.MasterCRL.enableCRLUpdates', 'true', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.listenToCloneModifications', 'true', quotes=False, separator='=')
|
|
|
3f51ca |
+ put('ca.crl.MasterCRL.enableCRLCache', 'true')
|
|
|
3f51ca |
+ put('ca.crl.MasterCRL.enableCRLUpdates', 'true')
|
|
|
3f51ca |
+ put('ca.listenToCloneModifications', 'true')
|
|
|
3f51ca |
else:
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.crl.MasterCRL.enableCRLCache', 'false', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.crl.MasterCRL.enableCRLUpdates', 'false', quotes=False, separator='=')
|
|
|
3f51ca |
- installutils.set_directive(caconfig, 'ca.listenToCloneModifications', 'false', quotes=False, separator='=')
|
|
|
3f51ca |
+ put('ca.crl.MasterCRL.enableCRLCache', 'false')
|
|
|
3f51ca |
+ put('ca.crl.MasterCRL.enableCRLUpdates', 'false')
|
|
|
3f51ca |
+ put('ca.listenToCloneModifications', 'false')
|
|
|
3f51ca |
|
|
|
3f51ca |
def uninstall(self):
|
|
|
3f51ca |
# just eat state
|
|
|
3f51ca |
--
|
|
|
3f51ca |
2.13.6
|
|
|
3f51ca |
|