mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 07:33:27 -06:00
ipa-replica-manage: remove "last init status" if it's None.
we remove the "last init status" section in the output of ipa-replica-manage to avoid confusion and show epoch date when status is None Fixes: https://pagure.io/freeipa/issue/7716 Signed-off-by: German Parente <gparente@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Francois Cami <fcami@redhat.com> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
parent
581b7148f4
commit
ef324a7f13
@ -134,17 +134,19 @@ def list_replicas(realm, host, replica, dirman_passwd, verbose):
|
||||
print('%s' % entry.single_value.get('nsds5replicahost'))
|
||||
|
||||
if verbose:
|
||||
print(" last init status: %s" % entry.single_value.get(
|
||||
'nsds5replicalastinitstatus'))
|
||||
print(" last init ended: %s" % str(
|
||||
ipautil.parse_generalized_time(
|
||||
entry.single_value['nsds5replicalastinitend'])))
|
||||
initstatus = entry.single_value.get('nsds5replicalastinitstatus')
|
||||
if initstatus is not None:
|
||||
print(" last init status: %s" % initstatus)
|
||||
print(" last init ended: %s" % str(
|
||||
ipautil.parse_generalized_time(
|
||||
entry.single_value['nsds5replicalastinitend'])))
|
||||
print(" last update status: %s" % entry.single_value.get(
|
||||
'nsds5replicalastupdatestatus'))
|
||||
print(" last update ended: %s" % str(
|
||||
ipautil.parse_generalized_time(
|
||||
entry.single_value['nsds5replicalastupdateend'])))
|
||||
|
||||
|
||||
def del_link(realm, replica1, replica2, dirman_passwd, force=False):
|
||||
|
||||
repl2 = None
|
||||
|
@ -236,16 +236,19 @@ def list_replicas(realm, host, replica, dirman_passwd, verbose, nolookup=False):
|
||||
print('%s: %s' % (entry.single_value.get('nsds5replicahost'), ent_type))
|
||||
|
||||
if verbose:
|
||||
print(" last init status: %s" % entry.single_value.get(
|
||||
'nsds5replicalastinitstatus'))
|
||||
print(" last init ended: %s" % str(ipautil.parse_generalized_time(
|
||||
entry.single_value['nsds5replicalastinitend'])))
|
||||
initstatus = entry.single_value.get('nsds5replicalastinitstatus')
|
||||
if initstatus is not None:
|
||||
print(" last init status: %s" % initstatus)
|
||||
print(" last init ended: %s" % str(
|
||||
ipautil.parse_generalized_time(
|
||||
entry.single_value['nsds5replicalastinitend'])))
|
||||
print(" last update status: %s" % entry.single_value.get(
|
||||
'nsds5replicalastupdatestatus'))
|
||||
print(" last update ended: %s" % str(
|
||||
ipautil.parse_generalized_time(
|
||||
entry.single_value['nsds5replicalastupdateend'])))
|
||||
|
||||
|
||||
def del_link(realm, replica1, replica2, dirman_passwd, force=False):
|
||||
"""
|
||||
Delete a replication agreement from host A to host B.
|
||||
|
Loading…
Reference in New Issue
Block a user