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
90ce6b73
Commit
90ce6b73
authored
Jan 27, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: test compute network sla
parent
0a3dc431
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
120 additions
and
102 deletions
+120
-102
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudAllocationAlarm.py
...al_components/test.erp5.testSlapOSCloudAllocationAlarm.py
+120
-102
No files found.
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudAllocationAlarm.py
View file @
90ce6b73
...
...
@@ -6,8 +6,23 @@ from unittest import skip
class
TestSlapOSAllocation
(
SlapOSTestCaseMixin
):
def
makeAllocableSoftwareInstance
(
self
,
allocation_state
=
'possible'
,
shared
=
False
,
node
=
"compute"
):
software_product
,
release_variation
,
type_variation
,
compute_node
,
partition
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
allocation_state
,
shared
=
shared
,
node
=
node
)
def
makeAllocableComputeNode
(
self
,
project
,
software_product
,
release_variation
,
type_variation
):
compute_node
,
partition
=
self
.
_makeComputeNode
(
project
)
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
release_variation
,
type_variation
)
self
.
_installSoftware
(
compute_node
,
release_variation
.
getUrlString
()
)
self
.
tic
()
return
compute_node
,
partition
def
makeAllocableSoftwareInstanceAndProduct
(
self
,
allocation_state
=
'possible'
,
shared
=
False
,
node
=
"compute"
):
software_product
,
release_variation
,
type_variation
,
compute_node
,
partition
,
instance_tree
=
\
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
allocation_state
,
shared
=
shared
,
node
=
node
)
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
release_variation
,
type_variation
)
real_compute_node
=
partition
.
getParentValue
()
...
...
@@ -22,6 +37,11 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
software_instance
=
instance_tree
.
getSuccessorValue
()
return
software_instance
,
compute_node
,
partition
,
software_product
,
release_variation
,
type_variation
def
makeAllocableSoftwareInstance
(
self
,
allocation_state
=
'possible'
,
shared
=
False
,
node
=
"compute"
):
software_instance
,
compute_node
,
partition
,
_
,
_
,
_
=
\
self
.
makeAllocableSoftwareInstanceAndProduct
(
allocation_state
=
allocation_state
,
shared
=
shared
,
node
=
node
)
return
software_instance
,
compute_node
,
partition
def
_installSoftware
(
self
,
compute_node
,
url
):
...
...
@@ -291,40 +311,41 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
@
simulate
(
'Person_isAllowedToAllocate'
,
'*args, **kwargs'
,
'return True'
)
def
test_allocation_network_guid
(
self
):
s
elf
.
_makeTree
(
self
.
project
)
s
oftware_instance
,
compute_node
,
partition
=
self
.
makeAllocableSoftwareInstance
(
)
self
.
_makeComputeNode
(
self
.
project
)
new_id
=
self
.
generateNewId
()
computer_network
=
self
.
portal
.
computer_network_module
.
newContent
(
portal_type
=
'Computer Network'
,
title
=
"live_test_%s"
%
new_id
,
reference
=
"live_test_%s"
%
new_id
)
reference
=
"live_test_%s"
%
new_id
,
follow_up_value
=
software_instance
.
getFollowUpValue
()
)
computer_network
.
validate
()
self
.
compute_node
.
edit
(
subordination_value
=
computer_network
)
self
.
_installSoftware
(
self
.
compute_node
,
self
.
software_instance
.
getUrlString
()
)
compute_node
.
edit
(
subordination_value
=
computer_network
)
self
.
tic
(
)
self
.
assertEqual
(
None
,
s
elf
.
s
oftware_instance
.
getAggregateValue
(
self
.
assertEqual
(
None
,
software_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
))
s
elf
.
s
oftware_instance
.
setSlaXml
(
"""<?xml version='1.0' encoding='utf-8'?>
software_instance
.
setSlaXml
(
"""<?xml version='1.0' encoding='utf-8'?>
<instance>
<parameter id='network_guid'>%s</parameter>
</instance>"""
%
'%s_foo'
%
\
self
.
partition
.
getParentValue
().
getSubordinationReference
())
s
elf
.
s
oftware_instance
.
SoftwareInstance_tryToAllocatePartition
()
partition
.
getParentValue
().
getSubordinationReference
())
software_instance
.
SoftwareInstance_tryToAllocatePartition
()
self
.
assertEqual
(
None
,
s
elf
.
s
oftware_instance
.
getAggregate
(
portal_type
=
'Compute Partition'
))
software_instance
.
getAggregate
(
portal_type
=
'Compute Partition'
))
s
elf
.
s
oftware_instance
.
setSlaXml
(
"""<?xml version='1.0' encoding='utf-8'?>
software_instance
.
setSlaXml
(
"""<?xml version='1.0' encoding='utf-8'?>
<instance>
<parameter id='network_guid'>%s</parameter>
</instance>"""
%
'%s'
%
\
self
.
partition
.
getParentValue
().
getSubordinationReference
())
s
elf
.
s
oftware_instance
.
SoftwareInstance_tryToAllocatePartition
()
self
.
assertEqual
(
self
.
partition
.
getRelativeUrl
(),
s
elf
.
s
oftware_instance
.
getAggregate
(
portal_type
=
'Compute Partition'
))
partition
.
getParentValue
().
getSubordinationReference
())
software_instance
.
SoftwareInstance_tryToAllocatePartition
()
self
.
assertEqual
(
partition
.
getRelativeUrl
(),
software_instance
.
getAggregate
(
portal_type
=
'Compute Partition'
))
@
simulate
(
'Person_isAllowedToAllocate'
,
'*args, **kwargs'
,
'return True'
)
def
test_allocation_mode_unique_by_network_one_network
(
self
):
...
...
@@ -340,11 +361,13 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
<instance>
<parameter id='mode'>unique_by_network</parameter>
</instance>"""
self
.
_makeTree
(
self
.
project
)
compute_node1
=
self
.
_makeComputeNode
(
self
.
project
)[
0
]
compute_node2
=
self
.
_makeComputeNode
(
self
.
project
)[
0
]
self
.
_installSoftware
(
compute_node1
,
self
.
software_instance
.
getUrlString
())
self
.
_installSoftware
(
compute_node2
,
self
.
software_instance
.
getUrlString
())
software_instance
,
compute_node1
,
_
,
software_product
,
release_variation
,
type_variation
=
\
self
.
makeAllocableSoftwareInstanceAndProduct
()
instance_tree
=
software_instance
.
getSpecialiseValue
()
project
=
compute_node1
.
getFollowUpValue
()
compute_node2
,
_
=
self
.
makeAllocableComputeNode
(
project
,
software_product
,
release_variation
,
type_variation
)
new_id
=
self
.
generateNewId
()
computer_network
=
self
.
portal
.
computer_network_module
.
newContent
(
...
...
@@ -355,7 +378,7 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
compute_node1
.
edit
(
subordination_value
=
computer_network
)
compute_node2
.
edit
(
subordination_value
=
computer_network
)
self
.
assertEqual
(
None
,
s
elf
.
s
oftware_instance
.
getAggregateValue
(
self
.
assertEqual
(
None
,
software_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
))
software_instance2
=
self
.
portal
.
software_instance_module
\
...
...
@@ -363,38 +386,38 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
software_instance2
.
edit
(
title
=
self
.
generateNewSoftwareTitle
(),
reference
=
"TESTSI-%s"
%
self
.
generateNewId
(),
url_string
=
s
elf
.
s
oftware_instance
.
getUrlString
(),
source_reference
=
s
elf
.
generateNewSoftwareTyp
e
(),
url_string
=
software_instance
.
getUrlString
(),
source_reference
=
s
oftware_instance
.
getSourceReferenc
e
(),
text_content
=
self
.
generateSafeXml
(),
sla_xml
=
sla_xml
,
specialise
=
self
.
instance_tree
.
getRelativeUrl
()
,
follow_up_value
=
self
.
project
specialise
_value
=
instance_tree
,
follow_up_value
=
project
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
software_instance2
,
'start_requested'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
software_instance2
,
'validated'
)
self
.
tic
()
self
.
assertEqual
(
None
,
s
elf
.
s
oftware_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
))
software_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
))
self
.
assertEqual
(
s
elf
.
s
oftware_instance
.
getSlapState
(),
'start_requested'
)
self
.
assertEqual
(
s
elf
.
s
oftware_instance
.
getValidationState
(),
'validated'
)
self
.
assertEqual
(
software_instance
.
getSlapState
(),
'start_requested'
)
self
.
assertEqual
(
software_instance
.
getValidationState
(),
'validated'
)
s
elf
.
s
oftware_instance
.
setSlaXml
(
sla_xml
)
s
elf
.
s
oftware_instance
.
SoftwareInstance_tryToAllocatePartition
()
software_instance
.
setSlaXml
(
sla_xml
)
software_instance
.
SoftwareInstance_tryToAllocatePartition
()
self
.
tic
()
portal_workflow
=
s
elf
.
s
oftware_instance
.
portal_workflow
last_workflow_item
=
portal_workflow
.
getInfoFor
(
ob
=
s
elf
.
s
oftware_instance
,
portal_workflow
=
software_instance
.
portal_workflow
last_workflow_item
=
portal_workflow
.
getInfoFor
(
ob
=
software_instance
,
name
=
'comment'
,
wf_id
=
'edit_workflow'
)
self
.
assertEqual
(
None
,
last_workflow_item
)
self
.
assertEqual
(
None
,
last_workflow_item
)
self
.
assertNotEqual
(
None
,
s
elf
.
s
oftware_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
))
software_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
))
self
.
assertEqual
(
computer_network
.
getReference
(),
s
elf
.
s
oftware_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
)
\
.
getParentValue
().
getSubordinationReference
(),
software_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
)
\
.
getParentValue
().
getSubordinationReference
(),
)
self
.
tic
()
...
...
@@ -415,15 +438,19 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
instance tree.
Test with 3 instances and 3 existing compute_nodes on 2 different networks.
"""
self
.
tic
()
sla_xml
=
"""<?xml version='1.0' encoding='utf-8'?>
<instance>
<parameter id='mode'>unique_by_network</parameter>
</instance>"""
self
.
_makeTree
(
self
.
project
)
compute_node1
,
partition1
=
self
.
_makeComputeNode
(
self
.
project
)
compute_node2
=
self
.
_makeComputeNode
(
self
.
project
)[
0
]
compute_node3
,
partition3
=
self
.
_makeComputeNode
(
self
.
project
)
software_instance
,
compute_node1
,
partition1
,
software_product
,
release_variation
,
type_variation
=
\
self
.
makeAllocableSoftwareInstanceAndProduct
()
instance_tree
=
software_instance
.
getSpecialiseValue
()
project
=
compute_node1
.
getFollowUpValue
()
compute_node2
,
_
=
self
.
makeAllocableComputeNode
(
project
,
software_product
,
release_variation
,
type_variation
)
compute_node3
,
partition3
=
self
.
makeAllocableComputeNode
(
project
,
software_product
,
release_variation
,
type_variation
)
computer_network1
=
self
.
_makeComputerNetwork
()
computer_network2
=
self
.
_makeComputerNetwork
()
...
...
@@ -431,25 +458,19 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
compute_node2
.
edit
(
subordination_value
=
computer_network1
)
compute_node3
.
edit
(
subordination_value
=
computer_network2
)
self
.
_installSoftware
(
compute_node1
,
self
.
software_instance
.
getUrlString
())
self
.
_installSoftware
(
compute_node2
,
self
.
software_instance
.
getUrlString
())
self
.
_installSoftware
(
compute_node3
,
self
.
software_instance
.
getUrlString
())
self
.
assertEqual
(
None
,
self
.
software_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
))
self
.
tic
()
self
.
assertEqual
(
None
,
s
elf
.
requested_s
oftware_instance
.
getAggregateValue
(
self
.
assertEqual
(
None
,
software_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
))
self
.
software_instance
.
setSlaXml
(
"""<?xml version='1.0' encoding='utf-8'?>
software_instance
.
setSlaXml
(
"""<?xml version='1.0' encoding='utf-8'?>
<instance>
<parameter id='mode'>unique_by_network</parameter>
<parameter id='computer_guid'>%s</parameter>
</instance>"""
%
compute_node1
.
getReference
())
s
elf
.
s
oftware_instance
.
SoftwareInstance_tryToAllocatePartition
()
software_instance
.
SoftwareInstance_tryToAllocatePartition
()
self
.
assertEqual
(
s
elf
.
s
oftware_instance
.
getAggregate
(
portal_type
=
'Compute Partition'
),
software_instance
.
getAggregate
(
portal_type
=
'Compute Partition'
),
partition1
.
getRelativeUrl
(),
)
...
...
@@ -458,16 +479,16 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
software_instance2
.
edit
(
title
=
self
.
generateNewSoftwareTitle
(),
reference
=
"TESTSI-%s"
%
self
.
generateNewId
(),
url_string
=
s
elf
.
s
oftware_instance
.
getUrlString
(),
source_reference
=
s
elf
.
generateNewSoftwareTyp
e
(),
url_string
=
software_instance
.
getUrlString
(),
source_reference
=
s
oftware_instance
.
getSourceReferenc
e
(),
text_content
=
self
.
generateSafeXml
(),
sla_xml
=
sla_xml
,
specialise
=
self
.
instance_tree
.
getRelativeUrl
(),
follow_up_value
=
self
.
project
specialise
=
instance_tree
.
getRelativeUrl
(),
follow_up_value
=
project
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
software_instance2
,
'start_requested'
)
software_instance2
.
validate
()
self
.
commit
()
self
.
tic
()
software_instance2
.
SoftwareInstance_tryToAllocatePartition
()
self
.
assertEqual
(
software_instance2
.
getAggregate
(
portal_type
=
'Compute Partition'
),
...
...
@@ -479,12 +500,12 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
software_instance3
.
edit
(
title
=
self
.
generateNewSoftwareTitle
(),
reference
=
"TESTSI-%s"
%
self
.
generateNewId
(),
url_string
=
s
elf
.
s
oftware_instance
.
getUrlString
(),
url_string
=
software_instance
.
getUrlString
(),
source_reference
=
self
.
generateNewSoftwareType
(),
text_content
=
self
.
generateSafeXml
(),
sla_xml
=
sla_xml
,
specialise
=
self
.
instance_tree
.
getRelativeUrl
(),
follow_up_value
=
self
.
project
specialise
=
instance_tree
.
getRelativeUrl
(),
follow_up_value
=
project
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
software_instance3
,
'start_requested'
)
software_instance3
.
validate
()
...
...
@@ -502,22 +523,19 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
Test that when we request instance with mode as 'unique_by_network',
instance is not deployed on compute_node with no network.
"""
self
.
_makeTree
(
self
.
project
)
self
.
_makeComputeNode
(
self
.
project
)
self
.
_installSoftware
(
self
.
compute_node
,
self
.
software_instance
.
getUrlString
())
software_instance
,
_
,
_
=
self
.
makeAllocableSoftwareInstance
()
self
.
assertEqual
(
None
,
s
elf
.
s
oftware_instance
.
getAggregateValue
(
self
.
assertEqual
(
None
,
software_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
))
s
elf
.
s
oftware_instance
.
setSlaXml
(
"""<?xml version='1.0' encoding='utf-8'?>
software_instance
.
setSlaXml
(
"""<?xml version='1.0' encoding='utf-8'?>
<instance>
<parameter id='mode'>unique_by_network</parameter>
</instance>"""
)
s
elf
.
s
oftware_instance
.
SoftwareInstance_tryToAllocatePartition
()
software_instance
.
SoftwareInstance_tryToAllocatePartition
()
self
.
assertEqual
(
None
,
s
elf
.
s
oftware_instance
.
getAggregate
(
portal_type
=
'Compute Partition'
)
software_instance
.
getAggregate
(
portal_type
=
'Compute Partition'
)
)
@
simulate
(
'Person_isAllowedToAllocate'
,
'*args, **kwargs'
,
'return True'
)
...
...
@@ -537,8 +555,8 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
else
:
return
self
.
serialize_call
()
s
elf
.
_makeTree
(
self
.
project
)
s
elf
.
s
oftware_instance
.
setSlaXml
(
"""<?xml version='1.0' encoding='utf-8'?>
s
oftware_instance
,
_
,
_
=
self
.
makeAllocableSoftwareInstance
(
)
software_instance
.
setSlaXml
(
"""<?xml version='1.0' encoding='utf-8'?>
<instance>
<parameter id='mode'>unique_by_network</parameter>
</instance>"""
)
...
...
@@ -548,7 +566,7 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
try
:
Base
.
serialize
=
verify_serialize_call
self
.
assertRaises
(
DummyTestException
,
s
elf
.
s
oftware_instance
.
SoftwareInstance_tryToAllocatePartition
)
software_instance
.
SoftwareInstance_tryToAllocatePartition
)
finally
:
Base
.
serialize
=
Base
.
serialize_call
...
...
@@ -565,22 +583,22 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
<instance>
<parameter id='mode'>unique_by_network</parameter>
</instance>"""
self
.
_makeTree
(
self
.
project
)
compute_node1
=
self
.
_makeComputeNode
(
self
.
project
)[
0
]
compute_node2
=
self
.
_makeComputeNode
(
self
.
project
)[
0
]
self
.
_installSoftware
(
compute_node1
,
self
.
software_instance
.
getUrlString
())
self
.
_installSoftware
(
compute_node2
,
self
.
software_instance
.
getUrlString
())
software_instance
,
compute_node1
,
_
,
software_product
,
release_variation
,
type_variation
=
\
self
.
makeAllocableSoftwareInstanceAndProduct
()
instance_tree
=
software_instance
.
getSpecialiseValue
()
project
=
compute_node1
.
getFollowUpValue
()
compute_node2
,
_
=
self
.
makeAllocableComputeNode
(
project
,
software_product
,
release_variation
,
type_variation
)
computer_network
=
self
.
_makeComputerNetwork
()
new_id
=
self
.
generateNewId
()
computer_network
=
self
.
portal
.
computer_network_module
.
newContent
(
portal_type
=
'Computer Network'
,
title
=
"live_test_%s"
%
new_id
,
reference
=
"live_test_%s"
%
new_id
)
computer_network
.
validate
()
compute_node1
.
edit
(
subordination_value
=
computer_network
)
compute_node2
.
edit
(
subordination_value
=
computer_network
)
self
.
assertEqual
(
None
,
self
.
software_instance
.
getAggregateValue
(
self
.
tic
()
self
.
assertEqual
(
None
,
software_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
))
software_instance2
=
self
.
portal
.
software_instance_module
\
...
...
@@ -588,12 +606,12 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
software_instance2
.
edit
(
title
=
self
.
generateNewSoftwareTitle
(),
reference
=
"TESTSI-%s"
%
self
.
generateNewId
(),
url_string
=
s
elf
.
s
oftware_instance
.
getUrlString
(),
source_reference
=
s
elf
.
generateNewSoftwareTyp
e
(),
url_string
=
software_instance
.
getUrlString
(),
source_reference
=
s
oftware_instance
.
getSourceReferenc
e
(),
text_content
=
self
.
generateSafeXml
(),
sla_xml
=
sla_xml
,
specialise
=
self
.
instance_tree
.
getRelativeUrl
()
,
follow_up_value
=
self
.
project
specialise
_value
=
instance_tree
,
follow_up_value
=
project
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
software_instance2
,
'start_requested'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
software_instance2
,
'validated'
)
...
...
@@ -601,27 +619,27 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
self
.
assertEqual
(
None
,
s
elf
.
s
oftware_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
))
software_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
))
self
.
assertEqual
(
s
elf
.
s
oftware_instance
.
getSlapState
(),
'start_requested'
)
self
.
assertEqual
(
s
elf
.
s
oftware_instance
.
getValidationState
(),
'validated'
)
self
.
assertEqual
(
software_instance
.
getSlapState
(),
'start_requested'
)
self
.
assertEqual
(
software_instance
.
getValidationState
(),
'validated'
)
s
elf
.
s
oftware_instance
.
setSlaXml
(
sla_xml
)
s
elf
.
s
oftware_instance
.
SoftwareInstance_tryToAllocatePartition
()
software_instance
.
setSlaXml
(
sla_xml
)
software_instance
.
SoftwareInstance_tryToAllocatePartition
()
software_instance2
.
SoftwareInstance_tryToAllocatePartition
()
portal_workflow
=
s
elf
.
s
oftware_instance
.
portal_workflow
last_workflow_item
=
portal_workflow
.
getInfoFor
(
ob
=
s
elf
.
s
oftware_instance
,
portal_workflow
=
software_instance
.
portal_workflow
last_workflow_item
=
portal_workflow
.
getInfoFor
(
ob
=
software_instance
,
name
=
'comment'
,
wf_id
=
'edit_workflow'
)
self
.
assertEqual
(
None
,
last_workflow_item
)
self
.
assertEqual
(
None
,
last_workflow_item
)
self
.
assertNotEqual
(
None
,
s
elf
.
s
oftware_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
))
software_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
))
# First is deployed
self
.
assertEqual
(
computer_network
.
getReference
(),
s
elf
.
s
oftware_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
)
\
.
getParentValue
().
getSubordinationReference
(),
software_instance
.
getAggregateValue
(
portal_type
=
'Compute Partition'
)
\
.
getParentValue
().
getSubordinationReference
(),
)
# But second is not yet deployed because of pending activities containing tag
self
.
assertEqual
(
...
...
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