Author: croberts Date: 2012-12-17 20:28:54 +0000 (Mon, 17 Dec 2012) New Revision: 5610
Modified: branches/elephant/cumin/python/cumin/gridhadoop/datanode.py branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py branches/elephant/cumin/python/cumin/gridhadoop/namenode.py branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py Log: Removing the last of the faked data.
Modified: branches/elephant/cumin/python/cumin/gridhadoop/datanode.py =================================================================== --- branches/elephant/cumin/python/cumin/gridhadoop/datanode.py 2012-12-17 17:48:56 UTC (rev 5609) +++ branches/elephant/cumin/python/cumin/gridhadoop/datanode.py 2012-12-17 20:28:54 UTC (rev 5610) @@ -81,11 +81,10 @@ self.validate(session) ids = self.selection.get(session) url = self.return_url.get(session) + hadoophost = self.hadoophost.get(session) self.page.redirect.set(session, url)
if not self.errors.get(session): - #TODO get hosts associated with each id - hadoophost = "grid2.lab.bos.redhat.com:9090" self.task.invoke(session, ids, (hadoophost))
Modified: branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py =================================================================== --- branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py 2012-12-17 17:48:56 UTC (rev 5609) +++ branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py 2012-12-17 20:28:54 UTC (rev 5610) @@ -25,24 +25,7 @@ return len(data)
def get_sage_results(self, values): - # Here's some fake data, eventually force the derived class to implement this - results = MethodResult() - results.status = "OK" - results.data = {"node1":{"Name":"node1.lab.bos.redhat.com",\ - "id":"12345", \ - "submitted":"11/14/2012", \ - "ref":{"ipc":"some fake ipc location", "id":"12345"}, \ - "state":"FAKE*Running", \ - "uptime":"2+00:54:56", \ - "owner":"croberts"}, \ - "node2":{"Name":"node2.lab.bos.redhat.com",\ - "id":"56789", \ - "ref":{"ipc":"another fake ipc location", "id":"56789"}, \ - "submitted":"11/15/2012", \ - "state":"FAKE*Running", \ - "uptime":"1+00:24:56", \ - "owner":"croberts"}} - return (results.status, results.data) + raise Exception("Not implemented")
def do_get_data(self, values): (status, data) = self.get_sage_results(values) @@ -65,10 +48,13 @@ field_data.append(val) return field_data
-class HadoopNodeDeleteForm(ObjectSelectorTaskForm): +class HadoopNodeDeleteForm(ObjectSelectorTaskForm): def __init__(self, app, name, task, cls): super(HadoopNodeDeleteForm, self).__init__(app, name, task) self.task = task + + self.hadoophost = HadoopHostField(app, "hadoophost") + self.add_child(self.hadoophost)
def get_selection(self, session): ids = self.ids.get(session) @@ -78,6 +64,17 @@ def render_form_class(self, session): return " ".join((super(HadoopNodeDeleteForm, self).render_form_class(session), "mform"))
+ def render_content(self, session, *args): + # need to show "content" which has the selected list from objectselectortaskform + # also need to render any fields by hand here since + # the usual content block gets swapped out + content = "" + content += '''<table class="FormFieldSet"><tbody>''' + content += self.hadoophost.render(session) + content += '''</tbody></table>''' + content += self.content.render(session, *args) + return content + class HadoopNodeCreateForm(ObjectTaskForm): def render_form_class(self, session): return " ".join((super(HadoopNodeCreateForm, self).render_form_class(session), "mform")) @@ -107,10 +104,7 @@
def render_title(self, session): return "Hadoop host" - - def render_help(self, session): - return "Submit hadoop jobs to this host" - + class HadoopHostOptions(OptionInputSet): def do_process(self, session): id = self.param.get(session)
Modified: branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py =================================================================== --- branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py 2012-12-17 17:48:56 UTC (rev 5609) +++ branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py 2012-12-17 20:28:54 UTC (rev 5610) @@ -86,12 +86,11 @@ def process_submit(self, session): self.validate(session) ids = self.selection.get(session) + hadoophost = self.hadoophost.get(session) url = self.return_url.get(session) self.page.redirect.set(session, url)
if not self.errors.get(session): - #TODO get hosts associated with each id - hadoophost = "grid2.lab.bos.redhat.com:9090" self.task.invoke(session, ids, (hadoophost))
def render_title(self, session):
Modified: branches/elephant/cumin/python/cumin/gridhadoop/namenode.py =================================================================== --- branches/elephant/cumin/python/cumin/gridhadoop/namenode.py 2012-12-17 17:48:56 UTC (rev 5609) +++ branches/elephant/cumin/python/cumin/gridhadoop/namenode.py 2012-12-17 20:28:54 UTC (rev 5610) @@ -135,12 +135,11 @@ def process_submit(self, session): self.validate(session) ids = self.selection.get(session) + hadoophost = self.hadoophost.get(session) url = self.return_url.get(session) self.page.redirect.set(session, url)
if not self.errors.get(session): - #TODO get hosts associated with each id - hadoophost = "grid2.lab.bos.redhat.com:9090" self.task.invoke(session, ids, (hadoophost))
def render_title(self, session):
Modified: branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py =================================================================== --- branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py 2012-12-17 17:48:56 UTC (rev 5609) +++ branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py 2012-12-17 20:28:54 UTC (rev 5610) @@ -83,12 +83,11 @@ def process_submit(self, session): self.validate(session) ids = self.selection.get(session) + hadoophost = self.hadoophost.get(session) url = self.return_url.get(session) self.page.redirect.set(session, url)
if not self.errors.get(session): - #TODO get hosts associated with each id - hadoophost = "grid2.lab.bos.redhat.com:9090" self.task.invoke(session, ids, (hadoophost))
def render_title(self, session):
cumin-developers@lists.fedorahosted.org