Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
397bc53c
Commit
397bc53c
authored
4 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-190
: create more units. encode prio in name for demo
parent
4052d5a8
No related branches found
No related tags found
1 merge request
!252
Resolve TMSS-190
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/TMSS/src/tmss/tmssapp/populate.py
+2
-2
2 additions, 2 deletions
SAS/TMSS/src/tmss/tmssapp/populate.py
with
2 additions
and
2 deletions
SAS/TMSS/src/tmss/tmssapp/populate.py
+
2
−
2
View file @
397bc53c
...
...
@@ -74,13 +74,13 @@ def populate_test_data():
logger
.
info
(
'
created test scheduling_set: %s
'
,
scheduling_set
.
name
)
for
unit_nr
in
range
(
2
if
'
normal
'
in
project_prio_name
else
1
):
for
unit_nr
in
range
(
3
if
'
normal
'
in
project_prio_name
else
2
):
# the 'template' in the strategy_template is a predefined json-data blob which validates against the given scheduling_unit_template
# a user might 'upload' a partial json-data blob, so add all the known defaults
scheduling_unit_spec
=
add_defaults_to_json_object_for_schema
(
strategy_template
.
template
,
strategy_template
.
scheduling_unit_template
.
schema
)
# add the scheduling_unit_doc to a new SchedulingUnitDraft instance, and were ready to use it!
scheduling_unit_draft
=
models
.
SchedulingUnitDraft
.
objects
.
create
(
name
=
"
UC1
test scheduling unit %s.%s
"
%
(
set_nr
+
1
,
unit_nr
+
1
),
scheduling_unit_draft
=
models
.
SchedulingUnitDraft
.
objects
.
create
(
name
=
"
UC1
p_%s.%s.%s
"
%
(
project_prio_name
,
set_nr
+
1
,
unit_nr
+
1
),
scheduling_set
=
scheduling_set
,
requirements_template
=
strategy_template
.
scheduling_unit_template
,
requirements_doc
=
scheduling_unit_spec
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment