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
35b54ad5
Commit
35b54ad5
authored
Aug 01, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: test: disable alarm when creating an allocation supply
parent
13c1c883
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
31 deletions
+55
-31
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMCreateUpgradeDecisionSkins.py
...ents/test.erp5.testSlapOSPDMCreateUpgradeDecisionSkins.py
+55
-31
No files found.
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMCreateUpgradeDecisionSkins.py
View file @
35b54ad5
...
@@ -68,10 +68,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -68,10 +68,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
##########################################################################
##########################################################################
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
()
self
.
tic
()
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
checkCreatedUpgradeDecision
(
self
.
checkCreatedUpgradeDecision
(
...
@@ -81,10 +82,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -81,10 +82,11 @@ 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"
)
self
.
tic
()
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
checkCreatedUpgradeDecision
(
self
.
checkCreatedUpgradeDecision
(
...
@@ -94,42 +96,46 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -94,42 +96,46 @@ 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
(
allocation_state
=
"impossible"
,
node
=
"instance"
)
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
"impossible"
,
node
=
"instance"
)
self
.
tic
()
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
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
.
tic
()
self
.
addAllocationSupply
(
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
"for compute node"
,
compute_node
,
software_product
,
release_variation
,
type_variation
)
release_variation
,
type_variation
,
disable_alarm
=
True
)
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
.
tic
()
self
.
addAllocationSupply
(
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
"for compute node"
,
compute_node
,
software_product
,
release_variation
,
type_variation
)
release_variation
,
type_variation
,
disable_alarm
=
True
)
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
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
()
self
.
tic
()
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
checkCreatedUpgradeDecision
(
self
.
checkCreatedUpgradeDecision
(
...
@@ -142,10 +148,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -142,10 +148,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
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
()
self
.
tic
()
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
checkCreatedUpgradeDecision
(
self
.
checkCreatedUpgradeDecision
(
...
@@ -158,10 +165,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -158,10 +165,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
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
()
self
.
tic
()
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
upgrade_decision
=
instance_tree
.
InstanceTree_createUpgradeDecision
()
upgrade_decision
=
instance_tree
.
InstanceTree_createUpgradeDecision
()
...
@@ -179,10 +187,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -179,10 +187,11 @@ 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
()
self
.
tic
()
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
upgrade_decision
=
instance_tree
.
InstanceTree_createUpgradeDecision
()
upgrade_decision
=
instance_tree
.
InstanceTree_createUpgradeDecision
()
...
@@ -197,10 +206,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -197,10 +206,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
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
()
self
.
tic
()
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
upgrade_decision
=
instance_tree
.
InstanceTree_createUpgradeDecision
()
upgrade_decision
=
instance_tree
.
InstanceTree_createUpgradeDecision
()
...
@@ -214,7 +224,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -214,7 +224,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
new_release_variation2
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation2
=
self
.
_makeSoftwareRelease
(
software_product
)
supply
=
self
.
addAllocationSupply
(
"for compute node 3"
,
compute_node
,
software_product
,
supply
=
self
.
addAllocationSupply
(
"for compute node 3"
,
compute_node
,
software_product
,
new_release_variation2
,
type_variation
)
new_release_variation2
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
checkCreatedUpgradeDecision
(
self
.
checkCreatedUpgradeDecision
(
...
@@ -226,20 +236,22 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -226,20 +236,22 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
##########################################################################
##########################################################################
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
)
self
.
tic
()
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
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"
)
self
.
tic
()
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
checkCreatedUpgradeDecision
(
self
.
checkCreatedUpgradeDecision
(
...
@@ -249,10 +261,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -249,10 +261,11 @@ 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"
)
self
.
tic
()
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
checkCreatedUpgradeDecision
(
self
.
checkCreatedUpgradeDecision
(
...
@@ -280,7 +293,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -280,7 +293,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node 2"
,
compute_node2
,
software_product
,
self
.
addAllocationSupply
(
"for compute node 2"
,
compute_node2
,
software_product
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
...
@@ -290,7 +303,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -290,7 +303,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
checkCreatedUpgradeDecision
(
self
.
checkCreatedUpgradeDecision
(
...
@@ -300,13 +313,14 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -300,13 +313,14 @@ 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
(
allocation_state
=
'allocated'
)
software_product
,
release_variation
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
)
self
.
tic
()
self
.
addAllocationSupply
(
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
"for compute node"
,
compute_node
,
software_product
,
release_variation
,
type_variation
)
release_variation
,
type_variation
,
disable_alarm
=
True
)
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
...
@@ -316,10 +330,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -316,10 +330,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
##########################################################################
##########################################################################
def
test_createUpgradeDecision_slaveAllocatedOnComputeNodeSameTree_newReleaseOnComputeNodeButNotTree
(
self
):
def
test_createUpgradeDecision_slaveAllocatedOnComputeNodeSameTree_newReleaseOnComputeNodeButNotTree
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
)
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
)
self
.
tic
()
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
...
@@ -328,11 +343,12 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -328,11 +343,12 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
# 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
(
allocation_state
=
'allocated'
,
shared
=
True
)
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
)
self
.
tic
()
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
,
new_release_variation
,
type_variation
,
new_release_variation
,
type_variation
,
is_slave_on_same_instance_tree_allocable
=
True
)
is_slave_on_same_instance_tree_allocable
=
True
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
...
@@ -342,10 +358,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -342,10 +358,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
##########################################################################
##########################################################################
def
test_createUpgradeDecision_allocatedOnRemoteNode_newReleaseOnRemoteNode
(
self
):
def
test_createUpgradeDecision_allocatedOnRemoteNode_newReleaseOnRemoteNode
(
self
):
software_product
,
_
,
type_variation
,
remote_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
node
=
"remote"
)
software_product
,
_
,
type_variation
,
remote_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
node
=
"remote"
)
self
.
tic
()
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
checkCreatedUpgradeDecision
(
self
.
checkCreatedUpgradeDecision
(
...
@@ -355,19 +372,21 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -355,19 +372,21 @@ 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
(
allocation_state
=
'allocated'
,
node
=
"remote"
)
software_product
,
release_variation
,
type_variation
,
remote_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
node
=
"remote"
)
self
.
tic
()
self
.
addAllocationSupply
(
self
.
addAllocationSupply
(
"for remote node"
,
remote_node
,
software_product
,
"for remote node"
,
remote_node
,
software_product
,
release_variation
,
type_variation
)
release_variation
,
type_variation
,
disable_alarm
=
True
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node 2"
,
remote_node
,
software_product
,
self
.
addAllocationSupply
(
"for compute node 2"
,
remote_node
,
software_product
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
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
(
allocation_state
=
'allocated'
,
node
=
"remote"
)
software_product
,
_
,
type_variation
,
_
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
node
=
"remote"
)
self
.
tic
()
project
=
instance_tree
.
getFollowUpValue
()
project
=
instance_tree
.
getFollowUpValue
()
remote_node2
=
self
.
portal
.
compute_node_module
.
newContent
(
remote_node2
=
self
.
portal
.
compute_node_module
.
newContent
(
...
@@ -377,7 +396,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -377,7 +396,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for remote node 2"
,
remote_node2
,
software_product
,
self
.
addAllocationSupply
(
"for remote node 2"
,
remote_node2
,
software_product
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
...
@@ -387,10 +406,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -387,10 +406,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
##########################################################################
##########################################################################
def
test_createUpgradeDecision_slaveAllocatedOnRemoteNode_newReleaseOnComputeNode
(
self
):
def
test_createUpgradeDecision_slaveAllocatedOnRemoteNode_newReleaseOnComputeNode
(
self
):
software_product
,
_
,
type_variation
,
remote_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
,
node
=
"remote"
)
software_product
,
_
,
type_variation
,
remote_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
,
node
=
"remote"
)
self
.
tic
()
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
checkCreatedUpgradeDecision
(
self
.
checkCreatedUpgradeDecision
(
...
@@ -400,19 +420,21 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -400,19 +420,21 @@ 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
(
allocation_state
=
'allocated'
,
shared
=
True
,
node
=
"remote"
)
software_product
,
release_variation
,
type_variation
,
remote_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
,
node
=
"remote"
)
self
.
tic
()
self
.
addAllocationSupply
(
self
.
addAllocationSupply
(
"for remote node"
,
remote_node
,
software_product
,
"for remote node"
,
remote_node
,
software_product
,
release_variation
,
type_variation
)
release_variation
,
type_variation
,
disable_alarm
=
True
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node 2"
,
remote_node
,
software_product
,
self
.
addAllocationSupply
(
"for compute node 2"
,
remote_node
,
software_product
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
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
(
allocation_state
=
'allocated'
,
shared
=
True
,
node
=
"remote"
)
software_product
,
_
,
type_variation
,
_
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
,
node
=
"remote"
)
self
.
tic
()
project
=
instance_tree
.
getFollowUpValue
()
project
=
instance_tree
.
getFollowUpValue
()
remote_node2
=
self
.
portal
.
compute_node_module
.
newContent
(
remote_node2
=
self
.
portal
.
compute_node_module
.
newContent
(
...
@@ -422,7 +444,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -422,7 +444,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for remote node 2"
,
remote_node2
,
software_product
,
self
.
addAllocationSupply
(
"for remote node 2"
,
remote_node2
,
software_product
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
...
@@ -432,10 +454,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -432,10 +454,11 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
##########################################################################
##########################################################################
def
test_createUpgradeDecision_slaveAllocatedOnInstanceNode_newReleaseOnInstanceNode
(
self
):
def
test_createUpgradeDecision_slaveAllocatedOnInstanceNode_newReleaseOnInstanceNode
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
,
node
=
"instance"
)
software_product
,
_
,
type_variation
,
compute_node
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
,
node
=
"instance"
)
self
.
tic
()
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
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
checkCreatedUpgradeDecision
(
self
.
checkCreatedUpgradeDecision
(
...
@@ -444,6 +467,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -444,6 +467,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
)
)
def
test_createUpgradeDecision_slaveAllocatedOnInstanceNode_newReleaseOnAnotherInstanceNode
(
self
):
def
test_createUpgradeDecision_slaveAllocatedOnInstanceNode_newReleaseOnAnotherInstanceNode
(
self
):
software_product
,
_
,
type_variation
,
_
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
,
node
=
"instance"
)
software_product
,
_
,
type_variation
,
_
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
,
node
=
"instance"
)
self
.
tic
()
project
=
instance_tree
.
getFollowUpValue
()
project
=
instance_tree
.
getFollowUpValue
()
instance_node2
=
self
.
portal
.
compute_node_module
.
newContent
(
instance_node2
=
self
.
portal
.
compute_node_module
.
newContent
(
...
@@ -452,7 +476,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
...
@@ -452,7 +476,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(SlapOSTestCaseMixin):
)
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node"
,
instance_node2
,
software_product
,
self
.
addAllocationSupply
(
"for compute node"
,
instance_node2
,
software_product
,
new_release_variation
,
type_variation
)
new_release_variation
,
type_variation
,
disable_alarm
=
True
)
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
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