Add job.nodeset parameter to supercede job.nodes
We intended to have Nodesets be convenience methods for the 'nodes' attribute of jobs, but be identical. When nodesets grew groups, however, job.nodes did not. Because of the additional structure that nodesets contain (to support groups, and likely vars in the future), we can't simply extend the existing nodes parameter. Add a new parameter, nodeset, which expects either a string or an embedded nodeset definition. We're using the name 'nodeset' here because 'nodes: nodes:' is difficult to understand. Job.nodes will be removed soon. (Re-proposed from I714887625c41bd1220ff05cd7356fbac589389c9) Change-Id: I6c1c1e864704ac659efae9b28b140d9b37cef9d2
This commit is contained in:
@@ -190,10 +190,12 @@ class TestJob(BaseTestCase):
|
||||
'timeout': 30,
|
||||
'pre-run': 'base-pre',
|
||||
'post-run': 'base-post',
|
||||
'nodes': [{
|
||||
'name': 'controller',
|
||||
'label': 'base',
|
||||
}],
|
||||
'nodeset': {
|
||||
'nodes': [{
|
||||
'name': 'controller',
|
||||
'label': 'base',
|
||||
}],
|
||||
},
|
||||
})
|
||||
layout.addJob(base)
|
||||
python27 = configloader.JobParser.fromYaml(tenant, layout, {
|
||||
@@ -203,10 +205,12 @@ class TestJob(BaseTestCase):
|
||||
'parent': 'base',
|
||||
'pre-run': 'py27-pre',
|
||||
'post-run': ['py27-post-a', 'py27-post-b'],
|
||||
'nodes': [{
|
||||
'name': 'controller',
|
||||
'label': 'new',
|
||||
}],
|
||||
'nodeset': {
|
||||
'nodes': [{
|
||||
'name': 'controller',
|
||||
'label': 'new',
|
||||
}],
|
||||
},
|
||||
'timeout': 40,
|
||||
})
|
||||
layout.addJob(python27)
|
||||
@@ -220,10 +224,12 @@ class TestJob(BaseTestCase):
|
||||
'pre-run': 'py27-diablo-pre',
|
||||
'run': 'py27-diablo',
|
||||
'post-run': 'py27-diablo-post',
|
||||
'nodes': [{
|
||||
'name': 'controller',
|
||||
'label': 'old',
|
||||
}],
|
||||
'nodeset': {
|
||||
'nodes': [{
|
||||
'name': 'controller',
|
||||
'label': 'old',
|
||||
}],
|
||||
},
|
||||
'timeout': 50,
|
||||
})
|
||||
layout.addJob(python27diablo)
|
||||
|
||||
Reference in New Issue
Block a user