Author: justi9
Date: 2010-08-11 17:51:23 -0400 (Wed, 11 Aug 2010)
New Revision: 4201
Modified:
mgmt/newdata/cumin/python/cumin/grid/scheduler.py
mgmt/newdata/cumin/python/cumin/grid/submission.py
Log:
This change addresses bz 620706. The task modeling that we had until
this change precluded linking to a task form from more than one
context. To fix this without touching too much code, I moved the
existing task implementation to new names. A newer, more flexible
variant is now in cumin/task.py.
Also:
* Cleaned up usergrid overview
* Temporarily removed vm and dag jobs; these are coming back shortly
using the new task model
* Changed scheduler filtering in the submit UI so that it gets
filtered by pool when appropriate
Modified: mgmt/newdata/cumin/python/cumin/grid/scheduler.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/scheduler.py 2010-08-11 21:08:27 UTC (rev 4200)
+++ mgmt/newdata/cumin/python/cumin/grid/scheduler.py 2010-08-11 21:51:23 UTC (rev 4201)
@@ -90,7 +90,7 @@
return self.object.get(session)
def render_title(self, session):
- return "Scheduler"
+ return "Schedd"
class SchedulerOptions(OptionInputSet):
def do_process(self, session):
Modified: mgmt/newdata/cumin/python/cumin/grid/submission.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/submission.py 2010-08-11 21:08:27 UTC (rev 4200)
+++ mgmt/newdata/cumin/python/cumin/grid/submission.py 2010-08-11 21:51:23 UTC (rev 4201)
@@ -94,15 +94,6 @@
self.form.pool_name.set(form_session, pool.Pool)
class JobSubmit(Task):
- EXPR_TYPE, INTEGER_TYPE, FLOAT_TYPE, STRING_TYPE = 0, 1, 2, 3
- UNIVERSE = {"VANILLA": 5,
- "SCHEDULER": 7,
- "GRID": 9,
- "JAVA": 10,
- "PARALLEL": 11,
- "LOCAL": 12,
- "VM": 13}
-
def __init__(self, app):
super(JobSubmit, self).__init__(app)
@@ -159,16 +150,9 @@
cls = app.model.com_redhat_grid.Scheduler
super(JobSubmitForm, self).__init__(app, name, task, cls)
- self.pool = Attribute(app, "pool")
- self.add_attribute(self.pool)
+ self.pool_name = Attribute(app, "pool")
+ self.add_attribute(self.pool_name)
- from scheduler import SchedulerSelectField # XXX
-
- self.scheduler = SchedulerSelectField(app, "scheduler", self.pool)
- self.scheduler.required = True
- self.scheduler.help = "Create submission at this scheduler"
- self.add_field(self.scheduler)
-
self.description = self.DescriptionField(app, "description")
self.description.input.size = 50
self.description.required = True
@@ -185,7 +169,7 @@
self.requirements.input.columns = 50
self.requirements.required = True
self.requirements.help = "Attributes controlling where and when " + \
- "this submission will run"
+ "this job will run"
self.add_field(self.requirements)
self.directory = self.WorkingDirectoryField(app, "directory")
@@ -194,6 +178,12 @@
self.directory.help = "Run the process in this directory"
self.add_field(self.directory)
+ from scheduler import SchedulerSelectField # XXX
+
+ self.scheduler = SchedulerSelectField(app, "scheduler",
self.pool_name)
+ self.scheduler.help = "Submit job to this schedd"
+ self.add_extra_field(self.scheduler)
+
self.universe = self.UniverseField(app, "universe")
self.add_extra_field(self.universe)
@@ -365,12 +355,12 @@
class UniverseOptions(OptionInputSet):
def get_items(self, session):
return ((None, "Default"),
- (5, "VANILLA"),
- (7, "SCHEDULER"),
- (9, "GRID"),
- (10, "JAVA"),
- (11, "PARALLEL"),
- (12, "LOCAL"),
+ (5, "Vanilla"),
+ (7, "Scheduler"),
+ (9, "Grid"),
+ (10, "Java"),
+ (11, "Parallel"),
+ (12, "Local"),
(13, "VM"))
def render_item_value(self, session, item):