Commit 4b0b6041 authored by Valentin Samir's avatar Valentin Samir

Add keyid to key table

parent 27681967
...@@ -220,11 +220,11 @@ class Zone(object): ...@@ -220,11 +220,11 @@ class Zone(object):
@staticmethod @staticmethod
def _key_table_format(znl, show_creation=False): def _key_table_format(znl, show_creation=False):
format_string = "|{!s:^%d}|{}|" % znl format_string = "|{!s:^%d}|{}|{!s:>5}|" % znl
if show_creation: if show_creation:
format_string += "{created!s:^19}|" format_string += "{created!s:^19}|"
format_string += "{!s:^19}|{!s:^19}|{!s:^19}|{!s:^19}|" format_string += "{!s:^19}|{!s:^19}|{!s:^19}|{!s:^19}|"
separator = ("+" + "-" * znl + "+-+" + ("-" * 19 + "+") * (5 if show_creation else 4)) separator = ("+" + "-" * znl + "+-+-----+" + ("-" * 19 + "+") * (5 if show_creation else 4))
return (format_string, separator) return (format_string, separator)
@classmethod @classmethod
...@@ -232,7 +232,8 @@ class Zone(object): ...@@ -232,7 +232,8 @@ class Zone(object):
(format_string, separator) = cls._key_table_format(znl, show_creation) (format_string, separator) = cls._key_table_format(znl, show_creation)
print(separator) print(separator)
print(format_string.format( print(format_string.format(
"Zone name", "T", "Publish", "Activate", "Inactive", "Delete", created="Created" "Zone name", "T", "KeyId", "Publish", "Activate",
"Inactive", "Delete", created="Created"
)) ))
print(separator) print(separator)
...@@ -242,6 +243,7 @@ class Zone(object): ...@@ -242,6 +243,7 @@ class Zone(object):
print(format_string.format( print(format_string.format(
ksk.zone_name, ksk.zone_name,
"K", "K",
ksk.keyid,
ksk.publish or "N/A", ksk.publish or "N/A",
ksk.activate or "N/A", ksk.activate or "N/A",
ksk.inactive or "N/A", ksk.inactive or "N/A",
...@@ -252,6 +254,7 @@ class Zone(object): ...@@ -252,6 +254,7 @@ class Zone(object):
print(format_string.format( print(format_string.format(
zsk.zone_name, zsk.zone_name,
"Z", "Z",
zsk.keyid,
zsk.publish or "N/A", zsk.publish or "N/A",
zsk.activate or "N/A", zsk.activate or "N/A",
zsk.inactive or "N/A", zsk.inactive or "N/A",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment