Re: [Freeipa-devel] [PATCH] Code cleanup

2011-02-15 Thread Rob Crittenden

Jan Zelený wrote:

Hi,

I'd like to propose this cleanup patch. I just noticed that the code in these
two files is most likely not used any more (at least I didn't find a place where
it is used).

What do you think? Is it safe to throw it out? Or are there some places which
are still using it? I'd be more than happy to move parts that are used
somewhere else and delete the rest.



I can't find uses of it either, ack, pushed to master.

rob

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH] Code cleanup

2011-02-14 Thread Jan Zelený
Hi,

I'd like to propose this cleanup patch. I just noticed that the code in these 
two files is most likely not used any more (at least I didn't find a place 
where 
it is used).

What do you think? Is it safe to throw it out? Or are there some places which 
are still using it? I'd be more than happy to move parts that are used 
somewhere else and delete the rest.

-- 
Thank you
Jan Zeleny

Red Hat Software Engineer
Brno, Czech Republic
From 3c243e529694b5b9c959cbba798fe3121ebb9237 Mon Sep 17 00:00:00 2001
From: Jan Zeleny 
Date: Mon, 14 Feb 2011 07:17:10 -0500
Subject: [PATCH] Code cleanup

This patch removes two files which seem to be long obsoleted and not
used any more.
---
 ipaserver/plugins/ldapapi.py |  445 -
 ipaserver/servercore.py  |  448 --
 2 files changed, 0 insertions(+), 893 deletions(-)
 delete mode 100644 ipaserver/plugins/ldapapi.py
 delete mode 100644 ipaserver/servercore.py

diff --git a/ipaserver/plugins/ldapapi.py b/ipaserver/plugins/ldapapi.py
deleted file mode 100644
index 1ef84579cd5a5d896f8a259e5c531931339ec3e9..
--- a/ipaserver/plugins/ldapapi.py
+++ /dev/null
@@ -1,445 +0,0 @@
-# Authors:
-#   Rob Crittenden 
-#   Jason Gerard DeRose 
-#
-# Copyright (C) 2008  Red Hat
-# see file 'COPYING' for use and warranty information
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see .
-
-"""
-Backend plugin for LDAP.
-
-This wraps the python-ldap bindings.
-"""
-
-import ldap as _ldap
-from ipalib import api
-from ipalib import errors
-from ipalib.crud import CrudBackend
-from ipaserver import servercore, ipaldap
-import krbV
-
-
-class ldap(CrudBackend):
-"""
-LDAP backend plugin.
-"""
-
-def __init__(self):
-self.dn = _ldap.dn
-super(ldap, self).__init__()
-
-def create_connection(self, ccache):
-if ccache is None:
-raise errors.CCacheError()
-conn = ipaldap.IPAdmin(self.env.ldap_host, self.env.ldap_port)
-principal = krbV.CCache(
-name=ccache, context=krbV.default_context()
-).principal().name
-conn.set_krbccache(ccache, principal)
-return conn
-
-def destroy_connection(self):
-self.conn.unbind_s()
-
-def make_user_dn(self, uid):
-"""
-Construct user dn from uid.
-"""
-return 'uid=%s,%s,%s' % (
-self.dn.escape_dn_chars(uid),
-self.api.env.container_user,
-self.api.env.basedn,
-)
-
-def make_group_dn(self, cn):
-"""
-Construct group dn from cn.
-"""
-return 'cn=%s,%s,%s' % (
-self.dn.escape_dn_chars(cn),
-self.api.env.container_group,
-self.api.env.basedn,
-)
-
-def make_hostgroup_dn(self, cn):
-"""
-Construct group of hosts dn from cn.
-"""
-return 'cn=%s,%s,%s' % (
-self.dn.escape_dn_chars(cn),
-self.api.env.container_hostgroup,
-self.api.env.basedn,
-)
-
-def make_taskgroup_dn(self, cn):
-"""
-Construct group of tasks dn from cn.
-"""
-return 'cn=%s,%s,%s' % (
-self.dn.escape_dn_chars(cn),
-self.api.env.container_taskgroup,
-self.api.env.basedn,
-)
-
-def make_service_dn(self, principal):
-"""
-Construct service principal dn from principal name
-"""
-return 'krbprincipalname=%s,%s,%s' % (
-self.dn.escape_dn_chars(principal),
-self.api.env.container_service,
-self.api.env.basedn,
-)
-
-def make_host_dn(self, hostname):
-"""
-Construct host dn from hostname
-"""
-return 'fqdn=%s,%s,%s' % (
-self.dn.escape_dn_chars(hostname),
-self.api.env.container_host,
-self.api.env.basedn,
-)
-
-def make_application_dn(self, appname):
-"""
-Construct application dn from cn.
-"""
-return 'cn=%s,%s,%s' % (
-self.dn.escape_dn_chars(appname),
-self.api.env.container_applications,
-self.api.env.basedn,
-)
-
-def make_policytemplate_dn(self, appname, uuid):
-"""
-Construct policytemplate dn from appname
-

Re: [Freeipa-devel] [PATCH] Code cleanup: remove unused stuff, take 1.

2010-03-01 Thread Rob Crittenden

Pavel Zuna wrote:
Removes most of the deprecated output code from plugins. "take 1" 
because there might be more patches like this in the near future.


Pavel


ack, pushed to master

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] Code cleanup: remove unused stuff, take 1.

2010-02-25 Thread John Dennis

On 02/25/2010 08:23 AM, Pavel Zuna wrote:

Removes most of the deprecated output code from plugins. "take 1"
because there might be more patches like this in the near future.

Pavel


ACK

I love getting rid of cruft. Thanks!

--
John Dennis 

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH] Code cleanup: remove unused stuff, take 1.

2010-02-25 Thread Pavel Zuna
Removes most of the deprecated output code from plugins. "take 1" because there 
might be more patches like this in the near future.


Pavel


0001-Code-cleanup-remove-unused-stuff-take-1.patch
Description: application/mbox
___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel