Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Samir
bind-dnssec
Commits
4b0b6041
Commit
4b0b6041
authored
Sep 24, 2016
by
Valentin Samir
Browse files
Add keyid to key table
parent
27681967
Changes
1
Hide whitespace changes
Inline
Side-by-side
routine.py
View file @
4b0b6041
...
...
@@ -220,11 +220,11 @@ class Zone(object):
@
staticmethod
def
_key_table_format
(
znl
,
show_creation
=
False
):
format_string
=
"|{!s:^%d}|{}|"
%
znl
format_string
=
"|{!s:^%d}|{}|
{!s:>5}|
"
%
znl
if
show_creation
:
format_string
+=
"{created!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
)
@
classmethod
...
...
@@ -232,7 +232,8 @@ class Zone(object):
(
format_string
,
separator
)
=
cls
.
_key_table_format
(
znl
,
show_creation
)
print
(
separator
)
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
)
...
...
@@ -242,6 +243,7 @@ class Zone(object):
print
(
format_string
.
format
(
ksk
.
zone_name
,
"K"
,
ksk
.
keyid
,
ksk
.
publish
or
"N/A"
,
ksk
.
activate
or
"N/A"
,
ksk
.
inactive
or
"N/A"
,
...
...
@@ -252,6 +254,7 @@ class Zone(object):
print
(
format_string
.
format
(
zsk
.
zone_name
,
"Z"
,
zsk
.
keyid
,
zsk
.
publish
or
"N/A"
,
zsk
.
activate
or
"N/A"
,
zsk
.
inactive
or
"N/A"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment