ipa-csreplica-manage: disable connect/disconnect/del with domain level > 0

* ipa-csreplica-manage {connect|disconnect} - a user should use 'ipa
topologysegment-*' commands
* ipa-csreplica-manage del - a user should use ipa-replica-manage del

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
Martin Basti
2015-10-30 13:06:21 +01:00
parent 7ef827eeb6
commit 6119dbb9a9
3 changed files with 36 additions and 8 deletions

View File

@@ -39,6 +39,7 @@ from netaddr.core import AddrFormatError
import six
from ipalib import errors, messages
from ipalib.constants import DOMAIN_LEVEL_0
from ipalib.text import _
from ipapython.ssh import SSHPublicKey
from ipapython.dn import DN, RDN
@@ -856,3 +857,7 @@ def detect_dns_zone_realm_type(api, domain):
# If we could not detect type with certainity, return unknown
return 'unknown'
def has_managed_topology(api):
domainlevel = api.Command['domainlevel_get']().get('result', DOMAIN_LEVEL_0)
return domainlevel > DOMAIN_LEVEL_0