summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Peck <bpeck@redhat.com>2009-05-15 12:11:38 -0400
committerBill Peck <bpeck@redhat.com>2009-05-15 12:11:38 -0400
commit594a1c9f24d5f9fdb7e1a3d43d1712aaf0a43c53 (patch)
tree13e9afbb970e0ae131949175956b816cf91b00fd
parent4933c6b3dd89b10fa7a280501778a01da687da42 (diff)
HUGE re-org
-rw-r--r--.gitignore9
-rw-r--r--Client/Makefile14
-rw-r--r--Client/client.conf32
-rw-r--r--Client/setup.py.in21
-rw-r--r--Client/src/beaker/__init__.py6
-rw-r--r--Client/src/beaker/client/__init__.py12
-rw-r--r--Client/src/beaker/client/commands/__init__.py (renamed from Medusa/medusa/__init__.py)0
-rw-r--r--Client/src/beaker/client/commands/cmd_list_labcontrollers.py21
-rwxr-xr-xClient/src/beaker/client/main.py35
-rw-r--r--LabController/Makefile19
-rw-r--r--LabController/README (renamed from Medusa/lab-controller/README)0
-rw-r--r--LabController/aux/rhts-checkin (renamed from Medusa/lab-controller/aux/rhts-checkin)0
-rw-r--r--LabController/conf.d/beaker-lab-controller.conf (renamed from Medusa/lab-controller/conf.d/beaker.conf)0
-rwxr-xr-xLabController/cron.daily/expire_distros (renamed from Medusa/lab-controller/cron.daily/expire_distros)0
-rw-r--r--LabController/kickstarts/Fedora.ks (renamed from Medusa/lab-controller/kickstarts/Fedora.ks)0
-rw-r--r--LabController/kickstarts/RedHatEnterpriseLinux3.ks (renamed from Medusa/lab-controller/kickstarts/RedHatEnterpriseLinux3.ks)0
-rw-r--r--LabController/kickstarts/RedHatEnterpriseLinux4.ks (renamed from Medusa/lab-controller/kickstarts/RedHatEnterpriseLinux4.ks)0
-rw-r--r--LabController/kickstarts/RedHatEnterpriseLinuxClient5.ks (renamed from Medusa/lab-controller/kickstarts/RedHatEnterpriseLinuxClient5.ks)0
-rw-r--r--LabController/kickstarts/RedHatEnterpriseLinuxServer5.ks (renamed from Medusa/lab-controller/kickstarts/RedHatEnterpriseLinuxServer5.ks)0
-rw-r--r--LabController/snippets/rhts_devices (renamed from Medusa/lab-controller/snippets/rhts_devices)0
-rw-r--r--LabController/snippets/rhts_packages (renamed from Medusa/lab-controller/snippets/rhts_packages)0
-rw-r--r--LabController/snippets/rhts_partitions (renamed from Medusa/lab-controller/snippets/rhts_partitions)0
-rw-r--r--LabController/snippets/rhts_post (renamed from Medusa/lab-controller/snippets/rhts_post)0
-rw-r--r--LabController/snippets/rhts_pre (renamed from Medusa/lab-controller/snippets/rhts_pre)0
-rw-r--r--LabController/snippets/rhts_scsi_ethdevices (renamed from Medusa/lab-controller/snippets/rhts_scsi_ethdevices)0
-rw-r--r--LabController/triggers/install/pre/clear_console_log.trigger (renamed from Medusa/lab-controller/triggers/install/pre/clear_console_log.trigger)0
-rwxr-xr-xLabController/triggers/sync/post/osversion.trigger (renamed from Medusa/lab-controller/triggers/sync/post/osversion.trigger)0
-rw-r--r--Makefile28
-rw-r--r--Medusa/.gitignore6
-rw-r--r--Medusa/COPYING344
-rw-r--r--Medusa/MANIFEST.in23
-rw-r--r--Medusa/Makefile60
-rw-r--r--Medusa/lab-controller/lib/cpioarchive.py179
-rw-r--r--Medusa/medusa.spec291
-rw-r--r--Medusa/medusa/tests/test_controllers.py37
-rw-r--r--Medusa/medusa/tests/test_model.py22
-rw-r--r--Medusa/medusa/tests/xml/i386-memory.xml5
-rw-r--r--Medusa/medusa/tests/xml/i386.xml4
-rw-r--r--Medusa/medusa/tests/xml/memory.xml4
-rw-r--r--Medusa/medusa/tests/xml/negative.xml4
-rw-r--r--Medusa/medusa/tests/xml/requires.xml20
-rwxr-xr-xMedusa/start-medusa.py36
-rw-r--r--Server/Makefile14
-rw-r--r--Server/README (renamed from Medusa/README)0
-rw-r--r--Server/README.txt (renamed from Medusa/README.txt)0
-rw-r--r--Server/apache/beaker-server.conf (renamed from Medusa/apache/medusa.conf)14
-rw-r--r--Server/apache/beaker-server.wsgi (renamed from Medusa/apache/medusa.wsgi)6
-rw-r--r--Server/beaker/__init__.py6
-rw-r--r--Server/beaker/server/BasicAuthTransport.py (renamed from Medusa/medusa/BasicAuthTransport.py)0
-rw-r--r--Server/beaker/server/CSV_import_export.py (renamed from Medusa/medusa/CSV_import_export.py)10
-rw-r--r--Server/beaker/server/__init__.py (renamed from Medusa/medusa/config/__init__.py)0
-rw-r--r--Server/beaker/server/activity.py (renamed from Medusa/medusa/activity.py)10
-rw-r--r--Server/beaker/server/authentication.py (renamed from Medusa/medusa/authentication.py)8
-rw-r--r--Server/beaker/server/breadcrumbs.py (renamed from Medusa/medusa/breadcrumbs.py)0
-rw-r--r--Server/beaker/server/cobbler_utils.py (renamed from Medusa/medusa/cobbler_utils.py)0
-rw-r--r--Server/beaker/server/commands.py (renamed from Medusa/medusa/commands.py)4
-rw-r--r--Server/beaker/server/config/__init__.py (renamed from Medusa/medusa/templates/__init__.py)0
-rw-r--r--Server/beaker/server/config/app.cfg (renamed from Medusa/medusa/config/app.cfg)14
-rw-r--r--Server/beaker/server/config/log.cfg (renamed from Medusa/medusa/config/log.cfg)0
-rw-r--r--Server/beaker/server/controllers.py (renamed from Medusa/medusa/controllers.py)92
-rw-r--r--Server/beaker/server/devdata.sqlite (renamed from Medusa/medusa/tests/__init__.py)0
-rw-r--r--Server/beaker/server/distro.py (renamed from Medusa/medusa/distro.py)16
-rw-r--r--Server/beaker/server/dynwidgets.egg (renamed from Medusa/medusa/dynwidgets.egg)bin9387 -> 9387 bytes
-rw-r--r--Server/beaker/server/group.py (renamed from Medusa/medusa/group.py)14
-rw-r--r--Server/beaker/server/group_acls.txt (renamed from Medusa/medusa/group_acls.txt)0
-rw-r--r--Server/beaker/server/helpers.py (renamed from Medusa/medusa/helpers.py)0
-rw-r--r--Server/beaker/server/identity.py (renamed from Medusa/medusa/identity.py)2
-rw-r--r--Server/beaker/server/json.py (renamed from Medusa/medusa/json.py)0
-rw-r--r--Server/beaker/server/keytypes.py (renamed from Medusa/medusa/keytypes.py)14
-rw-r--r--Server/beaker/server/labcontroller.py (renamed from Medusa/medusa/labcontroller.py)14
-rw-r--r--Server/beaker/server/model.py (renamed from Medusa/medusa/model.py)0
-rwxr-xr-xServer/beaker/server/needpropertyxml.py (renamed from Medusa/medusa/needpropertyxml.py)8
-rw-r--r--Server/beaker/server/power.py (renamed from Medusa/medusa/power.py)12
-rw-r--r--Server/beaker/server/release.py (renamed from Medusa/medusa/release.py)4
-rw-r--r--Server/beaker/server/search.py (renamed from Medusa/medusa/search.py)2
-rw-r--r--Server/beaker/server/static/css/layout-uncompressed.css (renamed from Medusa/medusa/static/css/layout-uncompressed.css)0
-rw-r--r--Server/beaker/server/static/css/style.css (renamed from Medusa/medusa/static/css/style.css)0
-rw-r--r--Server/beaker/server/static/images/corner-bl.png (renamed from Medusa/medusa/static/images/corner-bl.png)bin340 -> 340 bytes
-rw-r--r--Server/beaker/server/static/images/corner-br.png (renamed from Medusa/medusa/static/images/corner-br.png)bin346 -> 346 bytes
-rw-r--r--Server/beaker/server/static/images/corner-tl.png (renamed from Medusa/medusa/static/images/corner-tl.png)bin331 -> 331 bytes
-rw-r--r--Server/beaker/server/static/images/corner-tr.png (renamed from Medusa/medusa/static/images/corner-tr.png)bin374 -> 374 bytes
-rw-r--r--Server/beaker/server/static/images/favicon.ico (renamed from Medusa/medusa/static/images/favicon.ico)bin1081 -> 1081 bytes
-rw-r--r--Server/beaker/server/static/images/header-beaker_logo.png (renamed from Medusa/medusa/static/images/header-beaker_logo.png)bin4762 -> 4762 bytes
-rw-r--r--Server/beaker/server/static/images/header_inner.png (renamed from Medusa/medusa/static/images/header_inner.png)bin37537 -> 37537 bytes
-rw-r--r--Server/beaker/server/static/images/info.png (renamed from Medusa/medusa/static/images/info.png)bin2889 -> 2889 bytes
-rw-r--r--Server/beaker/server/static/images/ok.png (renamed from Medusa/medusa/static/images/ok.png)bin25753 -> 25753 bytes
-rw-r--r--Server/beaker/server/static/images/tg_under_the_hood.png (renamed from Medusa/medusa/static/images/tg_under_the_hood.png)bin4010 -> 4010 bytes
-rw-r--r--Server/beaker/server/static/images/under_the_hood_blue.png (renamed from Medusa/medusa/static/images/under_the_hood_blue.png)bin2667 -> 2667 bytes
-rw-r--r--Server/beaker/server/static/images/wait.gif (renamed from Medusa/medusa/static/images/wait.gif)bin60547 -> 60547 bytes
-rw-r--r--Server/beaker/server/static/javascript/jquery.js (renamed from Medusa/medusa/static/javascript/jquery.js)0
-rw-r--r--Server/beaker/server/static/javascript/power.js (renamed from Medusa/medusa/static/javascript/power.js)0
-rw-r--r--Server/beaker/server/static/javascript/provision.js (renamed from Medusa/medusa/static/javascript/provision.js)0
-rw-r--r--Server/beaker/server/static/javascript/searchbar.js (renamed from Medusa/medusa/static/javascript/searchbar.js)0
-rw-r--r--Server/beaker/server/static/javascript/systemgroups.js (renamed from Medusa/medusa/static/javascript/systemgroups.js)0
-rw-r--r--Server/beaker/server/static/login.html93
-rw-r--r--Server/beaker/server/tag.py (renamed from Medusa/medusa/tag.py)12
-rw-r--r--Server/beaker/server/templates/__init__.py (renamed from Medusa/medusa/tools/__init__.py)0
-rw-r--r--Server/beaker/server/templates/csv_import.kid (renamed from Medusa/medusa/templates/csv_import.kid)0
-rw-r--r--Server/beaker/server/templates/distro.kid (renamed from Medusa/medusa/templates/distro.kid)0
-rw-r--r--Server/beaker/server/templates/distro_tags.kid (renamed from Medusa/medusa/templates/distro_tags.kid)0
-rw-r--r--Server/beaker/server/templates/form-post.kid (renamed from Medusa/medusa/templates/form-post.kid)0
-rw-r--r--Server/beaker/server/templates/form.kid (renamed from Medusa/medusa/templates/form.kid)0
-rw-r--r--Server/beaker/server/templates/form.kid-backup (renamed from Medusa/medusa/templates/form.kid-backup)0
-rw-r--r--Server/beaker/server/templates/grid.kid (renamed from Medusa/medusa/templates/grid.kid)0
-rw-r--r--Server/beaker/server/templates/grid_add.kid (renamed from Medusa/medusa/templates/grid_add.kid)0
-rw-r--r--Server/beaker/server/templates/group_form.kid (renamed from Medusa/medusa/templates/group_form.kid)0
-rw-r--r--Server/beaker/server/templates/login.kid (renamed from Medusa/medusa/templates/login.kid)0
-rw-r--r--Server/beaker/server/templates/master.kid (renamed from Medusa/medusa/templates/master.kid)4
-rw-r--r--Server/beaker/server/templates/my_paginate_datagrid.kid (renamed from Medusa/medusa/templates/my_paginate_datagrid.kid)0
-rw-r--r--Server/beaker/server/templates/system.kid (renamed from Medusa/medusa/templates/system.kid)0
-rw-r--r--Server/beaker/server/templates/system_activity.kid (renamed from Medusa/medusa/templates/system_activity.kid)0
-rw-r--r--Server/beaker/server/templates/system_arches.kid (renamed from Medusa/medusa/templates/system_arches.kid)0
-rw-r--r--Server/beaker/server/templates/system_details.kid (renamed from Medusa/medusa/templates/system_details.kid)0
-rw-r--r--Server/beaker/server/templates/system_form.kid (renamed from Medusa/medusa/templates/system_form.kid)0
-rw-r--r--Server/beaker/server/templates/system_groups.kid (renamed from Medusa/medusa/templates/system_groups.kid)0
-rw-r--r--Server/beaker/server/templates/system_installoptions.kid (renamed from Medusa/medusa/templates/system_installoptions.kid)0
-rw-r--r--Server/beaker/server/templates/system_keys.kid (renamed from Medusa/medusa/templates/system_keys.kid)0
-rw-r--r--Server/beaker/server/templates/system_labinfo.kid (renamed from Medusa/medusa/templates/system_labinfo.kid)0
-rw-r--r--Server/beaker/server/templates/system_notes.kid (renamed from Medusa/medusa/templates/system_notes.kid)0
-rw-r--r--Server/beaker/server/templates/system_power.kid (renamed from Medusa/medusa/templates/system_power.kid)0
-rw-r--r--Server/beaker/server/templates/system_power_action.kid (renamed from Medusa/medusa/templates/system_power_action.kid)0
-rw-r--r--Server/beaker/server/templates/system_provision.kid (renamed from Medusa/medusa/templates/system_provision.kid)0
-rw-r--r--Server/beaker/server/templates/systems.kid (renamed from Medusa/medusa/templates/systems.kid)0
-rw-r--r--Server/beaker/server/tools/__init__.py0
-rwxr-xr-xServer/beaker/server/tools/init.py (renamed from Medusa/medusa/tools/init.py)8
-rw-r--r--Server/beaker/server/user.py (renamed from Medusa/medusa/user.py)14
-rw-r--r--Server/beaker/server/util.py (renamed from Medusa/medusa/util.py)18
-rw-r--r--Server/beaker/server/widgets.py (renamed from Medusa/medusa/widgets.py)36
-rw-r--r--Server/beaker/server/xmlrpccontroller.py (renamed from Medusa/medusa/xmlrpccontroller.py)0
-rw-r--r--Server/contrib/inventory-push-script/i18n.py (renamed from Medusa/contrib/inventory-push-script/i18n.py)0
-rwxr-xr-xServer/contrib/inventory-push-script/legacy-inventory.py (renamed from Medusa/contrib/inventory-push-script/legacy-inventory.py)0
-rwxr-xr-xServer/contrib/inventory-push-script/procfs.py (renamed from Medusa/contrib/inventory-push-script/procfs.py)0
-rwxr-xr-xServer/contrib/inventory-push-script/pushInventory.py (renamed from Medusa/contrib/inventory-push-script/pushInventory.py)0
-rwxr-xr-xServer/contrib/inventory-push-script/runme.sh (renamed from Medusa/contrib/inventory-push-script/runme.sh)0
-rw-r--r--Server/contrib/inventory-push-script/smolt.py (renamed from Medusa/contrib/inventory-push-script/smolt.py)0
-rw-r--r--Server/contrib/inventory-push-script/software.py (renamed from Medusa/contrib/inventory-push-script/software.py)0
-rwxr-xr-xServer/contrib/inventory-push-script/sysctl.py (renamed from Medusa/contrib/inventory-push-script/sysctl.py)0
-rw-r--r--Server/contrib/inventory-push-script/system-serial-number2
-rwxr-xr-xServer/contrib/inventory-push-script/utilist.py (renamed from Medusa/contrib/inventory-push-script/utilist.py)0
-rw-r--r--Server/dev.cfg (renamed from Medusa/dev.cfg)10
-rw-r--r--Server/sample-prod.cfg (renamed from Medusa/sample-prod.cfg)0
-rw-r--r--Server/server.cfg (renamed from Medusa/medusa.cfg)0
-rw-r--r--Server/setup.py.in (renamed from Medusa/setup.py)73
-rw-r--r--Server/test.cfg (renamed from Medusa/test.cfg)0
-rw-r--r--beaker.spec114
-rw-r--r--git_rules.mk31
-rw-r--r--py_rules.mk42
-rw-r--r--rpmspec_rules.mk4
-rw-r--r--scm_rules.mk126
-rw-r--r--upload_rules.mk20
150 files changed, 844 insertions, 1259 deletions
diff --git a/.gitignore b/.gitignore
index c22eb87..9b64d3b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
-*.py[oc]
-devdata.sqlite
-gitpush
+*.pyc
+*.swp
+*.tmp
+dist
+rpm-build
+*.egg-info
diff --git a/Client/Makefile b/Client/Makefile
new file mode 100644
index 0000000..2b27d62
--- /dev/null
+++ b/Client/Makefile
@@ -0,0 +1,14 @@
+# License: GPL v2 or later
+# Copyright Red Hat Inc. 2008
+
+PKGNAME=beaker
+
+all: py-build
+
+include ../rpmspec_rules.mk
+include ../py_rules.mk
+
+build: py-build
+install: py-install
+
+clean: py-clean
diff --git a/Client/client.conf b/Client/client.conf
new file mode 100644
index 0000000..950379e
--- /dev/null
+++ b/Client/client.conf
@@ -0,0 +1,32 @@
+# Hub xml-rpc address.
+HUB_URL = "http://localhost:8080"
+
+# Hub authentication method. Example: krbv, password, worker_key
+#AUTH_METHOD = "krbv"
+AUTH_METHOD = "password"
+
+# Username and password
+#AUTH_USERNAME = ""
+#AUTH_PASSWORD = ""
+
+# A unique worker key used for authentication.
+# I't recommended to use krbv auth in production environment instead.
+#AUTH_WORKER_KEY = ""
+
+# Kerberos principal. If commented, default principal obtained by kinit is used.
+#KRB_PRINCIPAL = "host/$HOSTNAME"
+
+# Kerberos keytab file.
+#KRB_KEYTAB = "/etc/krb5.keytab"
+
+# Kerberos service prefix. Example: host, HTTP
+KRB_SERVICE = "HTTP"
+
+# Kerberos realm. If commented, last two parts of domain name are used. Example: MYDOMAIN.COM.
+KRB_REALM = "EXAMPLE.COM"
+
+# Kerberos credential cache file.
+#KRB_CCACHE = ""
+
+# Kerberos proxy users.
+#KRB_PROXY_USERS = ""
diff --git a/Client/setup.py.in b/Client/setup.py.in
new file mode 100644
index 0000000..2e331ef
--- /dev/null
+++ b/Client/setup.py.in
@@ -0,0 +1,21 @@
+from setuptools import setup, find_packages
+setup(
+ name = "beaker.client",
+ version = "@VERSION@",
+
+ packages=find_packages('src'),
+ package_dir = {'':'src'},
+
+ namespace_packages = ['beaker'],
+
+ data_files = [('/etc/beaker/', ['client.conf']),],
+ package_data = {
+ '/etc/beaker': ['client.conf'],
+ },
+
+ entry_points = {
+ 'console_scripts': (
+ 'beaker-client = beaker.client.main:main',
+ ),
+ }
+)
diff --git a/Client/src/beaker/__init__.py b/Client/src/beaker/__init__.py
new file mode 100644
index 0000000..f48ad10
--- /dev/null
+++ b/Client/src/beaker/__init__.py
@@ -0,0 +1,6 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
diff --git a/Client/src/beaker/client/__init__.py b/Client/src/beaker/client/__init__.py
new file mode 100644
index 0000000..e88ad31
--- /dev/null
+++ b/Client/src/beaker/client/__init__.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+
+import os
+from kobo.client import ClientCommand
+
+class BeakerCommand(ClientCommand):
+ enabled = False
+ user_conf = os.path.expanduser('~/.beaker')
+ if os.path.exists(user_conf):
+ conf_environ_key = user_conf
+ else:
+ conf_environ_key = "/etc/beaker/client.conf"
diff --git a/Medusa/medusa/__init__.py b/Client/src/beaker/client/commands/__init__.py
index e69de29..e69de29 100644
--- a/Medusa/medusa/__init__.py
+++ b/Client/src/beaker/client/commands/__init__.py
diff --git a/Client/src/beaker/client/commands/cmd_list_labcontrollers.py b/Client/src/beaker/client/commands/cmd_list_labcontrollers.py
new file mode 100644
index 0000000..f7b0f7c
--- /dev/null
+++ b/Client/src/beaker/client/commands/cmd_list_labcontrollers.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+
+
+from beaker.client import BeakerCommand
+
+
+class List_LabControllers(BeakerCommand):
+ """list labcontrollers"""
+ enabled = True
+
+
+ def options(self):
+ self.parser.usage = "%%prog %s" % self.normalized_name
+
+
+ def run(self, *args, **kwargs):
+ username = kwargs.pop("username", None)
+ password = kwargs.pop("password", None)
+
+ self.set_hub(username, password)
+ print self.hub.lab_controllers()
diff --git a/Client/src/beaker/client/main.py b/Client/src/beaker/client/main.py
new file mode 100755
index 0000000..7ded295
--- /dev/null
+++ b/Client/src/beaker/client/main.py
@@ -0,0 +1,35 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+
+import sys
+from optparse import Option, IndentedHelpFormatter
+
+from kobo.cli import CommandOptionParser, CommandContainer
+
+
+__all__ = (
+ "main",
+)
+
+
+# register default command plugins
+import beaker.client.commands
+CommandContainer.register_module(beaker.client.commands, prefix="cmd_")
+
+
+def main():
+ command_container = CommandContainer()
+
+ option_list = [
+ Option("--username", help="specify user"),
+ Option("--password", help="specify password"),
+ ]
+
+ formatter = IndentedHelpFormatter(max_help_position=60, width=120)
+ parser = CommandOptionParser(command_container=command_container, default_command="help", formatter=formatter)
+ parser._populate_option_list(option_list, add_help=False)
+ return parser.run()
+
+if __name__ == '__main__':
+ main()
diff --git a/LabController/Makefile b/LabController/Makefile
new file mode 100644
index 0000000..8207532
--- /dev/null
+++ b/LabController/Makefile
@@ -0,0 +1,19 @@
+SNIPPETS = $(shell ls snippets/*)
+KICKSTARTS = $(shell ls kickstarts/*)
+INSTALL = install -D -m644
+
+all:
+ @echo "Nothing to build"
+
+install:
+ $(INSTALL) aux/rhts-checkin $(DESTDIR)/var/www/beaker/rhts-checkin
+ $(INSTALL) conf.d/beaker-lab-controller.conf $(DESTDIR)/etc/httpd.conf.d/beaker-lab-controller.conf
+ $(INSTALL) cron.daily/expire_distros $(DESTDIR)/etc/cron.daily/expire_distros
+ $(INSTALL) triggers/sync/post/osversion.trigger $(DESTDIR)/var/lib/cobbler/triggers/sync/post/osversion.trigger
+ $(INSTALL) triggers/install/pre/clear_console_log.trigger $(DESTDIR)/var/lib/cobbler/triggers/install/pre/clear_console_log.trigger
+ for snippet in $(SNIPPETS); do \
+ $(INSTALL) $$snippet $(DESTDIR)/var/lib/cobbler/$$snippet;\
+ done
+ for kickstart in $(KICKSTARTS); do \
+ $(INSTALL) $$kickstart $(DESTDIR)/var/lib/cobbler/$$kickstart;\
+ done
diff --git a/Medusa/lab-controller/README b/LabController/README
index 0e160ed..0e160ed 100644
--- a/Medusa/lab-controller/README
+++ b/LabController/README
diff --git a/Medusa/lab-controller/aux/rhts-checkin b/LabController/aux/rhts-checkin
index 617a9b2..617a9b2 100644
--- a/Medusa/lab-controller/aux/rhts-checkin
+++ b/LabController/aux/rhts-checkin
diff --git a/Medusa/lab-controller/conf.d/beaker.conf b/LabController/conf.d/beaker-lab-controller.conf
index 9f0f88c..9f0f88c 100644
--- a/Medusa/lab-controller/conf.d/beaker.conf
+++ b/LabController/conf.d/beaker-lab-controller.conf
diff --git a/Medusa/lab-controller/cron.daily/expire_distros b/LabController/cron.daily/expire_distros
index 66fb6c2..66fb6c2 100755
--- a/Medusa/lab-controller/cron.daily/expire_distros
+++ b/LabController/cron.daily/expire_distros
diff --git a/Medusa/lab-controller/kickstarts/Fedora.ks b/LabController/kickstarts/Fedora.ks
index b48b5b9..b48b5b9 100644
--- a/Medusa/lab-controller/kickstarts/Fedora.ks
+++ b/LabController/kickstarts/Fedora.ks
diff --git a/Medusa/lab-controller/kickstarts/RedHatEnterpriseLinux3.ks b/LabController/kickstarts/RedHatEnterpriseLinux3.ks
index 531c94f..531c94f 100644
--- a/Medusa/lab-controller/kickstarts/RedHatEnterpriseLinux3.ks
+++ b/LabController/kickstarts/RedHatEnterpriseLinux3.ks
diff --git a/Medusa/lab-controller/kickstarts/RedHatEnterpriseLinux4.ks b/LabController/kickstarts/RedHatEnterpriseLinux4.ks
index fbdd633..fbdd633 100644
--- a/Medusa/lab-controller/kickstarts/RedHatEnterpriseLinux4.ks
+++ b/LabController/kickstarts/RedHatEnterpriseLinux4.ks
diff --git a/Medusa/lab-controller/kickstarts/RedHatEnterpriseLinuxClient5.ks b/LabController/kickstarts/RedHatEnterpriseLinuxClient5.ks
index 5d7dafa..5d7dafa 100644
--- a/Medusa/lab-controller/kickstarts/RedHatEnterpriseLinuxClient5.ks
+++ b/LabController/kickstarts/RedHatEnterpriseLinuxClient5.ks
diff --git a/Medusa/lab-controller/kickstarts/RedHatEnterpriseLinuxServer5.ks b/LabController/kickstarts/RedHatEnterpriseLinuxServer5.ks
index cb2fd15..cb2fd15 100644
--- a/Medusa/lab-controller/kickstarts/RedHatEnterpriseLinuxServer5.ks
+++ b/LabController/kickstarts/RedHatEnterpriseLinuxServer5.ks
diff --git a/Medusa/lab-controller/snippets/rhts_devices b/LabController/snippets/rhts_devices
index 2daed71..2daed71 100644
--- a/Medusa/lab-controller/snippets/rhts_devices
+++ b/LabController/snippets/rhts_devices
diff --git a/Medusa/lab-controller/snippets/rhts_packages b/LabController/snippets/rhts_packages
index ad413d4..ad413d4 100644
--- a/Medusa/lab-controller/snippets/rhts_packages
+++ b/LabController/snippets/rhts_packages
diff --git a/Medusa/lab-controller/snippets/rhts_partitions b/LabController/snippets/rhts_partitions
index 6a28d86..6a28d86 100644
--- a/Medusa/lab-controller/snippets/rhts_partitions
+++ b/LabController/snippets/rhts_partitions
diff --git a/Medusa/lab-controller/snippets/rhts_post b/LabController/snippets/rhts_post
index ad2f270..ad2f270 100644
--- a/Medusa/lab-controller/snippets/rhts_post
+++ b/LabController/snippets/rhts_post
diff --git a/Medusa/lab-controller/snippets/rhts_pre b/LabController/snippets/rhts_pre
index 904398f..904398f 100644
--- a/Medusa/lab-controller/snippets/rhts_pre
+++ b/LabController/snippets/rhts_pre
diff --git a/Medusa/lab-controller/snippets/rhts_scsi_ethdevices b/LabController/snippets/rhts_scsi_ethdevices
index 4579552..4579552 100644
--- a/Medusa/lab-controller/snippets/rhts_scsi_ethdevices
+++ b/LabController/snippets/rhts_scsi_ethdevices
diff --git a/Medusa/lab-controller/triggers/install/pre/clear_console_log.trigger b/LabController/triggers/install/pre/clear_console_log.trigger
index 2bcc959..2bcc959 100644
--- a/Medusa/lab-controller/triggers/install/pre/clear_console_log.trigger
+++ b/LabController/triggers/install/pre/clear_console_log.trigger
diff --git a/Medusa/lab-controller/triggers/sync/post/osversion.trigger b/LabController/triggers/sync/post/osversion.trigger
index 127ebbc..127ebbc 100755
--- a/Medusa/lab-controller/triggers/sync/post/osversion.trigger
+++ b/LabController/triggers/sync/post/osversion.trigger
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..a847f75
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+# License: GPL v2 or later
+# Copyright Red Hat Inc. 2009
+
+PKGNAME=beaker
+
+SCM_REMOTEREPO_RE = ^ssh://(.*@)?git.fedorahosted.org/git/$(PKGNAME).git$
+UPLOAD_URL = ssh://fedorahosted.org/$(PKGNAME)
+
+SUBDIRS := Client LabController Server
+
+build:
+ for i in $(SUBDIRS); do $(MAKE) -C $$i; done
+
+include rpmspec_rules.mk
+include git_rules.mk
+include upload_rules.mk
+
+install:
+ for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
+
+clean:
+ for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
+
+srpm: $(PKGNAME)-$(PKGVERSION).tar.bz2
+ rpmbuild $(RPMBUILDOPTS) -ts $<
+
+rpm: $(PKGNAME)-$(PKGVERSION).tar.bz2
+ rpmbuild $(RPMBUILDOPTS) -tb $<
diff --git a/Medusa/.gitignore b/Medusa/.gitignore
deleted file mode 100644
index 9b64d3b..0000000
--- a/Medusa/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-*.pyc
-*.swp
-*.tmp
-dist
-rpm-build
-*.egg-info
diff --git a/Medusa/COPYING b/Medusa/COPYING
deleted file mode 100644
index add7251..0000000
--- a/Medusa/COPYING
+++ /dev/null
@@ -1,344 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software
- interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Program does not specify a
-version number of this License, you may choose any version ever
-published by the Free Software Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these
-terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- 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 2 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, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
diff --git a/Medusa/MANIFEST.in b/Medusa/MANIFEST.in
deleted file mode 100644
index b02156c..0000000
--- a/Medusa/MANIFEST.in
+++ /dev/null
@@ -1,23 +0,0 @@
-exclude start-medusa.py
-include apache/medusa.wsgi
-include apache/xmlrpc_auth.wsgi
-include apache/medusa.conf
-include AUTHORS README COPYING ChangeLog
-include *.cfg
-include medusa/templates/*.kid
-include medusa/config/*.cfg
-include medusa/config/*.conf
-include medusa/static/javascript/*
-include medusa/static/css/*
-include medusa/static/images/*
-include medusa.spec
-include lab-controller/*
-include lab-controller/conf.d/*
-include lab-controller/cron.daily/*
-include lab-controller/kickstarts/*
-include lab-controller/lib/*
-include lab-controller/snippets/*
-include lab-controller/triggers/sync/post/*
-include lab-controller/triggers/install/pre/*
-include lab-controller/www/*
-include lab-controller/aux/*
diff --git a/Medusa/Makefile b/Medusa/Makefile
deleted file mode 100644
index 95303fd..0000000
--- a/Medusa/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# $Id: $
-PKGNAME=$(shell python setup.py --name)
-VERSION=$(shell python setup.py --version)
-RPMBUILDOPTS=--define "_topdir ${PWD}/dist" --define "_specdir %{_topdir}" --define "_sourcedir %{_topdir}" --define "_srcrpmdir %{_topdir}" --define "_rpmdir %{_topdir}" --define "_builddir %{_topdir}" --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm"
-
-default: all
-
-all:
- @echo "Nothing to do"
-
-docs:
- epydoc -n medusa -o docs/epydoc -u https://fedorahosted.org/beaker \
- `find medusa -name '*.py'`
-
-test:
- nosetests
-
-todo:
- grep -r --color=auto TODO medusa/ || :
- grep -r --color=auto FIXME medusa/ || :
-
-clean:
- find . -name '*.pyc' | xargs rm -f
- rm -rf medusa-* medusa.egg-info
- rm -rf dist build rpm-build
-
-dist:
- python setup.py sdist --formats=bztar
-
-build:
- python setup.py build
-
-install:
- python setup.py install -f -O1 --skip-build
-
-shell:
- tg-admin --config=medusa.cfg shell
-
-srpm: dist
- rpmbuild $(RPMBUILDOPTS) -ts dist/${PKGNAME}-${VERSION}.tar.bz2
-
-pyflakes:
- find . -name '*.py' | xargs pyflakes
-
-init:
- tg-admin --config=medusa.cfg sql create && medusa/tools/init.py && medusa/tools/dev_init.py && medusa/tools/pickledb.py load medusa-pickledb*
-
-run:
- python start-medusa.py
-
-install-deps:
- su -c "yum install TurboGears python-TurboMail python-fedora python-sqlalchemy koji mash yum-utils git intltool python-bugzilla python-genshi \
-python-crypto python-imaging python-turboflot python-tgcaptcha python-nose.noarch"
-
-rpms: rpm
-
-rpm: dist
- rpmbuild $(RPMBUILDOPTS) -tb dist/${PKGNAME}-${VERSION}.tar.bz2
-
-.PHONY: docs test todo clean dist build install srpm rpm rpms pyflakes shell init run install-deps
diff --git a/Medusa/lab-controller/lib/cpioarchive.py b/Medusa/lab-controller/lib/cpioarchive.py
deleted file mode 100644
index 62d8057..0000000
--- a/Medusa/lab-controller/lib/cpioarchive.py
+++ /dev/null
@@ -1,179 +0,0 @@
-""" cpioarchive: Support for cpio archives
-Copyright (C) 2006 Ignacio Vazquez-Abrams """
-
-""" This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
-
-This library 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 Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """
-
-import atexit
-
-def version():
- """Returns the version number of the module."""
- return '0.1'
-
-class CpioError(Exception):
- """Exception class for cpioarchive exceptions"""
- pass
-
-class CpioEntry(object):
- """Information about a single file in a cpio archive. Provides a file-like
-interface for interacting with the entry."""
- def __init__(self, hdr, cpio, offset):
- """Create a new CpioEntry instance. Internal use only."""
- if len(hdr)<110:
- raise CpioError('cpio header too short')
- if not hdr.startswith('070701'):
- raise CpioError('cpio header invalid')
- self.inode=int(hdr[6:14], 16)
- self.mode=int(hdr[14:22], 16)
- self.uid=int(hdr[22:30], 16)
- self.gid=int(hdr[30:38], 16)
- self.nlinks=int(hdr[38:46], 16)
- self.mtime=int(hdr[46:54], 16)
- self.size=int(hdr[54:62], 16)
- """Size of the file stored in the entry."""
- self.devmajor=int(hdr[62:70], 16)
- self.devminor=int(hdr[70:78], 16)
- self.rdevmajor=int(hdr[78:86], 16)
- self.rdevminor=int(hdr[86:94], 16)
- namesize=int(hdr[94:102], 16)
- self.checksum=int(hdr[102:110], 16)
- if len(hdr)<110+namesize:
- raise CpioError('cpio header too short')
- self.name=hdr[110:110+namesize-1]
- """Name of the file stored in the entry."""
- self.datastart=offset+110+namesize
- self.datastart+=(4-(self.datastart%4))%4
- self.curoffset=0
- self.cpio=cpio
- self.closed=False
-
- def close(self):
- """Close this cpio entry. Further calls to methods will raise an
-exception."""
- self.closed=True
-
- def flush(self):
- """Flush the entry (no-op)."""
- pass
-
- def read(self, size=None):
- """Read data from the entry.
-
-Keyword arguments:
-size -- Number of bytes to read (default: whole entry)
-"""
- if self.closed:
- raise ValueError('read operation on closed file')
- self.cpio.file.seek(self.datastart+self.curoffset, 0)
- if size and size<self.size-self.curoffset:
- ret=self.cpio.file.read(size)
- else:
- ret=self.cpio.file.read(self.size-self.curoffset)
- self.curoffset+=len(ret)
- return ret
-
- def seek(self, offset, whence=0):
- """Move to new position within an entry.
-
-Keyword arguments:
-offset -- Byte count
-whence -- Describes how offset is used.
- 0: From beginning of file
- 1: Forwards from current position
- 2: Backwards from current position
- Other values are ignored.
-"""
- if self.closed:
- raise ValueError('seek operation on closed file')
- if whence==0:
- self.curoffset=offset
- elif whence==1:
- self.curoffset+=offset
- elif whence==2:
- self.curoffset-=offset
- self.curoffset=min(max(0, self.curoffset), self.size)
-
- def tell(self):
- """Get current position within an entry"""
- if self.closed:
- raise ValueError('tell operation on closed file')
- return self.curoffset
-
-class CpioArchive(object):
- @classmethod
- def open(name=None, mode='r', fileobj=None):
- """Open a cpio archive. Defers to CpioArchive.__init__()."""
- return CpioArchive(name, mode, fileobj)
-
- def __init__(self, name=None, mode='r', fileobj=None):
- """Open a cpio archive.
-
-Keyword arguments:
-name -- Filename to open (default: open a file object instead)
-mode -- Filemode to open the archive in (default: read-only)
-fileobj -- File object to use (default: open by filename instead)
-"""
- if not mode=='r':
- raise NotImplementedError()
- self._infos=[]
- if name:
- self._readfile(name)
- self.external=False
- elif fileobj:
- self._readobj(fileobj)
- self.external=True
- else:
- raise CpioError('Oh come on! Pass me something to work with...')
- self._ptr=0
- self.closed=False
- atexit.register(self.close)
-
- def close(self):
- """Close the CpioArchive. Also closes all associated entries."""
- if self.closed:
- return
- [x.close() for x in self._infos]
- self.closed=True
- if not self.external:
- self.file.close()
-
- def next(self):
- """Return the next entry in the archive."""
- if self.closed:
- raise ValueError('next operation on closed file')
- if self._ptr>len(self._infos):
- raise StopIteration()
- ret=self._infos[self._ptr]
- self._ptr+=1
- return ret
-
- def __iter__(self):
- return iter(self._infos)
-
- def _readfile(self, name):
- self._readobj(file(name, 'rb'))
-
- def _readobj(self, fileobj):
- self.file=fileobj
- start=self.file.tell()
- istart=self.file.tell()
- text=self.file.read(110)
- while text:
- namelen=int(text[94:102], 16)
- text+=self.file.read(namelen)
- ce=CpioEntry(text, self, istart)
- if not ce.name=="TRAILER!!!":
- self._infos.append(ce)
- else:
- return
- self.file.seek((4-(self.file.tell()-istart)%4)%4, 1)
- self.file.seek(self._infos[-1].size, 1)
- self.file.seek((4-(self.file.tell()-istart)%4)%4, 1)
-
- istart=self.file.tell()
- text=self.file.read(110)
- else:
- raise CpioError('premature end of headers')
diff --git a/Medusa/medusa.spec b/Medusa/medusa.spec
deleted file mode 100644
index ff50150..0000000
--- a/Medusa/medusa.spec
+++ /dev/null
@@ -1,291 +0,0 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
-
-Name: medusa
-Version: 0.3
-Release: 1%{?dist}
-Summary: Inventory System
-Group: Applications/Internet
-License: GPLv2+
-URL: https://fedorahosted.org/beaker
-Source0: medusa-%{version}.tar.bz2
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildArch: noarch
-BuildRequires: python-setuptools
-BuildRequires: python-setuptools-devel
-BuildRequires: python-devel
-BuildRequires: TurboGears
-
-
-
-%description
-To Be Filled in
-
-
-%package server
-Summary: Server component of Medusa
-Group: Applications/Internet
-Requires: TurboGears
-Requires: intltool
-Requires: python-decorator
-Requires: python-xmltramp
-Requires: python-ldap
-Requires: mod_wsgi
-Requires: python-tgexpandingformwidget
-Requires: httpd
-Requires: python-krbV
-
-
-%package lab-controller
-Summary: Lab Controller xmlrpc server
-Group: Applications/Internet
-Requires: python
-Requires: mod_python
-Requires: httpd
-Requires: cobbler >= 1.4
-Requires: yum-utils
-Requires: /sbin/fenced
-Requires: telnet
-Requires: python-cpio
-
-
-%description server
-To Be Filled in - Server Side..
-
-
-%description lab-controller
-This is the interface to link Medusa and Cobbler together. Mostly provides
-snippets and kickstarts.
-
-
-%prep
-%setup -q
-rm -rf medusa/tests medusa/tools/test-medusa.py
-
-%build
-%{__python} setup.py build --install-data=%{_datadir}
-
-
-%install
-%{__rm} -rf %{buildroot}
-%{__python} setup.py install -O1 --skip-build \
- --install-data=%{_datadir} --root %{buildroot}
-
-# Legacy support.
-ln -s RedHatEnterpriseLinux3.ks %{buildroot}/var/lib/cobbler/kickstarts/rhel3.ks
-ln -s RedHatEnterpriseLinux4.ks %{buildroot}/var/lib/cobbler/kickstarts/rhel4.ks
-ln -s RedHatEnterpriseLinuxServer5.ks %{buildroot}/var/lib/cobbler/kickstarts/rhel5.ks
-ln -s Fedora.ks %{buildroot}/var/lib/cobbler/kickstarts/fedora.ks
-ln -s Fedora.ks %{buildroot}/var/lib/cobbler/kickstarts/Fedoradevelopment.ks
-
-
-%clean
-%{__rm} -rf %{buildroot}
-
-
-%files server
-%defattr(-,root,root,-)
-%doc README COPYING
-%{python_sitelib}/%{name}/
-%{_bindir}/start-%{name}
-%{_bindir}/%{name}-init
-%config(noreplace) %{_sysconfdir}/httpd/conf.d/medusa.conf
-%attr(-,apache,root) %{_datadir}/%{name}
-%attr(-,apache,root) %config(noreplace) %{_sysconfdir}/medusa/*
-%{python_sitelib}/%{name}-%{version}-py%{pyver}.egg-info/
-%dir %{_localstatedir}/lib/medusa
-%attr(-,apache,root) %dir %{_localstatedir}/log/medusa
-
-
-%files lab-controller
-%defattr(-,root,root,-)
-%doc lab-controller/README
-%config(noreplace) %{_sysconfdir}/httpd/conf.d/beaker.conf
-%{_sysconfdir}/cron.daily/expire_distros
-/var/lib/cobbler/triggers/sync/post/osversion.trigger
-/var/lib/cobbler/triggers/install/pre/clear_console_log.trigger
-/var/lib/cobbler/snippets/*
-/var/lib/cobbler/kickstarts/*
-/var/www/beaker/rhts-checkin
-
-%changelog
-* Wed May 13 2009 Bill Peck <bpeck@redhat.com> - 0.3-1
-- Implemented authentication methods for xmlrpc login using kobo
-* Fri May 01 2009 Bill Peck <bpeck@redhat.com> - 0.2-103
-- Updated medusa-init to allow for admin user to be created based on
- command line options
-- removed medusa-devinit. Doesn't seem needed, pass --config to medusa-init
-* Thu Apr 30 2009 Bill Peck <bpeck@redhat.com> - 0.2-100
-- Begining user prefs. Only email update right now
-- Remote jobs will look up via email address as well.
-* Mon Apr 27 2009 Bill Peck <bpeck@redhat.com> - 0.2-96
-- Implement more csv export/import. key values, groups.
-- Only admins can share a system for the general pool
-- fixed legacy push
-* Tue Apr 21 2009 Bill Peck <bpeck@redhat.com> - 0.2-91
-- Supports csv export/import now.
-- Shows arch on main page now
-- simple search added
-- shortcuts for filtering by Machine types
-- allow alpha chars in osversion
-* Wed Apr 08 2009 Bill Peck <bpeck@redhat.com> - 0.2-88
-- Updated kickstarts/snippets to be more robust and easier to read.
-- included custom snippets directories for per_system.
-* Tue Apr 07 2009 Bill Peck <bpeck@redhat.com> - 0.2-87
-- Patches from jlaska to cleanup spec file.
-* Mon Apr 06 2009 Bill Peck <bpeck@redhat.com> - 0.2-86
-- Use .discinfo if present for family/update.
-* Thu Apr 02 2009 Bill Peck <bpeck@redhat.com> - 0.2-85
-- Look for more specific kickstarts if available.
-* Wed Apr 01 2009 Bill Peck <bpeck@redhat.com> - 0.2-82
-- labinfo exposed to webui.
-- Loaning logic implemented.
-- Loaning ui implemented.
-* Tue Mar 17 2009 Bill Peck <bpeck@redhat.com> - 0.2-81
-- Fix kerberos auth to be more generic. any apache auth is possible now.
-- added laptop system type.
-* Wed Mar 11 2009 Bill Peck <bpeck@redhat.com> - 0.2-80
-- Fix osversion trigger to look in correct release file.
-* Tue Mar 10 2009 Bill Peck <bpeck@redhat.com> - 0.2-79
-- fix lab controller api path.
-* Tue Mar 10 2009 Bill Peck <bpeck@redhat.com> - 0.2-78
-- try both api paths to cobbler
-* Mon Mar 09 2009 Bill Peck <bpeck@redhat.com> - 0.2-77
-- use http for local socket connection
-- use beaker path under www instead of cobbler
-* Fri Mar 06 2009 Bill Peck <bpeck@redhat.com> - 0.2-76
-- xmlrpc methods for adding/removing distros
-- don't use key in rhel5 installs unless passed one.
-* Fri Feb 27 2009 Bill Peck <bpeck@redhat.com> - 0.2-74
-- Require admin permissions on lab controller methods
-- update default kickstarts to be closer to default installs
-- update default kickstarts to be interactive if issued through pxe menu.
-* Mon Feb 23 2009 Bill Peck <bpeck@redhat.com> - 0.2-73
-- Added clear console log trigger
-* Sun Feb 22 2009 Bill Peck <bpeck@redhat.com> - 0.2-72
-- Added <cpu_count/> and <memory/> to XMl querying to speed up
- legacy access. Two many self joins on key_table causes performance
- problems with mysql.
-* Thu Feb 19 2009 Bill Peck <bpeck@redhat.com> - 0.2-71
-- minor update for legacy push
-* Wed Feb 18 2009 Bill Peck <bpeck@redhat.com> - 0.2-70
-- pass kickstart file through if given one
-* Wed Feb 18 2009 Bill Peck <bpeck@redhat.com> - 0.2-67
-- fix traceback in system_return activity
-* Wed Feb 18 2009 Bill Peck <bpeck@redhat.com> - 0.2-66
-- Check for error in distro pick
-* Wed Feb 18 2009 Bill Peck <bpeck@redhat.com> - 0.2-65
-- Fix virt filter to work with False
-* Wed Feb 18 2009 Bill Peck <bpeck@redhat.com> - 0.2-64
-- Allow logging to be turned off for system_return
-- filter distros by virt.
-* Mon Feb 16 2009 Bill Peck <bpeck@redhat.com> - 0.2-63
-- broke key_values into separate int and string tables.
-- hopefully fixed available/free queries
-
-* Fri Feb 13 2009 Bill Peck <bpeck@redhat.com> - 0.2-62
-- try number 2 on favicon.ico
-
-* Fri Feb 13 2009 Bill Peck <bpeck@redhat.com> - 0.2-61
-- added favicon.ico and fixed group lookup.
-
-* Thu Feb 12 2009 Bill Peck <bpeck@redhat.com> - 0.2-60
-- added robots.txt
-
-* Thu Feb 12 2009 Bill Peck <bpeck@redhat.com> - 0.2-59
-- fix for importing tree info
-
-* Wed Feb 11 2009 Bill Peck <bpeck@redhat.com> - 0.2-58
-- fix for system history
-
-* Wed Feb 11 2009 Bill Peck <bpeck@redhat.com> - 0.2-57
-- added mac_address tracking for virt machines
-- also track tree_path with distros
-
-* Wed Feb 11 2009 Bill Peck <bpeck@redhat.com> - 0.2-56
-- fix permissions on expire_distros
-
-* Tue Feb 10 2009 Bill Peck <bpeck@redhat.com> - 0.2-55
-- fix system query
-
-* Tue Feb 10 2009 Bill Peck <bpeck@redhat.com> - 0.2-54
-- fix logic in system.can_share()
-- fix user sorting on main page
-- allow searchbar to work for mine/available/free pages
-
-* Tue Feb 10 2009 Bill Peck <bpeck@redhat.com> - 0.2-53
-- rescan now pulls all distros, will look into caching later.
-
-* Tue Feb 10 2009 Bill Peck <bpeck@redhat.com> - 0.2-52
-- fixed delete logic, still haven't enabled delete by default
-- added rescan method for lab controllers
-- attempt to fix sorting by username
-
-* Thu Feb 05 2009 Bill Peck <bpeck@redhat.com> - 0.2-51
-- fix scanning for deleted distros
-
-* Thu Feb 05 2009 Bill Peck <bpeck@redhat.com> - 0.2-50
-- catch bad hostnames before trying to provision
-
-* Thu Feb 05 2009 Bill Peck <bpeck@redhat.com> - 0.2-49
-- added rhts watchdog notification to rhts_pre snippet.
-
-* Thu Feb 05 2009 Bill Peck <bpeck@redhat.com> - 0.2-48
-- Fix mispelling on BOOTARGS regex
-
-* Thu Feb 05 2009 Bill Peck <bpeck@redhat.com> - 0.2-47
-- Paper bag fix
-
-* Thu Feb 05 2009 Bill Peck <bpeck@redhat.com> - 0.2-44
-- Parse InstallPackage commands
-
-* Thu Feb 05 2009 Bill Peck <bpeck@redhat.com> - 0.2-43
-- system activity for system_return was not being attached to system logs
-
-* Thu Feb 05 2009 Bill Peck <bpeck@redhat.com> - 0.2-42
-- Disable expire code in labcontroller
-
-* Thu Feb 05 2009 Bill Peck <bpeck@redhat.com> - 0.2-41
-- Disable expire distros script for now.
-
-* Wed Feb 04 2009 Bill Peck <bpeck@redhat.com> - 0.2-40
-- Match existing rhts legacy repo name
-
-* Wed Feb 04 2009 Bill Peck <bpeck@redhat.com> - 0.2-39
-- Logging of returned systems
-- return arch for distro pick
-- pull runtests.sh for legacy rhts
-
-* Wed Feb 04 2009 Bill Peck <bpeck@redhat.com> - 0.2-38
-- Added system_return method
-
-* Tue Feb 03 2009 Bill Peck <bpeck@redhat.com> - 0.2-37
-- Fixed bogus repo in rhts_post snippet
-
-* Tue Feb 03 2009 Bill Peck <bpeck@redhat.com> - 0.2-36
-- Fixed netboot return code to match what legacy rhts expects
-
-* Tue Feb 03 2009 Bill Peck <bpeck@redhat.com> - 0.2-35
-- Fixed system_pick and system_validate to return a host even when its busy.
-
-* Tue Feb 03 2009 Bill Peck <bpeck@redhat.com> - 0.2-34
-- Added system filter method
-- fixed user object in method system_pick
-
-* Tue Feb 03 2009 Bill Peck <bpeck@redhat.com> - 0.2-33
-- Added system type filter method
-
-* Tue Feb 03 2009 Bill Peck <bpeck@redhat.com> - 0.2-32
-- Added system_validate method
-
-* Tue Feb 03 2009 Bill Peck <bpeck@redhat.com> - 0.2-31
-- Updates for RHTS integration, lab controller selection.
-
-* Tue Feb 03 2009 Bill Peck <bpeck@redhat.com> - 0.2-30
-- Fixes for importing rawhide
-
-* Wed Jan 07 2009 Bill Peck <bpeck@redhat.com> - 0.2-1
-- Added lab-controller sub package
-
-* Mon Dec 08 2008 Bill Peck <bpeck@redhat.com> - 0.1-1
-- Initial Spec file Created.
diff --git a/Medusa/medusa/tests/test_controllers.py b/Medusa/medusa/tests/test_controllers.py
deleted file mode 100644
index f852da7..0000000
--- a/Medusa/medusa/tests/test_controllers.py
+++ /dev/null
@@ -1,37 +0,0 @@
-import unittest
-import turbogears
-from turbogears import testutil
-from medusa.controllers import Root
-import cherrypy
-
-cherrypy.root = Root()
-
-class TestPages(unittest.TestCase):
-
- def setUp(self):
- turbogears.startup.startTurboGears()
-
- def tearDown(self):
- """Tests for apps using identity need to stop CP/TG after each test to
- stop the VisitManager thread.
- See http://trac.turbogears.org/turbogears/ticket/1217 for details.
- """
- turbogears.startup.stopTurboGears()
-
- def test_method(self):
- "the index method should return a string called now"
- import types
- result = testutil.call(cherrypy.root.index)
- assert type(result["now"]) == types.StringType
-
- def test_indextitle(self):
- "The indexpage should have the right title"
- testutil.createRequest("/")
- response = cherrypy.response.body[0].lower()
- assert "<title>welcome to turbogears</title>" in response
-
- def test_logintitle(self):
- "login page should have the right title"
- testutil.createRequest("/login")
- response = cherrypy.response.body[0].lower()
- assert "<title>login</title>" in response
diff --git a/Medusa/medusa/tests/test_model.py b/Medusa/medusa/tests/test_model.py
deleted file mode 100644
index 93dd890..0000000
--- a/Medusa/medusa/tests/test_model.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# If your project uses a database, you can set up database tests
-# similar to what you see below. Be sure to set the db_uri to
-# an appropriate uri for your testing database. sqlite is a good
-# choice for testing, because you can use an in-memory database
-# which is very fast.
-
-from turbogears import testutil, database
-# from medusa.model import YourDataClass, User
-
-# database.set_db_uri("sqlite:///:memory:")
-
-# class TestUser(testutil.DBTest):
-# def get_model(self):
-# return User
-# def test_creation(self):
-# "Object creation should set the name"
-# obj = User(user_name = "creosote",
-# email_address = "spam@python.not",
-# display_name = "Mr Creosote",
-# password = "Wafer-thin Mint")
-# assert obj.display_name == "Mr Creosote"
-
diff --git a/Medusa/medusa/tests/xml/i386-memory.xml b/Medusa/medusa/tests/xml/i386-memory.xml
deleted file mode 100644
index bb81144..0000000
--- a/Medusa/medusa/tests/xml/i386-memory.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<host>
- <key_value key='ARCH' op='=' value='i386'/>
- <key_value key='MEMORY' op='>=' value='2048'/>
- <power value='True'/>
-</host>
diff --git a/Medusa/medusa/tests/xml/i386.xml b/Medusa/medusa/tests/xml/i386.xml
deleted file mode 100644
index 781e732..0000000
--- a/Medusa/medusa/tests/xml/i386.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<host>
- <key_value key='ARCH' op='=' value='i386'/>
- <power value='True'/>
-</host>
diff --git a/Medusa/medusa/tests/xml/memory.xml b/Medusa/medusa/tests/xml/memory.xml
deleted file mode 100644
index 28ce1d1..0000000
--- a/Medusa/medusa/tests/xml/memory.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<host>
- <key_value key='MEMORY' op='>=' value='2048'/>
- <power value='True'/>
-</host>
diff --git a/Medusa/medusa/tests/xml/negative.xml b/Medusa/medusa/tests/xml/negative.xml
deleted file mode 100644
index 4305d71..0000000
--- a/Medusa/medusa/tests/xml/negative.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<host>
- <key_value key='MACHINE' op='!=' value='dell-pe700-01.rhts.bos.redhat.com'/>
- <power value='True'/>
-</host>
diff --git a/Medusa/medusa/tests/xml/requires.xml b/Medusa/medusa/tests/xml/requires.xml
deleted file mode 100644
index f095df2..0000000
--- a/Medusa/medusa/tests/xml/requires.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<recipe>
- <distro>
- <and>
- <distro_arch op='=' value='i386'/>
- <distro_family op='=' value='rhel5'/>
-<!-- <distro_tag op='=' value='released'/> -->
- </and>
- </distro>
- <host>
- <or>
- <and>
- <key_value key='MACHINE' op='!=' value='dell-pe700-01.rhts.bos.redhat.com'/>
- <key_value key='MACHINE' op='!=' value='hp-xw4550-02.lab.bos.redhat.com'/>
- </and>
- <key_value key='ARCH' op='=' value='i386'/>
- </or>
- <key_value key='MEMORY' op='>=' value='2048'/>
- <power value='True'/>
- </host>
-</recipe>
diff --git a/Medusa/start-medusa.py b/Medusa/start-medusa.py
deleted file mode 100755
index 25ea5e3..0000000
--- a/Medusa/start-medusa.py
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/python
-# Medusa - Medusa is the Inventory piece of the Beaker project
-#
-# Copyright (C) 2008 bpeck@redhat.com
-#
-# 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 2 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-# -*- coding: utf-8 -*-
-"""Start script for the medusa TurboGears project.
-
-This script is only needed during development for running from the project
-directory. When the project is installed, easy_install will create a
-proper start script.
-"""
-
-import sys
-from medusa.commands import start, ConfigurationError
-
-if __name__ == "__main__":
- try:
- start()
- except ConfigurationError, exc:
- sys.stderr.write(str(exc))
- sys.exit(1)
diff --git a/Server/Makefile b/Server/Makefile
new file mode 100644
index 0000000..2b27d62
--- /dev/null
+++ b/Server/Makefile
@@ -0,0 +1,14 @@
+# License: GPL v2 or later
+# Copyright Red Hat Inc. 2008
+
+PKGNAME=beaker
+
+all: py-build
+
+include ../rpmspec_rules.mk
+include ../py_rules.mk
+
+build: py-build
+install: py-install
+
+clean: py-clean
diff --git a/Medusa/README b/Server/README
index a5174c5..a5174c5 100644
--- a/Medusa/README
+++ b/Server/README
diff --git a/Medusa/README.txt b/Server/README.txt
index 42c2e2f..42c2e2f 100644
--- a/Medusa/README.txt
+++ b/Server/README.txt
diff --git a/Medusa/apache/medusa.conf b/Server/apache/beaker-server.conf
index d1521b1..bdf4d54 100644
--- a/Medusa/apache/medusa.conf
+++ b/Server/apache/beaker-server.conf
@@ -1,24 +1,24 @@
-Alias /static /usr/share/medusa/static
+Alias /static /usr/share/beaker/static
-WSGIDaemonProcess medusa user=apache group=apache display-name=medusa maximum-requests=1000 processes=4 threads=2
+WSGIDaemonProcess beaker user=apache group=apache display-name=beaker maximum-requests=1000 processes=4 threads=2
WSGISocketPrefix run/wsgi
WSGIRestrictStdout On
WSGIRestrictSignal Off
WSGIPythonOptimize 2
WSGIPassAuthorization On
-WSGIScriptAlias / /usr/share/medusa/medusa.wsgi
+WSGIScriptAlias / /usr/share/beaker/beaker-server.wsgi
-<Directory /usr/share/medusa>
- WSGIApplicationGroup medusa
- WSGIProcessGroup medusa
+<Directory /usr/share/beaker>
+ WSGIApplicationGroup beaker
+ WSGIProcessGroup beaker
Order deny,allow
Allow from all
</Directory>
# Authentication settings for kerberos logins..
# Uncomment and customize for your environment
-#<Location ~ "\/medusa\/(login|mine|available|free|labcontrollers|usersystems|groups|powertypes|keytypes)">
+#<Location ~ "\/(login|mine|available|free|labcontrollers|usersystems|groups|powertypes|keytypes)">
# AuthType Kerberos
# AuthName "Inventory Web UI"
# KrbMethodNegotiate on
diff --git a/Medusa/apache/medusa.wsgi b/Server/apache/beaker-server.wsgi
index 3b11387..24a06ba 100644
--- a/Medusa/apache/medusa.wsgi
+++ b/Server/apache/beaker-server.wsgi
@@ -11,15 +11,15 @@ import cherrypy
import cherrypy._cpwsgi
import turbogears
-from medusa.util import load_config
+from beaker.server.util import load_config
load_config()
turbogears.config.update({'global': {'server.environment': 'production'}})
turbogears.config.update({'global': {'autoreload.on': False}})
turbogears.config.update({'global': {'server.log_to_screen': False}})
-import medusa.controllers
-cherrypy.root = medusa.controllers.Root()
+import beaker.server.controllers
+cherrypy.root = beaker.server.controllers.Root()
if cherrypy.server.state == 0:
atexit.register(cherrypy.server.stop)
diff --git a/Server/beaker/__init__.py b/Server/beaker/__init__.py
new file mode 100644
index 0000000..f48ad10
--- /dev/null
+++ b/Server/beaker/__init__.py
@@ -0,0 +1,6 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
diff --git a/Medusa/medusa/BasicAuthTransport.py b/Server/beaker/server/BasicAuthTransport.py
index 4f33007..4f33007 100644
--- a/Medusa/medusa/BasicAuthTransport.py
+++ b/Server/beaker/server/BasicAuthTransport.py
diff --git a/Medusa/medusa/CSV_import_export.py b/Server/beaker/server/CSV_import_export.py
index ea16943..5085a46 100644
--- a/Medusa/medusa/CSV_import_export.py
+++ b/Server/beaker/server/CSV_import_export.py
@@ -4,8 +4,8 @@ from turbogears import identity, redirect
from cherrypy import request, response
from tg_expanding_form_widget.tg_expanding_form_widget import ExpandingForm
from kid import Element
-from medusa.xmlrpccontroller import RPCRoot
-from medusa.helpers import *
+from beaker.server.xmlrpccontroller import RPCRoot
+from beaker.server.helpers import *
from tempfile import NamedTemporaryFile
from cherrypy.lib.cptools import serve_file
@@ -54,7 +54,7 @@ class CSV(RPCRoot):
submit_text = _(u'Export CSV'),
)
- @expose(template='medusa.templates.form')
+ @expose(template='beaker.server.templates.form')
def index(self, **kw):
return dict(
form = self.exportform,
@@ -63,7 +63,7 @@ class CSV(RPCRoot):
value = kw,
)
- @expose(template='medusa.templates.form-post')
+ @expose(template='beaker.server.templates.form-post')
def csv_import(self, **kw):
return dict(
form = self.importform,
@@ -82,7 +82,7 @@ class CSV(RPCRoot):
name="%s.csv" % csv_type)
- @expose(template='medusa.templates.csv_import')
+ @expose(template='beaker.server.templates.csv_import')
def action_import(self, csv_file, *args, **kw):
"""
TurboGears method to import data from csv
diff --git a/Medusa/medusa/config/__init__.py b/Server/beaker/server/__init__.py
index e69de29..e69de29 100644
--- a/Medusa/medusa/config/__init__.py
+++ b/Server/beaker/server/__init__.py
diff --git a/Medusa/medusa/activity.py b/Server/beaker/server/activity.py
index bf7c124..ed2467c 100644
--- a/Medusa/medusa/activity.py
+++ b/Server/beaker/server/activity.py
@@ -5,14 +5,14 @@ from turbogears import identity, redirect
from cherrypy import request, response
from tg_expanding_form_widget.tg_expanding_form_widget import ExpandingForm
from kid import Element
-from medusa.xmlrpccontroller import RPCRoot
-from medusa.helpers import *
+from beaker.server.xmlrpccontroller import RPCRoot
+from beaker.server.helpers import *
import cherrypy
-# from medusa import json
+# from beaker.server import json
# import logging
-# log = logging.getLogger("medusa.controllers")
+# log = logging.getLogger("beaker.server.controllers")
#import model
from model import *
import string
@@ -23,7 +23,7 @@ class Activities(RPCRoot):
# For XMLRPC methods in this class.
exposed = False
- @expose(template="medusa.templates.grid")
+ @expose(template="beaker.server.templates.grid")
@paginate('list',default_order='-created', max_limit=50, limit=50,allow_limit_override=True)
def index(self):
activity = Activity.all().outerjoin('user')
diff --git a/Medusa/medusa/authentication.py b/Server/beaker/server/authentication.py
index da1fb2a..5aca355 100644
--- a/Medusa/medusa/authentication.py
+++ b/Server/beaker/server/authentication.py
@@ -5,8 +5,8 @@ from turbogears import identity, redirect
from cherrypy import request, response
from tg_expanding_form_widget.tg_expanding_form_widget import ExpandingForm
from kid import Element
-from medusa.xmlrpccontroller import RPCRoot
-from medusa.helpers import *
+from beaker.server.xmlrpccontroller import RPCRoot
+from beaker.server.helpers import *
from xmlrpclib import ProtocolError
from turbogears.identity import IdentityException
@@ -14,9 +14,9 @@ import cherrypy
import time
import re
-# from medusa import json
+# from beaker.server import json
# import logging
-# log = logging.getLogger("medusa.controllers")
+# log = logging.getLogger("beaker.server.controllers")
#import model
from model import *
import string
diff --git a/Medusa/medusa/breadcrumbs.py b/Server/beaker/server/breadcrumbs.py
index b57c08a..b57c08a 100644
--- a/Medusa/medusa/breadcrumbs.py
+++ b/Server/beaker/server/breadcrumbs.py
diff --git a/Medusa/medusa/cobbler_utils.py b/Server/beaker/server/cobbler_utils.py
index c20d6f0..c20d6f0 100644
--- a/Medusa/medusa/cobbler_utils.py
+++ b/Server/beaker/server/cobbler_utils.py
diff --git a/Medusa/medusa/commands.py b/Server/beaker/server/commands.py
index d54c8bc..27eb52f 100644
--- a/Medusa/medusa/commands.py
+++ b/Server/beaker/server/commands.py
@@ -30,7 +30,7 @@ pkg_resources.require("SQLAlchemy>=0.3.10")
import cherrypy
import turbogears
-from medusa.util import load_config
+from beaker.server.util import load_config
cherrypy.lowercase_api = True
@@ -45,5 +45,5 @@ def start():
else:
load_config()
- from medusa.controllers import Root
+ from beaker.server.controllers import Root
turbogears.start_server(Root())
diff --git a/Medusa/medusa/templates/__init__.py b/Server/beaker/server/config/__init__.py
index e69de29..e69de29 100644
--- a/Medusa/medusa/templates/__init__.py
+++ b/Server/beaker/server/config/__init__.py
diff --git a/Medusa/medusa/config/app.cfg b/Server/beaker/server/config/app.cfg
index 863bad7..28cb950 100644
--- a/Medusa/medusa/config/app.cfg
+++ b/Server/beaker/server/config/app.cfg
@@ -78,8 +78,8 @@ visit.timeout=120
visit.manager="sqlalchemy"
# Database class to use for visit tracking
-visit.saprovider.model = "medusa.model.Visit"
-identity.saprovider.model.visit = "medusa.model.VisitIdentity"
+visit.saprovider.model = "beaker.server.model.Visit"
+identity.saprovider.model.visit = "beaker.server.model.VisitIdentity"
# IDENTITY
# General configuration of the TurboGears Identity management module
@@ -119,9 +119,9 @@ identity.force_external_redirect=False
# The classes you wish to use for your Identity model. Remember to not use reserved
# SQL keywords for class names (at least unless you specify a different table
# name using sqlmeta).
-identity.saprovider.model.user="medusa.model.User"
-identity.saprovider.model.group="medusa.model.Group"
-identity.saprovider.model.permission="medusa.model.Permission"
+identity.saprovider.model.user="beaker.server.model.User"
+identity.saprovider.model.group="beaker.server.model.Group"
+identity.saprovider.model.permission="beaker.server.model.Permission"
# The password encryption algorithm used when comparing passwords against what's
# stored in the database. Valid values are 'md5' or 'sha1'. If you do not
@@ -142,8 +142,8 @@ identity.saprovider.encryption_algorithm='sha1'
[/static]
static_filter.on = True
-static_filter.dir = "%(top_level_dir)s/static"
+static_filter.dir = "%(top_level_dir)s/server/static"
[/favicon.ico]
static_filter.on = True
-static_filter.file = "%(top_level_dir)s/static/images/favicon.ico"
+static_filter.file = "%(top_level_dir)s/server/static/images/favicon.ico"
diff --git a/Medusa/medusa/config/log.cfg b/Server/beaker/server/config/log.cfg
index ce776f8..ce776f8 100644
--- a/Medusa/medusa/config/log.cfg
+++ b/Server/beaker/server/config/log.cfg
diff --git a/Medusa/medusa/controllers.py b/Server/beaker/server/controllers.py
index 3e30059..2c28515 100644
--- a/Medusa/medusa/controllers.py
+++ b/Server/beaker/server/controllers.py
@@ -2,39 +2,39 @@ from turbogears.database import session
from turbogears import controllers, expose, flash, widgets, validate, error_handler, validators, redirect, paginate, url
from model import *
from turbogears import identity, redirect, config
-from medusa.power import PowerTypes
-from medusa.keytypes import KeyTypes
-from medusa.CSV_import_export import CSV
-from medusa.group import Groups
-from medusa.tag import Tags
-from medusa.labcontroller import LabControllers
-from medusa.user import Users
-from medusa.distro import Distros
-from medusa.activity import Activities
-from medusa.widgets import myPaginateDataGrid
-from medusa.widgets import PowerTypeForm
-from medusa.widgets import PowerForm
-from medusa.widgets import LabInfoForm
-from medusa.widgets import PowerActionForm
-from medusa.widgets import SystemDetails
-from medusa.widgets import SystemHistory
-from medusa.widgets import SystemExclude
-from medusa.widgets import SystemKeys
-from medusa.widgets import SystemNotes
-from medusa.widgets import SystemGroups
-from medusa.widgets import SystemInstallOptions
-from medusa.widgets import SystemProvision
-from medusa.widgets import SearchBar, SystemForm
-from medusa.widgets import SystemArches
-from medusa.authentication import Auth
-from medusa.xmlrpccontroller import RPCRoot
-from medusa.cobbler_utils import hash_to_string
+from beaker.server.power import PowerTypes
+from beaker.server.keytypes import KeyTypes
+from beaker.server.CSV_import_export import CSV
+from beaker.server.group import Groups
+from beaker.server.tag import Tags
+from beaker.server.labcontroller import LabControllers
+from beaker.server.user import Users
+from beaker.server.distro import Distros
+from beaker.server.activity import Activities
+from beaker.server.widgets import myPaginateDataGrid
+from beaker.server.widgets import PowerTypeForm
+from beaker.server.widgets import PowerForm
+from beaker.server.widgets import LabInfoForm
+from beaker.server.widgets import PowerActionForm
+from beaker.server.widgets import SystemDetails
+from beaker.server.widgets import SystemHistory
+from beaker.server.widgets import SystemExclude
+from beaker.server.widgets import SystemKeys
+from beaker.server.widgets import SystemNotes
+from beaker.server.widgets import SystemGroups
+from beaker.server.widgets import SystemInstallOptions
+from beaker.server.widgets import SystemProvision
+from beaker.server.widgets import SearchBar, SystemForm
+from beaker.server.widgets import SystemArches
+from beaker.server.authentication import Auth
+from beaker.server.xmlrpccontroller import RPCRoot
+from beaker.server.cobbler_utils import hash_to_string
from cherrypy import request, response
from cherrypy.lib.cptools import serve_file
from tg_expanding_form_widget.tg_expanding_form_widget import ExpandingForm
-from medusa.needpropertyxml import *
-from medusa.helpers import *
-from medusa.tools.init import dummy
+from beaker.server.needpropertyxml import *
+from beaker.server.helpers import *
+from beaker.server.tools.init import dummy
from decimal import Decimal
from kid import Element
@@ -46,9 +46,9 @@ import string
# for debugging
import sys
-# from medusa import json
+# from beaker.server import json
# import logging
-# log = logging.getLogger("medusa.controllers")
+# log = logging.getLogger("beaker.server.controllers")
import breadcrumbs
from datetime import datetime
@@ -136,7 +136,7 @@ class Arches:
class Devices:
- @expose(template='medusa.templates.grid')
+ @expose(template='beaker.server.templates.grid')
@paginate('list')
def view(self, id):
device = session.query(Device).get(id)
@@ -148,7 +148,7 @@ class Devices:
return dict(title="", grid = device_grid, search_bar=None,
list = systems)
- @expose(template='medusa.templates.grid')
+ @expose(template='beaker.server.templates.grid')
@paginate('list',default_order='description',limit=50,max_limit=50,allow_limit_override=True)
def default(self, *args, **kw):
args = list(args)
@@ -255,12 +255,12 @@ class Root(RPCRoot):
return dict(ks_meta = ks_meta, kernel_options = kernel_options,
kernel_options_post = kernel_options_post)
- @expose(template='medusa.templates.grid_add')
+ @expose(template='beaker.server.templates.grid_add')
@paginate('list',default_order='fqdn',limit=20,max_limit=20,allow_limit_override=True)
def index(self, *args, **kw):
return self.systems(systems = System.all(identity.current.user), *args, **kw)
- @expose(template='medusa.templates.form')
+ @expose(template='beaker.server.templates.form')
@identity.require(identity.not_anonymous())
def prefs(self, *args, **kw):
user = identity.current.user
@@ -282,19 +282,19 @@ class Root(RPCRoot):
identity.current.user.email_address = email
redirect('/')
- @expose(template='medusa.templates.grid')
+ @expose(template='beaker.server.templates.grid')
@identity.require(identity.not_anonymous())
@paginate('list',default_order='fqdn',limit=20,max_limit=20,allow_limit_override=True)
def available(self, *args, **kw):
return self.systems(systems = System.available(identity.current.user), *args, **kw)
- @expose(template='medusa.templates.grid')
+ @expose(template='beaker.server.templates.grid')
@identity.require(identity.not_anonymous())
@paginate('list',default_order='fqdn',limit=20,max_limit=20,allow_limit_override=True)
def free(self, *args, **kw):
return self.systems(systems = System.free(identity.current.user), *args, **kw)
- @expose(template='medusa.templates.grid')
+ @expose(template='beaker.server.templates.grid')
@identity.require(identity.not_anonymous())
@paginate('list',default_order='fqdn',limit=20,max_limit=20,allow_limit_override=True)
def mine(self, *args, **kw):
@@ -460,7 +460,7 @@ class Root(RPCRoot):
flash(_(u"Group ID not found"))
redirect("./view/%s" % system.fqdn)
- @expose(template="medusa.templates.system")
+ @expose(template="beaker.server.templates.system")
@identity.require(identity.not_anonymous())
def new(self):
options = {}
@@ -473,7 +473,7 @@ class Root(RPCRoot):
value = None,
options = options)
- @expose(template="medusa.templates.form")
+ @expose(template="beaker.server.templates.form")
def test(self, fqdn=None, **kw):
try:
system = System.by_fqdn(fqdn,identity.current.user)
@@ -491,7 +491,7 @@ class Root(RPCRoot):
lab_controller = system.lab_controller,
prov_install = [(distro.id, distro.install_name) for distro in system.distros()]))
- @expose(template="medusa.templates.system")
+ @expose(template="beaker.server.templates.system")
def view(self, fqdn=None, **kw):
if fqdn:
try:
@@ -590,7 +590,7 @@ class Root(RPCRoot):
arches = system.arch)),
)
- @expose(template='medusa.templates.form')
+ @expose(template='beaker.server.templates.form')
@identity.require(identity.not_anonymous())
def loan_change(self, id):
try:
@@ -620,7 +620,7 @@ class Root(RPCRoot):
value = {'id': system.id},
)
- @expose(template='medusa.templates.form')
+ @expose(template='beaker.server.templates.form')
@identity.require(identity.not_anonymous())
def owner_change(self, id):
try:
@@ -1310,7 +1310,7 @@ class Root(RPCRoot):
system = System(fqdn=fqdn)
return system.update(inventory)
- @expose(template="medusa.templates.login")
+ @expose(template="beaker.server.templates.login")
def login(self, forward_url='/', previous_url=None, *args, **kw):
if not identity.current.anonymous \
@@ -1351,7 +1351,7 @@ class Root(RPCRoot):
filename = join(os.path.normpath(static_dir), 'images', 'favicon.ico')
return serve_file(filename)
-# @expose(template='medusa.templates.activity')
+# @expose(template='beaker.server.templates.activity')
# def activity(self, *args, **kw):
# TODO This is mainly for testing
# if it hangs around it should check for admin access
diff --git a/Medusa/medusa/tests/__init__.py b/Server/beaker/server/devdata.sqlite
index e69de29..e69de29 100644
--- a/Medusa/medusa/tests/__init__.py
+++ b/Server/beaker/server/devdata.sqlite
diff --git a/Medusa/medusa/distro.py b/Server/beaker/server/distro.py
index 4a2daeb..d7b117c 100644
--- a/Medusa/medusa/distro.py
+++ b/Server/beaker/server/distro.py
@@ -5,19 +5,19 @@ from turbogears import identity, redirect
from cherrypy import request, response
from tg_expanding_form_widget.tg_expanding_form_widget import ExpandingForm
from kid import Element
-from medusa.xmlrpccontroller import RPCRoot
-from medusa.widgets import DistroTags
-from medusa.helpers import *
-from medusa.needpropertyxml import *
+from beaker.server.xmlrpccontroller import RPCRoot
+from beaker.server.widgets import DistroTags
+from beaker.server.helpers import *
+from beaker.server.needpropertyxml import *
import cherrypy
from BasicAuthTransport import BasicAuthTransport
import xmlrpclib
-# from medusa import json
+# from beaker.server import json
# import logging
-# log = logging.getLogger("medusa.controllers")
+# log = logging.getLogger("beaker.server.controllers")
#import model
from model import *
import string
@@ -30,7 +30,7 @@ class Distros(RPCRoot):
tag_form = DistroTags(name='tags')
- @expose(template="medusa.templates.distro")
+ @expose(template="beaker.server.templates.distro")
def view(self, id=None, *args, **kw):
try:
distro = Distro.by_id(id)
@@ -69,7 +69,7 @@ class Distros(RPCRoot):
flash(_(u"Removed Tag %s" % tag))
redirect("./view?id=%s" % id)
- @expose(template="medusa.templates.grid")
+ @expose(template="beaker.server.templates.grid")
@paginate('list',default_order='-date_created', max_limit=50, limit=50,allow_limit_override=True)
def index(self, *args, **kw):
distros = session.query(Distro).join('breed').join('arch').join(['osversion','osmajor'])
diff --git a/Medusa/medusa/dynwidgets.egg b/Server/beaker/server/dynwidgets.egg
index 294e90a..294e90a 100644
--- a/Medusa/medusa/dynwidgets.egg
+++ b/Server/beaker/server/dynwidgets.egg
Binary files differ
diff --git a/Medusa/medusa/group.py b/Server/beaker/server/group.py
index 0fa7dc7..9d7a11e 100644
--- a/Medusa/medusa/group.py
+++ b/Server/beaker/server/group.py
@@ -5,14 +5,14 @@ from turbogears import identity, redirect
from cherrypy import request, response
from tg_expanding_form_widget.tg_expanding_form_widget import ExpandingForm
from kid import Element
-from medusa.xmlrpccontroller import RPCRoot
-from medusa.helpers import *
+from beaker.server.xmlrpccontroller import RPCRoot
+from beaker.server.helpers import *
import cherrypy
-# from medusa import json
+# from beaker.server import json
# import logging
-# log = logging.getLogger("medusa.controllers")
+# log = logging.getLogger("beaker.server.controllers")
#import model
from model import *
import string
@@ -68,7 +68,7 @@ class Groups(RPCRoot):
groups = [match.group_name for match in search]
return dict(groups=groups)
- @expose(template='medusa.templates.form')
+ @expose(template='beaker.server.templates.form')
def new(self, **kw):
return dict(
form = self.group_form,
@@ -77,7 +77,7 @@ class Groups(RPCRoot):
value = kw,
)
- @expose(template='medusa.templates.group_form')
+ @expose(template='beaker.server.templates.group_form')
def edit(self, id, **kw):
group = Group.by_id(id)
@@ -142,7 +142,7 @@ class Groups(RPCRoot):
flash( _(u"OK") )
redirect("./edit?id=%s" % kw['group_id'])
- @expose(template="medusa.templates.grid_add")
+ @expose(template="beaker.server.templates.grid_add")
@paginate('list')
def index(self):
groups = session.query(Group)
diff --git a/Medusa/medusa/group_acls.txt b/Server/beaker/server/group_acls.txt
index a6349bf..a6349bf 100644
--- a/Medusa/medusa/group_acls.txt
+++ b/Server/beaker/server/group_acls.txt
diff --git a/Medusa/medusa/helpers.py b/Server/beaker/server/helpers.py
index cf12e60..cf12e60 100644
--- a/Medusa/medusa/helpers.py
+++ b/Server/beaker/server/helpers.py
diff --git a/Medusa/medusa/identity.py b/Server/beaker/server/identity.py
index 710c7c0..6fdc2fc 100644
--- a/Medusa/medusa/identity.py
+++ b/Server/beaker/server/identity.py
@@ -7,7 +7,7 @@ import ldap
import logging
import cherrypy
import os
-log = logging.getLogger("medusa.controllers")
+log = logging.getLogger("beaker.server.controllers")
class LdapSqlAlchemyIdentityProvider(SqlAlchemyIdentityProvider):
"""
diff --git a/Medusa/medusa/json.py b/Server/beaker/server/json.py
index 66d5cfb..66d5cfb 100644
--- a/Medusa/medusa/json.py
+++ b/Server/beaker/server/json.py
diff --git a/Medusa/medusa/keytypes.py b/Server/beaker/server/keytypes.py
index 34a2090..d445018 100644
--- a/Medusa/medusa/keytypes.py
+++ b/Server/beaker/server/keytypes.py
@@ -4,14 +4,14 @@ from turbogears import identity, redirect
from cherrypy import request, response
from tg_expanding_form_widget.tg_expanding_form_widget import ExpandingForm
from kid import Element
-from medusa.xmlrpccontroller import RPCRoot
-from medusa.helpers import *
+from beaker.server.xmlrpccontroller import RPCRoot
+from beaker.server.helpers import *
import cherrypy
-# from medusa import json
+# from beaker.server import json
# import logging
-# log = logging.getLogger("medusa.controllers")
+# log = logging.getLogger("beaker.server.controllers")
#import model
from model import *
import string
@@ -31,7 +31,7 @@ class KeyTypes(RPCRoot):
submit_text = _(u'Submit Data'),
)
- @expose(template='medusa.templates.form')
+ @expose(template='beaker.server.templates.form')
def new(self, **kw):
return dict(
form = self.form,
@@ -40,7 +40,7 @@ class KeyTypes(RPCRoot):
value = kw,
)
- @expose(template='medusa.templates.form')
+ @expose(template='beaker.server.templates.form')
def edit(self,**kw):
values = []
if kw.get('id'):
@@ -71,7 +71,7 @@ class KeyTypes(RPCRoot):
flash( _(u"OK") )
redirect(".")
- @expose(template="medusa.templates.grid_add")
+ @expose(template="beaker.server.templates.grid_add")
@paginate('list')
def index(self):
keytypes = session.query(Key)
diff --git a/Medusa/medusa/labcontroller.py b/Server/beaker/server/labcontroller.py
index 7205dbf..5b3ecd0 100644
--- a/Medusa/medusa/labcontroller.py
+++ b/Server/beaker/server/labcontroller.py
@@ -5,8 +5,8 @@ from turbogears import identity, redirect
from cherrypy import request, response
from tg_expanding_form_widget.tg_expanding_form_widget import ExpandingForm
from kid import Element
-from medusa.xmlrpccontroller import RPCRoot
-from medusa.helpers import *
+from beaker.server.xmlrpccontroller import RPCRoot
+from beaker.server.helpers import *
from xmlrpclib import ProtocolError
import cherrypy
@@ -16,9 +16,9 @@ import re
from BasicAuthTransport import BasicAuthTransport
import xmlrpclib
-# from medusa import json
+# from beaker.server import json
# import logging
-# log = logging.getLogger("medusa.controllers")
+# log = logging.getLogger("beaker.server.controllers")
#import model
from model import *
import string
@@ -46,7 +46,7 @@ class LabControllers(RPCRoot):
)
@identity.require(identity.in_group("admin"))
- @expose(template='medusa.templates.form')
+ @expose(template='beaker.server.templates.form')
def new(self, **kw):
return dict(
form = self.labcontroller_form,
@@ -56,7 +56,7 @@ class LabControllers(RPCRoot):
)
@identity.require(identity.in_group("admin"))
- @expose(template='medusa.templates.form')
+ @expose(template='beaker.server.templates.form')
def edit(self, id, **kw):
labcontroller = LabController.by_id(id)
return dict(
@@ -238,7 +238,7 @@ class LabControllers(RPCRoot):
redirect(".")
@identity.require(identity.in_group("admin"))
- @expose(template="medusa.templates.grid_add")
+ @expose(template="beaker.server.templates.grid_add")
@paginate('list')
def index(self):
labcontrollers = session.query(LabController)
diff --git a/Medusa/medusa/model.py b/Server/beaker/server/model.py
index ac3d520..ac3d520 100644
--- a/Medusa/medusa/model.py
+++ b/Server/beaker/server/model.py
diff --git a/Medusa/medusa/needpropertyxml.py b/Server/beaker/server/needpropertyxml.py
index e85f8f7..778fcc7 100755
--- a/Medusa/medusa/needpropertyxml.py
+++ b/Server/beaker/server/needpropertyxml.py
@@ -23,8 +23,8 @@ import os
import sys
import pkg_resources
pkg_resources.require("SQLAlchemy>=0.3.10")
-from medusa.model import *
-from medusa.commands import ConfigurationError
+from beaker.server.model import *
+from beaker.server.commands import ConfigurationError
from turbogears.database import session
from os.path import dirname, exists, join
from os import getcwd
@@ -384,13 +384,13 @@ if __name__=='__main__':
else:
try:
configfile = pkg_resources.resource_filename(
- pkg_resources.Requirement.parse("medusa"),
+ pkg_resources.Requirement.parse("beaker"),
"config/default.cfg")
except pkg_resources.DistributionNotFound:
raise ConfigurationError("Could not find default configuration.")
turbogears.update_config(configfile=configfile,
- modulename="medusa.config")
+ modulename="beaker.server.config")
file = sys.argv[1]
FH = open(file,"r")
diff --git a/Medusa/medusa/power.py b/Server/beaker/server/power.py
index 9d4632c..7817369 100644
--- a/Medusa/medusa/power.py
+++ b/Server/beaker/server/power.py
@@ -4,13 +4,13 @@ from turbogears import identity, redirect
from cherrypy import request, response
from tg_expanding_form_widget.tg_expanding_form_widget import ExpandingForm
from kid import Element
-from medusa.xmlrpccontroller import RPCRoot
+from beaker.server.xmlrpccontroller import RPCRoot
import cherrypy
-# from medusa import json
+# from beaker.server import json
# import logging
-# log = logging.getLogger("medusa.controllers")
+# log = logging.getLogger("beaker.server.controllers")
#import model
from model import *
import string
@@ -67,7 +67,7 @@ class PowerTypes(RPCRoot):
submit_text = _(u'Submit Data'),
)
- @expose(template='medusa.templates.form')
+ @expose(template='beaker.server.templates.form')
def new(self, **kw):
return dict(
form = self.form,
@@ -76,7 +76,7 @@ class PowerTypes(RPCRoot):
value = kw,
)
- @expose(template='medusa.templates.form')
+ @expose(template='beaker.server.templates.form')
def edit(self,**kw):
values = []
if kw.get('id'):
@@ -104,7 +104,7 @@ class PowerTypes(RPCRoot):
flash( _(u"OK") )
redirect(".")
- @expose(template="medusa.templates.grid_add")
+ @expose(template="beaker.server.templates.grid_add")
@paginate('list')
def index(self):
powertypes = session.query(PowerType)
diff --git a/Medusa/medusa/release.py b/Server/beaker/server/release.py
index 97f3b6f..a55f64e 100644
--- a/Medusa/medusa/release.py
+++ b/Server/beaker/server/release.py
@@ -1,8 +1,8 @@
-# Release information about medusa
+# Release information about beaker.server
version = "0.3"
-description = "Medusa is an Inventory program that keeps track of system attributes. Also provides a mechanism for sharing and provisioning. Provisioning is done via Cobbler"
+description = "Beaker is a Test Framework that includes an Inventory program that keeps track of system attributes. Also provides a mechanism for sharing and provisioning. Provisioning is done via Cobbler"
# long_description = "More description about your plan"
author = "Bill Peck"
email = "bpeck@redhat.com"
diff --git a/Medusa/medusa/search.py b/Server/beaker/server/search.py
index dac8e9e..99ad246 100644
--- a/Medusa/medusa/search.py
+++ b/Server/beaker/server/search.py
@@ -18,7 +18,7 @@ class LocalJSLink(JSLink):
class Search(CompoundFormField):
"""Dynmaically modifies power arguments based on Power Type Selection"""
- javascript = [LocalJSLink('medusa', '/static/javascript/power.js')]
+ javascript = [LocalJSLink('beaker/server', '/static/javascript/power.js')]
template = """
<div xmlns:py="http://purl.org/kid/ns#" id="${field_id}">
<script language="JavaScript" type="text/JavaScript">
diff --git a/Medusa/medusa/static/css/layout-uncompressed.css b/Server/beaker/server/static/css/layout-uncompressed.css
index a757adc..a757adc 100644
--- a/Medusa/medusa/static/css/layout-uncompressed.css
+++ b/Server/beaker/server/static/css/layout-uncompressed.css
diff --git a/Medusa/medusa/static/css/style.css b/Server/beaker/server/static/css/style.css
index c98d40e..c98d40e 100644
--- a/Medusa/medusa/static/css/style.css
+++ b/Server/beaker/server/static/css/style.css
diff --git a/Medusa/medusa/static/images/corner-bl.png b/Server/beaker/server/static/images/corner-bl.png
index 58d269c..58d269c 100644
--- a/Medusa/medusa/static/images/corner-bl.png
+++ b/Server/beaker/server/static/images/corner-bl.png
Binary files differ
diff --git a/Medusa/medusa/static/images/corner-br.png b/Server/beaker/server/static/images/corner-br.png
index c03dd92..c03dd92 100644
--- a/Medusa/medusa/static/images/corner-br.png
+++ b/Server/beaker/server/static/images/corner-br.png
Binary files differ
diff --git a/Medusa/medusa/static/images/corner-tl.png b/Server/beaker/server/static/images/corner-tl.png
index 08ab7a3..08ab7a3 100644
--- a/Medusa/medusa/static/images/corner-tl.png
+++ b/Server/beaker/server/static/images/corner-tl.png
Binary files differ
diff --git a/Medusa/medusa/static/images/corner-tr.png b/Server/beaker/server/static/images/corner-tr.png
index b279db2..b279db2 100644
--- a/Medusa/medusa/static/images/corner-tr.png
+++ b/Server/beaker/server/static/images/corner-tr.png
Binary files differ
diff --git a/Medusa/medusa/static/images/favicon.ico b/Server/beaker/server/static/images/favicon.ico
index 332557b..332557b 100644
--- a/Medusa/medusa/static/images/favicon.ico
+++ b/Server/beaker/server/static/images/favicon.ico
Binary files differ
diff --git a/Medusa/medusa/static/images/header-beaker_logo.png b/Server/beaker/server/static/images/header-beaker_logo.png
index c587ce5..c587ce5 100644
--- a/Medusa/medusa/static/images/header-beaker_logo.png
+++ b/Server/beaker/server/static/images/header-beaker_logo.png
Binary files differ
diff --git a/Medusa/medusa/static/images/header_inner.png b/Server/beaker/server/static/images/header_inner.png
index 2b2d87d..2b2d87d 100644
--- a/Medusa/medusa/static/images/header_inner.png
+++ b/Server/beaker/server/static/images/header_inner.png
Binary files differ
diff --git a/Medusa/medusa/static/images/info.png b/Server/beaker/server/static/images/info.png
index 329c523..329c523 100644
--- a/Medusa/medusa/static/images/info.png
+++ b/Server/beaker/server/static/images/info.png
Binary files differ
diff --git a/Medusa/medusa/static/images/ok.png b/Server/beaker/server/static/images/ok.png
index fee6751..fee6751 100644
--- a/Medusa/medusa/static/images/ok.png
+++ b/Server/beaker/server/static/images/ok.png
Binary files differ
diff --git a/Medusa/medusa/static/images/tg_under_the_hood.png b/Server/beaker/server/static/images/tg_under_the_hood.png
index bc9c79c..bc9c79c 100644
--- a/Medusa/medusa/static/images/tg_under_the_hood.png
+++ b/Server/beaker/server/static/images/tg_under_the_hood.png
Binary files differ
diff --git a/Medusa/medusa/static/images/under_the_hood_blue.png b/Server/beaker/server/static/images/under_the_hood_blue.png
index 90e84b7..90e84b7 100644
--- a/Medusa/medusa/static/images/under_the_hood_blue.png
+++ b/Server/beaker/server/static/images/under_the_hood_blue.png
Binary files differ
diff --git a/Medusa/medusa/static/images/wait.gif b/Server/beaker/server/static/images/wait.gif
index 455c80c..455c80c 100644
--- a/Medusa/medusa/static/images/wait.gif
+++ b/Server/beaker/server/static/images/wait.gif
Binary files differ
diff --git a/Medusa/medusa/static/javascript/jquery.js b/Server/beaker/server/static/javascript/jquery.js
index 0367037..0367037 100644
--- a/Medusa/medusa/static/javascript/jquery.js
+++ b/Server/beaker/server/static/javascript/jquery.js
diff --git a/Medusa/medusa/static/javascript/power.js b/Server/beaker/server/static/javascript/power.js
index e6393d9..e6393d9 100644
--- a/Medusa/medusa/static/javascript/power.js
+++ b/Server/beaker/server/static/javascript/power.js
diff --git a/Medusa/medusa/static/javascript/provision.js b/Server/beaker/server/static/javascript/provision.js
index 62e7fbf..62e7fbf 100644
--- a/Medusa/medusa/static/javascript/provision.js
+++ b/Server/beaker/server/static/javascript/provision.js
diff --git a/Medusa/medusa/static/javascript/searchbar.js b/Server/beaker/server/static/javascript/searchbar.js
index e3c2b3d..e3c2b3d 100644
--- a/Medusa/medusa/static/javascript/searchbar.js
+++ b/Server/beaker/server/static/javascript/searchbar.js
diff --git a/Medusa/medusa/static/javascript/systemgroups.js b/Server/beaker/server/static/javascript/systemgroups.js
index b8ad8d9..b8ad8d9 100644
--- a/Medusa/medusa/static/javascript/systemgroups.js
+++ b/Server/beaker/server/static/javascript/systemgroups.js
diff --git a/Server/beaker/server/static/login.html b/Server/beaker/server/static/login.html
new file mode 100644
index 0000000..4727d97
--- /dev/null
+++ b/Server/beaker/server/static/login.html
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html><head>
+
+
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type">
+<title>Login</title>
+ <style type="text/css">
+ #loginBox
+ {
+ width: 30%;
+ margin: auto;
+ margin-top: 10%;
+ padding-left: 10%;
+ padding-right: 10%;
+ padding-top: 5%;
+ padding-bottom: 5%;
+ font-family: verdana;
+ font-size: 10px;
+ background-color: #eee;
+ border: 2px solid #ccc;
+ }
+ #loginBox h1
+ {
+ font-size: 42px;
+ font-family: "Trebuchet MS";
+ margin: 0;
+ color: #ddd;
+ }
+ #loginBox p
+ {
+ position: relative;
+ top: -1.5em;
+ padding-left: 4em;
+ font-size: 12px;
+ margin: 0;
+ color: #666;
+ }
+ #loginBox table
+ {
+ table-layout: fixed;
+ border-spacing: 0;
+ width: 100%;
+ }
+ #loginBox td.label
+ {
+ width: 33%;
+ text-align: right;
+ }
+ #loginBox td.field
+ {
+ width: 66%;
+ }
+ #loginBox td.field input
+ {
+ width: 100%;
+ }
+ #loginBox td.buttons
+ {
+ text-align: right;
+ }
+ </style>
+</head><body>
+ <div id="loginBox">
+ <h1>Login</h1>
+ <p>Please log in.</p>
+ <form action="/login" method="post">
+ <table>
+ <tbody><tr>
+ <td class="label">
+ <label for="user_name">User Name:</label>
+ </td>
+ <td class="field">
+ <input id="user_name" name="user_name" type="text">
+ </td>
+ </tr>
+ <tr>
+ <td class="label">
+ <label for="password">Password:</label>
+ </td>
+ <td class="field">
+ <input id="password" name="password" type="password">
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="buttons">
+ <input name="login" value="Login" type="submit">
+ </td>
+ </tr>
+ </tbody></table>
+ <input name="forward_url" value="https://inventory.engineering.redhat.com/" type="hidden">
+ </form>
+ </div>
+</body></html> \ No newline at end of file
diff --git a/Medusa/medusa/tag.py b/Server/beaker/server/tag.py
index f797f22..c54c360 100644
--- a/Medusa/medusa/tag.py
+++ b/Server/beaker/server/tag.py
@@ -5,18 +5,18 @@ from turbogears import identity, redirect
from cherrypy import request, response
from tg_expanding_form_widget.tg_expanding_form_widget import ExpandingForm
from kid import Element
-from medusa.xmlrpccontroller import RPCRoot
-from medusa.widgets import DistroTags
-from medusa.helpers import *
+from beaker.server.xmlrpccontroller import RPCRoot
+from beaker.server.widgets import DistroTags
+from beaker.server.helpers import *
import cherrypy
from BasicAuthTransport import BasicAuthTransport
import xmlrpclib
-# from medusa import json
+# from beaker.server import json
# import logging
-# log = logging.getLogger("medusa.controllers")
+# log = logging.getLogger("beaker.server.controllers")
#import model
from model import *
import string
@@ -34,7 +34,7 @@ class Tags(RPCRoot):
tags = [match.tag for match in search]
return dict(tags=tags)
- @expose(template="medusa.templates.grid")
+ @expose(template="beaker.server.templates.grid")
@paginate('list',default_order='tag', max_limit=50,limit=50,allow_limit_override=True)
def index(self):
tags = session.query(DistroTag)
diff --git a/Medusa/medusa/tools/__init__.py b/Server/beaker/server/templates/__init__.py
index e69de29..e69de29 100644
--- a/Medusa/medusa/tools/__init__.py
+++ b/Server/beaker/server/templates/__init__.py
diff --git a/Medusa/medusa/templates/csv_import.kid b/Server/beaker/server/templates/csv_import.kid
index c88310e..c88310e 100644
--- a/Medusa/medusa/templates/csv_import.kid
+++ b/Server/beaker/server/templates/csv_import.kid
diff --git a/Medusa/medusa/templates/distro.kid b/Server/beaker/server/templates/distro.kid
index c225285..c225285 100644
--- a/Medusa/medusa/templates/distro.kid
+++ b/Server/beaker/server/templates/distro.kid
diff --git a/Medusa/medusa/templates/distro_tags.kid b/Server/beaker/server/templates/distro_tags.kid
index 4dadd07..4dadd07 100644
--- a/Medusa/medusa/templates/distro_tags.kid
+++ b/Server/beaker/server/templates/distro_tags.kid
diff --git a/Medusa/medusa/templates/form-post.kid b/Server/beaker/server/templates/form-post.kid
index d779ad6..d779ad6 100644
--- a/Medusa/medusa/templates/form-post.kid
+++ b/Server/beaker/server/templates/form-post.kid
diff --git a/Medusa/medusa/templates/form.kid b/Server/beaker/server/templates/form.kid
index 5407256..5407256 100644
--- a/Medusa/medusa/templates/form.kid
+++ b/Server/beaker/server/templates/form.kid
diff --git a/Medusa/medusa/templates/form.kid-backup b/Server/beaker/server/templates/form.kid-backup
index 3ac911e..3ac911e 100644
--- a/Medusa/medusa/templates/form.kid-backup
+++ b/Server/beaker/server/templates/form.kid-backup
diff --git a/Medusa/medusa/templates/grid.kid b/Server/beaker/server/templates/grid.kid
index cc6c0a2..cc6c0a2 100644
--- a/Medusa/medusa/templates/grid.kid
+++ b/Server/beaker/server/templates/grid.kid
diff --git a/Medusa/medusa/templates/grid_add.kid b/Server/beaker/server/templates/grid_add.kid
index adc89fc..adc89fc 100644
--- a/Medusa/medusa/templates/grid_add.kid
+++ b/Server/beaker/server/templates/grid_add.kid
diff --git a/Medusa/medusa/templates/group_form.kid b/Server/beaker/server/templates/group_form.kid
index ecc0679..ecc0679 100644
--- a/Medusa/medusa/templates/group_form.kid
+++ b/Server/beaker/server/templates/group_form.kid
diff --git a/Medusa/medusa/templates/login.kid b/Server/beaker/server/templates/login.kid
index 4fd6755..4fd6755 100644
--- a/Medusa/medusa/templates/login.kid
+++ b/Server/beaker/server/templates/login.kid
diff --git a/Medusa/medusa/templates/master.kid b/Server/beaker/server/templates/master.kid
index d31d2a8..65ad7c5 100644
--- a/Medusa/medusa/templates/master.kid
+++ b/Server/beaker/server/templates/master.kid
@@ -23,8 +23,8 @@
<body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'" py:attrs="item.items()">
<?python
-from medusa.model import device_classes
-from medusa.model import system_types
+from beaker.server.model import device_classes
+from beaker.server.model import system_types
?>
<script type="text/javascript" py:if="'admin' in tg.identity.groups">
$(document).ready(function() {
diff --git a/Medusa/medusa/templates/my_paginate_datagrid.kid b/Server/beaker/server/templates/my_paginate_datagrid.kid
index 26befd6..26befd6 100644
--- a/Medusa/medusa/templates/my_paginate_datagrid.kid
+++ b/Server/beaker/server/templates/my_paginate_datagrid.kid
diff --git a/Medusa/medusa/templates/system.kid b/Server/beaker/server/templates/system.kid
index 77bf344..77bf344 100644
--- a/Medusa/medusa/templates/system.kid
+++ b/Server/beaker/server/templates/system.kid
diff --git a/Medusa/medusa/templates/system_activity.kid b/Server/beaker/server/templates/system_activity.kid
index 3489dbd..3489dbd 100644
--- a/Medusa/medusa/templates/system_activity.kid
+++ b/Server/beaker/server/templates/system_activity.kid
diff --git a/Medusa/medusa/templates/system_arches.kid b/Server/beaker/server/templates/system_arches.kid
index 37ee33b..37ee33b 100644
--- a/Medusa/medusa/templates/system_arches.kid
+++ b/Server/beaker/server/templates/system_arches.kid
diff --git a/Medusa/medusa/templates/system_details.kid b/Server/beaker/server/templates/system_details.kid
index cca6e6d..cca6e6d 100644
--- a/Medusa/medusa/templates/system_details.kid
+++ b/Server/beaker/server/templates/system_details.kid
diff --git a/Medusa/medusa/templates/system_form.kid b/Server/beaker/server/templates/system_form.kid
index 894a334..894a334 100644
--- a/Medusa/medusa/templates/system_form.kid
+++ b/Server/beaker/server/templates/system_form.kid
diff --git a/Medusa/medusa/templates/system_groups.kid b/Server/beaker/server/templates/system_groups.kid
index dd6dee1..dd6dee1 100644
--- a/Medusa/medusa/templates/system_groups.kid
+++ b/Server/beaker/server/templates/system_groups.kid
diff --git a/Medusa/medusa/templates/system_installoptions.kid b/Server/beaker/server/templates/system_installoptions.kid
index deefdff..deefdff 100644
--- a/Medusa/medusa/templates/system_installoptions.kid
+++ b/Server/beaker/server/templates/system_installoptions.kid
diff --git a/Medusa/medusa/templates/system_keys.kid b/Server/beaker/server/templates/system_keys.kid
index e7ca30f..e7ca30f 100644
--- a/Medusa/medusa/templates/system_keys.kid
+++ b/Server/beaker/server/templates/system_keys.kid
diff --git a/Medusa/medusa/templates/system_labinfo.kid b/Server/beaker/server/templates/system_labinfo.kid
index c7d09d6..c7d09d6 100644
--- a/Medusa/medusa/templates/system_labinfo.kid
+++ b/Server/beaker/server/templates/system_labinfo.kid
diff --git a/Medusa/medusa/templates/system_notes.kid b/Server/beaker/server/templates/system_notes.kid
index 4862491..4862491 100644
--- a/Medusa/medusa/templates/system_notes.kid
+++ b/Server/beaker/server/templates/system_notes.kid
diff --git a/Medusa/medusa/templates/system_power.kid b/Server/beaker/server/templates/system_power.kid
index 9c0503d..9c0503d 100644
--- a/Medusa/medusa/templates/system_power.kid
+++ b/Server/beaker/server/templates/system_power.kid
diff --git a/Medusa/medusa/templates/system_power_action.kid b/Server/beaker/server/templates/system_power_action.kid
index c7ec674..c7ec674 100644
--- a/Medusa/medusa/templates/system_power_action.kid
+++ b/Server/beaker/server/templates/system_power_action.kid
diff --git a/Medusa/medusa/templates/system_provision.kid b/Server/beaker/server/templates/system_provision.kid
index 597a3e6..597a3e6 100644
--- a/Medusa/medusa/templates/system_provision.kid
+++ b/Server/beaker/server/templates/system_provision.kid
diff --git a/Medusa/medusa/templates/systems.kid b/Server/beaker/server/templates/systems.kid
index 946b7bc..946b7bc 100644
--- a/Medusa/medusa/templates/systems.kid
+++ b/Server/beaker/server/templates/systems.kid
diff --git a/Server/beaker/server/tools/__init__.py b/Server/beaker/server/tools/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Server/beaker/server/tools/__init__.py
diff --git a/Medusa/medusa/tools/init.py b/Server/beaker/server/tools/init.py
index 85ee3be..d065e50 100755
--- a/Medusa/medusa/tools/init.py
+++ b/Server/beaker/server/tools/init.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Medusa - Medusa is the Lab Contrller piece of the Beaker project
+# Beaker -
#
# Copyright (C) 2008 bpeck@redhat.com
#
@@ -22,9 +22,9 @@
import sys
import pkg_resources
pkg_resources.require("SQLAlchemy>=0.3.10")
-from medusa.model import *
-from medusa.commands import ConfigurationError
-from medusa.util import load_config
+from beaker.server.model import *
+from beaker.server.commands import ConfigurationError
+from beaker.server.util import load_config
from turbogears.database import session
from os.path import dirname, exists, join
from os import getcwd
diff --git a/Medusa/medusa/user.py b/Server/beaker/server/user.py
index ae5a5ad..b2112ff 100644
--- a/Medusa/medusa/user.py
+++ b/Server/beaker/server/user.py
@@ -4,14 +4,14 @@ from turbogears.widgets import AutoCompleteField
from turbogears import identity, redirect
from cherrypy import request, response
from kid import Element
-from medusa.xmlrpccontroller import RPCRoot
-from medusa.helpers import *
+from beaker.server.xmlrpccontroller import RPCRoot
+from beaker.server.helpers import *
import cherrypy
-# from medusa import json
+# from beaker.server import json
# import logging
-# log = logging.getLogger("medusa.controllers")
+# log = logging.getLogger("beaker.server.controllers")
#import model
from model import *
import string
@@ -33,7 +33,7 @@ class Users(RPCRoot):
submit_text = _(u'Save'),
)
- @expose(template='medusa.templates.form')
+ @expose(template='beaker.server.templates.form')
def new(self, **kw):
return dict(
form = self.user_form,
@@ -42,7 +42,7 @@ class Users(RPCRoot):
value = kw,
)
- @expose(template='medusa.templates.form')
+ @expose(template='beaker.server.templates.form')
def edit(self, id, **kw):
user = User.by_id(id)
return dict(
@@ -68,7 +68,7 @@ class Users(RPCRoot):
flash( _(u"%s saved" % user.display_name) )
redirect(".")
- @expose(template="medusa.templates.grid_add")
+ @expose(template="beaker.server.templates.grid_add")
@paginate('list', default_order='user_name')
def index(self):
users = session.query(User)
diff --git a/Medusa/medusa/util.py b/Server/beaker/server/util.py
index 2eb6d04..5b0a21b 100644
--- a/Medusa/medusa/util.py
+++ b/Server/beaker/server/util.py
@@ -38,25 +38,25 @@ from turbogears import config, url, flash, redirect
log = logging.getLogger(__name__)
def load_config(configfile=None):
- """ Load medusa's configuration """
- setupdir = os.path.dirname(os.path.dirname(__file__))
+ """ Load beaker's configuration """
+ setupdir = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
curdir = os.getcwd()
if configfile and os.path.exists(configfile):
pass
elif os.path.exists(os.path.join(setupdir, 'setup.py')) \
and os.path.exists(os.path.join(setupdir, 'dev.cfg')):
configfile = os.path.join(setupdir, 'dev.cfg')
- elif os.path.exists(os.path.join(curdir, 'medusa.cfg')):
- configfile = os.path.join(curdir, 'medusa.cfg')
- elif os.path.exists('/etc/medusa.cfg'):
- configfile = '/etc/medusa.cfg'
- elif os.path.exists('/etc/medusa/medusa.cfg'):
- configfile = '/etc/medusa/medusa.cfg'
+ elif os.path.exists(os.path.join(curdir, 'beaker.cfg')):
+ configfile = os.path.join(curdir, 'beaker.cfg')
+ elif os.path.exists('/etc/beaker.cfg'):
+ configfile = '/etc/beaker.cfg'
+ elif os.path.exists('/etc/beaker/server.cfg'):
+ configfile = '/etc/beaker/server.cfg'
else:
log.error("Unable to find configuration to load!")
return
log.debug("Loading configuration: %s" % configfile)
- turbogears.update_config(configfile=configfile, modulename="medusa.config")
+ turbogears.update_config(configfile=configfile, modulename="beaker.server.config")
def to_unicode(obj, encoding='utf-8'):
if isinstance(obj, basestring):
diff --git a/Medusa/medusa/widgets.py b/Server/beaker/server/widgets.py
index 611db22..0660278 100644
--- a/Medusa/medusa/widgets.py
+++ b/Server/beaker/server/widgets.py
@@ -24,7 +24,7 @@ class LocalJSLink(JSLink):
class PowerTypeForm(CompoundFormField):
"""Dynmaically modifies power arguments based on Power Type Selection"""
- javascript = [LocalJSLink('medusa', '/static/javascript/power.js')]
+ javascript = [LocalJSLink('beaker', '/static/javascript/power.js')]
template = """
<div xmlns:py="http://purl.org/kid/ns#" id="${field_id}">
<script language="JavaScript" type="text/JavaScript">
@@ -74,12 +74,12 @@ class PowerTypeForm(CompoundFormField):
self.key_field = HiddenField(name="key")
class myPaginateDataGrid(PaginateDataGrid):
- template = "medusa.templates.my_paginate_datagrid"
+ template = "beaker.server.templates.my_paginate_datagrid"
class SearchBar(RepeatingFormField):
"""Search Bar"""
- javascript = [LocalJSLink('medusa', '/static/javascript/searchbar.js')]
+ javascript = [LocalJSLink('beaker', '/static/javascript/searchbar.js')]
template = """
<div xmlns:py="http://purl.org/kid/ns#">
<a id="advancedsearch" href="#">Toggle Search</a>
@@ -201,7 +201,7 @@ class ProvisionForm(RepeatingFormField):
pass
class PowerActionForm(Form):
- template = "medusa.templates.system_power_action"
+ template = "beaker.server.templates.system_power_action"
member_widgets = ["id", "power", "lab_controller"]
params = ['options', 'action', 'enabled']
@@ -218,7 +218,7 @@ class PowerActionForm(Form):
d['enabled'] = True
class LabInfoForm(Form):
- template = "medusa.templates.system_labinfo"
+ template = "beaker.server.templates.system_labinfo"
member_widgets = ["id", "labinfo", "orig_cost", "curr_cost", "dimensions",
"weight", "wattage", "cooling"]
params = ['options']
@@ -252,7 +252,7 @@ class LabInfoForm(Form):
d['value']['cooling'] = labinfo.cooling
class PowerForm(Form):
- template = "medusa.templates.system_power"
+ template = "beaker.server.templates.system_power"
member_widgets = ["id", "power", "power_type_id", "power_address",
"power_user", "power_passwd", "power_id"]
params = []
@@ -381,7 +381,7 @@ class ExcludedFamilies(FormField):
return False
class SystemKeys(Form):
- template = "medusa.templates.system_keys"
+ template = "beaker.server.templates.system_keys"
member_widgets = ["id", "key_name", "key_value"]
params = ['options', 'readonly', 'key_values_int', 'key_values_string']
@@ -401,7 +401,7 @@ class SystemKeys(Form):
d['key_values_string'] = d['options']['key_values_string']
class SystemArches(Form):
- template = "medusa.templates.system_arches"
+ template = "beaker.server.templates.system_arches"
member_widgets = ["id", "arch"]
params = ['options', 'readonly', 'arches']
@@ -421,7 +421,7 @@ class SystemArches(Form):
d['arches'] = d['options']['arches']
class DistroTags(Form):
- template = "medusa.templates.distro_tags"
+ template = "beaker.server.templates.distro_tags"
member_widgets = ["id", "tag"]
params = ['options', 'readonly', 'tags']
@@ -441,7 +441,7 @@ class DistroTags(Form):
d['tags'] = d['options']['tags']
class SystemGroups(Form):
- template = "medusa.templates.system_groups"
+ template = "beaker.server.templates.system_groups"
member_widgets = ["id", "group"]
params = ['options', 'readonly', 'groups']
@@ -461,8 +461,8 @@ class SystemGroups(Form):
d['groups'] = d['options']['groups']
class SystemProvision(Form):
- javascript = [LocalJSLink('medusa', '/static/javascript/provision.js')]
- template = "medusa.templates.system_provision"
+ javascript = [LocalJSLink('beaker', '/static/javascript/provision.js')]
+ template = "beaker.server.templates.system_provision"
member_widgets = ["id", "prov_install", "ks_meta", "power",
"koptions", "koptions_post", "reboot"]
params = ['options', 'is_user', 'lab_controller', 'power_enabled']
@@ -498,7 +498,7 @@ class SystemProvision(Form):
d['power_enabled'] = True
class SystemInstallOptions(Form):
- template = "medusa.templates.system_installoptions"
+ template = "beaker.server.templates.system_installoptions"
member_widgets = ["id", "prov_arch", "prov_osmajor", "prov_osversion",
"prov_ksmeta", "prov_koptions", "prov_koptionspost"]
params = ['options', 'readonly', 'provisions']
@@ -531,7 +531,7 @@ class SystemInstallOptions(Form):
d['provisions'] = d['options']['provisions']
class SystemNotes(Form):
- template = "medusa.templates.system_notes"
+ template = "beaker.server.templates.system_notes"
member_widgets = ["id", "note"]
params = ['options', 'readonly', 'notes']
@@ -573,16 +573,16 @@ class SystemExclude(Form):
d['readonly'] = d['options']['readonly']
class SystemDetails(Widget):
- template = "medusa.templates.system_details"
+ template = "beaker.server.templates.system_details"
params = ['system']
class SystemHistory(Widget):
- template = "medusa.templates.system_activity"
+ template = "beaker.server.templates.system_activity"
params = ['system']
class SystemForm(Form):
- javascript = [LocalJSLink('medusa', '/static/javascript/provision.js')]
- template = "medusa.templates.system_form"
+ javascript = [LocalJSLink('beaker', '/static/javascript/provision.js')]
+ template = "beaker.server.templates.system_form"
params = ['id','readonly',
'user_change','user_change_text',
'loan_change', 'loan_text',
diff --git a/Medusa/medusa/xmlrpccontroller.py b/Server/beaker/server/xmlrpccontroller.py
index 0543909..0543909 100644
--- a/Medusa/medusa/xmlrpccontroller.py
+++ b/Server/beaker/server/xmlrpccontroller.py
diff --git a/Medusa/contrib/inventory-push-script/i18n.py b/Server/contrib/inventory-push-script/i18n.py
index a198990..a198990 100644
--- a/Medusa/contrib/inventory-push-script/i18n.py
+++ b/Server/contrib/inventory-push-script/i18n.py
diff --git a/Medusa/contrib/inventory-push-script/legacy-inventory.py b/Server/contrib/inventory-push-script/legacy-inventory.py
index 2c7a475..2c7a475 100755
--- a/Medusa/contrib/inventory-push-script/legacy-inventory.py
+++ b/Server/contrib/inventory-push-script/legacy-inventory.py
diff --git a/Medusa/contrib/inventory-push-script/procfs.py b/Server/contrib/inventory-push-script/procfs.py
index 22f11f9..22f11f9 100755
--- a/Medusa/contrib/inventory-push-script/procfs.py
+++ b/Server/contrib/inventory-push-script/procfs.py
diff --git a/Medusa/contrib/inventory-push-script/pushInventory.py b/Server/contrib/inventory-push-script/pushInventory.py
index d4b27ef..d4b27ef 100755
--- a/Medusa/contrib/inventory-push-script/pushInventory.py
+++ b/Server/contrib/inventory-push-script/pushInventory.py
diff --git a/Medusa/contrib/inventory-push-script/runme.sh b/Server/contrib/inventory-push-script/runme.sh
index b91a16b..b91a16b 100755
--- a/Medusa/contrib/inventory-push-script/runme.sh
+++ b/Server/contrib/inventory-push-script/runme.sh
diff --git a/Medusa/contrib/inventory-push-script/smolt.py b/Server/contrib/inventory-push-script/smolt.py
index ef45c6b..ef45c6b 100644
--- a/Medusa/contrib/inventory-push-script/smolt.py
+++ b/Server/contrib/inventory-push-script/smolt.py
diff --git a/Medusa/contrib/inventory-push-script/software.py b/Server/contrib/inventory-push-script/software.py
index e8443a0..e8443a0 100644
--- a/Medusa/contrib/inventory-push-script/software.py
+++ b/Server/contrib/inventory-push-script/software.py
diff --git a/Medusa/contrib/inventory-push-script/sysctl.py b/Server/contrib/inventory-push-script/sysctl.py
index c49bc54..c49bc54 100755
--- a/Medusa/contrib/inventory-push-script/sysctl.py
+++ b/Server/contrib/inventory-push-script/sysctl.py
diff --git a/Server/contrib/inventory-push-script/system-serial-number b/Server/contrib/inventory-push-script/system-serial-number
new file mode 100644
index 0000000..0a20ed9
--- /dev/null
+++ b/Server/contrib/inventory-push-script/system-serial-number
@@ -0,0 +1,2 @@
+dmidecode -s system-serial-number
+
diff --git a/Medusa/contrib/inventory-push-script/utilist.py b/Server/contrib/inventory-push-script/utilist.py
index 23fa171..23fa171 100755
--- a/Medusa/contrib/inventory-push-script/utilist.py
+++ b/Server/contrib/inventory-push-script/utilist.py
diff --git a/Medusa/dev.cfg b/Server/dev.cfg
index 8c97422..6dad9c3 100644
--- a/Medusa/dev.cfg
+++ b/Server/dev.cfg
@@ -2,7 +2,7 @@
# This is where all of your settings go for your development environment
# Settings that are the same for both development and production
# (such as template engine, encodings, etc.) all go in
-# medusa/config/app.cfg
+# beaker/server/config/app.cfg
# DATABASE
@@ -45,7 +45,7 @@ identity.ldap.enabled=False
# log_debug_info_filter.on = False
server.environment="development"
-autoreload.package="medusa"
+autoreload.package="beaker.server"
# Auto-Reload after code modification
# autoreload.on = True
@@ -59,13 +59,13 @@ tg.include_widgets = ['turbogears.mochikit']
# Logging configuration generally follows the style of the standard
# Python logging module configuration. Note that when specifying
# log format messages, you need to use *() for formatting variables.
-# Deployment independent log configuration is in medusa/config/log.cfg
+# Deployment independent log configuration is in beaker/server/config/log.cfg
[logging]
[[loggers]]
-[[[medusa]]]
+[[[server]]]
level='DEBUG'
-qualname='medusa'
+qualname='beaker.server'
handlers=['debug_out']
[[[allinfo]]]
diff --git a/Medusa/sample-prod.cfg b/Server/sample-prod.cfg
index fcdf402..fcdf402 100644
--- a/Medusa/sample-prod.cfg
+++ b/Server/sample-prod.cfg
diff --git a/Medusa/medusa.cfg b/Server/server.cfg
index ab12cb2..ab12cb2 100644
--- a/Medusa/medusa.cfg
+++ b/Server/server.cfg
diff --git a/Medusa/setup.py b/Server/setup.py.in
index f75e9f4..e0e62be 100644
--- a/Medusa/setup.py
+++ b/Server/setup.py.in
@@ -13,16 +13,16 @@ from setuptools.command.install import install as _install
from setuptools.command.install_lib import install_lib as _install_lib
from turbogears.finddata import find_package_data, standard_exclude, \
standard_exclude_directories
-execfile(os.path.join("medusa", "release.py"))
+execfile(os.path.join("beaker/server", "release.py"))
excludeFiles = ['*.cfg.in']
excludeFiles.extend(standard_exclude)
-excludeDataDirs = ['medusa/static', 'comps']
+excludeDataDirs = ['beaker/server/static', 'comps']
excludeDataDirs.extend(standard_exclude_directories)
poFiles = filter(os.path.isfile, glob.glob('po/*.po'))
-SUBSTFILES = ('medusa/config/app.cfg')
+SUBSTFILES = ('beaker/server/config/app.cfg')
class Build(_build, object):
'''
@@ -40,7 +40,7 @@ class Build(_build, object):
super(Build, self).initialize_options()
def finalize_options(self):
if self.install_data:
- self.substitutions['@DATADIR@'] = self.install_data + '/medusa'
+ self.substitutions['@DATADIR@'] = self.install_data + '/beaker/server'
self.substitutions['@LOCALEDIR@'] = self.install_data + '/locale'
else:
self.substitutions['@DATADIR@'] = '%(top_level_dir)s'
@@ -84,8 +84,8 @@ class Build(_build, object):
dirname = 'locale/%s/LC_MESSAGES/' % lang
if not os.path.isdir(dirname):
os.makedirs(dirname)
- # Hardcoded gettext domain: 'medusa'
- mofile = dirname + 'medusa' + '.mo'
+ # Hardcoded gettext domain: 'server'
+ mofile = dirname + 'server' + '.mo'
subprocess.call(['/usr/bin/msgfmt', pofile, '-o', mofile])
super(Build, self).run()
@@ -108,54 +108,31 @@ class InstallData(_install_data, object):
)
if not self.install_dir:
if self.temp_data == self.root + self.temp_prefix:
- self.install_dir = os.path.join(self.temp_lib, 'medusa')
+ self.install_dir = os.path.join(self.temp_lib, 'beaker')
else:
self.install_dir = self.temp_data
data_files = [
- ('medusa/static', filter(os.path.isfile, glob.glob('medusa/static/*'))),
- ('medusa/static/css', filter(os.path.isfile,
- glob.glob('medusa/static/css/*'))),
- ('medusa/static/javascript', filter(os.path.isfile,
- glob.glob('medusa/static/javascript/*'))),
- ('medusa/static/images', filter(os.path.isfile,
- glob.glob('medusa/static/images/*'))),
- ("/etc/medusa", ["medusa.cfg"]),
- ("/etc/cron.daily", ["lab-controller/cron.daily/expire_distros"]),
- ("/etc/httpd/conf.d", ["apache/medusa.conf", "lab-controller/conf.d/beaker.conf"]),
- ("/var/lib/cobbler/triggers/sync/post", filter(os.path.isfile, glob.glob("lab-controller/triggers/sync/post/*"))),
- ("/var/lib/cobbler/triggers/install/pre", filter(os.path.isfile, glob.glob("lab-controller/triggers/install/pre/*"))),
- ("/var/lib/cobbler/kickstarts", filter(os.path.isfile, glob.glob("lab-controller/kickstarts/*"))),
- ("/var/lib/cobbler/snippets", filter(os.path.isfile, glob.glob("lab-controller/snippets/*"))),
- ("/usr/share/medusa", filter(os.path.isfile, glob.glob("apache/*.wsgi"))),
- ("/var/www/beaker", ["lab-controller/aux/rhts-checkin"]),
- ("/var/log/medusa", []),
- ("/var/lib/medusa", []),
- ("/var/lib/cobbler/snippets/per_system/Fedora", []),
- ("/var/lib/cobbler/snippets/per_system/Fedora_pre", []),
- ("/var/lib/cobbler/snippets/per_system/Fedora_post", []),
- ("/var/lib/cobbler/snippets/per_system/RedHatEnterpriseLinux3", []),
- ("/var/lib/cobbler/snippets/per_system/RedHatEnterpriseLinux3_pre", []),
- ("/var/lib/cobbler/snippets/per_system/RedHatEnterpriseLinux3_post", []),
- ("/var/lib/cobbler/snippets/per_system/RedHatEnterpriseLinux4", []),
- ("/var/lib/cobbler/snippets/per_system/RedHatEnterpriseLinux4_pre", []),
- ("/var/lib/cobbler/snippets/per_system/RedHatEnterpriseLinux4_post", []),
- ("/var/lib/cobbler/snippets/per_system/RedHatEnterpriseLinuxClient5", []),
- ("/var/lib/cobbler/snippets/per_system/RedHatEnterpriseLinuxClient5_pre", []),
- ("/var/lib/cobbler/snippets/per_system/RedHatEnterpriseLinuxClient5_post", []),
- ("/var/lib/cobbler/snippets/per_system/RedHatEnterpriseLinuxServer5", []),
- ("/var/lib/cobbler/snippets/per_system/RedHatEnterpriseLinuxServer5_pre", []),
- ("/var/lib/cobbler/snippets/per_system/RedHatEnterpriseLinuxServer5_post", []),
+ ('server/static', filter(os.path.isfile, glob.glob('server/static/*'))),
+ ('server/static/css', filter(os.path.isfile,
+ glob.glob('server/static/css/*'))),
+ ('server/static/javascript', filter(os.path.isfile,
+ glob.glob('server/static/javascript/*'))),
+ ('server/static/images', filter(os.path.isfile,
+ glob.glob('server/static/images/*'))),
+ ("/etc/beaker", ["server.cfg"]),
+ ("/etc/httpd/conf.d", ["apache/beaker-server.conf"]),
+ ("/usr/share/beaker", filter(os.path.isfile, glob.glob("apache/*.wsgi"))),
+ ("/var/log/beaker", []),
]
-package_data = find_package_data(where='medusa',
- package='medusa',
+package_data = find_package_data(where='beaker',
+ package='beaker',
exclude=excludeFiles,
exclude_directories=excludeDataDirs)
-package_data['medusa.config'].append('app.cfg')
-
setup(
- name="medusa",
+ name="beaker.server",
+ namespace_packages = ['beaker'],
version=version,
# uncomment the following lines if you fill them out in release.py
@@ -191,11 +168,11 @@ setup(
test_suite='nose.collector',
entry_points = {
'turbogears.identity.provider': (
- 'ldapsa = medusa.identity:LdapSqlAlchemyIdentityProvider'
+ 'ldapsa = beaker.server.identity:LdapSqlAlchemyIdentityProvider'
),
'console_scripts': (
- 'start-medusa = medusa.commands:start',
- 'medusa-init = medusa.tools.init:main',
+ 'start-beaker = beaker.server.commands:start',
+ 'beaker-init = beaker.server.tools.init:main',
),
}
)
diff --git a/Medusa/test.cfg b/Server/test.cfg
index df909c9..df909c9 100644
--- a/Medusa/test.cfg
+++ b/Server/test.cfg
diff --git a/beaker.spec b/beaker.spec
new file mode 100644
index 0000000..3065b85
--- /dev/null
+++ b/beaker.spec
@@ -0,0 +1,114 @@
+%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
+
+Name: beaker
+Version: 0.3
+Release: 1%{?dist}
+Summary: Filesystem layout for Beaker
+Group: Applications/Internet
+License: GPLv2+
+URL: http://fedorahosted.org/beaker
+Source0: http://fedorahosted.org/releases/$(echo %{name} | %{__sed} 's@\(\(.\)\(.\).*\)@\2/\3/\1@')/%{name}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
+BuildRequires: python-setuptools
+BuildRequires: python-setuptools-devel
+BuildRequires: python-devel
+
+
+%package client
+Summary: Client component for talking to Beaker server
+Group: Applications/Internet
+Requires: python
+Requires: python-kobo
+
+
+%package server
+Summary: Server component of Beaker
+Group: Applications/Internet
+Requires: TurboGears
+Requires: intltool
+Requires: python-decorator
+Requires: python-xmltramp
+Requires: python-ldap
+Requires: mod_wsgi
+Requires: python-tgexpandingformwidget
+Requires: httpd
+Requires: python-krbV
+
+
+%package lab-controller
+Summary: Lab Controller xmlrpc server
+Group: Applications/Internet
+Requires: python
+Requires: mod_python
+Requires: httpd
+Requires: cobbler >= 1.4
+Requires: yum-utils
+Requires: /sbin/fenced
+Requires: telnet
+Requires: python-cpio
+
+
+%description
+Filesystem layout for beaker
+
+
+%description client
+This is the command line interface used to interact with the Beaker Server.
+
+
+%description server
+To Be Filled in - Server Side..
+
+
+%description lab-controller
+This is the interface to link Medusa and Cobbler together. Mostly provides
+snippets and kickstarts.
+
+
+%prep
+%setup -q
+
+%build
+DESTDIR=$RPM_BUILD_ROOT make
+
+%install
+DESTDIR=$RPM_BUILD_ROOT make install
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%files server
+%defattr(-,root,root,-)
+%doc README COPYING
+%{python_sitelib}/%{name}/server/
+%{python_sitelib}/%{name}.server-%{version}-py%{pyver}.egg-info/
+%{_bindir}/start-%{name}
+%{_bindir}/%{name}-init
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}-server.conf
+%attr(-,apache,root) %{_datadir}/%{name}
+%attr(-,apache,root) %config(noreplace) %{_sysconfdir}/%{name}/server.cfg
+%attr(-,apache,root) %dir %{_localstatedir}/log/%{name}
+
+%files client
+%defattr(-,root,root,-)
+%config(noreplace) %{_sysconfdir}/beaker/client.conf
+%{python_sitelib}/%{name}/client/
+%{python_sitelib}/%{name}.client-%{version}-py%{pyver}.egg-info/
+%{_bindir}/beaker-client
+
+%files lab-controller
+%defattr(-,root,root,-)
+%doc lab-controller/README
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}-lab-controller.conf
+%{_sysconfdir}/cron.daily/expire_distros
+/var/lib/cobbler/triggers/sync/post/osversion.trigger
+/var/lib/cobbler/triggers/install/pre/clear_console_log.trigger
+/var/lib/cobbler/snippets/*
+/var/lib/cobbler/kickstarts/*
+/var/www/beaker/rhts-checkin
+
+%changelog
+* Tue May 12 2009 Bill Peck <bpeck@redhat.com> - 0.3-1
+- First stab at client interface
diff --git a/git_rules.mk b/git_rules.mk
new file mode 100644
index 0000000..dc74138
--- /dev/null
+++ b/git_rules.mk
@@ -0,0 +1,31 @@
+# License: GPL v2 or later
+# Copyright Red Hat Inc. 2008
+
+ifndef SCM_BRANCH
+ SCM_REMOTE_BRANCH = master
+endif
+ifndef SCM_LOCAL_BRANCH
+ SCM_LOCAL_BRANCH = $(SCM_REMOTE_BRANCH)
+endif
+
+SCM_ACTUAL_REMOTE_BRANCH = $(notdir $(shell git-config branch.$(SCM_LOCAL_BRANCH).merge))
+
+SCM_REMOTEREPO_NICKNAME = $(shell git-config branch.$(SCM_LOCAL_BRANCH).remote)
+SCM_REMOTEREPO = $(shell git-config remote.$(SCM_REMOTEREPO_NICKNAME).url)
+
+SCM_CHECK_INCOMING_CHANGES = [ -n "$$(git-fetch >&/dev/null && git-log ..$(SCM_REMOTEREPO_NICKNAME)/$(SCM_REMOTE_BRANCH))" ]
+SCM_CHECK_MODS = [ -n "$$(git-diff)" -o -n "$$(git-diff -a)" ]
+SCM_CHECK_TAG = [ -n "$$(git-tag -l $(SCM_TAG))" ]
+
+SCM_PULL_COMMAND = git-pull
+SCM_TAG_COMMAND = git-tag $(SCM_FORCE_FLAG) $(SCM_TAG)
+SCM_LAST_TAG_REV = $(shell git-rev-list --no-walk -n1 $$(git-tag))
+SCM_LAST_TAG = $(shell git tag | while read tag; do if [ "$$(git-rev-parse $$tag)" = "$(SCM_LAST_TAG_REV)" ]; then echo "$$tag"; break; fi; done)
+SCM_DIFF_TAG_COMMAND = git-diff $(SCM_TAG)
+SCM_DIFF_LAST_TAG_COMMAND = git-diff $(SCM_LAST_TAG)
+SCM_PUSH_REMOTE_COMMAND = { git-push --all $(SCM_REMOTEREPO) && git-push --tags $(SCM_REMOTEREPO); }
+SCM_SNAP_ARCHIVE_COMMAND = git-archive --format=tar --prefix=$(PKGNAME)-$(PKGVERSION)/ HEAD | bzip2 -9 > $(PKGNAME)-$(PKGVERSION).tar.bz2
+SCM_ARCHIVE_COMMAND = git-archive --format=tar --prefix=$(PKGNAME)-$(PKGVERSION)/ $(SCM_TAG) | bzip2 -9 > $(PKGNAME)-$(PKGVERSION).tar.bz2
+SCM_LASTLOG_COMMAND = git-log $(SCM_TAG)..
+
+include scm_rules.mk
diff --git a/py_rules.mk b/py_rules.mk
new file mode 100644
index 0000000..c84d279
--- /dev/null
+++ b/py_rules.mk
@@ -0,0 +1,42 @@
+# License: GPL v2 or later
+# Copyright Red Hat Inc. 2008
+
+ifndef DESTDIR
+ DESTDIR = /
+endif
+
+ifndef PY_SOURCES
+ PY_SOURCES = $(wildcard src/*.py)
+endif
+
+ifndef SETUP_PY
+ SETUP_PY = setup.py
+endif
+
+ifndef PY_TOPDIR
+ PY_TOPDIR = $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
+endif
+
+#_SETUP_PY = $(PY_TOPDIR)/$(SETUP_PY)
+_SETUP_PY = $(SETUP_PY)
+
+$(_SETUP_PY): $(_SETUP_PY).in
+ sed -e 's/@VERSION@/$(PKGVERSION)/g' < $< > $@
+
+py-build-ext: $(_SETUP_PY) $(PY_SOURCES)
+ python $(SETUP_PY) build_ext -i
+
+py-build: $(_SETUP_PY) $(PY_SOURCES)
+ python $(SETUP_PY) build
+
+py-install: $(_SETUP_PY)
+ python $(SETUP_PY) install -O1 --skip-build --root $(DESTDIR)
+
+py-clean: $(_SETUP_PY)
+ python $(SETUP_PY) clean; \
+ rm -f $(SETUP_PY); \
+ rm -rf build
+
+py-check:
+ pychecker -F pycheckrc $(PY_SOURCES)
+
diff --git a/rpmspec_rules.mk b/rpmspec_rules.mk
new file mode 100644
index 0000000..c47af8d
--- /dev/null
+++ b/rpmspec_rules.mk
@@ -0,0 +1,4 @@
+# License: GPL v2 or later
+# Copyright Red Hat Inc. 2008
+
+PKGVERSION=$(shell awk 'BEGIN { found = 0 } /Version:/ { if (found == 0) { found = 1; print $$2 } }' $(PKGNAME).spec)
diff --git a/scm_rules.mk b/scm_rules.mk
new file mode 100644
index 0000000..bbdb5dc
--- /dev/null
+++ b/scm_rules.mk
@@ -0,0 +1,126 @@
+# License: GPL v2 or later
+# Copyright Red Hat Inc. 2008
+
+ifndef SCM_REMOTE_BRANCH
+ SCM_REMOTE_BRANCH = dummy
+endif
+
+ifndef SCM_LOCAL_BRANCH
+ SCM_LOCAL_BRANCH = $(SCM_REMOTE_BRANCH)
+endif
+
+ifndef SCM_ACTUAL_REMOTE_BRANCH
+ SCM_ACTUAL_REMOTE_BRANCH = $(SCM_REMOTE_BRANCH)
+endif
+
+ifndef SCM_TAG
+ SCM_TAG = $(PKGNAME)-$(subst .,_,$(PKGVERSION))
+endif
+
+ifndef FORCETAG
+ SCM_FORCE_FLAG =
+else
+ SCM_FORCE_FLAG = -f
+endif
+
+ifndef SCM_CHANGED_FILES_SINCE_TAG_COMMAND
+ SCM_CHANGED_FILES_SINCE_TAG_COMMAND = $(SCM_DIFF_TAG_COMMAND) | egrep '^---|^\+\+\+' | sed 's:^...[ ][ ]*[ab]/::g' | sort -u
+endif
+
+checkmods:
+ @if $(SCM_CHECK_MODS); then \
+ echo There are modifications not yet committed. Commit these first. >&2; \
+ exit 1; \
+ fi
+
+checkrepo:
+ifndef BYPASSUPSTREAM
+ @x=0; \
+ if [ -z "$$(echo $(SCM_REMOTEREPO) | egrep -x '$(SCM_REMOTEREPO_RE)')" ]; then \
+ echo The repository $(SCM_REMOTEREPO) is not the upstream of $(PKGNAME). >&2; \
+ x=1; \
+ fi; if [ "$(SCM_REMOTE_BRANCH)" != "$(SCM_ACTUAL_REMOTE_BRANCH)" ]; then \
+ echo The remote branch must be $(SCM_REMOTE_BRANCH), not $(SCM_ACTUAL_REMOTE_BRANCH) >&2; \
+ x=1; \
+ fi; if [ "$$x" -ne 0 ]; then \
+ echo Pushing to anywhere else may not be helpful when creating an archive. >&2; \
+ echo Use BYPASSUPSTREAM=1 to not access upstream or FORCEPUSH=1 to push anyway. >&2; \
+ exit 1; \
+ fi
+endif
+
+incoming: checkrepo
+ @if $(SCM_CHECK_INCOMING_CHANGES); then \
+ echo There are incoming changes which need to be integrated. >&2; \
+ echo Pull them with "$(SCM_PULL_COMMAND)" and resolve possible conflicts. >&2; \
+ exit 1; \
+ fi
+
+tag:
+ifndef FORCETAG
+ @if $(SCM_CHECK_TAG); then \
+ echo "Tag $(SCM_TAG) exists already. Use FORCETAG=1 to force tagging." >&2 ; \
+ exit 1; \
+ fi
+endif
+ @if [ -n "$(FORCETAG)" ]; then \
+ tagcmd="$(SCM_FORCE_TAG_COMMAND)"; \
+ else \
+ tagcmd="$(SCM_TAG_COMMAND)"; \
+ fi; \
+ if [ -n "$(SCM_LAST_TAG)" -a -z "$$($(SCM_DIFF_LAST_TAG_COMMAND))" ]; then \
+ echo "No differences to last tagged release '$(SCM_LAST_TAG)'. Not tagging."; \
+ else \
+ echo "Tagging '$(SCM_TAG)'."; \
+ $(SCM_TAG_COMMAND); \
+ fi
+
+ifdef FORCEPUSH
+archivepush:
+else
+archivepush: checkrepo
+endif
+ifndef BYPASSUPSTREAM
+ @echo Pushing to repository $(SCM_REMOTEREPO).
+ @if ! $(SCM_PUSH_REMOTE_COMMAND); then \
+ echo Pushing failed. >&2; \
+ echo Use BYPASSUPSTREAM=1 to bypass pushing. >&2; \
+ exit 1; \
+ fi
+endif
+
+archive: checkmods incoming tag archivepush
+ifndef FORCEARCHIVE
+ @if [ -e "${PKGNAME}-$(PKGVERSION).tar.bz2" ]; then \
+ echo "File ${PKGNAME}-$(PKGVERSION).tar.bz2 exists already." >&2; \
+ echo "Use FORCEARCHIVE=1 to force overwriting it." >&2; \
+ exit 1; \
+ fi
+endif
+ @$(SCM_ARCHIVE_COMMAND)
+ @echo "The archive is in ${PKGNAME}-$(PKGVERSION).tar.bz2"
+
+snaparchive:
+ @$(SCM_SNAP_ARCHIVE_COMMAND)
+ @echo "The _local_ snapshot archive is in ${PKGNAME}-$(PKGVERSION).tar.bz2"
+
+dif: diff
+
+diff:
+ @echo Differences to tag $(SCM_TAG):
+ @echo
+ @$(SCM_DIFF_TAG_COMMAND)
+
+sdif: shortdiff
+
+shortdiff:
+ @echo Files changed since tag $(SCM_TAG):
+ @echo
+ @$(SCM_CHANGED_FILES_SINCE_TAG_COMMAND)
+
+llog: lastlog
+
+lastlog:
+ @echo Log since tag $(SCM_TAG)
+ @echo
+ @$(SCM_LASTLOG_COMMAND)
diff --git a/upload_rules.mk b/upload_rules.mk
new file mode 100644
index 0000000..6b8793c
--- /dev/null
+++ b/upload_rules.mk
@@ -0,0 +1,20 @@
+# License: GPL v2 or later
+# Copyright Red Hat Inc. 2008
+
+ifdef UPLOAD_URL
+upload:
+ @url="$(UPLOAD_URL)"; \
+ case "$$url" in \
+ ssh://*) \
+ url="$${url#ssh://}"; \
+ userhostname="$${url%%/*}"; \
+ path="$${url#*/}"; \
+ echo Copying "$(PKGNAME)-$(PKGVERSION).tar.bz2" to "$$userhostname:$$path"; \
+ scp "$(PKGNAME)-$(PKGVERSION).tar.bz2" "$$userhostname:$$path"; \
+ ;; \
+ *) \
+ echo Unknown method. >&2; \
+ exit 1; \
+ ;; \
+ esac
+endif