summaryrefslogtreecommitdiffstats
path: root/ipawebui/controllers.py
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2010-07-26 11:57:29 -0400
committerRob Crittenden <rcritten@redhat.com>2010-07-29 10:44:56 -0400
commit26b0e8fc9809a4cd9f2f9a2281f0894e2e0f8db2 (patch)
treef2e3084e28fb490477b9336bd3a0cfd7dffea3b2 /ipawebui/controllers.py
parentfd1ff372dce5122f8bc3f7be7b144a92ec1f1bae (diff)
downloadfreeipa-26b0e8fc9809a4cd9f2f9a2281f0894e2e0f8db2.tar.gz
freeipa-26b0e8fc9809a4cd9f2f9a2281f0894e2e0f8db2.tar.xz
freeipa-26b0e8fc9809a4cd9f2f9a2281f0894e2e0f8db2.zip
This patch removes the existing UI functionality, as a prep for adding the Javascript based ui.
Diffstat (limited to 'ipawebui/controllers.py')
-rw-r--r--ipawebui/controllers.py59
1 files changed, 0 insertions, 59 deletions
diff --git a/ipawebui/controllers.py b/ipawebui/controllers.py
deleted file mode 100644
index 42f1477bc..000000000
--- a/ipawebui/controllers.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# Authors: Jason Gerard DeRose <jderose@redhat.com>
-#
-# 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; version 2 only
-#
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-"""
-Controllers.
-"""
-
-from wehjit import util
-from ipalib.compat import json
-
-
-class JSON(object):
- def __init__(self, url, api):
- self.url = url
- self.api = api
-
- def __repr__(self):
- return '%s(url=%r)' % (self.__class__.__name__, self.url)
-
- def __call__(self, env, start):
- util.extract_query(env)
- start('200 OK', [('Content-Type', 'text/plain')])
- for key in sorted(env):
- yield '%s = %r\n' % (key, env[key])
-
-
-class Command(object):
- def __init__(self, url, cmd, api):
- self.url = url
- self.cmd = cmd
- self.api = api
-
- def __repr__(self):
- return '%s(url=%r)' % (self.__class__.__name__, self.url)
-
- def __call__(self, env, start):
- kw = util.extract_query(env)
- ccname = env['KRB5CCNAME']
- self.api.Backend.xmlserver.create_context(ccname)
- result = self.api.Backend.xmlserver.execute(self.cmd.name, **kw)
- start('200 OK', [('Content-Type', 'text/plain')])
- return [
- json.dumps(result, sort_keys=True, indent=4)
- ]