From: Douglas Bagnall Date: Wed, 18 Nov 2020 23:43:01 +0000 (+1300) Subject: drs_utils: remove unused sendRemoveDsServer() X-Git-Tag: samba-4.14.0rc1~479 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=02c3a66cbec2c670d809b186cacc7d075c16ec54;p=thirdparty%2Fsamba.git drs_utils: remove unused sendRemoveDsServer() The only caller of this was `samba-tool domain demote` which stopped using it in 2015 with commit f121173cbf46fe64746d73adf40015c43d5c55fc. Signed-off-by: Douglas Bagnall Reviewed-by: Noel Power --- diff --git a/python/samba/drs_utils.py b/python/samba/drs_utils.py index 43d1b4a2488..feab89b0d8e 100644 --- a/python/samba/drs_utils.py +++ b/python/samba/drs_utils.py @@ -92,29 +92,6 @@ def sendDsReplicaSync(drsuapiBind, drsuapi_handle, source_dsa_guid, raise drsException("DsReplicaSync failed %s" % estr) -def sendRemoveDsServer(drsuapiBind, drsuapi_handle, server_dsa_dn, domain): - """Send RemoveDSServer request. - - :param drsuapiBind: a drsuapi Bind object - :param drsuapi_handle: a drsuapi handle on the drsuapi connection - :param server_dsa_dn: a DN object of the server's dsa that we want to - demote - :param domain: a DN object of the server's domain - :raise drsException: if any error occur while sending and receiving the - reply for the DsRemoveDSServer - """ - - try: - req1 = drsuapi.DsRemoveDSServerRequest1() - req1.server_dn = str(server_dsa_dn) - req1.domain_dn = str(domain) - req1.commit = 1 - - drsuapiBind.DsRemoveDSServer(drsuapi_handle, 1, req1) - except Exception as estr: - raise drsException("DsRemoveDSServer failed %s" % estr) - - def drs_DsBind(drs): '''make a DsBind call, returning the binding handle''' bind_info = drsuapi.DsBindInfoCtr()