mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 15:40:01 -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,8 +134,9 @@ 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'))
|
||||
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'])))
|
||||
@ -145,6 +146,7 @@ def list_replicas(realm, host, replica, dirman_passwd, verbose):
|
||||
ipautil.parse_generalized_time(
|
||||
entry.single_value['nsds5replicalastupdateend'])))
|
||||
|
||||
|
||||
def del_link(realm, replica1, replica2, dirman_passwd, force=False):
|
||||
|
||||
repl2 = None
|
||||
|
@ -236,9 +236,11 @@ 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(
|
||||
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'))
|
||||
@ -246,6 +248,7 @@ def list_replicas(realm, host, replica, dirman_passwd, verbose, nolookup=False):
|
||||
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