Skip to content

Commit

Permalink
Update pkispawn to use PKIServerFactory
Browse files Browse the repository at this point in the history
The code that creates the PKIInstance object in pkispawn has
been modified to use PKIServerFactory instead.
  • Loading branch information
edewata committed Jul 18, 2023
1 parent 91b928c commit fc19765
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions base/server/python/pki/server/pkispawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,12 +513,6 @@ def main(argv):
else:
break

if not os.path.exists(config.PKI_DEPLOYMENT_SOURCE_ROOT +
"/" + deployer.subsystem_name.lower()):
print("ERROR: " + log.PKI_SUBSYSTEM_NOT_INSTALLED_1 %
deployer.subsystem_name.lower())
sys.exit(1)

if args.pki_verbosity > 1:
logger.warning('The -%s option has been deprecated. Use --debug instead.',
'v' * args.pki_verbosity)
Expand Down Expand Up @@ -546,10 +540,12 @@ def main(argv):
create_master_dictionary(parser)
deployer.init()

instance = pki.server.instance.PKIInstance(
deployer.mdict['pki_instance_name'],
user=deployer.mdict['pki_user'],
group=deployer.mdict['pki_group'])
instance_name = deployer.mdict['pki_instance_name']
instance = pki.server.instance.PKIServerFactory.create(instance_name)
instance.user = deployer.mdict['pki_user']
instance.group = deployer.mdict['pki_group']

instance.load()

if args.log_file:
print('Installation log: %s' % args.log_file)
Expand Down

0 comments on commit fc19765

Please sign in to comment.