mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 08:41:55 -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'))
|
print('%s' % entry.single_value.get('nsds5replicahost'))
|
||||||
|
|
||||||
if verbose:
|
if verbose:
|
||||||
print(" last init status: %s" % entry.single_value.get(
|
initstatus = entry.single_value.get('nsds5replicalastinitstatus')
|
||||||
'nsds5replicalastinitstatus'))
|
if initstatus is not None:
|
||||||
print(" last init ended: %s" % str(
|
print(" last init status: %s" % initstatus)
|
||||||
ipautil.parse_generalized_time(
|
print(" last init ended: %s" % str(
|
||||||
entry.single_value['nsds5replicalastinitend'])))
|
ipautil.parse_generalized_time(
|
||||||
|
entry.single_value['nsds5replicalastinitend'])))
|
||||||
print(" last update status: %s" % entry.single_value.get(
|
print(" last update status: %s" % entry.single_value.get(
|
||||||
'nsds5replicalastupdatestatus'))
|
'nsds5replicalastupdatestatus'))
|
||||||
print(" last update ended: %s" % str(
|
print(" last update ended: %s" % str(
|
||||||
ipautil.parse_generalized_time(
|
ipautil.parse_generalized_time(
|
||||||
entry.single_value['nsds5replicalastupdateend'])))
|
entry.single_value['nsds5replicalastupdateend'])))
|
||||||
|
|
||||||
|
|
||||||
def del_link(realm, replica1, replica2, dirman_passwd, force=False):
|
def del_link(realm, replica1, replica2, dirman_passwd, force=False):
|
||||||
|
|
||||||
repl2 = None
|
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))
|
print('%s: %s' % (entry.single_value.get('nsds5replicahost'), ent_type))
|
||||||
|
|
||||||
if verbose:
|
if verbose:
|
||||||
print(" last init status: %s" % entry.single_value.get(
|
initstatus = entry.single_value.get('nsds5replicalastinitstatus')
|
||||||
'nsds5replicalastinitstatus'))
|
if initstatus is not None:
|
||||||
print(" last init ended: %s" % str(ipautil.parse_generalized_time(
|
print(" last init status: %s" % initstatus)
|
||||||
entry.single_value['nsds5replicalastinitend'])))
|
print(" last init ended: %s" % str(
|
||||||
|
ipautil.parse_generalized_time(
|
||||||
|
entry.single_value['nsds5replicalastinitend'])))
|
||||||
print(" last update status: %s" % entry.single_value.get(
|
print(" last update status: %s" % entry.single_value.get(
|
||||||
'nsds5replicalastupdatestatus'))
|
'nsds5replicalastupdatestatus'))
|
||||||
print(" last update ended: %s" % str(
|
print(" last update ended: %s" % str(
|
||||||
ipautil.parse_generalized_time(
|
ipautil.parse_generalized_time(
|
||||||
entry.single_value['nsds5replicalastupdateend'])))
|
entry.single_value['nsds5replicalastupdateend'])))
|
||||||
|
|
||||||
|
|
||||||
def del_link(realm, replica1, replica2, dirman_passwd, force=False):
|
def del_link(realm, replica1, replica2, dirman_passwd, force=False):
|
||||||
"""
|
"""
|
||||||
Delete a replication agreement from host A to host B.
|
Delete a replication agreement from host A to host B.
|
||||||
|
Loading…
Reference in New Issue
Block a user