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
5d80f4d6
Commit
5d80f4d6
authored
Jan 26, 2023
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: fix tests
parent
7c56dd1a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMCreateUpgradeDecisionSkins.py
...ents/test.erp5.testSlapOSPDMCreateUpgradeDecisionSkins.py
+26
-26
No files found.
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMCreateUpgradeDecisionSkins.py
View file @
5d80f4d6
...
@@ -67,7 +67,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -67,7 +67,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
# Not allocated
# Not allocated
##########################################################################
##########################################################################
def
test_createUpgradeDecision_notAllocated_newReleaseOnComputeNode
(
self
):
def
test_createUpgradeDecision_notAllocated_newReleaseOnComputeNode
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
...
@@ -80,7 +80,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -80,7 +80,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
)
)
def
test_createUpgradeDecision_notAllocated_newReleaseOnRemoteNode
(
self
):
def
test_createUpgradeDecision_notAllocated_newReleaseOnRemoteNode
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
node
=
"remote"
)
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
node
=
"remote"
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for remote node"
,
compute_node
,
software_product
,
self
.
addAllocationSupply
(
"for remote node"
,
compute_node
,
software_product
,
...
@@ -93,7 +93,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -93,7 +93,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
)
)
def
test_createUpgradeDecision_notAllocated_newReleaseOnInstanceNode
(
self
):
def
test_createUpgradeDecision_notAllocated_newReleaseOnInstanceNode
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
node
=
"instance"
)
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
"impossible"
,
node
=
"instance"
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for instance node"
,
compute_node
,
software_product
,
self
.
addAllocationSupply
(
"for instance node"
,
compute_node
,
software_product
,
...
@@ -103,7 +103,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -103,7 +103,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
def
test_createUpgradeDecision_notAllocated_sameRelease
(
self
):
def
test_createUpgradeDecision_notAllocated_sameRelease
(
self
):
software_product
,
release_variation
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
software_product
,
release_variation
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
self
.
addAllocationSupply
(
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
"for compute node"
,
compute_node
,
software_product
,
...
@@ -112,7 +112,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -112,7 +112,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
def
test_createUpgradeDecision_notAllocated_twoRelease
(
self
):
def
test_createUpgradeDecision_notAllocated_twoRelease
(
self
):
software_product
,
release_variation
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
software_product
,
release_variation
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
self
.
addAllocationSupply
(
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
"for compute node"
,
compute_node
,
software_product
,
...
@@ -125,7 +125,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -125,7 +125,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
def
test_createUpgradeDecision_notAllocated_newRelease_ongoingDecision
(
self
):
def
test_createUpgradeDecision_notAllocated_newRelease_ongoingDecision
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node 2"
,
compute_node
,
software_product
,
self
.
addAllocationSupply
(
"for compute node 2"
,
compute_node
,
software_product
,
...
@@ -141,7 +141,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -141,7 +141,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
def
test_createUpgradeDecision_notAllocated_newRelease_ongoingDecisionActivity
(
self
):
def
test_createUpgradeDecision_notAllocated_newRelease_ongoingDecisionActivity
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node 2"
,
compute_node
,
software_product
,
self
.
addAllocationSupply
(
"for compute node 2"
,
compute_node
,
software_product
,
...
@@ -157,7 +157,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -157,7 +157,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
def
test_createUpgradeDecision_notAllocated_newRelease_cancelledDecision
(
self
):
def
test_createUpgradeDecision_notAllocated_newRelease_cancelledDecision
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node 2"
,
compute_node
,
software_product
,
self
.
addAllocationSupply
(
"for compute node 2"
,
compute_node
,
software_product
,
...
@@ -178,7 +178,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -178,7 +178,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
)
)
def
test_createUpgradeDecision_notAllocated_newRelease_rejectedDecisionSameRelease
(
self
):
def
test_createUpgradeDecision_notAllocated_newRelease_rejectedDecisionSameRelease
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node 2"
,
compute_node
,
software_product
,
self
.
addAllocationSupply
(
"for compute node 2"
,
compute_node
,
software_product
,
...
@@ -196,7 +196,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -196,7 +196,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
def
test_createUpgradeDecision_notAllocated_newRelease_rejectedDecisionAnotherRelease
(
self
):
def
test_createUpgradeDecision_notAllocated_newRelease_rejectedDecisionAnotherRelease
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
()
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
supply
=
self
.
addAllocationSupply
(
"for compute node 2"
,
compute_node
,
software_product
,
supply
=
self
.
addAllocationSupply
(
"for compute node 2"
,
compute_node
,
software_product
,
...
@@ -225,7 +225,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -225,7 +225,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
# Shared not allocated
# Shared not allocated
##########################################################################
##########################################################################
def
test_createUpgradeDecision_sharedNotAllocated_newReleaseOnComputeNode
(
self
):
def
test_createUpgradeDecision_sharedNotAllocated_newReleaseOnComputeNode
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
shared
=
True
)
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
shared
=
True
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
...
@@ -235,7 +235,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -235,7 +235,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
def
test_createUpgradeDecision_sharedNotAllocated_newReleaseOnRemoteNode
(
self
):
def
test_createUpgradeDecision_sharedNotAllocated_newReleaseOnRemoteNode
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
shared
=
True
,
node
=
"remote"
)
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
shared
=
True
,
node
=
"remote"
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for remote node"
,
compute_node
,
software_product
,
self
.
addAllocationSupply
(
"for remote node"
,
compute_node
,
software_product
,
...
@@ -248,7 +248,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -248,7 +248,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
)
)
def
test_createUpgradeDecision_sharedNotAllocated_newReleaseOnInstanceNode
(
self
):
def
test_createUpgradeDecision_sharedNotAllocated_newReleaseOnInstanceNode
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
shared
=
True
,
node
=
"instance"
)
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
shared
=
True
,
node
=
"instance"
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for instance node"
,
compute_node
,
software_product
,
self
.
addAllocationSupply
(
"for instance node"
,
compute_node
,
software_product
,
...
@@ -264,7 +264,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -264,7 +264,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
# Allocated on Compute Node
# Allocated on Compute Node
##########################################################################
##########################################################################
def
test_createUpgradeDecision_allocatedOnComputeNode_newReleaseOnAnotherComputeNode
(
self
):
def
test_createUpgradeDecision_allocatedOnComputeNode_newReleaseOnAnotherComputeNode
(
self
):
software_product
,
_
,
type_variation
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
is_allocated
=
True
)
software_product
,
_
,
type_variation
,
_
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
)
project
=
instance_tree
.
getFollowUpValue
()
project
=
instance_tree
.
getFollowUpValue
()
person
=
instance_tree
.
getDestinationSectionValue
()
person
=
instance_tree
.
getDestinationSectionValue
()
...
@@ -286,7 +286,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -286,7 +286,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
def
test_createUpgradeDecision_allocatedOnComputeNode_newReleaseOnComputeNode
(
self
):
def
test_createUpgradeDecision_allocatedOnComputeNode_newReleaseOnComputeNode
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
is_allocated
=
True
)
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
...
@@ -299,7 +299,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -299,7 +299,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
)
)
def
test_createUpgradeDecision_allocatedOnComputeNode_twoRelease
(
self
):
def
test_createUpgradeDecision_allocatedOnComputeNode_twoRelease
(
self
):
software_product
,
release_variation
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
is_allocated
=
True
)
software_product
,
release_variation
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
)
self
.
addAllocationSupply
(
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
"for compute node"
,
compute_node
,
software_product
,
...
@@ -315,7 +315,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -315,7 +315,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
# Shared allocated on Compute Node
# Shared allocated on Compute Node
##########################################################################
##########################################################################
def
test_createUpgradeDecision_slaveAllocatedOnComputeNodeSameTree_newReleaseOnComputeNodeButNotTree
(
self
):
def
test_createUpgradeDecision_slaveAllocatedOnComputeNodeSameTree_newReleaseOnComputeNodeButNotTree
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
is_allocated
=
True
,
shared
=
True
)
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
...
@@ -327,7 +327,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -327,7 +327,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
def
test_createUpgradeDecision_slaveAllocatedOnComputeNodeSameTree_newReleaseOnComputeNode
(
self
):
def
test_createUpgradeDecision_slaveAllocatedOnComputeNodeSameTree_newReleaseOnComputeNode
(
self
):
# A Slave Instance can not be the root instance and allocated on the same tree
# A Slave Instance can not be the root instance and allocated on the same tree
# at the same time
# at the same time
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
is_allocated
=
True
,
shared
=
True
)
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
...
@@ -341,7 +341,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -341,7 +341,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
# Allocated on Remote Node
# Allocated on Remote Node
##########################################################################
##########################################################################
def
test_createUpgradeDecision_allocatedOnRemoteNode_newReleaseOnRemoteNode
(
self
):
def
test_createUpgradeDecision_allocatedOnRemoteNode_newReleaseOnRemoteNode
(
self
):
software_product
,
_
,
type_variation
,
remote_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
is_allocated
=
True
,
node
=
"remote"
)
software_product
,
_
,
type_variation
,
remote_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
node
=
"remote"
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for remote node"
,
remote_node
,
software_product
,
self
.
addAllocationSupply
(
"for remote node"
,
remote_node
,
software_product
,
...
@@ -354,7 +354,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -354,7 +354,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
)
)
def
test_createUpgradeDecision_allocatedOnRemoteNode_twoRelease
(
self
):
def
test_createUpgradeDecision_allocatedOnRemoteNode_twoRelease
(
self
):
software_product
,
release_variation
,
type_variation
,
remote_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
is_allocated
=
True
,
node
=
"remote"
)
software_product
,
release_variation
,
type_variation
,
remote_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
node
=
"remote"
)
self
.
addAllocationSupply
(
self
.
addAllocationSupply
(
"for remote node"
,
remote_node
,
software_product
,
"for remote node"
,
remote_node
,
software_product
,
...
@@ -367,7 +367,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -367,7 +367,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
def
test_createUpgradeDecision_allocatedOnRemoteNode_newReleaseOnAnoterRemoteNode
(
self
):
def
test_createUpgradeDecision_allocatedOnRemoteNode_newReleaseOnAnoterRemoteNode
(
self
):
software_product
,
_
,
type_variation
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
is_allocated
=
True
,
node
=
"remote"
)
software_product
,
_
,
type_variation
,
_
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
node
=
"remote"
)
project
=
instance_tree
.
getFollowUpValue
()
project
=
instance_tree
.
getFollowUpValue
()
remote_node2
=
self
.
portal
.
compute_node_module
.
newContent
(
remote_node2
=
self
.
portal
.
compute_node_module
.
newContent
(
...
@@ -386,7 +386,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -386,7 +386,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
# Shared allocated on Remote Node
# Shared allocated on Remote Node
##########################################################################
##########################################################################
def
test_createUpgradeDecision_slaveAllocatedOnRemoteNode_newReleaseOnComputeNode
(
self
):
def
test_createUpgradeDecision_slaveAllocatedOnRemoteNode_newReleaseOnComputeNode
(
self
):
software_product
,
_
,
type_variation
,
remote_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
is_allocated
=
True
,
shared
=
True
,
node
=
"remote"
)
software_product
,
_
,
type_variation
,
remote_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
,
node
=
"remote"
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for remote node"
,
remote_node
,
software_product
,
self
.
addAllocationSupply
(
"for remote node"
,
remote_node
,
software_product
,
...
@@ -399,7 +399,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -399,7 +399,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
)
)
def
test_createUpgradeDecision_slaveAllocatedOnRemoteNode_twoRelease
(
self
):
def
test_createUpgradeDecision_slaveAllocatedOnRemoteNode_twoRelease
(
self
):
software_product
,
release_variation
,
type_variation
,
remote_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
is_allocated
=
True
,
shared
=
True
,
node
=
"remote"
)
software_product
,
release_variation
,
type_variation
,
remote_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
,
node
=
"remote"
)
self
.
addAllocationSupply
(
self
.
addAllocationSupply
(
"for remote node"
,
remote_node
,
software_product
,
"for remote node"
,
remote_node
,
software_product
,
...
@@ -412,7 +412,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -412,7 +412,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
def
test_createUpgradeDecision_slaveAllocatedOnRemoteNode_newReleaseOnAnoterRemoteNode
(
self
):
def
test_createUpgradeDecision_slaveAllocatedOnRemoteNode_newReleaseOnAnoterRemoteNode
(
self
):
software_product
,
_
,
type_variation
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
is_allocated
=
True
,
shared
=
True
,
node
=
"remote"
)
software_product
,
_
,
type_variation
,
_
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
,
node
=
"remote"
)
project
=
instance_tree
.
getFollowUpValue
()
project
=
instance_tree
.
getFollowUpValue
()
remote_node2
=
self
.
portal
.
compute_node_module
.
newContent
(
remote_node2
=
self
.
portal
.
compute_node_module
.
newContent
(
...
@@ -431,7 +431,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -431,7 +431,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
# Shared allocated on Instance Node
# Shared allocated on Instance Node
##########################################################################
##########################################################################
def
test_createUpgradeDecision_slaveAllocatedOnInstanceNode_newReleaseOnInstanceNode
(
self
):
def
test_createUpgradeDecision_slaveAllocatedOnInstanceNode_newReleaseOnInstanceNode
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
is_allocated
=
True
,
shared
=
True
,
node
=
"instance"
)
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
,
node
=
"instance"
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
...
@@ -443,7 +443,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -443,7 +443,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
instance_tree
,
software_product
,
new_release_variation
,
type_variation
instance_tree
,
software_product
,
new_release_variation
,
type_variation
)
)
def
test_createUpgradeDecision_slaveAllocatedOnInstanceNode_newReleaseOnAnotherInstanceNode
(
self
):
def
test_createUpgradeDecision_slaveAllocatedOnInstanceNode_newReleaseOnAnotherInstanceNode
(
self
):
software_product
,
_
,
type_variation
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
is_allocated
=
True
,
shared
=
True
,
node
=
"instance"
)
software_product
,
_
,
type_variation
,
_
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
,
node
=
"instance"
)
project
=
instance_tree
.
getFollowUpValue
()
project
=
instance_tree
.
getFollowUpValue
()
instance_node2
=
self
.
portal
.
compute_node_module
.
newContent
(
instance_node2
=
self
.
portal
.
compute_node_module
.
newContent
(
...
...
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