Skip to content

Commit

Permalink
Rename CustodiaModes.STANDALONE to CustodiaModes.FIRST_MASTER
Browse files Browse the repository at this point in the history
This is related to the DL0 code removal. FIRST_MASTER describes this
mode a lot better.

See: https://pagure.io/freeipa/issue/7689
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
  • Loading branch information
t-woerner committed Sep 12, 2018
1 parent 15bf647 commit 842cb5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ipaserver/install/custodiainstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class CustodiaModes(enum.Enum):
KRA_PEER = 'Custodia KRA peer'
# any master will do
MASTER_PEER = 'Custodia master peer'
# standalone / local instance
STANDALONE = 'Custodia standalone'
# local instance (first master)
FIRST_MASTER = 'Custodia on first master'


def get_custodia_instance(config, mode):
Expand Down Expand Up @@ -64,7 +64,7 @@ def get_custodia_instance(config, mode):
assert isinstance(mode, CustodiaModes)
logger.debug(
"Custodia client for '%r' with promotion %s.",
mode, 'yes' if mode != CustodiaModes.STANDALONE else 'no'
mode, 'yes' if mode != CustodiaModes.FIRST_MASTER else 'no'
)
if mode == CustodiaModes.CA_PEER:
# In case we install replica with CA, prefer CA host as source for
Expand All @@ -74,7 +74,7 @@ def get_custodia_instance(config, mode):
custodia_peer = config.kra_host_name
elif mode == CustodiaModes.MASTER_PEER:
custodia_peer = config.master_host_name
elif mode == CustodiaModes.STANDALONE:
elif mode == CustodiaModes.FIRST_MASTER:
custodia_peer = None
else:
raise RuntimeError("Unknown custodia mode %s", mode)
Expand Down
2 changes: 1 addition & 1 deletion ipaserver/install/server/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ def install(installer):
subject_base=options.subject_base)

custodia = custodiainstance.get_custodia_instance(
options, custodiainstance.CustodiaModes.MASTER_PEER)
options, custodiainstance.CustodiaModes.FIRST_MASTER)
custodia.create_instance()

if setup_ca:
Expand Down

0 comments on commit 842cb5f

Please sign in to comment.