Introduce "NTP server" role

This makes IPA servers that publish their NTP services in LDAP searchable by
`server-role-find` and `server-find` command.

The list of active IPA NTP servers will be displayed in to output of `ipa
config-show` command.

https://fedorahosted.org/freeipa/ticket/5815

Reviewed-By: Petr Spacek <pspacek@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Martin Babinsky
2016-06-12 17:03:10 +02:00
committed by Martin Basti
parent 567f00a59c
commit 3e6af238bb
2 changed files with 14 additions and 5 deletions

View File

@@ -239,6 +239,12 @@ class config(LDAPObject):
doc=_('IPA servers configured as certificate authority'),
flags={'virtual_attribute', 'no_create', 'no_update'}
),
Str(
'ntp_server_server*',
label=_('IPA NTP servers'),
doc=_('IPA servers with enabled NTP'),
flags={'virtual_attribute', 'no_create', 'no_update'}
),
Str(
'ca_renewal_master_server?',
label=_('IPA CA renewal master'),
@@ -256,11 +262,9 @@ class config(LDAPObject):
backend = self.api.Backend.serverroles
ca_config = backend.config_retrieve("CA server")
master_config = backend.config_retrieve("IPA master")
entry_attrs.update(ca_config)
entry_attrs.update(master_config)
for role in ("CA server", "IPA master", "NTP server"):
config = backend.config_retrieve(role)
entry_attrs.update(config)
@register()

View File

@@ -566,6 +566,11 @@ role_instances = (
u"KRA server",
component_services=['KRA']
),
ServiceBasedRole(
u"ntp_server_server",
u"NTP server",
component_services=['NTP']
)
)
attribute_instances = (