backend/server/handlers/app/Makefile | 2
backend/server/handlers/app/__init__.py | 2
backend/server/handlers/app/comps.py | 68 --------------------------------
3 files changed, 1 insertion(+), 71 deletions(-)
New commits:
commit 3f0e38bd210a9dd9ca5adbeec5532bbee6340fa9
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Feb 23 11:14:39 2011 +0100
removed comps from packaging
diff --git a/backend/server/handlers/app/Makefile b/backend/server/handlers/app/Makefile
index a53fc04..9f37ebe 100644
--- a/backend/server/handlers/app/Makefile
+++ b/backend/server/handlers/app/Makefile
@@ -5,7 +5,7 @@
TOP = ../../..
SUBDIR = server/handlers/app
-FILES = __init__ packages channel comps
+FILES = __init__ packages channel
include $(TOP)/Makefile.defs
commit 51a5ca005600b180a493a758d4cec1315129d1da
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Feb 23 11:10:47 2011 +0100
removed unused/unsupported API
diff --git a/backend/server/handlers/app/__init__.py
b/backend/server/handlers/app/__init__.py
index dd714cc..41ee521 100644
--- a/backend/server/handlers/app/__init__.py
+++ b/backend/server/handlers/app/__init__.py
@@ -19,12 +19,10 @@ __all__ = []
import packages
import channel
-import comps
rpcClasses = {
"packages" : packages.Packages,
"channel" : channel.Channel,
- "comps" : comps.Comps,
}
getHandler = None
diff --git a/backend/server/handlers/app/comps.py b/backend/server/handlers/app/comps.py
deleted file mode 100644
index 1220373..0000000
--- a/backend/server/handlers/app/comps.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# Copyright (c) 2008--2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-#
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-# comps mgmt functions
-# This is the XML-RPC response handler for manage-comps tool
-
-
-from spacewalk.common import RPC_Base, rhnFault
-from spacewalk.server import rhnSQL
-from spacewalk.server.importlib.userAuth import UserAuth
-
-
-class Comps(RPC_Base):
-
- def __init__(self):
- RPC_Base.__init__(self)
-
- self.functions = ['addComps']
-
- def _auth(self, username, password):
-
- if not (username and password):
- raise rhnFault(50, "Missing username/password arguments",
- explain=0)
-
- authobj = auth(username, password)
-
- if not authobj:
- raise rhnFault(50, "Invalid username/password arguments",
- explain=0)
- return authobj
-
- def addComps(self, username, password, channel_id, file_name):
- authobj = self._auth(username, password)
- authobj.isChannelAdmin()
-
- sql_stmt = rhnSQL.prepare("""
- insert into rhnChannelComps
- (id, channel_id, relative_filename)
- values (sequence_nextval('rhn_channelcomps_id_seq'),
- :channel_id,
- :relative_filename)
- """)
-
- sql_stmt.execute(channel_id = channel_id,
- relative_filename = file_name)
-
- rhnSQL.commit()
- message = 'Success. Committing transaction.'
- return message
-
-def auth(login, password):
- # Authorize this user
- authobj = UserAuth()
- authobj.auth(login, password)
- return authobj
-