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
0
Merge Requests
0
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
Lu Xu
slapos.core
Commits
483684d9
Commit
483684d9
authored
May 25, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No need to commit and tic.
Created instance can be now accessed directly from request.
parent
6023fe1a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
25 deletions
+5
-25
master/product/Vifib/tests/testVifibSlapWebService.py
master/product/Vifib/tests/testVifibSlapWebService.py
+5
-25
No files found.
master/product/Vifib/tests/testVifibSlapWebService.py
View file @
483684d9
...
@@ -601,37 +601,17 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
...
@@ -601,37 +601,17 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
sla_xml
=
sequence
.
get
(
'sla_xml'
),
sla_xml
=
sequence
.
get
(
'sla_xml'
),
shared
=
kw
.
get
(
'shared'
,
False
),
shared
=
kw
.
get
(
'shared'
,
False
),
state
=
kw
[
'state'
])
state
=
kw
[
'state'
])
transaction
.
commit
()
self
.
tic
()
# Note: This is tricky part. Workflow methods does not return nothing
# so the only way is to find again the computer partition.
# But only title can be passed, that is why random is used to avoid
# duplication
software_instance_portal_type
=
kw
.
get
(
"instance_portal_type"
,
software_instance_portal_type
=
kw
.
get
(
"instance_portal_type"
,
self
.
software_instance_portal_type
)
self
.
software_instance_portal_type
)
software_instance_list
=
[]
software_instance
=
self
.
portal
.
restrictedTraverse
(
cleanup_resource
=
self
.
portal
.
portal_preferences
\
self
.
portal
.
REQUEST
.
get
(
'request_instance'
))
.
getPreferredInstanceCleanupResource
()
for
software_instance
in
self
.
portal
.
portal_catalog
(
portal_type
=
software_instance_portal_type
,
title
=
software_title
):
try
:
cleanup_line
=
software_instance
.
Item_getInstancePackingListLine
(
cleanup_resource
)
except
ValueError
:
software_instance_list
.
append
(
software_instance
)
else
:
if
cleanup_line
.
getSimulationState
()
!=
'delivered'
:
software_instance_list
.
append
(
software_instance
)
self
.
assertEqual
(
1
,
len
(
software_instance_list
))
software_instance
=
software_instance_list
[
0
]
sequence
.
edit
(
sequence
.
edit
(
root_software_instance_title
=
software_title
,
root_software_instance_title
=
software_title
,
software_instance_uid
=
software_instance
.
getUid
(),
software_instance_uid
=
software_instance
.
getUid
(),
software_instance_reference
=
software_instance
.
getReference
(),
software_instance_reference
=
software_instance
.
getReference
(),
hosting_subscription_uid
=
software_instance
.
getAggregateRelatedValue
(
hosting_subscription_uid
=
software_instance
.
getSpecialiseUid
(),
portal_type
=
'Sale Order Line'
).
getAggregateValue
(
)
portal_type
=
'Hosting Subscription'
).
getUid
())
def
stepSetComputerPartitionFromRootSoftwareInstance
(
self
,
sequence
):
def
stepSetComputerPartitionFromRootSoftwareInstance
(
self
,
sequence
):
computer_partition
=
self
.
portal
.
portal_catalog
.
getResultValue
(
computer_partition
=
self
.
portal
.
portal_catalog
.
getResultValue
(
...
...
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