Commit 9ff82f06 authored by Jérome Perrin's avatar Jérome Perrin

Capacity Project is part of job family

parent 92308a8e
...@@ -33,7 +33,6 @@ from Entity import Entity ...@@ -33,7 +33,6 @@ from Entity import Entity
# =========================================================================== # ===========================================================================
class CapacityProject(Entity): class CapacityProject(Entity):
type="CapacityProject" type="CapacityProject"
class_name = 'Dream.CapacityProject'
def __init__(self, id=None, name=None, capacityRequirementDict={}): def __init__(self, id=None, name=None, capacityRequirementDict={}):
Entity.__init__(self, id, name) Entity.__init__(self, id, name)
...@@ -48,8 +47,9 @@ class CapacityProject(Entity): ...@@ -48,8 +47,9 @@ class CapacityProject(Entity):
# ======================================================================= # =======================================================================
def outputResultsJSON(self): def outputResultsJSON(self):
from Globals import G from Globals import G
json = {'_class': self.class_name, json = {'_class': 'Dream.%s' % (self.__class__.__name__),
'id': self.id, 'id': self.id,
'family': 'Job',
'results': {}} 'results': {}}
if (G.numberOfReplications == 1): if (G.numberOfReplications == 1):
# if we had just one replication output the results as numbers # if we had just one replication output the results as numbers
......
...@@ -129,6 +129,7 @@ ...@@ -129,6 +129,7 @@
}, },
{ {
"_class": "Dream.CapacityProject", "_class": "Dream.CapacityProject",
"family": "Job",
"id": "P1", "id": "P1",
"results": { "results": {
"schedule": [ "schedule": [
...@@ -147,6 +148,7 @@ ...@@ -147,6 +148,7 @@
}, },
{ {
"_class": "Dream.CapacityProject", "_class": "Dream.CapacityProject",
"family": "Job",
"id": "P2", "id": "P2",
"results": { "results": {
"schedule": [ "schedule": [
......
...@@ -247,6 +247,7 @@ ...@@ -247,6 +247,7 @@
}, },
{ {
"_class": "Dream.CapacityProject", "_class": "Dream.CapacityProject",
"family": "Job",
"id": "P1", "id": "P1",
"results": { "results": {
"schedule": [ "schedule": [
...@@ -275,6 +276,7 @@ ...@@ -275,6 +276,7 @@
}, },
{ {
"_class": "Dream.CapacityProject", "_class": "Dream.CapacityProject",
"family": "Job",
"id": "P2", "id": "P2",
"results": { "results": {
"schedule": [ "schedule": [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment