Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos.core
Commits
b6da6ee4
Commit
b6da6ee4
authored
Jan 05, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: _makeComplexComputeNode need a project
parent
6051413e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
9 deletions
+22
-9
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
...teItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
+22
-9
No files found.
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
View file @
b6da6ee4
...
@@ -370,7 +370,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -370,7 +370,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
self
.
tic
()
self
.
tic
()
return
self
.
computer_network
return
self
.
computer_network
def
_makeComplexComputeNode
(
self
,
person
=
None
,
with_slave
=
False
):
def
_makeComplexComputeNode
(
self
,
p
roject
,
p
erson
=
None
,
with_slave
=
False
):
for
i
in
range
(
1
,
5
):
for
i
in
range
(
1
,
5
):
id_
=
'partition%s'
%
i
id_
=
'partition%s'
%
i
p
=
self
.
compute_node
.
newContent
(
portal_type
=
'Compute Partition'
,
p
=
self
.
compute_node
.
newContent
(
portal_type
=
'Compute Partition'
,
...
@@ -388,7 +388,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -388,7 +388,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
url_string
=
self
.
generateNewSoftwareReleaseUrl
(),
url_string
=
self
.
generateNewSoftwareReleaseUrl
(),
aggregate
=
self
.
compute_node
.
getRelativeUrl
(),
aggregate
=
self
.
compute_node
.
getRelativeUrl
(),
reference
=
'TESTSOFTINST-%s'
%
self
.
generateNewId
(),
reference
=
'TESTSOFTINST-%s'
%
self
.
generateNewId
(),
title
=
'Start requested for %s'
%
self
.
compute_node
.
getTitle
()
title
=
'Start requested for %s'
%
self
.
compute_node
.
getTitle
(),
follow_up_value
=
project
)
)
self
.
start_requested_software_installation
.
validate
()
self
.
start_requested_software_installation
.
validate
()
self
.
start_requested_software_installation
.
requestStart
()
self
.
start_requested_software_installation
.
requestStart
()
...
@@ -399,7 +400,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -399,7 +400,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
url_string
=
self
.
generateNewSoftwareReleaseUrl
(),
url_string
=
self
.
generateNewSoftwareReleaseUrl
(),
aggregate
=
self
.
compute_node
.
getRelativeUrl
(),
aggregate
=
self
.
compute_node
.
getRelativeUrl
(),
reference
=
'TESTSOFTINST-%s'
%
self
.
generateNewId
(),
reference
=
'TESTSOFTINST-%s'
%
self
.
generateNewId
(),
title
=
'Destroy requested for %s'
%
self
.
compute_node
.
getTitle
()
title
=
'Destroy requested for %s'
%
self
.
compute_node
.
getTitle
(),
follow_up_value
=
project
)
)
self
.
destroy_requested_software_installation
.
validate
()
self
.
destroy_requested_software_installation
.
validate
()
self
.
destroy_requested_software_installation
.
requestStart
()
self
.
destroy_requested_software_installation
.
requestStart
()
...
@@ -411,7 +413,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -411,7 +413,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
url_string
=
self
.
generateNewSoftwareReleaseUrl
(),
url_string
=
self
.
generateNewSoftwareReleaseUrl
(),
aggregate
=
self
.
compute_node
.
getRelativeUrl
(),
aggregate
=
self
.
compute_node
.
getRelativeUrl
(),
reference
=
'TESTSOFTINST-%s'
%
self
.
generateNewId
(),
reference
=
'TESTSOFTINST-%s'
%
self
.
generateNewId
(),
title
=
'Destroyed for %s'
%
self
.
compute_node
.
getTitle
()
title
=
'Destroyed for %s'
%
self
.
compute_node
.
getTitle
(),
follow_up_value
=
project
)
)
self
.
destroyed_software_installation
.
validate
()
self
.
destroyed_software_installation
.
validate
()
self
.
destroyed_software_installation
.
requestStart
()
self
.
destroyed_software_installation
.
requestStart
()
...
@@ -430,6 +433,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -430,6 +433,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
title
=
self
.
generateNewSoftwareTitle
(),
title
=
self
.
generateNewSoftwareTitle
(),
reference
=
"TESTSI-%s"
%
self
.
generateNewId
(),
reference
=
"TESTSI-%s"
%
self
.
generateNewId
(),
destination_section_value
=
person
,
destination_section_value
=
person
,
follow_up_value
=
project
)
)
kw
=
dict
(
kw
=
dict
(
software_release
=
\
software_release
=
\
...
@@ -439,7 +443,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -439,7 +443,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
sla_xml
=
self
.
generateSafeXml
(),
sla_xml
=
self
.
generateSafeXml
(),
shared
=
False
,
shared
=
False
,
software_title
=
instance_tree
.
getTitle
(),
software_title
=
instance_tree
.
getTitle
(),
state
=
'started'
state
=
'started'
,
project_reference
=
project
.
getReference
()
)
)
instance_tree
.
requestStart
(
**
kw
)
instance_tree
.
requestStart
(
**
kw
)
instance_tree
.
requestInstance
(
**
kw
)
instance_tree
.
requestInstance
(
**
kw
)
...
@@ -455,6 +460,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -455,6 +460,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
title
=
self
.
generateNewSoftwareTitle
(),
title
=
self
.
generateNewSoftwareTitle
(),
reference
=
"TESTSI-%s"
%
self
.
generateNewId
(),
reference
=
"TESTSI-%s"
%
self
.
generateNewId
(),
destination_section_value
=
person
,
destination_section_value
=
person
,
follow_up_value
=
project
)
)
slave_kw
=
dict
(
slave_kw
=
dict
(
software_release
=
kw
[
'software_release'
],
software_release
=
kw
[
'software_release'
],
...
@@ -463,7 +469,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -463,7 +469,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
sla_xml
=
self
.
generateSafeXml
(),
sla_xml
=
self
.
generateSafeXml
(),
shared
=
True
,
shared
=
True
,
software_title
=
instance_tree
.
getTitle
(),
software_title
=
instance_tree
.
getTitle
(),
state
=
'started'
state
=
'started'
,
project_reference
=
project
.
getReference
()
)
)
instance_tree
.
requestStart
(
**
slave_kw
)
instance_tree
.
requestStart
(
**
slave_kw
)
instance_tree
.
requestInstance
(
**
slave_kw
)
instance_tree
.
requestInstance
(
**
slave_kw
)
...
@@ -478,6 +485,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -478,6 +485,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
title
=
self
.
generateNewSoftwareTitle
(),
title
=
self
.
generateNewSoftwareTitle
(),
reference
=
"TESTSI-%s"
%
self
.
generateNewId
(),
reference
=
"TESTSI-%s"
%
self
.
generateNewId
(),
destination_section_value
=
person
,
destination_section_value
=
person
,
follow_up_value
=
project
)
)
kw
=
dict
(
kw
=
dict
(
software_release
=
\
software_release
=
\
...
@@ -487,7 +495,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -487,7 +495,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
sla_xml
=
self
.
generateSafeXml
(),
sla_xml
=
self
.
generateSafeXml
(),
shared
=
False
,
shared
=
False
,
software_title
=
instance_tree
.
getTitle
(),
software_title
=
instance_tree
.
getTitle
(),
state
=
'stopped'
state
=
'stopped'
,
project_reference
=
project
.
getReference
()
)
)
instance_tree
.
requestStop
(
**
kw
)
instance_tree
.
requestStop
(
**
kw
)
instance_tree
.
requestInstance
(
**
kw
)
instance_tree
.
requestInstance
(
**
kw
)
...
@@ -503,6 +512,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -503,6 +512,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
instance_tree
.
edit
(
instance_tree
.
edit
(
title
=
self
.
generateNewSoftwareTitle
(),
title
=
self
.
generateNewSoftwareTitle
(),
reference
=
"TESTSI-%s"
%
self
.
generateNewId
(),
reference
=
"TESTSI-%s"
%
self
.
generateNewId
(),
follow_up_value
=
project
)
)
kw
=
dict
(
kw
=
dict
(
software_release
=
\
software_release
=
\
...
@@ -512,7 +522,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -512,7 +522,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
sla_xml
=
self
.
generateSafeXml
(),
sla_xml
=
self
.
generateSafeXml
(),
shared
=
False
,
shared
=
False
,
software_title
=
instance_tree
.
getTitle
(),
software_title
=
instance_tree
.
getTitle
(),
state
=
'stopped'
state
=
'stopped'
,
project_reference
=
project
.
getReference
()
)
)
instance_tree
.
requestStop
(
**
kw
)
instance_tree
.
requestStop
(
**
kw
)
instance_tree
.
requestInstance
(
**
kw
)
instance_tree
.
requestInstance
(
**
kw
)
...
@@ -532,6 +543,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -532,6 +543,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
instance_tree
.
edit
(
instance_tree
.
edit
(
title
=
self
.
generateNewSoftwareTitle
(),
title
=
self
.
generateNewSoftwareTitle
(),
reference
=
"TESTSI-%s"
%
self
.
generateNewId
(),
reference
=
"TESTSI-%s"
%
self
.
generateNewId
(),
follow_up_value
=
project
)
)
kw
=
dict
(
kw
=
dict
(
software_release
=
\
software_release
=
\
...
@@ -541,7 +553,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -541,7 +553,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
sla_xml
=
self
.
generateSafeXml
(),
sla_xml
=
self
.
generateSafeXml
(),
shared
=
False
,
shared
=
False
,
software_title
=
instance_tree
.
getTitle
(),
software_title
=
instance_tree
.
getTitle
(),
state
=
'stopped'
state
=
'stopped'
,
project_reference
=
project
.
getReference
()
)
)
instance_tree
.
requestStop
(
**
kw
)
instance_tree
.
requestStop
(
**
kw
)
instance_tree
.
requestInstance
(
**
kw
)
instance_tree
.
requestInstance
(
**
kw
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment