Skip to content

Commit

Permalink
Add PKIDeployer.request_ranges()
Browse files Browse the repository at this point in the history
The code that requests serial number ranges from the cloning
master in PKIDeployer.import_master_config() has been moved
to request_ranges().
  • Loading branch information
edewata committed Aug 3, 2023
1 parent c6978c0 commit 79e13b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 9 additions & 4 deletions base/server/python/pki/server/deployment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1370,14 +1370,19 @@ def configure_subsystem(self, subsystem):
if subsystem.type == 'TPS':
self.configure_tps(subsystem)

def import_master_config(self, subsystem):
def request_ranges(self, subsystem):

if subsystem.type not in ['CA', 'KRA']:
return

master_url = self.mdict['pki_clone_uri']

if subsystem.type in ['CA', 'KRA']:
logger.info('Requesting ranges from %s master', subsystem.type)
subsystem.request_ranges(master_url, session_id=self.install_token.token)

logger.info('Requesting ranges from %s master', subsystem.type)
subsystem.request_ranges(master_url, session_id=self.install_token.token)
def import_master_config(self, subsystem):

master_url = self.mdict['pki_clone_uri']

logger.info('Retrieving config params from %s master', subsystem.type)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ def spawn(self, deployer):
if config.str2bool(deployer.mdict['pki_ds_setup']):

if clone:
deployer.request_ranges(subsystem)
master_config = deployer.import_master_config(subsystem)
else:
master_config = None
Expand Down

0 comments on commit 79e13b5

Please sign in to comment.